@wcardinal/wcardinal-ui 0.435.0 → 0.437.0

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.
Files changed (54) hide show
  1. package/dist/types/wcardinal/ui/shape/action/e-shape-action-misc-extension.d.ts +8 -0
  2. package/dist/types/wcardinal/ui/shape/action/e-shape-action-misc-extensions.d.ts +8 -0
  3. package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-opener.d.ts +2 -1
  4. package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.d.ts +12 -0
  5. package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-misc-extension.d.ts +19 -0
  6. package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-misc-type.d.ts +1 -0
  7. package/dist/types/wcardinal/ui/shape/action/e-shape-actions.d.ts +4 -13
  8. package/dist/types/wcardinal/ui/shape/action/index.d.ts +4 -0
  9. package/dist/wcardinal/ui/d-diagram-canvas-editor-snap.js +10 -5
  10. package/dist/wcardinal/ui/d-diagram-canvas-editor-snap.js.map +1 -1
  11. package/dist/wcardinal/ui/shape/action/deserialize-action-value.js +7 -1
  12. package/dist/wcardinal/ui/shape/action/deserialize-action-value.js.map +1 -1
  13. package/dist/wcardinal/ui/shape/action/e-shape-action-misc-extension.js +6 -0
  14. package/dist/wcardinal/ui/shape/action/e-shape-action-misc-extension.js.map +1 -0
  15. package/dist/wcardinal/ui/shape/action/e-shape-action-misc-extensions.js +30 -0
  16. package/dist/wcardinal/ui/shape/action/e-shape-action-misc-extensions.js.map +1 -0
  17. package/dist/wcardinal/ui/shape/action/e-shape-action-open-opener.js.map +1 -1
  18. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.js +32 -0
  19. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.js.map +1 -0
  20. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-html-element-base.js +2 -2
  21. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-html-element-base.js.map +1 -1
  22. package/dist/wcardinal/ui/shape/action/e-shape-action-value-misc-extension.js +34 -0
  23. package/dist/wcardinal/ui/shape/action/e-shape-action-value-misc-extension.js.map +1 -0
  24. package/dist/wcardinal/ui/shape/action/e-shape-action-value-misc-type.js +2 -1
  25. package/dist/wcardinal/ui/shape/action/e-shape-action-value-misc-type.js.map +1 -1
  26. package/dist/wcardinal/ui/shape/action/e-shape-actions.js +22 -19
  27. package/dist/wcardinal/ui/shape/action/e-shape-actions.js.map +1 -1
  28. package/dist/wcardinal/ui/shape/action/index.js +4 -0
  29. package/dist/wcardinal/ui/shape/action/index.js.map +1 -1
  30. package/dist/wcardinal/ui/theme/dark/e-theme-dark-shape-action-value.js +12 -0
  31. package/dist/wcardinal/ui/theme/dark/e-theme-dark-shape-action-value.js.map +1 -1
  32. package/dist/wcardinal/ui/theme/white/e-theme-white-shape-action-value.js +12 -0
  33. package/dist/wcardinal/ui/theme/white/e-theme-white-shape-action-value.js.map +1 -1
  34. package/dist/wcardinal-ui-theme-dark-en-us.js +14 -1
  35. package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
  36. package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
  37. package/dist/wcardinal-ui-theme-dark-ja-jp.js +14 -1
  38. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
  39. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
  40. package/dist/wcardinal-ui-theme-dark.js +14 -1
  41. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  42. package/dist/wcardinal-ui-theme-white-en-us.js +14 -1
  43. package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
  44. package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
  45. package/dist/wcardinal-ui-theme-white-ja-jp.js +14 -1
  46. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
  47. package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
  48. package/dist/wcardinal-ui-theme-white.js +14 -1
  49. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  50. package/dist/wcardinal-ui.cjs.js +63661 -63541
  51. package/dist/wcardinal-ui.js +48252 -48154
  52. package/dist/wcardinal-ui.min.js +2 -2
  53. package/dist/wcardinal-ui.min.js.map +1 -1
  54. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ import { DDiagram } from "../../d-diagram";
