@wcardinal/wcardinal-ui 0.150.2 → 0.151.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/types/wcardinal/ui/shape/action/{e-shape-action-value-deserializer.d.ts → deserialize-action-value.d.ts} +1 -4
  2. package/dist/types/wcardinal/ui/shape/action/index.d.ts +1 -1
  3. package/dist/types/wcardinal/ui/shape/e-shape-deserializers.d.ts +15 -4
  4. package/dist/types/wcardinal/ui/shape/index.d.ts +0 -3
  5. package/dist/types/wcardinal/ui/shape/variant/deserialize-all.d.ts +4 -0
  6. package/dist/types/wcardinal/ui/shape/variant/deserialize-bar.d.ts +1 -1
  7. package/dist/types/wcardinal/ui/shape/variant/deserialize-base.d.ts +4 -0
  8. package/dist/types/wcardinal/ui/shape/variant/deserialize-button.d.ts +1 -1
  9. package/dist/types/wcardinal/ui/shape/variant/deserialize-circle.d.ts +1 -1
  10. package/dist/types/wcardinal/ui/shape/variant/deserialize-connector-line.d.ts +2 -2
  11. package/dist/types/wcardinal/ui/shape/variant/deserialize-gradient.d.ts +2 -0
  12. package/dist/types/wcardinal/ui/shape/variant/deserialize-group-shadowed.d.ts +1 -1
  13. package/dist/types/wcardinal/ui/shape/variant/deserialize-group.d.ts +1 -1
  14. package/dist/types/wcardinal/ui/shape/variant/deserialize-image-sdf.d.ts +1 -1
  15. package/dist/types/wcardinal/ui/shape/variant/deserialize-image.d.ts +1 -1
  16. package/dist/types/wcardinal/ui/shape/variant/deserialize-label.d.ts +1 -1
  17. package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-circles.d.ts +1 -1
  18. package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.d.ts +1 -1
  19. package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.d.ts +1 -1
  20. package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.d.ts +1 -1
  21. package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-triangles.d.ts +1 -1
  22. package/dist/types/wcardinal/ui/shape/variant/deserialize-line.d.ts +1 -1
  23. package/dist/types/wcardinal/ui/shape/variant/deserialize-null.d.ts +1 -1
  24. package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.d.ts +1 -1
  25. package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.d.ts +1 -1
  26. package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle.d.ts +1 -1
  27. package/dist/types/wcardinal/ui/shape/variant/deserialize-triangle-rounded.d.ts +1 -1
  28. package/dist/types/wcardinal/ui/shape/variant/deserialize-triangle.d.ts +1 -1
  29. package/dist/types/wcardinal/ui/shape/variant/deserialize.d.ts +4 -0
  30. package/dist/types/wcardinal/ui/shape/variant/e-shape-embeddeds.d.ts +1 -2
  31. package/dist/types/wcardinal/ui/shape/variant/index.d.ts +11 -2
  32. package/dist/types/wcardinal/ui/shape/variant/to-gradient-image-url.d.ts +2 -0
  33. package/dist/types/wcardinal/ui/shape/variant/to-gradient-serialized.d.ts +2 -0
  34. package/dist/types/wcardinal/ui/shape/variant/to-image-element.d.ts +1 -0
  35. package/dist/types/wcardinal/ui/shape/variant/to-resized.d.ts +3 -0
  36. package/dist/types/wcardinal/ui/shape/variant/to-size-normalized.d.ts +1 -0
  37. package/dist/types/wcardinal/ui/shape/variant/to-size-rounded.d.ts +1 -0
  38. package/dist/wcardinal/ui/d-diagrams.js +2 -2
  39. package/dist/wcardinal/ui/d-diagrams.js.map +1 -1
  40. package/dist/wcardinal/ui/shape/action/deserialize-action-value.js +109 -0
  41. package/dist/wcardinal/ui/shape/action/deserialize-action-value.js.map +1 -0
  42. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.js +2 -2
  43. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.js.map +1 -1
  44. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-relative.js +2 -2
  45. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-relative.js.map +1 -1
  46. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-absolute.js +2 -2
  47. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-absolute.js.map +1 -1
  48. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-relative.js +2 -2
  49. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-relative.js.map +1 -1
  50. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-absolute.js +2 -2
  51. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-absolute.js.map +1 -1
  52. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-relative.js +2 -2
  53. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-relative.js.map +1 -1
  54. package/dist/wcardinal/ui/shape/action/index.js +1 -1
  55. package/dist/wcardinal/ui/shape/action/index.js.map +1 -1
  56. package/dist/wcardinal/ui/shape/e-shape-deserializers.js +7 -1
  57. package/dist/wcardinal/ui/shape/e-shape-deserializers.js.map +1 -1
  58. package/dist/wcardinal/ui/shape/e-shape-transforms.js +3 -3
  59. package/dist/wcardinal/ui/shape/e-shape-transforms.js.map +1 -1
  60. package/dist/wcardinal/ui/shape/index.js +0 -3
  61. package/dist/wcardinal/ui/shape/index.js.map +1 -1
  62. package/dist/wcardinal/ui/shape/load/load-shape-connector-line.js +3 -3
  63. package/dist/wcardinal/ui/shape/load/load-shape-connector-line.js.map +1 -1
  64. package/dist/wcardinal/ui/shape/variant/create-image-sdf.js +3 -3
  65. package/dist/wcardinal/ui/shape/variant/create-image-sdf.js.map +1 -1
  66. package/dist/wcardinal/ui/shape/variant/create-image.js +2 -2
  67. package/dist/wcardinal/ui/shape/variant/create-image.js.map +1 -1
  68. package/dist/wcardinal/ui/shape/variant/deserialize-all.js +32 -0
  69. package/dist/wcardinal/ui/shape/variant/deserialize-all.js.map +1 -0
  70. package/dist/wcardinal/ui/shape/variant/deserialize-bar.js +4 -4
  71. package/dist/wcardinal/ui/shape/variant/deserialize-bar.js.map +1 -1
  72. package/dist/wcardinal/ui/shape/variant/deserialize-base.js +100 -0
  73. package/dist/wcardinal/ui/shape/variant/deserialize-base.js.map +1 -0
  74. package/dist/wcardinal/ui/shape/variant/deserialize-button.js +4 -5
  75. package/dist/wcardinal/ui/shape/variant/deserialize-button.js.map +1 -1
  76. package/dist/wcardinal/ui/shape/variant/deserialize-circle.js +3 -3
  77. package/dist/wcardinal/ui/shape/variant/deserialize-circle.js.map +1 -1
  78. package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js +4 -4
  79. package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js.map +1 -1
  80. package/dist/wcardinal/ui/shape/variant/deserialize-embedded.js +15 -2
  81. package/dist/wcardinal/ui/shape/variant/deserialize-embedded.js.map +1 -1
  82. package/dist/wcardinal/ui/shape/variant/deserialize-gradient.js +34 -0
  83. package/dist/wcardinal/ui/shape/variant/deserialize-gradient.js.map +1 -0
  84. package/dist/wcardinal/ui/shape/variant/deserialize-group-shadowed.js +4 -4
  85. package/dist/wcardinal/ui/shape/variant/deserialize-group-shadowed.js.map +1 -1
  86. package/dist/wcardinal/ui/shape/variant/deserialize-group.js +4 -4
  87. package/dist/wcardinal/ui/shape/variant/deserialize-group.js.map +1 -1
  88. package/dist/wcardinal/ui/shape/variant/deserialize-image-sdf.js +3 -3
  89. package/dist/wcardinal/ui/shape/variant/deserialize-image-sdf.js.map +1 -1
  90. package/dist/wcardinal/ui/shape/variant/deserialize-image.js +3 -3
  91. package/dist/wcardinal/ui/shape/variant/deserialize-image.js.map +1 -1
  92. package/dist/wcardinal/ui/shape/variant/deserialize-label.js +3 -3
  93. package/dist/wcardinal/ui/shape/variant/deserialize-label.js.map +1 -1
  94. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-circles.js +3 -3
  95. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-circles.js.map +1 -1
  96. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.js +3 -3
  97. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.js.map +1 -1
  98. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.js +3 -3
  99. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.js.map +1 -1
  100. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.js +3 -3
  101. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.js.map +1 -1
  102. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangles.js +3 -3
  103. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangles.js.map +1 -1
  104. package/dist/wcardinal/ui/shape/variant/deserialize-line.js +4 -4
  105. package/dist/wcardinal/ui/shape/variant/deserialize-line.js.map +1 -1
  106. package/dist/wcardinal/ui/shape/variant/deserialize-null.js +3 -3
  107. package/dist/wcardinal/ui/shape/variant/deserialize-null.js.map +1 -1
  108. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.js +3 -3
  109. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.js.map +1 -1
  110. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.js +3 -3
  111. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.js.map +1 -1
  112. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle.js +3 -3
  113. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle.js.map +1 -1
  114. package/dist/wcardinal/ui/shape/variant/deserialize-triangle-rounded.js +3 -3
  115. package/dist/wcardinal/ui/shape/variant/deserialize-triangle-rounded.js.map +1 -1
  116. package/dist/wcardinal/ui/shape/variant/deserialize-triangle.js +3 -3
  117. package/dist/wcardinal/ui/shape/variant/deserialize-triangle.js.map +1 -1
  118. package/dist/wcardinal/ui/shape/variant/deserialize.js +17 -0
  119. package/dist/wcardinal/ui/shape/variant/deserialize.js.map +1 -0
  120. package/dist/wcardinal/ui/shape/variant/e-shape-base.js +9 -2
  121. package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
  122. package/dist/wcardinal/ui/shape/variant/e-shape-embeddeds.js +0 -13
  123. package/dist/wcardinal/ui/shape/variant/e-shape-embeddeds.js.map +1 -1
  124. package/dist/wcardinal/ui/shape/variant/index.js +11 -2
  125. package/dist/wcardinal/ui/shape/variant/index.js.map +1 -1
  126. package/dist/wcardinal/ui/shape/variant/to-gradient-image-url.js +35 -0
  127. package/dist/wcardinal/ui/shape/variant/to-gradient-image-url.js.map +1 -0
  128. package/dist/wcardinal/ui/shape/variant/to-gradient-serialized.js +15 -0
  129. package/dist/wcardinal/ui/shape/variant/to-gradient-serialized.js.map +1 -0
  130. package/dist/wcardinal/ui/shape/variant/to-image-element.js +32 -0
  131. package/dist/wcardinal/ui/shape/variant/to-image-element.js.map +1 -0
  132. package/dist/wcardinal/ui/shape/variant/to-resized.js +52 -0
  133. package/dist/wcardinal/ui/shape/variant/to-resized.js.map +1 -0
  134. package/dist/wcardinal/ui/shape/variant/to-size-normalized.js +12 -0
  135. package/dist/wcardinal/ui/shape/variant/to-size-normalized.js.map +1 -0
  136. package/dist/wcardinal/ui/shape/variant/to-size-rounded.js +8 -0
  137. package/dist/wcardinal/ui/shape/variant/to-size-rounded.js.map +1 -0
  138. package/dist/wcardinal-ui-theme-dark.js +1 -1
  139. package/dist/wcardinal-ui-theme-dark.min.js +1 -1
  140. package/dist/wcardinal-ui-theme-white.js +1 -1
  141. package/dist/wcardinal-ui-theme-white.min.js +1 -1
  142. package/dist/wcardinal-ui.cjs.js +2475 -2459
  143. package/dist/wcardinal-ui.js +1910 -1894
  144. package/dist/wcardinal-ui.min.js +2 -2
  145. package/dist/wcardinal-ui.min.js.map +1 -1
  146. package/package.json +1 -1
  147. package/dist/types/wcardinal/ui/shape/e-shape-deserializer.d.ts +0 -10
  148. package/dist/types/wcardinal/ui/shape/e-shape-image-elements.d.ts +0 -6
  149. package/dist/types/wcardinal/ui/shape/e-shape-sizes.d.ts +0 -7
  150. package/dist/types/wcardinal/ui/shape/variant/e-shape-gradients.d.ts +0 -9
  151. package/dist/wcardinal/ui/shape/action/e-shape-action-value-deserializer.js +0 -115
  152. package/dist/wcardinal/ui/shape/action/e-shape-action-value-deserializer.js.map +0 -1
  153. package/dist/wcardinal/ui/shape/e-shape-deserializer.js +0 -143
  154. package/dist/wcardinal/ui/shape/e-shape-deserializer.js.map +0 -1
  155. package/dist/wcardinal/ui/shape/e-shape-image-elements.js +0 -35
  156. package/dist/wcardinal/ui/shape/e-shape-image-elements.js.map +0 -1
  157. package/dist/wcardinal/ui/shape/e-shape-sizes.js +0 -66
  158. package/dist/wcardinal/ui/shape/e-shape-sizes.js.map +0 -1
  159. package/dist/wcardinal/ui/shape/variant/e-shape-gradients.js +0 -89
  160. package/dist/wcardinal/ui/shape/variant/e-shape-gradients.js.map +0 -1
