@wcardinal/wcardinal-ui 0.261.0 → 0.263.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 +5 -1
- package/dist/types/wcardinal/ui/shape/e-shape-capability-container-impl.d.ts +9 -9
- package/dist/types/wcardinal/ui/shape/e-shape-capability-container.d.ts +9 -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 +3 -16
- package/dist/wcardinal/ui/shape/e-shape-capabilities.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-capability-container-impl.js +36 -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-capability.js +3 -3
- package/dist/wcardinal/ui/shape/e-shape-capability.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 +8 -2
- package/dist/wcardinal/ui/shape/variant/deserialize-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js +24 -2
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-base.js +7 -5
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-base.js +7 -4
- package/dist/wcardinal/ui/theme/white/d-theme-white-base.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +8 -6
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +8 -5
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
- package/dist/wcardinal-ui.cjs.js +90 -70
- package/dist/wcardinal-ui.js +76 -61
- 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,12 @@ 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;
|
|
302
|
+
/** Locked capabilities */
|
|
303
|
+
[29]: number;
|
|
300
304
|
}
|
|
301
305
|
/**
|
|
302
306
|
* A serialized layer.
|
|
@@ -1,15 +1,15 @@
|
|
|
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;
|
|
6
|
+
locked: EShapeCapability;
|
|
8
7
|
constructor();
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
add(target: EShapeCapability): this;
|
|
9
|
+
remove(target: EShapeCapability): this;
|
|
10
|
+
lock(target: EShapeCapability): this;
|
|
11
|
+
unlock(target: EShapeCapability): this;
|
|
12
|
+
clear(): this;
|
|
13
|
+
set(added?: EShapeCapability, removed?: EShapeCapability, locked?: EShapeCapability): this;
|
|
12
14
|
copy(target: EShapeCapabilityContainer): this;
|
|
13
|
-
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
14
|
-
deserialize(target: number, manager: EShapeResourceManagerDeserialization): void;
|
|
15
15
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
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
|
+
locked: EShapeCapability;
|
|
6
|
+
add(target: EShapeCapability): this;
|
|
7
|
+
remove(target: EShapeCapability): this;
|
|
8
|
+
lock(target: EShapeCapability): this;
|
|
9
|
+
unlock(target: EShapeCapability): this;
|
|
10
|
+
clear(): this;
|
|
11
|
+
set(added?: EShapeCapability, removed?: EShapeCapability, locked?: EShapeCapability): this;
|
|
8
12
|
copy(target: EShapeCapabilityContainer): this;
|
|
9
|
-
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
10
|
-
deserialize(target: number, manager: EShapeResourceManagerDeserialization): void;
|
|
11
13
|
}
|
|
@@ -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\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\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,25 +15,12 @@ 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
|
-
}
|
|
24
|
-
}
|
|
25
|
-
var typeCapability = this.get(shape.type);
|
|
26
|
-
if (typeCapability & target) {
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
if (typeCapability & EShapeCapability.CHILDREN) {
|
|
30
|
-
var children = shape.children;
|
|
31
|
-
for (var i = 0, imax = children.length; i < imax; ++i) {
|
|
32
|
-
if (this.contains(children[i], target)) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
21
|
+
capability = (capability & ~shapeCapability.removed) | shapeCapability.added;
|
|
36
22
|
}
|
|
23
|
+
return (capability & target) === target;
|
|
37
24
|
}
|
|
38
25
|
return false;
|
|
39
26
|
};
|
|
@@ -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;IA0BA,CAAC;IAvBO,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;YACtC,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;YACD,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;SACxC;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;IAxBM,2BAAQ,GAAiD,EAAE,CAAC;IAyBpE,yBAAC;CAAA,AA1BD,IA0BC;SA1BY,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\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\t\t\treturn (capability & target) === target;\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,51 @@
|
|
|
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
|
+
this.locked = EShapeCapability.NONE;
|
|
6
7
|
}
|
|
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
8
|
EShapeCapabilityContainerImpl.prototype.add = function (target) {
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
9
|
+
this.removed &= ~target;
|
|
10
|
+
this.added |= target;
|
|
11
|
+
return this;
|
|
18
12
|
};
|
|
19
13
|
EShapeCapabilityContainerImpl.prototype.remove = function (target) {
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
14
|
+
this.added &= ~target;
|
|
15
|
+
this.removed |= target;
|
|
16
|
+
return this;
|
|
22
17
|
};
|
|
23
|
-
EShapeCapabilityContainerImpl.prototype.
|
|
24
|
-
|
|
25
|
-
this._added = target._added;
|
|
26
|
-
this._removed = target._removed;
|
|
27
|
-
}
|
|
18
|
+
EShapeCapabilityContainerImpl.prototype.lock = function (target) {
|
|
19
|
+
this.locked |= target;
|
|
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]));
|
|
35
|
-
}
|
|
36
|
-
return -1;
|
|
22
|
+
EShapeCapabilityContainerImpl.prototype.unlock = function (target) {
|
|
23
|
+
this.locked &= ~target;
|
|
24
|
+
return this;
|
|
37
25
|
};
|
|
38
|
-
EShapeCapabilityContainerImpl.prototype.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
this.
|
|
47
|
-
|
|
26
|
+
EShapeCapabilityContainerImpl.prototype.clear = function () {
|
|
27
|
+
this.added = EShapeCapability.NONE;
|
|
28
|
+
this.removed = EShapeCapability.NONE;
|
|
29
|
+
this.locked = EShapeCapability.NONE;
|
|
30
|
+
return this;
|
|
31
|
+
};
|
|
32
|
+
EShapeCapabilityContainerImpl.prototype.set = function (added, removed, locked) {
|
|
33
|
+
if (added != null) {
|
|
34
|
+
this.added = added;
|
|
35
|
+
}
|
|
36
|
+
if (removed != null) {
|
|
37
|
+
this.removed = removed;
|
|
38
|
+
}
|
|
39
|
+
if (locked != null) {
|
|
40
|
+
this.locked = locked;
|
|
48
41
|
}
|
|
42
|
+
return this;
|
|
43
|
+
};
|
|
44
|
+
EShapeCapabilityContainerImpl.prototype.copy = function (target) {
|
|
45
|
+
this.added = target.added;
|
|
46
|
+
this.removed = target.removed;
|
|
47
|
+
this.locked = target.locked;
|
|
48
|
+
return this;
|
|
49
49
|
};
|
|
50
50
|
return EShapeCapabilityContainerImpl;
|
|
51
51
|
}());
|
|
@@ -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;IAKC;QACC,IAAI,CAAC,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC;IACrC,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,4CAAI,GAAJ,UAAK,MAAwB;QAC5B,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,8CAAM,GAAN,UAAO,MAAwB;QAC9B,IAAI,CAAC,MAAM,IAAI,CAAC,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,IAAI,CAAC,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC;QACpC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,2CAAG,GAAH,UAAI,KAAwB,EAAE,OAA0B,EAAE,MAAyB;QAClF,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,IAAI,MAAM,IAAI,IAAI,EAAE;YACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;SACrB;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,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC;IACb,CAAC;IACF,oCAAC;AAAD,CAAC,AA3DD,IA2DC","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\tlocked: EShapeCapability;\n\n\tconstructor() {\n\t\tthis.added = EShapeCapability.NONE;\n\t\tthis.removed = EShapeCapability.NONE;\n\t\tthis.locked = 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\tlock(target: EShapeCapability): this {\n\t\tthis.locked |= target;\n\t\treturn this;\n\t}\n\n\tunlock(target: EShapeCapability): this {\n\t\tthis.locked &= ~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\tthis.locked = EShapeCapability.NONE;\n\t\treturn this;\n\t}\n\n\tset(added?: EShapeCapability, removed?: EShapeCapability, locked?: 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\tif (locked != null) {\n\t\t\tthis.locked = locked;\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\tthis.locked = target.locked;\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\tlocked: EShapeCapability;\n\n\tadd(target: EShapeCapability): this;\n\tremove(target: EShapeCapability): this;\n\tlock(target: EShapeCapability): this;\n\tunlock(target: EShapeCapability): this;\n\tclear(): this;\n\n\tset(added?: EShapeCapability, removed?: EShapeCapability, locked?: EShapeCapability): this;\n\tcopy(target: EShapeCapabilityContainer): this;\n}\n"]}
|
|
@@ -25,12 +25,12 @@ var CURSOR = 0x20000;
|
|
|
25
25
|
var ORDER_IN_LAYER = 0x40000;
|
|
26
26
|
var CHILDREN = 0x80000;
|
|
27
27
|
var DATA_MAPPING = 0x100000;
|
|
28
|
-
var COORDINATE =
|
|
28
|
+
var COORDINATE = POSITION | WIDTH | HEIGHT | ROTATION | SKEW;
|
|
29
29
|
var SHAPE = REPLACING | GROUPING | FILL | STROKE;
|
|
30
30
|
var LAYER = ORDER_IN_LAYER;
|
|
31
|
-
var PRIMITIVE = COORDINATE | SHAPE | TEXT | TEXTURE | DATA | ACTION | CURSOR | LAYER | CHILDREN;
|
|
31
|
+
var PRIMITIVE = ID | COORDINATE | SHAPE | TEXT | TEXTURE | DATA | ACTION | CURSOR | LAYER | CHILDREN;
|
|
32
32
|
var GROUP = PRIMITIVE | UNGROUPING;
|
|
33
|
-
var EMBEDDED = COORDINATE | REPLACING | GROUPING | TEXT | DATA | ACTION | LAYER | DATA_MAPPING;
|
|
33
|
+
var EMBEDDED = ID | COORDINATE | REPLACING | GROUPING | TEXT | DATA | ACTION | LAYER | DATA_MAPPING;
|
|
34
34
|
var CONNECTOR = ID | REPLACING | FILL | STROKE | TEXT | TEXTURE | DATA | ACTION | CURSOR | LAYER | CHILDREN;
|
|
35
35
|
var ALL = PRIMITIVE | STROKE_SIDE | BORDER_RADIUS | DATA_MAPPING | UNGROUPING;
|
|
36
36
|
export var EShapeCapability = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-capability.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-capability.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sCAAsC;AAEtC,IAAM,IAAI,GAAK,GAAG,CAAC;AAEnB,IAAM,EAAE,GAAK,GAAG,CAAC;AACjB,IAAM,QAAQ,GAAI,GAAG,CAAC;AACtB,IAAM,KAAK,GAAK,GAAG,CAAC;AACpB,IAAM,MAAM,GAAI,GAAG,CAAC;AACpB,IAAM,QAAQ,GAAI,IAAI,CAAC;AACvB,IAAM,IAAI,GAAK,IAAI,CAAC;AAEpB,IAAM,SAAS,GAAI,IAAI,CAAC;AACxB,IAAM,QAAQ,GAAI,IAAI,CAAC;AACvB,IAAM,UAAU,GAAG,KAAK,CAAC;AAEzB,IAAM,IAAI,GAAK,KAAK,CAAC;AACrB,IAAM,MAAM,GAAI,KAAK,CAAC;AACtB,IAAM,WAAW,GAAG,KAAK,CAAC;AAC1B,IAAM,aAAa,GAAG,MAAM,CAAC;AAE7B,IAAM,IAAI,GAAK,MAAM,CAAC;AACtB,IAAM,OAAO,GAAI,MAAM,CAAC;AACxB,IAAM,IAAI,GAAK,MAAM,CAAC;AACtB,IAAM,MAAM,GAAI,OAAO,CAAC;AACxB,IAAM,MAAM,GAAI,OAAO,CAAC;AACxB,IAAM,cAAc,GAAE,OAAO,CAAC;AAE9B,IAAM,QAAQ,GAAI,OAAO,CAAC;AAE1B,IAAM,YAAY,GAAG,QAAQ,CAAC;AAE9B,IAAM,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"e-shape-capability.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-capability.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sCAAsC;AAEtC,IAAM,IAAI,GAAK,GAAG,CAAC;AAEnB,IAAM,EAAE,GAAK,GAAG,CAAC;AACjB,IAAM,QAAQ,GAAI,GAAG,CAAC;AACtB,IAAM,KAAK,GAAK,GAAG,CAAC;AACpB,IAAM,MAAM,GAAI,GAAG,CAAC;AACpB,IAAM,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GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAC/G,IAAM,GAAG,GAAK,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,YAAY,GAAG,UAAU,CAAC;AAElF,MAAM,CAAC,IAAM,gBAAgB,GAAG;IAC/B,IAAI,MAAA;IAEJ;;OAEG;IACH,EAAE,IAAA;IAEF;;OAEG;IACH,QAAQ,UAAA;IAER;;OAEG;IACH,KAAK,OAAA;IAEL;;OAEG;IACH,MAAM,QAAA;IAEN;;OAEG;IACH,QAAQ,UAAA;IAER;;OAEG;IACH,IAAI,MAAA;IAEJ,kBAAkB;IAClB,KAAK,EAAE,IAAI;IAEX;;OAEG;IACH,SAAS,WAAA;IAET;;OAEG;IACH,QAAQ,UAAA;IAER;;OAEG;IACH,UAAU,YAAA;IAEV;;OAEG;IACH,IAAI,MAAA;IAEJ;;OAEG;IACH,MAAM,QAAA;IAEN;;OAEG;IACH,WAAW,aAAA;IAEX;;OAEG;IACH,aAAa,eAAA;IAEb;;OAEG;IACH,IAAI,MAAA;IAEJ;;OAEG;IACH,OAAO,SAAA;IAEP,2CAA2C;IAC3C,GAAG,EAAE,IAAI;IAET;;OAEG;IACH,IAAI,MAAA;IAEJ;;OAEG;IACH,YAAY,cAAA;IAEZ;;OAEG;IACH,MAAM,QAAA;IAEN;;OAEG;IACH,MAAM,QAAA;IAEN;;OAEG;IACH,cAAc,gBAAA;IAEd;;OAEG;IACH,QAAQ,UAAA;IAER,UAAU,YAAA;IACV,KAAK,OAAA;IACL,KAAK,OAAA;IACL,SAAS,WAAA;IACT,KAAK,OAAA;IACL,QAAQ,UAAA;IACR,SAAS,WAAA;IACT,GAAG,KAAA;CACM,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/* eslint-disable prettier/prettier */\n\nconst NONE\t\t\t= 0x0;\n\nconst ID\t\t\t= 0x1;\nconst POSITION\t\t= 0x2;\nconst WIDTH\t\t\t= 0x4;\nconst HEIGHT\t\t= 0x8;\nconst ROTATION\t\t= 0x10;\nconst SKEW\t\t\t= 0x20;\n\nconst REPLACING\t\t= 0x40;\nconst GROUPING\t\t= 0x80;\nconst UNGROUPING\t= 0x100;\n\nconst FILL\t\t\t= 0x200;\nconst STROKE\t\t= 0x400;\nconst STROKE_SIDE\t= 0x800;\nconst BORDER_RADIUS\t= 0x1000;\n\nconst TEXT\t\t\t= 0x2000;\nconst TEXTURE\t\t= 0x4000;\nconst DATA\t\t\t= 0x8000;\nconst ACTION\t\t= 0x10000;\nconst CURSOR\t\t= 0x20000;\nconst ORDER_IN_LAYER= 0x40000;\n\nconst CHILDREN\t\t= 0x80000;\n\nconst DATA_MAPPING\t= 0x100000;\n\nconst COORDINATE\t= POSITION | WIDTH | HEIGHT | ROTATION | SKEW;\nconst SHAPE\t\t\t= REPLACING | GROUPING | FILL | STROKE;\nconst LAYER\t\t\t= ORDER_IN_LAYER;\nconst PRIMITIVE\t\t= ID | COORDINATE | SHAPE | TEXT | TEXTURE | DATA | ACTION | CURSOR | LAYER | CHILDREN;\nconst GROUP\t\t\t= PRIMITIVE | UNGROUPING;\nconst EMBEDDED\t\t= ID | COORDINATE | REPLACING | GROUPING | TEXT | DATA | ACTION | LAYER | DATA_MAPPING;\nconst CONNECTOR\t\t= ID | REPLACING | FILL | STROKE | TEXT | TEXTURE | DATA | ACTION | CURSOR | LAYER | CHILDREN;\nconst ALL\t\t\t= PRIMITIVE | STROKE_SIDE | BORDER_RADIUS | DATA_MAPPING | UNGROUPING;\n\nexport const EShapeCapability = {\n\tNONE,\n\n\t/**\n\t * Allows shape IDs to be modified.\n\t */\n\tID,\n\n\t/**\n\t * Allows shape positions to be modified.\n\t */\n\tPOSITION,\n\n\t/**\n\t * Allows shape widths to be modified.\n\t */\n\tWIDTH,\n\n\t/**\n\t * Allows shape heights to be modified.\n\t */\n\tHEIGHT,\n\n\t/**\n\t * Allows shape rotations to be modified.\n\t */\n\tROTATION,\n\n\t/**\n\t * Allows shape skews to be modified.\n\t */\n\tSKEW,\n\n\t/** @deprecated */\n\tALIGN: NONE,\n\n\t/**\n\t * Allows shapes to be replaced with other shapes.\n\t */\n\tREPLACING,\n\n\t/**\n\t * Allows shapes to be grouped.\n\t */\n\tGROUPING,\n\n\t/**\n\t * Allows grouped shapes to be ungrouped.\n\t */\n\tUNGROUPING,\n\n\t/**\n\t * Allows shape fills to be modified.\n\t */\n\tFILL,\n\n\t/**\n\t * Allows shape strokes to be modified.\n\t */\n\tSTROKE,\n\n\t/**\n\t * Allows shape stroke sides to be modified.\n\t */\n\tSTROKE_SIDE,\n\n\t/**\n\t * Allows shape border radiuses to be modified.\n\t */\n\tBORDER_RADIUS,\n\n\t/**\n\t * Allows shape texts to be modified.\n\t */\n\tTEXT,\n\n\t/**\n\t * Allows shape textures to be modified.\n\t */\n\tTEXTURE,\n\n\t/** @deprecated in favor of {@link DATA} */\n\tTAG: DATA,\n\n\t/**\n\t * Allows shape data to be modified.\n\t */\n\tDATA,\n\n\t/**\n\t * Allows shape data mapping to be modified.\n\t */\n\tDATA_MAPPING,\n\n\t/**\n\t * Allows shape actions to be modified.\n\t */\n\tACTION,\n\n\t/**\n\t * Allows shape cursors to be modified.\n\t */\n\tCURSOR,\n\n\t/**\n\t * Allows shape orders in layer to be modified.\n\t */\n\tORDER_IN_LAYER,\n\n\t/**\n\t * Allows shape children to be modified.\n\t */\n\tCHILDREN,\n\n\tCOORDINATE,\n\tSHAPE,\n\tLAYER,\n\tPRIMITIVE,\n\tGROUP,\n\tEMBEDDED,\n\tCONNECTOR,\n\tALL\n} as const;\n\nexport type EShapeCapability = typeof EShapeCapability[keyof typeof EShapeCapability];\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,13 @@ 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
|
+
var item29 = item[29];
|
|
74
|
+
var hasItem27 = item27 != null && item27 !== EShapeCapability.NONE;
|
|
75
|
+
var hasItem28 = item28 != null && item28 !== EShapeCapability.NONE;
|
|
76
|
+
var hasItem29 = item29 != null && item29 !== EShapeCapability.NONE;
|
|
77
|
+
if (hasItem27 || hasItem28 || hasItem29) {
|
|
78
|
+
result.capability.set(item27, item28, item29);
|
|
73
79
|
}
|
|
74
80
|
var children = deserializeChildren(item[20], manager, result);
|
|
75
81
|
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":"AAAA;;;GAGG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"deserialize-base.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,E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;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\tconst item29 = item[29];\n\tconst hasItem27 = item27 != null && item27 !== EShapeCapability.NONE;\n\tconst hasItem28 = item28 != null && item28 !== EShapeCapability.NONE;\n\tconst hasItem29 = item29 != null && item29 !== EShapeCapability.NONE;\n\tif (hasItem27 || hasItem28 || hasItem29) {\n\t\tresult.capability.set(item27, item28, item29);\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,15 @@ 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;
|
|
334
|
+
var capabilitiesLocked = EShapeCapability.NONE;
|
|
331
335
|
var capability = this._capability;
|
|
332
|
-
|
|
336
|
+
if (capability != null) {
|
|
337
|
+
capabilitiesAdded = capability.added;
|
|
338
|
+
capabilitiesRemoved = capability.removed;
|
|
339
|
+
capabilitiesLocked = capability.locked;
|
|
340
|
+
}
|
|
333
341
|
return [
|
|
334
342
|
this.type,
|
|
335
343
|
manager.addResource(this.id),
|
|
@@ -358,7 +366,9 @@ var EShapeBase = /** @class */ (function (_super) {
|
|
|
358
366
|
shortcutId,
|
|
359
367
|
titleId,
|
|
360
368
|
this.uuid,
|
|
361
|
-
|
|
369
|
+
capabilitiesAdded,
|
|
370
|
+
capabilitiesRemoved,
|
|
371
|
+
capabilitiesLocked
|
|
362
372
|
];
|
|
363
373
|
};
|
|
364
374
|
EShapeBase.prototype.addUuid = function (manager) {
|
|
@@ -753,6 +763,18 @@ var EShapeBase = /** @class */ (function (_super) {
|
|
|
753
763
|
}
|
|
754
764
|
}
|
|
755
765
|
}
|
|
766
|
+
if (part & EShapeCopyPart.CAPABILITY) {
|
|
767
|
+
var sourceCapability = source.getCapability();
|
|
768
|
+
if (sourceCapability != null) {
|
|
769
|
+
this.capability.copy(sourceCapability);
|
|
770
|
+
}
|
|
771
|
+
else {
|
|
772
|
+
var capability = this._capability;
|
|
773
|
+
if (capability != null) {
|
|
774
|
+
capability.clear();
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
756
778
|
return this;
|
|
757
779
|
};
|
|
758
780
|
return EShapeBase;
|