@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.
- package/dist/types/wcardinal/ui/d-view.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/action/{e-shape-action-value-deserializer.d.ts → deserialize-action-value.d.ts} +1 -4
- package/dist/types/wcardinal/ui/shape/action/index.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-bodies.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-deserializers.d.ts +15 -4
- package/dist/types/wcardinal/ui/shape/index.d.ts +0 -3
- package/dist/types/wcardinal/ui/shape/variant/deserialize-all.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/variant/deserialize-bar.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-base.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/variant/deserialize-button.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-circle.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-connector-line.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/variant/deserialize-gradient.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/variant/deserialize-group-shadowed.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-group.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-image-sdf.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-image.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-label.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-circles.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-triangles.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-null.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-triangle-rounded.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-triangle.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-embeddeds.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/variant/index.d.ts +11 -2
- package/dist/types/wcardinal/ui/shape/variant/to-gradient-image-url.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/variant/to-gradient-serialized.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/variant/to-image-element.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/to-resized.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/variant/to-size-normalized.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/to-size-rounded.d.ts +1 -0
- package/dist/wcardinal/ui/d-diagrams.js +2 -2
- package/dist/wcardinal/ui/d-diagrams.js.map +1 -1
- package/dist/wcardinal/ui/d-view.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/deserialize-action-value.js +109 -0
- package/dist/wcardinal/ui/shape/action/deserialize-action-value.js.map +1 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-relative.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-relative.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-absolute.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-absolute.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-relative.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-relative.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-absolute.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-absolute.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-relative.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-relative.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/index.js +1 -1
- package/dist/wcardinal/ui/shape/action/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js +24 -3
- package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-deserializers.js +7 -1
- package/dist/wcardinal/ui/shape/e-shape-deserializers.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-transforms.js +3 -3
- package/dist/wcardinal/ui/shape/e-shape-transforms.js.map +1 -1
- package/dist/wcardinal/ui/shape/index.js +0 -3
- package/dist/wcardinal/ui/shape/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/load/load-shape-connector-line.js +3 -3
- package/dist/wcardinal/ui/shape/load/load-shape-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-image-sdf.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-image-sdf.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-image.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-image.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-all.js +32 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-all.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-bar.js +4 -4
- package/dist/wcardinal/ui/shape/variant/deserialize-bar.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-base.js +100 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-base.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-button.js +4 -5
- package/dist/wcardinal/ui/shape/variant/deserialize-button.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-circle.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-circle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js +7 -6
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-embedded.js +15 -2
- package/dist/wcardinal/ui/shape/variant/deserialize-embedded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-gradient.js +34 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-gradient.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-group-shadowed.js +4 -4
- package/dist/wcardinal/ui/shape/variant/deserialize-group-shadowed.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-group.js +4 -4
- package/dist/wcardinal/ui/shape/variant/deserialize-group.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-image-sdf.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-image-sdf.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-image.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-image.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-label.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-label.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-circles.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-circles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangles.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line.js +4 -4
- package/dist/wcardinal/ui/shape/variant/deserialize-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-null.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-null.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-triangle-rounded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-triangle-rounded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-triangle.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-triangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize.js +17 -0
- package/dist/wcardinal/ui/shape/variant/deserialize.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js +9 -2
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js +2 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-embeddeds.js +0 -13
- package/dist/wcardinal/ui/shape/variant/e-shape-embeddeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/index.js +11 -2
- package/dist/wcardinal/ui/shape/variant/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/to-gradient-image-url.js +35 -0
- package/dist/wcardinal/ui/shape/variant/to-gradient-image-url.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-gradient-serialized.js +15 -0
- package/dist/wcardinal/ui/shape/variant/to-gradient-serialized.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-image-element.js +32 -0
- package/dist/wcardinal/ui/shape/variant/to-image-element.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-resized.js +52 -0
- package/dist/wcardinal/ui/shape/variant/to-resized.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-size-normalized.js +12 -0
- package/dist/wcardinal/ui/shape/variant/to-size-normalized.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-size-rounded.js +8 -0
- package/dist/wcardinal/ui/shape/variant/to-size-rounded.js.map +1 -0
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +2519 -2479
- package/dist/wcardinal-ui.js +1954 -1914
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-deserializer.d.ts +0 -10
- package/dist/types/wcardinal/ui/shape/e-shape-image-elements.d.ts +0 -6
- package/dist/types/wcardinal/ui/shape/e-shape-sizes.d.ts +0 -7
- package/dist/types/wcardinal/ui/shape/variant/e-shape-gradients.d.ts +0 -9
- package/dist/wcardinal/ui/shape/action/e-shape-action-value-deserializer.js +0 -115
- package/dist/wcardinal/ui/shape/action/e-shape-action-value-deserializer.js.map +0 -1
- package/dist/wcardinal/ui/shape/e-shape-deserializer.js +0 -143
- package/dist/wcardinal/ui/shape/e-shape-deserializer.js.map +0 -1
- package/dist/wcardinal/ui/shape/e-shape-image-elements.js +0 -35
- package/dist/wcardinal/ui/shape/e-shape-image-elements.js.map +0 -1
- package/dist/wcardinal/ui/shape/e-shape-sizes.js +0 -66
- package/dist/wcardinal/ui/shape/e-shape-sizes.js.map +0 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-gradients.js +0 -89
- package/dist/wcardinal/ui/shape/variant/e-shape-gradients.js.map +0 -1
|
@@ -35,12 +35,10 @@ export * from "./e-shape-data-value";
|
|
|
35
35
|
export * from "./e-shape-data";
|
|
36
36
|
export * from "./e-shape-defaults";
|
|
37
37
|
export * from "./e-shape-deleter";
|
|
38
|
-
export * from "./e-shape-deserializer";
|
|
39
38
|
export * from "./e-shape-deserializers";
|
|
40
39
|
export * from "./e-shape-editor";
|
|
41
40
|
export * from "./e-shape-fill";
|
|
42
41
|
export * from "./e-shape-gradient";
|
|
43
|
-
export * from "./e-shape-image-elements";
|
|
44
42
|
export * from "./e-shape-layer-container";
|
|
45
43
|
export * from "./e-shape-layer-state";
|
|
46
44
|
export * from "./e-shape-layer";
|
|
@@ -68,7 +66,6 @@ export * from "./e-shape-resource-manager-serialization";
|
|
|
68
66
|
export * from "./e-shape-runtime";
|
|
69
67
|
export * from "./e-shape-runtimes";
|
|
70
68
|
export * from "./e-shape-search";
|
|
71
|
-
export * from "./e-shape-sizes";
|
|
72
69
|
export * from "./e-shape-state-set-impl-observable";
|
|
73
70
|
export * from "./e-shape-state-set";
|
|
74
71
|
export * from "./e-shape-state";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB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A8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0CAA0C,CAAC;AACzD,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qCAAqC,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./action\";\nexport * from \"./load\";\nexport * from \"./variant\";\nexport * from \"./e-shape-acceptor-impl\";\nexport * from \"./e-shape-acceptor-type\";\nexport * from \"./e-shape-acceptor\";\nexport * from \"./e-shape-acceptors\";\nexport * from \"./e-shape-buffer-unit-builder\";\nexport * from \"./e-shape-buffer-unit\";\nexport * from \"./e-shape-buffer\";\nexport * from \"./e-shape-capabilities\";\nexport * from \"./e-shape-capability\";\nexport * from \"./e-shape-connector-bodies\";\nexport * from \"./e-shape-connector-body-impl\";\nexport * from \"./e-shape-connector-body\";\nexport * from \"./e-shape-connector-container-impl\";\nexport * from \"./e-shape-connector-container\";\nexport * from \"./e-shape-connector-edge-acceptor-impl\";\nexport * from \"./e-shape-connector-edge-acceptor\";\nexport * from \"./e-shape-connector-edge-container-impl\";\nexport * from \"./e-shape-connector-edge-container\";\nexport * from \"./e-shape-connector-edge-impl\";\nexport * from \"./e-shape-connector-edge\";\nexport * from \"./e-shape-connector\";\nexport * from \"./e-shape-connectors\";\nexport * from \"./e-shape-container\";\nexport * from \"./e-shape-copy-part\";\nexport * from \"./e-shape-corner\";\nexport * from \"./e-shape-data-value-range\";\nexport * from \"./e-shape-data-value\";\nexport * from \"./e-shape-data\";\nexport * from \"./e-shape-defaults\";\nexport * from \"./e-shape-deleter\";\nexport * from \"./e-shape-deserializers\";\nexport * from \"./e-shape-editor\";\nexport * from \"./e-shape-fill\";\nexport * from \"./e-shape-gradient\";\nexport * from \"./e-shape-layer-container\";\nexport * from \"./e-shape-layer-state\";\nexport * from \"./e-shape-layer\";\nexport * from \"./e-shape-layout\";\nexport * from \"./e-shape-points-formatted\";\nexport * from \"./e-shape-points-formatter-curve\";\nexport * from \"./e-shape-points-formatter\";\nexport * from \"./e-shape-points-marker-base\";\nexport * from \"./e-shape-points-marker-container-impl-noop\";\nexport * from \"./e-shape-points-marker-container-impl\";\nexport * from \"./e-shape-points-marker-container\";\nexport * from \"./e-shape-points-marker-head\";\nexport * from \"./e-shape-points-marker-noop\";\nexport * from \"./e-shape-points-marker-tail\";\nexport * from \"./e-shape-points-marker-type\";\nexport * from \"./e-shape-points-marker\";\nexport * from \"./e-shape-points-style\";\nexport * from \"./e-shape-points-styles\";\nexport * from \"./e-shape-points\";\nexport * from \"./e-shape-renderer-iterator-datum\";\nexport * from \"./e-shape-renderer-iterator\";\nexport * from \"./e-shape-renderer\";\nexport * from \"./e-shape-resource-manager-deserialization\";\nexport * from \"./e-shape-resource-manager-serialization\";\nexport * from \"./e-shape-runtime\";\nexport * from \"./e-shape-runtimes\";\nexport * from \"./e-shape-search\";\nexport * from \"./e-shape-state-set-impl-observable\";\nexport * from \"./e-shape-state-set\";\nexport * from \"./e-shape-state\";\nexport * from \"./e-shape-stroke-side\";\nexport * from \"./e-shape-stroke-style\";\nexport * from \"./e-shape-stroke\";\nexport * from \"./e-shape-text-align-horizontal\";\nexport * from \"./e-shape-text-align-vertical\";\nexport * from \"./e-shape-text-align\";\nexport * from \"./e-shape-text-direction\";\nexport * from \"./e-shape-text-offset\";\nexport * from \"./e-shape-text-outline\";\nexport * from \"./e-shape-text\";\nexport * from \"./e-shape-transform-parent\";\nexport * from \"./e-shape-transform\";\nexport * from \"./e-shape-transforms\";\nexport * from \"./e-shape-type\";\nexport * from \"./e-shape-uploaded-constructor\";\nexport * from \"./e-shape-uploaded\";\nexport * from \"./e-shape-uploadeds\";\nexport * from \"./e-shape-uuid-mapping-impl\";\nexport * from \"./e-shape-uuid-mapping\";\nexport * from \"./e-shape\";\n"]}
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { EShapeCapabilities } from "../e-shape-capabilities";
|
|
6
6
|
import { EShapeCapability } from "../e-shape-capability";
|
|
7
|
-
import { EShapeDeserializers,
|
|
7
|
+
import { EShapeDeserializers, EShapeOnDeserializeds } from "../e-shape-deserializers";
|
|
8
8
|
import { EShapeType } from "../e-shape-type";
|
|
9
9
|
import { EShapeUploadeds } from "../e-shape-uploadeds";
|
|
10
10
|
import { createLineUploaded } from "../variant/create-line-uploaded";
|
|
11
|
-
import { deserializeConnectorLine,
|
|
11
|
+
import { deserializeConnectorLine, onDeserializedConnectorLine } from "../variant/deserialize-connector-line";
|
|
12
12
|
export var loadShapeConnectorLine = function () {
|
|
13
13
|
EShapeUploadeds[EShapeType.CONNECTOR_LINE] = createLineUploaded;
|
|
14
14
|
EShapeDeserializers[EShapeType.CONNECTOR_LINE] = deserializeConnectorLine;
|
|
15
|
-
|
|
15
|
+
EShapeOnDeserializeds[EShapeType.CONNECTOR_LINE] = onDeserializedConnectorLine;
|
|
16
16
|
EShapeCapabilities.set(EShapeType.CONNECTOR_LINE, EShapeCapability.CONNECTOR);
|
|
17
17
|
};
|
|
18
18
|
//# sourceMappingURL=load-shape-connector-line.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-shape-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/load/load-shape-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"load-shape-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/load/load-shape-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACN,wBAAwB,EACxB,2BAA2B,EAC3B,MAAM,uCAAuC,CAAC;AAE/C,MAAM,CAAC,IAAM,sBAAsB,GAAG;IACrC,eAAe,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;IAChE,mBAAmB,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,wBAAwB,CAAC;IAC1E,qBAAqB,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,2BAA2B,CAAC;IAC/E,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,cAAc,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAC/E,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeCapabilities } from \"../e-shape-capabilities\";\nimport { EShapeCapability } from \"../e-shape-capability\";\nimport { EShapeDeserializers, EShapeOnDeserializeds } from \"../e-shape-deserializers\";\nimport { EShapeType } from \"../e-shape-type\";\nimport { EShapeUploadeds } from \"../e-shape-uploadeds\";\nimport { createLineUploaded } from \"../variant/create-line-uploaded\";\nimport {\n\tdeserializeConnectorLine,\n\tonDeserializedConnectorLine\n} from \"../variant/deserialize-connector-line\";\n\nexport const loadShapeConnectorLine = (): void => {\n\tEShapeUploadeds[EShapeType.CONNECTOR_LINE] = createLineUploaded;\n\tEShapeDeserializers[EShapeType.CONNECTOR_LINE] = deserializeConnectorLine;\n\tEShapeOnDeserializeds[EShapeType.CONNECTOR_LINE] = onDeserializedConnectorLine;\n\tEShapeCapabilities.set(EShapeType.CONNECTOR_LINE, EShapeCapability.CONNECTOR);\n};\n"]}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { DynamicSDFFontGenerator } from "../../util/dynamic-sdf-font-generator";
|
|
6
|
-
import { EShapeImageElements } from "../e-shape-image-elements";
|
|
7
6
|
import { EShapeImageSdf } from "./e-shape-image-sdf";
|
|
7
|
+
import { toImageElement } from "./to-image-element";
|
|
8
8
|
export var createImageSdf = function (dataUrl, convertToSdf) {
|
|
9
9
|
if (convertToSdf) {
|
|
10
|
-
return
|
|
10
|
+
return toImageElement(dataUrl).then(function (imageElement) {
|
|
11
11
|
var generator = DynamicSDFFontGenerator.getInstance().init();
|
|
12
12
|
generator.updateTexture(imageElement);
|
|
13
13
|
generator.render();
|
|
@@ -17,7 +17,7 @@ export var createImageSdf = function (dataUrl, convertToSdf) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
else {
|
|
20
|
-
return
|
|
20
|
+
return toImageElement(dataUrl).then(function (imageElement) {
|
|
21
21
|
return new EShapeImageSdf(imageElement);
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-image-sdf.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/create-image-sdf.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"create-image-sdf.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/create-image-sdf.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,CAAC,IAAM,cAAc,GAAG,UAAC,OAAe,EAAE,YAAqB;IACpE,IAAI,YAAY,EAAE;QACjB,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,IAAI,CAClC,UAAC,YAA8B;YAC9B,IAAM,SAAS,GAAG,uBAAuB,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;YAC/D,SAAS,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;YACtC,SAAS,CAAC,MAAM,EAAE,CAAC;YAEnB,IAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAChD,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAEvB,OAAO,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC,CACD,CAAC;KACF;SAAM;QACN,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,YAA8B;YAClE,OAAO,IAAI,cAAc,CAAC,YAAY,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;KACH;AACF,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DynamicSDFFontGenerator } from \"../../util/dynamic-sdf-font-generator\";\nimport { EShapeImageSdf } from \"./e-shape-image-sdf\";\nimport { toImageElement } from \"./to-image-element\";\n\nexport const createImageSdf = (dataUrl: string, convertToSdf: boolean): Promise<EShapeImageSdf> => {\n\tif (convertToSdf) {\n\t\treturn toImageElement(dataUrl).then(\n\t\t\t(imageElement: HTMLImageElement): Promise<EShapeImageSdf> => {\n\t\t\t\tconst generator = DynamicSDFFontGenerator.getInstance().init();\n\t\t\t\tgenerator.updateTexture(imageElement);\n\t\t\t\tgenerator.render();\n\n\t\t\t\tconst canvas = document.createElement(\"canvas\");\n\t\t\t\tgenerator.read(canvas);\n\n\t\t\t\treturn createImageSdf(canvas.toDataURL(), false);\n\t\t\t}\n\t\t);\n\t} else {\n\t\treturn toImageElement(dataUrl).then((imageElement: HTMLImageElement): EShapeImageSdf => {\n\t\t\treturn new EShapeImageSdf(imageElement);\n\t\t});\n\t}\n};\n"]}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { EShapeImageElements } from "../e-shape-image-elements";
|
|
6
5
|
import { EShapeImage } from "./e-shape-image";
|
|
6
|
+
import { toImageElement } from "./to-image-element";
|
|
7
7
|
export var createImage = function (dataUrl) {
|
|
8
|
-
return
|
|
8
|
+
return toImageElement(dataUrl).then(function (imageElement) {
|
|
9
9
|
return new EShapeImage(imageElement);
|
|
10
10
|
});
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-image.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/create-image.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"create-image.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/create-image.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,OAAe;IAC1C,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,YAA8B;QAClE,OAAO,IAAI,WAAW,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeImage } from \"./e-shape-image\";\nimport { toImageElement } from \"./to-image-element\";\n\nexport const createImage = (dataUrl: string): Promise<EShapeImage> => {\n\treturn toImageElement(dataUrl).then((imageElement: HTMLImageElement): EShapeImage => {\n\t\treturn new EShapeImage(imageElement);\n\t});\n};\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { EShapeOnDeserializeds } from "../e-shape-deserializers";
|
|
6
|
+
import { EShapeUuidMappingImpl } from "../e-shape-uuid-mapping-impl";
|
|
7
|
+
import { deserialize } from "./deserialize";
|
|
8
|
+
export var deserializeAll = function (serializeds, manager) {
|
|
9
|
+
var shapes = [];
|
|
10
|
+
for (var i = 0, imax = serializeds.length; i < imax; ++i) {
|
|
11
|
+
shapes.push(deserialize(serializeds[i], manager));
|
|
12
|
+
}
|
|
13
|
+
if (0 < shapes.length) {
|
|
14
|
+
return Promise.all(shapes).then(function (resolved) {
|
|
15
|
+
callOnDeserialized(serializeds, resolved, new EShapeUuidMappingImpl(resolved), manager);
|
|
16
|
+
return resolved;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
};
|
|
21
|
+
var callOnDeserialized = function (serializeds, shapes, mapping, manager) {
|
|
22
|
+
for (var i = 0, imax = serializeds.length; i < imax; ++i) {
|
|
23
|
+
var serialized = serializeds[i];
|
|
24
|
+
var shape = shapes[i];
|
|
25
|
+
var onDeserialized = EShapeOnDeserializeds[serialized[0]];
|
|
26
|
+
if (onDeserialized) {
|
|
27
|
+
onDeserialized(serialized, shape, mapping, manager);
|
|
28
|
+
}
|
|
29
|
+
callOnDeserialized(serialized[20], shape.children, mapping, manager);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=deserialize-all.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deserialize-all.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-all.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,CAAC,IAAM,cAAc,GAAG,UAC7B,WAAqC,EACrC,OAA6C;IAE7C,IAAM,MAAM,GAAoC,EAAE,CAAC;IACnD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;QACzD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;KAClD;IACD,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE;QACtB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,UAAC,QAAkB;YAClD,kBAAkB,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,qBAAqB,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;YACxF,OAAO,QAAQ,CAAC;QACjB,CAAC,CAAC,CAAC;KACH;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,IAAM,kBAAkB,GAAG,UAC1B,WAAqC,EACrC,MAAgB,EAChB,OAA0B,EAC1B,OAA6C;IAE7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;QACzD,IAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAClC,IAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACxB,IAAM,cAAc,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,IAAI,cAAc,EAAE;YACnB,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACpD;QACD,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;KACrE;AACF,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeOnDeserializeds } from \"../e-shape-deserializers\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { EShapeUuidMapping } from \"../e-shape-uuid-mapping\";\nimport { EShapeUuidMappingImpl } from \"../e-shape-uuid-mapping-impl\";\nimport { deserialize } from \"./deserialize\";\n\nexport const deserializeAll = (\n\tserializeds: DDiagramSerializedItem[],\n\tmanager: EShapeResourceManagerDeserialization\n): Promise<EShape[]> | null => {\n\tconst shapes: Array<Promise<EShape> | EShape> = [];\n\tfor (let i = 0, imax = serializeds.length; i < imax; ++i) {\n\t\tshapes.push(deserialize(serializeds[i], manager));\n\t}\n\tif (0 < shapes.length) {\n\t\treturn Promise.all(shapes).then((resolved: EShape[]): EShape[] => {\n\t\t\tcallOnDeserialized(serializeds, resolved, new EShapeUuidMappingImpl(resolved), manager);\n\t\t\treturn resolved;\n\t\t});\n\t}\n\treturn null;\n};\n\nconst callOnDeserialized = (\n\tserializeds: DDiagramSerializedItem[],\n\tshapes: EShape[],\n\tmapping: EShapeUuidMapping,\n\tmanager: EShapeResourceManagerDeserialization\n): void => {\n\tfor (let i = 0, imax = serializeds.length; i < imax; ++i) {\n\t\tconst serialized = serializeds[i];\n\t\tconst shape = shapes[i];\n\t\tconst onDeserialized = EShapeOnDeserializeds[serialized[0]];\n\t\tif (onDeserialized) {\n\t\t\tonDeserialized(serialized, shape, mapping, manager);\n\t\t}\n\t\tcallOnDeserialized(serialized[20], shape.children, mapping, manager);\n\t}\n};\n"]}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { EShapeDeserializer } from "../e-shape-deserializer";
|
|
6
5
|
import { EShapePointsStyle } from "../e-shape-points-style";
|
|
6
|
+
import { deserializeBase } from "./deserialize-base";
|
|
7
7
|
import { EShapeBar } from "./e-shape-bar";
|
|
8
|
-
export var deserializeBar = function (item, manager) {
|
|
9
|
-
|
|
10
|
-
var result =
|
|
8
|
+
export var deserializeBar = function (item, manager, shape) {
|
|
9
|
+
shape = shape || new EShapeBar();
|
|
10
|
+
var result = deserializeBase(item, manager, shape);
|
|
11
11
|
shape.points.deserialize(item[15], manager);
|
|
12
12
|
var style = shape.points.style;
|
|
13
13
|
var mask = EShapePointsStyle.NON_SCALING_MASK |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserialize-bar.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-bar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"deserialize-bar.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-bar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,CAAC,IAAM,cAAc,GAAG,UAC7B,IAA4B,EAC5B,OAA6C,EAC7C,KAAiB;IAEjB,KAAK,GAAG,KAAK,IAAI,IAAI,SAAS,EAAE,CAAC;IACjC,IAAM,MAAM,GAAG,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IACrD,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;IAC5C,IAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;IACjC,IAAM,IAAI,GACT,iBAAiB,CAAC,gBAAgB;QAClC,iBAAiB,CAAC,WAAW;QAC7B,iBAAiB,CAAC,WAAW,CAAC;IAC/B,IAAM,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC;IAChC,IAAI,UAAU,EAAE;QACf,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC;QAC5B,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,UAAU,CAAC;KACjC;IACD,OAAO,MAAM,CAAC;AACf,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShapePointsStyle } from \"../e-shape-points-style\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { deserializeBase } from \"./deserialize-base\";\nimport { EShapeBar } from \"./e-shape-bar\";\n\nexport const deserializeBar = (\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization,\n\tshape?: EShapeBar\n): Promise<EShapeBar> | EShapeBar => {\n\tshape = shape || new EShapeBar();\n\tconst result = deserializeBase(item, manager, shape);\n\tshape.points.deserialize(item[15], manager);\n\tconst style = shape.points.style;\n\tconst mask =\n\t\tEShapePointsStyle.NON_SCALING_MASK |\n\t\tEShapePointsStyle.DOTTED_MASK |\n\t\tEShapePointsStyle.DASHED_MASK;\n\tconst deprecated = style & mask;\n\tif (deprecated) {\n\t\tshape.points.style &= ~mask;\n\t\tshape.stroke.style |= deprecated;\n\t}\n\treturn result;\n};\n"]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { isString } from "../../util/is-string";
|
|
6
|
+
import { deserializeActionValue } from "../action/deserialize-action-value";
|
|
7
|
+
import { deserialize } from "./deserialize";
|
|
8
|
+
import { deserializeGradient } from "./deserialize-gradient";
|
|
9
|
+
import { toImageElement } from "./to-image-element";
|
|
10
|
+
import { toSizeNormalized } from "./to-size-normalized";
|
|
11
|
+
export var deserializeBase = function (item, manager, result) {
|
|
12
|
+
result.id = manager.resources[item[1]] || "";
|
|
13
|
+
var transform = result.transform;
|
|
14
|
+
transform.position.set(item[2], item[3]);
|
|
15
|
+
transform.rotation = item[6];
|
|
16
|
+
transform.skew.set(item[7], item[7]);
|
|
17
|
+
transform.pivot.set(item[21], item[22]);
|
|
18
|
+
result.size.set(toSizeNormalized(item[4]), toSizeNormalized(item[5]));
|
|
19
|
+
result.fill.deserialize(item[8], manager);
|
|
20
|
+
result.stroke.deserialize(item[9], manager);
|
|
21
|
+
result.cursor = manager.resources[item[10]] || "";
|
|
22
|
+
result.text.deserialize(item[11], manager);
|
|
23
|
+
result.data.deserialize(item[12], manager);
|
|
24
|
+
result.radius = item[13];
|
|
25
|
+
result.corner = item[14];
|
|
26
|
+
var item23 = item[23];
|
|
27
|
+
result.interactive = !!(item23 & 1);
|
|
28
|
+
var state = result.state;
|
|
29
|
+
state.isFocusable = !(item23 & 2);
|
|
30
|
+
state.isActive = !!(item23 & 4);
|
|
31
|
+
var item24 = item[24];
|
|
32
|
+
result.shortcut = 0 <= item24 ? manager.resources[item24] : undefined;
|
|
33
|
+
var item25 = item[25];
|
|
34
|
+
result.title = 0 <= item25 ? manager.resources[item25] : undefined;
|
|
35
|
+
var item26 = item[26];
|
|
36
|
+
result.uuid = item26 != null ? item26 : 0;
|
|
37
|
+
// Children
|
|
38
|
+
var childrenPromise = null;
|
|
39
|
+
var childrenSerialized = item[20];
|
|
40
|
+
if (0 < childrenSerialized.length) {
|
|
41
|
+
var childrenOrPromises = [];
|
|
42
|
+
for (var i = 0, imax = childrenSerialized.length; i < imax; ++i) {
|
|
43
|
+
childrenOrPromises.push(deserialize(childrenSerialized[i], manager));
|
|
44
|
+
}
|
|
45
|
+
childrenPromise = Promise.all(childrenOrPromises).then(function (children) {
|
|
46
|
+
result.children = children;
|
|
47
|
+
for (var i = 0, imax = children.length; i < imax; ++i) {
|
|
48
|
+
children[i].parent = result;
|
|
49
|
+
}
|
|
50
|
+
result.onChildTransformChange();
|
|
51
|
+
result.toDirty();
|
|
52
|
+
return result;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// Action
|
|
56
|
+
var serializedActions = item[17];
|
|
57
|
+
for (var i = 0, imax = serializedActions.length; i < imax; ++i) {
|
|
58
|
+
result.action.add(deserializeActionValue(serializedActions[i], manager));
|
|
59
|
+
}
|
|
60
|
+
// Gradient
|
|
61
|
+
var gradientId = item[19];
|
|
62
|
+
if (0 <= gradientId && gradientId < manager.resources.length) {
|
|
63
|
+
var gradient = manager.resources[gradientId];
|
|
64
|
+
if (isString(gradient)) {
|
|
65
|
+
result.gradient = deserializeGradient(gradient);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Image
|
|
69
|
+
var imagePromise = null;
|
|
70
|
+
var imageId = item[18];
|
|
71
|
+
if (0 <= imageId && imageId < manager.resources.length) {
|
|
72
|
+
var imageSrc = manager.resources[imageId];
|
|
73
|
+
if (isString(imageSrc)) {
|
|
74
|
+
imagePromise = toImageElement(imageSrc).then(function (imageElement) {
|
|
75
|
+
result.image = imageElement;
|
|
76
|
+
return result;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//
|
|
81
|
+
if (childrenPromise != null) {
|
|
82
|
+
if (imagePromise != null) {
|
|
83
|
+
return Promise.all([childrenPromise, imagePromise]).then(function () {
|
|
84
|
+
return result;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return childrenPromise;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
if (imagePromise != null) {
|
|
93
|
+
return imagePromise;
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=deserialize-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deserialize-base.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/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ACN,OAAO,MAAM,CAAC;SACd;KACD;AACF,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { isString } from \"../../util/is-string\";\nimport { deserializeActionValue } from \"../action/deserialize-action-value\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { deserialize } from \"./deserialize\";\nimport { deserializeGradient } from \"./deserialize-gradient\";\nimport { toImageElement } from \"./to-image-element\";\nimport { toSizeNormalized } from \"./to-size-normalized\";\n\nexport const deserializeBase = <SHAPE extends EShape>(\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization,\n\tresult: SHAPE\n): Promise<SHAPE> | SHAPE => {\n\tresult.id = manager.resources[item[1]] || \"\";\n\tconst transform = result.transform;\n\ttransform.position.set(item[2], item[3]);\n\ttransform.rotation = item[6];\n\ttransform.skew.set(item[7], item[7]);\n\ttransform.pivot.set(item[21], item[22]);\n\tresult.size.set(toSizeNormalized(item[4]), toSizeNormalized(item[5]));\n\tresult.fill.deserialize(item[8], manager);\n\tresult.stroke.deserialize(item[9], manager);\n\tresult.cursor = manager.resources[item[10]] || \"\";\n\tresult.text.deserialize(item[11], manager);\n\tresult.data.deserialize(item[12], manager);\n\tresult.radius = item[13];\n\tresult.corner = item[14];\n\tconst item23 = item[23];\n\tresult.interactive = !!(item23 & 1);\n\tconst state = result.state;\n\tstate.isFocusable = !(item23 & 2);\n\tstate.isActive = !!(item23 & 4);\n\tconst item24 = item[24];\n\tresult.shortcut = 0 <= item24 ? manager.resources[item24] : undefined;\n\tconst item25 = item[25];\n\tresult.title = 0 <= item25 ? manager.resources[item25] : undefined;\n\tconst item26 = item[26];\n\tresult.uuid = item26 != null ? item26 : 0;\n\n\t// Children\n\tlet childrenPromise: Promise<SHAPE> | null = null;\n\tconst childrenSerialized = item[20];\n\tif (0 < childrenSerialized.length) {\n\t\tconst childrenOrPromises = [];\n\t\tfor (let i = 0, imax = childrenSerialized.length; i < imax; ++i) {\n\t\t\tchildrenOrPromises.push(deserialize(childrenSerialized[i], manager));\n\t\t}\n\t\tchildrenPromise = Promise.all(childrenOrPromises).then((children: EShape[]) => {\n\t\t\tresult.children = children;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tchildren[i].parent = result;\n\t\t\t}\n\t\t\tresult.onChildTransformChange();\n\t\t\tresult.toDirty();\n\t\t\treturn result;\n\t\t});\n\t}\n\n\t// Action\n\tconst serializedActions = item[17];\n\tfor (let i = 0, imax = serializedActions.length; i < imax; ++i) {\n\t\tresult.action.add(deserializeActionValue(serializedActions[i], manager));\n\t}\n\n\t// Gradient\n\tconst gradientId = item[19];\n\tif (0 <= gradientId && gradientId < manager.resources.length) {\n\t\tconst gradient = manager.resources[gradientId];\n\t\tif (isString(gradient)) {\n\t\t\tresult.gradient = deserializeGradient(gradient);\n\t\t}\n\t}\n\n\t// Image\n\tlet imagePromise: Promise<SHAPE> | null = null;\n\tconst imageId = item[18];\n\tif (0 <= imageId && imageId < manager.resources.length) {\n\t\tconst imageSrc = manager.resources[imageId];\n\t\tif (isString(imageSrc)) {\n\t\t\timagePromise = toImageElement(imageSrc).then((imageElement) => {\n\t\t\t\tresult.image = imageElement;\n\t\t\t\treturn result;\n\t\t\t});\n\t\t}\n\t}\n\n\t//\n\tif (childrenPromise != null) {\n\t\tif (imagePromise != null) {\n\t\t\treturn Promise.all([childrenPromise, imagePromise]).then(() => {\n\t\t\t\treturn result;\n\t\t\t});\n\t\t} else {\n\t\t\treturn childrenPromise;\n\t\t}\n\t} else {\n\t\tif (imagePromise != null) {\n\t\t\treturn imagePromise;\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n};\n"]}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { deserializeBase } from "./deserialize-base";
|
|
6
6
|
import { EShapeButton } from "./e-shape-button";
|
|
7
|
-
export var deserializeButton = function (item, manager) {
|
|
7
|
+
export var deserializeButton = function (item, manager, shape) {
|
|
8
|
+
shape = shape || new EShapeButton();
|
|
8
9
|
var resources = manager.resources;
|
|
9
10
|
var resourceId = item[15];
|
|
10
11
|
if (0 <= resourceId && resourceId < resources.length) {
|
|
@@ -13,11 +14,9 @@ export var deserializeButton = function (item, manager) {
|
|
|
13
14
|
parsed = JSON.parse(resources[resourceId]);
|
|
14
15
|
manager.setExtension(resourceId, parsed);
|
|
15
16
|
}
|
|
16
|
-
var shape = new EShapeButton();
|
|
17
17
|
shape.isToggle = !!(parsed[0] & 1);
|
|
18
18
|
shape.isGrouped = !!(parsed[0] & 2);
|
|
19
|
-
return EShapeDeserializer.deserialize(item, manager, shape);
|
|
20
19
|
}
|
|
21
|
-
return
|
|
20
|
+
return deserializeBase(item, manager, shape);
|
|
22
21
|
};
|
|
23
22
|
//# sourceMappingURL=deserialize-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserialize-button.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-button.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"deserialize-button.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-button.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAChC,IAA4B,EAC5B,OAA6C,EAC7C,KAAoB;IAEpB,KAAK,GAAG,KAAK,IAAI,IAAI,YAAY,EAAE,CAAC;IACpC,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IACpC,IAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5B,IAAI,CAAC,IAAI,UAAU,IAAI,UAAU,GAAG,SAAS,CAAC,MAAM,EAAE;QACrD,IAAI,MAAM,GAAG,OAAO,CAAC,YAAY,CAAW,UAAU,CAAC,CAAC;QACxD,IAAI,MAAM,IAAI,IAAI,EAAE;YACnB,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAa,CAAC;YACvD,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;SACzC;QACD,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;KACpC;IACD,OAAO,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { deserializeBase } from \"./deserialize-base\";\nimport { EShapeButton } from \"./e-shape-button\";\n\nexport const deserializeButton = (\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization,\n\tshape?: EShapeButton\n): Promise<EShapeButton> | EShapeButton => {\n\tshape = shape || new EShapeButton();\n\tconst resources = manager.resources;\n\tconst resourceId = item[15];\n\tif (0 <= resourceId && resourceId < resources.length) {\n\t\tlet parsed = manager.getExtension<[number]>(resourceId);\n\t\tif (parsed == null) {\n\t\t\tparsed = JSON.parse(resources[resourceId]) as [number];\n\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t}\n\t\tshape.isToggle = !!(parsed[0] & 1);\n\t\tshape.isGrouped = !!(parsed[0] & 2);\n\t}\n\treturn deserializeBase(item, manager, shape);\n};\n"]}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { deserializeBase } from "./deserialize-base";
|
|
6
6
|
import { EShapeCircle } from "./e-shape-circle";
|
|
7
|
-
export var deserializeCircle = function (item, manager) {
|
|
8
|
-
return
|
|
7
|
+
export var deserializeCircle = function (item, manager, shape) {
|
|
8
|
+
return deserializeBase(item, manager, shape || new EShapeCircle());
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=deserialize-circle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserialize-circle.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-circle.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"deserialize-circle.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-circle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAChC,IAA4B,EAC5B,OAA6C,EAC7C,KAAoB;IAEpB,OAAO,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,IAAI,YAAY,EAAE,CAAC,CAAC;AACpE,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { deserializeBase } from \"./deserialize-base\";\nimport { EShapeCircle } from \"./e-shape-circle\";\n\nexport const deserializeCircle = (\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization,\n\tshape?: EShapeCircle\n): Promise<EShapeCircle> | EShapeCircle => {\n\treturn deserializeBase(item, manager, shape || new EShapeCircle());\n};\n"]}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { EShapeConnectorBodies } from "../e-shape-connector-bodies";
|
|
6
|
-
import {
|
|
6
|
+
import { deserializeBase } from "./deserialize-base";
|
|
7
7
|
import { EShapeConnectorLine } from "./e-shape-connector-line";
|
|
8
|
-
export var deserializeConnectorLine = function (item, manager) {
|
|
9
|
-
return
|
|
8
|
+
export var deserializeConnectorLine = function (item, manager, shape) {
|
|
9
|
+
return deserializeBase(item, manager, shape || new EShapeConnectorLine());
|
|
10
10
|
};
|
|
11
|
-
export var
|
|
11
|
+
export var onDeserializedConnectorLine = function (item, shape, mapping, manager) {
|
|
12
12
|
if (shape instanceof EShapeConnectorLine) {
|
|
13
13
|
var resources = manager.resources;
|
|
14
14
|
var resourceId = item[15];
|
|
@@ -24,7 +24,8 @@ export var onConnectorLineDeserialized = function (item, shape, mapping, manager
|
|
|
24
24
|
var points = shape.points;
|
|
25
25
|
points.deserialize(parsed[1], manager);
|
|
26
26
|
// Edge
|
|
27
|
-
shape.edge
|
|
27
|
+
var edge = shape.edge;
|
|
28
|
+
edge.deserialize(parsed[0], mapping, manager);
|
|
28
29
|
// Body
|
|
29
30
|
var body = shape.body;
|
|
30
31
|
var bodyId = parsed[2];
|
|
@@ -33,7 +34,7 @@ export var onConnectorLineDeserialized = function (item, shape, mapping, manager
|
|
|
33
34
|
}
|
|
34
35
|
else {
|
|
35
36
|
// The following is for backward compatibility.
|
|
36
|
-
body.set(EShapeConnectorBodies.from(points.values));
|
|
37
|
+
body.set(EShapeConnectorBodies.from(points.values, edge.tail.margin, edge.head.margin));
|
|
37
38
|
}
|
|
38
39
|
// Unlock
|
|
39
40
|
shape.unlock();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserialize-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"deserialize-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,IAAM,wBAAwB,GAAG,UACvC,IAA4B,EAC5B,OAA6C,EAC7C,KAA2B;IAE3B,OAAO,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,IAAI,mBAAmB,EAAE,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,2BAA2B,GAAG,UAC1C,IAA4B,EAC5B,KAAa,EACb,OAA0B,EAC1B,OAA6C;IAE7C,IAAI,KAAK,YAAY,mBAAmB,EAAE;QACzC,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACpC,IAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,UAAU,IAAI,UAAU,GAAG,SAAS,CAAC,MAAM,EAAE;YACrD,IAAI,MAAM,GAAG,OAAO,CAAC,YAAY,CAA4B,UAAU,CAAC,CAAC;YACzE,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAA8B,CAAC;gBACxE,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;aACzC;YAED,OAAO;YACP,KAAK,CAAC,IAAI,EAAE,CAAC;YAEb,SAAS;YACT,IAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YAC5B,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YAEvC,OAAO;YACP,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAE9C,OAAO;YACP,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;aAC3C;iBAAM;gBACN,+CAA+C;gBAC/C,IAAI,CAAC,GAAG,CACP,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAC7E,CAAC;aACF;YAED,SAAS;YACT,KAAK,CAAC,MAAM,EAAE,CAAC;SACf;KACD;AACF,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeConnectorBodies } from \"../e-shape-connector-bodies\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { EShapeUuidMapping } from \"../e-shape-uuid-mapping\";\nimport { deserializeBase } from \"./deserialize-base\";\nimport { EShapeConnectorLine } from \"./e-shape-connector-line\";\n\nexport const deserializeConnectorLine = (\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization,\n\tshape?: EShapeConnectorLine\n): Promise<EShapeConnectorLine> | EShapeConnectorLine | null => {\n\treturn deserializeBase(item, manager, shape || new EShapeConnectorLine());\n};\n\nexport const onDeserializedConnectorLine = (\n\titem: DDiagramSerializedItem,\n\tshape: EShape,\n\tmapping: EShapeUuidMapping,\n\tmanager: EShapeResourceManagerDeserialization\n): void => {\n\tif (shape instanceof EShapeConnectorLine) {\n\t\tconst resources = manager.resources;\n\t\tconst resourceId = item[15];\n\t\tif (0 <= resourceId && resourceId < resources.length) {\n\t\t\tlet parsed = manager.getExtension<[number, number, number?]>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(resources[resourceId]) as [number, number, number?];\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t\t}\n\n\t\t\t// Lock\n\t\t\tshape.lock();\n\n\t\t\t// Points\n\t\t\tconst points = shape.points;\n\t\t\tpoints.deserialize(parsed[1], manager);\n\n\t\t\t// Edge\n\t\t\tconst edge = shape.edge;\n\t\t\tedge.deserialize(parsed[0], mapping, manager);\n\n\t\t\t// Body\n\t\t\tconst body = shape.body;\n\t\t\tconst bodyId = parsed[2];\n\t\t\tif (bodyId != null) {\n\t\t\t\tbody.deserialize(bodyId, mapping, manager);\n\t\t\t} else {\n\t\t\t\t// The following is for backward compatibility.\n\t\t\t\tbody.set(\n\t\t\t\t\tEShapeConnectorBodies.from(points.values, edge.tail.margin, edge.head.margin)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Unlock\n\t\t\tshape.unlock();\n\t\t}\n\t}\n};\n"]}
|
|
@@ -2,7 +2,20 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { deserializeBase } from "./deserialize-base";
|
|
6
|
+
import { EShapeEmbedded } from "./e-shape-embedded";
|
|
7
|
+
var create = function (name, width, height, container, manager, item) {
|
|
8
|
+
var shape = new EShapeEmbedded(name, manager.isEditMode);
|
|
9
|
+
var result = deserializeBase(item, manager, shape);
|
|
10
|
+
var shapeSize = shape.size;
|
|
11
|
+
var sizeX = shapeSize.x;
|
|
12
|
+
var sizeY = shapeSize.y;
|
|
13
|
+
shape.size.set(width, height);
|
|
14
|
+
container.copyTo(shape);
|
|
15
|
+
shape.size.init();
|
|
16
|
+
shape.size.set(sizeX, sizeY);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
6
19
|
export var deserializeEmbedded = function (item, manager) {
|
|
7
20
|
var pieces = manager.pieces;
|
|
8
21
|
var pieceId = item[15];
|
|
@@ -12,7 +25,7 @@ export var deserializeEmbedded = function (item, manager) {
|
|
|
12
25
|
var piece = pieces[pieceId];
|
|
13
26
|
var pieceDatum = pieceData.get(piece);
|
|
14
27
|
if (pieceDatum) {
|
|
15
|
-
return
|
|
28
|
+
return create(piece, pieceDatum.width, pieceDatum.height, pieceDatum.layer, manager, item);
|
|
16
29
|
}
|
|
17
30
|
}
|
|
18
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserialize-embedded.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-embedded.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deserialize-embedded.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-embedded.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,IAAM,MAAM,GAAG,UACd,IA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AAK,EAChB,OAAO,EACP,IAAI,CACJ,CAAC;aACF;SACD;KACD;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShapeLayerContainer } from \"../e-shape-layer-container\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { deserializeBase } from \"./deserialize-base\";\nimport { EShapeEmbedded } from \"./e-shape-embedded\";\n\nconst create = (\n\tname: string,\n\twidth: number,\n\theight: number,\n\tcontainer: EShapeLayerContainer,\n\tmanager: EShapeResourceManagerDeserialization,\n\titem: DDiagramSerializedItem\n): Promise<EShapeEmbedded> | EShapeEmbedded => {\n\tconst shape = new EShapeEmbedded(name, manager.isEditMode);\n\tconst result = deserializeBase(item, manager, shape);\n\tconst shapeSize = shape.size;\n\tconst sizeX = shapeSize.x;\n\tconst sizeY = shapeSize.y;\n\tshape.size.set(width, height);\n\tcontainer.copyTo(shape);\n\tshape.size.init();\n\tshape.size.set(sizeX, sizeY);\n\treturn result;\n};\n\nexport const deserializeEmbedded = (\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization\n): Promise<EShapeEmbedded> | EShapeEmbedded | null => {\n\tconst pieces = manager.pieces;\n\tconst pieceId = item[15];\n\tif (pieces && 0 <= pieceId && pieceId < pieces.length) {\n\t\tconst pieceData = manager.pieceData;\n\t\tif (pieceData) {\n\t\t\tconst piece = pieces[pieceId];\n\t\t\tconst pieceDatum = pieceData.get(piece);\n\t\t\tif (pieceDatum) {\n\t\t\t\treturn create(\n\t\t\t\t\tpiece,\n\t\t\t\t\tpieceDatum.width,\n\t\t\t\t\tpieceDatum.height,\n\t\t\t\t\tpieceDatum.layer,\n\t\t\t\t\tmanager,\n\t\t\t\t\titem\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n};\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
var parse = function (target) {
|
|
6
|
+
try {
|
|
7
|
+
return JSON.parse(target);
|
|
8
|
+
}
|
|
9
|
+
catch (e) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export var deserializeGradient = function (target) {
|
|
14
|
+
var parsed = parse(target);
|
|
15
|
+
if (parsed == null || parsed.length < 7) {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
var direction = parsed[0];
|
|
20
|
+
var points = [];
|
|
21
|
+
for (var i = 1, imax = parsed.length; i < imax; i += 3) {
|
|
22
|
+
points.push({
|
|
23
|
+
color: parsed[i + 0],
|
|
24
|
+
alpha: parsed[i + 1],
|
|
25
|
+
position: parsed[i + 2]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
points: points,
|
|
30
|
+
direction: direction
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=deserialize-gradient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deserialize-gradient.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-gradient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,IAAM,KAAK,GAAG,UAAC,MAAc;IAC5B,IAAI;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAa,CAAC;KACtC;IAAC,OAAO,CAAC,EAAE;QACX,OAAO,IAAI,CAAC;KACZ;AACF,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAC,MAAc;IACjD,IAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACxC,OAAO,SAAS,CAAC;KACjB;SAAM;QACN,IAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAC5B,IAAM,MAAM,GAA8B,EAAE,CAAC;QAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE;YACvD,MAAM,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;gBACpB,KAAK,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;gBACpB,QAAQ,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;aACvB,CAAC,CAAC;SACH;QACD,OAAO;YACN,MAAM,QAAA;YACN,SAAS,WAAA;SACT,CAAC;KACF;AACF,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeGradientLike, EShapeGradientPointLike } from \"../e-shape-gradient\";\n\nconst parse = (target: string): number[] | null => {\n\ttry {\n\t\treturn JSON.parse(target) as number[];\n\t} catch (e) {\n\t\treturn null;\n\t}\n};\n\nexport const deserializeGradient = (target: string): EShapeGradientLike | undefined => {\n\tconst parsed = parse(target);\n\tif (parsed == null || parsed.length < 7) {\n\t\treturn undefined;\n\t} else {\n\t\tconst direction = parsed[0];\n\t\tconst points: EShapeGradientPointLike[] = [];\n\t\tfor (let i = 1, imax = parsed.length; i < imax; i += 3) {\n\t\t\tpoints.push({\n\t\t\t\tcolor: parsed[i + 0],\n\t\t\t\talpha: parsed[i + 1],\n\t\t\t\tposition: parsed[i + 2]\n\t\t\t});\n\t\t}\n\t\treturn {\n\t\t\tpoints,\n\t\t\tdirection\n\t\t};\n\t}\n};\n"]}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { deserializeBase } from "./deserialize-base";
|
|
6
6
|
import { EShapeGroupShadowed } from "./e-shape-group-shadowed";
|
|
7
|
-
export var deserializeGroupShadowed = function (item, manager) {
|
|
8
|
-
|
|
9
|
-
var result =
|
|
7
|
+
export var deserializeGroupShadowed = function (item, manager, shape) {
|
|
8
|
+
shape = shape || new EShapeGroupShadowed(manager.isEditMode);
|
|
9
|
+
var result = deserializeBase(item, manager, shape);
|
|
10
10
|
shape.size.init();
|
|
11
11
|
return result;
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserialize-group-shadowed.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-group-shadowed.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"deserialize-group-shadowed.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-group-shadowed.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,IAAM,wBAAwB,GAAG,UACvC,IAA4B,EAC5B,OAA6C,EAC7C,KAA2B;IAE3B,KAAK,GAAG,KAAK,IAAI,IAAI,mBAAmB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC7D,IAAM,MAAM,GAAG,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IACrD,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAClB,OAAO,MAAM,CAAC;AACf,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { deserializeBase } from \"./deserialize-base\";\nimport { EShapeGroupShadowed } from \"./e-shape-group-shadowed\";\n\nexport const deserializeGroupShadowed = (\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization,\n\tshape?: EShapeGroupShadowed\n): Promise<EShapeGroupShadowed> | EShapeGroupShadowed => {\n\tshape = shape || new EShapeGroupShadowed(manager.isEditMode);\n\tconst result = deserializeBase(item, manager, shape);\n\tshape.size.init();\n\treturn result;\n};\n"]}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { deserializeBase } from "./deserialize-base";
|
|
6
6
|
import { EShapeGroup } from "./e-shape-group";
|
|
7
|
-
export var deserializeGroup = function (item, manager) {
|
|
8
|
-
|
|
9
|
-
var result =
|
|
7
|
+
export var deserializeGroup = function (item, manager, shape) {
|
|
8
|
+
shape = shape || new EShapeGroup(manager.isEditMode);
|
|
9
|
+
var result = deserializeBase(item, manager, shape);
|
|
10
10
|
shape.size.init();
|
|
11
11
|
return result;
|
|
12
12
|
};
|