2
+ import { EShape } from "../e-shape";
3
+ export type EShapeActionMiscExtensionExecutor = (parameter: unknown, shape: EShape, diagram: DDiagram) => void;
4
+ export interface EShapeActionMiscExtension {
5
+ type: number;
6
+ label: string;
7
+ executor: EShapeActionMiscExtensionExecutor;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { EShapeActionMiscExtension } from "./e-shape-action-misc-extension";
2
+ export declare class EShapeActionMiscExtensions {
3
+ protected static _data?: EShapeActionMiscExtension[];
4
+ protected static _typeToDatum?: Map<number, EShapeActionMiscExtension>;
5
+ static add(extension: EShapeActionMiscExtension): void;
6
+ static get(type: number): EShapeActionMiscExtension | undefined;
7
+ static each(iteratee: (extension: EShapeActionMiscExtension) => void): void;
8
+ }
@@ -1,2 +1,3 @@
1
+ import { DDiagram } from "../../d-diagram";
1
2
  import { EShape } from "../e-shape";
2
- export type EShapeActionOpenOpener = (target: unknown, inNewWindow: boolean, shape: EShape) => void;
3
+ export type EShapeActionOpenOpener = (target: unknown, inNewWindow: boolean, shape: EShape, diagram: DDiagram) => void;
@@ -0,0 +1,12 @@
1
+ import { EShape } from "../e-shape";
2
+ import { EShapeRuntime } from "../e-shape-runtime";
3
+ import { EShapeActionExpression } from "./e-shape-action-expression";
4
+ import { EShapeActionMiscExtension } from "./e-shape-action-misc-extension";
5
+ import { EShapeActionRuntimeConditional } from "./e-shape-action-runtime-conditional";
6
+ import { EShapeActionValueMiscExtension } from "./e-shape-action-value-misc-extension";
7
+ export declare class EShapeActionRuntimeMiscExtension extends EShapeActionRuntimeConditional {
8
+ protected extension?: EShapeActionMiscExtension;
9
+ protected parameter: EShapeActionExpression<unknown>;
10
+ constructor(value: EShapeActionValueMiscExtension);
11
+ execute(shape: EShape, runtime: EShapeRuntime, time: number): void;
12
+ }
@@ -0,0 +1,19 @@
1
+ import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
2
+ import { EShapeResourceManagerSerialization } from "../e-shape-resource-manager-serialization";
3
+ import { EShapeActionRuntime } from "./e-shape-action-runtime";
4
+ import { EShapeActionValueSubtyped } from "./e-shape-action-value-subtyped";
5
+ import { EShapeActionValueType } from "./e-shape-action-value-type";
6
+ export type EShapeActionValueMiscExtensionSubtype = number;
7
+ export type EShapeActionValueMiscExtensionSerialized = [
8
+ typeof EShapeActionValueType.MISC,
9
+ number,
10
+ EShapeActionValueMiscExtensionSubtype,
11
+ number
12
+ ];
13
+ export declare class EShapeActionValueMiscExtension extends EShapeActionValueSubtyped<EShapeActionValueMiscExtensionSubtype> {
14
+ readonly parameter: string;
15
+ constructor(subtype: EShapeActionValueMiscExtensionSubtype, condition: string, parameter: string);
16
+ toRuntime(): EShapeActionRuntime;
17
+ serialize(manager: EShapeResourceManagerSerialization): number;
18
+ static deserialize(serialized: EShapeActionValueMiscExtensionSerialized, manager: EShapeResourceManagerDeserialization): EShapeActionValueMiscExtension;
19
+ }
@@ -15,5 +15,6 @@ export declare const EShapeActionValueMiscType: {
15
15
  /** @deprecated in favor of {@link EShapeActionValueType}'s GESTURE */
16
16
  readonly GESTURE: 11;
17
17
  readonly EXECUTE: 12;
18
+ readonly EXTENSION: 1000;
18
19
  };
19
20
  export type EShapeActionValueMiscType = (typeof EShapeActionValueMiscType)[keyof typeof EShapeActionValueMiscType];
@@ -1,21 +1,12 @@
1
- import { utils } from "pixi.js";
2
- import { DCanvasContainer } from "../../d-canvas-container";
3
- import { DDiagramBaseController, DDiagramBaseControllerOpenType } from "../../d-diagram-base-controller";
4
- import { DDiagramData } from "../../d-diagram-data";
5
- import { DDiagramSerialized } from "../../d-diagram-serialized";
1
+ import { DDiagramBaseControllerOpenType } from "../../d-diagram-base-controller";
6
2
  import { EShape } from "../e-shape";
7
3
  import { EShapeDataValueState } from "../e-shape-data-value-state";
8
4
  import { EShapeEmbedded } from "../variant/e-shape-embedded";
9
- export interface EShapeActionsContainer extends DCanvasContainer {
10
- readonly shape: utils.EventEmitter;
11
- readonly data: DDiagramData;
12
- readonly controller: DDiagramBaseController | null;
13
- set(serialized: DDiagramSerialized | null): void;
14
- }
5
+ import { DDiagram } from "../../d-diagram";
15
6
  export declare class EShapeActions {
16
- static isContainer(target: unknown): target is EShapeActionsContainer;
7
+ static isDiagram(target: unknown): target is DDiagram;
17
8
  static isEmbedded(target: unknown): target is EShapeEmbedded;
18
- static toContainer(shape?: EShape | null): EShapeActionsContainer | null;
9
+ static toDiagram(shape?: EShape | null): DDiagram | null;
19
10
  static open(shape: EShape, type: DDiagramBaseControllerOpenType, target: unknown, inNewWindow: boolean): void;
20
11
  static writeLocal(shape: EShape, id: string, value: unknown, time: number, state?: EShapeDataValueState): boolean;
21
12
  static writeRemote(shape: EShape, id: string, value: unknown): boolean;
@@ -4,6 +4,8 @@ export * from "./e-shape-action-environment";
4
4
  export * from "./e-shape-action-expression-with-parameter";
5
5
  export * from "./e-shape-action-expression";
6
6
  export * from "./e-shape-action-expressions";
7
+ export * from "./e-shape-action-misc-extension";
8
+ export * from "./e-shape-action-misc-extensions";
7
9
  export * from "./e-shape-action-open-dialog-extension";
8
10
  export * from "./e-shape-action-open-dialog-extensions";
9
11
  export * from "./e-shape-action-open-dialog-opener";
@@ -31,6 +33,7 @@ export * from "./e-shape-action-runtime-gesture-layer";
31
33
  export * from "./e-shape-action-runtime-gesture-shape";
32
34
  export * from "./e-shape-action-runtime-misc-emit-event";
33
35
  export * from "./e-shape-action-runtime-misc-execute";
36
+ export * from "./e-shape-action-runtime-misc-extension";
34
37
  export * from "./e-shape-action-runtime-misc-html-element";
35
38
  export * from "./e-shape-action-runtime-misc-input-input";
36
39
  export * from "./e-shape-action-runtime-misc-input-integer";
@@ -94,6 +97,7 @@ export * from "./e-shape-action-value-gesture-type";
94
97
  export * from "./e-shape-action-value-gesture";
95
98
  export * from "./e-shape-action-value-misc-emit-event";
96
99
  export * from "./e-shape-action-value-misc-execute";
100
+ export * from "./e-shape-action-value-misc-extension";
97
101
  export * from "./e-shape-action-value-misc-html-element";
98
102
  export * from "./e-shape-action-value-misc-input";
99
103
  export * from "./e-shape-action-value-misc-type";
@@ -118,13 +118,18 @@ var DDiagramCanvasEditorSnap = /** @class */ (function () {
118
118
  return this._controller.serialize();
119
119
  };
120
120
  DDiagramCanvasEditorSnap.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
121
- this._gridParentWidth = newWidth;
122
- this._gridParentHeight = newHeight;
123
- this.updateGridSize();
121
+ if (this._gridParentWidth !== newWidth || this._gridParentHeight !== newHeight) {
122
+ this._gridParentWidth = newWidth;
123
+ this._gridParentHeight = newHeight;
124
+ this._isDirty = true;
125
+ this.updateGridSize();
126
+ }
124
127
  };
125
128
  DDiagramCanvasEditorSnap.prototype.onScale = function (newX, newY, oldX, oldY) {
126
- this._gridParentScale = newX;
127
- this.updateGridSize();
129
+ if (this._gridParentScale !== newX) {
130
+ this._gridParentScale = newX;
131
+ this.updateGridSize();
132
+ }
128
133
  };
129
134
  DDiagramCanvasEditorSnap.prototype.updateGridSize = function () {
130
135
  var gridSize = this.newGridSize();
@@ -1 +1 @@
1
- {"version":3,"file":"d-diagram-canvas-editor-snap.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagram-canvas-editor-snap.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEz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AC,KAAK,CACX,CAAC;YACF,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACrB,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;YACrB,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SAC5C;aAAM;YACN,KAAK,GAAG,IAAI,SAAS,EAAE,CAAC;YACxB,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;YACpC,KAAK,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;YACjC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACnC,KAAK,CAAC,MAAM,CAAC,GAAG,CACf,IAAI,EACJ,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,KAAK,EACX,SAAS,EACT,SAAS,EACT,KAAK,CAAC,KAAK,CACX,CAAC;YACF,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACrB,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;YACrB,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC5C,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;SACxB;IACF,CAAC;IACF,+BAAC;AAAD,CAAC,AAhSD,IAgSC","sourcesContent":["/*\n * Copyright (C) 2021 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Container } from \"pixi.js\";\nimport { DApplications } from \"./d-applications\";\nimport { DDiagramSerializedSnap } from \"./d-diagram-serialized\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\nimport { EShapeStrokeStyle } from \"./shape/e-shape-stroke-style\";\nimport { EShapeBar } from \"./shape/variant/e-shape-bar\";\nimport { EShapeBarPosition } from \"./shape/variant/e-shape-bar-position\";\nimport { ESnapper } from \"./snapper/e-snapper\";\nimport { ESnapperTargetValueType } from \"./snapper/e-snapper-target-value\";\nimport { EShapeLockPart } from \"./shape/variant/e-shape-lock-part\";\n\nexport interface DDiagramCanvasEditorSnapGridMajorOptions {\n\tinterval?: number;\n\tcolor?: number;\n\talpha?: number;\n\twidth?: number;\n\tstyle?: EShapeStrokeStyle;\n}\n\nexport interface DDiagramCanvasEditorSnapGridMinorOptions {\n\tcolor?: number;\n\talpha?: number;\n\twidth?: number;\n\tstyle?: EShapeStrokeStyle;\n}\n\nexport type DDiagramCanvasEditorSnapGridSize = (\n\tgiven: number,\n\twidth: number,\n\theight: number,\n\tscale: number\n) => number;\n\nexport interface DDiagramCanvasEditorSnapGridOptions {\n\tmajor?: DDiagramCanvasEditorSnapGridMajorOptions;\n\tminor?: DDiagramCanvasEditorSnapGridMinorOptions;\n\tsize?: DDiagramCanvasEditorSnapGridSize;\n\tadaptive?: boolean;\n}\n\nexport interface DDiagramCanvasEditorSnapTargetOptions {\n\tcolor?: number;\n\talpha?: number;\n\twidth?: number;\n\tstyle?: EShapeStrokeStyle;\n}\n\nexport interface DDiagramCanvasEditorSnapOptions {\n\tcontroller: ESnapper;\n\tgrid?: DDiagramCanvasEditorSnapGridOptions;\n\ttarget?: DDiagramCanvasEditorSnapTargetOptions;\n}\n\nexport interface DThemeDiagramCanvasEditorSnap {\n\tgetSnapGridMajorInterval(): number;\n\tgetSnapGridMajorColor(): number;\n\tgetSnapGridMajorAlpha(): number;\n\tgetSnapGridMajorWidth(): number;\n\tgetSnapGridMajorStyle(): EShapeStrokeStyle;\n\n\tgetSnapGridMinorColor(): number;\n\tgetSnapGridMinorAlpha(): number;\n\tgetSnapGridMinorWidth(): number;\n\tgetSnapGridMinorStyle(): EShapeStrokeStyle;\n\n\tgetSnapGridSize(): DDiagramCanvasEditorSnapGridSize;\n\n\tgetSnapTargetColor(): number;\n\tgetSnapTargetAlpha(): number;\n\tgetSnapTargetWidth(): number;\n\tgetSnapTargetStyle(): EShapeStrokeStyle;\n}\n\nexport interface DDiagramCanvasEditorSnapParent extends Container {\n\treadonly width: number;\n\treadonly height: number;\n\ttoDirty(): void;\n}\n\nexport interface DDiagramCanvasEditorSnapGridMajor {\n\tinterval: number;\n\tcolor: number;\n\talpha: number;\n\twidth: number;\n\tstyle: EShapeStrokeStyle;\n}\n\nexport interface DDiagramCanvasEditorSnapGridMinor {\n\tcolor: number;\n\talpha: number;\n\twidth: number;\n\tstyle: EShapeStrokeStyle;\n}\n\nexport interface DDiagramCanvasEditorSnapGrid {\n\tmajor: DDiagramCanvasEditorSnapGridMajor;\n\tminor: DDiagramCanvasEditorSnapGridMinor;\n\tsize: DDiagramCanvasEditorSnapGridSize;\n}\n\nexport interface DDiagramCanvasEditorSnapTarget {\n\tcolor: number;\n\talpha: number;\n\twidth: number;\n\tstyle: EShapeStrokeStyle;\n}\n\nexport class DDiagramCanvasEditorSnap {\n\tprotected _parent: DDiagramCanvasEditorSnapParent;\n\tprotected _controller: ESnapper;\n\tprotected _container: EShapeContainer;\n\n\tprotected _isDirty: boolean;\n\n\tprotected _grid: DDiagramCanvasEditorSnapGrid;\n\tprotected _gridParentWidth: number;\n\tprotected _gridParentHeight: number;\n\tprotected _gridParentScale: number;\n\tprotected _gridSize: number;\n\n\tprotected _target: DDiagramCanvasEditorSnapTarget;\n\n\tconstructor(\n\t\tparent: DDiagramCanvasEditorSnapParent,\n\t\ttheme: DThemeDiagramCanvasEditorSnap,\n\t\toptions: DDiagramCanvasEditorSnapOptions\n\t) {\n\t\tthis._parent = parent;\n\t\tthis._isDirty = true;\n\n\t\t// Controller\n\t\tconst controller = options.controller;\n\t\tthis._controller = controller;\n\t\tconst onChangeBound = (): void => {\n\t\t\tthis.onChange();\n\t\t};\n\t\tcontroller.grid.on(\"change\", onChangeBound);\n\t\tcontroller.target.on(\"change\", onChangeBound);\n\n\t\t// Container\n\t\tconst container = new EShapeContainer();\n\t\tcontainer.visible = false;\n\t\tthis._container = container;\n\t\tparent.addChildAt(container, parent.children.length - 1);\n\n\t\t// Grid\n\t\tthis._grid = this.toGrid(theme, options.grid);\n\t\tthis._gridParentWidth = parent.width;\n\t\tthis._gridParentHeight = parent.height;\n\t\tthis._gridParentScale = parent.scale.x;\n\t\tthis._gridSize = this.newGridSize();\n\n\t\t// Target\n\t\tthis._target = this.toTarget(theme, options.target);\n\t}\n\n\tprotected toGrid(\n\t\ttheme: DThemeDiagramCanvasEditorSnap,\n\t\toptions?: DDiagramCanvasEditorSnapGridOptions\n\t): DDiagramCanvasEditorSnapGrid {\n\t\tif (options != null) {\n\t\t\treturn {\n\t\t\t\tmajor: this.toGridMajor(theme, options.major),\n\t\t\t\tminor: this.toGridMinor(theme, options.minor),\n\t\t\t\tsize: options.size ?? theme.getSnapGridSize()\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tmajor: this.toGridMajor(theme),\n\t\t\tminor: this.toGridMinor(theme),\n\t\t\tsize: theme.getSnapGridSize()\n\t\t};\n\t}\n\n\tprotected toGridMajor(\n\t\ttheme: DThemeDiagramCanvasEditorSnap,\n\t\toptions?: DDiagramCanvasEditorSnapGridMajorOptions\n\t): DDiagramCanvasEditorSnapGridMajor {\n\t\tif (options != null) {\n\t\t\treturn {\n\t\t\t\tinterval: options.interval ?? theme.getSnapGridMajorInterval(),\n\t\t\t\tcolor: options.color ?? theme.getSnapGridMajorColor(),\n\t\t\t\talpha: options.alpha ?? theme.getSnapGridMajorAlpha(),\n\t\t\t\twidth: options.width ?? theme.getSnapGridMajorWidth(),\n\t\t\t\tstyle: options.style ?? theme.getSnapGridMajorStyle()\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tinterval: theme.getSnapGridMajorInterval(),\n\t\t\tcolor: theme.getSnapGridMajorColor(),\n\t\t\talpha: theme.getSnapGridMajorAlpha(),\n\t\t\twidth: theme.getSnapGridMajorWidth(),\n\t\t\tstyle: theme.getSnapGridMajorStyle()\n\t\t};\n\t}\n\n\tprotected toGridMinor(\n\t\ttheme: DThemeDiagramCanvasEditorSnap,\n\t\toptions?: DDiagramCanvasEditorSnapGridMinorOptions\n\t): DDiagramCanvasEditorSnapGridMinor {\n\t\tif (options != null) {\n\t\t\treturn {\n\t\t\t\tcolor: options.color ?? theme.getSnapGridMinorColor(),\n\t\t\t\talpha: options.alpha ?? theme.getSnapGridMinorAlpha(),\n\t\t\t\twidth: options.width ?? theme.getSnapGridMinorWidth(),\n\t\t\t\tstyle: options.style ?? theme.getSnapGridMinorStyle()\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tcolor: theme.getSnapGridMinorColor(),\n\t\t\talpha: theme.getSnapGridMinorAlpha(),\n\t\t\twidth: theme.getSnapGridMinorWidth(),\n\t\t\tstyle: theme.getSnapGridMinorStyle()\n\t\t};\n\t}\n\n\tprotected toTarget(\n\t\ttheme: DThemeDiagramCanvasEditorSnap,\n\t\toptions?: DDiagramCanvasEditorSnapTargetOptions\n\t): DDiagramCanvasEditorSnapTarget {\n\t\tif (options != null) {\n\t\t\treturn {\n\t\t\t\tcolor: options.color ?? theme.getSnapTargetColor(),\n\t\t\t\talpha: options.alpha ?? theme.getSnapTargetAlpha(),\n\t\t\t\twidth: options.width ?? theme.getSnapTargetWidth(),\n\t\t\t\tstyle: options.style ?? theme.getSnapTargetStyle()\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tcolor: theme.getSnapTargetColor(),\n\t\t\talpha: theme.getSnapTargetAlpha(),\n\t\t\twidth: theme.getSnapTargetWidth(),\n\t\t\tstyle: theme.getSnapTargetStyle()\n\t\t};\n\t}\n\n\tprotected onChange(): void {\n\t\tthis._isDirty = true;\n\t\tDApplications.update(this._parent);\n\t}\n\n\tget container(): EShapeContainer {\n\t\treturn this._container;\n\t}\n\n\tserialize(): DDiagramSerializedSnap {\n\t\treturn this._controller.serialize();\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tthis._gridParentWidth = newWidth;\n\t\tthis._gridParentHeight = newHeight;\n\t\tthis.updateGridSize();\n\t}\n\n\tonScale(newX: number, newY: number, oldX: number, oldY: number): void {\n\t\tthis._gridParentScale = newX;\n\t\tthis.updateGridSize();\n\t}\n\n\tprotected updateGridSize(): void {\n\t\tconst gridSize = this.newGridSize();\n\t\tif (this._gridSize !== gridSize) {\n\t\t\tthis._gridSize = gridSize;\n\t\t\tthis._isDirty = true;\n\t\t}\n\t}\n\n\tprotected newGridSize(): number {\n\t\treturn this._grid.size(\n\t\t\tthis._controller.grid.size,\n\t\t\tthis._gridParentWidth,\n\t\t\tthis._gridParentHeight,\n\t\t\tthis._gridParentScale\n\t\t);\n\t}\n\n\tonRender(): void {\n\t\tif (this._isDirty) {\n\t\t\tthis._isDirty = false;\n\t\t\tthis.updateAll();\n\t\t}\n\t}\n\n\tprotected updateAll(): void {\n\t\tconst container = this._container;\n\t\tconst controller = this._controller;\n\n\t\tconst isGridVisible = controller.grid.visible;\n\t\tconst isTargetVisible = controller.target.visible;\n\t\tif (isGridVisible || isTargetVisible) {\n\t\t\tconst w = this._gridParentWidth;\n\t\t\tconst h = this._gridParentHeight;\n\t\t\tconst wh = 0.5 * w;\n\t\t\tconst hh = 0.5 * h;\n\t\t\tconst TOP = EShapeBarPosition.TOP;\n\t\t\tconst LEFT = EShapeBarPosition.LEFT;\n\n\t\t\tconst shapes = container.children as EShapeBar[];\n\t\t\tlet index = 0;\n\n\t\t\t// Grid\n\t\t\tif (isGridVisible) {\n\t\t\t\tconst grid = this._grid;\n\t\t\t\tconst major = grid.major;\n\t\t\t\tconst minor = grid.minor;\n\t\t\t\tconst interval = major.interval;\n\t\t\t\tconst size = this._gridSize;\n\t\t\t\tfor (let x = size, ix = 1; x < w; x += size, ix += 1, index += 1) {\n\t\t\t\t\tconst style = ix % interval === 0 ? major : minor;\n\t\t\t\t\tthis.update(container, shapes, index, x, hh, TOP, w, h, style);\n\t\t\t\t}\n\t\t\t\tfor (let y = size, iy = 1; y < h; y += size, iy += 1, index += 1) {\n\t\t\t\t\tconst style = iy % interval === 0 ? major : minor;\n\t\t\t\t\tthis.update(container, shapes, index, wh, y, LEFT, w, h, style);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Target\n\t\t\tif (isTargetVisible) {\n\t\t\t\tconst values = controller.target.values;\n\t\t\t\tconst target = this._target;\n\t\t\t\tfor (let i = 0, imax = values.length; i < imax; i += 1, index += 1) {\n\t\t\t\t\tconst value = values[i];\n\t\t\t\t\tconst position = value.position;\n\t\t\t\t\tif (value.type === ESnapperTargetValueType.VERTICAL) {\n\t\t\t\t\t\tthis.update(container, shapes, index, position, hh, TOP, w, h, target);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.update(container, shapes, index, wh, position, LEFT, w, h, target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (let i = index, imax = shapes.length; i < imax; ++i) {\n\t\t\t\tshapes[i].visible = false;\n\t\t\t}\n\n\t\t\tcontainer.visible = true;\n\t\t} else {\n\t\t\tcontainer.visible = false;\n\t\t}\n\t}\n\n\tprotected update(\n\t\tcontainer: EShapeContainer,\n\t\tshapes: EShapeBar[],\n\t\tindex: number,\n\t\tx: number,\n\t\ty: number,\n\t\tposition: EShapeBarPosition,\n\t\tw: number,\n\t\th: number,\n\t\tstyle:\n\t\t\t| DDiagramCanvasEditorSnapGridMajor\n\t\t\t| DDiagramCanvasEditorSnapGridMinor\n\t\t\t| DDiagramCanvasEditorSnapTarget\n\t): void {\n\t\tlet shape = null;\n\t\tif (index < shapes.length) {\n\t\t\tshape = shapes[index];\n\t\t\tshape.lock(EShapeLockPart.UPLOADED);\n\t\t\tshape.points.position = position;\n\t\t\tshape.transform.position.set(x, y);\n\t\t\tshape.stroke.set(\n\t\t\t\ttrue,\n\t\t\t\tstyle.color,\n\t\t\t\tstyle.alpha,\n\t\t\t\tstyle.width,\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\tstyle.style\n\t\t\t);\n\t\t\tshape.size.set(w, h);\n\t\t\tshape.visible = true;\n\t\t\tshape.unlock(EShapeLockPart.UPLOADED, true);\n\t\t} else {\n\t\t\tshape = new EShapeBar();\n\t\t\tshape.lock(EShapeLockPart.UPLOADED);\n\t\t\tshape.points.position = position;\n\t\t\tshape.transform.position.set(x, y);\n\t\t\tshape.stroke.set(\n\t\t\t\ttrue,\n\t\t\t\tstyle.color,\n\t\t\t\tstyle.alpha,\n\t\t\t\tstyle.width,\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\tstyle.style\n\t\t\t);\n\t\t\tshape.size.set(w, h);\n\t\t\tshape.visible = true;\n\t\t\tshape.unlock(EShapeLockPart.UPLOADED, true);\n\t\t\tshape.attach(container);\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-diagram-canvas-editor-snap.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagram-canvas-editor-snap.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAkGnE;IAeC,kCACC,MAAsC,EACtC,KAAoC,EACpC,OAAwC;QAHzC,iBAgCC;QA3BA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErB,aAAa;QACb,IAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACtC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAM,aAAa,GAAG;YACrB,KAAI,CAAC,QAAQ,EAAE,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YACN,KAAK,GAAG,IAAI,SAAS,EAAE,CAAC;YACxB,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;YACpC,KAAK,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;YACjC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACnC,KAAK,CAAC,MAAM,CAAC,GAAG,CACf,IAAI,EACJ,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,KAAK,EACX,SAAS,EACT,SAAS,EACT,KAAK,CAAC,KAAK,CACX,CAAC;YACF,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACrB,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;YACrB,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC5C,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;SACxB;IACF,CAAC;IACF,+BAAC;AAAD,CAAC,AArSD,IAqSC","sourcesContent":["/*\n * Copyright (C) 2021 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Container } from \"pixi.js\";\nimport { DApplications } from \"./d-applications\";\nimport { DDiagramSerializedSnap } from \"./d-diagram-serialized\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\nimport { EShapeStrokeStyle } from \"./shape/e-shape-stroke-style\";\nimport { EShapeBar } from \"./shape/variant/e-shape-bar\";\nimport { EShapeBarPosition } from \"./shape/variant/e-shape-bar-position\";\nimport { ESnapper } from \"./snapper/e-snapper\";\nimport { ESnapperTargetValueType } from \"./snapper/e-snapper-target-value\";\nimport { EShapeLockPart } from \"./shape/variant/e-shape-lock-part\";\n\nexport interface DDiagramCanvasEditorSnapGridMajorOptions {\n\tinterval?: number;\n\tcolor?: number;\n\talpha?: number;\n\twidth?: number;\n\tstyle?: EShapeStrokeStyle;\n}\n\nexport interface DDiagramCanvasEditorSnapGridMinorOptions {\n\tcolor?: number;\n\talpha?: number;\n\twidth?: number;\n\tstyle?: EShapeStrokeStyle;\n}\n\nexport type DDiagramCanvasEditorSnapGridSize = (\n\tgiven: number,\n\twidth: number,\n\theight: number,\n\tscale: number\n) => number;\n\nexport interface DDiagramCanvasEditorSnapGridOptions {\n\tmajor?: DDiagramCanvasEditorSnapGridMajorOptions;\n\tminor?: DDiagramCanvasEditorSnapGridMinorOptions;\n\tsize?: DDiagramCanvasEditorSnapGridSize;\n\tadaptive?: boolean;\n}\n\nexport interface DDiagramCanvasEditorSnapTargetOptions {\n\tcolor?: number;\n\talpha?: number;\n\twidth?: number;\n\tstyle?: EShapeStrokeStyle;\n}\n\nexport interface DDiagramCanvasEditorSnapOptions {\n\tcontroller: ESnapper;\n\tgrid?: DDiagramCanvasEditorSnapGridOptions;\n\ttarget?: DDiagramCanvasEditorSnapTargetOptions;\n}\n\nexport interface DThemeDiagramCanvasEditorSnap {\n\tgetSnapGridMajorInterval(): number;\n\tgetSnapGridMajorColor(): number;\n\tgetSnapGridMajorAlpha(): number;\n\tgetSnapGridMajorWidth(): number;\n\tgetSnapGridMajorStyle(): EShapeStrokeStyle;\n\n\tgetSnapGridMinorColor(): number;\n\tgetSnapGridMinorAlpha(): number;\n\tgetSnapGridMinorWidth(): number;\n\tgetSnapGridMinorStyle(): EShapeStrokeStyle;\n\n\tgetSnapGridSize(): DDiagramCanvasEditorSnapGridSize;\n\n\tgetSnapTargetColor(): number;\n\tgetSnapTargetAlpha(): number;\n\tgetSnapTargetWidth(): number;\n\tgetSnapTargetStyle(): EShapeStrokeStyle;\n}\n\nexport interface DDiagramCanvasEditorSnapParent extends Container {\n\treadonly width: number;\n\treadonly height: number;\n\ttoDirty(): void;\n}\n\nexport interface DDiagramCanvasEditorSnapGridMajor {\n\tinterval: number;\n\tcolor: number;\n\talpha: number;\n\twidth: number;\n\tstyle: EShapeStrokeStyle;\n}\n\nexport interface DDiagramCanvasEditorSnapGridMinor {\n\tcolor: number;\n\talpha: number;\n\twidth: number;\n\tstyle: EShapeStrokeStyle;\n}\n\nexport interface DDiagramCanvasEditorSnapGrid {\n\tmajor: DDiagramCanvasEditorSnapGridMajor;\n\tminor: DDiagramCanvasEditorSnapGridMinor;\n\tsize: DDiagramCanvasEditorSnapGridSize;\n}\n\nexport interface DDiagramCanvasEditorSnapTarget {\n\tcolor: number;\n\talpha: number;\n\twidth: number;\n\tstyle: EShapeStrokeStyle;\n}\n\nexport class DDiagramCanvasEditorSnap {\n\tprotected _parent: DDiagramCanvasEditorSnapParent;\n\tprotected _controller: ESnapper;\n\tprotected _container: EShapeContainer;\n\n\tprotected _isDirty: boolean;\n\n\tprotected _grid: DDiagramCanvasEditorSnapGrid;\n\tprotected _gridParentWidth: number;\n\tprotected _gridParentHeight: number;\n\tprotected _gridParentScale: number;\n\tprotected _gridSize: number;\n\n\tprotected _target: DDiagramCanvasEditorSnapTarget;\n\n\tconstructor(\n\t\tparent: DDiagramCanvasEditorSnapParent,\n\t\ttheme: DThemeDiagramCanvasEditorSnap,\n\t\toptions: DDiagramCanvasEditorSnapOptions\n\t) {\n\t\tthis._parent = parent;\n\t\tthis._isDirty = true;\n\n\t\t// Controller\n\t\tconst controller = options.controller;\n\t\tthis._controller = controller;\n\t\tconst onChangeBound = (): void => {\n\t\t\tthis.onChange();\n\t\t};\n\t\tcontroller.grid.on(\"change\", onChangeBound);\n\t\tcontroller.target.on(\"change\", onChangeBound);\n\n\t\t// Container\n\t\tconst container = new EShapeContainer();\n\t\tcontainer.visible = false;\n\t\tthis._container = container;\n\t\tparent.addChildAt(container, parent.children.length - 1);\n\n\t\t// Grid\n\t\tthis._grid = this.toGrid(theme, options.grid);\n\t\tthis._gridParentWidth = parent.width;\n\t\tthis._gridParentHeight = parent.height;\n\t\tthis._gridParentScale = parent.scale.x;\n\t\tthis._gridSize = this.newGridSize();\n\n\t\t// Target\n\t\tthis._target = this.toTarget(theme, options.target);\n\t}\n\n\tprotected toGrid(\n\t\ttheme: DThemeDiagramCanvasEditorSnap,\n\t\toptions?: DDiagramCanvasEditorSnapGridOptions\n\t): DDiagramCanvasEditorSnapGrid {\n\t\tif (options != null) {\n\t\t\treturn {\n\t\t\t\tmajor: this.toGridMajor(theme, options.major),\n\t\t\t\tminor: this.toGridMinor(theme, options.minor),\n\t\t\t\tsize: options.size ?? theme.getSnapGridSize()\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tmajor: this.toGridMajor(theme),\n\t\t\tminor: this.toGridMinor(theme),\n\t\t\tsize: theme.getSnapGridSize()\n\t\t};\n\t}\n\n\tprotected toGridMajor(\n\t\ttheme: DThemeDiagramCanvasEditorSnap,\n\t\toptions?: DDiagramCanvasEditorSnapGridMajorOptions\n\t): DDiagramCanvasEditorSnapGridMajor {\n\t\tif (options != null) {\n\t\t\treturn {\n\t\t\t\tinterval: options.interval ?? theme.getSnapGridMajorInterval(),\n\t\t\t\tcolor: options.color ?? theme.getSnapGridMajorColor(),\n\t\t\t\talpha: options.alpha ?? theme.getSnapGridMajorAlpha(),\n\t\t\t\twidth: options.width ?? theme.getSnapGridMajorWidth(),\n\t\t\t\tstyle: options.style ?? theme.getSnapGridMajorStyle()\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tinterval: theme.getSnapGridMajorInterval(),\n\t\t\tcolor: theme.getSnapGridMajorColor(),\n\t\t\talpha: theme.getSnapGridMajorAlpha(),\n\t\t\twidth: theme.getSnapGridMajorWidth(),\n\t\t\tstyle: theme.getSnapGridMajorStyle()\n\t\t};\n\t}\n\n\tprotected toGridMinor(\n\t\ttheme: DThemeDiagramCanvasEditorSnap,\n\t\toptions?: DDiagramCanvasEditorSnapGridMinorOptions\n\t): DDiagramCanvasEditorSnapGridMinor {\n\t\tif (options != null) {\n\t\t\treturn {\n\t\t\t\tcolor: options.color ?? theme.getSnapGridMinorColor(),\n\t\t\t\talpha: options.alpha ?? theme.getSnapGridMinorAlpha(),\n\t\t\t\twidth: options.width ?? theme.getSnapGridMinorWidth(),\n\t\t\t\tstyle: options.style ?? theme.getSnapGridMinorStyle()\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tcolor: theme.getSnapGridMinorColor(),\n\t\t\talpha: theme.getSnapGridMinorAlpha(),\n\t\t\twidth: theme.getSnapGridMinorWidth(),\n\t\t\tstyle: theme.getSnapGridMinorStyle()\n\t\t};\n\t}\n\n\tprotected toTarget(\n\t\ttheme: DThemeDiagramCanvasEditorSnap,\n\t\toptions?: DDiagramCanvasEditorSnapTargetOptions\n\t): DDiagramCanvasEditorSnapTarget {\n\t\tif (options != null) {\n\t\t\treturn {\n\t\t\t\tcolor: options.color ?? theme.getSnapTargetColor(),\n\t\t\t\talpha: options.alpha ?? theme.getSnapTargetAlpha(),\n\t\t\t\twidth: options.width ?? theme.getSnapTargetWidth(),\n\t\t\t\tstyle: options.style ?? theme.getSnapTargetStyle()\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tcolor: theme.getSnapTargetColor(),\n\t\t\talpha: theme.getSnapTargetAlpha(),\n\t\t\twidth: theme.getSnapTargetWidth(),\n\t\t\tstyle: theme.getSnapTargetStyle()\n\t\t};\n\t}\n\n\tprotected onChange(): void {\n\t\tthis._isDirty = true;\n\t\tDApplications.update(this._parent);\n\t}\n\n\tget container(): EShapeContainer {\n\t\treturn this._container;\n\t}\n\n\tserialize(): DDiagramSerializedSnap {\n\t\treturn this._controller.serialize();\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tif (this._gridParentWidth !== newWidth || this._gridParentHeight !== newHeight) {\n\t\t\tthis._gridParentWidth = newWidth;\n\t\t\tthis._gridParentHeight = newHeight;\n\t\t\tthis._isDirty = true;\n\t\t\tthis.updateGridSize();\n\t\t}\n\t}\n\n\tonScale(newX: number, newY: number, oldX: number, oldY: number): void {\n\t\tif (this._gridParentScale !== newX) {\n\t\t\tthis._gridParentScale = newX;\n\t\t\tthis.updateGridSize();\n\t\t}\n\t}\n\n\tprotected updateGridSize(): void {\n\t\tconst gridSize = this.newGridSize();\n\t\tif (this._gridSize !== gridSize) {\n\t\t\tthis._gridSize = gridSize;\n\t\t\tthis._isDirty = true;\n\t\t}\n\t}\n\n\tprotected newGridSize(): number {\n\t\treturn this._grid.size(\n\t\t\tthis._controller.grid.size,\n\t\t\tthis._gridParentWidth,\n\t\t\tthis._gridParentHeight,\n\t\t\tthis._gridParentScale\n\t\t);\n\t}\n\n\tonRender(): void {\n\t\tif (this._isDirty) {\n\t\t\tthis._isDirty = false;\n\t\t\tthis.updateAll();\n\t\t}\n\t}\n\n\tprotected updateAll(): void {\n\t\tconst container = this._container;\n\t\tconst controller = this._controller;\n\n\t\tconst isGridVisible = controller.grid.visible;\n\t\tconst isTargetVisible = controller.target.visible;\n\t\tif (isGridVisible || isTargetVisible) {\n\t\t\tconst w = this._gridParentWidth;\n\t\t\tconst h = this._gridParentHeight;\n\t\t\tconst wh = 0.5 * w;\n\t\t\tconst hh = 0.5 * h;\n\t\t\tconst TOP = EShapeBarPosition.TOP;\n\t\t\tconst LEFT = EShapeBarPosition.LEFT;\n\n\t\t\tconst shapes = container.children as EShapeBar[];\n\t\t\tlet index = 0;\n\n\t\t\t// Grid\n\t\t\tif (isGridVisible) {\n\t\t\t\tconst grid = this._grid;\n\t\t\t\tconst major = grid.major;\n\t\t\t\tconst minor = grid.minor;\n\t\t\t\tconst interval = major.interval;\n\t\t\t\tconst size = this._gridSize;\n\t\t\t\tfor (let x = size, ix = 1; x < w; x += size, ix += 1, index += 1) {\n\t\t\t\t\tconst style = ix % interval === 0 ? major : minor;\n\t\t\t\t\tthis.update(container, shapes, index, x, hh, TOP, w, h, style);\n\t\t\t\t}\n\t\t\t\tfor (let y = size, iy = 1; y < h; y += size, iy += 1, index += 1) {\n\t\t\t\t\tconst style = iy % interval === 0 ? major : minor;\n\t\t\t\t\tthis.update(container, shapes, index, wh, y, LEFT, w, h, style);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Target\n\t\t\tif (isTargetVisible) {\n\t\t\t\tconst values = controller.target.values;\n\t\t\t\tconst target = this._target;\n\t\t\t\tfor (let i = 0, imax = values.length; i < imax; i += 1, index += 1) {\n\t\t\t\t\tconst value = values[i];\n\t\t\t\t\tconst position = value.position;\n\t\t\t\t\tif (value.type === ESnapperTargetValueType.VERTICAL) {\n\t\t\t\t\t\tthis.update(container, shapes, index, position, hh, TOP, w, h, target);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.update(container, shapes, index, wh, position, LEFT, w, h, target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (let i = index, imax = shapes.length; i < imax; ++i) {\n\t\t\t\tshapes[i].visible = false;\n\t\t\t}\n\n\t\t\tcontainer.visible = true;\n\t\t} else {\n\t\t\tcontainer.visible = false;\n\t\t}\n\t}\n\n\tprotected update(\n\t\tcontainer: EShapeContainer,\n\t\tshapes: EShapeBar[],\n\t\tindex: number,\n\t\tx: number,\n\t\ty: number,\n\t\tposition: EShapeBarPosition,\n\t\tw: number,\n\t\th: number,\n\t\tstyle:\n\t\t\t| DDiagramCanvasEditorSnapGridMajor\n\t\t\t| DDiagramCanvasEditorSnapGridMinor\n\t\t\t| DDiagramCanvasEditorSnapTarget\n\t): void {\n\t\tlet shape = null;\n\t\tif (index < shapes.length) {\n\t\t\tshape = shapes[index];\n\t\t\tshape.lock(EShapeLockPart.UPLOADED);\n\t\t\tshape.points.position = position;\n\t\t\tshape.transform.position.set(x, y);\n\t\t\tshape.stroke.set(\n\t\t\t\ttrue,\n\t\t\t\tstyle.color,\n\t\t\t\tstyle.alpha,\n\t\t\t\tstyle.width,\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\tstyle.style\n\t\t\t);\n\t\t\tshape.size.set(w, h);\n\t\t\tshape.visible = true;\n\t\t\tshape.unlock(EShapeLockPart.UPLOADED, true);\n\t\t} else {\n\t\t\tshape = new EShapeBar();\n\t\t\tshape.lock(EShapeLockPart.UPLOADED);\n\t\t\tshape.points.position = position;\n\t\t\tshape.transform.position.set(x, y);\n\t\t\tshape.stroke.set(\n\t\t\t\ttrue,\n\t\t\t\tstyle.color,\n\t\t\t\tstyle.alpha,\n\t\t\t\tstyle.width,\n\t\t\t\tundefined,\n\t\t\t\tundefined,\n\t\t\t\tstyle.style\n\t\t\t);\n\t\t\tshape.size.set(w, h);\n\t\t\tshape.visible = true;\n\t\t\tshape.unlock(EShapeLockPart.UPLOADED, true);\n\t\t\tshape.attach(container);\n\t\t}\n\t}\n}\n"]}
@@ -13,6 +13,7 @@ import { EShapeActionValueEmitEvent } from "./e-shape-action-value-emit-event";
13
13
  import { EShapeActionValueGesture } from "./e-shape-action-value-gesture";
14
14
  import { EShapeActionValueMisc } from "./e-shape-action-value-misc";
15
15
  import { EShapeActionValueMiscExecute } from "./e-shape-action-value-misc-execute";
16
+ import { EShapeActionValueMiscExtension } from "./e-shape-action-value-misc-extension";
16
17
  import { EShapeActionValueMiscType } from "./e-shape-action-value-misc-type";
17
18
  import { EShapeActionValueOpen } from "./e-shape-action-value-open";
18
19
  import { EShapeActionValueOpenDialog } from "./e-shape-action-value-open-dialog";
@@ -113,7 +114,12 @@ export var deserializeActionValue = function (serialized, manager) {
113
114
  case EShapeActionValueMiscType.EXECUTE:
114
115
  return EShapeActionValueMiscExecute.deserialize(serialized, manager);
115
116
  default:
116
- return EShapeActionValueMisc.deserialize(serialized, manager);
117
+ if (EShapeActionValueMiscType.EXTENSION <= serialized[2]) {
118
+ return EShapeActionValueMiscExtension.deserialize(serialized, manager);
119
+ }
120
+ else {
121
+ return EShapeActionValueMisc.deserialize(serialized, manager);
122
+ }
117
123
  }
118
124
  }
119
125
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"deserialize-action-value.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/deserialize-action-value.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAI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CAAC,OAAO;oBACrC,OAAO,4BAA4B,CAAC,WAAW,CAAC,UAAiB,EAAE,OAAO,CAAC,CAAC;gBAC7E;oBACC,OAAO,qBAAqB,CAAC,WAAW,CAAC,UAAiB,EAAE,OAAO,CAAC,CAAC;aACtE;KACF;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { EShapeActionValue } from \"./e-shape-action-value\";\nimport { EShapeActionValueBlink } from \"./e-shape-action-value-blink\";\nimport { EShapeActionValueChangeColor } from \"./e-shape-action-value-change-color\";\nimport { EShapeActionValueChangeColorBrightness } from \"./e-shape-action-value-change-color-brightness\";\nimport { EShapeActionValueChangeColorCode } from \"./e-shape-action-value-change-color-code\";\nimport { EShapeActionValueChangeColorTarget } from \"./e-shape-action-value-change-color-target\";\nimport { EShapeActionValueChangeCursor } from \"./e-shape-action-value-change-cursor\";\nimport { EShapeActionValueChangeText } from \"./e-shape-action-value-change-text\";\nimport { EShapeActionValueEmitEvent } from \"./e-shape-action-value-emit-event\";\nimport { EShapeActionValueGesture } from \"./e-shape-action-value-gesture\";\nimport { EShapeActionValueMisc } from \"./e-shape-action-value-misc\";\nimport { EShapeActionValueMiscExecute } from \"./e-shape-action-value-misc-execute\";\nimport { EShapeActionValueMiscType } from \"./e-shape-action-value-misc-type\";\nimport { EShapeActionValueOpen } from \"./e-shape-action-value-open\";\nimport { EShapeActionValueOpenDialog } from \"./e-shape-action-value-open-dialog\";\nimport { EShapeActionValueOpenDialogExtension } from \"./e-shape-action-value-open-dialog-extension\";\nimport { EShapeActionValueOpenDialogType } from \"./e-shape-action-value-open-dialog-type\";\nimport { EShapeActionValueOpenExtension } from \"./e-shape-action-value-open-extension\";\nimport { EShapeActionValueOpenType } from \"./e-shape-action-value-open-type\";\nimport { EShapeActionValueShowHide } from \"./e-shape-action-value-show-hide\";\nimport { EShapeActionValueShowHideLayer } from \"./e-shape-action-value-show-hide-layer\";\nimport { EShapeActionValueShowHideShape } from \"./e-shape-action-value-show-hide-shape\";\nimport { EShapeActionValueShowHideType } from \"./e-shape-action-value-show-hide-type\";\nimport { EShapeActionValueTransformMove } from \"./e-shape-action-value-transform-move\";\nimport { EShapeActionValueTransformResize } from \"./e-shape-action-value-transform-resize\";\nimport { EShapeActionValueTransformRotate } from \"./e-shape-action-value-transform-rotate\";\nimport { EShapeActionValueTransformType } from \"./e-shape-action-value-transform-type\";\nimport { EShapeActionValueType } from \"./e-shape-action-value-type\";\n\nexport const deserializeActionValue = (\n\tserialized: number[],\n\tmanager: EShapeResourceManagerDeserialization\n): EShapeActionValue | null => {\n\tswitch (serialized[0]) {\n\t\tcase EShapeActionValueType.SHOW_HIDE:\n\t\t\tswitch (serialized[2]) {\n\t\t\t\tcase EShapeActionValueShowHideType.SHAPE_SHOW:\n\t\t\t\tcase EShapeActionValueShowHideType.SHAPE_HIDE:\n\t\t\t\t\treturn EShapeActionValueShowHide.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueShowHideType.SHAPE:\n\t\t\t\t\treturn EShapeActionValueShowHideShape.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueShowHideType.LAYER:\n\t\t\t\t\treturn EShapeActionValueShowHideLayer.deserialize(serialized as any, manager);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase EShapeActionValueType.BLINK:\n\t\t\treturn EShapeActionValueBlink.deserialize(serialized as any, manager);\n\t\tcase EShapeActionValueType.CHANGE_COLOR:\n\t\tcase EShapeActionValueType.CHANGE_COLOR_LEGACY:\n\t\t\tswitch (serialized[3]) {\n\t\t\t\tcase EShapeActionValueChangeColorTarget.COLOR_AND_ALPHA:\n\t\t\t\tcase EShapeActionValueChangeColorTarget.COLOR:\n\t\t\t\tcase EShapeActionValueChangeColorTarget.ALPHA:\n\t\t\t\t\treturn EShapeActionValueChangeColor.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueChangeColorTarget.CODE:\n\t\t\t\t\treturn EShapeActionValueChangeColorCode.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueChangeColorTarget.BRIGHTNESS:\n\t\t\t\t\treturn EShapeActionValueChangeColorBrightness.deserialize(\n\t\t\t\t\t\tserialized as any,\n\t\t\t\t\t\tmanager\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase EShapeActionValueType.CHANGE_TEXT:\n\t\t\treturn EShapeActionValueChangeText.deserialize(serialized as any, manager);\n\t\tcase EShapeActionValueType.CHANGE_CURSOR:\n\t\t\treturn EShapeActionValueChangeCursor.deserialize(serialized as any, manager);\n\t\tcase EShapeActionValueType.EMIT_EVENT:\n\t\t\treturn EShapeActionValueEmitEvent.deserialize(serialized as any, manager);\n\t\tcase EShapeActionValueType.OPEN:\n\t\t\tswitch (serialized[2]) {\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_TEXT:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_INTEGER:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_REAL:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_BOOLEAN:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_DATE:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_TIME:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_DATETIME:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG:\n\t\t\t\t\tif (EShapeActionValueOpenDialogType.EXTENSION <= serialized[6]) {\n\t\t\t\t\t\treturn EShapeActionValueOpenDialogExtension.deserialize(\n\t\t\t\t\t\t\tserialized as any,\n\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn EShapeActionValueOpenDialog.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueOpenType.DIAGRAM_LEGACY:\n\t\t\t\tcase EShapeActionValueOpenType.PAGE_LEGACY:\n\t\t\t\tcase EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:\n\t\t\t\tcase EShapeActionValueOpenType.DIAGRAM:\n\t\t\t\tcase EShapeActionValueOpenType.PAGE:\n\t\t\t\t\treturn EShapeActionValueOpen.deserialize(serialized as any, manager);\n\t\t\t\tdefault:\n\t\t\t\t\tif (EShapeActionValueOpenType.EXTENSION <= serialized[2]) {\n\t\t\t\t\t\treturn EShapeActionValueOpenExtension.deserialize(\n\t\t\t\t\t\t\tserialized as any,\n\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase EShapeActionValueType.TRANSFORM:\n\t\t\tswitch (serialized[2]) {\n\t\t\t\tcase EShapeActionValueTransformType.MOVE:\n\t\t\t\t\treturn EShapeActionValueTransformMove.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueTransformType.RESIZE:\n\t\t\t\t\treturn EShapeActionValueTransformResize.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueTransformType.ROTATE:\n\t\t\t\t\treturn EShapeActionValueTransformRotate.deserialize(serialized as any, manager);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase EShapeActionValueType.GESTURE:\n\t\t\treturn EShapeActionValueGesture.deserialize(serialized as any, manager);\n\t\tcase EShapeActionValueType.MISC:\n\t\t\tswitch (serialized[2]) {\n\t\t\t\tcase EShapeActionValueMiscType.GESTURE:\n\t\t\t\t\treturn EShapeActionValueGesture.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueMiscType.SHOW_HIDE_LAYER:\n\t\t\t\t\treturn EShapeActionValueShowHideLayer.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueMiscType.GESTURE_LAYER:\n\t\t\t\t\treturn EShapeActionValueGesture.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueMiscType.EXECUTE:\n\t\t\t\t\treturn EShapeActionValueMiscExecute.deserialize(serialized as any, manager);\n\t\t\t\tdefault:\n\t\t\t\t\treturn EShapeActionValueMisc.deserialize(serialized as any, manager);\n\t\t\t}\n\t}\n\treturn null;\n};\n"]}
1
+ {"version":3,"file":"deserialize-action-value.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/deserialize-action-value.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,sCAAsC,EAAE,MAAM,gDAAgD,CAAC;AACxG,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAChG,OAAO,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,8BAA8B,EAAE,MAAM,uCAAuC,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,oCAAoC,EAAE,MAAM,8CAA8C,CAAC;AACpG,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,8BAA8B,EAAE,MAAM,uCAAuC,CAAC;AACvF,OAAO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,CAAC,OAAO;oBACrC,OAAO,wBAAwB,CAAC,WAAW,CAAC,UAAiB,EAAE,OAAO,CAAC,CAAC;gBACzE,KAAK,yBAAyB,CAAC,eAAe;oBAC7C,OAAO,8BAA8B,CAAC,WAAW,CAAC,UAAiB,EAAE,OAAO,CAAC,CAAC;gBAC/E,KAAK,yBAAyB,CAAC,aAAa;oBAC3C,OAAO,wBAAwB,CAAC,WAAW,CAAC,UAAiB,EAAE,OAAO,CAAC,CAAC;gBACzE,KAAK,yBAAyB,CAAC,OAAO;oBACrC,OAAO,4BAA4B,CAAC,WAAW,CAAC,UAAiB,EAAE,OAAO,CAAC,CAAC;gBAC7E;oBACC,IAAI,yBAAyB,CAAC,SAAS,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE;wBACzD,OAAO,8BAA8B,CAAC,WAAW,CAChD,UAAiB,EACjB,OAAO,CACP,CAAC;qBACF;yBAAM;wBACN,OAAO,qBAAqB,CAAC,WAAW,CAAC,UAAiB,EAAE,OAAO,CAAC,CAAC;qBACrE;aACF;KACF;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { EShapeActionValue } from \"./e-shape-action-value\";\nimport { EShapeActionValueBlink } from \"./e-shape-action-value-blink\";\nimport { EShapeActionValueChangeColor } from \"./e-shape-action-value-change-color\";\nimport { EShapeActionValueChangeColorBrightness } from \"./e-shape-action-value-change-color-brightness\";\nimport { EShapeActionValueChangeColorCode } from \"./e-shape-action-value-change-color-code\";\nimport { EShapeActionValueChangeColorTarget } from \"./e-shape-action-value-change-color-target\";\nimport { EShapeActionValueChangeCursor } from \"./e-shape-action-value-change-cursor\";\nimport { EShapeActionValueChangeText } from \"./e-shape-action-value-change-text\";\nimport { EShapeActionValueEmitEvent } from \"./e-shape-action-value-emit-event\";\nimport { EShapeActionValueGesture } from \"./e-shape-action-value-gesture\";\nimport { EShapeActionValueMisc } from \"./e-shape-action-value-misc\";\nimport { EShapeActionValueMiscExecute } from \"./e-shape-action-value-misc-execute\";\nimport { EShapeActionValueMiscExtension } from \"./e-shape-action-value-misc-extension\";\nimport { EShapeActionValueMiscType } from \"./e-shape-action-value-misc-type\";\nimport { EShapeActionValueOpen } from \"./e-shape-action-value-open\";\nimport { EShapeActionValueOpenDialog } from \"./e-shape-action-value-open-dialog\";\nimport { EShapeActionValueOpenDialogExtension } from \"./e-shape-action-value-open-dialog-extension\";\nimport { EShapeActionValueOpenDialogType } from \"./e-shape-action-value-open-dialog-type\";\nimport { EShapeActionValueOpenExtension } from \"./e-shape-action-value-open-extension\";\nimport { EShapeActionValueOpenType } from \"./e-shape-action-value-open-type\";\nimport { EShapeActionValueShowHide } from \"./e-shape-action-value-show-hide\";\nimport { EShapeActionValueShowHideLayer } from \"./e-shape-action-value-show-hide-layer\";\nimport { EShapeActionValueShowHideShape } from \"./e-shape-action-value-show-hide-shape\";\nimport { EShapeActionValueShowHideType } from \"./e-shape-action-value-show-hide-type\";\nimport { EShapeActionValueTransformMove } from \"./e-shape-action-value-transform-move\";\nimport { EShapeActionValueTransformResize } from \"./e-shape-action-value-transform-resize\";\nimport { EShapeActionValueTransformRotate } from \"./e-shape-action-value-transform-rotate\";\nimport { EShapeActionValueTransformType } from \"./e-shape-action-value-transform-type\";\nimport { EShapeActionValueType } from \"./e-shape-action-value-type\";\n\nexport const deserializeActionValue = (\n\tserialized: number[],\n\tmanager: EShapeResourceManagerDeserialization\n): EShapeActionValue | null => {\n\tswitch (serialized[0]) {\n\t\tcase EShapeActionValueType.SHOW_HIDE:\n\t\t\tswitch (serialized[2]) {\n\t\t\t\tcase EShapeActionValueShowHideType.SHAPE_SHOW:\n\t\t\t\tcase EShapeActionValueShowHideType.SHAPE_HIDE:\n\t\t\t\t\treturn EShapeActionValueShowHide.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueShowHideType.SHAPE:\n\t\t\t\t\treturn EShapeActionValueShowHideShape.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueShowHideType.LAYER:\n\t\t\t\t\treturn EShapeActionValueShowHideLayer.deserialize(serialized as any, manager);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase EShapeActionValueType.BLINK:\n\t\t\treturn EShapeActionValueBlink.deserialize(serialized as any, manager);\n\t\tcase EShapeActionValueType.CHANGE_COLOR:\n\t\tcase EShapeActionValueType.CHANGE_COLOR_LEGACY:\n\t\t\tswitch (serialized[3]) {\n\t\t\t\tcase EShapeActionValueChangeColorTarget.COLOR_AND_ALPHA:\n\t\t\t\tcase EShapeActionValueChangeColorTarget.COLOR:\n\t\t\t\tcase EShapeActionValueChangeColorTarget.ALPHA:\n\t\t\t\t\treturn EShapeActionValueChangeColor.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueChangeColorTarget.CODE:\n\t\t\t\t\treturn EShapeActionValueChangeColorCode.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueChangeColorTarget.BRIGHTNESS:\n\t\t\t\t\treturn EShapeActionValueChangeColorBrightness.deserialize(\n\t\t\t\t\t\tserialized as any,\n\t\t\t\t\t\tmanager\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase EShapeActionValueType.CHANGE_TEXT:\n\t\t\treturn EShapeActionValueChangeText.deserialize(serialized as any, manager);\n\t\tcase EShapeActionValueType.CHANGE_CURSOR:\n\t\t\treturn EShapeActionValueChangeCursor.deserialize(serialized as any, manager);\n\t\tcase EShapeActionValueType.EMIT_EVENT:\n\t\t\treturn EShapeActionValueEmitEvent.deserialize(serialized as any, manager);\n\t\tcase EShapeActionValueType.OPEN:\n\t\t\tswitch (serialized[2]) {\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_TEXT:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_INTEGER:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_REAL:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_BOOLEAN:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_DATE:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_TIME:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG_DATETIME:\n\t\t\t\tcase EShapeActionValueOpenType.DIALOG:\n\t\t\t\t\tif (EShapeActionValueOpenDialogType.EXTENSION <= serialized[6]) {\n\t\t\t\t\t\treturn EShapeActionValueOpenDialogExtension.deserialize(\n\t\t\t\t\t\t\tserialized as any,\n\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn EShapeActionValueOpenDialog.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueOpenType.DIAGRAM_LEGACY:\n\t\t\t\tcase EShapeActionValueOpenType.PAGE_LEGACY:\n\t\t\t\tcase EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:\n\t\t\t\tcase EShapeActionValueOpenType.DIAGRAM:\n\t\t\t\tcase EShapeActionValueOpenType.PAGE:\n\t\t\t\t\treturn EShapeActionValueOpen.deserialize(serialized as any, manager);\n\t\t\t\tdefault:\n\t\t\t\t\tif (EShapeActionValueOpenType.EXTENSION <= serialized[2]) {\n\t\t\t\t\t\treturn EShapeActionValueOpenExtension.deserialize(\n\t\t\t\t\t\t\tserialized as any,\n\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase EShapeActionValueType.TRANSFORM:\n\t\t\tswitch (serialized[2]) {\n\t\t\t\tcase EShapeActionValueTransformType.MOVE:\n\t\t\t\t\treturn EShapeActionValueTransformMove.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueTransformType.RESIZE:\n\t\t\t\t\treturn EShapeActionValueTransformResize.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueTransformType.ROTATE:\n\t\t\t\t\treturn EShapeActionValueTransformRotate.deserialize(serialized as any, manager);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase EShapeActionValueType.GESTURE:\n\t\t\treturn EShapeActionValueGesture.deserialize(serialized as any, manager);\n\t\tcase EShapeActionValueType.MISC:\n\t\t\tswitch (serialized[2]) {\n\t\t\t\tcase EShapeActionValueMiscType.GESTURE:\n\t\t\t\t\treturn EShapeActionValueGesture.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueMiscType.SHOW_HIDE_LAYER:\n\t\t\t\t\treturn EShapeActionValueShowHideLayer.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueMiscType.GESTURE_LAYER:\n\t\t\t\t\treturn EShapeActionValueGesture.deserialize(serialized as any, manager);\n\t\t\t\tcase EShapeActionValueMiscType.EXECUTE:\n\t\t\t\t\treturn EShapeActionValueMiscExecute.deserialize(serialized as any, manager);\n\t\t\t\tdefault:\n\t\t\t\t\tif (EShapeActionValueMiscType.EXTENSION <= serialized[2]) {\n\t\t\t\t\t\treturn EShapeActionValueMiscExtension.deserialize(\n\t\t\t\t\t\t\tserialized as any,\n\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn EShapeActionValueMisc.deserialize(serialized as any, manager);\n\t\t\t\t\t}\n\t\t\t}\n\t}\n\treturn null;\n};\n"]}
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Copyright (C) 2019 Toshiba Corporation
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=e-shape-action-misc-extension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e-shape-action-misc-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-misc-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagram } from \"../../d-diagram\";\nimport { EShape } from \"../e-shape\";\n\nexport type EShapeActionMiscExtensionExecutor = (\n\tparameter: unknown,\n\tshape: EShape,\n\tdiagram: DDiagram\n) => void;\n\nexport interface EShapeActionMiscExtension {\n\ttype: number;\n\tlabel: string;\n\texecutor: EShapeActionMiscExtensionExecutor;\n}\n"]}
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (C) 2019 Toshiba Corporation
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ var EShapeActionMiscExtensions = /** @class */ (function () {
6
+ function EShapeActionMiscExtensions() {
7
+ }
8
+ EShapeActionMiscExtensions.add = function (extension) {
9
+ var _a, _b;
10
+ ((_a = this._typeToDatum) !== null && _a !== void 0 ? _a : (this._typeToDatum = new Map())).set(extension.type, extension);
11
+ ((_b = this._data) !== null && _b !== void 0 ? _b : (this._data = [])).push(extension);
12
+ };
13
+ EShapeActionMiscExtensions.get = function (type) {
14
+ var typeToDatum = this._typeToDatum;
15
+ if (typeToDatum != null) {
16
+ return typeToDatum.get(type);
17
+ }
18
+ };
19
+ EShapeActionMiscExtensions.each = function (iteratee) {
20
+ var data = this._data;
21
+ if (data != null) {
22
+ for (var i = 0, imax = data.length; i < imax; ++i) {
23
+ iteratee(data[i]);
24
+ }
25
+ }
26
+ };
27
+ return EShapeActionMiscExtensions;
28
+ }());
29
+ export { EShapeActionMiscExtensions };
30
+ //# sourceMappingURL=e-shape-action-misc-extensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e-shape-action-misc-extensions.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-misc-extensions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;IAAA;IA2BA,CAAC;IAvBO,8BAAG,GAAV,UAAW,SAAoC;;QAC9C,OAAC,IAAI,CAAC,YAAY,oCAAjB,IAAI,CAAC,YAAY,GAAK,IAAI,GAAG,EAAqC,EAAC,CAAC,GAAG,CACvE,SAAS,CAAC,IAAI,EACd,SAAS,CACT,CAAC;QACF,OAAC,IAAI,CAAC,KAAK,oCAAV,IAAI,CAAC,KAAK,GAAK,EAAE,EAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACrC,CAAC;IAEM,8BAAG,GAAV,UAAW,IAAY;QACtB,IAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,WAAW,IAAI,IAAI,EAAE;YACxB,OAAO,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SAC7B;IACF,CAAC;IAEM,+BAAI,GAAX,UAAY,QAAwD;QACnE,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,IAAI,IAAI,IAAI,EAAE;YACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;gBAClD,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;aAClB;SACD;IACF,CAAC;IACF,iCAAC;AAAD,CAAC,AA3BD,IA2BC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeActionMiscExtension } from \"./e-shape-action-misc-extension\";\n\nexport class EShapeActionMiscExtensions {\n\tprotected static _data?: EShapeActionMiscExtension[];\n\tprotected static _typeToDatum?: Map<number, EShapeActionMiscExtension>;\n\n\tstatic add(extension: EShapeActionMiscExtension): void {\n\t\t(this._typeToDatum ??= new Map<number, EShapeActionMiscExtension>()).set(\n\t\t\textension.type,\n\t\t\textension\n\t\t);\n\t\t(this._data ??= []).push(extension);\n\t}\n\n\tstatic get(type: number): EShapeActionMiscExtension | undefined {\n\t\tconst typeToDatum = this._typeToDatum;\n\t\tif (typeToDatum != null) {\n\t\t\treturn typeToDatum.get(type);\n\t\t}\n\t}\n\n\tstatic each(iteratee: (extension: EShapeActionMiscExtension) => void): void {\n\t\tconst data = this._data;\n\t\tif (data != null) {\n\t\t\tfor (let i = 0, imax = data.length; i < imax; ++i) {\n\t\t\t\titeratee(data[i]);\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-action-open-opener.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-opener.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\n\nexport type EShapeActionOpenOpener = (target: unknown, inNewWindow: boolean, shape: EShape) => void;\n"]}
1
+ {"version":3,"file":"e-shape-action-open-opener.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-opener.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagram } from \"../../d-diagram\";\nimport { EShape } from \"../e-shape\";\n\nexport type EShapeActionOpenOpener = (\n\ttarget: unknown,\n\tinNewWindow: boolean,\n\tshape: EShape,\n\tdiagram: DDiagram\n) => void;\n"]}
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Copyright (C) 2019 Toshiba Corporation
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { __extends } from "tslib";
6
+ import { EShapeRuntimeReset } from "../e-shape-runtime-reset";
7
+ import { EShapeActionEnvironment } from "./e-shape-action-environment";
8
+ import { EShapeActionExpressions } from "./e-shape-action-expressions";
9
+ import { EShapeActionMiscExtensions } from "./e-shape-action-misc-extensions";
10
+ import { EShapeActionRuntimeConditional } from "./e-shape-action-runtime-conditional";
11
+ import { EShapeActions } from "./e-shape-actions";
12
+ var EShapeActionRuntimeMiscExtension = /** @class */ (function (_super) {
13
+ __extends(EShapeActionRuntimeMiscExtension, _super);
14
+ function EShapeActionRuntimeMiscExtension(value) {
15
+ var _this = _super.call(this, value, EShapeRuntimeReset.NONE) || this;
16
+ _this.parameter = EShapeActionExpressions.ofUnknown(value.parameter);
17
+ _this.extension = EShapeActionMiscExtensions.get(value.subtype);
18
+ return _this;
19
+ }
20
+ EShapeActionRuntimeMiscExtension.prototype.execute = function (shape, runtime, time) {
21
+ var extension = this.extension;
22
+ if (extension != null && this.condition(shape, time, EShapeActionEnvironment)) {
23
+ var diagram = EShapeActions.toDiagram(shape);
24
+ if (diagram != null) {
25
+ extension.executor(this.parameter(shape, time, EShapeActionEnvironment), shape, diagram);
26
+ }
27
+ }
28
+ };
29
+ return EShapeActionRuntimeMiscExtension;
30
+ }(EShapeActionRuntimeConditional));
31
+ export { EShapeActionRuntimeMiscExtension };
32
+ //# sourceMappingURL=e-shape-action-runtime-misc-extension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e-shape-action-runtime-misc-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;IAAsD,oDAA8B;IAInF,0CAAY,KAAqC;QAAjD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,SAGrC;QAFA,KAAI,CAAC,SAAS,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpE,KAAI,CAAC,SAAS,GAAG,0BAA0B,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;;IAChE,CAAC;IAED,kDAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;YAC9E,IAAM,OAAO,GAAG,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC/C,IAAI,OAAO,IAAI,IAAI,EAAE;gBACpB,SAAS,CAAC,QAAQ,CACjB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EACpD,KAAK,EACL,OAAO,CACP,CAAC;aACF;SACD;IACF,CAAC;IACF,uCAAC;AAAD,CAAC,AAvBD,CAAsD,8BAA8B,GAuBnF","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime } from \"../e-shape-runtime\";\nimport { EShapeRuntimeReset } from \"../e-shape-runtime-reset\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\nimport { EShapeActionExpression } from \"./e-shape-action-expression\";\nimport { EShapeActionExpressions } from \"./e-shape-action-expressions\";\nimport { EShapeActionMiscExtension } from \"./e-shape-action-misc-extension\";\nimport { EShapeActionMiscExtensions } from \"./e-shape-action-misc-extensions\";\nimport { EShapeActionRuntimeConditional } from \"./e-shape-action-runtime-conditional\";\nimport { EShapeActionValueMiscExtension } from \"./e-shape-action-value-misc-extension\";\nimport { EShapeActions } from \"./e-shape-actions\";\n\nexport class EShapeActionRuntimeMiscExtension extends EShapeActionRuntimeConditional {\n\tprotected extension?: EShapeActionMiscExtension;\n\tprotected parameter: EShapeActionExpression<unknown>;\n\n\tconstructor(value: EShapeActionValueMiscExtension) {\n\t\tsuper(value, EShapeRuntimeReset.NONE);\n\t\tthis.parameter = EShapeActionExpressions.ofUnknown(value.parameter);\n\t\tthis.extension = EShapeActionMiscExtensions.get(value.subtype);\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tconst extension = this.extension;\n\t\tif (extension != null && this.condition(shape, time, EShapeActionEnvironment)) {\n\t\t\tconst diagram = EShapeActions.toDiagram(shape);\n\t\t\tif (diagram != null) {\n\t\t\t\textension.executor(\n\t\t\t\t\tthis.parameter(shape, time, EShapeActionEnvironment),\n\t\t\t\t\tshape,\n\t\t\t\t\tdiagram\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
@@ -111,8 +111,8 @@ var EShapeActionRuntimeMiscHtmlElementBase = /** @class */ (function (_super) {
111
111
  return shape.transform.worldTransform;
112
112
  };
113
113
  EShapeActionRuntimeMiscHtmlElementBase.prototype.getClipperToRect = function (shape, runtime, resolution, point, result) {
114
- var container = EShapeActions.toContainer(shape);
115
- return UtilHtmlElement.getClipperRect(container, shape, resolution, point, result);
114
+ var diagram = EShapeActions.toDiagram(shape);
115
+ return UtilHtmlElement.getClipperRect(diagram, shape, resolution, point, result);
116
116
  };
117
117
  EShapeActionRuntimeMiscHtmlElementBase.prototype.getClipperExRects = function (shape, result) {
118
118
  result.begin();
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-action-runtime-misc-html-element-base.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-misc-html-element-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAgD,KAAK,EAAuB,MAAM,SAAS,CAAC;AACnG,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EACN,eAAe,EAKf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAIxE,OAAO,EAAE,uBAA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,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED,uDAAM,GAAN,UAAO,KAAa,EAAE,OAAsB,EAAE,CAAmC;QAChF,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC;IAED,2DAAU,GAAV,UACC,KAAa,EACb,OAAsB,EACtB,CAA0B,EAC1B,kBAAsC;QAEtC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC;IAChE,CAAC;IACF,6CAAC;AAAD,CAAC,AAzND,CAGU,uBAAuB,GAsNhC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { InteractionEvent, InteractionManager, Matrix, Point, Rectangle, Renderer } from \"pixi.js\";\nimport { DThemes } from \"../../theme/d-themes\";\nimport {\n\tUtilHtmlElement,\n\tUtilHtmlElementCreator,\n\tUtilHtmlElementOperation,\n\tUtilHtmlElementOptions,\n\tUtilHtmlElementPadding\n} from \"../../util/util-html-element\";\nimport { UtilHtmlElementWhen } from \"../../util/util-html-element-when\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime } from \"../e-shape-runtime\";\nimport { EShapeActionExpression } from \"./e-shape-action-expression\";\nimport { EShapeActionExpressions } from \"./e-shape-action-expressions\";\nimport { EShapeActions } from \"./e-shape-actions\";\nimport { EShapeActionValueMisc } from \"./e-shape-action-value-misc\";\nimport { UtilHtmlElementClipperExRects } from \"../../util/util-html-element-clipper-ex-rects\";\nimport { EShapeContainer } from \"../e-shape-container\";\nimport { DDiagramLayer } from \"../../d-diagram-layer\";\nimport { isShapeClipperExLoaded } from \"../load/load-shape-clipper-ex\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\nimport { EShapeActionRuntimeBase } from \"./e-shape-action-runtime-base\";\n\nexport abstract class EShapeActionRuntimeMiscHtmlElementBase<\n\tELEMENT extends HTMLElement = HTMLElement,\n\tUTIL extends UtilHtmlElement<ELEMENT> = UtilHtmlElement<ELEMENT>\n> extends EShapeActionRuntimeBase {\n\tprotected static WORK?: Point;\n\tprotected readonly condition: EShapeActionExpression<string | null>;\n\tprotected utils: Map<EShape, UTIL>;\n\n\tconstructor(value: EShapeActionValueMisc) {\n\t\tsuper();\n\t\tthis.condition = EShapeActionExpressions.ofString(value.condition);\n\t\tthis.utils = new Map<EShape, UTIL>();\n\t}\n\n\tprotected getUtil(shape: EShape, runtime: EShapeRuntime): UTIL {\n\t\tconst utils = this.utils;\n\t\tlet result = utils.get(shape);\n\t\tif (result == null) {\n\t\t\tresult = this.newUtil(shape, runtime);\n\t\t\tutils.set(shape, result);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newUtil(shape: EShape, runtime: EShapeRuntime): UTIL {\n\t\treturn new UtilHtmlElement<ELEMENT>(\n\t\t\tshape,\n\t\t\tthis.newOperation(shape, runtime),\n\t\t\tDThemes.getInstance().get(\"DHtmlElement\"),\n\t\t\tthis.newUtilOptions(shape, runtime)\n\t\t) as any;\n\t}\n\n\tprotected newOperation(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime\n\t): UtilHtmlElementOperation<ELEMENT> {\n\t\treturn {\n\t\t\tgetElementRect: (\n\t\t\t\tresolution: number,\n\t\t\t\twork: Point,\n\t\t\t\tresult: Rectangle\n\t\t\t): Rectangle | null => {\n\t\t\t\treturn this.getElementRect(shape, runtime, resolution, work, result);\n\t\t\t},\n\n\t\t\tgetElementMatrix: (): Matrix | null => {\n\t\t\t\treturn this.getElementMatrix(shape, runtime);\n\t\t\t},\n\n\t\t\tgetClipperRect: (\n\t\t\t\tresolution: number,\n\t\t\t\twork: Point,\n\t\t\t\tresult: Rectangle\n\t\t\t): Rectangle | null => {\n\t\t\t\treturn this.getClipperToRect(shape, runtime, resolution, work, result);\n\t\t\t},\n\n\t\t\tgetClipperExRects: (result: UtilHtmlElementClipperExRects): void => {\n\t\t\t\tthis.getClipperExRects(shape, result);\n\t\t\t},\n\n\t\t\tgetPadding: (): UtilHtmlElementPadding | null => {\n\t\t\t\treturn this.getPadding(shape, runtime);\n\t\t\t},\n\n\t\t\tcontainsPoint: (point: Point): boolean => {\n\t\t\t\treturn this.containsPoint(shape, runtime, point);\n\t\t\t},\n\n\t\t\tonStart: (): void => {\n\t\t\t\t// DO NOTHING\n\t\t\t},\n\n\t\t\tonCancel: (): void => {\n\t\t\t\t// DO NOTHING\n\t\t\t},\n\n\t\t\tonEnd: (): void => {\n\t\t\t\t// DO NOTHING\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected newUtilOptions(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime\n\t): UtilHtmlElementOptions<ELEMENT> {\n\t\treturn {\n\t\t\telement: {\n\t\t\t\tcreator: this.newElementCreator(shape, runtime)\n\t\t\t},\n\t\t\twhen: this.toWhen(shape, runtime),\n\t\t\tclipper: {\n\t\t\t\textended: isShapeClipperExLoaded()\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected abstract newElementCreator(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime\n\t): UtilHtmlElementCreator<ELEMENT> | undefined;\n\n\tprotected toWhen(shape: EShape, runtime: EShapeRuntime): UtilHtmlElementWhen | undefined {\n\t\tconst value = this.condition(shape, Date.now(), EShapeActionEnvironment);\n\t\tif (value != null && value in UtilHtmlElementWhen) {\n\t\t\treturn UtilHtmlElementWhen[value as keyof typeof UtilHtmlElementWhen];\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprotected containsPoint(shape: EShape, runtime: EShapeRuntime, point: Point): boolean {\n\t\tif (shape.visible) {\n\t\t\tconst local = (EShapeActionRuntimeMiscHtmlElementBase.WORK ??= new Point());\n\t\t\tshape.toLocal(point, undefined, local);\n\t\t\treturn shape.contains(local.x, local.y) != null;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected getPadding(shape: EShape, runtime: EShapeRuntime): UtilHtmlElementPadding | null {\n\t\treturn null;\n\t}\n\n\tprotected getElementRect(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime,\n\t\tresolution: number,\n\t\tpoint: Point,\n\t\tresult: Rectangle\n\t): Rectangle | null {\n\t\tconst pivot = shape.transform.pivot;\n\t\tconst size = shape.size;\n\t\tconst sizeX = size.x;\n\t\tconst sizeY = size.y;\n\t\tresult.x = -0.5 * sizeX + pivot.x;\n\t\tresult.y = -0.5 * sizeY + pivot.y;\n\t\tresult.width = sizeX;\n\t\tresult.height = sizeY;\n\t\treturn result;\n\t}\n\n\tprotected getElementMatrix(shape: EShape, runtime: EShapeRuntime): Matrix | null {\n\t\tshape.updateTransform();\n\t\treturn shape.transform.worldTransform;\n\t}\n\n\tprotected getClipperToRect(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime,\n\t\tresolution: number,\n\t\tpoint: Point,\n\t\tresult: Rectangle\n\t): Rectangle | null {\n\t\tconst container = EShapeActions.toContainer(shape);\n\t\treturn UtilHtmlElement.getClipperRect(container, shape, resolution, point, result);\n\t}\n\n\tprotected getClipperExRects(shape: EShape, result: UtilHtmlElementClipperExRects): void {\n\t\tresult.begin();\n\t\tconst target = shape.root.parent as EShapeContainer | null;\n\t\tif (target instanceof DDiagramLayer) {\n\t\t\tconst layerContainer = target.parent;\n\t\t\tif (layerContainer != null) {\n\t\t\t\tconst layers = layerContainer.children as DDiagramLayer[];\n\t\t\t\tconst index = layers.indexOf(target);\n\t\t\t\tif (0 <= index) {\n\t\t\t\t\tfor (let i = index + 1, imax = layers.length; i < imax; ++i) {\n\t\t\t\t\t\tconst layer = layers[i];\n\t\t\t\t\t\tif (layer.visible) {\n\t\t\t\t\t\t\tconst w = layer.width;\n\t\t\t\t\t\t\tconst h = layer.height;\n\t\t\t\t\t\t\tconst t = layer.transform.worldTransform;\n\t\t\t\t\t\t\tconst a = t.a;\n\t\t\t\t\t\t\tconst b = t.b;\n\t\t\t\t\t\t\tconst c = t.c;\n\t\t\t\t\t\t\tconst d = t.d;\n\t\t\t\t\t\t\tconst tx = t.tx;\n\t\t\t\t\t\t\tconst ty = t.ty;\n\t\t\t\t\t\t\tresult.add(tx, ty, a * w + c * h + tx, b * w + d * h + ty);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tresult.end();\n\t}\n\n\tonRender(shape: EShape, runtime: EShapeRuntime, time: number, renderer: Renderer): void {\n\t\tthis.getUtil(shape, runtime).onRender(renderer);\n\t}\n\n\tonFocus(shape: EShape, runtime: EShapeRuntime): void {\n\t\tthis.getUtil(shape, runtime).onFocus();\n\t}\n\n\tonBlur(shape: EShape, runtime: EShapeRuntime): void {\n\t\tthis.getUtil(shape, runtime).onBlur();\n\t}\n\n\tonDowning(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void {\n\t\tthis.getUtil(shape, runtime).onDowning(e);\n\t}\n\n\tonDown(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void {\n\t\tthis.getUtil(shape, runtime).onDown(e);\n\t}\n\n\tonDblClick(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime,\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): void {\n\t\tthis.getUtil(shape, runtime).onDblClick(e, interactionManager);\n\t}\n}\n"]}
1
+ {"version":3,"file":"e-shape-action-runtime-misc-html-element-base.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-misc-html-element-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAgD,KAAK,EAAuB,MAAM,SAAS,CAAC;AACnG,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EACN,eAAe,EAKf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAIxE,OAAO,EAAE,uBAAuB,E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AC,CAAC,CAAC;IAC3C,CAAC;IAED,uDAAM,GAAN,UAAO,KAAa,EAAE,OAAsB,EAAE,CAAmC;QAChF,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC;IAED,2DAAU,GAAV,UACC,KAAa,EACb,OAAsB,EACtB,CAA0B,EAC1B,kBAAsC;QAEtC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC;IAChE,CAAC;IACF,6CAAC;AAAD,CAAC,AAzND,CAGU,uBAAuB,GAsNhC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { InteractionEvent, InteractionManager, Matrix, Point, Rectangle, Renderer } from \"pixi.js\";\nimport { DThemes } from \"../../theme/d-themes\";\nimport {\n\tUtilHtmlElement,\n\tUtilHtmlElementCreator,\n\tUtilHtmlElementOperation,\n\tUtilHtmlElementOptions,\n\tUtilHtmlElementPadding\n} from \"../../util/util-html-element\";\nimport { UtilHtmlElementWhen } from \"../../util/util-html-element-when\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime } from \"../e-shape-runtime\";\nimport { EShapeActionExpression } from \"./e-shape-action-expression\";\nimport { EShapeActionExpressions } from \"./e-shape-action-expressions\";\nimport { EShapeActions } from \"./e-shape-actions\";\nimport { EShapeActionValueMisc } from \"./e-shape-action-value-misc\";\nimport { UtilHtmlElementClipperExRects } from \"../../util/util-html-element-clipper-ex-rects\";\nimport { EShapeContainer } from \"../e-shape-container\";\nimport { DDiagramLayer } from \"../../d-diagram-layer\";\nimport { isShapeClipperExLoaded } from \"../load/load-shape-clipper-ex\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\nimport { EShapeActionRuntimeBase } from \"./e-shape-action-runtime-base\";\n\nexport abstract class EShapeActionRuntimeMiscHtmlElementBase<\n\tELEMENT extends HTMLElement = HTMLElement,\n\tUTIL extends UtilHtmlElement<ELEMENT> = UtilHtmlElement<ELEMENT>\n> extends EShapeActionRuntimeBase {\n\tprotected static WORK?: Point;\n\tprotected readonly condition: EShapeActionExpression<string | null>;\n\tprotected utils: Map<EShape, UTIL>;\n\n\tconstructor(value: EShapeActionValueMisc) {\n\t\tsuper();\n\t\tthis.condition = EShapeActionExpressions.ofString(value.condition);\n\t\tthis.utils = new Map<EShape, UTIL>();\n\t}\n\n\tprotected getUtil(shape: EShape, runtime: EShapeRuntime): UTIL {\n\t\tconst utils = this.utils;\n\t\tlet result = utils.get(shape);\n\t\tif (result == null) {\n\t\t\tresult = this.newUtil(shape, runtime);\n\t\t\tutils.set(shape, result);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newUtil(shape: EShape, runtime: EShapeRuntime): UTIL {\n\t\treturn new UtilHtmlElement<ELEMENT>(\n\t\t\tshape,\n\t\t\tthis.newOperation(shape, runtime),\n\t\t\tDThemes.getInstance().get(\"DHtmlElement\"),\n\t\t\tthis.newUtilOptions(shape, runtime)\n\t\t) as any;\n\t}\n\n\tprotected newOperation(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime\n\t): UtilHtmlElementOperation<ELEMENT> {\n\t\treturn {\n\t\t\tgetElementRect: (\n\t\t\t\tresolution: number,\n\t\t\t\twork: Point,\n\t\t\t\tresult: Rectangle\n\t\t\t): Rectangle | null => {\n\t\t\t\treturn this.getElementRect(shape, runtime, resolution, work, result);\n\t\t\t},\n\n\t\t\tgetElementMatrix: (): Matrix | null => {\n\t\t\t\treturn this.getElementMatrix(shape, runtime);\n\t\t\t},\n\n\t\t\tgetClipperRect: (\n\t\t\t\tresolution: number,\n\t\t\t\twork: Point,\n\t\t\t\tresult: Rectangle\n\t\t\t): Rectangle | null => {\n\t\t\t\treturn this.getClipperToRect(shape, runtime, resolution, work, result);\n\t\t\t},\n\n\t\t\tgetClipperExRects: (result: UtilHtmlElementClipperExRects): void => {\n\t\t\t\tthis.getClipperExRects(shape, result);\n\t\t\t},\n\n\t\t\tgetPadding: (): UtilHtmlElementPadding | null => {\n\t\t\t\treturn this.getPadding(shape, runtime);\n\t\t\t},\n\n\t\t\tcontainsPoint: (point: Point): boolean => {\n\t\t\t\treturn this.containsPoint(shape, runtime, point);\n\t\t\t},\n\n\t\t\tonStart: (): void => {\n\t\t\t\t// DO NOTHING\n\t\t\t},\n\n\t\t\tonCancel: (): void => {\n\t\t\t\t// DO NOTHING\n\t\t\t},\n\n\t\t\tonEnd: (): void => {\n\t\t\t\t// DO NOTHING\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected newUtilOptions(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime\n\t): UtilHtmlElementOptions<ELEMENT> {\n\t\treturn {\n\t\t\telement: {\n\t\t\t\tcreator: this.newElementCreator(shape, runtime)\n\t\t\t},\n\t\t\twhen: this.toWhen(shape, runtime),\n\t\t\tclipper: {\n\t\t\t\textended: isShapeClipperExLoaded()\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected abstract newElementCreator(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime\n\t): UtilHtmlElementCreator<ELEMENT> | undefined;\n\n\tprotected toWhen(shape: EShape, runtime: EShapeRuntime): UtilHtmlElementWhen | undefined {\n\t\tconst value = this.condition(shape, Date.now(), EShapeActionEnvironment);\n\t\tif (value != null && value in UtilHtmlElementWhen) {\n\t\t\treturn UtilHtmlElementWhen[value as keyof typeof UtilHtmlElementWhen];\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprotected containsPoint(shape: EShape, runtime: EShapeRuntime, point: Point): boolean {\n\t\tif (shape.visible) {\n\t\t\tconst local = (EShapeActionRuntimeMiscHtmlElementBase.WORK ??= new Point());\n\t\t\tshape.toLocal(point, undefined, local);\n\t\t\treturn shape.contains(local.x, local.y) != null;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected getPadding(shape: EShape, runtime: EShapeRuntime): UtilHtmlElementPadding | null {\n\t\treturn null;\n\t}\n\n\tprotected getElementRect(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime,\n\t\tresolution: number,\n\t\tpoint: Point,\n\t\tresult: Rectangle\n\t): Rectangle | null {\n\t\tconst pivot = shape.transform.pivot;\n\t\tconst size = shape.size;\n\t\tconst sizeX = size.x;\n\t\tconst sizeY = size.y;\n\t\tresult.x = -0.5 * sizeX + pivot.x;\n\t\tresult.y = -0.5 * sizeY + pivot.y;\n\t\tresult.width = sizeX;\n\t\tresult.height = sizeY;\n\t\treturn result;\n\t}\n\n\tprotected getElementMatrix(shape: EShape, runtime: EShapeRuntime): Matrix | null {\n\t\tshape.updateTransform();\n\t\treturn shape.transform.worldTransform;\n\t}\n\n\tprotected getClipperToRect(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime,\n\t\tresolution: number,\n\t\tpoint: Point,\n\t\tresult: Rectangle\n\t): Rectangle | null {\n\t\tconst diagram = EShapeActions.toDiagram(shape);\n\t\treturn UtilHtmlElement.getClipperRect(diagram, shape, resolution, point, result);\n\t}\n\n\tprotected getClipperExRects(shape: EShape, result: UtilHtmlElementClipperExRects): void {\n\t\tresult.begin();\n\t\tconst target = shape.root.parent as EShapeContainer | null;\n\t\tif (target instanceof DDiagramLayer) {\n\t\t\tconst layerContainer = target.parent;\n\t\t\tif (layerContainer != null) {\n\t\t\t\tconst layers = layerContainer.children as DDiagramLayer[];\n\t\t\t\tconst index = layers.indexOf(target);\n\t\t\t\tif (0 <= index) {\n\t\t\t\t\tfor (let i = index + 1, imax = layers.length; i < imax; ++i) {\n\t\t\t\t\t\tconst layer = layers[i];\n\t\t\t\t\t\tif (layer.visible) {\n\t\t\t\t\t\t\tconst w = layer.width;\n\t\t\t\t\t\t\tconst h = layer.height;\n\t\t\t\t\t\t\tconst t = layer.transform.worldTransform;\n\t\t\t\t\t\t\tconst a = t.a;\n\t\t\t\t\t\t\tconst b = t.b;\n\t\t\t\t\t\t\tconst c = t.c;\n\t\t\t\t\t\t\tconst d = t.d;\n\t\t\t\t\t\t\tconst tx = t.tx;\n\t\t\t\t\t\t\tconst ty = t.ty;\n\t\t\t\t\t\t\tresult.add(tx, ty, a * w + c * h + tx, b * w + d * h + ty);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tresult.end();\n\t}\n\n\tonRender(shape: EShape, runtime: EShapeRuntime, time: number, renderer: Renderer): void {\n\t\tthis.getUtil(shape, runtime).onRender(renderer);\n\t}\n\n\tonFocus(shape: EShape, runtime: EShapeRuntime): void {\n\t\tthis.getUtil(shape, runtime).onFocus();\n\t}\n\n\tonBlur(shape: EShape, runtime: EShapeRuntime): void {\n\t\tthis.getUtil(shape, runtime).onBlur();\n\t}\n\n\tonDowning(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void {\n\t\tthis.getUtil(shape, runtime).onDowning(e);\n\t}\n\n\tonDown(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void {\n\t\tthis.getUtil(shape, runtime).onDown(e);\n\t}\n\n\tonDblClick(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime,\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): void {\n\t\tthis.getUtil(shape, runtime).onDblClick(e, interactionManager);\n\t}\n}\n"]}
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Copyright (C) 2019 Toshiba Corporation
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { __extends } from "tslib";
6
+ import { EShapeActionRuntimeMiscExtension } from "./e-shape-action-runtime-misc-extension";
7
+ import { EShapeActionValueSubtyped } from "./e-shape-action-value-subtyped";
8
+ import { EShapeActionValueType } from "./e-shape-action-value-type";
9
+ import { EShapeActionValues } from "./e-shape-action-values";
10
+ var EShapeActionValueMiscExtension = /** @class */ (function (_super) {
11
+ __extends(EShapeActionValueMiscExtension, _super);
12
+ function EShapeActionValueMiscExtension(subtype, condition, parameter) {
13
+ var _this = _super.call(this, EShapeActionValueType.MISC, condition, subtype) || this;
14
+ _this.parameter = parameter;
15
+ return _this;
16
+ }
17
+ EShapeActionValueMiscExtension.prototype.toRuntime = function () {
18
+ return new EShapeActionRuntimeMiscExtension(this);
19
+ };
20
+ EShapeActionValueMiscExtension.prototype.serialize = function (manager) {
21
+ var conditionId = manager.addResource(this.condition);
22
+ var parameterId = manager.addResource(this.parameter);
23
+ return manager.addResource("[".concat(this.type, ",").concat(conditionId, ",").concat(this.subtype, ",").concat(parameterId, "]"));
24
+ };
25
+ EShapeActionValueMiscExtension.deserialize = function (serialized, manager) {
26
+ var resources = manager.resources;
27
+ var condition = EShapeActionValues.toResource(1, serialized, resources);
28
+ var parameter = EShapeActionValues.toResource(3, serialized, resources);
29
+ return new EShapeActionValueMiscExtension(serialized[2], condition, parameter);
30
+ };
31
+ return EShapeActionValueMiscExtension;
32
+ }(EShapeActionValueSubtyped));
33
+ export { EShapeActionValueMiscExtension };
34
+ //# sourceMappingURL=e-shape-action-value-misc-extension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e-shape-action-value-misc-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-value-misc-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAKH,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAW7D;IAAoD,kDAAgE;IAGnH,wCACC,OAA8C,EAC9C,SAAiB,EACjB,SAAiB;QAHlB,YAKC,kBAAM,qBAAqB,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,SAErD;QADA,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC5B,CAAC;IAED,kDAAS,GAAT;QACC,OAAO,IAAI,gCAAgC,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IAED,kDAAS,GAAT,UAAU,OAA2C;QACpD,IAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACxD,IAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACxD,OAAO,OAAO,CAAC,WAAW,CAAC,WAAI,IAAI,CAAC,IAAI,cAAI,WAAW,cAAI,IAAI,CAAC,OAAO,cAAI,WAAW,MAAG,CAAC,CAAC;IAC5F,CAAC;IAEM,0CAAW,GAAlB,UACC,UAAoD,EACpD,OAA6C;QAE7C,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACpC,IAAM,SAAS,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QAC1E,IAAM,SAAS,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QAC1E,OAAO,IAAI,8BAA8B,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAChF,CAAC;IACF,qCAAC;AAAD,CAAC,AA/BD,CAAoD,yBAAyB,GA+B5E","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerSerialization } from \"../e-shape-resource-manager-serialization\";\nimport { EShapeActionRuntime } from \"./e-shape-action-runtime\";\nimport { EShapeActionRuntimeMiscExtension } from \"./e-shape-action-runtime-misc-extension\";\nimport { EShapeActionValueSubtyped } from \"./e-shape-action-value-subtyped\";\nimport { EShapeActionValueType } from \"./e-shape-action-value-type\";\nimport { EShapeActionValues } from \"./e-shape-action-values\";\n\nexport type EShapeActionValueMiscExtensionSubtype = number;\n\nexport type EShapeActionValueMiscExtensionSerialized = [\n\ttypeof EShapeActionValueType.MISC,\n\tnumber,\n\tEShapeActionValueMiscExtensionSubtype,\n\tnumber\n];\n\nexport class EShapeActionValueMiscExtension extends EShapeActionValueSubtyped<EShapeActionValueMiscExtensionSubtype> {\n\treadonly parameter: string;\n\n\tconstructor(\n\t\tsubtype: EShapeActionValueMiscExtensionSubtype,\n\t\tcondition: string,\n\t\tparameter: string\n\t) {\n\t\tsuper(EShapeActionValueType.MISC, condition, subtype);\n\t\tthis.parameter = parameter;\n\t}\n\n\ttoRuntime(): EShapeActionRuntime {\n\t\treturn new EShapeActionRuntimeMiscExtension(this);\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): number {\n\t\tconst conditionId = manager.addResource(this.condition);\n\t\tconst parameterId = manager.addResource(this.parameter);\n\t\treturn manager.addResource(`[${this.type},${conditionId},${this.subtype},${parameterId}]`);\n\t}\n\n\tstatic deserialize(\n\t\tserialized: EShapeActionValueMiscExtensionSerialized,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): EShapeActionValueMiscExtension {\n\t\tconst resources = manager.resources;\n\t\tconst condition = EShapeActionValues.toResource(1, serialized, resources);\n\t\tconst parameter = EShapeActionValues.toResource(3, serialized, resources);\n\t\treturn new EShapeActionValueMiscExtension(serialized[2], condition, parameter);\n\t}\n}\n"]}
@@ -18,6 +18,7 @@ export var EShapeActionValueMiscType = {
18
18
  GESTURE_LAYER: 10,
19
19
  /** @deprecated in favor of {@link EShapeActionValueType}'s GESTURE */
20
20
  GESTURE: 11,
21
- EXECUTE: 12
21
+ EXECUTE: 12,
22
+ EXTENSION: 1000
22
23
  };