@@ -17,7 +17,4 @@ import { EShapeActionValueTransformMoveSerialized } from "./e-shape-action-value
17
17
  import { EShapeActionValueTransformResizeSerialized } from "./e-shape-action-value-transform-resize";
18
18
  import { EShapeActionValueTransformRotateSerialized } from "./e-shape-action-value-transform-rotate";
19
19
  export declare type EShapeActionValueSerialized = EShapeActionValueShowHideSerialized | EShapeActionValueBlinkSerialized | EShapeActionValueBlinkSerialized | EShapeActionValueChangeColorSerialized | EShapeActionValueChangeColorSerializedLegacy | EShapeActionValueChangeColorCodeSerialized | EShapeActionValueChangeColorCodeSerializedLegacy | EShapeActionValueChangeColorBrightnessSerialized | EShapeActionValueChangeColorBrightnessSerializedLegacy | EShapeActionValueChangeTextSerialized | EShapeActionValueChangeCursorSerialized | EShapeActionValueEmitEventSerialized | EShapeActionValueOpenSerialized | EShapeActionValueTransformMoveSerialized | EShapeActionValueTransformResizeSerialized | EShapeActionValueTransformRotateSerialized | EShapeActionValueMiscSerialized | EShapeActionValueMiscGestureSerialized | EShapeActionValueMiscLayerGestureSerialized | EShapeActionValueMiscLayerShowHideSerialized;
20
- export declare class EShapeActionValueDeserializer {
21
- static toSerialized(resource: string): EShapeActionValueSerialized | null;
22
- static deserialize(id: number, manager: EShapeResourceManagerDeserialization): EShapeActionValue;
23
- }
20
+ export declare const deserializeActionValue: (id: number, manager: EShapeResourceManagerDeserialization) => EShapeActionValue;
@@ -1,3 +1,4 @@
1
+ export * from "./deserialize-action-value";
1
2
  export * from "./e-shape-action-bases";
2
3
  export * from "./e-shape-action-expression";
3
4
  export * from "./e-shape-action-expressions";
@@ -73,7 +74,6 @@ export * from "./e-shape-action-value-change-color";
73
74
  export * from "./e-shape-action-value-change-cursor";
74
75
  export * from "./e-shape-action-value-change-text-type";
75
76
  export * from "./e-shape-action-value-change-text";
76
- export * from "./e-shape-action-value-deserializer";
77
77
  export * from "./e-shape-action-value-emit-event";
78
78
  export * from "./e-shape-action-value-misc-emit-event";
79
79
  export * from "./e-shape-action-value-misc-gesture-type";
@@ -2,12 +2,23 @@ import { DDiagramSerializedItem } from "../d-diagram-serialized";
2
2
  import { EShape } from "./e-shape";
3
3
  import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
4
4
  import { EShapeUuidMapping } from "./e-shape-uuid-mapping";
5
- declare type EShapeDeserializer = (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShape> | EShape | null;
5
+ /**
6
+ * A shape deserializer
7
+ */
8
+ export declare type EShapeDeserializer = (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShape> | EShape | null;
9
+ /**
10
+ * Mappings of shape types and deserializers.
11
+ */
6
12
  export declare const EShapeDeserializers: {
7
13
  [type: number]: EShapeDeserializer | undefined;
8
14
  };
9
- declare type EShapeOnDeserialized = (item: DDiagramSerializedItem, shape: EShape, mapping: EShapeUuidMapping, manager: EShapeResourceManagerDeserialization) => void;
10
- export declare const EShapeOnDeserialized: {
15
+ /**
16
+ * A handler which is called after the deserializations of all the shapes are completed.
17
+ */
18
+ export declare type EShapeOnDeserialized = (item: DDiagramSerializedItem, shape: EShape, mapping: EShapeUuidMapping, manager: EShapeResourceManagerDeserialization) => void;
19
+ /**
20
+ * Mappings of shape types and `onDeserialized` handlers.
21
+ */
22
+ export declare const EShapeOnDeserializeds: {
11
23
  [type: number]: EShapeOnDeserialized | undefined;
12
24
  };
13
- export {};
@@ -31,12 +31,10 @@ export * from "./e-shape-data-value";
31
31
  export * from "./e-shape-data";
32
32
  export * from "./e-shape-defaults";
33
33
  export * from "./e-shape-deleter";
34
- export * from "./e-shape-deserializer";
35
34
  export * from "./e-shape-deserializers";
36
35
  export * from "./e-shape-editor";
37
36
  export * from "./e-shape-fill";
38
37
  export * from "./e-shape-gradient";
39
- export * from "./e-shape-image-elements";
40
38
  export * from "./e-shape-layer-container";
41
39
  export * from "./e-shape-layer-state";
42
40
  export * from "./e-shape-layer";
@@ -64,7 +62,6 @@ export * from "./e-shape-resource-manager-serialization";
64
62
  export * from "./e-shape-runtime";
65
63
  export * from "./e-shape-runtimes";
66
64
  export * from "./e-shape-search";
67
- export * from "./e-shape-sizes";
68
65
  export * from "./e-shape-state-set-impl-observable";
69
66
  export * from "./e-shape-state-set";
70
67
  export * from "./e-shape-state";
@@ -0,0 +1,4 @@
1
+ import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
+ import { EShape } from "../e-shape";
3
+ import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
4
+ export declare const deserializeAll: (serializeds: DDiagramSerializedItem[], manager: EShapeResourceManagerDeserialization) => Promise<EShape[]> | null;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeBar } from "./e-shape-bar";
4
- export declare const deserializeBar: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeBar> | EShapeBar;
4
+ export declare const deserializeBar: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeBar | undefined) => Promise<EShapeBar> | EShapeBar;
@@ -0,0 +1,4 @@
1
+ import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
+ import { EShape } from "../e-shape";
3
+ import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
4
+ export declare const deserializeBase: <SHAPE extends EShape>(item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, result: SHAPE) => SHAPE | Promise<SHAPE>;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeButton } from "./e-shape-button";
4
- export declare const deserializeButton: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeButton> | EShapeButton;
4
+ export declare const deserializeButton: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeButton | undefined) => Promise<EShapeButton> | EShapeButton;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeCircle } from "./e-shape-circle";
4
- export declare const deserializeCircle: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeCircle> | EShapeCircle;
4
+ export declare const deserializeCircle: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeCircle | undefined) => Promise<EShapeCircle> | EShapeCircle;
@@ -3,5 +3,5 @@ import { EShape } from "../e-shape";
3
3
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
4
4
  import { EShapeUuidMapping } from "../e-shape-uuid-mapping";
