@eclipse-glsp/server 1.1.0-next.3d7585d.42 → 1.1.0-next.44aae0c.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/command/command-stack.d.ts +45 -14
- package/lib/common/command/command-stack.d.ts.map +1 -1
- package/lib/common/command/command-stack.js +78 -9
- package/lib/common/command/command-stack.js.map +1 -1
- package/lib/common/command/command-stack.spec.d.ts +2 -0
- package/lib/common/command/command-stack.spec.d.ts.map +1 -0
- package/lib/common/command/command-stack.spec.js +207 -0
- package/lib/common/command/command-stack.spec.js.map +1 -0
- package/lib/common/command/command.d.ts +34 -7
- package/lib/common/command/command.d.ts.map +1 -1
- package/lib/common/command/command.js +73 -0
- package/lib/common/command/command.js.map +1 -1
- package/lib/common/command/command.spec.d.ts +2 -0
- package/lib/common/command/command.spec.d.ts.map +1 -0
- package/lib/common/command/command.spec.js +86 -0
- package/lib/common/command/command.spec.js.map +1 -0
- package/lib/common/command/recording-command.d.ts +75 -0
- package/lib/common/command/recording-command.d.ts.map +1 -0
- package/lib/common/command/recording-command.js +99 -0
- package/lib/common/command/recording-command.js.map +1 -0
- package/lib/common/command/recording-command.spec.d.ts +17 -0
- package/lib/common/command/recording-command.spec.d.ts.map +1 -0
- package/lib/common/command/recording-command.spec.js +62 -0
- package/lib/common/command/recording-command.spec.js.map +1 -0
- package/lib/common/command/undo-redo-action-handler.d.ts +28 -0
- package/lib/common/command/undo-redo-action-handler.d.ts.map +1 -0
- package/lib/common/command/undo-redo-action-handler.js +72 -0
- package/lib/common/command/undo-redo-action-handler.js.map +1 -0
- package/lib/common/di/diagram-module.d.ts +3 -0
- package/lib/common/di/diagram-module.d.ts.map +1 -1
- package/lib/common/di/diagram-module.js +12 -0
- package/lib/common/di/diagram-module.js.map +1 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.d.ts +1 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.d.ts.map +1 -1
- package/lib/common/features/contextactions/tool-palette-item-provider.js +2 -4
- package/lib/common/features/contextactions/tool-palette-item-provider.js.map +1 -1
- package/lib/common/{gmodel → features/layout}/computed-bounds-action-handler.d.ts +8 -3
- package/lib/common/features/layout/computed-bounds-action-handler.d.ts.map +1 -0
- package/lib/common/{gmodel → features/layout}/computed-bounds-action-handler.js +8 -3
- package/lib/common/features/layout/computed-bounds-action-handler.js.map +1 -0
- package/lib/common/features/layout/layout-operation-handler.d.ts +12 -3
- package/lib/common/features/layout/layout-operation-handler.d.ts.map +1 -1
- package/lib/common/features/layout/layout-operation-handler.js +26 -10
- package/lib/common/features/layout/layout-operation-handler.js.map +1 -1
- package/lib/common/features/model/model-state.d.ts +0 -2
- package/lib/common/features/model/model-state.d.ts.map +1 -1
- package/lib/common/features/model/model-state.js +0 -1
- package/lib/common/features/model/model-state.js.map +1 -1
- package/lib/common/features/model/model-submission-handler.d.ts +2 -0
- package/lib/common/features/model/model-submission-handler.d.ts.map +1 -1
- package/lib/common/features/model/model-submission-handler.js +7 -2
- package/lib/common/features/model/model-submission-handler.js.map +1 -1
- package/lib/common/features/model/save-model-action-handler.d.ts +2 -2
- package/lib/common/features/model/save-model-action-handler.d.ts.map +1 -1
- package/lib/common/features/model/save-model-action-handler.js +5 -5
- package/lib/common/features/model/save-model-action-handler.js.map +1 -1
- package/lib/common/gmodel/apply-label-edit-operation-handler.d.ts +4 -5
- package/lib/common/gmodel/apply-label-edit-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/apply-label-edit-operation-handler.js +12 -21
- package/lib/common/gmodel/apply-label-edit-operation-handler.js.map +1 -1
- package/lib/common/gmodel/change-bounds-operation-handler.d.ts +9 -6
- package/lib/common/gmodel/change-bounds-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/change-bounds-operation-handler.js +14 -14
- package/lib/common/gmodel/change-bounds-operation-handler.js.map +1 -1
- package/lib/common/gmodel/change-routing-points-operation-handler.d.ts +5 -5
- package/lib/common/gmodel/change-routing-points-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/change-routing-points-operation-handler.js +11 -14
- package/lib/common/gmodel/change-routing-points-operation-handler.js.map +1 -1
- package/lib/common/{operations → gmodel}/cut-operation-handler.d.ts +5 -4
- package/lib/common/gmodel/cut-operation-handler.d.ts.map +1 -0
- package/lib/common/{operations → gmodel}/cut-operation-handler.js +13 -11
- package/lib/common/gmodel/cut-operation-handler.js.map +1 -0
- package/lib/common/gmodel/delete-operation-handler.d.ts +6 -6
- package/lib/common/gmodel/delete-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/delete-operation-handler.js +13 -10
- package/lib/common/gmodel/delete-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.d.ts +11 -7
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.js +12 -13
- package/lib/common/gmodel/gmodel-create-edge-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-create-node-operation-handler.d.ts +32 -5
- package/lib/common/gmodel/gmodel-create-node-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/gmodel-create-node-operation-handler.js +45 -3
- package/lib/common/gmodel/gmodel-create-node-operation-handler.js.map +1 -1
- package/lib/common/gmodel/gmodel-diagram-module.d.ts +8 -8
- package/lib/common/gmodel/gmodel-diagram-module.d.ts.map +1 -1
- package/lib/common/gmodel/gmodel-diagram-module.js +15 -21
- package/lib/common/gmodel/gmodel-diagram-module.js.map +1 -1
- package/lib/common/gmodel/gmodel-operation-handler.d.ts +23 -0
- package/lib/common/gmodel/gmodel-operation-handler.d.ts.map +1 -0
- package/lib/common/gmodel/gmodel-operation-handler.js +43 -0
- package/lib/common/gmodel/gmodel-operation-handler.js.map +1 -0
- package/lib/common/gmodel/index.d.ts +2 -1
- package/lib/common/gmodel/index.d.ts.map +1 -1
- package/lib/common/gmodel/index.js +2 -1
- package/lib/common/gmodel/index.js.map +1 -1
- package/lib/common/gmodel/paste-operation-handler.d.ts +7 -6
- package/lib/common/gmodel/paste-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/paste-operation-handler.js +20 -15
- package/lib/common/gmodel/paste-operation-handler.js.map +1 -1
- package/lib/common/gmodel/reconnect-edge-operation-handler.d.ts +5 -5
- package/lib/common/gmodel/reconnect-edge-operation-handler.d.ts.map +1 -1
- package/lib/common/gmodel/reconnect-edge-operation-handler.js +11 -14
- package/lib/common/gmodel/reconnect-edge-operation-handler.js.map +1 -1
- package/lib/common/index.d.ts +2 -1
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +2 -1
- package/lib/common/index.js.map +1 -1
- package/lib/common/operations/compound-operation-handler.d.ts +5 -5
- package/lib/common/operations/compound-operation-handler.d.ts.map +1 -1
- package/lib/common/operations/compound-operation-handler.js +37 -9
- package/lib/common/operations/compound-operation-handler.js.map +1 -1
- package/lib/common/operations/create-operation-handler.d.ts +8 -40
- package/lib/common/operations/create-operation-handler.d.ts.map +1 -1
- package/lib/common/operations/create-operation-handler.js +26 -85
- package/lib/common/operations/create-operation-handler.js.map +1 -1
- package/lib/common/operations/operation-action-handler.d.ts +10 -1
- package/lib/common/operations/operation-action-handler.d.ts.map +1 -1
- package/lib/common/operations/operation-action-handler.js +37 -22
- package/lib/common/operations/operation-action-handler.js.map +1 -1
- package/lib/common/operations/operation-handler-registry.d.ts +11 -2
- package/lib/common/operations/operation-handler-registry.d.ts.map +1 -1
- package/lib/common/operations/operation-handler-registry.js +31 -2
- package/lib/common/operations/operation-handler-registry.js.map +1 -1
- package/lib/common/operations/operation-handler.d.ts +28 -11
- package/lib/common/operations/operation-handler.d.ts.map +1 -1
- package/lib/common/operations/operation-handler.js +50 -1
- package/lib/common/operations/operation-handler.js.map +1 -1
- package/lib/common/test/mock-util.d.ts +14 -1
- package/lib/common/test/mock-util.d.ts.map +1 -1
- package/lib/common/test/mock-util.js +42 -37
- package/lib/common/test/mock-util.js.map +1 -1
- package/package.json +4 -3
- package/src/common/command/command-stack.spec.ts +239 -0
- package/src/common/command/command-stack.ts +106 -20
- package/src/common/command/command.spec.ts +92 -0
- package/src/common/command/command.ts +96 -7
- package/src/common/command/recording-command.spec.ts +74 -0
- package/src/common/command/recording-command.ts +119 -0
- package/src/common/command/undo-redo-action-handler.ts +57 -0
- package/src/common/di/diagram-module.ts +13 -0
- package/src/common/features/contextactions/tool-palette-item-provider.ts +2 -4
- package/src/common/{gmodel → features/layout}/computed-bounds-action-handler.ts +9 -4
- package/src/common/features/layout/layout-operation-handler.ts +26 -11
- package/src/common/features/model/model-state.ts +0 -3
- package/src/common/features/model/model-submission-handler.ts +6 -2
- package/src/common/features/model/save-model-action-handler.ts +5 -6
- package/src/common/gmodel/apply-label-edit-operation-handler.ts +13 -15
- package/src/common/gmodel/change-bounds-operation-handler.ts +12 -8
- package/src/common/gmodel/change-routing-points-operation-handler.ts +8 -7
- package/src/common/{operations → gmodel}/cut-operation-handler.ts +9 -8
- package/src/common/gmodel/delete-operation-handler.ts +16 -10
- package/src/common/gmodel/gmodel-create-edge-operation-handler.ts +16 -10
- package/src/common/gmodel/gmodel-create-node-operation-handler.ts +54 -6
- package/src/common/gmodel/gmodel-diagram-module.ts +22 -27
- package/src/common/gmodel/gmodel-operation-handler.ts +31 -0
- package/src/common/gmodel/index.ts +2 -1
- package/src/common/gmodel/paste-operation-handler.ts +19 -11
- package/src/common/gmodel/reconnect-edge-operation-handler.ts +8 -7
- package/src/common/index.ts +2 -1
- package/src/common/operations/compound-operation-handler.ts +14 -12
- package/src/common/operations/create-operation-handler.ts +17 -74
- package/src/common/operations/operation-action-handler.ts +51 -27
- package/src/common/operations/operation-handler-registry.ts +18 -3
- package/src/common/operations/operation-handler.ts +38 -13
- package/src/common/test/mock-util.ts +42 -36
- package/lib/common/gmodel/apply-label-edit-operation-handler.spec.d.ts +0 -2
- package/lib/common/gmodel/apply-label-edit-operation-handler.spec.d.ts.map +0 -1
- package/lib/common/gmodel/apply-label-edit-operation-handler.spec.js +0 -38
- package/lib/common/gmodel/apply-label-edit-operation-handler.spec.js.map +0 -1
- package/lib/common/gmodel/computed-bounds-action-handler.d.ts.map +0 -1
- package/lib/common/gmodel/computed-bounds-action-handler.js.map +0 -1
- package/lib/common/operations/cut-operation-handler.d.ts.map +0 -1
- package/lib/common/operations/cut-operation-handler.js.map +0 -1
- package/src/common/gmodel/apply-label-edit-operation-handler.spec.ts +0 -40
|
@@ -20,21 +20,22 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
20
20
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
21
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
22
|
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.
|
|
24
|
+
exports.GModelChangeRoutingPointsOperationHandler = void 0;
|
|
28
25
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
29
26
|
const inversify_1 = require("inversify");
|
|
30
|
-
const model_state_1 = require("../features/model/model-state");
|
|
31
27
|
const glsp_server_error_1 = require("../utils/glsp-server-error");
|
|
32
28
|
const layout_util_1 = require("../utils/layout-util");
|
|
33
|
-
|
|
29
|
+
const gmodel_operation_handler_1 = require("./gmodel-operation-handler");
|
|
30
|
+
let GModelChangeRoutingPointsOperationHandler = class GModelChangeRoutingPointsOperationHandler extends gmodel_operation_handler_1.GModelOperationHandler {
|
|
34
31
|
constructor() {
|
|
32
|
+
super(...arguments);
|
|
35
33
|
this.operationType = protocol_1.ChangeRoutingPointsOperation.KIND;
|
|
36
34
|
}
|
|
37
|
-
|
|
35
|
+
createCommand(operation) {
|
|
36
|
+
return this.commandOf(() => this.executeChangeRoutingPoints(operation));
|
|
37
|
+
}
|
|
38
|
+
executeChangeRoutingPoints(operation) {
|
|
38
39
|
if (!operation.newRoutingPoints) {
|
|
39
40
|
throw new glsp_server_error_1.GLSPServerError('Incomplete change routingPoints action');
|
|
40
41
|
}
|
|
@@ -42,12 +43,8 @@ let ChangeRoutingPointsOperationHandler = class ChangeRoutingPointsOperationHand
|
|
|
42
43
|
operation.newRoutingPoints.forEach(routingPoints => (0, layout_util_1.applyRoutingPoints)(routingPoints, index));
|
|
43
44
|
}
|
|
44
45
|
};
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, inversify_1.inject)(model_state_1.ModelState),
|
|
47
|
-
__metadata("design:type", Object)
|
|
48
|
-
], ChangeRoutingPointsOperationHandler.prototype, "modelState", void 0);
|
|
49
|
-
ChangeRoutingPointsOperationHandler = __decorate([
|
|
46
|
+
GModelChangeRoutingPointsOperationHandler = __decorate([
|
|
50
47
|
(0, inversify_1.injectable)()
|
|
51
|
-
],
|
|
52
|
-
exports.
|
|
48
|
+
], GModelChangeRoutingPointsOperationHandler);
|
|
49
|
+
exports.GModelChangeRoutingPointsOperationHandler = GModelChangeRoutingPointsOperationHandler;
|
|
53
50
|
//# sourceMappingURL=change-routing-points-operation-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-routing-points-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/change-routing-points-operation-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"change-routing-points-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/change-routing-points-operation-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,qDAAoF;AACpF,yCAAuC;AAEvC,kEAA6D;AAC7D,sDAA0D;AAC1D,yEAAoE;AAG7D,IAAM,yCAAyC,GAA/C,MAAM,yCAA0C,SAAQ,iDAAsB;IAA9E;;QACH,kBAAa,GAAG,uCAA4B,CAAC,IAAI,CAAC;IActD,CAAC;IAZG,aAAa,CAAC,SAAuC;QACjD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,0BAA0B,CAAC,SAAuC;QAC9D,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE;YAC7B,MAAM,IAAI,mCAAe,CAAC,yCAAyC,CAAC,CAAC;SACxE;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QACpC,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,IAAA,gCAAkB,EAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IAClG,CAAC;CACJ,CAAA;AAfY,yCAAyC;IADrD,IAAA,sBAAU,GAAE;GACA,yCAAyC,CAerD;AAfY,8FAAyC"}
|
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { CutOperation, MaybePromise } from '@eclipse-glsp/protocol';
|
|
17
17
|
import { ActionDispatcher } from '../actions/action-dispatcher';
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
import { Command } from '../command/command';
|
|
19
|
+
import { GModelOperationHandler } from './gmodel-operation-handler';
|
|
20
|
+
export declare class GModelCutOperationHandler extends GModelOperationHandler {
|
|
21
|
+
readonly operationType = "cut";
|
|
21
22
|
protected actionDispatcher: ActionDispatcher;
|
|
22
|
-
|
|
23
|
+
createCommand(operation: CutOperation): MaybePromise<Command | undefined>;
|
|
23
24
|
protected getElementToCut(cutOperation: CutOperation): string[];
|
|
24
25
|
}
|
|
25
26
|
//# sourceMappingURL=cut-operation-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cut-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/gmodel/cut-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,YAAY,EAA0B,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,qBACa,yBAA0B,SAAQ,sBAAsB;IACjE,QAAQ,CAAC,aAAa,SAAqB;IAG3C,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAE7C,aAAa,CAAC,SAAS,EAAE,YAAY,GAAG,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;IAOzE,SAAS,CAAC,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,EAAE;CAGlE"}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.GModelCutOperationHandler = void 0;
|
|
13
13
|
/********************************************************************************
|
|
14
14
|
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
15
15
|
*
|
|
@@ -28,15 +28,17 @@ exports.CutOperationHandler = void 0;
|
|
|
28
28
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
30
|
const action_dispatcher_1 = require("../actions/action-dispatcher");
|
|
31
|
-
|
|
31
|
+
const gmodel_operation_handler_1 = require("./gmodel-operation-handler");
|
|
32
|
+
let GModelCutOperationHandler = class GModelCutOperationHandler extends gmodel_operation_handler_1.GModelOperationHandler {
|
|
32
33
|
constructor() {
|
|
34
|
+
super(...arguments);
|
|
33
35
|
this.operationType = protocol_1.CutOperation.KIND;
|
|
34
36
|
}
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
this.actionDispatcher.dispatch(protocol_1.DeleteElementOperation.create(
|
|
39
|
-
|
|
37
|
+
createCommand(operation) {
|
|
38
|
+
const cuttableElementIds = this.getElementToCut(operation);
|
|
39
|
+
return cuttableElementIds.length > 0 //
|
|
40
|
+
? this.commandOf(() => this.actionDispatcher.dispatch(protocol_1.DeleteElementOperation.create(cuttableElementIds)))
|
|
41
|
+
: undefined;
|
|
40
42
|
}
|
|
41
43
|
getElementToCut(cutOperation) {
|
|
42
44
|
return cutOperation.editorContext.selectedElementIds;
|
|
@@ -45,9 +47,9 @@ let CutOperationHandler = class CutOperationHandler {
|
|
|
45
47
|
__decorate([
|
|
46
48
|
(0, inversify_1.inject)(action_dispatcher_1.ActionDispatcher),
|
|
47
49
|
__metadata("design:type", Object)
|
|
48
|
-
],
|
|
49
|
-
|
|
50
|
+
], GModelCutOperationHandler.prototype, "actionDispatcher", void 0);
|
|
51
|
+
GModelCutOperationHandler = __decorate([
|
|
50
52
|
(0, inversify_1.injectable)()
|
|
51
|
-
],
|
|
52
|
-
exports.
|
|
53
|
+
], GModelCutOperationHandler);
|
|
54
|
+
exports.GModelCutOperationHandler = GModelCutOperationHandler;
|
|
53
55
|
//# sourceMappingURL=cut-operation-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cut-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/cut-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA4F;AAC5F,yCAA+C;AAC/C,oEAAgE;AAEhE,yEAAoE;AAG7D,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,iDAAsB;IAA9D;;QACM,kBAAa,GAAG,uBAAY,CAAC,IAAI,CAAC;IAe/C,CAAC;IAVG,aAAa,CAAC,SAAuB;QACjC,MAAM,kBAAkB,GAAG,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAC3D,OAAO,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE;YACnC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,iCAAsB,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;YACzG,CAAC,CAAC,SAAS,CAAC;IACpB,CAAC;IAES,eAAe,CAAC,YAA0B;QAChD,OAAO,YAAY,CAAC,aAAa,CAAC,kBAAkB,CAAC;IACzD,CAAC;CACJ,CAAA;AAbG;IAAC,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;mEACoB;AAJpC,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAgBrC;AAhBY,8DAAyB"}
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { GModelElement } from '@eclipse-glsp/graph';
|
|
17
17
|
import { DeleteElementOperation, MaybePromise } from '@eclipse-glsp/protocol';
|
|
18
|
+
import { Command } from '../command/command';
|
|
18
19
|
import { GModelIndex } from '../features/model/gmodel-index';
|
|
19
|
-
import { ModelState } from '../features/model/model-state';
|
|
20
|
-
import { OperationHandler } from '../operations/operation-handler';
|
|
21
20
|
import { Logger } from '../utils/logger';
|
|
22
|
-
|
|
21
|
+
import { GModelOperationHandler } from './gmodel-operation-handler';
|
|
22
|
+
export declare class GModelDeleteOperationHandler extends GModelOperationHandler {
|
|
23
23
|
protected logger: Logger;
|
|
24
|
-
protected
|
|
25
|
-
protected readonly modelState: ModelState;
|
|
24
|
+
protected allDependentsIds: Set<string>;
|
|
26
25
|
get operationType(): string;
|
|
27
|
-
|
|
26
|
+
createCommand(operation: DeleteElementOperation): MaybePromise<Command | undefined>;
|
|
27
|
+
deleteElements(elementIds: string[]): MaybePromise<void>;
|
|
28
28
|
protected delete(elementId: string, index: GModelIndex): boolean;
|
|
29
29
|
protected collectDependents(dependents: Set<GModelElement>, nodeToDelete: GModelElement): void;
|
|
30
30
|
protected findTopLevelElement(element: GModelElement): GModelElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/gmodel/delete-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAS,aAAa,EAAS,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"delete-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/gmodel/delete-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAS,aAAa,EAAS,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,qBACa,4BAA6B,SAAQ,sBAAsB;IAEpE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzB,SAAS,CAAC,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAExC,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,aAAa,CAAC,SAAS,EAAE,sBAAsB,GAAG,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;IASnF,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,IAAI,CAAC;IAaxD,SAAS,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO;IA+BhE,SAAS,CAAC,iBAAiB,CAAC,UAAU,EAAE,GAAG,CAAC,aAAa,CAAC,EAAE,YAAY,EAAE,aAAa,GAAG,IAAI;IAsB9F,SAAS,CAAC,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa;CAWvE"}
|
|
@@ -28,27 +28,34 @@ exports.GModelDeleteOperationHandler = void 0;
|
|
|
28
28
|
const graph_1 = require("@eclipse-glsp/graph");
|
|
29
29
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
30
30
|
const inversify_1 = require("inversify");
|
|
31
|
-
const model_state_1 = require("../features/model/model-state");
|
|
32
31
|
const logger_1 = require("../utils/logger");
|
|
33
|
-
|
|
32
|
+
const gmodel_operation_handler_1 = require("./gmodel-operation-handler");
|
|
33
|
+
let GModelDeleteOperationHandler = class GModelDeleteOperationHandler extends gmodel_operation_handler_1.GModelOperationHandler {
|
|
34
34
|
get operationType() {
|
|
35
35
|
return protocol_1.DeleteElementOperation.KIND;
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
createCommand(operation) {
|
|
38
38
|
const elementIds = operation.elementIds;
|
|
39
|
+
if (!elementIds || elementIds.length === 0) {
|
|
40
|
+
this.logger.warn('Elements to delete are not specified');
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
return this.commandOf(() => this.deleteElements(elementIds));
|
|
44
|
+
}
|
|
45
|
+
deleteElements(elementIds) {
|
|
39
46
|
if (!elementIds || elementIds.length === 0) {
|
|
40
47
|
this.logger.warn('Elements to delete are not specified');
|
|
41
48
|
return;
|
|
42
49
|
}
|
|
43
50
|
const index = this.modelState.index;
|
|
44
|
-
this.
|
|
51
|
+
this.allDependentsIds = new Set();
|
|
45
52
|
const success = elementIds.every(eId => this.delete(eId, index));
|
|
46
53
|
if (!success) {
|
|
47
54
|
this.logger.warn('Could not delete all elements as requested (see messages above to find out why)');
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
57
|
delete(elementId, index) {
|
|
51
|
-
if (this.
|
|
58
|
+
if (this.allDependentsIds.has(elementId)) {
|
|
52
59
|
return true;
|
|
53
60
|
}
|
|
54
61
|
const element = index.find(elementId);
|
|
@@ -68,7 +75,7 @@ let GModelDeleteOperationHandler = class GModelDeleteOperationHandler {
|
|
|
68
75
|
if (index > -1) {
|
|
69
76
|
this.modelState.root.children.splice(index, 1);
|
|
70
77
|
}
|
|
71
|
-
this.
|
|
78
|
+
this.allDependentsIds.add(dependant.id);
|
|
72
79
|
});
|
|
73
80
|
return true;
|
|
74
81
|
}
|
|
@@ -105,10 +112,6 @@ __decorate([
|
|
|
105
112
|
(0, inversify_1.inject)(logger_1.Logger),
|
|
106
113
|
__metadata("design:type", logger_1.Logger)
|
|
107
114
|
], GModelDeleteOperationHandler.prototype, "logger", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
(0, inversify_1.inject)(model_state_1.ModelState),
|
|
110
|
-
__metadata("design:type", Object)
|
|
111
|
-
], GModelDeleteOperationHandler.prototype, "modelState", void 0);
|
|
112
115
|
GModelDeleteOperationHandler = __decorate([
|
|
113
116
|
(0, inversify_1.injectable)()
|
|
114
117
|
], GModelDeleteOperationHandler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/delete-operation-handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+CAAkE;AAClE,qDAA8E;AAC9E,yCAA+C;
|
|
1
|
+
{"version":3,"file":"delete-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/delete-operation-handler.ts"],"names":[],"mappings":"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"}
|
|
@@ -14,18 +14,22 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { GEdge, GModelElement } from '@eclipse-glsp/graph';
|
|
17
|
-
import { CreateEdgeOperation } from '@eclipse-glsp/protocol';
|
|
18
|
-
import {
|
|
19
|
-
import { CreateOperationHandler } from '../operations/create-operation-handler';
|
|
17
|
+
import { CreateEdgeOperation, MaybePromise, TriggerEdgeCreationAction } from '@eclipse-glsp/protocol';
|
|
18
|
+
import { Command } from '../command/command';
|
|
19
|
+
import { CreateOperationHandler, CreateOperationKind } from '../operations/create-operation-handler';
|
|
20
|
+
import { GModelOperationHandler } from './gmodel-operation-handler';
|
|
20
21
|
/**
|
|
21
22
|
* An abstract base implementation of {@link CreateEdgeOperation} handlers for diagram implementations
|
|
22
23
|
* where the graphical model is also directly used as source model.
|
|
23
24
|
* (i.e. all operation handlers directly modify the graphical model).
|
|
24
25
|
*/
|
|
25
|
-
export declare abstract class GModelCreateEdgeOperationHandler extends CreateOperationHandler {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
export declare abstract class GModelCreateEdgeOperationHandler extends GModelOperationHandler implements CreateOperationHandler {
|
|
27
|
+
readonly operationType: CreateOperationKind;
|
|
28
|
+
abstract label: string;
|
|
29
|
+
abstract elementTypeIds: string[];
|
|
30
|
+
createCommand(operation: CreateEdgeOperation): MaybePromise<Command | undefined>;
|
|
31
|
+
getTriggerActions(): TriggerEdgeCreationAction[];
|
|
32
|
+
executeCreation(operation: CreateEdgeOperation): void;
|
|
29
33
|
abstract createEdge(source: GModelElement, target: GModelElement): GEdge | undefined;
|
|
30
34
|
}
|
|
31
35
|
//# sourceMappingURL=gmodel-create-edge-operation-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmodel-create-edge-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/gmodel/gmodel-create-edge-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAS,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"gmodel-create-edge-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/gmodel/gmodel-create-edge-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAS,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEtG,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AACrG,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;;;GAIG;AACH,8BACsB,gCAAiC,SAAQ,sBAAuB,YAAW,sBAAsB;IACnH,SAAkB,aAAa,EAAE,mBAAmB,CAA4B;IAChF,SAAkB,KAAK,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IAEzB,aAAa,CAAC,SAAS,EAAE,mBAAmB,GAAG,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;IAIzF,iBAAiB,IAAI,yBAAyB,EAAE;IAIhD,eAAe,CAAC,SAAS,EAAE,mBAAmB,GAAG,IAAI;IAmBrD,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,GAAG,KAAK,GAAG,SAAS;CACvF"}
|
|
@@ -20,27 +20,30 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
20
20
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
21
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
22
|
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
24
|
exports.GModelCreateEdgeOperationHandler = void 0;
|
|
28
25
|
const graph_1 = require("@eclipse-glsp/graph");
|
|
29
26
|
const gnode_1 = require("@eclipse-glsp/graph/lib/gnode");
|
|
30
27
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
31
28
|
const inversify_1 = require("inversify");
|
|
32
|
-
const
|
|
33
|
-
const create_operation_handler_1 = require("../operations/create-operation-handler");
|
|
29
|
+
const gmodel_operation_handler_1 = require("./gmodel-operation-handler");
|
|
34
30
|
/**
|
|
35
31
|
* An abstract base implementation of {@link CreateEdgeOperation} handlers for diagram implementations
|
|
36
32
|
* where the graphical model is also directly used as source model.
|
|
37
33
|
* (i.e. all operation handlers directly modify the graphical model).
|
|
38
34
|
*/
|
|
39
|
-
let GModelCreateEdgeOperationHandler = class GModelCreateEdgeOperationHandler extends
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
let GModelCreateEdgeOperationHandler = class GModelCreateEdgeOperationHandler extends gmodel_operation_handler_1.GModelOperationHandler {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments);
|
|
38
|
+
this.operationType = protocol_1.CreateEdgeOperation.KIND;
|
|
39
|
+
}
|
|
40
|
+
createCommand(operation) {
|
|
41
|
+
return this.commandOf(() => this.executeCreation(operation));
|
|
42
|
+
}
|
|
43
|
+
getTriggerActions() {
|
|
44
|
+
return this.elementTypeIds.map(typeId => protocol_1.TriggerEdgeCreationAction.create(typeId));
|
|
42
45
|
}
|
|
43
|
-
|
|
46
|
+
executeCreation(operation) {
|
|
44
47
|
const index = this.modelState.index;
|
|
45
48
|
const source = index.find(operation.sourceElementId, element => element instanceof gnode_1.GNode || element instanceof graph_1.GPort);
|
|
46
49
|
const target = index.find(operation.targetElementId, element => element instanceof gnode_1.GNode || element instanceof graph_1.GPort);
|
|
@@ -54,10 +57,6 @@ let GModelCreateEdgeOperationHandler = class GModelCreateEdgeOperationHandler ex
|
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
59
|
};
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, inversify_1.inject)(model_state_1.ModelState),
|
|
59
|
-
__metadata("design:type", Object)
|
|
60
|
-
], GModelCreateEdgeOperationHandler.prototype, "modelState", void 0);
|
|
61
60
|
GModelCreateEdgeOperationHandler = __decorate([
|
|
62
61
|
(0, inversify_1.injectable)()
|
|
63
62
|
], GModelCreateEdgeOperationHandler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmodel-create-edge-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/gmodel-create-edge-operation-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"gmodel-create-edge-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/gmodel-create-edge-operation-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,+CAAkE;AAClE,yDAAsD;AACtD,qDAAsG;AACtG,yCAAuC;AAGvC,yEAAoE;AAEpE;;;;GAIG;AAEI,IAAe,gCAAgC,GAA/C,MAAe,gCAAiC,SAAQ,iDAAsB;IAA9E;;QACe,kBAAa,GAAwB,8BAAmB,CAAC,IAAI,CAAC;IAgCpF,CAAC;IA5BY,aAAa,CAAC,SAA8B;QACjD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,iBAAiB;QACb,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,oCAAyB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACvF,CAAC;IAED,eAAe,CAAC,SAA8B;QAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QAEpC,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,YAAY,aAAK,IAAI,OAAO,YAAY,aAAK,CAAC,CAAC;QACtH,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,YAAY,aAAK,IAAI,OAAO,YAAY,aAAK,CAAC,CAAC;QAEtH,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE;YACpB,MAAM,IAAI,KAAK,CACX,0CAA0C,SAAS,CAAC,eAAe,kBAAkB,SAAS,CAAC,eAAe,EAAE,CACnH,CAAC;SACL;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnD,IAAI,UAAU,EAAE;YACZ,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YAC1C,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC1C;IACL,CAAC;CAGJ,CAAA;AAjCqB,gCAAgC;IADrD,IAAA,sBAAU,GAAE;GACS,gCAAgC,CAiCrD;AAjCqB,4EAAgC"}
|
|
@@ -13,19 +13,46 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { GNode } from '@eclipse-glsp/graph';
|
|
17
|
-
import { CreateNodeOperation, Point } from '@eclipse-glsp/protocol';
|
|
16
|
+
import { GModelElement, GNode } from '@eclipse-glsp/graph';
|
|
17
|
+
import { CreateNodeOperation, MaybePromise, Point, TriggerNodeCreationAction } from '@eclipse-glsp/protocol';
|
|
18
18
|
import { ActionDispatcher } from '../actions/action-dispatcher';
|
|
19
|
-
import {
|
|
19
|
+
import { Command } from '../command/command';
|
|
20
|
+
import { CreateOperationHandler, CreateOperationKind } from '../operations/create-operation-handler';
|
|
21
|
+
import { GModelOperationHandler } from './gmodel-operation-handler';
|
|
20
22
|
/**
|
|
21
23
|
* An abstract base implementation of {@link CreateNodeOperationHandler} for diagram implementations
|
|
22
24
|
* where the graphical model is also directly used as source model.
|
|
23
25
|
* (i.e. all operation handlers directly modify the graphical model).
|
|
24
26
|
*/
|
|
25
|
-
export declare abstract class GModelCreateNodeOperationHandler extends
|
|
27
|
+
export declare abstract class GModelCreateNodeOperationHandler extends GModelOperationHandler implements CreateOperationHandler {
|
|
26
28
|
protected actionDispatcher: ActionDispatcher;
|
|
27
29
|
abstract elementTypeIds: string[];
|
|
28
|
-
|
|
30
|
+
abstract label: string;
|
|
31
|
+
operationType: CreateOperationKind;
|
|
32
|
+
createCommand(operation: CreateNodeOperation): MaybePromise<Command | undefined>;
|
|
33
|
+
executeCreation(operation: CreateNodeOperation): void;
|
|
34
|
+
getTriggerActions(): TriggerNodeCreationAction[];
|
|
35
|
+
/**
|
|
36
|
+
* Return the GModelElement that will contain the newly created node. It is usually
|
|
37
|
+
* the target element ({@link CreateNodeOperation.containerId}), but could also
|
|
38
|
+
* be e.g. an intermediate compartment, or even a different Node.
|
|
39
|
+
*
|
|
40
|
+
* @param operation
|
|
41
|
+
* @return the GModelElement that will contain the newly created node.
|
|
42
|
+
*/
|
|
43
|
+
getContainer(operation: CreateNodeOperation): GModelElement | undefined;
|
|
44
|
+
getLocation(operation: CreateNodeOperation): Point | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves the diagram absolute location and the target container from the given {@link CreateNodeOperation}
|
|
47
|
+
* and converts the absolute location to coordinates relative to the given container.
|
|
48
|
+
* Relative coordinates can only be retrieved if the given container element is part of
|
|
49
|
+
* a hierarchy of {@link GBoundsAware} elements. This means each (recursive) parent element need to
|
|
50
|
+
* implement {@link GBoundsAware}. If that is not the case this method returns `undefined`.
|
|
51
|
+
* @param absoluteLocation The diagram absolute position.
|
|
52
|
+
* @param container The container element.
|
|
53
|
+
* @returns The relative position or `undefined`.
|
|
54
|
+
*/
|
|
55
|
+
getRelativeLocation(operation: CreateNodeOperation): Point | undefined;
|
|
29
56
|
abstract createNode(operation: CreateNodeOperation, relativeLocation?: Point): GNode | undefined;
|
|
30
57
|
}
|
|
31
58
|
//# sourceMappingURL=gmodel-create-node-operation-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmodel-create-node-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/gmodel/gmodel-create-node-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"gmodel-create-node-operation-handler.d.ts","sourceRoot":"","sources":["../../../src/common/gmodel/gmodel-create-node-operation-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,KAAK,EAAgB,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAE3H,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAErG,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;;;GAIG;AACH,8BACsB,gCAAiC,SAAQ,sBAAuB,YAAW,sBAAsB;IAEnH,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAE7C,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IAElC,SAAkB,KAAK,EAAE,MAAM,CAAC;IAEvB,aAAa,EAAE,mBAAmB,CAA4B;IAE9D,aAAa,CAAC,SAAS,EAAE,mBAAmB,GAAG,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;IAIzF,eAAe,CAAC,SAAS,EAAE,mBAAmB,GAAG,IAAI;IAWrD,iBAAiB,IAAI,yBAAyB,EAAE;IAIhD;;;;;;;OAOG;IACH,YAAY,CAAC,SAAS,EAAE,mBAAmB,GAAG,aAAa,GAAG,SAAS;IAKvE,WAAW,CAAC,SAAS,EAAE,mBAAmB,GAAG,KAAK,GAAG,SAAS;IAI9D;;;;;;;;;OASG;IACH,mBAAmB,CAAC,SAAS,EAAE,mBAAmB,GAAG,KAAK,GAAG,SAAS;IAMtE,QAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS;CACnG"}
|
|
@@ -28,14 +28,22 @@ exports.GModelCreateNodeOperationHandler = void 0;
|
|
|
28
28
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
30
|
const action_dispatcher_1 = require("../actions/action-dispatcher");
|
|
31
|
-
const
|
|
31
|
+
const layout_util_1 = require("../utils/layout-util");
|
|
32
|
+
const gmodel_operation_handler_1 = require("./gmodel-operation-handler");
|
|
32
33
|
/**
|
|
33
34
|
* An abstract base implementation of {@link CreateNodeOperationHandler} for diagram implementations
|
|
34
35
|
* where the graphical model is also directly used as source model.
|
|
35
36
|
* (i.e. all operation handlers directly modify the graphical model).
|
|
36
37
|
*/
|
|
37
|
-
let GModelCreateNodeOperationHandler = class GModelCreateNodeOperationHandler extends
|
|
38
|
-
|
|
38
|
+
let GModelCreateNodeOperationHandler = class GModelCreateNodeOperationHandler extends gmodel_operation_handler_1.GModelOperationHandler {
|
|
39
|
+
constructor() {
|
|
40
|
+
super(...arguments);
|
|
41
|
+
this.operationType = protocol_1.CreateNodeOperation.KIND;
|
|
42
|
+
}
|
|
43
|
+
createCommand(operation) {
|
|
44
|
+
return this.commandOf(() => this.executeCreation(operation));
|
|
45
|
+
}
|
|
46
|
+
executeCreation(operation) {
|
|
39
47
|
var _a;
|
|
40
48
|
const container = (_a = this.getContainer(operation)) !== null && _a !== void 0 ? _a : this.modelState.root;
|
|
41
49
|
const relativeLocation = this.getRelativeLocation(operation);
|
|
@@ -46,6 +54,40 @@ let GModelCreateNodeOperationHandler = class GModelCreateNodeOperationHandler ex
|
|
|
46
54
|
this.actionDispatcher.dispatchAfterNextUpdate(protocol_1.SelectAction.create({ selectedElementsIDs: [element.id] }));
|
|
47
55
|
}
|
|
48
56
|
}
|
|
57
|
+
getTriggerActions() {
|
|
58
|
+
return this.elementTypeIds.map(typeId => protocol_1.TriggerNodeCreationAction.create(typeId));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Return the GModelElement that will contain the newly created node. It is usually
|
|
62
|
+
* the target element ({@link CreateNodeOperation.containerId}), but could also
|
|
63
|
+
* be e.g. an intermediate compartment, or even a different Node.
|
|
64
|
+
*
|
|
65
|
+
* @param operation
|
|
66
|
+
* @return the GModelElement that will contain the newly created node.
|
|
67
|
+
*/
|
|
68
|
+
getContainer(operation) {
|
|
69
|
+
const index = this.modelState.index;
|
|
70
|
+
return operation.containerId ? index.get(operation.containerId) : undefined;
|
|
71
|
+
}
|
|
72
|
+
getLocation(operation) {
|
|
73
|
+
return operation.location;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Retrieves the diagram absolute location and the target container from the given {@link CreateNodeOperation}
|
|
77
|
+
* and converts the absolute location to coordinates relative to the given container.
|
|
78
|
+
* Relative coordinates can only be retrieved if the given container element is part of
|
|
79
|
+
* a hierarchy of {@link GBoundsAware} elements. This means each (recursive) parent element need to
|
|
80
|
+
* implement {@link GBoundsAware}. If that is not the case this method returns `undefined`.
|
|
81
|
+
* @param absoluteLocation The diagram absolute position.
|
|
82
|
+
* @param container The container element.
|
|
83
|
+
* @returns The relative position or `undefined`.
|
|
84
|
+
*/
|
|
85
|
+
getRelativeLocation(operation) {
|
|
86
|
+
var _a, _b;
|
|
87
|
+
const container = (_a = this.getContainer(operation)) !== null && _a !== void 0 ? _a : this.modelState.root;
|
|
88
|
+
const absoluteLocation = (_b = this.getLocation(operation)) !== null && _b !== void 0 ? _b : protocol_1.Point.ORIGIN;
|
|
89
|
+
return (0, layout_util_1.getRelativeLocation)(absoluteLocation, container);
|
|
90
|
+
}
|
|
49
91
|
};
|
|
50
92
|
__decorate([
|
|
51
93
|
(0, inversify_1.inject)(action_dispatcher_1.ActionDispatcher),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmodel-create-node-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/gmodel-create-node-operation-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAGlF,
|
|
1
|
+
{"version":3,"file":"gmodel-create-node-operation-handler.js","sourceRoot":"","sources":["../../../src/common/gmodel/gmodel-create-node-operation-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAGlF,qDAA2H;AAC3H,yCAA+C;AAC/C,oEAAgE;AAGhE,sDAA2D;AAC3D,yEAAoE;AAEpE;;;;GAIG;AAEI,IAAe,gCAAgC,GAA/C,MAAe,gCAAiC,SAAQ,iDAAsB;IAA9E;;QAQM,kBAAa,GAAwB,8BAAmB,CAAC,IAAI,CAAC;IAuD3E,CAAC;IArDY,aAAa,CAAC,SAA8B;QACjD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,eAAe,CAAC,SAA8B;;QAC1C,MAAM,SAAS,GAAG,MAAA,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,mCAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QACvE,MAAM,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAC7D,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;QAC7D,IAAI,OAAO,EAAE;YACT,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACjC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;YAC3B,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,uBAAY,CAAC,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;SAC7G;IACL,CAAC;IAED,iBAAiB;QACb,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,oCAAyB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,SAA8B;QACvC,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QACpC,OAAO,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAChF,CAAC;IAED,WAAW,CAAC,SAA8B;QACtC,OAAO,SAAS,CAAC,QAAQ,CAAC;IAC9B,CAAC;IAED;;;;;;;;;OASG;IACH,mBAAmB,CAAC,SAA8B;;QAC9C,MAAM,SAAS,GAAG,MAAA,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,mCAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QACvE,MAAM,gBAAgB,GAAG,MAAA,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,mCAAI,gBAAK,CAAC,MAAM,CAAC;QACrE,OAAO,IAAA,iCAAmB,EAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC;CAGJ,CAAA;AA9DG;IAAC,IAAA,kBAAM,EAAC,oCAAgB,CAAC;;0EACoB;AAF3B,gCAAgC;IADrD,IAAA,sBAAU,GAAE;GACS,gCAAgC,CA+DrD;AA/DqB,4EAAgC"}
|
|
@@ -11,16 +11,16 @@ import { OperationHandlerConstructor } from '../operations/operation-handler';
|
|
|
11
11
|
* Contains all bindings of {@link DiagramModule}.
|
|
12
12
|
*
|
|
13
13
|
* Additionally binds:
|
|
14
|
-
* - {@link CommandStack} to {@link DefaultCommandStack}
|
|
15
|
-
* - {@link ModelState} to {@link ModelState}
|
|
16
14
|
* - {@link GModelFactory} to {@link GModelFactoryNullImpl}
|
|
17
|
-
* - {@link GModelIndex} to self
|
|
18
|
-
* - {@link ComputedBoundsActionHandler} to {@link ActionHandler}
|
|
19
15
|
* - {@link RequestClipboardDataActionHandler} to {@link ActionHandler}
|
|
20
|
-
* - {@link
|
|
21
|
-
* - {@link
|
|
22
|
-
* - {@link
|
|
23
|
-
* - {@link
|
|
16
|
+
* - {@link GModelApplyLabelEditOperationHandler} to {@link OperationHandler}
|
|
17
|
+
* - {@link GModelChangeBoundsOperationHandler} to {@link OperationHandler}
|
|
18
|
+
* - {@link GModelCutOperationHandler} to {@link OperationHandler}
|
|
19
|
+
* - {@link GModelDeleteOperationHandler} to {@link OperationHandler}
|
|
20
|
+
* - {@link GModelPasteOperationHandler} to {@link OperationHandler}
|
|
21
|
+
* - {@link GModelReconnectEdgeOperationHandler} to {@link OperationHandler}
|
|
22
|
+
* - {@link GModelChangeRoutingPointsOperationHandler} to {@link OperationHandler}
|
|
23
|
+
|
|
24
24
|
*/
|
|
25
25
|
export declare abstract class GModelDiagramModule extends DiagramModule {
|
|
26
26
|
protected bindGModelFactory(): BindingTarget<GModelFactory>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmodel-diagram-module.d.ts","sourceRoot":"","sources":["../../../src/common/gmodel/gmodel-diagram-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"gmodel-diagram-module.d.ts","sourceRoot":"","sources":["../../../src/common/gmodel/gmodel-diagram-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAyB,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAqB,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE9E,OAAO,EAAoB,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAShG;;;;;;;;;;;;;;;;GAgBG;AACH,8BACsB,mBAAoB,SAAQ,aAAa;cACxC,iBAAiB,IAAI,aAAa,CAAC,aAAa,CAAC;IAIpE,SAAS,CAAC,cAAc,IAAI,aAAa,CAAC,UAAU,CAAC;cAIlC,uBAAuB,CAAC,OAAO,EAAE,oBAAoB,CAAC,wBAAwB,CAAC,GAAG,IAAI;cAKtF,0BAA0B,CAAC,OAAO,EAAE,oBAAoB,CAAC,2BAA2B,CAAC,GAAG,IAAI;CAUlH"}
|
|
@@ -25,15 +25,12 @@ exports.GModelDiagramModule = void 0;
|
|
|
25
25
|
const inversify_1 = require("inversify");
|
|
26
26
|
const diagram_module_1 = require("../di/diagram-module");
|
|
27
27
|
const request_clipboard_data_action_handler_1 = require("../features/clipboard/request-clipboard-data-action-handler");
|
|
28
|
-
const layout_operation_handler_1 = require("../features/layout/layout-operation-handler");
|
|
29
28
|
const gmodel_factory_1 = require("../features/model/gmodel-factory");
|
|
30
29
|
const model_state_1 = require("../features/model/model-state");
|
|
31
|
-
const save_model_action_handler_1 = require("../features/model/save-model-action-handler");
|
|
32
|
-
const cut_operation_handler_1 = require("../operations/cut-operation-handler");
|
|
33
30
|
const apply_label_edit_operation_handler_1 = require("./apply-label-edit-operation-handler");
|
|
34
31
|
const change_bounds_operation_handler_1 = require("./change-bounds-operation-handler");
|
|
35
32
|
const change_routing_points_operation_handler_1 = require("./change-routing-points-operation-handler");
|
|
36
|
-
const
|
|
33
|
+
const cut_operation_handler_1 = require("./cut-operation-handler");
|
|
37
34
|
const delete_operation_handler_1 = require("./delete-operation-handler");
|
|
38
35
|
const paste_operation_handler_1 = require("./paste-operation-handler");
|
|
39
36
|
const reconnect_edge_operation_handler_1 = require("./reconnect-edge-operation-handler");
|
|
@@ -43,16 +40,16 @@ const reconnect_edge_operation_handler_1 = require("./reconnect-edge-operation-h
|
|
|
43
40
|
* Contains all bindings of {@link DiagramModule}.
|
|
44
41
|
*
|
|
45
42
|
* Additionally binds:
|
|
46
|
-
* - {@link CommandStack} to {@link DefaultCommandStack}
|
|
47
|
-
* - {@link ModelState} to {@link ModelState}
|
|
48
43
|
* - {@link GModelFactory} to {@link GModelFactoryNullImpl}
|
|
49
|
-
* - {@link GModelIndex} to self
|
|
50
|
-
* - {@link ComputedBoundsActionHandler} to {@link ActionHandler}
|
|
51
44
|
* - {@link RequestClipboardDataActionHandler} to {@link ActionHandler}
|
|
52
|
-
* - {@link
|
|
53
|
-
* - {@link
|
|
54
|
-
* - {@link
|
|
55
|
-
* - {@link
|
|
45
|
+
* - {@link GModelApplyLabelEditOperationHandler} to {@link OperationHandler}
|
|
46
|
+
* - {@link GModelChangeBoundsOperationHandler} to {@link OperationHandler}
|
|
47
|
+
* - {@link GModelCutOperationHandler} to {@link OperationHandler}
|
|
48
|
+
* - {@link GModelDeleteOperationHandler} to {@link OperationHandler}
|
|
49
|
+
* - {@link GModelPasteOperationHandler} to {@link OperationHandler}
|
|
50
|
+
* - {@link GModelReconnectEdgeOperationHandler} to {@link OperationHandler}
|
|
51
|
+
* - {@link GModelChangeRoutingPointsOperationHandler} to {@link OperationHandler}
|
|
52
|
+
|
|
56
53
|
*/
|
|
57
54
|
let GModelDiagramModule = class GModelDiagramModule extends diagram_module_1.DiagramModule {
|
|
58
55
|
bindGModelFactory() {
|
|
@@ -63,20 +60,17 @@ let GModelDiagramModule = class GModelDiagramModule extends diagram_module_1.Dia
|
|
|
63
60
|
}
|
|
64
61
|
configureActionHandlers(binding) {
|
|
65
62
|
super.configureActionHandlers(binding);
|
|
66
|
-
binding.add(computed_bounds_action_handler_1.ComputedBoundsActionHandler);
|
|
67
|
-
binding.add(save_model_action_handler_1.SaveModelActionHandler);
|
|
68
63
|
binding.add(request_clipboard_data_action_handler_1.RequestClipboardDataActionHandler);
|
|
69
64
|
}
|
|
70
65
|
configureOperationHandlers(binding) {
|
|
71
66
|
super.configureOperationHandlers(binding);
|
|
72
|
-
binding.add(apply_label_edit_operation_handler_1.
|
|
73
|
-
binding.add(change_bounds_operation_handler_1.
|
|
74
|
-
binding.add(cut_operation_handler_1.
|
|
67
|
+
binding.add(apply_label_edit_operation_handler_1.GModelApplyLabelEditOperationHandler);
|
|
68
|
+
binding.add(change_bounds_operation_handler_1.GModelChangeBoundsOperationHandler);
|
|
69
|
+
binding.add(cut_operation_handler_1.GModelCutOperationHandler);
|
|
75
70
|
binding.add(delete_operation_handler_1.GModelDeleteOperationHandler);
|
|
76
|
-
binding.add(paste_operation_handler_1.
|
|
77
|
-
binding.add(reconnect_edge_operation_handler_1.
|
|
78
|
-
binding.add(
|
|
79
|
-
binding.add(change_routing_points_operation_handler_1.ChangeRoutingPointsOperationHandler);
|
|
71
|
+
binding.add(paste_operation_handler_1.GModelPasteOperationHandler);
|
|
72
|
+
binding.add(reconnect_edge_operation_handler_1.GModelReconnectEdgeOperationHandler);
|
|
73
|
+
binding.add(change_routing_points_operation_handler_1.GModelChangeRoutingPointsOperationHandler);
|
|
80
74
|
}
|
|
81
75
|
};
|
|
82
76
|
GModelDiagramModule = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmodel-diagram-module.js","sourceRoot":"","sources":["../../../src/common/gmodel/gmodel-diagram-module.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuC;AAGvC,yDAAqD;AAErD,uHAAgH;AAChH,
|
|
1
|
+
{"version":3,"file":"gmodel-diagram-module.js","sourceRoot":"","sources":["../../../src/common/gmodel/gmodel-diagram-module.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuC;AAGvC,yDAAqD;AAErD,uHAAgH;AAChH,qEAAwF;AACxF,+DAA8E;AAG9E,6FAA4F;AAC5F,uFAAuF;AACvF,uGAAsG;AACtG,mEAAoE;AACpE,yEAA0E;AAC1E,uEAAwE;AACxE,yFAAyF;AAEzF;;;;;;;;;;;;;;;;GAgBG;AAEI,IAAe,mBAAmB,GAAlC,MAAe,mBAAoB,SAAQ,8BAAa;IACxC,iBAAiB;QAChC,OAAO,sCAAqB,CAAC;IACjC,CAAC;IAES,cAAc;QACpB,OAAO,+BAAiB,CAAC;IAC7B,CAAC;IAEkB,uBAAuB,CAAC,OAAuD;QAC9F,KAAK,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,yEAAiC,CAAC,CAAC;IACnD,CAAC;IAEkB,0BAA0B,CAAC,OAA0D;QACpG,KAAK,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,yEAAoC,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,oEAAkC,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,iDAAyB,CAAC,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,uDAA4B,CAAC,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,qDAA2B,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CAAC,sEAAmC,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,mFAAyC,CAAC,CAAC;IAC3D,CAAC;CACJ,CAAA;AAxBqB,mBAAmB;IADxC,IAAA,sBAAU,GAAE;GACS,mBAAmB,CAwBxC;AAxBqB,kDAAmB"}
|