@wcardinal/wcardinal-ui 0.437.0 → 0.439.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 (44) hide show
  1. package/dist/types/wcardinal/ui/d-diagram-serialized.d.ts +2 -2
  2. package/dist/types/wcardinal/ui/shape/action/e-shape-action-expression-with-parameter.d.ts +1 -1
  3. package/dist/types/wcardinal/ui/shape/action/e-shape-action-expression.d.ts +1 -1
  4. package/dist/types/wcardinal/ui/shape/action/e-shape-action-misc-extension.d.ts +7 -2
  5. package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-dialog-extension.d.ts +6 -1
  6. package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-dialog-opener.d.ts +2 -1
  7. package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-extension.d.ts +6 -1
  8. package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.d.ts +1 -1
  9. package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-misc-extension.d.ts +2 -2
  10. package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-misc-type.d.ts +1 -1
  11. package/dist/types/wcardinal/ui/util/util-extract.d.ts +13 -0
  12. package/dist/wcardinal/ui/d-diagram-serialized.js.map +1 -1
  13. package/dist/wcardinal/ui/shape/action/e-shape-action-expression-with-parameter.js.map +1 -1
  14. package/dist/wcardinal/ui/shape/action/e-shape-action-expression.js.map +1 -1
  15. package/dist/wcardinal/ui/shape/action/e-shape-action-misc-extension.js.map +1 -1
  16. package/dist/wcardinal/ui/shape/action/e-shape-action-open-dialog-extension.js.map +1 -1
  17. package/dist/wcardinal/ui/shape/action/e-shape-action-open-dialog-opener.js.map +1 -1
  18. package/dist/wcardinal/ui/shape/action/e-shape-action-open-extension.js.map +1 -1
  19. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.js +2 -2
  20. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.js.map +1 -1
  21. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-extension.js +8 -4
  22. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-extension.js.map +1 -1
  23. package/dist/wcardinal/ui/shape/action/e-shape-action-value-misc-extension.js +6 -6
  24. package/dist/wcardinal/ui/shape/action/e-shape-action-value-misc-extension.js.map +1 -1
  25. package/dist/wcardinal/ui/shape/action/e-shape-action-value-misc-type.js.map +1 -1
  26. package/dist/wcardinal/ui/util/util-extract.js +61 -6
  27. package/dist/wcardinal/ui/util/util-extract.js.map +1 -1
  28. package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
  29. package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
  30. package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
  31. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +1 -1
  32. package/dist/wcardinal-ui-theme-dark.js +1 -1
  33. package/dist/wcardinal-ui-theme-dark.min.js +1 -1
  34. package/dist/wcardinal-ui-theme-white-en-us.js +1 -1
  35. package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
  36. package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
  37. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +1 -1
  38. package/dist/wcardinal-ui-theme-white.js +1 -1
  39. package/dist/wcardinal-ui-theme-white.min.js +1 -1
  40. package/dist/wcardinal-ui.cjs.js +76 -19
  41. package/dist/wcardinal-ui.js +76 -19
  42. package/dist/wcardinal-ui.min.js +2 -2
  43. package/dist/wcardinal-ui.min.js.map +1 -1
  44. package/package.json +1 -1
