How to use weavejs - 10 common examples

To help you get started, we’ve selected a few weavejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github WeaveTeam / WeaveJS / WeaveApp / src / weaveapp / menu / SystemMenu.tsx View on Github external
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 */
github WeaveTeam / WeaveJS / WeaveApp / src / weaveapp / tool / TableTool.tsx View on Github external
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(", ")));
	}
github WeaveTeam / WeaveJS / WeaveApp / src / weaveapp / tool / TextTool.tsx View on Github external
get defaultPanelTitle():string
	{
		return Weave.lang("Text Tool");
	}
github WeaveTeam / WeaveJS / WeaveApp / src / weaveapp / tool / c3tool / C3BarChart.tsx View on Github external
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(", ")));
	}
github WeaveTeam / WeaveJS / WeaveApp / src / weaveapp / editor / WeaveDataSourceEditor.tsx View on Github external
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
							}
						})
					}
github WeaveTeam / WeaveJS / WeaveApp / src / weaveapp / tool / c3tool / C3LineChart.tsx View on Github external
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(", ")));
	}
github WeaveTeam / WeaveJS / WeaveApp / src / weaveapp / tool / SessionStateMenuTool.tsx View on Github external
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) &gt;= 0;
	}

	get title():string
	{
github WeaveTeam / WeaveJS / WeaveApp / src / weaveapp / tool / AttributeMenuTool.tsx View on Github external
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 =>
	{
github WeaveTeam / WeaveJS / WeaveApp / src / weaveapp / tool / AttributeMenuTool.tsx View on Github external
});

	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 =>
github WeaveTeam / WeaveJS / WeaveApp / src / weaveapp / tool / SessionStateMenuTool.tsx View on Github external
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) &gt;= 0;
	}

	get title():string
	{
		return MiscUtils.evalTemplateString(this.panelTitle.value, this);

weavejs

Application architecture library for building modern web applications

MPL-2.0
Latest version published 8 years ago

Package Health Score

39 / 100
Full package analysis