@wcardinal/wcardinal-ui 0.149.0 → 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 (167) hide show
  1. package/dist/types/wcardinal/ui/d-view.d.ts +4 -4
  2. package/dist/types/wcardinal/ui/shape/action/{e-shape-action-value-deserializer.d.ts → deserialize-action-value.d.ts} +1 -4
  3. package/dist/types/wcardinal/ui/shape/action/index.d.ts +1 -1
  4. package/dist/types/wcardinal/ui/shape/e-shape-connector-bodies.d.ts +1 -1
  5. package/dist/types/wcardinal/ui/shape/e-shape-deserializers.d.ts +15 -4
  6. package/dist/types/wcardinal/ui/shape/index.d.ts +0 -3
  7. package/dist/types/wcardinal/ui/shape/variant/deserialize-all.d.ts +4 -0
  8. package/dist/types/wcardinal/ui/shape/variant/deserialize-bar.d.ts +1 -1
  9. package/dist/types/wcardinal/ui/shape/variant/deserialize-base.d.ts +4 -0
  10. package/dist/types/wcardinal/ui/shape/variant/deserialize-button.d.ts +1 -1
  11. package/dist/types/wcardinal/ui/shape/variant/deserialize-circle.d.ts +1 -1
  12. package/dist/types/wcardinal/ui/shape/variant/deserialize-connector-line.d.ts +2 -2
  13. package/dist/types/wcardinal/ui/shape/variant/deserialize-gradient.d.ts +2 -0
  14. package/dist/types/wcardinal/ui/shape/variant/deserialize-group-shadowed.d.ts +1 -1
  15. package/dist/types/wcardinal/ui/shape/variant/deserialize-group.d.ts +1 -1
  16. package/dist/types/wcardinal/ui/shape/variant/deserialize-image-sdf.d.ts +1 -1
  17. package/dist/types/wcardinal/ui/shape/variant/deserialize-image.d.ts +1 -1
  18. package/dist/types/wcardinal/ui/shape/variant/deserialize-label.d.ts +1 -1
  19. package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-circles.d.ts +1 -1
  20. package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.d.ts +1 -1
  21. package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.d.ts +1 -1
  22. package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.d.ts +1 -1
  23. package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-triangles.d.ts +1 -1
  24. package/dist/types/wcardinal/ui/shape/variant/deserialize-line.d.ts +1 -1
  25. package/dist/types/wcardinal/ui/shape/variant/deserialize-null.d.ts +1 -1
  26. package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.d.ts +1 -1
  27. package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.d.ts +1 -1
  28. package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle.d.ts +1 -1
  29. package/dist/types/wcardinal/ui/shape/variant/deserialize-triangle-rounded.d.ts +1 -1
  30. package/dist/types/wcardinal/ui/shape/variant/deserialize-triangle.d.ts +1 -1
  31. package/dist/types/wcardinal/ui/shape/variant/deserialize.d.ts +4 -0
  32. package/dist/types/wcardinal/ui/shape/variant/e-shape-embeddeds.d.ts +1 -2
  33. package/dist/types/wcardinal/ui/shape/variant/index.d.ts +11 -2
  34. package/dist/types/wcardinal/ui/shape/variant/to-gradient-image-url.d.ts +2 -0
  35. package/dist/types/wcardinal/ui/shape/variant/to-gradient-serialized.d.ts +2 -0
  36. package/dist/types/wcardinal/ui/shape/variant/to-image-element.d.ts +1 -0
  37. package/dist/types/wcardinal/ui/shape/variant/to-resized.d.ts +3 -0
  38. package/dist/types/wcardinal/ui/shape/variant/to-size-normalized.d.ts +1 -0
  39. package/dist/types/wcardinal/ui/shape/variant/to-size-rounded.d.ts +1 -0
  40. package/dist/wcardinal/ui/d-diagrams.js +2 -2
  41. package/dist/wcardinal/ui/d-diagrams.js.map +1 -1
  42. package/dist/wcardinal/ui/d-view.js.map +1 -1
  43. package/dist/wcardinal/ui/shape/action/deserialize-action-value.js +109 -0
  44. package/dist/wcardinal/ui/shape/action/deserialize-action-value.js.map +1 -0
  45. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.js +2 -2
  46. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.js.map +1 -1
  47. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-relative.js +2 -2
  48. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-relative.js.map +1 -1
  49. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-absolute.js +2 -2
  50. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-absolute.js.map +1 -1
  51. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-relative.js +2 -2
  52. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-relative.js.map +1 -1
  53. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-absolute.js +2 -2
  54. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-absolute.js.map +1 -1
  55. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-relative.js +2 -2
  56. package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-relative.js.map +1 -1
  57. package/dist/wcardinal/ui/shape/action/index.js +1 -1
  58. package/dist/wcardinal/ui/shape/action/index.js.map +1 -1
  59. package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js +24 -3
  60. package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js.map +1 -1
  61. package/dist/wcardinal/ui/shape/e-shape-deserializers.js +7 -1
  62. package/dist/wcardinal/ui/shape/e-shape-deserializers.js.map +1 -1
  63. package/dist/wcardinal/ui/shape/e-shape-transforms.js +3 -3
  64. package/dist/wcardinal/ui/shape/e-shape-transforms.js.map +1 -1
  65. package/dist/wcardinal/ui/shape/index.js +0 -3
  66. package/dist/wcardinal/ui/shape/index.js.map +1 -1
  67. package/dist/wcardinal/ui/shape/load/load-shape-connector-line.js +3 -3
  68. package/dist/wcardinal/ui/shape/load/load-shape-connector-line.js.map +1 -1
  69. package/dist/wcardinal/ui/shape/variant/create-image-sdf.js +3 -3
  70. package/dist/wcardinal/ui/shape/variant/create-image-sdf.js.map +1 -1
  71. package/dist/wcardinal/ui/shape/variant/create-image.js +2 -2
  72. package/dist/wcardinal/ui/shape/variant/create-image.js.map +1 -1
  73. package/dist/wcardinal/ui/shape/variant/deserialize-all.js +32 -0
  74. package/dist/wcardinal/ui/shape/variant/deserialize-all.js.map +1 -0
  75. package/dist/wcardinal/ui/shape/variant/deserialize-bar.js +4 -4
  76. package/dist/wcardinal/ui/shape/variant/deserialize-bar.js.map +1 -1
  77. package/dist/wcardinal/ui/shape/variant/deserialize-base.js +100 -0
  78. package/dist/wcardinal/ui/shape/variant/deserialize-base.js.map +1 -0
  79. package/dist/wcardinal/ui/shape/variant/deserialize-button.js +4 -5
  80. package/dist/wcardinal/ui/shape/variant/deserialize-button.js.map +1 -1
  81. package/dist/wcardinal/ui/shape/variant/deserialize-circle.js +3 -3
  82. package/dist/wcardinal/ui/shape/variant/deserialize-circle.js.map +1 -1
  83. package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js +7 -6
  84. package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js.map +1 -1
  85. package/dist/wcardinal/ui/shape/variant/deserialize-embedded.js +15 -2
  86. package/dist/wcardinal/ui/shape/variant/deserialize-embedded.js.map +1 -1
  87. package/dist/wcardinal/ui/shape/variant/deserialize-gradient.js +34 -0
  88. package/dist/wcardinal/ui/shape/variant/deserialize-gradient.js.map +1 -0
  89. package/dist/wcardinal/ui/shape/variant/deserialize-group-shadowed.js +4 -4
  90. package/dist/wcardinal/ui/shape/variant/deserialize-group-shadowed.js.map +1 -1
  91. package/dist/wcardinal/ui/shape/variant/deserialize-group.js +4 -4
  92. package/dist/wcardinal/ui/shape/variant/deserialize-group.js.map +1 -1
  93. package/dist/wcardinal/ui/shape/variant/deserialize-image-sdf.js +3 -3
  94. package/dist/wcardinal/ui/shape/variant/deserialize-image-sdf.js.map +1 -1
  95. package/dist/wcardinal/ui/shape/variant/deserialize-image.js +3 -3
  96. package/dist/wcardinal/ui/shape/variant/deserialize-image.js.map +1 -1
  97. package/dist/wcardinal/ui/shape/variant/deserialize-label.js +3 -3
  98. package/dist/wcardinal/ui/shape/variant/deserialize-label.js.map +1 -1
  99. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-circles.js +3 -3
  100. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-circles.js.map +1 -1
  101. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.js +3 -3
  102. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.js.map +1 -1
  103. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.js +3 -3
  104. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.js.map +1 -1
  105. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.js +3 -3
  106. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.js.map +1 -1
  107. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangles.js +3 -3
  108. package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangles.js.map +1 -1
  109. package/dist/wcardinal/ui/shape/variant/deserialize-line.js +4 -4
  110. package/dist/wcardinal/ui/shape/variant/deserialize-line.js.map +1 -1
  111. package/dist/wcardinal/ui/shape/variant/deserialize-null.js +3 -3
  112. package/dist/wcardinal/ui/shape/variant/deserialize-null.js.map +1 -1
  113. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.js +3 -3
  114. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.js.map +1 -1
  115. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.js +3 -3
  116. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.js.map +1 -1
  117. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle.js +3 -3
  118. package/dist/wcardinal/ui/shape/variant/deserialize-rectangle.js.map +1 -1
  119. package/dist/wcardinal/ui/shape/variant/deserialize-triangle-rounded.js +3 -3
  120. package/dist/wcardinal/ui/shape/variant/deserialize-triangle-rounded.js.map +1 -1
  121. package/dist/wcardinal/ui/shape/variant/deserialize-triangle.js +3 -3
  122. package/dist/wcardinal/ui/shape/variant/deserialize-triangle.js.map +1 -1
  123. package/dist/wcardinal/ui/shape/variant/deserialize.js +17 -0
  124. package/dist/wcardinal/ui/shape/variant/deserialize.js.map +1 -0
  125. package/dist/wcardinal/ui/shape/variant/e-shape-base.js +9 -2
  126. package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
  127. package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js +2 -0
  128. package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js.map +1 -1
  129. package/dist/wcardinal/ui/shape/variant/e-shape-embeddeds.js +0 -13
  130. package/dist/wcardinal/ui/shape/variant/e-shape-embeddeds.js.map +1 -1
  131. package/dist/wcardinal/ui/shape/variant/index.js +11 -2
  132. package/dist/wcardinal/ui/shape/variant/index.js.map +1 -1
  133. package/dist/wcardinal/ui/shape/variant/to-gradient-image-url.js +35 -0
  134. package/dist/wcardinal/ui/shape/variant/to-gradient-image-url.js.map +1 -0
  135. package/dist/wcardinal/ui/shape/variant/to-gradient-serialized.js +15 -0
  136. package/dist/wcardinal/ui/shape/variant/to-gradient-serialized.js.map +1 -0
  137. package/dist/wcardinal/ui/shape/variant/to-image-element.js +32 -0
  138. package/dist/wcardinal/ui/shape/variant/to-image-element.js.map +1 -0
  139. package/dist/wcardinal/ui/shape/variant/to-resized.js +52 -0
  140. package/dist/wcardinal/ui/shape/variant/to-resized.js.map +1 -0
  141. package/dist/wcardinal/ui/shape/variant/to-size-normalized.js +12 -0
  142. package/dist/wcardinal/ui/shape/variant/to-size-normalized.js.map +1 -0
  143. package/dist/wcardinal/ui/shape/variant/to-size-rounded.js +8 -0
  144. package/dist/wcardinal/ui/shape/variant/to-size-rounded.js.map +1 -0
  145. package/dist/wcardinal-ui-theme-dark.js +1 -1
  146. package/dist/wcardinal-ui-theme-dark.min.js +1 -1
  147. package/dist/wcardinal-ui-theme-white.js +1 -1
  148. package/dist/wcardinal-ui-theme-white.min.js +1 -1
  149. package/dist/wcardinal-ui.cjs.js +2519 -2479
  150. package/dist/wcardinal-ui.js +1954 -1914
  151. package/dist/wcardinal-ui.min.js +2 -2
  152. package/dist/wcardinal-ui.min.js.map +1 -1
  153. package/package.json +1 -1
  154. package/dist/types/wcardinal/ui/shape/e-shape-deserializer.d.ts +0 -10
  155. package/dist/types/wcardinal/ui/shape/e-shape-image-elements.d.ts +0 -6
  156. package/dist/types/wcardinal/ui/shape/e-shape-sizes.d.ts +0 -7
  157. package/dist/types/wcardinal/ui/shape/variant/e-shape-gradients.d.ts +0 -9
  158. package/dist/wcardinal/ui/shape/action/e-shape-action-value-deserializer.js +0 -115
  159. package/dist/wcardinal/ui/shape/action/e-shape-action-value-deserializer.js.map +0 -1
  160. package/dist/wcardinal/ui/shape/e-shape-deserializer.js +0 -143
  161. package/dist/wcardinal/ui/shape/e-shape-deserializer.js.map +0 -1
  162. package/dist/wcardinal/ui/shape/e-shape-image-elements.js +0 -35
  163. package/dist/wcardinal/ui/shape/e-shape-image-elements.js.map +0 -1
  164. package/dist/wcardinal/ui/shape/e-shape-sizes.js +0 -66
  165. package/dist/wcardinal/ui/shape/e-shape-sizes.js.map +0 -1
  166. package/dist/wcardinal/ui/shape/variant/e-shape-gradients.js +0 -89
  167. package/dist/wcardinal/ui/shape/variant/e-shape-gradients.js.map +0 -1
