Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let signedOutPopup = () => PopupWindow.open(
{
context: this.owner.context,
title: "Confirmation",
content: <div>{Weave.lang("Signed out successfully")}</div>
}
);
/* Log in with invalid credentials to drop session */
get defaultPanelTitle():string
{
var columns = this.columns.getObjects() as IAttributeColumn[];
if (columns.length == 0)
return Weave.lang('Table');
return Weave.lang("Table of {0}", columns.map(column=>ColumnUtils.getTitle(column)).join(Weave.lang(", ")));
}
get defaultPanelTitle():string
{
return Weave.lang("Text Tool");
}
get defaultPanelTitle():string
{
var columns = this.heightColumns.getObjects() as IAttributeColumn[];
if (columns.length == 0)
return Weave.lang('Bar Chart');
return Weave.lang("Bar Chart of {0}", columns.map(column=>ColumnUtils.getTitle(column)).join(Weave.lang(", ")));
}
dataImportTypes.map((importType:string) => {
if (importType == SQL)
{
var click = this.openSqlImport;
}
else if (importType == CSV)
{
//var click = this.openCsvImport;
}
return{
label:Weave.lang(importType),
click:click
}
})
}
get defaultPanelTitle():string
{
var columns = this.columns.getObjects() as IAttributeColumn[];
if (columns.length == 0)
return Weave.lang('Line chart');
return Weave.lang("Line chart of {0}", columns.map(column=>ColumnUtils.getTitle(column)).join(Weave.lang(", ")));
}
const LAYOUT_LIST:string = "List";
const LAYOUT_COMBO:string = "ComboBox";
const LAYOUT_VSLIDER:string = "VSlider";
const LAYOUT_HSLIDER:string = "HSlider";
const menuOptions:string[] = [LAYOUT_LIST, LAYOUT_COMBO, LAYOUT_HSLIDER, LAYOUT_VSLIDER];
export default class SessionStateMenuTool extends AbstractVisTool
{
static WEAVE_INFO = Weave.setClassInfo(SessionStateMenuTool, {
id: "weavejs.tool.SessionStateMenu",
label: "Session State Menu Tool",
interfaces: [IVisTool/*, ILinkableObjectWithNewProperties*/],
deprecatedIds: ["weave.ui::SessionStateMenuTool"]
});
public selectedChoice = Weave.linkableChild(this, LinkableString, this.forceUpdate, true);
public layoutMode = Weave.linkableChild(this, new LinkableString(LAYOUT_LIST, this.verifyLayoutMode), this.forceUpdate, true);
public autoRecord = Weave.linkableChild(this, new LinkableBoolean(false), this.forceUpdate);
choices = Weave.linkableChild(this, new LinkableHashMap(LinkableVariable));
targets = Weave.linkableChild(this, new LinkableHashMap(LinkableDynamicObject));
panelTitle = Weave.linkableChild(this, LinkableString);
pendingApply:Boolean =false;
verifyLayoutMode(value:string):boolean
{
return menuOptions.indexOf(value) >= 0;
}
get title():string
{
constructor (props:IVisToolProps)
{
super(props);
this.state = {isPlaying: false};
this.targetToolPath.addGroupedCallback(this, this.setToolWatcher);
this.selectedAttribute.addGroupedCallback(this, this.onSelectedAttribute);
this.playEnabled.addGroupedCallback(this, this.forceUpdate);
}
//session properties
public panelTitle = Weave.linkableChild(this, LinkableString);
public choices = Weave.linkableChild(this, new LinkableHashMap(IAttributeColumn), this.forceUpdate, true );
public layoutMode = Weave.linkableChild(this, new LinkableString(LAYOUT_LIST, this.verifyLayoutMode), this.forceUpdate, true);
public selectedAttribute = Weave.linkableChild(this, LinkableVariable, this.forceUpdate, true);
public targetToolPath = Weave.linkableChild(this, new LinkableVariable(Array));
public targetAttribute = Weave.linkableChild(this, LinkableString);
public playEnabled = Weave.linkableChild(this, LinkableBoolean);
public playbackIntervalSeconds = Weave.linkableChild(this, new LinkableNumber(1));
toolWatcher = Weave.privateLinkableChild(this, LinkableWatcher);
altText:LinkableString = Weave.linkableChild(this, new LinkableString(this.panelTitle.value));
verifyLayoutMode(value:string):boolean
{
return LAYOUT_OPTIONS_MULTIPLE.indexOf(value) >= 0;
}
//callback for targetToolPath
setToolWatcher =():void =>
{
});
constructor (props:IVisToolProps)
{
super(props);
this.state = {isPlaying: false};
this.targetToolPath.addGroupedCallback(this, this.setToolWatcher);
this.selectedAttribute.addGroupedCallback(this, this.onSelectedAttribute);
this.playEnabled.addGroupedCallback(this, this.forceUpdate);
}
//session properties
public panelTitle = Weave.linkableChild(this, LinkableString);
public choices = Weave.linkableChild(this, new LinkableHashMap(IAttributeColumn), this.forceUpdate, true );
public layoutMode = Weave.linkableChild(this, new LinkableString(LAYOUT_LIST, this.verifyLayoutMode), this.forceUpdate, true);
public selectedAttribute = Weave.linkableChild(this, LinkableVariable, this.forceUpdate, true);
public targetToolPath = Weave.linkableChild(this, new LinkableVariable(Array));
public targetAttribute = Weave.linkableChild(this, LinkableString);
public playEnabled = Weave.linkableChild(this, LinkableBoolean);
public playbackIntervalSeconds = Weave.linkableChild(this, new LinkableNumber(1));
toolWatcher = Weave.privateLinkableChild(this, LinkableWatcher);
altText:LinkableString = Weave.linkableChild(this, new LinkableString(this.panelTitle.value));
verifyLayoutMode(value:string):boolean
{
return LAYOUT_OPTIONS_MULTIPLE.indexOf(value) >= 0;
}
//callback for targetToolPath
setToolWatcher =():void =>
const LAYOUT_COMBO:string = "ComboBox";
const LAYOUT_VSLIDER:string = "VSlider";
const LAYOUT_HSLIDER:string = "HSlider";
const menuOptions:string[] = [LAYOUT_LIST, LAYOUT_COMBO, LAYOUT_HSLIDER, LAYOUT_VSLIDER];
export default class SessionStateMenuTool extends AbstractVisTool
{
static WEAVE_INFO = Weave.setClassInfo(SessionStateMenuTool, {
id: "weavejs.tool.SessionStateMenu",
label: "Session State Menu Tool",
interfaces: [IVisTool/*, ILinkableObjectWithNewProperties*/],
deprecatedIds: ["weave.ui::SessionStateMenuTool"]
});
public selectedChoice = Weave.linkableChild(this, LinkableString, this.forceUpdate, true);
public layoutMode = Weave.linkableChild(this, new LinkableString(LAYOUT_LIST, this.verifyLayoutMode), this.forceUpdate, true);
public autoRecord = Weave.linkableChild(this, new LinkableBoolean(false), this.forceUpdate);
choices = Weave.linkableChild(this, new LinkableHashMap(LinkableVariable));
targets = Weave.linkableChild(this, new LinkableHashMap(LinkableDynamicObject));
panelTitle = Weave.linkableChild(this, LinkableString);
pendingApply:Boolean =false;
verifyLayoutMode(value:string):boolean
{
return menuOptions.indexOf(value) >= 0;
}
get title():string
{
return MiscUtils.evalTemplateString(this.panelTitle.value, this);