5
5
  import { EShapeConnectorLine } from "./e-shape-connector-line";
6
- export declare const deserializeConnectorLine: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeConnectorLine> | EShapeConnectorLine | null;
7
- export declare const onConnectorLineDeserialized: (item: DDiagramSerializedItem, shape: EShape, mapping: EShapeUuidMapping, manager: EShapeResourceManagerDeserialization) => void;
6
+ export declare const deserializeConnectorLine: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeConnectorLine | undefined) => Promise<EShapeConnectorLine> | EShapeConnectorLine | null;
7
+ export declare const onDeserializedConnectorLine: (item: DDiagramSerializedItem, shape: EShape, mapping: EShapeUuidMapping, manager: EShapeResourceManagerDeserialization) => void;
@@ -0,0 +1,2 @@
1
+ import { EShapeGradientLike } from "../e-shape-gradient";
2
+ export declare const deserializeGradient: (target: string) => EShapeGradientLike | undefined;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeGroupShadowed } from "./e-shape-group-shadowed";
4
- export declare const deserializeGroupShadowed: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeGroupShadowed> | EShapeGroupShadowed;
4
+ export declare const deserializeGroupShadowed: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeGroupShadowed | undefined) => Promise<EShapeGroupShadowed> | EShapeGroupShadowed;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeGroup } from "./e-shape-group";
4
- export declare const deserializeGroup: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeGroup> | EShapeGroup;
4
+ export declare const deserializeGroup: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeGroup | undefined) => Promise<EShapeGroup> | EShapeGroup;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeImageSdf } from "./e-shape-image-sdf";
4
- export declare const deserializeImageSdf: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeImageSdf> | EShapeImageSdf;
4
+ export declare const deserializeImageSdf: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeImageSdf | undefined) => Promise<EShapeImageSdf> | EShapeImageSdf;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeImage } from "./e-shape-image";
4
- export declare const deserializeImage: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeImage> | EShapeImage;
4
+ export declare const deserializeImage: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeImage | undefined) => Promise<EShapeImage> | EShapeImage;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeLabel } from "./e-shape-label";
4
- export declare const deserializeLabel: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeLabel> | EShapeLabel;
4
+ export declare const deserializeLabel: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeLabel | undefined) => Promise<EShapeLabel> | EShapeLabel;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeLineOfCircles } from "./e-shape-line-of-circles";
4
- export declare const deserializeLineOfCircles: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeLineOfCircles> | EShapeLineOfCircles;
4
+ export declare const deserializeLineOfCircles: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeLineOfCircles | undefined) => Promise<EShapeLineOfCircles> | EShapeLineOfCircles;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeLineOfRectangleRoundeds } from "./e-shape-line-of-rectangle-roundeds";
4
- export declare const deserializeLineOfRectangleRoundeds: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeLineOfRectangleRoundeds> | EShapeLineOfRectangleRoundeds;
4
+ export declare const deserializeLineOfRectangleRoundeds: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeLineOfRectangleRoundeds | undefined) => Promise<EShapeLineOfRectangleRoundeds> | EShapeLineOfRectangleRoundeds;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeLineOfRectangles } from "./e-shape-line-of-rectangles";
4
- export declare const deserializeLineOfRectangles: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeLineOfRectangles> | EShapeLineOfRectangles;
4
+ export declare const deserializeLineOfRectangles: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeLineOfRectangles | undefined) => Promise<EShapeLineOfRectangles> | EShapeLineOfRectangles;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeLineOfTriangleRoundeds } from "./e-shape-line-of-triangle-roundeds";
4
- export declare const deserializeLineOfTriangleRoundeds: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeLineOfTriangleRoundeds> | EShapeLineOfTriangleRoundeds;
4
+ export declare const deserializeLineOfTriangleRoundeds: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeLineOfTriangleRoundeds | undefined) => Promise<EShapeLineOfTriangleRoundeds> | EShapeLineOfTriangleRoundeds;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeLineOfTriangles } from "./e-shape-line-of-triangles";
4
- export declare const deserializeLineOfTriangles: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeLineOfTriangles> | EShapeLineOfTriangles;
4
+ export declare const deserializeLineOfTriangles: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeLineOfTriangles | undefined) => Promise<EShapeLineOfTriangles> | EShapeLineOfTriangles;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeLine } from "./e-shape-line";
4
- export declare const deserializeLine: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeLine> | EShapeLine | null;
4
+ export declare const deserializeLine: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeLine | undefined) => Promise<EShapeLine> | EShapeLine | null;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeNull } from "./e-shape-null";
4
- export declare const deserializeNull: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeNull> | EShapeNull;
4
+ export declare const deserializeNull: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeNull | undefined) => Promise<EShapeNull> | EShapeNull;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeRectanglePivoted } from "./e-shape-rectangle-pivoted";
4
- export declare const deserializeRectanglePivoted: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeRectanglePivoted> | EShapeRectanglePivoted;
4
+ export declare const deserializeRectanglePivoted: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeRectanglePivoted | undefined) => Promise<EShapeRectanglePivoted> | EShapeRectanglePivoted;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeRectangleRounded } from "./e-shape-rectangle-rounded";
4
- export declare const deserializeRectangleRounded: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeRectangleRounded> | EShapeRectangleRounded;
4
+ export declare const deserializeRectangleRounded: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeRectangleRounded | undefined) => Promise<EShapeRectangleRounded> | EShapeRectangleRounded;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeRectangle } from "./e-shape-rectangle";
4
- export declare const deserializeRectangle: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeRectangle> | EShapeRectangle;
4
+ export declare const deserializeRectangle: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeRectangle | undefined) => Promise<EShapeRectangle> | EShapeRectangle;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeTriangleRounded } from "./e-shape-triangle-rounded";
4
- export declare const deserializeTriangleRounded: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeTriangleRounded> | EShapeTriangleRounded;
4
+ export declare const deserializeTriangleRounded: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeTriangleRounded | undefined) => Promise<EShapeTriangleRounded> | EShapeTriangleRounded;
@@ -1,4 +1,4 @@
1
1
  import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
2
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
3
3
  import { EShapeTriangle } from "./e-shape-triangle";
4
- export declare const deserializeTriangle: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShapeTriangle> | EShapeTriangle;
4
+ export declare const deserializeTriangle: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeTriangle | undefined) => Promise<EShapeTriangle> | EShapeTriangle;
@@ -0,0 +1,4 @@
1
+ import { DDiagramSerializedItem } from "../../d-diagram-serialized";
2
+ import { EShape } from "../e-shape";
3
+ import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
4
+ export declare const deserialize: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization) => Promise<EShape> | EShape;
@@ -1,11 +1,10 @@
1
1
  import { DDiagramBaseController } from "../../d-diagram-base";
2
- import { DDiagramSerialized, DDiagramSerializedItem, DDiagramSerializedSimple } from "../../d-diagram-serialized";
2
+ import { DDiagramSerialized, DDiagramSerializedSimple } from "../../d-diagram-serialized";
3
3
  import { EShapeLayerContainer } from "../e-shape-layer-container";
4
4
  import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
5
5
  import { EShapeEmbedded } from "./e-shape-embedded";
6
6
  export declare class EShapeEmbeddeds {
7
7
  static from(serializedOrSimple: DDiagramSerialized | DDiagramSerializedSimple, controller: DDiagramBaseController | null | undefined, isEditMode: boolean): Promise<EShapeEmbedded>;
8
8
  private static from_;
9
- static deserialize(name: string, width: number, height: number, container: EShapeLayerContainer, manager: EShapeResourceManagerDeserialization, item: DDiagramSerializedItem): Promise<EShapeEmbedded> | EShapeEmbedded;
10
9
  static create(name: string, width: number, height: number, container: EShapeLayerContainer, manager: EShapeResourceManagerDeserialization): EShapeEmbedded;
11
10
  }
@@ -67,11 +67,14 @@ export * from "./create-rectangle-rounded-uploaded";
67
67
  export * from "./create-rectangle-uploaded";