@@ -73,7 +73,7 @@ export interface DViewTranslationWheelOptions {
73
73
  * {@link DView} translation options.
74
74
  */
75
75
  export interface DViewTranslationOptions {
76
- /** Wheel transtion options */
76
+ /** Wheel translation options */
77
77
  wheel?: DViewTranslationWheelOptions;
78
78
  }
79
79
  /**
@@ -144,7 +144,7 @@ export interface DView {
144
144
  */
145
145
  zoomOut(duration?: number, stop?: boolean): void;
146
146
  /**
147
- * Zooms into the spcecified position.
147
+ * Zooms into the given position.
148
148
  *
149
149
  * @param x a local X coordinate position
150
150
  * @param y a local Y coordinate position
@@ -175,7 +175,7 @@ export interface DView {
175
175
  */
176
176
  zoom(scaleX: number, scaleY: number, duration?: number, stop?: boolean): void;
177
177
  /**
178
- * Moves to the spacified position.
178
+ * Moves to the given position.
179
179
  *
180
180
  * @param x a local X coordinate position
181
181
  * @param y a local Y coordinate position
@@ -186,7 +186,7 @@ export interface DView {
186
186
  /**
187
187
  * Sets to the specified position and scale.
188
188
  *
189
- * @param x a local X coordinate positoon
189
+ * @param x a local X coordinate position
190
190
  * @param y a local Y coordinate position
191
191
  * @param scaleX a X coordinate scale
192
192
  * @param scaleY a Y coordinate scale
@@ -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";
@@ -1,3 +1,3 @@
1
1
  export declare class EShapeConnectorBodies {
2
- static from(values: number[]): number[];
2
+ static from(values: number[], tailMargin: number, headMargin: number): number[];
3
3
  }
@@ -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/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;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,SAAS;gBAC/B,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI;gBACxC,MAAM,EA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AAS,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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"d-view.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-view.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { UtilGestureModifier } from \"./util/util-gesture-modifier\";\nimport { DThemeViewGesture, DViewGesture, DViewGestureOptions } from \"./d-view-gesture\";\nimport { DViewTargetPoint } from \"./d-view-to-target\";\n\nexport type DViewChecker = (\n\te: WheelEvent | MouseEvent | TouchEvent,\n\tmodifier: UtilGestureModifier,\n\ttarget: DBase\n) => boolean;\n\n/**\n * {@link DView} wheel zoom options.\n */\nexport interface DViewZoomWheelOptions {\n\t/** True to enable wheel zoom */\n\tenable?: boolean;\n\n\t/** Zoom speed */\n\tspeed?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Wheel zoom checker.\n\t * If a checker returns false, wheel zooms will be canceled.\n\t */\n\tchecker?: DViewChecker;\n}\n\n/**\n * {@link DView} double-click zoom options.\n */\nexport interface DViewZoomDblClickOptions {\n\t/** True to enable double click zoom */\n\tenable?: boolean;\n\n\t/** Zoom amount */\n\tamount?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Double click zoom checker.\n\t * If a checker returns false, double click zooms will be canceled.\n\t */\n\tchecker?: DViewChecker;\n\n\t/** Zoom duration */\n\tduration?: number;\n}\n\n/**\n * {@link DView} zoom options.\n */\nexport interface DViewZoomOptions {\n\t/** Minimum scale */\n\tmin?: number;\n\n\t/** Maximum scale */\n\tmax?: number;\n\n\t/** True to keep size ratio */\n\tkeepRatio?: boolean;\n\n\t/** Wheel zoom options */\n\twheel?: DViewZoomWheelOptions;\n\n\t/** Double click zoom options */\n\tdblclick?: DViewZoomDblClickOptions;\n}\n\n/**\n * {@link DView} wheel translation options.\n */\nexport interface DViewTranslationWheelOptions {\n\t/** True to enable wheel translation */\n\tenable?: boolean;\n\n\t/** Translation speed */\n\tspeed?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Wheel translation checker.\n\t * If a checker returns false, wheel translations will be canceled.\n\t */\n\tchecker?: DViewChecker;\n}\n\n/**\n * {@link DView} translation options.\n */\nexport interface DViewTranslationOptions {\n\t/** Wheel transtion options */\n\twheel?: DViewTranslationWheelOptions;\n}\n\n/**\n * {@link DView} options.\n */\nexport interface DViewOptions {\n\t/** Gesture options */\n\tgesture?: DViewGestureOptions;\n\n\t/** Zoom options */\n\tzoom?: DViewZoomOptions;\n\n\t/** Translation options */\n\ttranslation?: DViewTranslationOptions;\n\n\t/** Theme */\n\ttheme?: DThemeView | string;\n}\n\n/**\n * {@link DView} theme.\n */\nexport interface DThemeView extends DThemeViewGesture {\n\tisWheelZoomEnabled(): boolean;\n\tisDblClickZoomEnabled(): boolean;\n\tisWheelTranslationEnabled(): boolean;\n\tgetWheelZoomSpeed(): number;\n\tgetWheelZoomModifier(): UtilGestureModifier;\n\tgetDblClickZoomSpeed(): number;\n\tgetDblClickZoomModifier(): UtilGestureModifier;\n\tgetDblClickZoomDuration(): number;\n\tgetWheelTranslationSpeed(): number;\n\tgetWheelTranslationModifier(): UtilGestureModifier;\n\tgetZoomMin(): number;\n\tgetZoomMax(): number;\n\tgetZoomKeepRatio(): boolean;\n}\n\nexport interface DView {\n\treadonly gesture: DViewGesture;\n\tscale: DViewTargetPoint;\n\tposition: DViewTargetPoint;\n\n\t/**\n\t * Stops an animation if exits.\n\t */\n\tstop(): void;\n\n\t/**\n\t * Resets a position and a scale.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\treset(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Fits into a screen.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tfit(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Zooms in at the current position.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomIn(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Zooms out at the current position.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomOut(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Zooms into the spcecified position.\n\t *\n\t * @param x a local X coordinate position\n\t * @param y a local Y coordinate position\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomAt(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void;\n\n\t/**\n\t * Zooms into the specified global position.\n\t *\n\t * @param x a global X coordinate position\n\t * @param y a global Y coordinate position\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomAtGlobal(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void;\n\n\t/**\n\t * Zooms in / out at the current position.\n\t *\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoom(scaleX: number, scaleY: number, duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Moves to the spacified position.\n\t *\n\t * @param x a local X coordinate position\n\t * @param y a local Y coordinate position\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tmoveTo(x: number, y: number, duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Sets to the specified position and scale.\n\t *\n\t * @param x a local X coordinate positoon\n\t * @param y a local Y coordinate position\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\ttransform(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void;\n\n\ttoLocal(global: IPoint, local: IPoint, skipUpdate?: boolean): IPoint;\n\ttoGlobal(local: IPoint, global: IPoint, skipUpdate?: boolean): IPoint;\n}\n"]}
1
+ {"version":3,"file":"d-view.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-view.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { UtilGestureModifier } from \"./util/util-gesture-modifier\";\nimport { DThemeViewGesture, DViewGesture, DViewGestureOptions } from \"./d-view-gesture\";\nimport { DViewTargetPoint } from \"./d-view-to-target\";\n\nexport type DViewChecker = (\n\te: WheelEvent | MouseEvent | TouchEvent,\n\tmodifier: UtilGestureModifier,\n\ttarget: DBase\n) => boolean;\n\n/**\n * {@link DView} wheel zoom options.\n */\nexport interface DViewZoomWheelOptions {\n\t/** True to enable wheel zoom */\n\tenable?: boolean;\n\n\t/** Zoom speed */\n\tspeed?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Wheel zoom checker.\n\t * If a checker returns false, wheel zooms will be canceled.\n\t */\n\tchecker?: DViewChecker;\n}\n\n/**\n * {@link DView} double-click zoom options.\n */\nexport interface DViewZoomDblClickOptions {\n\t/** True to enable double click zoom */\n\tenable?: boolean;\n\n\t/** Zoom amount */\n\tamount?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Double click zoom checker.\n\t * If a checker returns false, double click zooms will be canceled.\n\t */\n\tchecker?: DViewChecker;\n\n\t/** Zoom duration */\n\tduration?: number;\n}\n\n/**\n * {@link DView} zoom options.\n */\nexport interface DViewZoomOptions {\n\t/** Minimum scale */\n\tmin?: number;\n\n\t/** Maximum scale */\n\tmax?: number;\n\n\t/** True to keep size ratio */\n\tkeepRatio?: boolean;\n\n\t/** Wheel zoom options */\n\twheel?: DViewZoomWheelOptions;\n\n\t/** Double click zoom options */\n\tdblclick?: DViewZoomDblClickOptions;\n}\n\n/**\n * {@link DView} wheel translation options.\n */\nexport interface DViewTranslationWheelOptions {\n\t/** True to enable wheel translation */\n\tenable?: boolean;\n\n\t/** Translation speed */\n\tspeed?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Wheel translation checker.\n\t * If a checker returns false, wheel translations will be canceled.\n\t */\n\tchecker?: DViewChecker;\n}\n\n/**\n * {@link DView} translation options.\n */\nexport interface DViewTranslationOptions {\n\t/** Wheel translation options */\n\twheel?: DViewTranslationWheelOptions;\n}\n\n/**\n * {@link DView} options.\n */\nexport interface DViewOptions {\n\t/** Gesture options */\n\tgesture?: DViewGestureOptions;\n\n\t/** Zoom options */\n\tzoom?: DViewZoomOptions;\n\n\t/** Translation options */\n\ttranslation?: DViewTranslationOptions;\n\n\t/** Theme */\n\ttheme?: DThemeView | string;\n}\n\n/**\n * {@link DView} theme.\n */\nexport interface DThemeView extends DThemeViewGesture {\n\tisWheelZoomEnabled(): boolean;\n\tisDblClickZoomEnabled(): boolean;\n\tisWheelTranslationEnabled(): boolean;\n\tgetWheelZoomSpeed(): number;\n\tgetWheelZoomModifier(): UtilGestureModifier;\n\tgetDblClickZoomSpeed(): number;\n\tgetDblClickZoomModifier(): UtilGestureModifier;\n\tgetDblClickZoomDuration(): number;\n\tgetWheelTranslationSpeed(): number;\n\tgetWheelTranslationModifier(): UtilGestureModifier;\n\tgetZoomMin(): number;\n\tgetZoomMax(): number;\n\tgetZoomKeepRatio(): boolean;\n}\n\nexport interface DView {\n\treadonly gesture: DViewGesture;\n\tscale: DViewTargetPoint;\n\tposition: DViewTargetPoint;\n\n\t/**\n\t * Stops an animation if exits.\n\t */\n\tstop(): void;\n\n\t/**\n\t * Resets a position and a scale.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\treset(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Fits into a screen.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tfit(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Zooms in at the current position.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomIn(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Zooms out at the current position.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomOut(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Zooms into the given position.\n\t *\n\t * @param x a local X coordinate position\n\t * @param y a local Y coordinate position\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomAt(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void;\n\n\t/**\n\t * Zooms into the specified global position.\n\t *\n\t * @param x a global X coordinate position\n\t * @param y a global Y coordinate position\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomAtGlobal(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void;\n\n\t/**\n\t * Zooms in / out at the current position.\n\t *\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoom(scaleX: number, scaleY: number, duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Moves to the given position.\n\t *\n\t * @param x a local X coordinate position\n\t * @param y a local Y coordinate position\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tmoveTo(x: number, y: number, duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Sets to the specified position and scale.\n\t *\n\t * @param x a local X coordinate position\n\t * @param y a local Y coordinate position\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\ttransform(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void;\n\n\ttoLocal(global: IPoint, local: IPoint, skipUpdate?: boolean): IPoint;\n\ttoGlobal(local: IPoint, global: IPoint, skipUpdate?: boolean): IPoint;\n}\n"]}