@wcardinal/wcardinal-ui 0.261.0 → 0.262.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 +3 -1
- package/dist/types/wcardinal/ui/shape/e-shape-capability-container-impl.d.ts +6 -9
- package/dist/types/wcardinal/ui/shape/e-shape-capability-container.d.ts +6 -7
- package/dist/types/wcardinal/ui/shape/e-shape-copy-part.d.ts +1 -0
- package/dist/wcardinal/ui/d-diagram-serialized.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-capabilities.js +4 -7
- package/dist/wcardinal/ui/shape/e-shape-capabilities.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-capability-container-impl.js +22 -36
- package/dist/wcardinal/ui/shape/e-shape-capability-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-capability-container.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-copy-part.js +3 -1
- package/dist/wcardinal/ui/shape/e-shape-copy-part.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-base.js +16 -2
- package/dist/wcardinal/ui/shape/variant/deserialize-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js +21 -2
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +65 -49
- package/dist/wcardinal-ui.js +65 -49
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -295,8 +295,10 @@ export interface DDiagramSerializedItem {
|
|
|
295
295
|
[25]: number;
|
|
296
296
|
/** UUID */
|
|
297
297
|
[26]: number;
|
|
298
|
-
/**
|
|
298
|
+
/** Added capabilities */
|
|
299
299
|
[27]: number;
|
|
300
|
+
/** Removed capabilities */
|
|
301
|
+
[28]: number;
|
|
300
302
|
}
|
|
301
303
|
/**
|
|
302
304
|
* A serialized layer.
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { EShapeCapability } from "./e-shape-capability";
|
|
2
2
|
import { EShapeCapabilityContainer } from "./e-shape-capability-container";
|
|
3
|
-
import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
|
|
4
|
-
import { EShapeResourceManagerSerialization } from "./e-shape-resource-manager-serialization";
|
|
5
3
|
export declare class EShapeCapabilityContainerImpl implements EShapeCapabilityContainer {
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
added: EShapeCapability;
|
|
5
|
+
removed: EShapeCapability;
|
|
8
6
|
constructor();
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
add(target: EShapeCapability): this;
|
|
8
|
+
remove(target: EShapeCapability): this;
|
|
9
|
+
clear(): this;
|
|
10
|
+
set(added?: EShapeCapability, removed?: EShapeCapability): this;
|
|
12
11
|
copy(target: EShapeCapabilityContainer): this;
|
|
13
|
-
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
14
|
-
deserialize(target: number, manager: EShapeResourceManagerDeserialization): void;
|
|
15
12
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { EShapeCapability } from "./e-shape-capability";
|
|
2
|
-
import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
|
|
3
|
-
import { EShapeResourceManagerSerialization } from "./e-shape-resource-manager-serialization";
|
|
4
2
|
export interface EShapeCapabilityContainer {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
added: EShapeCapability;
|
|
4
|
+
removed: EShapeCapability;
|
|
5
|
+
add(target: EShapeCapability): this;
|
|
6
|
+
remove(target: EShapeCapability): this;
|
|
7
|
+
clear(): this;
|
|
8
|
+
set(added?: EShapeCapability, removed?: EShapeCapability): this;
|
|
8
9
|
copy(target: EShapeCapabilityContainer): this;
|
|
9
|
-
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
10
|
-
deserialize(target: number, manager: EShapeResourceManagerDeserialization): void;
|
|
11
10
|
}
|
|
@@ -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\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/** Capability */\n\t[27]: 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\twidth: number;\n\theight: number;\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\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\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\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\twidth: number;\n\theight: number;\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\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"]}
|
|
@@ -15,18 +15,15 @@ var EShapeCapabilities = /** @class */ (function () {
|
|
|
15
15
|
};
|
|
16
16
|
EShapeCapabilities.contains = function (shape, target) {
|
|
17
17
|
if (shape != null) {
|
|
18
|
+
var capability = this.get(shape.type);
|
|
18
19
|
var shapeCapability = shape.getCapability();
|
|
19
20
|
if (shapeCapability != null) {
|
|
20
|
-
|
|
21
|
-
if (contains != null) {
|
|
22
|
-
return contains;
|
|
23
|
-
}
|
|
21
|
+
capability = (capability & ~shapeCapability.removed) | shapeCapability.added;
|
|
24
22
|
}
|
|
25
|
-
|
|
26
|
-
if (typeCapability & target) {
|
|
23
|
+
if (capability & target) {
|
|
27
24
|
return true;
|
|
28
25
|
}
|
|
29
|
-
if (
|
|
26
|
+
if (capability & EShapeCapability.CHILDREN) {
|
|
30
27
|
var children = shape.children;
|
|
31
28
|
for (var i = 0, imax = children.length; i < imax; ++i) {
|
|
32
29
|
if (this.contains(children[i], target)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-capabilities.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-capabilities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD;IAAA;
|
|
1
|
+
{"version":3,"file":"e-shape-capabilities.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-capabilities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD;IAAA;IAuCA,CAAC;IApCO,sBAAG,GAAV,UAAW,IAAgB;QAC1B,IAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,UAAU,IAAI,IAAI,EAAE;YACvB,OAAO,UAAU,CAAC;SAClB;QACD,OAAO,gBAAgB,CAAC,SAAS,CAAC;IACnC,CAAC;IAEM,2BAAQ,GAAf,UAAgB,KAAgC,EAAE,MAAwB;QACzE,IAAI,KAAK,IAAI,IAAI,EAAE;YAClB,IAAI,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAEtC,IAAM,eAAe,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;YAC9C,IAAI,eAAe,IAAI,IAAI,EAAE;gBAC5B,UAAU,GAAG,CAAC,UAAU,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC;aAC7E;YAED,IAAI,UAAU,GAAG,MAAM,EAAE;gBACxB,OAAO,IAAI,CAAC;aACZ;YAED,IAAI,UAAU,GAAG,gBAAgB,CAAC,QAAQ,EAAE;gBAC3C,IAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;gBAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;oBACtD,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE;wBACvC,OAAO,IAAI,CAAC;qBACZ;iBACD;aACD;SACD;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAEM,sBAAG,GAAV,UAAW,IAAgB,EAAE,UAA4B;QACxD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;IAClC,CAAC;IArCM,2BAAQ,GAAiD,EAAE,CAAC;IAsCpE,yBAAC;CAAA,AAvCD,IAuCC;SAvCY,kBAAkB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"./e-shape\";\nimport { EShapeCapability } from \"./e-shape-capability\";\nimport { EShapeType } from \"./e-shape-type\";\n\nexport class EShapeCapabilities {\n\tstatic mappings: Record<number, EShapeCapability | undefined> = {};\n\n\tstatic get(type: EShapeType): EShapeCapability {\n\t\tconst capability = this.mappings[type];\n\t\tif (capability != null) {\n\t\t\treturn capability;\n\t\t}\n\t\treturn EShapeCapability.PRIMITIVE;\n\t}\n\n\tstatic contains(shape: EShape | null | undefined, target: EShapeCapability): boolean {\n\t\tif (shape != null) {\n\t\t\tlet capability = this.get(shape.type);\n\n\t\t\tconst shapeCapability = shape.getCapability();\n\t\t\tif (shapeCapability != null) {\n\t\t\t\tcapability = (capability & ~shapeCapability.removed) | shapeCapability.added;\n\t\t\t}\n\n\t\t\tif (capability & target) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (capability & EShapeCapability.CHILDREN) {\n\t\t\t\tconst children = shape.children;\n\t\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\t\tif (this.contains(children[i], target)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tstatic set(type: EShapeType, capability: EShapeCapability): void {\n\t\tthis.mappings[type] = capability;\n\t}\n}\n"]}
|
|
@@ -1,51 +1,37 @@
|
|
|
1
1
|
import { EShapeCapability } from "./e-shape-capability";
|
|
2
2
|
var EShapeCapabilityContainerImpl = /** @class */ (function () {
|
|
3
3
|
function EShapeCapabilityContainerImpl() {
|
|
4
|
-
this.
|
|
5
|
-
this.
|
|
4
|
+
this.added = EShapeCapability.NONE;
|
|
5
|
+
this.removed = EShapeCapability.NONE;
|
|
6
6
|
}
|
|
7
|
-
EShapeCapabilityContainerImpl.prototype.contains = function (target) {
|
|
8
|
-
if (this._removed & target) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
if (this._added & target) {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
7
|
EShapeCapabilityContainerImpl.prototype.add = function (target) {
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
8
|
+
this.removed &= ~target;
|
|
9
|
+
this.added |= target;
|
|
10
|
+
return this;
|
|
18
11
|
};
|
|
19
12
|
EShapeCapabilityContainerImpl.prototype.remove = function (target) {
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
13
|
+
this.added &= ~target;
|
|
14
|
+
this.removed |= target;
|
|
15
|
+
return this;
|
|
22
16
|
};
|
|
23
|
-
EShapeCapabilityContainerImpl.prototype.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this._removed = target._removed;
|
|
27
|
-
}
|
|
17
|
+
EShapeCapabilityContainerImpl.prototype.clear = function () {
|
|
18
|
+
this.added = EShapeCapability.NONE;
|
|
19
|
+
this.removed = EShapeCapability.NONE;
|
|
28
20
|
return this;
|
|
29
21
|
};
|
|
30
|
-
EShapeCapabilityContainerImpl.prototype.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (added !== EShapeCapability.NONE && removed !== EShapeCapability.NONE) {
|
|
34
|
-
return manager.addResource(JSON.stringify([added, removed]));
|
|
22
|
+
EShapeCapabilityContainerImpl.prototype.set = function (added, removed) {
|
|
23
|
+
if (added != null) {
|
|
24
|
+
this.added = added;
|
|
35
25
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
EShapeCapabilityContainerImpl.prototype.deserialize = function (target, manager) {
|
|
39
|
-
var resources = manager.resources;
|
|
40
|
-
if (0 <= target && target < resources.length) {
|
|
41
|
-
var parsed = manager.getCapability(target);
|
|
42
|
-
if (parsed == null) {
|
|
43
|
-
parsed = JSON.parse(resources[target]);
|
|
44
|
-
manager.setCapability(target, parsed);
|
|
45
|
-
}
|
|
46
|
-
this._added = parsed[0];
|
|
47
|
-
this._removed = parsed[1];
|
|
26
|
+
if (removed != null) {
|
|
27
|
+
this.removed = removed;
|
|
48
28
|
}
|
|
29
|
+
return this;
|
|
30
|
+
};
|
|
31
|
+
EShapeCapabilityContainerImpl.prototype.copy = function (target) {
|
|
32
|
+
this.added = target.added;
|
|
33
|
+
this.removed = target.removed;
|
|
34
|
+
return this;
|
|
49
35
|
};
|
|
50
36
|
return EShapeCapabilityContainerImpl;
|
|
51
37
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-capability-container-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-capability-container-impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"e-shape-capability-container-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-capability-container-impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD;IAIC;QACC,IAAI,CAAC,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;IACtC,CAAC;IAED,2CAAG,GAAH,UAAI,MAAwB;QAC3B,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC;QACxB,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,8CAAM,GAAN,UAAO,MAAwB;QAC9B,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC;QACvB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,6CAAK,GAAL;QACC,IAAI,CAAC,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;QACrC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,2CAAG,GAAH,UAAI,KAAwB,EAAE,OAA0B;QACvD,IAAI,KAAK,IAAI,IAAI,EAAE;YAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACnB;QACD,IAAI,OAAO,IAAI,IAAI,EAAE;YACpB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;SACvB;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,4CAAI,GAAJ,UAAK,MAAiC;QACrC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,OAAO,IAAI,CAAC;IACb,CAAC;IACF,oCAAC;AAAD,CAAC,AA1CD,IA0CC","sourcesContent":["import { EShapeCapability } from \"./e-shape-capability\";\nimport { EShapeCapabilityContainer } from \"./e-shape-capability-container\";\n\nexport class EShapeCapabilityContainerImpl implements EShapeCapabilityContainer {\n\tadded: EShapeCapability;\n\tremoved: EShapeCapability;\n\n\tconstructor() {\n\t\tthis.added = EShapeCapability.NONE;\n\t\tthis.removed = EShapeCapability.NONE;\n\t}\n\n\tadd(target: EShapeCapability): this {\n\t\tthis.removed &= ~target;\n\t\tthis.added |= target;\n\t\treturn this;\n\t}\n\n\tremove(target: EShapeCapability): this {\n\t\tthis.added &= ~target;\n\t\tthis.removed |= target;\n\t\treturn this;\n\t}\n\n\tclear(): this {\n\t\tthis.added = EShapeCapability.NONE;\n\t\tthis.removed = EShapeCapability.NONE;\n\t\treturn this;\n\t}\n\n\tset(added?: EShapeCapability, removed?: EShapeCapability): this {\n\t\tif (added != null) {\n\t\t\tthis.added = added;\n\t\t}\n\t\tif (removed != null) {\n\t\t\tthis.removed = removed;\n\t\t}\n\t\treturn this;\n\t}\n\n\tcopy(target: EShapeCapabilityContainer): this {\n\t\tthis.added = target.added;\n\t\tthis.removed = target.removed;\n\t\treturn this;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-capability-container.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-capability-container.ts"],"names":[],"mappings":"","sourcesContent":["import { EShapeCapability } from \"./e-shape-capability\";\
|
|
1
|
+
{"version":3,"file":"e-shape-capability-container.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-capability-container.ts"],"names":[],"mappings":"","sourcesContent":["import { EShapeCapability } from \"./e-shape-capability\";\n\nexport interface EShapeCapabilityContainer {\n\tadded: EShapeCapability;\n\tremoved: EShapeCapability;\n\n\tadd(target: EShapeCapability): this;\n\tremove(target: EShapeCapability): this;\n\tclear(): this;\n\n\tset(added?: EShapeCapability, removed?: EShapeCapability): this;\n\tcopy(target: EShapeCapabilityContainer): this;\n}\n"]}
|
|
@@ -11,6 +11,7 @@ var STATE = 32;
|
|
|
11
11
|
var IMAGE = 64;
|
|
12
12
|
var DATA = 128;
|
|
13
13
|
var CONNECTOR = 256;
|
|
14
|
+
var CAPABILITY = 512;
|
|
14
15
|
export var EShapeCopyPart = {
|
|
15
16
|
NONE: 0,
|
|
16
17
|
TRANSFORM: TRANSFORM,
|
|
@@ -24,6 +25,7 @@ export var EShapeCopyPart = {
|
|
|
24
25
|
/** @deprecated in favor of {@link DATA} */
|
|
25
26
|
TAG: DATA,
|
|
26
27
|
CONNECTOR: CONNECTOR,
|
|
27
|
-
|
|
28
|
+
CAPABILITY: CAPABILITY,
|
|
29
|
+
ALL: TRANSFORM | SIZE | STYLE | ACTION | POINTS | STATE | IMAGE | DATA | CONNECTOR | CAPABILITY
|
|
28
30
|
};
|
|
29
31
|
//# sourceMappingURL=e-shape-copy-part.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-copy-part.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-copy-part.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,IAAM,SAAS,GAAG,CAAC,CAAC;AACpB,IAAM,IAAI,GAAG,CAAC,CAAC;AACf,IAAM,KAAK,GAAG,CAAC,CAAC;AAChB,IAAM,MAAM,GAAG,CAAC,CAAC;AACjB,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,IAAM,IAAI,GAAG,GAAG,CAAC;AACjB,IAAM,SAAS,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"e-shape-copy-part.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-copy-part.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,IAAM,SAAS,GAAG,CAAC,CAAC;AACpB,IAAM,IAAI,GAAG,CAAC,CAAC;AACf,IAAM,KAAK,GAAG,CAAC,CAAC;AAChB,IAAM,MAAM,GAAG,CAAC,CAAC;AACjB,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,IAAM,IAAI,GAAG,GAAG,CAAC;AACjB,IAAM,SAAS,GAAG,GAAG,CAAC;AACtB,IAAM,UAAU,GAAG,GAAG,CAAC;AAEvB,MAAM,CAAC,IAAM,cAAc,GAAG;IAC7B,IAAI,EAAE,CAAC;IACP,SAAS,WAAA;IACT,IAAI,MAAA;IACJ,KAAK,OAAA;IACL,MAAM,QAAA;IACN,MAAM,QAAA;IACN,KAAK,OAAA;IACL,KAAK,OAAA;IACL,IAAI,MAAA;IACJ,2CAA2C;IAC3C,GAAG,EAAE,IAAI;IACT,SAAS,WAAA;IACT,UAAU,YAAA;IACV,GAAG,EAAE,SAAS,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU;CACtF,CAAC","sourcesContent":["/*\n * Copyright (C) 2021 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nconst TRANSFORM = 1;\nconst SIZE = 2;\nconst STYLE = 4;\nconst ACTION = 8;\nconst POINTS = 16;\nconst STATE = 32;\nconst IMAGE = 64;\nconst DATA = 128;\nconst CONNECTOR = 256;\nconst CAPABILITY = 512;\n\nexport const EShapeCopyPart = {\n\tNONE: 0,\n\tTRANSFORM,\n\tSIZE,\n\tSTYLE,\n\tACTION,\n\tPOINTS,\n\tSTATE,\n\tIMAGE,\n\tDATA,\n\t/** @deprecated in favor of {@link DATA} */\n\tTAG: DATA,\n\tCONNECTOR,\n\tCAPABILITY,\n\tALL: TRANSFORM | SIZE | STYLE | ACTION | POINTS | STATE | IMAGE | DATA | CONNECTOR | CAPABILITY\n} as const;\n\nexport type EShapeCopyPart = number;\n"]}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { isString } from "../../util/is-string";
|
|
6
6
|
import { deserializeActionValues } from "../action/deserialize-action-values";
|
|
7
|
+
import { EShapeCapability } from "../e-shape-capability";
|
|
7
8
|
import { deserialize } from "./deserialize";
|
|
8
9
|
import { deserializeGradient } from "./deserialize-gradient";
|
|
9
10
|
import { toImageElement } from "./to-image-element";
|
|
@@ -68,8 +69,21 @@ export var deserializeBase = function (item, manager, result) {
|
|
|
68
69
|
var item26 = item[26];
|
|
69
70
|
result.uuid = item26 != null ? item26 : 0;
|
|
70
71
|
var item27 = item[27];
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
var item28 = item[28];
|
|
73
|
+
if (item27 != null && EShapeCapability.NONE !== item27) {
|
|
74
|
+
if (item28 != null && EShapeCapability.NONE !== item28) {
|
|
75
|
+
var capability = result.capability;
|
|
76
|
+
capability.added = item27;
|
|
77
|
+
capability.removed = item28;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
result.capability.added = item27;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
if (item28 != null && EShapeCapability.NONE !== item28) {
|
|
85
|
+
result.capability.removed = item28;
|
|
86
|
+
}
|
|
73
87
|
}
|
|
74
88
|
var children = deserializeChildren(item[20], manager, result);
|
|
75
89
|
deserializeActionValues(item[17], manager, result);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserialize-base.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-base.ts"],"names":[],"mappings":"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AAC,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAChE,uBAAuB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACnD,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/C,IAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAE1D,IAAI,QAAQ,IAAI,IAAI,EAAE;QACrB,IAAI,KAAK,IAAI,IAAI,EAAE;YAClB,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC1C,OAAO,MAAM,CAAC;YACf,CAAC,CAAC,CAAC;SACH;aAAM;YACN,OAAO,QAAQ,CAAC;SAChB;KACD;SAAM;QACN,IAAI,KAAK,IAAI,IAAI,EAAE;YAClB,OAAO,KAAK,CAAC;SACb;aAAM;YACN,OAAO,MAAM,CAAC;SACd;KACD;AACF,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { isString } from \"../../util/is-string\";\nimport { deserializeActionValues } from \"../action/deserialize-action-values\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeCapability } from \"../e-shape-capability\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { deserialize } from \"./deserialize\";\nimport { deserializeGradient } from \"./deserialize-gradient\";\nimport { toImageElement } from \"./to-image-element\";\nimport { toSizeNormalized } from \"./to-size-normalized\";\n\nconst deserializeChildren = <SHAPE extends EShape>(\n\tserializeds: DDiagramSerializedItem[],\n\tmanager: EShapeResourceManagerDeserialization,\n\tresult: SHAPE\n): Promise<SHAPE> | null => {\n\tif (0 < serializeds.length) {\n\t\tconst deserializeds = [];\n\t\tfor (let i = 0, imax = serializeds.length; i < imax; ++i) {\n\t\t\tdeserializeds.push(deserialize(serializeds[i], manager));\n\t\t}\n\t\treturn Promise.all(deserializeds).then((children: EShape[]): SHAPE => {\n\t\t\tresult.children = children;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tchildren[i].parent = result;\n\t\t\t}\n\t\t\tresult.onChildTransformChange();\n\t\t\tresult.toDirty();\n\t\t\treturn result;\n\t\t});\n\t}\n\treturn null;\n};\n\nconst deserializeImage = <SHAPE extends EShape>(\n\tindex: number,\n\tmanager: EShapeResourceManagerDeserialization,\n\tresult: SHAPE\n): Promise<SHAPE> | null => {\n\tconst resources = manager.resources;\n\tif (0 <= index && index < resources.length) {\n\t\tconst imageSrc = resources[index];\n\t\tif (isString(imageSrc)) {\n\t\t\treturn toImageElement(imageSrc).then((imageElement) => {\n\t\t\t\tresult.image = imageElement;\n\t\t\t\treturn result;\n\t\t\t});\n\t\t}\n\t}\n\treturn null;\n};\n\nexport const deserializeBase = <SHAPE extends EShape>(\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization,\n\tresult: SHAPE\n): Promise<SHAPE> | SHAPE => {\n\tconst resources = manager.resources;\n\tresult.id = resources[item[1]] || \"\";\n\tconst transform = result.transform;\n\ttransform.position.set(item[2], item[3]);\n\ttransform.rotation = item[6];\n\ttransform.skew.set(item[7], item[7]);\n\ttransform.pivot.set(item[21], item[22]);\n\tresult.size.set(toSizeNormalized(item[4]), toSizeNormalized(item[5]));\n\tresult.fill.deserialize(item[8], manager);\n\tresult.stroke.deserialize(item[9], manager);\n\tconst item10 = item[10];\n\tresult.cursor = 0 <= item10 ? resources[item10] : undefined;\n\tresult.text.deserialize(item[11], manager);\n\tresult.data.deserialize(item[12], manager);\n\tresult.radius = item[13];\n\tresult.corner = item[14];\n\tconst item23 = item[23];\n\tresult.interactive = !!(item23 & 1);\n\tconst state = result.state;\n\tstate.isFocusable = !(item23 & 2);\n\tstate.isActive = !!(item23 & 4);\n\tconst item24 = item[24];\n\tresult.shortcut = 0 <= item24 ? resources[item24] : undefined;\n\tconst item25 = item[25];\n\tresult.title = 0 <= item25 ? resources[item25] : undefined;\n\tconst item26 = item[26];\n\tresult.uuid = item26 != null ? item26 : 0;\n\tconst item27 = item[27];\n\tconst item28 = item[28];\n\tif (item27 != null && EShapeCapability.NONE !== item27) {\n\t\tif (item28 != null && EShapeCapability.NONE !== item28) {\n\t\t\tconst capability = result.capability;\n\t\t\tcapability.added = item27;\n\t\t\tcapability.removed = item28;\n\t\t} else {\n\t\t\tresult.capability.added = item27;\n\t\t}\n\t} else {\n\t\tif (item28 != null && EShapeCapability.NONE !== item28) {\n\t\t\tresult.capability.removed = item28;\n\t\t}\n\t}\n\n\tconst children = deserializeChildren(item[20], manager, result);\n\tdeserializeActionValues(item[17], manager, result);\n\tdeserializeGradient(item[19], manager, result);\n\tconst image = deserializeImage(item[18], manager, result);\n\n\tif (children != null) {\n\t\tif (image != null) {\n\t\t\treturn Promise.all([children, image]).then(() => {\n\t\t\t\treturn result;\n\t\t\t});\n\t\t} else {\n\t\t\treturn children;\n\t\t}\n\t} else {\n\t\tif (image != null) {\n\t\t\treturn image;\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n};\n"]}
|
|
@@ -15,6 +15,7 @@ import { EShapeBaseHitTestData } from "./e-shape-base-hit-test-data";
|
|
|
15
15
|
import { hitTestBBox } from "./hit-test-bbox";
|
|
16
16
|
import { toGradientSerialized } from "./to-gradient-serialized";
|
|
17
17
|
import { EShapeCapabilityContainerImpl } from "../e-shape-capability-container-impl";
|
|
18
|
+
import { EShapeCapability } from "../e-shape-capability";
|
|
18
19
|
var EShapeBase = /** @class */ (function (_super) {
|
|
19
20
|
__extends(EShapeBase, _super);
|
|
20
21
|
function EShapeBase(type) {
|
|
@@ -328,8 +329,13 @@ var EShapeBase = /** @class */ (function (_super) {
|
|
|
328
329
|
var cursorId = cursor != null ? manager.addResource(cursor) : -1;
|
|
329
330
|
var title = this.title;
|
|
330
331
|
var titleId = title != null ? manager.addResource(title) : -1;
|
|
332
|
+
var capabilitiesAdded = EShapeCapability.NONE;
|
|
333
|
+
var capabilitiesRemoved = EShapeCapability.NONE;
|
|
331
334
|
var capability = this._capability;
|
|
332
|
-
|
|
335
|
+
if (capability != null) {
|
|
336
|
+
capabilitiesAdded = capability.added;
|
|
337
|
+
capabilitiesRemoved = capability.removed;
|
|
338
|
+
}
|
|
333
339
|
return [
|
|
334
340
|
this.type,
|
|
335
341
|
manager.addResource(this.id),
|
|
@@ -358,7 +364,8 @@ var EShapeBase = /** @class */ (function (_super) {
|
|
|
358
364
|
shortcutId,
|
|
359
365
|
titleId,
|
|
360
366
|
this.uuid,
|
|
361
|
-
|
|
367
|
+
capabilitiesAdded,
|
|
368
|
+
capabilitiesRemoved
|
|
362
369
|
];
|
|
363
370
|
};
|
|
364
371
|
EShapeBase.prototype.addUuid = function (manager) {
|
|
@@ -753,6 +760,18 @@ var EShapeBase = /** @class */ (function (_super) {
|
|
|
753
760
|
}
|
|
754
761
|
}
|
|
755
762
|
}
|
|
763
|
+
if (part & EShapeCopyPart.CAPABILITY) {
|
|
764
|
+
var sourceCapability = source.getCapability();
|
|
765
|
+
if (sourceCapability != null) {
|
|
766
|
+
this.capability.copy(sourceCapability);
|
|
767
|
+
}
|
|
768
|
+
else {
|
|
769
|
+
var capability = this._capability;
|
|
770
|
+
if (capability != null) {
|
|
771
|
+
capability.clear();
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
756
775
|
return this;
|
|
757
776
|
};
|
|
758
777
|
return EShapeBase;
|