23
24
  //# sourceMappingURL=e-shape-action-value-misc-type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-action-value-misc-type.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-value-misc-type.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,IAAM,yBAAyB,GAAG;IACxC,UAAU,EAAE,CAAC;IACb,aAAa,EAAE,CAAC;IAChB,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,CAAC;IACf,YAAY,EAAE,CAAC;IACf,mCAAmC,EAAE,CAAC;IACtC,4EAA4E;IAC5E,eAAe,EAAE,CAAC;IAClB,sEAAsE;IACtE,aAAa,EAAE,EAAE;IACjB,sEAAsE;IACtE,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;CACF,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport const EShapeActionValueMiscType = {\n\tINPUT_TEXT: 0,\n\tINPUT_INTEGER: 1,\n\tINPUT_REAL: 2,\n\tEMIT_EVENT: 3,\n\tWRITE_BOTH: 4,\n\tWRITE_LOCAL: 5,\n\tWRITE_REMOTE: 6,\n\tHTML_ELEMENT: 7,\n\tHTML_ELEMENT_WITHOUT_POINTER_EVENTS: 8,\n\t/** @deprecated in favor of {@link EShapeActionValueShowHideType}'s LAYER */\n\tSHOW_HIDE_LAYER: 9,\n\t/** @deprecated in favor of {@link EShapeActionValueType}'s GESTURE */\n\tGESTURE_LAYER: 10,\n\t/** @deprecated in favor of {@link EShapeActionValueType}'s GESTURE */\n\tGESTURE: 11,\n\tEXECUTE: 12\n} as const;\n\nexport type EShapeActionValueMiscType =\n\t(typeof EShapeActionValueMiscType)[keyof typeof EShapeActionValueMiscType];\n"]}