68
68
  export * from "./create-triangle-rounded-uploaded";
69
69
  export * from "./create-triangle-uploaded";
70
+ export * from "./deserialize-all";
70
71
  export * from "./deserialize-bar";
72
+ export * from "./deserialize-base";
71
73
  export * from "./deserialize-button";
72
74
  export * from "./deserialize-circle";
73
75
  export * from "./deserialize-connector-line";
74
76
  export * from "./deserialize-embedded";
77
+ export * from "./deserialize-gradient";
75
78
  export * from "./deserialize-group-shadowed";
76
79
  export * from "./deserialize-group";
77
80
  export * from "./deserialize-image-sdf";
@@ -88,6 +91,7 @@ export * from "./deserialize-rectangle-rounded";
88
91
  export * from "./deserialize-rectangle";
89
92
  export * from "./deserialize-triangle-rounded";
90
93
  export * from "./deserialize-triangle";
94
+ export * from "./deserialize";
91
95
  export * from "./e-shape-bar-points";
92
96
  export * from "./e-shape-bar-position";
93
97
  export * from "./e-shape-bar";
@@ -109,7 +113,6 @@ export * from "./e-shape-embedded";
109
113
  export * from "./e-shape-embeddeds";
110
114
  export * from "./e-shape-fill-impl-parent";
111
115
  export * from "./e-shape-fill-impl";
112
- export * from "./e-shape-gradients";
113
116
  export * from "./e-shape-group-fill-editor";
114
117
  export * from "./e-shape-group-fill-viewer";
115
118
  export * from "./e-shape-group-points";
@@ -192,6 +195,12 @@ export * from "./hit-test-triangle";
192
195
  export * from "./is-static";
193
196
  export * from "./to-computed";
194
197
  export * from "./to-dash";
195
- export * from "./to-threshold-default";
198
+ export * from "./to-gradient-image-url";
199
+ export * from "./to-gradient-serialized";
200
+ export * from "./to-image-element";
196
201
  export * from "./to-length";
202
+ export * from "./to-resized";
197
203
  export * from "./to-scale-invariant";
204
+ export * from "./to-size-normalized";
205
+ export * from "./to-size-rounded";
206
+ export * from "./to-threshold-default";
@@ -0,0 +1,2 @@
1
+ import { EShapeGradientLike } from "../e-shape-gradient";
2
+ export declare const toGradientImageUrl: (gradient: EShapeGradientLike) => string;
@@ -0,0 +1,2 @@
1
+ import { EShapeGradientLike } from "../e-shape-gradient";
2
+ export declare const toGradientSerialized: (gradient: EShapeGradientLike) => string;
@@ -0,0 +1 @@
1
+ export declare const toImageElement: (dataUrl: string) => Promise<HTMLImageElement>;
@@ -0,0 +1,3 @@
1
+ import { IPoint } from "pixi.js";
2
+ import { EShape } from "../e-shape";
3
+ export declare const toResize: (shape: EShape, from: IPoint, to: IPoint, centerMode: boolean, isPerfect: boolean) => void;
@@ -0,0 +1 @@
1
+ export declare const toSizeNormalized: (size: number) => number;
@@ -0,0 +1 @@
1
+ export declare const toSizeRounded: (value: number) => number;
@@ -2,8 +2,8 @@
2
2
  * Copyright (C) 2019 Toshiba Corporation
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- import { EShapeDeserializer } from "./shape/e-shape-deserializer";
6
5
  import { EShapeResourceManagerDeserialization } from "./shape/e-shape-resource-manager-deserialization";
6
+ import { deserializeAll } from "./shape/variant/deserialize-all";
7
7
  import { EShapeEmbeddedDatum } from "./shape/variant/e-shape-embedded-datum";
8
8
  import { EShapeEmbeddedLayerContainer } from "./shape/variant/e-shape-embedded-layer-container";
