@wcardinal/wcardinal-ui 0.436.0 → 0.438.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.
- package/dist/types/wcardinal/ui/d-diagram-serialized.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-expression-with-parameter.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-expression.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-misc-extension.d.ts +13 -0
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-misc-extensions.d.ts +8 -0
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-dialog-extension.d.ts +6 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-dialog-opener.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-extension.d.ts +6 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-opener.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.d.ts +12 -0
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-misc-extension.d.ts +19 -0
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-misc-type.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-actions.d.ts +4 -13
- package/dist/types/wcardinal/ui/shape/action/index.d.ts +4 -0
- package/dist/wcardinal/ui/d-diagram-serialized.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/deserialize-action-value.js +7 -1
- package/dist/wcardinal/ui/shape/action/deserialize-action-value.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-expression-with-parameter.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-expression.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-misc-extension.js +6 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-misc-extension.js.map +1 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-misc-extensions.js +30 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-misc-extensions.js.map +1 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-open-dialog-extension.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-open-dialog-opener.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-open-extension.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-open-opener.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.js +32 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.js.map +1 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-html-element-base.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-html-element-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-extension.js +8 -4
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-extension.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-value-misc-extension.js +34 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-value-misc-extension.js.map +1 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-value-misc-type.js +2 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-value-misc-type.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-actions.js +22 -19
- package/dist/wcardinal/ui/shape/action/e-shape-actions.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/index.js +4 -0
- package/dist/wcardinal/ui/shape/action/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/e-theme-dark-shape-action-value.js +12 -0
- package/dist/wcardinal/ui/theme/dark/e-theme-dark-shape-action-value.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/e-theme-white-shape-action-value.js +12 -0
- package/dist/wcardinal/ui/theme/white/e-theme-white-shape-action-value.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +14 -1
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +14 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +14 -1
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +14 -1
- package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +14 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +14 -1
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +64012 -63894
- package/dist/wcardinal-ui.js +48370 -48274
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- 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
|
|
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
|
|
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
|
|
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
|
|
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;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DDiagram } from "../../d-diagram";
|
|
2
|
+
import { EShape } from "../e-shape";
|
|
3
|
+
import { EShapeActionValueMiscType } from "./e-shape-action-value-misc-type";
|
|
4
|
+
export type EShapeActionMiscExtensionExecutor = (argument: unknown, shape: EShape, diagram: DDiagram) => void;
|
|
5
|
+
export interface EShapeActionMiscExtension {
|
|
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;
|
|
11
|
+
label: string;
|
|
12
|
+
executor: EShapeActionMiscExtensionExecutor;
|
|
13
|
+
}
|
|
@@ -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,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
|
-
|
|
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
|
-
|
|
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
|
}
|
|
@@ -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 argument: 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 argument: string;
|
|
15
|
+
constructor(subtype: EShapeActionValueMiscExtensionSubtype, condition: string, argument: 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
|
-
export type EShapeActionValueMiscType =
|
|
20
|
+
export type EShapeActionValueMiscType = number;
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
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
|
|
7
|
+
static isDiagram(target: unknown): target is DDiagram;
|
|
17
8
|
static isEmbedded(target: unknown): target is EShapeEmbedded;
|
|
18
|
-
static
|
|
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";
|
|
@@ -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"]}
|
|
@@ -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
|
-
|
|
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;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,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,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EA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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,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,2BAA2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;QACP,KAAK,qBAAqB,CAAC,OAAO;YACjC,OAAO,wBAAwB,CAAC,WAAW,CAAC,UAAiB,EAAE,OAAO,CAAC,CAAC;QACzE,KAAK,qBAAqB,CAAC,IAAI;YAC9B,QAAQ,UAAU,CAAC,CAAC,CAAC,EAAE;gBACtB,KAAK,yBAAyB,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"]}
|
|
@@ -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
|
|
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
|
|
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"]}
|
|
@@ -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\";\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"]}
|
|
@@ -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-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:
|
|
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:
|
|
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"]}
|
|
@@ -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 = (
|
|
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.argument = EShapeActionExpressions.ofUnknown(value.argument);
|
|
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.argument(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,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"]}
|
|
@@ -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
|
|
115
|
-
return UtilHtmlElement.getClipperRect(
|
|
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,SAA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AAK,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,CAAC;IAED,0DAAS,GAAT,UAAU,KAAa,EAAE,OAAsB,EAAE,CAAmC;QACnF,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,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,S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C,KAAK,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,CAAC;IAED,0DAAS,GAAT,UAAU,KAAa,EAAE,OAAsB,EAAE,CAAmC;QACnF,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,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 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"]}
|