1
+ {"version":3,"file":"e-shape-action-value-misc-type.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-value-misc-type.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,IAAM,yBAAyB,GAAG;IACxC,UAAU,EAAE,CAAC;IACb,aAAa,EAAE,CAAC;IAChB,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,CAAC;IACf,YAAY,EAAE,CAAC;IACf,mCAAmC,EAAE,CAAC;IACtC,4EAA4E;IAC5E,eAAe,EAAE,CAAC;IAClB,sEAAsE;IACtE,aAAa,EAAE,EAAE;IACjB,sEAAsE;IACtE,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,IAAI;CACN,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport const EShapeActionValueMiscType = {\n\tINPUT_TEXT: 0,\n\tINPUT_INTEGER: 1,\n\tINPUT_REAL: 2,\n\tEMIT_EVENT: 3,\n\tWRITE_BOTH: 4,\n\tWRITE_LOCAL: 5,\n\tWRITE_REMOTE: 6,\n\tHTML_ELEMENT: 7,\n\tHTML_ELEMENT_WITHOUT_POINTER_EVENTS: 8,\n\t/** @deprecated in favor of {@link EShapeActionValueShowHideType}'s LAYER */\n\tSHOW_HIDE_LAYER: 9,\n\t/** @deprecated in favor of {@link EShapeActionValueType}'s GESTURE */\n\tGESTURE_LAYER: 10,\n\t/** @deprecated in favor of {@link EShapeActionValueType}'s GESTURE */\n\tGESTURE: 11,\n\tEXECUTE: 12,\n\tEXTENSION: 1000\n} as const;\n\nexport type EShapeActionValueMiscType =\n\t(typeof EShapeActionValueMiscType)[keyof typeof EShapeActionValueMiscType];\n"]}