9
9
  var DDiagrams = /** @class */ (function () {
@@ -69,7 +69,7 @@ var DDiagrams = /** @class */ (function () {
69
69
  container.deserialize(serialized.layers, manager);
70
70
  // Items
71
71
  var serializedItems = serialized.items;
72
- var shapePromises = EShapeDeserializer.deserializeAll(serializedItems, manager);
72
+ var shapePromises = deserializeAll(serializedItems, manager);
73
73
  if (shapePromises != null) {
74
74
  return shapePromises.then(function (shapes) {
75
75
  var layers = container.children;
@@ -1 +1 @@
1
- {"version":3,"file":"d-diagrams.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagrams.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,EAAE,oCAAoC,EAAE,MAAM,kDAAkD,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAEhG;IAAA;IA0KA,CAAC;IAzKO,kBAAQ,GAAf,UAAgB,UAA8B;QAC7C,OAAO;YACN,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,SAAS,EAAE,UAAU,CAAC,SAAS;YAC/B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACpB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,UAAU,EAAE,UAAU,CAAC,UAAU;gBACjC,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI;gBACxC,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,IAAI,EAAE,UAAU,CAAC,IAAI;aACrB,CAAC;SACF,CAAC;IACH,CAAC;IAEM,sBAAY,GAAnB,UAAoB,MAAqD;QACxE,IAAI,CAAC,CAAC,OAAO,IAAI,MAAM,CAAC,EAAE;YACzB,IAAM,IAAI,GAAiC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACnE,IAAM,MAAM,GAA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MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC;wBAA1C,CAAC,EAAM,IAAI;aAqBnB;SACD;QACD,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAEc,uBAAa,GAA5B,UACC,UAAkC,EAClC,IAAY,EACZ,kBAAiE,EACjE,UAAmB,EACnB,SAAkD;QALnD,iBAsBC;QAfA,IAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;QACzD,IAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC/B,IAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;QACjC,IAAM,SAAS,GAAG,IAAI,4BAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QAE9E,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,mBAAmB,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;QAE7E,IAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;QACjC,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;YACxE,OAAO,KAAI,CAAC,QAAQ,CACnB,UAAU,EACV,SAAS,EACT,IAAI,oCAAoC,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CACnF,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IACF,gBAAC;AAAD,CAAC,AA1KD,IA0KC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramBaseController } from \"./d-diagram-base\";\nimport { DDiagramLayerContainer } from \"./d-diagram-layer-container\";\nimport {\n\tDDiagramSerialized,\n\tDDiagramSerializedSimple,\n\tDDiagramSerializedSimpleData\n} from \"./d-diagram-serialized\";\nimport { EShape } from \"./shape/e-shape\";\nimport { EShapeDeserializer } from \"./shape/e-shape-deserializer\";\nimport { EShapeLayerContainer } from \"./shape/e-shape-layer-container\";\nimport { EShapeResourceManagerDeserialization } from \"./shape/e-shape-resource-manager-deserialization\";\nimport { EShapeEmbeddedDatum } from \"./shape/variant/e-shape-embedded-datum\";\nimport { EShapeEmbeddedLayerContainer } from \"./shape/variant/e-shape-embedded-layer-container\";\n\nexport class DDiagrams {\n\tstatic toSimple(serialized: DDiagramSerialized): DDiagramSerializedSimple {\n\t\treturn {\n\t\t\tversion: serialized.version,\n\t\t\tid: serialized.id,\n\t\t\tname: serialized.name,\n\t\t\tthumbnail: serialized.thumbnail,\n\t\t\tdata: JSON.stringify({\n\t\t\t\twidth: serialized.width,\n\t\t\t\theight: serialized.height,\n\t\t\t\tbackground: serialized.background,\n\t\t\t\ttile: serialized.tile,\n\t\t\t\tresources: serialized.resources,\n\t\t\t\tdata: serialized.data || serialized.tags,\n\t\t\t\tpieces: serialized.pieces,\n\t\t\t\tlayers: serialized.layers,\n\t\t\t\titems: serialized.items,\n\t\t\t\tsnap: serialized.snap\n\t\t\t})\n\t\t};\n\t}\n\n\tstatic toSerialized(target: DDiagramSerializedSimple | DDiagramSerialized): DDiagramSerialized {\n\t\tif (!(\"items\" in target)) {\n\t\t\tconst data: DDiagramSerializedSimpleData = JSON.parse(target.data);\n\t\t\tconst result: DDiagramSerialized = {\n\t\t\t\tversion: target.version,\n\t\t\t\tid: target.id,\n\t\t\t\tname: target.name,\n\t\t\t\twidth: data.width,\n\t\t\t\theight: data.height,\n\t\t\t\tbackground: data.background,\n\t\t\t\ttile: data.tile,\n\t\t\t\tresources: data.resources,\n\t\t\t\tdata: data.data || data.tags,\n\t\t\t\tpieces: data.pieces,\n\t\t\t\tlayers: data.layers,\n\t\t\t\titems: data.items,\n\t\t\t\tsnap: data.snap,\n\t\t\t\tthumbnail: target.thumbnail\n\t\t\t};\n\t\t\tif (result.data == null) {\n\t\t\t\tconst tags = target.tags;\n\t\t\t\tif (tags != null) {\n\t\t\t\t\tresult.data = JSON.parse(tags);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result.pieces == null) {\n\t\t\t\tconst pieces = target.pieces;\n\t\t\t\tif (pieces != null) {\n\t\t\t\t\tresult.pieces = JSON.parse(pieces);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\treturn target;\n\t}\n\n\tstatic newLayer(\n\t\tserialized: DDiagramSerialized,\n\t\tcontainer: DDiagramLayerContainer | EShapeLayerContainer,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): Promise<EShape[]> {\n\t\t// Layers\n\t\tcontainer.deserialize(serialized.layers, manager);\n\n\t\t// Items\n\t\tconst serializedItems = serialized.items;\n\t\tconst shapePromises = EShapeDeserializer.deserializeAll(serializedItems, manager);\n\t\tif (shapePromises != null) {\n\t\t\treturn shapePromises.then((shapes: EShape[]): EShape[] => {\n\t\t\t\tconst layers = container.children;\n\t\t\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\t\t\tconst serializedItem = serializedItems[i];\n\t\t\t\t\tconst shape = shapes[i];\n\t\t\t\t\tconst layer = layers[serializedItem[16]];\n\t\t\t\t\tif (layer != null) {\n\t\t\t\t\t\tshape.parent = layer;\n\t\t\t\t\t\tshape.uploaded = undefined;\n\t\t\t\t\t\tlayer.children.push(shape);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (let i = 0, imax = layers.length; i < imax; ++i) {\n\t\t\t\t\tconst layer = layers[i];\n\t\t\t\t\tlayer.onChildTransformChange();\n\t\t\t\t\tlayer.toDirty();\n\t\t\t\t\tconst children = layer.children;\n\t\t\t\t\tfor (let j = 0, jmax = children.length; j < jmax; ++j) {\n\t\t\t\t\t\tchildren[j].onAttach();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn shapes;\n\t\t\t});\n\t\t} else {\n\t\t\treturn Promise.resolve([]);\n\t\t}\n\t}\n\n\tstatic toPieceData(\n\t\tcontroller: DDiagramBaseController | null | undefined,\n\t\tpieces: string[] | null | undefined,\n\t\tisEditMode: boolean\n\t): Promise<Map<string, EShapeEmbeddedDatum | null>> {\n\t\tconst result = new Map<string, EShapeEmbeddedDatum | null>();\n\t\tconst onFulfilled = () => {\n\t\t\treturn result;\n\t\t};\n\t\treturn this.toPieceData_(controller, pieces, result, isEditMode).then(\n\t\t\tonFulfilled,\n\t\t\tonFulfilled\n\t\t);\n\t}\n\n\tprivate static toPieceData_(\n\t\tcontroller: DDiagramBaseController | null | undefined,\n\t\tpieces: string[] | null | undefined,\n\t\tpieceData: Map<string, EShapeEmbeddedDatum | null>,\n\t\tisEditMode: boolean\n\t): Promise<Array<EShape[] | null>> {\n\t\tconst promises: Array<Promise<EShape[] | null>> = [];\n\t\tif (pieces && 0 < pieces.length && controller) {\n\t\t\tfor (let i = 0, imax = pieces.length; i < imax; ++i) {\n\t\t\t\tconst piece = pieces[i];\n\t\t\t\tif (!pieceData.has(piece)) {\n\t\t\t\t\tpieceData.set(piece, null);\n\t\t\t\t\tpromises.push(\n\t\t\t\t\t\tcontroller.piece.getByName(piece).then(\n\t\t\t\t\t\t\t(found) => {\n\t\t\t\t\t\t\t\treturn this.toPieceData__(\n\t\t\t\t\t\t\t\t\tcontroller,\n\t\t\t\t\t\t\t\t\tpiece,\n\t\t\t\t\t\t\t\t\tfound,\n\t\t\t\t\t\t\t\t\tisEditMode,\n\t\t\t\t\t\t\t\t\tpieceData\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn Promise.all(promises);\n\t}\n\n\tprivate static toPieceData__(\n\t\tcontroller: DDiagramBaseController,\n\t\tname: string,\n\t\tserializedOrSimple: DDiagramSerialized | DDiagramSerializedSimple,\n\t\tisEditMode: boolean,\n\t\tpieceData: Map<string, EShapeEmbeddedDatum | null>\n\t): Promise<EShape[]> {\n\t\tconst serialized = this.toSerialized(serializedOrSimple);\n\t\tconst width = serialized.width;\n\t\tconst height = serialized.height;\n\t\tconst container = new EShapeEmbeddedLayerContainer(width, height, isEditMode);\n\n\t\tpieceData.set(name, new EShapeEmbeddedDatum(name, width, height, container));\n\n\t\tconst pieces = serialized.pieces;\n\t\treturn this.toPieceData_(controller, pieces, pieceData, isEditMode).then(() => {\n\t\t\treturn this.newLayer(\n\t\t\t\tserialized,\n\t\t\t\tcontainer,\n\t\t\t\tnew EShapeResourceManagerDeserialization(serialized, pieces, pieceData, isEditMode)\n\t\t\t);\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-diagrams.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagrams.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,EAAE,oCAAoC,EAAE,MAAM,kDAAkD,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAEhG;IAAA;IA0KA,CAAC;IAzKO,kBAAQ,GAAf,UAAgB,UAA8B;QAC7C,OAAO;YACN,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,SAAS,EAAE,UAAU,CAAC,SAAS;YAC/B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACpB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,UAAU,EAAE,UAAU,CAAC,UAAU;gBACjC,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,SAAS,EAAE,UAAU,CAAC,SA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,QAAQ,CACnB,UAAU,EACV,SAAS,EACT,IAAI,oCAAoC,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CACnF,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IACF,gBAAC;AAAD,CAAC,AA1KD,IA0KC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramBaseController } from \"./d-diagram-base\";\nimport { DDiagramLayerContainer } from \"./d-diagram-layer-container\";\nimport {\n\tDDiagramSerialized,\n\tDDiagramSerializedSimple,\n\tDDiagramSerializedSimpleData\n} from \"./d-diagram-serialized\";\nimport { EShape } from \"./shape/e-shape\";\nimport { EShapeLayerContainer } from \"./shape/e-shape-layer-container\";\nimport { EShapeResourceManagerDeserialization } from \"./shape/e-shape-resource-manager-deserialization\";\nimport { deserializeAll } from \"./shape/variant/deserialize-all\";\nimport { EShapeEmbeddedDatum } from \"./shape/variant/e-shape-embedded-datum\";\nimport { EShapeEmbeddedLayerContainer } from \"./shape/variant/e-shape-embedded-layer-container\";\n\nexport class DDiagrams {\n\tstatic toSimple(serialized: DDiagramSerialized): DDiagramSerializedSimple {\n\t\treturn {\n\t\t\tversion: serialized.version,\n\t\t\tid: serialized.id,\n\t\t\tname: serialized.name,\n\t\t\tthumbnail: serialized.thumbnail,\n\t\t\tdata: JSON.stringify({\n\t\t\t\twidth: serialized.width,\n\t\t\t\theight: serialized.height,\n\t\t\t\tbackground: serialized.background,\n\t\t\t\ttile: serialized.tile,\n\t\t\t\tresources: serialized.resources,\n\t\t\t\tdata: serialized.data || serialized.tags,\n\t\t\t\tpieces: serialized.pieces,\n\t\t\t\tlayers: serialized.layers,\n\t\t\t\titems: serialized.items,\n\t\t\t\tsnap: serialized.snap\n\t\t\t})\n\t\t};\n\t}\n\n\tstatic toSerialized(target: DDiagramSerializedSimple | DDiagramSerialized): DDiagramSerialized {\n\t\tif (!(\"items\" in target)) {\n\t\t\tconst data: DDiagramSerializedSimpleData = JSON.parse(target.data);\n\t\t\tconst result: DDiagramSerialized = {\n\t\t\t\tversion: target.version,\n\t\t\t\tid: target.id,\n\t\t\t\tname: target.name,\n\t\t\t\twidth: data.width,\n\t\t\t\theight: data.height,\n\t\t\t\tbackground: data.background,\n\t\t\t\ttile: data.tile,\n\t\t\t\tresources: data.resources,\n\t\t\t\tdata: data.data || data.tags,\n\t\t\t\tpieces: data.pieces,\n\t\t\t\tlayers: data.layers,\n\t\t\t\titems: data.items,\n\t\t\t\tsnap: data.snap,\n\t\t\t\tthumbnail: target.thumbnail\n\t\t\t};\n\t\t\tif (result.data == null) {\n\t\t\t\tconst tags = target.tags;\n\t\t\t\tif (tags != null) {\n\t\t\t\t\tresult.data = JSON.parse(tags);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result.pieces == null) {\n\t\t\t\tconst pieces = target.pieces;\n\t\t\t\tif (pieces != null) {\n\t\t\t\t\tresult.pieces = JSON.parse(pieces);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\treturn target;\n\t}\n\n\tstatic newLayer(\n\t\tserialized: DDiagramSerialized,\n\t\tcontainer: DDiagramLayerContainer | EShapeLayerContainer,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): Promise<EShape[]> {\n\t\t// Layers\n\t\tcontainer.deserialize(serialized.layers, manager);\n\n\t\t// Items\n\t\tconst serializedItems = serialized.items;\n\t\tconst shapePromises = deserializeAll(serializedItems, manager);\n\t\tif (shapePromises != null) {\n\t\t\treturn shapePromises.then((shapes: EShape[]): EShape[] => {\n\t\t\t\tconst layers = container.children;\n\t\t\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\t\t\tconst serializedItem = serializedItems[i];\n\t\t\t\t\tconst shape = shapes[i];\n\t\t\t\t\tconst layer = layers[serializedItem[16]];\n\t\t\t\t\tif (layer != null) {\n\t\t\t\t\t\tshape.parent = layer;\n\t\t\t\t\t\tshape.uploaded = undefined;\n\t\t\t\t\t\tlayer.children.push(shape);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (let i = 0, imax = layers.length; i < imax; ++i) {\n\t\t\t\t\tconst layer = layers[i];\n\t\t\t\t\tlayer.onChildTransformChange();\n\t\t\t\t\tlayer.toDirty();\n\t\t\t\t\tconst children = layer.children;\n\t\t\t\t\tfor (let j = 0, jmax = children.length; j < jmax; ++j) {\n\t\t\t\t\t\tchildren[j].onAttach();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn shapes;\n\t\t\t});\n\t\t} else {\n\t\t\treturn Promise.resolve([]);\n\t\t}\n\t}\n\n\tstatic toPieceData(\n\t\tcontroller: DDiagramBaseController | null | undefined,\n\t\tpieces: string[] | null | undefined,\n\t\tisEditMode: boolean\n\t): Promise<Map<string, EShapeEmbeddedDatum | null>> {\n\t\tconst result = new Map<string, EShapeEmbeddedDatum | null>();\n\t\tconst onFulfilled = () => {\n\t\t\treturn result;\n\t\t};\n\t\treturn this.toPieceData_(controller, pieces, result, isEditMode).then(\n\t\t\tonFulfilled,\n\t\t\tonFulfilled\n\t\t);\n\t}\n\n\tprivate static toPieceData_(\n\t\tcontroller: DDiagramBaseController | null | undefined,\n\t\tpieces: string[] | null | undefined,\n\t\tpieceData: Map<string, EShapeEmbeddedDatum | null>,\n\t\tisEditMode: boolean\n\t): Promise<Array<EShape[] | null>> {\n\t\tconst promises: Array<Promise<EShape[] | null>> = [];\n\t\tif (pieces && 0 < pieces.length && controller) {\n\t\t\tfor (let i = 0, imax = pieces.length; i < imax; ++i) {\n\t\t\t\tconst piece = pieces[i];\n\t\t\t\tif (!pieceData.has(piece)) {\n\t\t\t\t\tpieceData.set(piece, null);\n\t\t\t\t\tpromises.push(\n\t\t\t\t\t\tcontroller.piece.getByName(piece).then(\n\t\t\t\t\t\t\t(found) => {\n\t\t\t\t\t\t\t\treturn this.toPieceData__(\n\t\t\t\t\t\t\t\t\tcontroller,\n\t\t\t\t\t\t\t\t\tpiece,\n\t\t\t\t\t\t\t\t\tfound,\n\t\t\t\t\t\t\t\t\tisEditMode,\n\t\t\t\t\t\t\t\t\tpieceData\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn Promise.all(promises);\n\t}\n\n\tprivate static toPieceData__(\n\t\tcontroller: DDiagramBaseController,\n\t\tname: string,\n\t\tserializedOrSimple: DDiagramSerialized | DDiagramSerializedSimple,\n\t\tisEditMode: boolean,\n\t\tpieceData: Map<string, EShapeEmbeddedDatum | null>\n\t): Promise<EShape[]> {\n\t\tconst serialized = this.toSerialized(serializedOrSimple);\n\t\tconst width = serialized.width;\n\t\tconst height = serialized.height;\n\t\tconst container = new EShapeEmbeddedLayerContainer(width, height, isEditMode);\n\n\t\tpieceData.set(name, new EShapeEmbeddedDatum(name, width, height, container));\n\n\t\tconst pieces = serialized.pieces;\n\t\treturn this.toPieceData_(controller, pieces, pieceData, isEditMode).then(() => {\n\t\t\treturn this.newLayer(\n\t\t\t\tserialized,\n\t\t\t\tcontainer,\n\t\t\t\tnew EShapeResourceManagerDeserialization(serialized, pieces, pieceData, isEditMode)\n\t\t\t);\n\t\t});\n\t}\n}\n"]}
@@ -0,0 +1,109 @@
1
+ /*
2
+ * Copyright (C) 2019 Toshiba Corporation
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { isArray } from "../../util/is-array";
6
+ import { isNumber } from "../../util/is-number";
7
+ import { EShapeActionValueBlink } from "./e-shape-action-value-blink";
8
+ import { EShapeActionValueChangeColor } from "./e-shape-action-value-change-color";
9
+ import { EShapeActionValueChangeColorBrightness } from "./e-shape-action-value-change-color-brightness";
10
+ import { EShapeActionValueChangeColorCode } from "./e-shape-action-value-change-color-code";
11
+ import { EShapeActionValueChangeColorTarget } from "./e-shape-action-value-change-color-target";
12
+ import { EShapeActionValueChangeCursor } from "./e-shape-action-value-change-cursor";
13
+ import { EShapeActionValueChangeText } from "./e-shape-action-value-change-text";
14
+ import { EShapeActionValueEmitEvent } from "./e-shape-action-value-emit-event";
15
+ import { EShapeActionValueMisc } from "./e-shape-action-value-misc";
16
+ import { EShapeActionValueMiscGesture } from "./e-shape-action-value-misc-gesture";
17
+ import { EShapeActionValueMiscLayerGesture } from "./e-shape-action-value-misc-layer-gesture";
18
+ import { EShapeActionValueMiscLayerShowHide } from "./e-shape-action-value-misc-layer-show-hide";
19
+ import { EShapeActionValueMiscType } from "./e-shape-action-value-misc-type";
20
+ import { EShapeActionValueOpen } from "./e-shape-action-value-open";
21
+ import { EShapeActionValueShowHide } from "./e-shape-action-value-show-hide";
22
+ import { EShapeActionValueShowHideType } from "./e-shape-action-value-show-hide-type";
23
+ import { EShapeActionValueTransformMove } from "./e-shape-action-value-transform-move";
24
+ import { EShapeActionValueTransformResize } from "./e-shape-action-value-transform-resize";
25
+ import { EShapeActionValueTransformRotate } from "./e-shape-action-value-transform-rotate";
26
+ import { EShapeActionValueTransformType } from "./e-shape-action-value-transform-type";
27
+ import { EShapeActionValueType } from "./e-shape-action-value-type";
28
+ var toSerialized = function (resource) {
29
+ try {
30
+ var parsed = JSON.parse(resource);
31
+ if (isArray(parsed)) {
32
+ for (var i = 0, imax = parsed.length; i < imax; ++i) {
33
+ if (!isNumber(parsed[i])) {
34
+ return null;
35
+ }
36
+ }
37
+ if (2 <= parsed.length) {
38
+ return parsed;
39
+ }
40
+ }
41
+ return null;
42
+ }
43
+ catch (e) {
44
+ return null;
45
+ }
46
+ };
47
+ export var deserializeActionValue = function (id, manager) {
48
+ var action = manager.getAction(id);
49
+ if (action != null) {
50
+ return action;
51
+ }
52
+ var resources = manager.resources;
53
+ var resource = resources[id];
54
+ if (resource != null) {
55
+ var serialized = toSerialized(resource);
56
+ if (serialized != null) {
57
+ switch (serialized[0]) {
58
+ case EShapeActionValueType.SHOW_HIDE:
59
+ return EShapeActionValueShowHide.deserialize(serialized, manager);
60
+ case EShapeActionValueType.BLINK:
61
+ return EShapeActionValueBlink.deserialize(serialized, manager);
62
+ case EShapeActionValueType.CHANGE_COLOR:
63
+ case EShapeActionValueType.CHANGE_COLOR_LEGACY:
64
+ switch (serialized[3]) {
65
+ case EShapeActionValueChangeColorTarget.COLOR_AND_ALPHA:
66
+ case EShapeActionValueChangeColorTarget.COLOR:
67
+ case EShapeActionValueChangeColorTarget.ALPHA:
68
+ return EShapeActionValueChangeColor.deserialize(serialized, manager);
69
+ case EShapeActionValueChangeColorTarget.CODE:
70
+ return EShapeActionValueChangeColorCode.deserialize(serialized, manager);
71
+ case EShapeActionValueChangeColorTarget.BRIGHTNESS:
72
+ return EShapeActionValueChangeColorBrightness.deserialize(serialized, manager);
73
+ }
74
+ break;
75
+ case EShapeActionValueType.CHANGE_TEXT:
76
+ return EShapeActionValueChangeText.deserialize(serialized, manager);
77
+ case EShapeActionValueType.CHANGE_CURSOR:
78
+ return EShapeActionValueChangeCursor.deserialize(serialized, manager);
79
+ case EShapeActionValueType.EMIT_EVENT:
80
+ return EShapeActionValueEmitEvent.deserialize(serialized, manager);
81
+ case EShapeActionValueType.OPEN:
82
+ return EShapeActionValueOpen.deserialize(serialized, manager);
83
+ case EShapeActionValueType.TRANSFORM:
84
+ switch (serialized[2]) {
85
+ case EShapeActionValueTransformType.MOVE:
86
+ return EShapeActionValueTransformMove.deserialize(serialized, manager);
87
+ case EShapeActionValueTransformType.RESIZE:
88
+ return EShapeActionValueTransformResize.deserialize(serialized, manager);
89
+ case EShapeActionValueTransformType.ROTATE:
90
+ return EShapeActionValueTransformRotate.deserialize(serialized, manager);
91
+ }
92
+ break;
93
+ case EShapeActionValueType.MISC:
94
+ switch (serialized[2]) {
95
+ case EShapeActionValueMiscType.GESTURE:
96
+ return EShapeActionValueMiscGesture.deserialize(serialized, manager);
97
+ case EShapeActionValueMiscType.LAYER_SHOW_HIDE:
98
+ return EShapeActionValueMiscLayerShowHide.deserialize(serialized, manager);
99
+ case EShapeActionValueMiscType.LAYER_GESTURE:
100
+ return EShapeActionValueMiscLayerGesture.deserialize(serialized, manager);
101
+ default:
102
+ return EShapeActionValueMisc.deserialize(serialized, manager);
103
+ }
104
+ }
105
+ }
106
+ }
107
+ return new EShapeActionValueShowHide(EShapeActionValueShowHideType.SHOW, "");
108
+ };
109
+ //# sourceMappingURL=deserialize-action-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deserialize-action-value.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/deserialize-action-value.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EACN,sBAAsB,EAEtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,4BAA4B,EAG5B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACN,sCAAsC,EAGtC,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACN,gCAAgC,EAGhC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAChG,OAAO,EACN,6BAA6B,EAE7B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACN,2BAA2B,EAE3B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACN,0BAA0B,EAE1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACN,qBAAqB,EAErB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACN,4BAA4B,EAE5B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACN,iCAAiC,EAEjC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACN,kCAAkC,EAElC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAA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B,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBACpE,KAAK,qBAAqB,CAAC,IAAI;oBAC9B,OAAO,qBAAqB,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBAC/D,KAAK,qBAAqB,CAAC,SAAS;oBACnC,QAAQ,UAAU,CAAC,CAAC,CAAC,EAAE;wBACtB,KAAK,8BAA8B,CAAC,IAAI;4BACvC,OAAO,8BAA8B,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;wBACxE,KAAK,8BAA8B,CAAC,MAAM;4BACzC,OAAO,gCAAgC,CAAC,WAAW,CAClD,UAAU,EACV,OAAO,CACP,CAAC;wBACH,KAAK,8BAA8B,CAAC,MAAM;4BACzC,OAAO,gCAAgC,CAAC,WAAW,CAClD,UAAU,EACV,OAAO,CACP,CAAC;qBACH;oBACD,MAAM;gBACP,KAAK,qBAAqB,CAAC,IAAI;oBAC9B,QAAQ,UAAU,CAAC,CAAC,CAAC,EAAE;wBACtB,KAAK,yBAAyB,CAAC,OAAO;4BACrC,OAAO,4BAA4B,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;wBACtE,KAAK,yBAAyB,CAAC,eAAe;4BAC7C,OAAO,kCAAkC,CAAC,WAAW,CACpD,UAAU,EACV,OAAO,CACP,CAAC;wBACH,KAAK,yBAAyB,CAAC,aAAa;4BAC3C,OAAO,iCAAiC,CAAC,WAAW,CACnD,UAAU,EACV,OAAO,CACP,CAAC;wBACH;4BACC,OAAO,qBAAqB,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;qBAC/D;aACF;SACD;KACD;IACD,OAAO,IAAI,yBAAyB,CAAC,6BAA6B,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC9E,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { isArray } from \"../../util/is-array\";\nimport { isNumber } from \"../../util/is-number\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { EShapeActionValue } from \"./e-shape-action-value\";\nimport {\n\tEShapeActionValueBlink,\n\tEShapeActionValueBlinkSerialized\n} from \"./e-shape-action-value-blink\";\nimport {\n\tEShapeActionValueChangeColor,\n\tEShapeActionValueChangeColorSerialized,\n\tEShapeActionValueChangeColorSerializedLegacy\n} from \"./e-shape-action-value-change-color\";\nimport {\n\tEShapeActionValueChangeColorBrightness,\n\tEShapeActionValueChangeColorBrightnessSerialized,\n\tEShapeActionValueChangeColorBrightnessSerializedLegacy\n} from \"./e-shape-action-value-change-color-brightness\";\nimport {\n\tEShapeActionValueChangeColorCode,\n\tEShapeActionValueChangeColorCodeSerialized,\n\tEShapeActionValueChangeColorCodeSerializedLegacy\n} from \"./e-shape-action-value-change-color-code\";\nimport { EShapeActionValueChangeColorTarget } from \"./e-shape-action-value-change-color-target\";\nimport {\n\tEShapeActionValueChangeCursor,\n\tEShapeActionValueChangeCursorSerialized\n} from \"./e-shape-action-value-change-cursor\";\nimport {\n\tEShapeActionValueChangeText,\n\tEShapeActionValueChangeTextSerialized\n} from \"./e-shape-action-value-change-text\";\nimport {\n\tEShapeActionValueEmitEvent,\n\tEShapeActionValueEmitEventSerialized\n} from \"./e-shape-action-value-emit-event\";\nimport {\n\tEShapeActionValueMisc,\n\tEShapeActionValueMiscSerialized\n} from \"./e-shape-action-value-misc\";\nimport {\n\tEShapeActionValueMiscGesture,\n\tEShapeActionValueMiscGestureSerialized\n} from \"./e-shape-action-value-misc-gesture\";\nimport {\n\tEShapeActionValueMiscLayerGesture,\n\tEShapeActionValueMiscLayerGestureSerialized\n} from \"./e-shape-action-value-misc-layer-gesture\";\nimport {\n\tEShapeActionValueMiscLayerShowHide,\n\tEShapeActionValueMiscLayerShowHideSerialized\n} from \"./e-shape-action-value-misc-layer-show-hide\";\nimport { EShapeActionValueMiscType } from \"./e-shape-action-value-misc-type\";\nimport {\n\tEShapeActionValueOpen,\n\tEShapeActionValueOpenSerialized\n} from \"./e-shape-action-value-open\";\nimport {\n\tEShapeActionValueShowHide,\n\tEShapeActionValueShowHideSerialized\n} from \"./e-shape-action-value-show-hide\";\nimport { EShapeActionValueShowHideType } from \"./e-shape-action-value-show-hide-type\";\nimport {\n\tEShapeActionValueTransformMove,\n\tEShapeActionValueTransformMoveSerialized\n} from \"./e-shape-action-value-transform-move\";\nimport {\n\tEShapeActionValueTransformResize,\n\tEShapeActionValueTransformResizeSerialized\n} from \"./e-shape-action-value-transform-resize\";\nimport {\n\tEShapeActionValueTransformRotate,\n\tEShapeActionValueTransformRotateSerialized\n} from \"./e-shape-action-value-transform-rotate\";\nimport { EShapeActionValueTransformType } from \"./e-shape-action-value-transform-type\";\nimport { EShapeActionValueType } from \"./e-shape-action-value-type\";\n\nexport type EShapeActionValueSerialized =\n\t| EShapeActionValueShowHideSerialized\n\t| EShapeActionValueBlinkSerialized\n\t| EShapeActionValueBlinkSerialized\n\t| EShapeActionValueChangeColorSerialized\n\t| EShapeActionValueChangeColorSerializedLegacy\n\t| EShapeActionValueChangeColorCodeSerialized\n\t| EShapeActionValueChangeColorCodeSerializedLegacy\n\t| EShapeActionValueChangeColorBrightnessSerialized\n\t| EShapeActionValueChangeColorBrightnessSerializedLegacy\n\t| EShapeActionValueChangeTextSerialized\n\t| EShapeActionValueChangeCursorSerialized\n\t| EShapeActionValueEmitEventSerialized\n\t| EShapeActionValueOpenSerialized\n\t| EShapeActionValueTransformMoveSerialized\n\t| EShapeActionValueTransformResizeSerialized\n\t| EShapeActionValueTransformRotateSerialized\n\t| EShapeActionValueMiscSerialized\n\t| EShapeActionValueMiscGestureSerialized\n\t| EShapeActionValueMiscLayerGestureSerialized\n\t| EShapeActionValueMiscLayerShowHideSerialized;\n\nconst toSerialized = (resource: string): EShapeActionValueSerialized | null => {\n\ttry {\n\t\tconst parsed = JSON.parse(resource);\n\t\tif (isArray(parsed)) {\n\t\t\tfor (let i = 0, imax = parsed.length; i < imax; ++i) {\n\t\t\t\tif (!isNumber(parsed[i])) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 <= parsed.length) {\n\t\t\t\treturn parsed as EShapeActionValueSerialized;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t} catch (e) {\n\t\treturn null;\n\t}\n};\n\nexport const deserializeActionValue = (\n\tid: number,\n\tmanager: EShapeResourceManagerDeserialization\n): EShapeActionValue => {\n\tconst action = manager.getAction(id);\n\tif (action != null) {\n\t\treturn action;\n\t}\n\n\tconst resources = manager.resources;\n\tconst resource = resources[id];\n\tif (resource != null) {\n\t\tconst serialized = toSerialized(resource);\n\t\tif (serialized != null) {\n\t\t\tswitch (serialized[0]) {\n\t\t\t\tcase EShapeActionValueType.SHOW_HIDE:\n\t\t\t\t\treturn EShapeActionValueShowHide.deserialize(serialized, manager);\n\t\t\t\tcase EShapeActionValueType.BLINK:\n\t\t\t\t\treturn EShapeActionValueBlink.deserialize(serialized, manager);\n\t\t\t\tcase EShapeActionValueType.CHANGE_COLOR:\n\t\t\t\tcase EShapeActionValueType.CHANGE_COLOR_LEGACY:\n\t\t\t\t\tswitch (serialized[3]) {\n\t\t\t\t\t\tcase EShapeActionValueChangeColorTarget.COLOR_AND_ALPHA:\n\t\t\t\t\t\tcase EShapeActionValueChangeColorTarget.COLOR:\n\t\t\t\t\t\tcase EShapeActionValueChangeColorTarget.ALPHA:\n\t\t\t\t\t\t\treturn EShapeActionValueChangeColor.deserialize(serialized, manager);\n\t\t\t\t\t\tcase EShapeActionValueChangeColorTarget.CODE:\n\t\t\t\t\t\t\treturn EShapeActionValueChangeColorCode.deserialize(\n\t\t\t\t\t\t\t\tserialized,\n\t\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tcase EShapeActionValueChangeColorTarget.BRIGHTNESS:\n\t\t\t\t\t\t\treturn EShapeActionValueChangeColorBrightness.deserialize(\n\t\t\t\t\t\t\t\tserialized,\n\t\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase EShapeActionValueType.CHANGE_TEXT:\n\t\t\t\t\treturn EShapeActionValueChangeText.deserialize(serialized, manager);\n\t\t\t\tcase EShapeActionValueType.CHANGE_CURSOR:\n\t\t\t\t\treturn EShapeActionValueChangeCursor.deserialize(serialized, manager);\n\t\t\t\tcase EShapeActionValueType.EMIT_EVENT:\n\t\t\t\t\treturn EShapeActionValueEmitEvent.deserialize(serialized, manager);\n\t\t\t\tcase EShapeActionValueType.OPEN:\n\t\t\t\t\treturn EShapeActionValueOpen.deserialize(serialized, manager);\n\t\t\t\tcase EShapeActionValueType.TRANSFORM:\n\t\t\t\t\tswitch (serialized[2]) {\n\t\t\t\t\t\tcase EShapeActionValueTransformType.MOVE:\n\t\t\t\t\t\t\treturn EShapeActionValueTransformMove.deserialize(serialized, manager);\n\t\t\t\t\t\tcase EShapeActionValueTransformType.RESIZE:\n\t\t\t\t\t\t\treturn EShapeActionValueTransformResize.deserialize(\n\t\t\t\t\t\t\t\tserialized,\n\t\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tcase EShapeActionValueTransformType.ROTATE:\n\t\t\t\t\t\t\treturn EShapeActionValueTransformRotate.deserialize(\n\t\t\t\t\t\t\t\tserialized,\n\t\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase EShapeActionValueType.MISC:\n\t\t\t\t\tswitch (serialized[2]) {\n\t\t\t\t\t\tcase EShapeActionValueMiscType.GESTURE:\n\t\t\t\t\t\t\treturn EShapeActionValueMiscGesture.deserialize(serialized, manager);\n\t\t\t\t\t\tcase EShapeActionValueMiscType.LAYER_SHOW_HIDE:\n\t\t\t\t\t\t\treturn EShapeActionValueMiscLayerShowHide.deserialize(\n\t\t\t\t\t\t\t\tserialized,\n\t\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tcase EShapeActionValueMiscType.LAYER_GESTURE:\n\t\t\t\t\t\t\treturn EShapeActionValueMiscLayerGesture.deserialize(\n\t\t\t\t\t\t\t\tserialized,\n\t\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn EShapeActionValueMisc.deserialize(serialized, manager);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn new EShapeActionValueShowHide(EShapeActionValueShowHideType.SHOW, \"\");\n};\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { __extends } from "tslib";
6
6
  import { EShapeRuntimeReset } from "../e-shape-runtime";
7
- import { EShapeSizes } from "../e-shape-sizes";
7
+ import { toSizeNormalized } from "../variant/to-size-normalized";
8
8
  import { EShapeActionRuntimeTransformResize } from "./e-shape-action-runtime-transform-resize";
9
9
  var EShapeActionRuntimeTransformResizeHeightAbsolute = /** @class */ (function (_super) {
10
10
  __extends(EShapeActionRuntimeTransformResizeHeightAbsolute, _super);
@@ -20,7 +20,7 @@ var EShapeActionRuntimeTransformResizeHeightAbsolute = /** @class */ (function (
20
20
  var size = shape.size;
21
21
  var writtenHeight = !!(runtime.written & EShapeRuntimeReset.HEIGHT);
22
22
  var oldSizeY = writtenHeight ? size.y : runtime.size.y;
23
- size.y = EShapeSizes.toNormalized(sizeAbsolute);
23
+ size.y = toSizeNormalized(sizeAbsolute);
24
24
  runtime.written |= EShapeRuntimeReset.HEIGHT;
25
25
  this.adjustPosition(shape, runtime, 0, oldSizeY - size.y, 0.5, this.origin);
26
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-action-runtime-transform-resize-height-absolute.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAA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019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime, EShapeRuntimeReset } from \"../e-shape-runtime\";\nimport { EShapeSizes } from \"../e-shape-sizes\";\nimport { EShapeActionRuntimeTransformResize } from \"./e-shape-action-runtime-transform-resize\";\nimport { EShapeActionValueTransformResize } from \"./e-shape-action-value-transform-resize\";\n\nexport class EShapeActionRuntimeTransformResizeHeightAbsolute extends EShapeActionRuntimeTransformResize {\n\tprotected origin: number;\n\n\tconstructor(value: EShapeActionValueTransformResize) {\n\t\tsuper(value, EShapeRuntimeReset.HEIGHT);\n\t\tthis.origin = value.originY;\n\t\tthis.reset |= EShapeRuntimeReset.POSITION;\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time)) {\n\t\t\tconst sizeAbsolute = this.size(shape, time);\n\t\t\tconst size = shape.size;\n\t\t\tconst writtenHeight = !!(runtime.written & EShapeRuntimeReset.HEIGHT);\n\t\t\tconst oldSizeY = writtenHeight ? size.y : runtime.size.y;\n\t\t\tsize.y = EShapeSizes.toNormalized(sizeAbsolute);\n\t\t\truntime.written |= EShapeRuntimeReset.HEIGHT;\n\t\t\tthis.adjustPosition(shape, runtime, 0, oldSizeY - size.y, 0.5, this.origin);\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"e-shape-action-runtime-transform-resize-height-absolute.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAG/F;IAAsE,oEAAkC;IAGvG,0DAAY,KAAuC;QAAnD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,SAGvC;QAFA,KAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC;QAC5B,KAAI,CAAC,KAAK,IAAI,kBAAkB,CAAC,QAAQ,CAAC;;IAC3C,CAAC;IAED,kEAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;YAChC,IAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC5C,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAM,aAAa,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;YACtE,IAAM,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACzD,IAAI,CAAC,CAAC,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;YACxC,OAAO,CAAC,OAAO,IAAI,kBAAkB,CAAC,MAAM,CAAC;YAC7C,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;SAC5E;IACF,CAAC;IACF,uDAAC;AAAD,CAAC,AApBD,CAAsE,kCAAkC,GAoBvG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime, EShapeRuntimeReset } from \"../e-shape-runtime\";\nimport { toSizeNormalized } from \"../variant/to-size-normalized\";\nimport { EShapeActionRuntimeTransformResize } from \"./e-shape-action-runtime-transform-resize\";\nimport { EShapeActionValueTransformResize } from \"./e-shape-action-value-transform-resize\";\n\nexport class EShapeActionRuntimeTransformResizeHeightAbsolute extends EShapeActionRuntimeTransformResize {\n\tprotected origin: number;\n\n\tconstructor(value: EShapeActionValueTransformResize) {\n\t\tsuper(value, EShapeRuntimeReset.HEIGHT);\n\t\tthis.origin = value.originY;\n\t\tthis.reset |= EShapeRuntimeReset.POSITION;\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time)) {\n\t\t\tconst sizeAbsolute = this.size(shape, time);\n\t\t\tconst size = shape.size;\n\t\t\tconst writtenHeight = !!(runtime.written & EShapeRuntimeReset.HEIGHT);\n\t\t\tconst oldSizeY = writtenHeight ? size.y : runtime.size.y;\n\t\t\tsize.y = toSizeNormalized(sizeAbsolute);\n\t\t\truntime.written |= EShapeRuntimeReset.HEIGHT;\n\t\t\tthis.adjustPosition(shape, runtime, 0, oldSizeY - size.y, 0.5, this.origin);\n\t\t}\n\t}\n}\n"]}