@@ -453,13 +453,13 @@ export interface DDiagramSerializedSimple {
453
453
  summary?: string;
454
454
  description?: string;
455
455
  /**
456
- * A stringified {@link DDiagramSerialized#data}.
456
+ * A stringified {@link DDiagramSerialized.data}.
457
457
  *
458
458
  * @deprecated in favor of {@link DDiagramSerializedSimpleData}.
459
459
  */
460
460
  tags?: string;
461
461
  /**
462
- * A stringified {@link DDiagramSerialized#pieces}.
462
+ * A stringified {@link DDiagramSerialized.pieces}.
463
463
  *
464
464
  * @deprecated in favor of {@link DDiagramSerializedSimpleData}.
465
465
  */
@@ -4,7 +4,7 @@ import { EShapeActionEnvironment } from "./e-shape-action-environment";
4
4
  * {@link EShape} action expression with one parameter.
5
5
  *
6
6
  * In action expressions, all the properties in {@link EShape}, {@link EShapeState} and {@link EShapeActionEnvironment} can be accessed directly.
7
- * For instance, the string `isClicked` is a valid expression as {@link EShapeState} has {@link EShapeStateSet#isClicked} and is equivalent to `shape.state.isClicked`.
7
+ * For instance, the string `isClicked` is a valid expression as {@link EShapeState} has {@link EShapeStateSet.isClicked} and is equivalent to `shape.state.isClicked`.
8
8
  * In addition to that, the parameter passed to this function can be used in action expressions.
9
9
  * The name of the variable containing that parameter depends on actions.
10
10
  */
@@ -4,6 +4,6 @@ import { EShapeActionEnvironment } from "./e-shape-action-environment";
4
4
  * {@link EShape} action expression.
5
5
  *
6
6
  * In action expressions, all the properties in {@link EShape}, {@link EShapeState} and {@link EShapeActionEnvironment} can be accessed directly.
7
- * For instance, the string `isClicked` is a valid expression as {@link EShapeState} has {@link EShapeStateSet#isClicked} and is equivalent to `shape.state.isClicked`.
7
+ * For instance, the string `isClicked` is a valid expression as {@link EShapeState} has {@link EShapeStateSet.isClicked} and is equivalent to `shape.state.isClicked`.
8
8
  */
9
9
  export type EShapeActionExpression<T> = (shape: EShape, time: number, environment: EShapeActionEnvironment) => T;
@@ -1,8 +1,13 @@
1
1
  import { DDiagram } from "../../d-diagram";
2
2
  import { EShape } from "../e-shape";
3
- export type EShapeActionMiscExtensionExecutor = (parameter: unknown, shape: EShape, diagram: DDiagram) => void;
3
+ import { EShapeActionValueMiscType } from "./e-shape-action-value-misc-type";
4
+ export type EShapeActionMiscExtensionExecutor = (argument: unknown, shape: EShape, diagram: DDiagram) => void;
4
5
  export interface EShapeActionMiscExtension {
5
- type: number;
6
+ /**
7
+ * An ID of the misc. extension action.
8
+ * This ID must be unique and greater than or equal to {@link EShapeActionValueMiscType.EXTENSION}.
9
+ **/
10
+ type: EShapeActionValueMiscType;
6
11
  label: string;
7
12
  executor: EShapeActionMiscExtensionExecutor;
8
13
  }
@@ -1,6 +1,11 @@
1
1
  import { EShapeActionOpenDialogOpener } from "./e-shape-action-open-dialog-opener";
2
+ import { EShapeActionValueOpenDialogType } from "./e-shape-action-value-open-dialog-type";
2
3
  export interface EShapeActionOpenDialogExtension {
3
- type: number;
4
+ /**
5
+ * An ID of the open extension action.
6
+ * This ID must be unique and greater than or equal to {@link EShapeActionValueOpenDialogType.EXTENSION}.
7
+ **/
8
+ type: EShapeActionValueOpenDialogType;
4
9
  label: string;
5
10
  opener: EShapeActionOpenDialogOpener;
6
11
  }
@@ -1,2 +1,3 @@
1
+ import { DDiagram } from "../../d-diagram";
1
2
  import { EShape } from "../e-shape";
2
- export type EShapeActionOpenDialogOpener = (target: string, argument: unknown, shape: EShape) => void;
3
+ export type EShapeActionOpenDialogOpener = (target: string, argument: unknown, shape: EShape, diagram: DDiagram) => void;
@@ -1,6 +1,11 @@
1
1
  import { EShapeActionOpenOpener } from "./e-shape-action-open-opener";
2
+ import { EShapeActionValueOpenType } from "./e-shape-action-value-open-type";
2
3
  export interface EShapeActionOpenExtension {
3
- type: number;
4
+ /**
5
+ * An ID of the open extension action.
6
+ * This ID must be unique and greater than or equal to {@link EShapeActionValueOpenType.EXTENSION}.
7
+ **/
8
+ type: EShapeActionValueOpenType;
4
9
  label: string;
5
10
  opener: EShapeActionOpenOpener;
6
11
  }
@@ -6,7 +6,7 @@ import { EShapeActionRuntimeConditional } from "./e-shape-action-runtime-conditi
6
6
  import { EShapeActionValueMiscExtension } from "./e-shape-action-value-misc-extension";
7
7
  export declare class EShapeActionRuntimeMiscExtension extends EShapeActionRuntimeConditional {
8
8
  protected extension?: EShapeActionMiscExtension;
9
- protected parameter: EShapeActionExpression<unknown>;
9
+ protected argument: EShapeActionExpression<unknown>;
10
10
  constructor(value: EShapeActionValueMiscExtension);
11
11
  execute(shape: EShape, runtime: EShapeRuntime, time: number): void;
12
12
  }
@@ -11,8 +11,8 @@ export type EShapeActionValueMiscExtensionSerialized = [
11
11
  number
12
12
  ];
13
13
  export declare class EShapeActionValueMiscExtension extends EShapeActionValueSubtyped<EShapeActionValueMiscExtensionSubtype> {
14
- readonly parameter: string;
15
- constructor(subtype: EShapeActionValueMiscExtensionSubtype, condition: string, parameter: string);
14
+ readonly argument: string;
15
+ constructor(subtype: EShapeActionValueMiscExtensionSubtype, condition: string, argument: string);
16
16
  toRuntime(): EShapeActionRuntime;
17
17
  serialize(manager: EShapeResourceManagerSerialization): number;
18
18
  static deserialize(serialized: EShapeActionValueMiscExtensionSerialized, manager: EShapeResourceManagerDeserialization): EShapeActionValueMiscExtension;
@@ -17,4 +17,4 @@ export declare const EShapeActionValueMiscType: {
17
17
  readonly EXECUTE: 12;
18
18
  readonly EXTENSION: 1000;
19
19
  };
20
- export type EShapeActionValueMiscType = (typeof EShapeActionValueMiscType)[keyof typeof EShapeActionValueMiscType];
20
+ export type EShapeActionValueMiscType = number;
@@ -40,9 +40,22 @@ export interface UtilExtractFileOptions extends UtilExtractBase64Options {
40
40
  filename: string;
41
41
  }
42
42
  export declare class UtilExtract {
43
+ protected static WORK_RENDER_TEXTURE?: RenderTexture;
43
44
  static texture(options: UtilExtractTextureOptions): RenderTexture;
45
+ /**
46
+ * Extracts pixels from the target.
47
+ * This method internally creates one render texture and use that to extract pixels from the target.
48
+ * To free the allocated render texture, please call {@link destroy()}.
49
+ *
50
+ * @param options an extraction options
51
+ * @returns extracted pixels
52
+ */
44
53
  static pixels(options: UtilExtractPixelsOptions): UtilExtractorPixels;
45
54
  static canvas(options: UtilExtractCanvasOptions): utils.CanvasRenderTarget;
46
55
  static base64(options: UtilExtractBase64Options): string;
47
56
  static file(options: UtilExtractFileOptions): void;
57
+ /**
58
+ * Clears all the memories.
59
+ */
60
+ static destroy(): void;
48
61
  }
@@ -1 +1 @@
1
- {"version":3,"file":"d-diagram-serialized.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagram-serialized.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,MAAM,CAAC,IAAM,yBAAyB,GAAW,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramCanvasTileMapping } from \"./d-diagram-canvas-mapping\";\nimport { EShapeCorner } from \"./shape/e-shape-corner\";\nimport { EShapeStrokeSide } from \"./shape/e-shape-stroke-side\";\nimport { EShapeStrokeStyle } from \"./shape/e-shape-stroke-style\";\nimport { EShapeDataValueOrder } from \"./shape/e-shape-data-value-order\";\nimport { EShapeTextStyle, EShapeTextWeight } from \"./shape/e-shape-text\";\nimport { EShapeTextAlignHorizontal } from \"./shape/e-shape-text-align-horizontal\";\nimport { EShapeTextAlignVertical } from \"./shape/e-shape-text-align-vertical\";\nimport { EShapeTextDirection } from \"./shape/e-shape-text-direction\";\nimport { EShapeType } from \"./shape/e-shape-type\";\nimport { ESnapperTargetValueType } from \"./snapper/e-snapper-target-value\";\nimport { EShapeDataValueRangeType } from \"./shape/e-shape-data-value-range\";\nimport { EShapeDataValueType } from \"./shape/e-shape-data-value-type\";\nimport { EShapeDataValueScope } from \"./shape/e-shape-data-value-scope\";\n\nexport const DDiagramSerializedVersion: number = 1;\n\n/**\n * A serialized data range.\n */\nexport interface DDiagramSerializedDataRange {\n\t/** A type. */\n\t[0]: EShapeDataValueRangeType;\n\n\t/** A lower bound. */\n\t[1]: number;\n\n\t/** An upper bound. */\n\t[2]: number;\n}\n\n/**\n * A serialized data value.\n */\nexport interface DDiagramSerializedDataValue {\n\t/**\n\t * A resource index number of an ID.\n\t */\n\t[0]: number;\n\n\t/**\n\t * A resource index number of an initial value expression.\n\t */\n\t[1]: number;\n\n\t/**\n\t * A resource index number of a format expression.\n\t */\n\t[2]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedDataRange).\n\t */\n\t[3]: number;\n\n\t/**\n\t * A capacity.\n\t */\n\t[4]: number;\n\n\t/**\n\t * A order.\n\t */\n\t[5]: EShapeDataValueOrder;\n\n\t/**\n\t * A type.\n\t */\n\t[6]: EShapeDataValueType | undefined;\n\n\t/**\n\t * A scope.\n\t */\n\t[7]: EShapeDataValueScope | undefined;\n\n\t/**\n\t * A resource index number of an alias.\n\t */\n\t[8]: number | undefined;\n}\n\n/**\n * A serialized system data.\n */\nexport type DDiagramSerializedDataSystem = number[];\n\n/**\n * A serialized data mapping.\n * Each number at the index 2N+0 is a resource index number of the N-th mapping source.\n * Each number at the index 2N+1 is a resource index number of the N-th mapping destination.\n */\nexport type DDiagramSerializedDataMapping = number[];\n\n/**\n * A serialized data with a mapping data.\n */\nexport interface DDiagramSerializedDataWithMapping extends Array<unknown> {\n\t/**\n\t * Each number is a resource index number of JSON.stringify(DDiagramSerializedDataValue).\n\t * The last number is a resource index number of JSON.stringify(DDiagramSerializedDataMapping).\n\t */\n\t[0]: number[];\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedDataSystem).\n\t */\n\t[1]: number | undefined;\n}\n\n/**\n * A serialized data without a mapping data.\n * Each number is a resource index number of JSON.stringify(DDiagramSerializedDataValue).\n */\nexport type DDiagramSerializedDataWithoutMapping = number[];\n\n/**\n * A serialized data.\n */\nexport type DDiagramSerializedData =\n\t| DDiagramSerializedDataWithoutMapping\n\t| DDiagramSerializedDataWithMapping;\n\n/**\n * A serialized fill.\n */\nexport interface DDiagramSerializedFill {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n}\n\n/**\n * A serialized stroke.\n */\nexport interface DDiagramSerializedStroke {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A width. */\n\t[3]: number;\n\n\t/** An align. */\n\t[4]: number;\n\n\t/** A side. */\n\t[5]: EShapeStrokeSide;\n\n\t/** A style */\n\t[6]: EShapeStrokeStyle | undefined;\n}\n\n/**\n * A serialized text outline.\n */\nexport interface DDiagramSerializedTextOutline {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A width. */\n\t[3]: number;\n}\n\n/**\n * A serialized text align.\n */\nexport interface DDiagramSerializedTextAlign {\n\t/** A horizontal align. */\n\t[0]: EShapeTextAlignHorizontal;\n\n\t/** A vertical align. */\n\t[1]: EShapeTextAlignVertical;\n}\n\n/**\n * A serialized text offset.\n */\nexport interface DDiagramSerializedTextOffset {\n\t/** A horizontal offset. */\n\t[0]: number;\n\n\t/** A vertical offset. */\n\t[1]: number;\n}\n\n/**\n * A serialized text spacing.\n */\nexport interface DDiagramSerializedTextSpacing {\n\t/** A horizontal spacing. */\n\t[0]: number;\n\n\t/** A vertical spacing. */\n\t[1]: number;\n}\n\n/**\n * A serialized text padding.\n */\nexport interface DDiagramSerializedTextPadding {\n\t/** A horizontal padding. */\n\t[0]: number;\n\n\t/** A vertical padding. */\n\t[1]: number;\n}\n\n/**\n * A serialized text.\n */\nexport interface DDiagramSerializedText {\n\t/** A resource index number of a value. */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A resource index number of a font family. */\n\t[3]: number;\n\n\t/** A size. */\n\t[4]: number;\n\n\t/** A weight. */\n\t[5]: EShapeTextWeight;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextAlign).\n\t */\n\t[6]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextOffset).\n\t */\n\t[7]: number;\n\n\t/** A style. */\n\t[8]: EShapeTextStyle;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextOutline).\n\t */\n\t[9]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextSpacing).\n\t */\n\t[10]: number;\n\n\t/** A direction. */\n\t[11]: EShapeTextDirection;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextPadding).\n\t */\n\t[12]: number;\n\n\t/** A clipping. (0: Off, 1: On) */\n\t[13]: number;\n\n\t/** A fitting. (0: Off, 1: On) */\n\t[14]: number;\n}\n\n/**\n * A serialized item.\n */\nexport interface DDiagramSerializedItem {\n\t/** A type. */\n\t[0]: EShapeType;\n\n\t/** A resource index number of a ID. */\n\t[1]: number;\n\n\t/** A X-coordinate position. */\n\t[2]: number;\n\n\t/** A Y-coordinate position. */\n\t[3]: number;\n\n\t/** A width. */\n\t[4]: number;\n\n\t/** A height. */\n\t[5]: number;\n\n\t/** A rotation. */\n\t[6]: number;\n\n\t/** A skew. */\n\t[7]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedFill).\n\t */\n\t[8]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedStroke).\n\t */\n\t[9]: number;\n\n\t/** A resource index number of a cursor. */\n\t[10]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedText).\n\t */\n\t[11]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedData).\n\t */\n\t[12]: number;\n\n\t/** A radius. */\n\t[13]: number;\n\n\t/** A corner. */\n\t[14]: EShapeCorner;\n\n\t/** A resource index number of a shape-specific resource. */\n\t[15]: number;\n\n\t/** A layer index number. */\n\t[16]: number;\n\n\t/** Actions */\n\t[17]: number[];\n\n\t/** A resource index number of an image. */\n\t[18]: number;\n\n\t/**\n\t * A resource index number of a stringified serialized gradient.\n\t * A stringified serialized gradient is a stringified number array,\n\t * JSON.stringify(number[]).\n\t *\n\t * * The first number in the array is a direction in degree.\n\t * * Each number at the index 3N + 1 is a color of a N-th point.\n\t * * Each number at the index 3N + 2 is a alpha of a N-th point.\n\t * * Each number at the index 3N + 3 is a position of a N-th point whose range is [0, 1].\n\t */\n\t[19]: number;\n\n\t/** Children. */\n\t[20]: DDiagramSerializedItem[];\n\n\t/** A X pivot. */\n\t[21]: number;\n\n\t/** A Y pivot. */\n\t[22]: number;\n\n\t/** (interactive ? 1 : 0) | (unfocusable ? 2 : 0) */\n\t[23]: number;\n\n\t/** A resource index number of a shortcut. */\n\t[24]: number;\n\n\t/** A resource index number of a title. */\n\t[25]: number;\n\n\t/** UUID */\n\t[26]: number;\n\n\t/** Added capabilities */\n\t[27]: number;\n\n\t/** Removed capabilities */\n\t[28]: number;\n\n\t/** Locked capabilities */\n\t[29]: number;\n}\n\n/**\n * A serialized layer.\n */\nexport interface DDiagramSerializedLayer {\n\t/** A name or a resource index number of a name*/\n\t[0]: string | number;\n\n\t/**\n\t * A visibility.\n\t *\n\t * * 1st bit\n\t * * 0: Invisible when edit mode\n\t * * 1: Visible when edit mode\n\t * * 2nd bit\n\t * * 0: Invisible when non-edit mode\n\t * * 1: Visible when non-edit mode\n\t */\n\t[1]?: number;\n\n\t/** A X-coordinate position. */\n\t[2]?: number;\n\n\t/** A Y-coordinate position. */\n\t[3]?: number;\n\n\t/** A width. */\n\t[4]?: number;\n\n\t/** A height. */\n\t[5]?: number;\n\n\t/**\n\t * A resource index number of a stringified serialized fill,\n\t * JSON.stringify(DDiagramSerializedFill).\n\t */\n\t[6]?: number;\n\n\t/**\n\t * * 1st bit\n\t * * 0: Not interactive\n\t * * 1: Interactive\n\t * * 2nd bit\n\t * * 0: Not draggable\n\t * * 1: Draggable\n\t * * 3rd bit\n\t * * 0: Not pinchable\n\t * * 1: Pinchable\n\t */\n\t[7]?: number;\n}\n\n/**\n * A serialized snap target.\n */\nexport interface DDiagramSerializedSnapTargetValue {\n\t/** A type. */\n\t[0]: ESnapperTargetValueType;\n\n\t/** A position. */\n\t[1]: number;\n}\n\n/**\n * Serialized snap on guide settings.\n */\nexport interface DDiagramSerializedSnapTarget {\n\t/** Snap on guide (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A visibility (0: Invisible, 1: Visible). */\n\t[1]: number;\n\n\t/** Snap targets. */\n\t[2]: DDiagramSerializedSnapTargetValue[];\n}\n\n/**\n * Serialized grid snap settings without a visibility option.\n */\nexport interface DDiagramSerializedSnapGridWithoutVisibility {\n\t/** Snap on grid (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A grid size. */\n\t[1]: number;\n}\n\n/**\n * Serialized grid snap settings with a visibility option.\n */\nexport interface DDiagramSerializedSnapGridWithVisibility {\n\t/** Snap on grid (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A visibility (0: Invisible, 1: Visible). */\n\t[1]: number;\n\n\t/** A grid size. */\n\t[2]: number;\n}\n\n/**\n * Serialized grid snap settings with a visibility.\n */\nexport type DDiagramSerializedSnapGrid =\n\t| DDiagramSerializedSnapGridWithoutVisibility\n\t| DDiagramSerializedSnapGridWithVisibility;\n\n/**\n * Serialized snap settings.\n */\nexport interface DDiagramSerializedSnap {\n\t/** Snap (0: Off, 1: On). */\n\t[0]: number;\n\n\t/** Snap on targets */\n\t[1]: DDiagramSerializedSnapTarget;\n\n\t/** Snap on grid */\n\t[2]: DDiagramSerializedSnapGrid;\n}\n\n/**\n * Serialized background settings.\n */\nexport interface DDiagramSerializedBackground {\n\tcolor?: number | null;\n\talpha?: number;\n}\n\n/**\n * Serialized tile settings.\n */\nexport interface DDiagramSerializedTile {\n\tmapping?: DDiagramCanvasTileMapping;\n}\n\n/**\n * A serialized diagram.\n */\nexport interface DDiagramSerialized {\n\tversion: number;\n\tid?: number;\n\tname: string;\n\tlabel?: string;\n\twidth: number;\n\theight: number;\n\tcategory?: string | null;\n\tsummary?: string;\n\tdescription?: string;\n\tbackground?: DDiagramSerializedBackground;\n\ttile?: DDiagramSerializedTile;\n\tresources: string[];\n\t/** @deprecated in favor of {@link data} */\n\ttags?: string[];\n\tdata?: string[];\n\tpieces?: string[];\n\tlayers: DDiagramSerializedLayer[];\n\titems: DDiagramSerializedItem[];\n\tsnap?: DDiagramSerializedSnap;\n\tthumbnail?: string;\n}\n\nexport type DDiagramSerializedSimpleData = Omit<\n\tDDiagramSerialized,\n\t\"version\" | \"id\" | \"name\" | \"thumbnail\"\n>;\n\n/**\n * A simplified version of a serialized diagram.\n */\nexport interface DDiagramSerializedSimple {\n\tversion: number;\n\tid: number | undefined;\n\tname: string;\n\tlabel?: string;\n\tcategory?: string | null;\n\tsummary?: string;\n\tdescription?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerialized#data}.\n\t *\n\t * @deprecated in favor of {@link DDiagramSerializedSimpleData}.\n\t */\n\ttags?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerialized#pieces}.\n\t *\n\t * @deprecated in favor of {@link DDiagramSerializedSimpleData}.\n\t */\n\tpieces?: string;\n\n\t/**\n\t * Thumbnail data URL.\n\t */\n\tthumbnail?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerializedSimpleData}.\n\t */\n\tdata: string;\n}\n\nexport interface DDiagramSerializedName {\n\tid: number;\n\tname: string;\n}\n"]}
1
+ {"version":3,"file":"d-diagram-serialized.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagram-serialized.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,MAAM,CAAC,IAAM,yBAAyB,GAAW,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramCanvasTileMapping } from \"./d-diagram-canvas-mapping\";\nimport { EShapeCorner } from \"./shape/e-shape-corner\";\nimport { EShapeStrokeSide } from \"./shape/e-shape-stroke-side\";\nimport { EShapeStrokeStyle } from \"./shape/e-shape-stroke-style\";\nimport { EShapeDataValueOrder } from \"./shape/e-shape-data-value-order\";\nimport { EShapeTextStyle, EShapeTextWeight } from \"./shape/e-shape-text\";\nimport { EShapeTextAlignHorizontal } from \"./shape/e-shape-text-align-horizontal\";\nimport { EShapeTextAlignVertical } from \"./shape/e-shape-text-align-vertical\";\nimport { EShapeTextDirection } from \"./shape/e-shape-text-direction\";\nimport { EShapeType } from \"./shape/e-shape-type\";\nimport { ESnapperTargetValueType } from \"./snapper/e-snapper-target-value\";\nimport { EShapeDataValueRangeType } from \"./shape/e-shape-data-value-range\";\nimport { EShapeDataValueType } from \"./shape/e-shape-data-value-type\";\nimport { EShapeDataValueScope } from \"./shape/e-shape-data-value-scope\";\n\nexport const DDiagramSerializedVersion: number = 1;\n\n/**\n * A serialized data range.\n */\nexport interface DDiagramSerializedDataRange {\n\t/** A type. */\n\t[0]: EShapeDataValueRangeType;\n\n\t/** A lower bound. */\n\t[1]: number;\n\n\t/** An upper bound. */\n\t[2]: number;\n}\n\n/**\n * A serialized data value.\n */\nexport interface DDiagramSerializedDataValue {\n\t/**\n\t * A resource index number of an ID.\n\t */\n\t[0]: number;\n\n\t/**\n\t * A resource index number of an initial value expression.\n\t */\n\t[1]: number;\n\n\t/**\n\t * A resource index number of a format expression.\n\t */\n\t[2]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedDataRange).\n\t */\n\t[3]: number;\n\n\t/**\n\t * A capacity.\n\t */\n\t[4]: number;\n\n\t/**\n\t * A order.\n\t */\n\t[5]: EShapeDataValueOrder;\n\n\t/**\n\t * A type.\n\t */\n\t[6]: EShapeDataValueType | undefined;\n\n\t/**\n\t * A scope.\n\t */\n\t[7]: EShapeDataValueScope | undefined;\n\n\t/**\n\t * A resource index number of an alias.\n\t */\n\t[8]: number | undefined;\n}\n\n/**\n * A serialized system data.\n */\nexport type DDiagramSerializedDataSystem = number[];\n\n/**\n * A serialized data mapping.\n * Each number at the index 2N+0 is a resource index number of the N-th mapping source.\n * Each number at the index 2N+1 is a resource index number of the N-th mapping destination.\n */\nexport type DDiagramSerializedDataMapping = number[];\n\n/**\n * A serialized data with a mapping data.\n */\nexport interface DDiagramSerializedDataWithMapping extends Array<unknown> {\n\t/**\n\t * Each number is a resource index number of JSON.stringify(DDiagramSerializedDataValue).\n\t * The last number is a resource index number of JSON.stringify(DDiagramSerializedDataMapping).\n\t */\n\t[0]: number[];\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedDataSystem).\n\t */\n\t[1]: number | undefined;\n}\n\n/**\n * A serialized data without a mapping data.\n * Each number is a resource index number of JSON.stringify(DDiagramSerializedDataValue).\n */\nexport type DDiagramSerializedDataWithoutMapping = number[];\n\n/**\n * A serialized data.\n */\nexport type DDiagramSerializedData =\n\t| DDiagramSerializedDataWithoutMapping\n\t| DDiagramSerializedDataWithMapping;\n\n/**\n * A serialized fill.\n */\nexport interface DDiagramSerializedFill {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n}\n\n/**\n * A serialized stroke.\n */\nexport interface DDiagramSerializedStroke {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A width. */\n\t[3]: number;\n\n\t/** An align. */\n\t[4]: number;\n\n\t/** A side. */\n\t[5]: EShapeStrokeSide;\n\n\t/** A style */\n\t[6]: EShapeStrokeStyle | undefined;\n}\n\n/**\n * A serialized text outline.\n */\nexport interface DDiagramSerializedTextOutline {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A width. */\n\t[3]: number;\n}\n\n/**\n * A serialized text align.\n */\nexport interface DDiagramSerializedTextAlign {\n\t/** A horizontal align. */\n\t[0]: EShapeTextAlignHorizontal;\n\n\t/** A vertical align. */\n\t[1]: EShapeTextAlignVertical;\n}\n\n/**\n * A serialized text offset.\n */\nexport interface DDiagramSerializedTextOffset {\n\t/** A horizontal offset. */\n\t[0]: number;\n\n\t/** A vertical offset. */\n\t[1]: number;\n}\n\n/**\n * A serialized text spacing.\n */\nexport interface DDiagramSerializedTextSpacing {\n\t/** A horizontal spacing. */\n\t[0]: number;\n\n\t/** A vertical spacing. */\n\t[1]: number;\n}\n\n/**\n * A serialized text padding.\n */\nexport interface DDiagramSerializedTextPadding {\n\t/** A horizontal padding. */\n\t[0]: number;\n\n\t/** A vertical padding. */\n\t[1]: number;\n}\n\n/**\n * A serialized text.\n */\nexport interface DDiagramSerializedText {\n\t/** A resource index number of a value. */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A resource index number of a font family. */\n\t[3]: number;\n\n\t/** A size. */\n\t[4]: number;\n\n\t/** A weight. */\n\t[5]: EShapeTextWeight;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextAlign).\n\t */\n\t[6]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextOffset).\n\t */\n\t[7]: number;\n\n\t/** A style. */\n\t[8]: EShapeTextStyle;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextOutline).\n\t */\n\t[9]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextSpacing).\n\t */\n\t[10]: number;\n\n\t/** A direction. */\n\t[11]: EShapeTextDirection;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextPadding).\n\t */\n\t[12]: number;\n\n\t/** A clipping. (0: Off, 1: On) */\n\t[13]: number;\n\n\t/** A fitting. (0: Off, 1: On) */\n\t[14]: number;\n}\n\n/**\n * A serialized item.\n */\nexport interface DDiagramSerializedItem {\n\t/** A type. */\n\t[0]: EShapeType;\n\n\t/** A resource index number of a ID. */\n\t[1]: number;\n\n\t/** A X-coordinate position. */\n\t[2]: number;\n\n\t/** A Y-coordinate position. */\n\t[3]: number;\n\n\t/** A width. */\n\t[4]: number;\n\n\t/** A height. */\n\t[5]: number;\n\n\t/** A rotation. */\n\t[6]: number;\n\n\t/** A skew. */\n\t[7]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedFill).\n\t */\n\t[8]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedStroke).\n\t */\n\t[9]: number;\n\n\t/** A resource index number of a cursor. */\n\t[10]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedText).\n\t */\n\t[11]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedData).\n\t */\n\t[12]: number;\n\n\t/** A radius. */\n\t[13]: number;\n\n\t/** A corner. */\n\t[14]: EShapeCorner;\n\n\t/** A resource index number of a shape-specific resource. */\n\t[15]: number;\n\n\t/** A layer index number. */\n\t[16]: number;\n\n\t/** Actions */\n\t[17]: number[];\n\n\t/** A resource index number of an image. */\n\t[18]: number;\n\n\t/**\n\t * A resource index number of a stringified serialized gradient.\n\t * A stringified serialized gradient is a stringified number array,\n\t * JSON.stringify(number[]).\n\t *\n\t * * The first number in the array is a direction in degree.\n\t * * Each number at the index 3N + 1 is a color of a N-th point.\n\t * * Each number at the index 3N + 2 is a alpha of a N-th point.\n\t * * Each number at the index 3N + 3 is a position of a N-th point whose range is [0, 1].\n\t */\n\t[19]: number;\n\n\t/** Children. */\n\t[20]: DDiagramSerializedItem[];\n\n\t/** A X pivot. */\n\t[21]: number;\n\n\t/** A Y pivot. */\n\t[22]: number;\n\n\t/** (interactive ? 1 : 0) | (unfocusable ? 2 : 0) */\n\t[23]: number;\n\n\t/** A resource index number of a shortcut. */\n\t[24]: number;\n\n\t/** A resource index number of a title. */\n\t[25]: number;\n\n\t/** UUID */\n\t[26]: number;\n\n\t/** Added capabilities */\n\t[27]: number;\n\n\t/** Removed capabilities */\n\t[28]: number;\n\n\t/** Locked capabilities */\n\t[29]: number;\n}\n\n/**\n * A serialized layer.\n */\nexport interface DDiagramSerializedLayer {\n\t/** A name or a resource index number of a name*/\n\t[0]: string | number;\n\n\t/**\n\t * A visibility.\n\t *\n\t * * 1st bit\n\t * * 0: Invisible when edit mode\n\t * * 1: Visible when edit mode\n\t * * 2nd bit\n\t * * 0: Invisible when non-edit mode\n\t * * 1: Visible when non-edit mode\n\t */\n\t[1]?: number;\n\n\t/** A X-coordinate position. */\n\t[2]?: number;\n\n\t/** A Y-coordinate position. */\n\t[3]?: number;\n\n\t/** A width. */\n\t[4]?: number;\n\n\t/** A height. */\n\t[5]?: number;\n\n\t/**\n\t * A resource index number of a stringified serialized fill,\n\t * JSON.stringify(DDiagramSerializedFill).\n\t */\n\t[6]?: number;\n\n\t/**\n\t * * 1st bit\n\t * * 0: Not interactive\n\t * * 1: Interactive\n\t * * 2nd bit\n\t * * 0: Not draggable\n\t * * 1: Draggable\n\t * * 3rd bit\n\t * * 0: Not pinchable\n\t * * 1: Pinchable\n\t */\n\t[7]?: number;\n}\n\n/**\n * A serialized snap target.\n */\nexport interface DDiagramSerializedSnapTargetValue {\n\t/** A type. */\n\t[0]: ESnapperTargetValueType;\n\n\t/** A position. */\n\t[1]: number;\n}\n\n/**\n * Serialized snap on guide settings.\n */\nexport interface DDiagramSerializedSnapTarget {\n\t/** Snap on guide (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A visibility (0: Invisible, 1: Visible). */\n\t[1]: number;\n\n\t/** Snap targets. */\n\t[2]: DDiagramSerializedSnapTargetValue[];\n}\n\n/**\n * Serialized grid snap settings without a visibility option.\n */\nexport interface DDiagramSerializedSnapGridWithoutVisibility {\n\t/** Snap on grid (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A grid size. */\n\t[1]: number;\n}\n\n/**\n * Serialized grid snap settings with a visibility option.\n */\nexport interface DDiagramSerializedSnapGridWithVisibility {\n\t/** Snap on grid (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A visibility (0: Invisible, 1: Visible). */\n\t[1]: number;\n\n\t/** A grid size. */\n\t[2]: number;\n}\n\n/**\n * Serialized grid snap settings with a visibility.\n */\nexport type DDiagramSerializedSnapGrid =\n\t| DDiagramSerializedSnapGridWithoutVisibility\n\t| DDiagramSerializedSnapGridWithVisibility;\n\n/**\n * Serialized snap settings.\n */\nexport interface DDiagramSerializedSnap {\n\t/** Snap (0: Off, 1: On). */\n\t[0]: number;\n\n\t/** Snap on targets */\n\t[1]: DDiagramSerializedSnapTarget;\n\n\t/** Snap on grid */\n\t[2]: DDiagramSerializedSnapGrid;\n}\n\n/**\n * Serialized background settings.\n */\nexport interface DDiagramSerializedBackground {\n\tcolor?: number | null;\n\talpha?: number;\n}\n\n/**\n * Serialized tile settings.\n */\nexport interface DDiagramSerializedTile {\n\tmapping?: DDiagramCanvasTileMapping;\n}\n\n/**\n * A serialized diagram.\n */\nexport interface DDiagramSerialized {\n\tversion: number;\n\tid?: number;\n\tname: string;\n\tlabel?: string;\n\twidth: number;\n\theight: number;\n\tcategory?: string | null;\n\tsummary?: string;\n\tdescription?: string;\n\tbackground?: DDiagramSerializedBackground;\n\ttile?: DDiagramSerializedTile;\n\tresources: string[];\n\t/** @deprecated in favor of {@link data} */\n\ttags?: string[];\n\tdata?: string[];\n\tpieces?: string[];\n\tlayers: DDiagramSerializedLayer[];\n\titems: DDiagramSerializedItem[];\n\tsnap?: DDiagramSerializedSnap;\n\tthumbnail?: string;\n}\n\nexport type DDiagramSerializedSimpleData = Omit<\n\tDDiagramSerialized,\n\t\"version\" | \"id\" | \"name\" | \"thumbnail\"\n>;\n\n/**\n * A simplified version of a serialized diagram.\n */\nexport interface DDiagramSerializedSimple {\n\tversion: number;\n\tid: number | undefined;\n\tname: string;\n\tlabel?: string;\n\tcategory?: string | null;\n\tsummary?: string;\n\tdescription?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerialized.data}.\n\t *\n\t * @deprecated in favor of {@link DDiagramSerializedSimpleData}.\n\t */\n\ttags?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerialized.pieces}.\n\t *\n\t * @deprecated in favor of {@link DDiagramSerializedSimpleData}.\n\t */\n\tpieces?: string;\n\n\t/**\n\t * Thumbnail data URL.\n\t */\n\tthumbnail?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerializedSimpleData}.\n\t */\n\tdata: string;\n}\n\nexport interface DDiagramSerializedName {\n\tid: number;\n\tname: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-action-expression-with-parameter.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-expression-with-parameter.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\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\n\n/**\n * {@link EShape} action expression with one parameter.\n *\n * In action expressions, all the properties in {@link EShape}, {@link EShapeState} and {@link EShapeActionEnvironment} can be accessed directly.\n * For instance, the string `isClicked` is a valid expression as {@link EShapeState} has {@link EShapeStateSet#isClicked} and is equivalent to `shape.state.isClicked`.\n * In addition to that, the parameter passed to this function can be used in action expressions.\n * The name of the variable containing that parameter depends on actions.\n */\nexport type EShapeActionExpressionWithParameter<T, P> = (\n\tshape: EShape,\n\ttime: number,\n\tenvironment: EShapeActionEnvironment,\n\tparameter: P\n) => T;\n"]}
1
+ {"version":3,"file":"e-shape-action-expression-with-parameter.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-expression-with-parameter.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\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\n\n/**\n * {@link EShape} action expression with one parameter.\n *\n * In action expressions, all the properties in {@link EShape}, {@link EShapeState} and {@link EShapeActionEnvironment} can be accessed directly.\n * For instance, the string `isClicked` is a valid expression as {@link EShapeState} has {@link EShapeStateSet.isClicked} and is equivalent to `shape.state.isClicked`.\n * In addition to that, the parameter passed to this function can be used in action expressions.\n * The name of the variable containing that parameter depends on actions.\n */\nexport type EShapeActionExpressionWithParameter<T, P> = (\n\tshape: EShape,\n\ttime: number,\n\tenvironment: EShapeActionEnvironment,\n\tparameter: P\n) => T;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-action-expression.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-expression.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\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\n\n/**\n * {@link EShape} action expression.\n *\n * In action expressions, all the properties in {@link EShape}, {@link EShapeState} and {@link EShapeActionEnvironment} can be accessed directly.\n * For instance, the string `isClicked` is a valid expression as {@link EShapeState} has {@link EShapeStateSet#isClicked} and is equivalent to `shape.state.isClicked`.\n */\nexport type EShapeActionExpression<T> = (\n\tshape: EShape,\n\ttime: number,\n\tenvironment: EShapeActionEnvironment\n) => T;\n"]}
1
+ {"version":3,"file":"e-shape-action-expression.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-expression.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\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\n\n/**\n * {@link EShape} action expression.\n *\n * In action expressions, all the properties in {@link EShape}, {@link EShapeState} and {@link EShapeActionEnvironment} can be accessed directly.\n * For instance, the string `isClicked` is a valid expression as {@link EShapeState} has {@link EShapeStateSet.isClicked} and is equivalent to `shape.state.isClicked`.\n */\nexport type EShapeActionExpression<T> = (\n\tshape: EShape,\n\ttime: number,\n\tenvironment: EShapeActionEnvironment\n) => T;\n"]}
@@ -1 +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"]}
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\";\nimport { EShapeActionValueMiscType } from \"./e-shape-action-value-misc-type\";\n\nexport type EShapeActionMiscExtensionExecutor = (\n\targument: unknown,\n\tshape: EShape,\n\tdiagram: DDiagram\n) => void;\n\nexport interface EShapeActionMiscExtension {\n\t/**\n\t * An ID of the misc. extension action.\n\t * This ID must be unique and greater than or equal to {@link EShapeActionValueMiscType.EXTENSION}.\n\t **/\n\ttype: EShapeActionValueMiscType;\n\tlabel: string;\n\texecutor: EShapeActionMiscExtensionExecutor;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-action-open-dialog-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-dialog-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeActionOpenDialogOpener } from \"./e-shape-action-open-dialog-opener\";\n\nexport interface EShapeActionOpenDialogExtension {\n\ttype: number;\n\tlabel: string;\n\topener: EShapeActionOpenDialogOpener;\n}\n"]}
1
+ {"version":3,"file":"e-shape-action-open-dialog-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-dialog-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeActionOpenDialogOpener } from \"./e-shape-action-open-dialog-opener\";\nimport { EShapeActionValueOpenDialogType } from \"./e-shape-action-value-open-dialog-type\";\n\nexport interface EShapeActionOpenDialogExtension {\n\t/**\n\t * An ID of the open extension action.\n\t * This ID must be unique and greater than or equal to {@link EShapeActionValueOpenDialogType.EXTENSION}.\n\t **/\n\ttype: EShapeActionValueOpenDialogType;\n\tlabel: string;\n\topener: EShapeActionOpenDialogOpener;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-action-open-dialog-opener.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-dialog-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 EShapeActionOpenDialogOpener = (\n\ttarget: string,\n\targument: unknown,\n\tshape: EShape\n) => void;\n"]}
1
+ {"version":3,"file":"e-shape-action-open-dialog-opener.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-dialog-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 EShapeActionOpenDialogOpener = (\n\ttarget: string,\n\targument: unknown,\n\tshape: EShape,\n\tdiagram: DDiagram\n) => void;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-action-open-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeActionOpenOpener } from \"./e-shape-action-open-opener\";\n\nexport interface EShapeActionOpenExtension {\n\ttype: number;\n\tlabel: string;\n\topener: EShapeActionOpenOpener;\n}\n"]}
1
+ {"version":3,"file":"e-shape-action-open-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeActionOpenOpener } from \"./e-shape-action-open-opener\";\nimport { EShapeActionValueOpenType } from \"./e-shape-action-value-open-type\";\n\nexport interface EShapeActionOpenExtension {\n\t/**\n\t * An ID of the open extension action.\n\t * This ID must be unique and greater than or equal to {@link EShapeActionValueOpenType.EXTENSION}.\n\t **/\n\ttype: EShapeActionValueOpenType;\n\tlabel: string;\n\topener: EShapeActionOpenOpener;\n}\n"]}
@@ -13,7 +13,7 @@ var EShapeActionRuntimeMiscExtension = /** @class */ (function (_super) {
13
13
  __extends(EShapeActionRuntimeMiscExtension, _super);
14
14
  function EShapeActionRuntimeMiscExtension(value) {
15
15
  var _this = _super.call(this, value, EShapeRuntimeReset.NONE) || this;
16
- _this.parameter = EShapeActionExpressions.ofUnknown(value.parameter);
16
+ _this.argument = EShapeActionExpressions.ofUnknown(value.argument);
17
17
  _this.extension = EShapeActionMiscExtensions.get(value.subtype);
18
18
  return _this;
19
19
  }
@@ -22,7 +22,7 @@ var EShapeActionRuntimeMiscExtension = /** @class */ (function (_super) {
22
22
  if (extension != null && this.condition(shape, time, EShapeActionEnvironment)) {
23
23
  var diagram = EShapeActions.toDiagram(shape);
24
24
  if (diagram != null) {
25
- extension.executor(this.parameter(shape, time, EShapeActionEnvironment), shape, diagram);
25
+ extension.executor(this.argument(shape, time, EShapeActionEnvironment), shape, diagram);
26
26
  }
27
27
  }
28
28
  };
@@ -1 +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"]}
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,QAAQ,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAClE,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,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EACnD,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 argument: EShapeActionExpression<unknown>;\n\n\tconstructor(value: EShapeActionValueMiscExtension) {\n\t\tsuper(value, EShapeRuntimeReset.NONE);\n\t\tthis.argument = EShapeActionExpressions.ofUnknown(value.argument);\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.argument(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"]}
@@ -8,6 +8,7 @@ import { EShapeActionEnvironment } from "./e-shape-action-environment";
8
8
  import { EShapeActionExpressions } from "./e-shape-action-expressions";
9
9
  import { EShapeActionOpenDialogExtensions } from "./e-shape-action-open-dialog-extensions";
10
10
  import { EShapeActionRuntimeConditional } from "./e-shape-action-runtime-conditional";
11
+ import { EShapeActions } from "./e-shape-actions";
11
12
  var EShapeActionRuntimeOpenDialogExtension = /** @class */ (function (_super) {
12
13
  __extends(EShapeActionRuntimeOpenDialogExtension, _super);
13
14
  function EShapeActionRuntimeOpenDialogExtension(value) {
@@ -26,10 +27,13 @@ var EShapeActionRuntimeOpenDialogExtension = /** @class */ (function (_super) {
26
27
  if (this.condition(shape, time, EShapeActionEnvironment)) {
27
28
  var target_1 = this.target(shape, time, EShapeActionEnvironment);
28
29
  if (target_1 != null) {
29
- var argument_1 = this.argument(shape, time, EShapeActionEnvironment);
30
- setTimeout(function () {
31
- opener(target_1, argument_1, shape);
32
- }, 0);
30
+ var diagram_1 = EShapeActions.toDiagram(shape);
31
+ if (diagram_1 != null) {
32
+ var argument_1 = this.argument(shape, time, EShapeActionEnvironment);
33
+ setTimeout(function () {
34
+ opener(target_1, argument_1, shape, diagram_1);
35
+ }, 0);
36
+ }
33
37
  }
34
38
  }
35
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-action-runtime-open-dialog-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-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;AACvE,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAE3F,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAGtF;IAA4D,0DAA8B;IAKzF,gDAAY,KAA2C;QAAvD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,SAOrC;QANA,KAAI,CAAC,MAAM,GAAG,uBAAuB,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACnE,KAAI,CAAC,QAAQ,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAClE,IAAM,SAAS,GAAG,gCAAgC,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACzE,IAAI,SAAS,EAAE;YACd,KAAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;SAC/B;;IACF,CAAC;IAED,wDAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,MAAM,EAAE;YACX,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;gBACzD,IAAM,QAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;gBACjE,IAAI,QAAM,IAAI,IAAI,EAAE;oBACnB,IAAM,UAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;oBACrE,UAAU,CAAC;wBACV,MAAM,CAAC,QAAM,EAAE,UAAQ,EAAE,KAAK,CAAC,CAAC;oBACjC,CAAC,EAAE,CAAC,CAAC,CAAC;iBACN;aACD;SACD;IACF,CAAC;IACF,6CAAC;AAAD,CAAC,AA7BD,CAA4D,8BAA8B,GA6BzF","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 { EShapeActionOpenDialogExtensions } from \"./e-shape-action-open-dialog-extensions\";\nimport { EShapeActionOpenDialogOpener } from \"./e-shape-action-open-dialog-opener\";\nimport { EShapeActionRuntimeConditional } from \"./e-shape-action-runtime-conditional\";\nimport { EShapeActionValueOpenDialogExtension } from \"./e-shape-action-value-open-dialog-extension\";\n\nexport class EShapeActionRuntimeOpenDialogExtension extends EShapeActionRuntimeConditional {\n\tprotected readonly target: EShapeActionExpression<string | null>;\n\tprotected readonly argument: EShapeActionExpression<unknown>;\n\tprotected readonly opener?: EShapeActionOpenDialogOpener;\n\n\tconstructor(value: EShapeActionValueOpenDialogExtension) {\n\t\tsuper(value, EShapeRuntimeReset.NONE);\n\t\tthis.target = EShapeActionExpressions.ofStringOrNull(value.target);\n\t\tthis.argument = EShapeActionExpressions.ofUnknown(value.argument);\n\t\tconst extension = EShapeActionOpenDialogExtensions.get(value.dialogType);\n\t\tif (extension) {\n\t\t\tthis.opener = extension.opener;\n\t\t}\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tconst opener = this.opener;\n\t\tif (opener) {\n\t\t\tif (this.condition(shape, time, EShapeActionEnvironment)) {\n\t\t\t\tconst target = this.target(shape, time, EShapeActionEnvironment);\n\t\t\t\tif (target != null) {\n\t\t\t\t\tconst argument = this.argument(shape, time, EShapeActionEnvironment);\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\topener(target, argument, shape);\n\t\t\t\t\t}, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"e-shape-action-runtime-open-dialog-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runt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AC;oBAC/C,IAAI,SAAO,IAAI,IAAI,EAAE;wBACpB,IAAM,UAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;wBACrE,UAAU,CAAC;4BACV,MAAM,CAAC,QAAM,EAAE,UAAQ,EAAE,KAAK,EAAE,SAAO,CAAC,CAAC;wBAC1C,CAAC,EAAE,CAAC,CAAC,CAAC;qBACN;iBACD;aACD;SACD;IACF,CAAC;IACF,6CAAC;AAAD,CAAC,AAhCD,CAA4D,8BAA8B,GAgCzF","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 { EShapeActionOpenDialogExtensions } from \"./e-shape-action-open-dialog-extensions\";\nimport { EShapeActionOpenDialogOpener } from \"./e-shape-action-open-dialog-opener\";\nimport { EShapeActionRuntimeConditional } from \"./e-shape-action-runtime-conditional\";\nimport { EShapeActionValueOpenDialogExtension } from \"./e-shape-action-value-open-dialog-extension\";\nimport { EShapeActions } from \"./e-shape-actions\";\n\nexport class EShapeActionRuntimeOpenDialogExtension extends EShapeActionRuntimeConditional {\n\tprotected readonly target: EShapeActionExpression<string | null>;\n\tprotected readonly argument: EShapeActionExpression<unknown>;\n\tprotected readonly opener?: EShapeActionOpenDialogOpener;\n\n\tconstructor(value: EShapeActionValueOpenDialogExtension) {\n\t\tsuper(value, EShapeRuntimeReset.NONE);\n\t\tthis.target = EShapeActionExpressions.ofStringOrNull(value.target);\n\t\tthis.argument = EShapeActionExpressions.ofUnknown(value.argument);\n\t\tconst extension = EShapeActionOpenDialogExtensions.get(value.dialogType);\n\t\tif (extension) {\n\t\t\tthis.opener = extension.opener;\n\t\t}\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tconst opener = this.opener;\n\t\tif (opener) {\n\t\t\tif (this.condition(shape, time, EShapeActionEnvironment)) {\n\t\t\t\tconst target = this.target(shape, time, EShapeActionEnvironment);\n\t\t\t\tif (target != null) {\n\t\t\t\t\tconst diagram = EShapeActions.toDiagram(shape);\n\t\t\t\t\tif (diagram != null) {\n\t\t\t\t\t\tconst argument = this.argument(shape, time, EShapeActionEnvironment);\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\topener(target, argument, shape, diagram);\n\t\t\t\t\t\t}, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
@@ -9,9 +9,9 @@ import { EShapeActionValueType } from "./e-shape-action-value-type";
9
9
  import { EShapeActionValues } from "./e-shape-action-values";
10
10
  var EShapeActionValueMiscExtension = /** @class */ (function (_super) {
11
11
  __extends(EShapeActionValueMiscExtension, _super);
12
- function EShapeActionValueMiscExtension(subtype, condition, parameter) {
12
+ function EShapeActionValueMiscExtension(subtype, condition, argument) {
13
13
  var _this = _super.call(this, EShapeActionValueType.MISC, condition, subtype) || this;
14
- _this.parameter = parameter;
14
+ _this.argument = argument;
15
15
  return _this;
16
16
  }
17
17
  EShapeActionValueMiscExtension.prototype.toRuntime = function () {
@@ -19,14 +19,14 @@ var EShapeActionValueMiscExtension = /** @class */ (function (_super) {
19
19
  };
20
20
  EShapeActionValueMiscExtension.prototype.serialize = function (manager) {
21
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, "]"));
22
+ var argumentId = manager.addResource(this.argument);
23
+ return manager.addResource("[".concat(this.type, ",").concat(conditionId, ",").concat(this.subtype, ",").concat(argumentId, "]"));
24
24
  };
25
25
  EShapeActionValueMiscExtension.deserialize = function (serialized, manager) {
26
26
  var resources = manager.resources;
27
27
  var condition = EShapeActionValues.toResource(1, serialized, resources);
28
- var parameter = EShapeActionValues.toResource(3, serialized, resources);
29
- return new EShapeActionValueMiscExtension(serialized[2], condition, parameter);
28
+ var argument = EShapeActionValues.toResource(3, serialized, resources);
29
+ return new EShapeActionValueMiscExtension(serialized[2], condition, argument);
30
30
  };
31
31
  return EShapeActionValueMiscExtension;
32
32
  }(EShapeActionValueSubtyped));
@@ -1 +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"]}
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,QAAgB;QAHjB,YAKC,kBAAM,qBAAqB,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,SAErD;QADA,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;;IAC1B,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,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACtD,OAAO,OAAO,CAAC,WAAW,CAAC,WAAI,IAAI,CAAC,IAAI,cAAI,WAAW,cAAI,IAAI,CAAC,OAAO,cAAI,UAAU,MAAG,CAAC,CAAC;IAC3F,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,QAAQ,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QACzE,OAAO,IAAI,8BAA8B,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC/E,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 argument: string;\n\n\tconstructor(\n\t\tsubtype: EShapeActionValueMiscExtensionSubtype,\n\t\tcondition: string,\n\t\targument: string\n\t) {\n\t\tsuper(EShapeActionValueType.MISC, condition, subtype);\n\t\tthis.argument = argument;\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 argumentId = manager.addResource(this.argument);\n\t\treturn manager.addResource(`[${this.type},${conditionId},${this.subtype},${argumentId}]`);\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 argument = EShapeActionValues.toResource(3, serialized, resources);\n\t\treturn new EShapeActionValueMiscExtension(serialized[2], condition, argument);\n\t}\n}\n"]}
@@ -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;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"]}
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 = number;\n"]}
@@ -2,6 +2,7 @@
2
2
  * Copyright (C) 2019 Toshiba Corporation
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
+ import { Matrix, RenderTexture, SCALE_MODES } from "pixi.js";
5
6
  import { DApplications } from "../d-applications";
6
7
  import { isNumber } from "./is-number";
7
8
  import { UtilExtractor } from "./util-extractor";
@@ -61,17 +62,61 @@ var UtilExtract = /** @class */ (function () {
61
62
  var skipUpdateTransform = (_a = options.transform) === null || _a === void 0 ? void 0 : _a.update;
62
63
  return UtilExtractor.toTexture(target, resolution, options.clear, skipUpdateTransform);
63
64
  };
65
+ /**
66
+ * Extracts pixels from the target.
67
+ * This method internally creates one render texture and use that to extract pixels from the target.
68
+ * To free the allocated render texture, please call {@link destroy()}.
69
+ *
70
+ * @param options an extraction options
71
+ * @returns extracted pixels
72
+ */
64
73
  UtilExtract.pixels = function (options) {
74
+ var _a;
65
75
  var renderer = toRenderer(options);
66
- var texture = this.texture(options);
67
- try {
68
- return UtilExtractor.toPixels(texture, renderer);
76
+ // Create a render texture
77
+ var target = options.target;
78
+ var scale = target.transform.scale;
79
+ var width = Math.floor(target.width * scale.x);
80
+ var height = Math.floor(target.height * scale.y);
81
+ var resolution = toResolution(options);
82
+ var renderTexture = UtilExtract.WORK_RENDER_TEXTURE;
83
+ if (renderTexture == null) {
84
+ renderTexture = RenderTexture.create({
85
+ width: width,
86
+ height: height,
87
+ scaleMode: SCALE_MODES.LINEAR,
88
+ resolution: resolution
89
+ });
90
+ UtilExtract.WORK_RENDER_TEXTURE = renderTexture;
69
91
  }
70
- finally {
71
- if (texture) {
72
- texture.destroy();
92
+ else {
93
+ var baseTexture = renderTexture.baseTexture;
94
+ var baseTextureWidth = baseTexture.width;
95
+ var baseTextureHeight = baseTexture.height;
96
+ var isWidthDirty = baseTextureWidth < width;
97
+ var isHeightDirty = baseTextureHeight < height;
98
+ var isResolutionDirty = renderTexture.resolution !== resolution;
99
+ if (isResolutionDirty || isWidthDirty || isHeightDirty) {
100
+ if (isResolutionDirty) {
101
+ baseTexture.resolution = resolution;
102
+ }
103
+ renderTexture.resize(Math.max(width, baseTextureWidth), Math.max(height, baseTextureHeight), true);
73
104
  }
74
105
  }
106
+ // Render to the render texture
107
+ var frame = renderTexture.frame;
108
+ if (frame.x !== 0 || frame.y !== 0 || frame.width !== width || frame.height !== height) {
109
+ frame.x = 0;
110
+ frame.y = 0;
111
+ frame.width = width;
112
+ frame.height = height;
113
+ renderTexture.frame = frame;
114
+ }
115
+ var targetPosition = target.position;
116
+ var matrix = new Matrix(1, 0, 0, 1, -targetPosition.x, -targetPosition.y);
117
+ renderer.render(target, renderTexture, options.clear, matrix, (_a = options.transform) === null || _a === void 0 ? void 0 : _a.update);
118
+ // Extract pixels
119
+ return UtilExtractor.toPixels(renderTexture, renderer);
75
120
  };
76
121
  UtilExtract.canvas = function (options) {
77
122
  var _a, _b;
@@ -94,6 +139,16 @@ var UtilExtract = /** @class */ (function () {
94
139
  UtilExtract.file = function (options) {
95
140
  UtilFileDownloader.downloadUrl(options.filename, this.base64(options));
96
141
  };
142
+ /**
143
+ * Clears all the memories.
144
+ */
145
+ UtilExtract.destroy = function () {
146
+ var texture = this.WORK_RENDER_TEXTURE;
147
+ if (texture != null) {
148
+ this.WORK_RENDER_TEXTURE = undefined;
149
+ texture.destroy(true);
150
+ }
151
+ };
97
152
  return UtilExtract;
98
153
  }());
99
154
  export { UtilExtract };
@@ -1 +1 @@
1
- {"version":3,"file":"util-extract.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/util/util-extract.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AA+C5D,IAAM,YAAY,GAAG,UAAC,OAAkC;;IACvD,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,IAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,IAAI,UAAU,IAAI,IAAI,EAAE;QACvB,IAAI,QAAQ,CAAC,UAAU,CAAC,EAAE;YACzB,OAAO,UAAU,CAAC;SAClB;aAAM;YACN,IAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;YACrC,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACvE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;SAC3C;KACD;SAAM;QACN,OAAO,MAAA,MAAM,CAAC,gBAAgB,mCAAI,CAAC,CAAC;KACpC;AACF,CAAC,CAAC;AAEF,IAAM,OAAO,GAAG,UACf,MAA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 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Renderer, RenderTexture, utils } from \"pixi.js\";\nimport { DApplicationLayerLike } from \"../d-application-layer-like\";\nimport { DApplicationLike } from \"../d-application-like\";\nimport { DApplications } from \"../d-applications\";\nimport { DBase } from \"../d-base\";\nimport { isNumber } from \"./is-number\";\nimport { UtilExtractor } from \"./util-extractor\";\nimport { UtilExtractorPixels } from \"./util-extractor-pixels\";\nimport { UtilFileDownloader } from \"./util-file-downloader\";\n\nexport interface UtilExtractTextureResolutionOptions {\n\tsize: number;\n}\n\nexport interface UtilExtractTextureTransformOptions {\n\tupdate?: boolean;\n}\n\nexport interface UtilExtractTextureOptions {\n\ttarget: DBase;\n\tresolution?: number | UtilExtractTextureResolutionOptions;\n\ttransform?: UtilExtractTextureTransformOptions;\n\tclear?: boolean;\n}\n\nexport interface UtilExtractPixelsOptions extends UtilExtractTextureOptions {\n\trenderer?: Renderer;\n\tapplication?: DApplicationLike;\n\tlayer?: DApplicationLayerLike;\n}\n\nexport interface UtilExtractCanvasScaleOptions {\n\tsize: number;\n}\n\nexport interface UtilExtractCanvasAlphaOptions {\n\tpremultiplied?: {\n\t\tignore?: boolean;\n\t};\n}\n\nexport interface UtilExtractCanvasOptions extends UtilExtractPixelsOptions {\n\tscale?: number | UtilExtractCanvasScaleOptions;\n\talpha?: UtilExtractCanvasAlphaOptions;\n}\n\nexport interface UtilExtractBase64Options extends UtilExtractCanvasOptions {\n\tformat?: string;\n\tquality?: number;\n}\n\nexport interface UtilExtractFileOptions extends UtilExtractBase64Options {\n\tfilename: string;\n}\n\nconst toResolution = (options: UtilExtractTextureOptions): number => {\n\tconst target = options.target;\n\tconst resolution = options.resolution;\n\tif (resolution != null) {\n\t\tif (isNumber(resolution)) {\n\t\t\treturn resolution;\n\t\t} else {\n\t\t\tconst scale = target.transform.scale;\n\t\t\tconst size = Math.max(target.width * scale.x, target.height * scale.y);\n\t\t\treturn Math.min(1, resolution.size / size);\n\t\t}\n\t} else {\n\t\treturn window.devicePixelRatio ?? 1;\n\t}\n};\n\nconst toScale = (\n\tpixels: UtilExtractorPixels,\n\toptions: UtilExtractCanvasOptions\n): number | undefined => {\n\tconst scale = options.scale;\n\tif (scale != null) {\n\t\tif (isNumber(scale)) {\n\t\t\treturn scale;\n\t\t} else {\n\t\t\tconst size = scale.size;\n\t\t\treturn Math.min(1, size / pixels.width, size / pixels.height);\n\t\t}\n\t}\n};\n\nconst toRenderer = (options: UtilExtractPixelsOptions): Renderer => {\n\tconst renderer = options.renderer;\n\tif (renderer) {\n\t\treturn renderer;\n\t}\n\tconst application = options.application;\n\tif (application) {\n\t\treturn application.getLayerBase().renderer;\n\t}\n\tconst layer = options.layer || DApplications.getLayer(options.target);\n\tif (layer) {\n\t\treturn layer.renderer;\n\t}\n\tthrow new Error(\"No renderer / application / layer found.\");\n};\n\nexport class UtilExtract {\n\tstatic texture(options: UtilExtractTextureOptions): RenderTexture {\n\t\tconst target = options.target;\n\t\tconst resolution = toResolution(options);\n\t\tconst skipUpdateTransform = options.transform?.update;\n\t\treturn UtilExtractor.toTexture(target, resolution, options.clear, skipUpdateTransform);\n\t}\n\n\tstatic pixels(options: UtilExtractPixelsOptions): UtilExtractorPixels {\n\t\tconst renderer = toRenderer(options);\n\t\tconst texture = this.texture(options);\n\t\ttry {\n\t\t\treturn UtilExtractor.toPixels(texture, renderer);\n\t\t} finally {\n\t\t\tif (texture) {\n\t\t\t\ttexture.destroy();\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic canvas(options: UtilExtractCanvasOptions): utils.CanvasRenderTarget {\n\t\tconst pixels = this.pixels(options);\n\t\tconst ignorePremutipliedAlpha = options.alpha?.premultiplied?.ignore;\n\t\tconst scale = toScale(pixels, options);\n\t\treturn UtilExtractor.toCanvas(pixels, scale, ignorePremutipliedAlpha);\n\t}\n\n\tstatic base64(options: UtilExtractBase64Options): string {\n\t\tconst canvas = this.canvas(options);\n\t\ttry {\n\t\t\treturn UtilExtractor.toBase64(canvas.canvas, options.format, options.quality);\n\t\t} finally {\n\t\t\tif (canvas) {\n\t\t\t\tcanvas.destroy();\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic file(options: UtilExtractFileOptions): void {\n\t\tUtilFileDownloader.downloadUrl(options.filename, this.base64(options));\n\t}\n}\n"]}
1
+ {"version":3,"file":"util-extract.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/util/util-extract.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAY,aAAa,EAAE,WAAW,EAAS,MAAM,SAAS,CAAC;AAG9E,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AA+C5D,IAAM,YAAY,GAAG,UAAC,OAAkC;;IACvD,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,IAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,IAAI,UAAU,IAAI,IAAI,EAAE;QACvB,IAAI,QAAQ,CAAC,UAAU,CAAC,EAAE;YACzB,OAAO,UAAU,CAAC;SAClB;aAAM;YACN,IAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;YACrC,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACvE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;SAC3C;KACD;SAAM;QACN,OAAO,MAAA,MAAM,CAAC,gBAAgB,mCAAI,CAAC,CAAC;KACpC;AACF,CAAC,CAA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AA,MAAA,OAAO,CAAC,KAAK,0CAAE,aAAa,0CAAE,MAAM,CAAC;QACrE,IAAM,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACvC,OAAO,aAAa,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,uBAAuB,CAAC,CAAC;IACvE,CAAC;IAEM,kBAAM,GAAb,UAAc,OAAiC;QAC9C,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI;YACH,OAAO,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;SAC9E;gBAAS;YACT,IAAI,MAAM,EAAE;gBACX,MAAM,CAAC,OAAO,EAAE,CAAC;aACjB;SACD;IACF,CAAC;IAEM,gBAAI,GAAX,UAAY,OAA+B;QAC1C,kBAAkB,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACI,mBAAO,GAAd;QACC,IAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC;QACzC,IAAI,OAAO,IAAI,IAAI,EAAE;YACpB,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC;YACrC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SACtB;IACF,CAAC;IACF,kBAAC;AAAD,CAAC,AA1GD,IA0GC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Matrix, Renderer, RenderTexture, SCALE_MODES, utils } from \"pixi.js\";\nimport { DApplicationLayerLike } from \"../d-application-layer-like\";\nimport { DApplicationLike } from \"../d-application-like\";\nimport { DApplications } from \"../d-applications\";\nimport { DBase } from \"../d-base\";\nimport { isNumber } from \"./is-number\";\nimport { UtilExtractor } from \"./util-extractor\";\nimport { UtilExtractorPixels } from \"./util-extractor-pixels\";\nimport { UtilFileDownloader } from \"./util-file-downloader\";\n\nexport interface UtilExtractTextureResolutionOptions {\n\tsize: number;\n}\n\nexport interface UtilExtractTextureTransformOptions {\n\tupdate?: boolean;\n}\n\nexport interface UtilExtractTextureOptions {\n\ttarget: DBase;\n\tresolution?: number | UtilExtractTextureResolutionOptions;\n\ttransform?: UtilExtractTextureTransformOptions;\n\tclear?: boolean;\n}\n\nexport interface UtilExtractPixelsOptions extends UtilExtractTextureOptions {\n\trenderer?: Renderer;\n\tapplication?: DApplicationLike;\n\tlayer?: DApplicationLayerLike;\n}\n\nexport interface UtilExtractCanvasScaleOptions {\n\tsize: number;\n}\n\nexport interface UtilExtractCanvasAlphaOptions {\n\tpremultiplied?: {\n\t\tignore?: boolean;\n\t};\n}\n\nexport interface UtilExtractCanvasOptions extends UtilExtractPixelsOptions {\n\tscale?: number | UtilExtractCanvasScaleOptions;\n\talpha?: UtilExtractCanvasAlphaOptions;\n}\n\nexport interface UtilExtractBase64Options extends UtilExtractCanvasOptions {\n\tformat?: string;\n\tquality?: number;\n}\n\nexport interface UtilExtractFileOptions extends UtilExtractBase64Options {\n\tfilename: string;\n}\n\nconst toResolution = (options: UtilExtractTextureOptions): number => {\n\tconst target = options.target;\n\tconst resolution = options.resolution;\n\tif (resolution != null) {\n\t\tif (isNumber(resolution)) {\n\t\t\treturn resolution;\n\t\t} else {\n\t\t\tconst scale = target.transform.scale;\n\t\t\tconst size = Math.max(target.width * scale.x, target.height * scale.y);\n\t\t\treturn Math.min(1, resolution.size / size);\n\t\t}\n\t} else {\n\t\treturn window.devicePixelRatio ?? 1;\n\t}\n};\n\nconst toScale = (\n\tpixels: UtilExtractorPixels,\n\toptions: UtilExtractCanvasOptions\n): number | undefined => {\n\tconst scale = options.scale;\n\tif (scale != null) {\n\t\tif (isNumber(scale)) {\n\t\t\treturn scale;\n\t\t} else {\n\t\t\tconst size = scale.size;\n\t\t\treturn Math.min(1, size / pixels.width, size / pixels.height);\n\t\t}\n\t}\n};\n\nconst toRenderer = (options: UtilExtractPixelsOptions): Renderer => {\n\tconst renderer = options.renderer;\n\tif (renderer) {\n\t\treturn renderer;\n\t}\n\tconst application = options.application;\n\tif (application) {\n\t\treturn application.getLayerBase().renderer;\n\t}\n\tconst layer = options.layer || DApplications.getLayer(options.target);\n\tif (layer) {\n\t\treturn layer.renderer;\n\t}\n\tthrow new Error(\"No renderer / application / layer found.\");\n};\n\nexport class UtilExtract {\n\tprotected static WORK_RENDER_TEXTURE?: RenderTexture;\n\n\tstatic texture(options: UtilExtractTextureOptions): RenderTexture {\n\t\tconst target = options.target;\n\t\tconst resolution = toResolution(options);\n\t\tconst skipUpdateTransform = options.transform?.update;\n\t\treturn UtilExtractor.toTexture(target, resolution, options.clear, skipUpdateTransform);\n\t}\n\n\t/**\n\t * Extracts pixels from the target.\n\t * This method internally creates one render texture and use that to extract pixels from the target.\n\t * To free the allocated render texture, please call {@link destroy()}.\n\t *\n\t * @param options an extraction options\n\t * @returns extracted pixels\n\t */\n\tstatic pixels(options: UtilExtractPixelsOptions): UtilExtractorPixels {\n\t\tconst renderer = toRenderer(options);\n\n\t\t// Create a render texture\n\t\tconst target = options.target;\n\t\tconst scale = target.transform.scale;\n\t\tconst width = Math.floor(target.width * scale.x);\n\t\tconst height = Math.floor(target.height * scale.y);\n\t\tconst resolution = toResolution(options);\n\t\tlet renderTexture = UtilExtract.WORK_RENDER_TEXTURE;\n\t\tif (renderTexture == null) {\n\t\t\trenderTexture = RenderTexture.create({\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t\tscaleMode: SCALE_MODES.LINEAR,\n\t\t\t\tresolution\n\t\t\t});\n\t\t\tUtilExtract.WORK_RENDER_TEXTURE = renderTexture;\n\t\t} else {\n\t\t\tconst baseTexture = renderTexture.baseTexture;\n\t\t\tconst baseTextureWidth = baseTexture.width;\n\t\t\tconst baseTextureHeight = baseTexture.height;\n\t\t\tconst isWidthDirty = baseTextureWidth < width;\n\t\t\tconst isHeightDirty = baseTextureHeight < height;\n\t\t\tconst isResolutionDirty = renderTexture.resolution !== resolution;\n\t\t\tif (isResolutionDirty || isWidthDirty || isHeightDirty) {\n\t\t\t\tif (isResolutionDirty) {\n\t\t\t\t\tbaseTexture.resolution = resolution;\n\t\t\t\t}\n\t\t\t\trenderTexture.resize(\n\t\t\t\t\tMath.max(width, baseTextureWidth),\n\t\t\t\t\tMath.max(height, baseTextureHeight),\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Render to the render texture\n\t\tconst frame = renderTexture.frame;\n\t\tif (frame.x !== 0 || frame.y !== 0 || frame.width !== width || frame.height !== height) {\n\t\t\tframe.x = 0;\n\t\t\tframe.y = 0;\n\t\t\tframe.width = width;\n\t\t\tframe.height = height;\n\t\t\trenderTexture.frame = frame;\n\t\t}\n\n\t\tconst targetPosition = target.position;\n\t\tconst matrix = new Matrix(1, 0, 0, 1, -targetPosition.x, -targetPosition.y);\n\n\t\trenderer.render(target, renderTexture, options.clear, matrix, options.transform?.update);\n\n\t\t// Extract pixels\n\t\treturn UtilExtractor.toPixels(renderTexture, renderer);\n\t}\n\n\tstatic canvas(options: UtilExtractCanvasOptions): utils.CanvasRenderTarget {\n\t\tconst pixels = this.pixels(options);\n\t\tconst ignorePremutipliedAlpha = options.alpha?.premultiplied?.ignore;\n\t\tconst scale = toScale(pixels, options);\n\t\treturn UtilExtractor.toCanvas(pixels, scale, ignorePremutipliedAlpha);\n\t}\n\n\tstatic base64(options: UtilExtractBase64Options): string {\n\t\tconst canvas = this.canvas(options);\n\t\ttry {\n\t\t\treturn UtilExtractor.toBase64(canvas.canvas, options.format, options.quality);\n\t\t} finally {\n\t\t\tif (canvas) {\n\t\t\t\tcanvas.destroy();\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic file(options: UtilExtractFileOptions): void {\n\t\tUtilFileDownloader.downloadUrl(options.filename, this.base64(options));\n\t}\n\n\t/**\n\t * Clears all the memories.\n\t */\n\tstatic destroy(): void {\n\t\tconst texture = this.WORK_RENDER_TEXTURE;\n\t\tif (texture != null) {\n\t\t\tthis.WORK_RENDER_TEXTURE = undefined;\n\t\t\ttexture.destroy(true);\n\t\t}\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.437.0
2
+ Winter Cardinal UI v0.439.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.437.0
2
+ Winter Cardinal UI v0.439.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.437.0
2
+ Winter Cardinal UI v0.439.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.437.0
2
+ Winter Cardinal UI v0.439.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.437.0
2
+ Winter Cardinal UI v0.439.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.437.0
2
+ Winter Cardinal UI v0.439.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5