@eclipse-glsp-examples/workflow-glsp
Advanced tools
Comparing version 0.9.0-next.495d850a to 0.9.0-next.4a496c8e
@@ -16,7 +16,7 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import "../css/diagram.css"; | ||
import "balloon-css/balloon.min.css"; | ||
import "sprotty/css/edit-label.css"; | ||
import { Container } from "inversify"; | ||
import '../css/diagram.css'; | ||
import 'balloon-css/balloon.min.css'; | ||
import 'sprotty/css/edit-label.css'; | ||
import { Container } from 'inversify'; | ||
export default function createContainer(widgetId: string): Container; | ||
//# sourceMappingURL=di.config.d.ts.map |
@@ -34,5 +34,5 @@ "use strict"; | ||
var context = { bind: bind, unbind: unbind, isBound: isBound, rebind: rebind }; | ||
client_1.configureModelElement(context, 'graph', client_1.GLSPGraph, client_1.SGraphView); | ||
client_1.configureModelElement(context, 'task:automated', model_1.TaskNode, workflow_views_1.TaskNodeView); | ||
client_1.configureModelElement(context, 'task:manual', model_1.TaskNode, workflow_views_1.TaskNodeView); | ||
client_1.configureDefaultModelElements(context); | ||
client_1.configureModelElement(context, 'task:automated', model_1.TaskNode, client_1.RoundedCornerNodeView); | ||
client_1.configureModelElement(context, 'task:manual', model_1.TaskNode, client_1.RoundedCornerNodeView); | ||
client_1.configureModelElement(context, 'label:heading', client_1.SLabel, client_1.SLabelView, { enable: [client_1.editLabelFeature] }); | ||
@@ -42,22 +42,16 @@ client_1.configureModelElement(context, 'comp:comp', client_1.SCompartment, client_1.SCompartmentView); | ||
client_1.configureModelElement(context, 'label:icon', client_1.SLabel, client_1.SLabelView); | ||
client_1.configureModelElement(context, 'html', client_1.HtmlRoot, client_1.HtmlRootView); | ||
client_1.configureModelElement(context, 'pre-rendered', client_1.PreRenderedElement, client_1.PreRenderedView); | ||
client_1.configureModelElement(context, 'button:expand', client_1.SButton, client_1.ExpandButtonView); | ||
client_1.configureModelElement(context, 'routing-point', client_1.SRoutingHandle, client_1.SRoutingHandleView); | ||
client_1.configureModelElement(context, 'volatile-routing-point', client_1.SRoutingHandle, client_1.SRoutingHandleView); | ||
client_1.configureModelElement(context, 'edge', client_1.SEdge, workflow_views_1.WorkflowEdgeView); | ||
client_1.configureModelElement(context, 'edge:weighted', model_1.WeightedEdge, workflow_views_1.WeightedEdgeView); | ||
client_1.configureModelElement(context, client_1.DefaultTypes.EDGE, client_1.SEdge, workflow_views_1.WorkflowEdgeView); | ||
client_1.configureModelElement(context, 'edge:weighted', model_1.WeightedEdge, workflow_views_1.WorkflowEdgeView); | ||
client_1.configureModelElement(context, 'icon', model_1.Icon, workflow_views_1.IconView); | ||
client_1.configureModelElement(context, 'activityNode:merge', model_1.ActivityNode, client_1.DiamondNodeView); | ||
client_1.configureModelElement(context, 'activityNode:decision', model_1.ActivityNode, client_1.DiamondNodeView); | ||
client_1.configureModelElement(context, 'activityNode:fork', model_1.ActivityNode, workflow_views_1.ForkOrJoinNodeView); | ||
client_1.configureModelElement(context, 'activityNode:join', model_1.ActivityNode, workflow_views_1.ForkOrJoinNodeView); | ||
client_1.configureModelElement(context, 'activityNode:fork', model_1.ActivityNode, client_1.RectangularNodeView); | ||
client_1.configureModelElement(context, 'activityNode:join', model_1.ActivityNode, client_1.RectangularNodeView); | ||
}); | ||
function createContainer(widgetId) { | ||
var container = new inversify_1.Container(); | ||
container.load(client_1.validationModule, client_1.defaultModule, client_1.glspMouseToolModule, client_1.defaultGLSPModule, client_1.glspSelectModule, client_1.boundsModule, client_1.viewportModule, client_1.toolsModule, client_1.glspHoverModule, client_1.fadeModule, client_1.exportModule, client_1.expandModule, client_1.openModule, client_1.buttonModule, client_1.modelSourceModule, client_1.labelEditUiModule, client_1.glspEditLabelModule, workflowDiagramModule, client_1.toolFeedbackModule, client_1.modelHintsModule, client_1.glspContextMenuModule, client_1.glspServerCopyPasteModule, client_1.modelSourceWatcherModule, client_1.glspCommandPaletteModule, client_1.paletteModule, client_1.routingModule, client_1.glspDecorationModule, client_1.edgeLayoutModule, client_1.zorderModule, client_1.layoutCommandsModule, di_config_1.directTaskEditor, client_1.navigationModule, client_1.markerNavigatorModule); | ||
container.load(client_1.defaultModule, client_1.defaultGLSPModule, client_1.glspMouseToolModule, client_1.validationModule, client_1.glspSelectModule, client_1.boundsModule, client_1.glspViewportModule, client_1.toolsModule, client_1.glspHoverModule, client_1.fadeModule, client_1.exportModule, client_1.expandModule, client_1.openModule, client_1.buttonModule, client_1.modelSourceModule, client_1.labelEditUiModule, client_1.glspEditLabelModule, workflowDiagramModule, client_1.toolFeedbackModule, client_1.modelHintsModule, client_1.glspContextMenuModule, client_1.glspServerCopyPasteModule, client_1.modelSourceWatcherModule, client_1.glspCommandPaletteModule, client_1.paletteModule, client_1.routingModule, client_1.glspDecorationModule, client_1.edgeLayoutModule, client_1.zorderModule, client_1.layoutCommandsModule, di_config_1.directTaskEditor, client_1.navigationModule, client_1.markerNavigatorModule); | ||
client_1.overrideViewerOptions(container, { | ||
baseDiv: widgetId, | ||
hiddenDiv: widgetId + "_hidden", | ||
needsClientLayout: true | ||
hiddenDiv: widgetId + '_hidden' | ||
}); | ||
@@ -64,0 +58,0 @@ return container; |
@@ -16,4 +16,4 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import { ContainerModule } from "inversify"; | ||
import { ContainerModule } from 'inversify'; | ||
export declare const directTaskEditor: ContainerModule; | ||
//# sourceMappingURL=di.config.d.ts.map |
@@ -16,5 +16,5 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import { AbstractUIExtension, Action, AutoCompleteWidget, EditorContextService, GLSPActionDispatcher, ILogger, LabeledAction, SModelRoot, ValidationStatus, ViewerOptions } from "@eclipse-glsp/client"; | ||
import { DOMHelper } from "sprotty/lib/base/views/dom-helper"; | ||
import { TaskNode } from "../model"; | ||
import { AbstractUIExtension, Action, AutoCompleteWidget, EditorContextService, GLSPActionDispatcher, ILogger, LabeledAction, SModelRoot, ValidationStatus, ViewerOptions } from '@eclipse-glsp/client'; | ||
import { DOMHelper } from 'sprotty/lib/base/views/dom-helper'; | ||
import { TaskNode } from '../model'; | ||
export declare class ApplyTaskEditOperation implements Action { | ||
@@ -21,0 +21,0 @@ readonly taskId: string; |
@@ -125,4 +125,8 @@ "use strict"; | ||
TaskEditor_1 = TaskEditor; | ||
TaskEditor.prototype.id = function () { return TaskEditor_1.ID; }; | ||
TaskEditor.prototype.containerClass = function () { return 'command-palette'; }; | ||
TaskEditor.prototype.id = function () { | ||
return TaskEditor_1.ID; | ||
}; | ||
TaskEditor.prototype.containerClass = function () { | ||
return 'command-palette'; | ||
}; | ||
TaskEditor.prototype.initializeContents = function (containerElement) { | ||
@@ -129,0 +133,0 @@ var _this = this; |
@@ -16,7 +16,7 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import createWorkflowDiagramContainer from "./di.config"; | ||
export * from "./model"; | ||
export * from "./workflow-views"; | ||
export * from "./direct-task-editing/direct-task-editor"; | ||
import createWorkflowDiagramContainer from './di.config'; | ||
export * from './model'; | ||
export * from './workflow-views'; | ||
export * from './direct-task-editing/direct-task-editor'; | ||
export { createWorkflowDiagramContainer }; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -16,3 +16,3 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import { DiamondNode, LayoutContainer, Nameable, RectangularNode, SEdge, SModelElement, SShapeElement, WithEditableLabel } from "@eclipse-glsp/client"; | ||
import { DiamondNode, EditableLabel, LayoutContainer, Nameable, RectangularNode, SChildElement, SEdge, SModelElement, SShapeElement, WithEditableLabel } from '@eclipse-glsp/client'; | ||
export declare class TaskNode extends RectangularNode implements Nameable, WithEditableLabel { | ||
@@ -24,3 +24,3 @@ static readonly DEFAULT_FEATURES: symbol[]; | ||
reference?: string; | ||
get editableLabel(): (import("@eclipse-glsp/client").SChildElement & import("@eclipse-glsp/client").EditableLabel) | undefined; | ||
get editableLabel(): (SChildElement & EditableLabel) | undefined; | ||
} | ||
@@ -27,0 +27,0 @@ export declare function isTaskNode(element: SModelElement): element is TaskNode; |
@@ -37,3 +37,3 @@ "use strict"; | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.name = ""; | ||
_this.name = ''; | ||
return _this; | ||
@@ -87,2 +87,3 @@ } | ||
exports.ActivityNode = ActivityNode; | ||
// eslint-disable-next-line no-redeclare | ||
(function (ActivityNode) { | ||
@@ -97,3 +98,3 @@ var Type; | ||
Type.FORK = 'forkNode'; | ||
Type.UNDEFINED = "undefined"; | ||
Type.UNDEFINED = 'undefined'; | ||
})(Type = ActivityNode.Type || (ActivityNode.Type = {})); | ||
@@ -100,0 +101,0 @@ })(ActivityNode = exports.ActivityNode || (exports.ActivityNode = {})); |
@@ -16,18 +16,8 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import { IView, Point, PolylineEdgeView, RectangularNodeView, RenderingContext, SEdge, SShapeElement } from "@eclipse-glsp/client"; | ||
import { VNode } from "snabbdom/vnode"; | ||
import { ActivityNode, Icon, TaskNode, WeightedEdge } from "./model"; | ||
export declare class TaskNodeView extends RectangularNodeView { | ||
render(node: TaskNode, context: RenderingContext): VNode; | ||
protected getRoundedCornerRadius(node: SShapeElement): number; | ||
} | ||
export declare class ForkOrJoinNodeView extends RectangularNodeView { | ||
render(node: ActivityNode, context: RenderingContext): VNode; | ||
} | ||
export declare class WorkflowEdgeView extends PolylineEdgeView { | ||
import { GEdgeView, IView, Point, RenderingContext, SEdge } from '@eclipse-glsp/client'; | ||
import { VNode } from 'snabbdom/vnode'; | ||
import { Icon } from './model'; | ||
export declare class WorkflowEdgeView extends GEdgeView { | ||
protected renderAdditionals(edge: SEdge, segments: Point[], context: RenderingContext): VNode[]; | ||
} | ||
export declare class WeightedEdgeView extends WorkflowEdgeView { | ||
render(edge: Readonly<WeightedEdge>, context: RenderingContext): VNode; | ||
} | ||
export declare class IconView implements IView { | ||
@@ -34,0 +24,0 @@ render(element: Icon, context: RenderingContext): VNode; |
@@ -22,3 +22,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.IconView = exports.WeightedEdgeView = exports.WorkflowEdgeView = exports.ForkOrJoinNodeView = exports.TaskNodeView = void 0; | ||
exports.IconView = exports.WorkflowEdgeView = void 0; | ||
/******************************************************************************** | ||
@@ -42,40 +42,4 @@ * Copyright (c) 2019 EclipseSource and others. | ||
var snabbdom = require("snabbdom-jsx"); | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
var JSX = { createElement: snabbdom.svg }; | ||
var TaskNodeView = /** @class */ (function (_super) { | ||
__extends(TaskNodeView, _super); | ||
function TaskNodeView() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
TaskNodeView.prototype.render = function (node, context) { | ||
var rcr = this.getRoundedCornerRadius(node); | ||
var graph = JSX.createElement("g", null, | ||
JSX.createElement("rect", { "class-sprotty-node": true, "class-task": true, "class-automated": node.taskType === 'automated', "class-manual": node.taskType === 'manual', "class-mouseover": node.hoverFeedback, "class-selected": node.selected, x: 0, y: 0, rx: rcr, ry: rcr, width: Math.max(0, node.bounds.width), height: Math.max(0, node.bounds.height) }), | ||
context.renderChildren(node)); | ||
return graph; | ||
}; | ||
TaskNodeView.prototype.getRoundedCornerRadius = function (node) { | ||
return 5; | ||
}; | ||
TaskNodeView = __decorate([ | ||
inversify_1.injectable() | ||
], TaskNodeView); | ||
return TaskNodeView; | ||
}(client_1.RectangularNodeView)); | ||
exports.TaskNodeView = TaskNodeView; | ||
var ForkOrJoinNodeView = /** @class */ (function (_super) { | ||
__extends(ForkOrJoinNodeView, _super); | ||
function ForkOrJoinNodeView() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
ForkOrJoinNodeView.prototype.render = function (node, context) { | ||
var graph = JSX.createElement("g", null, | ||
JSX.createElement("rect", { "class-sprotty-node": true, "class-forkOrJoin": true, "class-mouseover": node.hoverFeedback, "class-selected": node.selected, width: 10, height: Math.max(50, node.bounds.height) })); | ||
return graph; | ||
}; | ||
ForkOrJoinNodeView = __decorate([ | ||
inversify_1.injectable() | ||
], ForkOrJoinNodeView); | ||
return ForkOrJoinNodeView; | ||
}(client_1.RectangularNodeView)); | ||
exports.ForkOrJoinNodeView = ForkOrJoinNodeView; | ||
var WorkflowEdgeView = /** @class */ (function (_super) { | ||
@@ -87,7 +51,8 @@ __extends(WorkflowEdgeView, _super); | ||
WorkflowEdgeView.prototype.renderAdditionals = function (edge, segments, context) { | ||
var additionals = _super.prototype.renderAdditionals.call(this, edge, segments, context); | ||
var p1 = segments[segments.length - 2]; | ||
var p2 = segments[segments.length - 1]; | ||
return [ | ||
JSX.createElement("path", { "class-sprotty-edge": true, "class-arrow": true, d: "M 1.5,0 L 10,-4 L 10,4 Z", transform: "rotate(" + client_1.toDegrees(client_1.angleOfPoint({ x: p1.x - p2.x, y: p1.y - p2.y })) + " " + p2.x + " " + p2.y + ") translate(" + p2.x + " " + p2.y + ")" }) | ||
]; | ||
var arrow = JSX.createElement("path", { "class-sprotty-edge": true, "class-arrow": true, d: 'M 1.5,0 L 10,-4 L 10,4 Z', transform: "rotate(" + client_1.toDegrees(client_1.angleOfPoint({ x: p1.x - p2.x, y: p1.y - p2.y })) + " " + p2.x + " " + p2.y + ") translate(" + p2.x + " " + p2.y + ")" }); | ||
additionals.push(arrow); | ||
return additionals; | ||
}; | ||
@@ -98,25 +63,4 @@ WorkflowEdgeView = __decorate([ | ||
return WorkflowEdgeView; | ||
}(client_1.PolylineEdgeView)); | ||
}(client_1.GEdgeView)); | ||
exports.WorkflowEdgeView = WorkflowEdgeView; | ||
var WeightedEdgeView = /** @class */ (function (_super) { | ||
__extends(WeightedEdgeView, _super); | ||
function WeightedEdgeView() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
WeightedEdgeView.prototype.render = function (edge, context) { | ||
var router = this.edgeRouterRegistry.get(edge.routerKind); | ||
var route = router.route(edge); | ||
if (route.length === 0) | ||
return this.renderDanglingEdge("Cannot compute route", edge, context); | ||
return JSX.createElement("g", { "class-sprotty-edge": true, "class-weighted": true, "class-low": edge.probability === 'low', "class-medium": edge.probability === 'medium', "class-high": edge.probability === 'high', "class-mouseover": edge.hoverFeedback }, | ||
this.renderLine(edge, route, context), | ||
this.renderAdditionals(edge, route, context), | ||
context.renderChildren(edge, { route: route })); | ||
}; | ||
WeightedEdgeView = __decorate([ | ||
inversify_1.injectable() | ||
], WeightedEdgeView); | ||
return WeightedEdgeView; | ||
}(WorkflowEdgeView)); | ||
exports.WeightedEdgeView = WeightedEdgeView; | ||
var IconView = /** @class */ (function () { | ||
@@ -123,0 +67,0 @@ function IconView() { |
{ | ||
"name": "@eclipse-glsp-examples/workflow-glsp", | ||
"version": "0.9.0-next.495d850a", | ||
"version": "0.9.0-next.4a496c8e", | ||
"description": "GLSP diagrams for the Workflow DSL", | ||
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)", | ||
"author": "Eclipse GLSP", | ||
"contributors": [ | ||
{ | ||
"name": "Philip Langer", | ||
"email": "planger@eclipsesource.com", | ||
"url": "https://www.eclipsesource.com" | ||
}, | ||
{ | ||
"name": "Tobias Ortmayr", | ||
"email": "tortmayr@eclipsesource.com", | ||
"url": "https://www.eclipsesource.com" | ||
}, | ||
{ | ||
"name": "Martin Fleck", | ||
"email": "mfleck@eclipsesource.com", | ||
"url": "https://www.eclipsesource.com" | ||
} | ||
], | ||
"keywords": [ | ||
"sprotty", | ||
"glsp", | ||
"workflow", | ||
@@ -30,16 +12,32 @@ "diagram", | ||
], | ||
"author": { | ||
"name": "Eclipse GLSP" | ||
}, | ||
"homepage": "https://www.eclipse.org/glsp/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/eclipse-glsp/glsp-client.git" | ||
}, | ||
"bugs": "https://github.com/eclipse-glsp/glsp/issues", | ||
"contributors": [ | ||
{ | ||
"name": "Eclipse GLSP Project", | ||
"email": "glsp-dev@eclipse.org", | ||
"url": "https://projects.eclipse.org/projects/ecd.glsp" | ||
} | ||
], | ||
"dependencies": { | ||
"@eclipse-glsp/client": "0.9.0-next.495d850a", | ||
"@eclipse-glsp/client": "0.9.0-next.4a496c8e", | ||
"balloon-css": "^0.5.0" | ||
}, | ||
"devDependencies": { | ||
"mvn-artifact-download": "5.1.0", | ||
"rimraf": "^2.6.1", | ||
"tslint": "^5.5.0", | ||
"typescript": "^3.9.2" | ||
}, | ||
"scripts": { | ||
"prepare": "yarn run clean && yarn run build", | ||
"prepare": "yarn clean && yarn build && yarn lint", | ||
"clean": "rimraf lib", | ||
"build": "tsc && yarn run lint", | ||
"lint": "tslint -c ../../configs/tslint.json --project ./tsconfig.json", | ||
"build": "tsc", | ||
"lint": "eslint -c ./.eslintrc.js --ext .ts,.tsx ./src", | ||
"watch": "tsc -w" | ||
@@ -51,3 +49,4 @@ }, | ||
"build", | ||
"css" | ||
"css", | ||
"scripts" | ||
], | ||
@@ -54,0 +53,0 @@ "main": "lib/index", |
@@ -16,5 +16,5 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import "../css/diagram.css"; | ||
import "balloon-css/balloon.min.css"; | ||
import "sprotty/css/edit-label.css"; | ||
import '../css/diagram.css'; | ||
import 'balloon-css/balloon.min.css'; | ||
import 'sprotty/css/edit-label.css'; | ||
@@ -24,2 +24,3 @@ import { | ||
buttonModule, | ||
configureDefaultModelElements, | ||
configureModelElement, | ||
@@ -29,2 +30,3 @@ ConsoleLogger, | ||
defaultModule, | ||
DefaultTypes, | ||
DeleteElementContextMenuItemProvider, | ||
@@ -34,3 +36,2 @@ DiamondNodeView, | ||
editLabelFeature, | ||
ExpandButtonView, | ||
expandModule, | ||
@@ -44,3 +45,2 @@ exportModule, | ||
glspEditLabelModule, | ||
GLSPGraph, | ||
glspHoverModule, | ||
@@ -50,5 +50,4 @@ glspMouseToolModule, | ||
glspServerCopyPasteModule, | ||
glspViewportModule, | ||
GridSnapper, | ||
HtmlRoot, | ||
HtmlRootView, | ||
labelEditUiModule, | ||
@@ -66,15 +65,10 @@ layoutCommandsModule, | ||
paletteModule, | ||
PreRenderedElement, | ||
PreRenderedView, | ||
RevealNamedElementActionProvider, | ||
RoundedCornerNodeView, | ||
routingModule, | ||
SButton, | ||
SCompartment, | ||
SCompartmentView, | ||
SEdge, | ||
SGraphView, | ||
SLabel, | ||
SLabelView, | ||
SRoutingHandle, | ||
SRoutingHandleView, | ||
toolFeedbackModule, | ||
@@ -84,10 +78,10 @@ toolsModule, | ||
validationModule, | ||
viewportModule, | ||
zorderModule | ||
} from "@eclipse-glsp/client"; | ||
import { Container, ContainerModule } from "inversify"; | ||
zorderModule, | ||
RectangularNodeView | ||
} from '@eclipse-glsp/client'; | ||
import { Container, ContainerModule } from 'inversify'; | ||
import { directTaskEditor } from "./direct-task-editing/di.config"; | ||
import { ActivityNode, Icon, TaskNode, WeightedEdge } from "./model"; | ||
import { ForkOrJoinNodeView, IconView, TaskNodeView, WeightedEdgeView, WorkflowEdgeView } from "./workflow-views"; | ||
import { directTaskEditor } from './direct-task-editing/di.config'; | ||
import { ActivityNode, Icon, TaskNode, WeightedEdge } from './model'; | ||
import { IconView, WorkflowEdgeView } from './workflow-views'; | ||
@@ -102,5 +96,6 @@ const workflowDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => { | ||
const context = { bind, unbind, isBound, rebind }; | ||
configureModelElement(context, 'graph', GLSPGraph, SGraphView); | ||
configureModelElement(context, 'task:automated', TaskNode, TaskNodeView); | ||
configureModelElement(context, 'task:manual', TaskNode, TaskNodeView); | ||
configureDefaultModelElements(context); | ||
configureModelElement(context, 'task:automated', TaskNode, RoundedCornerNodeView); | ||
configureModelElement(context, 'task:manual', TaskNode, RoundedCornerNodeView); | ||
configureModelElement(context, 'label:heading', SLabel, SLabelView, { enable: [editLabelFeature] }); | ||
@@ -110,14 +105,9 @@ configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView); | ||
configureModelElement(context, 'label:icon', SLabel, SLabelView); | ||
configureModelElement(context, 'html', HtmlRoot, HtmlRootView); | ||
configureModelElement(context, 'pre-rendered', PreRenderedElement, PreRenderedView); | ||
configureModelElement(context, 'button:expand', SButton, ExpandButtonView); | ||
configureModelElement(context, 'routing-point', SRoutingHandle, SRoutingHandleView); | ||
configureModelElement(context, 'volatile-routing-point', SRoutingHandle, SRoutingHandleView); | ||
configureModelElement(context, 'edge', SEdge, WorkflowEdgeView); | ||
configureModelElement(context, 'edge:weighted', WeightedEdge, WeightedEdgeView); | ||
configureModelElement(context, DefaultTypes.EDGE, SEdge, WorkflowEdgeView); | ||
configureModelElement(context, 'edge:weighted', WeightedEdge, WorkflowEdgeView); | ||
configureModelElement(context, 'icon', Icon, IconView); | ||
configureModelElement(context, 'activityNode:merge', ActivityNode, DiamondNodeView); | ||
configureModelElement(context, 'activityNode:decision', ActivityNode, DiamondNodeView); | ||
configureModelElement(context, 'activityNode:fork', ActivityNode, ForkOrJoinNodeView); | ||
configureModelElement(context, 'activityNode:join', ActivityNode, ForkOrJoinNodeView); | ||
configureModelElement(context, 'activityNode:fork', ActivityNode, RectangularNodeView); | ||
configureModelElement(context, 'activityNode:join', ActivityNode, RectangularNodeView); | ||
}); | ||
@@ -128,3 +118,3 @@ | ||
container.load(validationModule, defaultModule, glspMouseToolModule, defaultGLSPModule, glspSelectModule, boundsModule, viewportModule, toolsModule, | ||
container.load(defaultModule, defaultGLSPModule, glspMouseToolModule, validationModule, glspSelectModule, boundsModule, glspViewportModule, toolsModule, | ||
glspHoverModule, fadeModule, exportModule, expandModule, openModule, buttonModule, modelSourceModule, labelEditUiModule, glspEditLabelModule, | ||
@@ -137,4 +127,3 @@ workflowDiagramModule, toolFeedbackModule, modelHintsModule, glspContextMenuModule, glspServerCopyPasteModule, modelSourceWatcherModule, | ||
baseDiv: widgetId, | ||
hiddenDiv: widgetId + "_hidden", | ||
needsClientLayout: true | ||
hiddenDiv: widgetId + '_hidden' | ||
}); | ||
@@ -141,0 +130,0 @@ |
@@ -16,6 +16,6 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import { ContainerModule } from "inversify"; | ||
import { TYPES } from "sprotty"; | ||
import { ContainerModule } from 'inversify'; | ||
import { TYPES } from 'sprotty'; | ||
import { TaskEditor } from "./direct-task-editor"; | ||
import { TaskEditor } from './direct-task-editor'; | ||
@@ -22,0 +22,0 @@ export const directTaskEditor = new ContainerModule((bind, _unbind, isBound) => { |
@@ -35,8 +35,8 @@ /******************************************************************************** | ||
ViewerOptions | ||
} from "@eclipse-glsp/client"; | ||
import { inject, injectable } from "inversify"; | ||
import { TYPES } from "sprotty/lib"; | ||
import { DOMHelper } from "sprotty/lib/base/views/dom-helper"; | ||
} from '@eclipse-glsp/client'; | ||
import { inject, injectable } from 'inversify'; | ||
import { TYPES } from 'sprotty/lib'; | ||
import { DOMHelper } from 'sprotty/lib/base/views/dom-helper'; | ||
import { isTaskNode, TaskNode } from "../model"; | ||
import { isTaskNode, TaskNode } from '../model'; | ||
@@ -78,4 +78,8 @@ export class ApplyTaskEditOperation implements Action { | ||
id() { return TaskEditor.ID; } | ||
containerClass() { return 'command-palette'; } | ||
id(): string { | ||
return TaskEditor.ID; | ||
} | ||
containerClass(): string { | ||
return 'command-palette'; | ||
} | ||
@@ -98,3 +102,3 @@ protected initializeContents(containerElement: HTMLElement): void { | ||
show(root: Readonly<SModelRoot>, ...contextElementIds: string[]) { | ||
show(root: Readonly<SModelRoot>, ...contextElementIds: string[]): void { | ||
super.show(root, ...contextElementIds); | ||
@@ -104,3 +108,3 @@ this.autoSuggestion.open(root); | ||
protected onBeforeShow(containerElement: HTMLElement, root: Readonly<SModelRoot>, ...contextElementIds: string[]) { | ||
protected onBeforeShow(containerElement: HTMLElement, root: Readonly<SModelRoot>, ...contextElementIds: string[]): void { | ||
this.task = getTask(contextElementIds, root)[0]; | ||
@@ -111,3 +115,3 @@ this.autoSuggestion.inputField.value = ''; | ||
protected setPosition(containerElement: HTMLElement) { | ||
protected setPosition(containerElement: HTMLElement): void { | ||
let x = 0; | ||
@@ -144,7 +148,7 @@ let y = 0; | ||
protected executeFromSuggestion(input: LabeledAction | Action[] | Action) { | ||
protected executeFromSuggestion(input: LabeledAction | Action[] | Action): void { | ||
this.actionDispatcher.dispatchAll(toActionArray(input)); | ||
} | ||
protected executeFromTextOnlyInput(input: string) { | ||
protected executeFromTextOnlyInput(input: string): void { | ||
const action = new ApplyTaskEditOperation(this.task.id, input); | ||
@@ -154,3 +158,3 @@ this.actionDispatcher.dispatch(action); | ||
hide() { | ||
hide(): void { | ||
this.autoSuggestion.dispose(); | ||
@@ -157,0 +161,0 @@ super.hide(); |
@@ -16,8 +16,8 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import createWorkflowDiagramContainer from "./di.config"; | ||
import createWorkflowDiagramContainer from './di.config'; | ||
export * from "./model"; | ||
export * from "./workflow-views"; | ||
export * from "./direct-task-editing/direct-task-editor"; | ||
export * from './model'; | ||
export * from './workflow-views'; | ||
export * from './direct-task-editing/direct-task-editor'; | ||
export { createWorkflowDiagramContainer }; | ||
@@ -21,2 +21,3 @@ /******************************************************************************** | ||
DiamondNode, | ||
EditableLabel, | ||
fadeFeature, | ||
@@ -33,2 +34,3 @@ hoverFeedbackFeature, | ||
RectangularNode, | ||
SChildElement, | ||
SEdge, | ||
@@ -40,9 +42,8 @@ selectFeature, | ||
withEditLabelFeature | ||
} from "@eclipse-glsp/client"; | ||
} from '@eclipse-glsp/client'; | ||
export class TaskNode extends RectangularNode implements Nameable, WithEditableLabel { | ||
static readonly DEFAULT_FEATURES = [connectableFeature, deletableFeature, selectFeature, boundsFeature, | ||
moveFeature, layoutContainerFeature, fadeFeature, hoverFeedbackFeature, popupFeature, nameFeature, withEditLabelFeature]; | ||
name: string = ""; | ||
name = ''; | ||
duration?: number; | ||
@@ -52,3 +53,3 @@ taskType?: string; | ||
get editableLabel() { | ||
get editableLabel(): (SChildElement & EditableLabel) | undefined { | ||
const headerComp = this.children.find(element => element.type === 'comp:header'); | ||
@@ -73,3 +74,2 @@ if (headerComp) { | ||
export class ActivityNode extends DiamondNode { | ||
@@ -84,2 +84,3 @@ nodeType: string = ActivityNode.Type.UNDEFINED; | ||
// eslint-disable-next-line no-redeclare | ||
export namespace ActivityNode { | ||
@@ -93,3 +94,3 @@ export namespace Type { | ||
export const FORK = 'forkNode'; | ||
export const UNDEFINED = "undefined"; | ||
export const UNDEFINED = 'undefined'; | ||
} | ||
@@ -102,3 +103,3 @@ } | ||
layout: string; | ||
layoutOptions?: { [key: string]: string | number | boolean; }; | ||
layoutOptions?: { [key: string]: string | number | boolean }; | ||
size = { | ||
@@ -105,0 +106,0 @@ width: 32, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 4 instances in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 3 instances in 1 package
35
1
0
93881
9
1378
+ Added@eclipse-glsp/client@0.9.0-next.4a496c8e(transitive)
+ Added@eclipse-glsp/protocol@0.9.0-next.4a496c8e(transitive)
- Removed@eclipse-glsp/client@0.9.0-next.495d850a(transitive)
- Removed@eclipse-glsp/protocol@0.9.0-next.495d850a(transitive)