@wcardinal/wcardinal-ui 0.405.0 → 0.406.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 (182) hide show
  1. package/dist/types/wcardinal/ui/d-base-background-snippet.d.ts +2 -1
  2. package/dist/types/wcardinal/ui/d-base-border-snippet.d.ts +2 -1
  3. package/dist/types/wcardinal/ui/d-base-outline-snippet.d.ts +2 -1
  4. package/dist/types/wcardinal/ui/d-button-color.d.ts +0 -1
  5. package/dist/types/wcardinal/ui/d-dialog.d.ts +1 -1
  6. package/dist/types/wcardinal/ui/d-dynamic-text-style.d.ts +17 -11
  7. package/dist/types/wcardinal/ui/d-dynamic-text.d.ts +3 -2
  8. package/dist/types/wcardinal/ui/d-image-base.d.ts +1 -4
  9. package/dist/types/wcardinal/ui/d-image-piece-align.d.ts +4 -4
  10. package/dist/types/wcardinal/ui/d-image-piece-container-impl.d.ts +14 -1
  11. package/dist/types/wcardinal/ui/d-image-piece-container.d.ts +11 -0
  12. package/dist/types/wcardinal/ui/d-image-piece-layouter-part-container.d.ts +2 -2
  13. package/dist/types/wcardinal/ui/d-image-piece-layouter.d.ts +2 -2
  14. package/dist/types/wcardinal/ui/d-input.d.ts +2 -1
  15. package/dist/types/wcardinal/ui/d-menu-item-text.d.ts +3 -2
  16. package/dist/types/wcardinal/ui/d-scroll-bar.d.ts +2 -1
  17. package/dist/types/wcardinal/ui/d-text-base.d.ts +15 -74
  18. package/dist/types/wcardinal/ui/d-text-piece-align-impl.d.ts +20 -0
  19. package/dist/types/wcardinal/ui/d-text-piece-align.d.ts +7 -0
  20. package/dist/types/wcardinal/ui/d-text-piece-impl.d.ts +63 -0
  21. package/dist/types/wcardinal/ui/d-text-piece-style-impl.d.ts +29 -0
  22. package/dist/types/wcardinal/ui/d-text-piece-style.d.ts +16 -0
  23. package/dist/types/wcardinal/ui/d-text-piece.d.ts +61 -0
  24. package/dist/types/wcardinal/ui/shape/e-shape-image-like.d.ts +6 -0
  25. package/dist/types/wcardinal/ui/shape/e-shape.d.ts +2 -2
  26. package/dist/types/wcardinal/ui/shape/index.d.ts +1 -0
  27. package/dist/types/wcardinal/ui/shape/variant/e-shape-base.d.ts +4 -6
  28. package/dist/types/wcardinal/ui/shape/variant/e-shape-group-viewer.d.ts +6 -2
  29. package/dist/types/wcardinal/ui/shape/variant/e-shape-group.d.ts +6 -2
  30. package/dist/types/wcardinal/ui/shape/variant/e-shape-image-sdf.d.ts +2 -1
  31. package/dist/types/wcardinal/ui/shape/variant/e-shape-image.d.ts +2 -1
  32. package/dist/types/wcardinal/ui/shape/variant/e-shape-primitive.d.ts +7 -3
  33. package/dist/types/wcardinal/ui/shape/variant/to-image-element.d.ts +2 -1
  34. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-input.d.ts +1 -0
  35. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-last.d.ts +5 -4
  36. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-next.d.ts +5 -4
  37. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-previous.d.ts +5 -4
  38. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-top.d.ts +5 -4
  39. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots.d.ts +5 -4
  40. package/dist/types/wcardinal/ui/theme/white/d-theme-white-input.d.ts +1 -0
  41. package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-last.d.ts +5 -4
  42. package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-next.d.ts +5 -4
  43. package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-previous.d.ts +5 -4
  44. package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-top.d.ts +5 -4
  45. package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-dots.d.ts +5 -4
  46. package/dist/types/wcardinal/ui/util/dynamic-atlas-item-image.d.ts +2 -2
  47. package/dist/types/wcardinal/ui/util/dynamic-sdf-font-generator.d.ts +1 -1
  48. package/dist/wcardinal/ui/d-base-background-snippet.js.map +1 -1
  49. package/dist/wcardinal/ui/d-base-border-snippet.js.map +1 -1
  50. package/dist/wcardinal/ui/d-base-outline-snippet.js.map +1 -1
  51. package/dist/wcardinal/ui/d-button-color-gradient.js +10 -13
  52. package/dist/wcardinal/ui/d-button-color-gradient.js.map +1 -1
  53. package/dist/wcardinal/ui/d-button-color.js +20 -23
  54. package/dist/wcardinal/ui/d-button-color.js.map +1 -1
  55. package/dist/wcardinal/ui/d-button-date.js +4 -4
  56. package/dist/wcardinal/ui/d-button-date.js.map +1 -1
  57. package/dist/wcardinal/ui/d-button-datetime.js +4 -4
  58. package/dist/wcardinal/ui/d-button-datetime.js.map +1 -1
  59. package/dist/wcardinal/ui/d-button-select.js +2 -2
  60. package/dist/wcardinal/ui/d-button-select.js.map +1 -1
  61. package/dist/wcardinal/ui/d-button-time.js +4 -4
  62. package/dist/wcardinal/ui/d-button-time.js.map +1 -1
  63. package/dist/wcardinal/ui/d-dialog-processing.js +1 -1
  64. package/dist/wcardinal/ui/d-dialog-processing.js.map +1 -1
  65. package/dist/wcardinal/ui/d-dialog.js.map +1 -1
  66. package/dist/wcardinal/ui/d-dynamic-text-style.js +39 -65
  67. package/dist/wcardinal/ui/d-dynamic-text-style.js.map +1 -1
  68. package/dist/wcardinal/ui/d-dynamic-text.js +11 -8
  69. package/dist/wcardinal/ui/d-dynamic-text.js.map +1 -1
  70. package/dist/wcardinal/ui/d-image-base.js +6 -18
  71. package/dist/wcardinal/ui/d-image-base.js.map +1 -1
  72. package/dist/wcardinal/ui/d-image-piece-align.js.map +1 -1
  73. package/dist/wcardinal/ui/d-image-piece-container-impl.js +49 -1
  74. package/dist/wcardinal/ui/d-image-piece-container-impl.js.map +1 -1
  75. package/dist/wcardinal/ui/d-image-piece-container.js.map +1 -1
  76. package/dist/wcardinal/ui/d-image-piece-layouter-part-container.js.map +1 -1
  77. package/dist/wcardinal/ui/d-image-piece-layouter.js.map +1 -1
  78. package/dist/wcardinal/ui/d-indicator-processing.js +1 -1
  79. package/dist/wcardinal/ui/d-indicator-processing.js.map +1 -1
  80. package/dist/wcardinal/ui/d-input.js +11 -7
  81. package/dist/wcardinal/ui/d-input.js.map +1 -1
  82. package/dist/wcardinal/ui/d-menu-item-text.js +12 -6
  83. package/dist/wcardinal/ui/d-menu-item-text.js.map +1 -1
  84. package/dist/wcardinal/ui/d-scroll-bar.js.map +1 -1
  85. package/dist/wcardinal/ui/d-table-body-cell-date.js +7 -10
  86. package/dist/wcardinal/ui/d-table-body-cell-date.js.map +1 -1
  87. package/dist/wcardinal/ui/d-table-body-cell-datetime.js +7 -10
  88. package/dist/wcardinal/ui/d-table-body-cell-datetime.js.map +1 -1
  89. package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js +4 -10
  90. package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js.map +1 -1
  91. package/dist/wcardinal/ui/d-table-body-cell-select-promise.js +4 -10
  92. package/dist/wcardinal/ui/d-table-body-cell-select-promise.js.map +1 -1
  93. package/dist/wcardinal/ui/d-table-body-cell-time.js +7 -10
  94. package/dist/wcardinal/ui/d-table-body-cell-time.js.map +1 -1
  95. package/dist/wcardinal/ui/d-text-base.js +55 -247
  96. package/dist/wcardinal/ui/d-text-base.js.map +1 -1
  97. package/dist/wcardinal/ui/d-text-piece-align-impl.js +69 -0
  98. package/dist/wcardinal/ui/d-text-piece-align-impl.js.map +1 -0
  99. package/dist/wcardinal/ui/d-text-piece-align.js +2 -0
  100. package/dist/wcardinal/ui/d-text-piece-align.js.map +1 -0
  101. package/dist/wcardinal/ui/d-text-piece-impl.js +299 -0
  102. package/dist/wcardinal/ui/d-text-piece-impl.js.map +1 -0
  103. package/dist/wcardinal/ui/d-text-piece-style-impl.js +146 -0
  104. package/dist/wcardinal/ui/d-text-piece-style-impl.js.map +1 -0
  105. package/dist/wcardinal/ui/d-text-piece-style.js +2 -0
  106. package/dist/wcardinal/ui/d-text-piece-style.js.map +1 -0
  107. package/dist/wcardinal/ui/d-text-piece.js +2 -0
  108. package/dist/wcardinal/ui/d-text-piece.js.map +1 -0
  109. package/dist/wcardinal/ui/shape/e-shape-container.js +1 -1
  110. package/dist/wcardinal/ui/shape/e-shape-container.js.map +1 -1
  111. package/dist/wcardinal/ui/shape/e-shape-image-like.js +2 -0
  112. package/dist/wcardinal/ui/shape/e-shape-image-like.js.map +1 -0
  113. package/dist/wcardinal/ui/shape/e-shape-renderer.js +7 -13
  114. package/dist/wcardinal/ui/shape/e-shape-renderer.js.map +1 -1
  115. package/dist/wcardinal/ui/shape/e-shape.js.map +1 -1
  116. package/dist/wcardinal/ui/shape/index.js +1 -0
  117. package/dist/wcardinal/ui/shape/index.js.map +1 -1
  118. package/dist/wcardinal/ui/shape/variant/create-image-sdf.js +4 -4
  119. package/dist/wcardinal/ui/shape/variant/create-image-sdf.js.map +1 -1
  120. package/dist/wcardinal/ui/shape/variant/create-image.js +2 -2
  121. package/dist/wcardinal/ui/shape/variant/create-image.js.map +1 -1
  122. package/dist/wcardinal/ui/shape/variant/e-shape-base.js +0 -25
  123. package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
  124. package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js +6 -0
  125. package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js.map +1 -1
  126. package/dist/wcardinal/ui/shape/variant/e-shape-group.js +6 -0
  127. package/dist/wcardinal/ui/shape/variant/e-shape-group.js.map +1 -1
  128. package/dist/wcardinal/ui/shape/variant/e-shape-image-sdf.js.map +1 -1
  129. package/dist/wcardinal/ui/shape/variant/e-shape-image.js.map +1 -1
  130. package/dist/wcardinal/ui/shape/variant/e-shape-primitive.js +15 -2
  131. package/dist/wcardinal/ui/shape/variant/e-shape-primitive.js.map +1 -1
  132. package/dist/wcardinal/ui/shape/variant/to-image-element.js +9 -3
  133. package/dist/wcardinal/ui/shape/variant/to-image-element.js.map +1 -1
  134. package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js +6 -0
  135. package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js.map +1 -1
  136. package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-last.js.map +1 -1
  137. package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-next.js.map +1 -1
  138. package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-previous.js.map +1 -1
  139. package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-top.js.map +1 -1
  140. package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots.js.map +1 -1
  141. package/dist/wcardinal/ui/theme/dark/d-theme-dark-select-multiple.js +9 -9
  142. package/dist/wcardinal/ui/theme/dark/d-theme-dark-select-multiple.js.map +1 -1
  143. package/dist/wcardinal/ui/theme/dark/d-theme-dark-select.js +7 -7
  144. package/dist/wcardinal/ui/theme/dark/d-theme-dark-select.js.map +1 -1
  145. package/dist/wcardinal/ui/theme/white/d-theme-white-input.js +6 -0
  146. package/dist/wcardinal/ui/theme/white/d-theme-white-input.js.map +1 -1
  147. package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-last.js.map +1 -1
  148. package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-next.js.map +1 -1
  149. package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-previous.js.map +1 -1
  150. package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-top.js.map +1 -1
  151. package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-dots.js.map +1 -1
  152. package/dist/wcardinal/ui/theme/white/d-theme-white-select-multiple.js +9 -9
  153. package/dist/wcardinal/ui/theme/white/d-theme-white-select-multiple.js.map +1 -1
  154. package/dist/wcardinal/ui/theme/white/d-theme-white-select.js +7 -7
  155. package/dist/wcardinal/ui/theme/white/d-theme-white-select.js.map +1 -1
  156. package/dist/wcardinal/ui/util/dynamic-atlas-item-image.js +18 -9
  157. package/dist/wcardinal/ui/util/dynamic-atlas-item-image.js.map +1 -1
  158. package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js +1 -1
  159. package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js.map +1 -1
  160. package/dist/wcardinal/ui/util/dynamic-sdf-font-generator.js +1 -3
  161. package/dist/wcardinal/ui/util/dynamic-sdf-font-generator.js.map +1 -1
  162. package/dist/wcardinal-ui-theme-dark-en-us.js +23 -17
  163. package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
  164. package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
  165. package/dist/wcardinal-ui-theme-dark-ja-jp.js +23 -17
  166. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
  167. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
  168. package/dist/wcardinal-ui-theme-dark.js +23 -17
  169. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  170. package/dist/wcardinal-ui-theme-white-en-us.js +23 -17
  171. package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
  172. package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
  173. package/dist/wcardinal-ui-theme-white-ja-jp.js +23 -17
  174. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
  175. package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
  176. package/dist/wcardinal-ui-theme-white.js +23 -17
  177. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  178. package/dist/wcardinal-ui.cjs.js +1110 -787
  179. package/dist/wcardinal-ui.js +1065 -754
  180. package/dist/wcardinal-ui.min.js +2 -2
  181. package/dist/wcardinal-ui.min.js.map +1 -1
  182. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.405.0
2
+ Winter Cardinal UI v0.406.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -4552,21 +4552,6 @@ var hitTestBBox = function (x, y, ax, ay) {
4552
4552
  return -ax <= x && x <= +ax && -ay <= y && y <= +ay;
4553
4553
  };
4554
4554
 
4555
- /*
4556
- * Copyright (C) 2019 Toshiba Corporation
4557
- * SPDX-License-Identifier: Apache-2.0
4558
- */
4559
- var toGradientSerialized = function (gradient) {
4560
- var points = gradient.points;
4561
- var result = "[".concat(gradient.direction);
4562
- for (var i = 0, imax = points.length, j = 1; i < imax; i += 1, j += 3) {
4563
- var point = points[i];
4564
- result += ",".concat(point.color, ",").concat(point.alpha, ",").concat(point.position);
4565
- }
4566
- result += "]";
4567
- return result;
4568
- };
4569
-
4570
4555
  /*
4571
4556
  * Copyright (C) 2019 Toshiba Corporation
4572
4557
  * SPDX-License-Identifier: Apache-2.0
@@ -4967,16 +4952,6 @@ var EShapeBase = /** @class */ (function (_super) {
4967
4952
  }
4968
4953
  }
4969
4954
  };
4970
- Object.defineProperty(EShapeBase.prototype, "image", {
4971
- get: function () {
4972
- return this._image;
4973
- },
4974
- set: function (image) {
4975
- this._image = image;
4976
- },
4977
- enumerable: false,
4978
- configurable: true
4979
- });
4980
4955
  Object.defineProperty(EShapeBase.prototype, "points", {
4981
4956
  get: function () {
4982
4957
  return this._points;
@@ -5125,20 +5100,6 @@ var EShapeBase = /** @class */ (function (_super) {
5125
5100
  }
5126
5101
  return childrenSerialized;
5127
5102
  };
5128
- EShapeBase.prototype.serializeImage = function (manager) {
5129
- var image = this._image;
5130
- return image != null ? manager.addResource(image.src) : -1;
5131
- };
5132
- EShapeBase.prototype.serializeGradient = function (manager) {
5133
- var gradient = this.gradient;
5134
- if (gradient != null) {
5135
- if (gradient.serialized == null) {
5136
- gradient.serialized = toGradientSerialized(gradient);
5137
- }
5138
- return manager.addResource(gradient.serialized);
5139
- }
5140
- return -1;
5141
- };
5142
5103
  EShapeBase.prototype.serializeState = function (manager) {
5143
5104
  var state = this.state;
5144
5105
  return (this.interactive ? 1 : 0) | (state.isFocusable ? 0 : 2) | (state.isActive ? 4 : 0);
@@ -8156,6 +8117,21 @@ var EShapeTextImpl = /** @class */ (function () {
8156
8117
  return EShapeTextImpl;
8157
8118
  }());
8158
8119
 
8120
+ /*
8121
+ * Copyright (C) 2019 Toshiba Corporation
8122
+ * SPDX-License-Identifier: Apache-2.0
8123
+ */
8124
+ var toGradientSerialized = function (gradient) {
8125
+ var points = gradient.points;
8126
+ var result = "[".concat(gradient.direction);
8127
+ for (var i = 0, imax = points.length, j = 1; i < imax; i += 1, j += 3) {
8128
+ var point = points[i];
8129
+ result += ",".concat(point.color, ",").concat(point.alpha, ",").concat(point.position);
8130
+ }
8131
+ result += "]";
8132
+ return result;
8133
+ };
8134
+
8159
8135
  /*
8160
8136
  * Copyright (C) 2019 Toshiba Corporation
8161
8137
  * SPDX-License-Identifier: Apache-2.0
@@ -8224,11 +8200,9 @@ var EShapePrimitive = /** @class */ (function (_super) {
8224
8200
  if (this._image !== image) {
8225
8201
  if (image != null) {
8226
8202
  this._image = image;
8227
- this.imageSrc = image.src;
8228
8203
  }
8229
8204
  else {
8230
8205
  this._image = undefined;
8231
- this.imageSrc = undefined;
8232
8206
  }
8233
8207
  var parent_1 = this.parent;
8234
8208
  if (parent_1 != null) {
@@ -8239,6 +8213,20 @@ var EShapePrimitive = /** @class */ (function (_super) {
8239
8213
  enumerable: false,
8240
8214
  configurable: true
8241
8215
  });
8216
+ EShapePrimitive.prototype.serializeImage = function (manager) {
8217
+ var image = this._image;
8218
+ return image != null ? manager.addResource(image.url) : -1;
8219
+ };
8220
+ EShapePrimitive.prototype.serializeGradient = function (manager) {
8221
+ var gradient = this.gradient;
8222
+ if (gradient != null) {
8223
+ if (gradient.serialized == null) {
8224
+ gradient.serialized = toGradientSerialized(gradient);
8225
+ }
8226
+ return manager.addResource(gradient.serialized);
8227
+ }
8228
+ return -1;
8229
+ };
8242
8230
  return EShapePrimitive;
8243
8231
  }(EShapeBase));
8244
8232
 
@@ -17950,6 +17938,9 @@ var EShapeGroupViewer = /** @class */ (function (_super) {
17950
17938
  enumerable: false,
17951
17939
  configurable: true
17952
17940
  });
17941
+ EShapeGroupViewer.prototype.serializeGradient = function (manager) {
17942
+ return -1;
17943
+ };
17953
17944
  Object.defineProperty(EShapeGroupViewer.prototype, "radius", {
17954
17945
  get: function () {
17955
17946
  return 0;
@@ -17970,6 +17961,9 @@ var EShapeGroupViewer = /** @class */ (function (_super) {
17970
17961
  enumerable: false,
17971
17962
  configurable: true
17972
17963
  });
17964
+ EShapeGroupViewer.prototype.serializeImage = function (manager) {
17965
+ return -1;
17966
+ };
17973
17967
  Object.defineProperty(EShapeGroupViewer.prototype, "points", {
17974
17968
  get: function () {
17975
17969
  return undefined;
@@ -21176,12 +21170,10 @@ var DynamicSDFFontGenerator = /** @class */ (function () {
21176
21170
  }
21177
21171
  }
21178
21172
  };
21179
- DynamicSDFFontGenerator.prototype.updateTexture = function (source) {
21173
+ DynamicSDFFontGenerator.prototype.updateTexture = function (width, height, source) {
21180
21174
  var gl = this._gl;
21181
21175
  var canvas = this._canvas;
21182
21176
  if (gl != null && gl.isContextLost() !== true && canvas != null) {
21183
- var width = source.width;
21184
- var height = source.height;
21185
21177
  if (canvas.width !== width || canvas.height !== height) {
21186
21178
  canvas.width = width;
21187
21179
  canvas.height = height;
@@ -21544,7 +21536,7 @@ var DynamicSDFFontAtlas = /** @class */ (function () {
21544
21536
  context.fillText(data.character, data.origin.x, data.origin.y);
21545
21537
  }
21546
21538
  // Convert to SDF font texture
21547
- generator.updateTexture(canvas);
21539
+ generator.updateTexture(width, height, canvas);
21548
21540
  generator.render();
21549
21541
  generator.read(canvas);
21550
21542
  return true;
@@ -21695,9 +21687,9 @@ var DynamicSDFFontAtlases = /** @class */ (function () {
21695
21687
  */
21696
21688
  var DynamicAtlasItemImage = /** @class */ (function (_super) {
21697
21689
  __extends(DynamicAtlasItemImage, _super);
21698
- function DynamicAtlasItemImage(image, baseTexture) {
21699
- var _this = _super.call(this, image.src, image.width / baseTexture.resolution, image.height / baseTexture.resolution, 0, baseTexture) || this;
21700
- _this.image = image;
21690
+ function DynamicAtlasItemImage(src, width, height, source, baseTexture) {
21691
+ var _this = _super.call(this, src, width / baseTexture.resolution, height / baseTexture.resolution, 0, baseTexture) || this;
21692
+ _this.source = source;
21701
21693
  return _this;
21702
21694
  }
21703
21695
  DynamicAtlasItemImage.prototype.render = function (context) {
@@ -21706,12 +21698,21 @@ var DynamicAtlasItemImage = /** @class */ (function (_super) {
21706
21698
  var y = frame.y;
21707
21699
  var w = frame.width;
21708
21700
  var h = frame.height;
21709
- var image = this.image;
21710
- context.drawImage(image, x, y, w, h);
21711
- context.drawImage(image, 0, 0, 1, h, x - 1, y - 1, 1, h + 2);
21712
- context.drawImage(image, 0, 0, w, 1, x, y - 1, w, 1);
21713
- context.drawImage(image, w - 1, 0, 1, h, x + w, y - 1, 1, h + 2);
21714
- context.drawImage(image, 0, h - 1, w, 1, x, y + h, w, 1);
21701
+ var source = this.source;
21702
+ if (source instanceof ImageData) {
21703
+ context.putImageData(source, x, y);
21704
+ context.putImageData(source, x - 1, y, 0, 0, 1, h);
21705
+ context.putImageData(source, x, y - 1, 0, 0, w, 1);
21706
+ context.putImageData(source, x + w, y, w - 1, 0, 1, h);
21707
+ context.putImageData(source, x, y + h, 0, h - 1, w, 1);
21708
+ }
21709
+ else {
21710
+ context.drawImage(source, x, y, w, h);
21711
+ context.drawImage(source, 0, 0, 1, h, x - 1, y - 1, 1, h + 2);
21712
+ context.drawImage(source, 0, 0, w, 1, x, y - 1, w, 1);
21713
+ context.drawImage(source, w - 1, 0, 1, h, x + w, y - 1, 1, h + 2);
21714
+ context.drawImage(source, 0, h - 1, w, 1, x, y + h, w, 1);
21715
+ }
21715
21716
  };
21716
21717
  return DynamicAtlasItemImage;
21717
21718
  }(DynamicAtlasItem));
@@ -22064,24 +22065,18 @@ var EShapeRenderer = /** @class */ (function (_super) {
22064
22065
  };
22065
22066
  EShapeRenderer.prototype.updateAtlas = function (shape, atlas, fontAtlases, defaultTexture, baseTexture) {
22066
22067
  // Texture
22067
- // Do not access the shape.image.src here.
22068
+ // Do not access the shape.image.source here.
22068
22069
  // It slows down the rendering speed significantly.
22069
- var imageSrc = shape.imageSrc;
22070
- if (imageSrc != null) {
22071
- var textureItem = atlas.get(imageSrc);
22070
+ var image = shape.image;
22071
+ if (image != null) {
22072
+ var textureItem = atlas.get(image.url);
22072
22073
  if (textureItem != null) {
22073
22074
  shape.texture = textureItem.texture;
22074
22075
  }
22075
22076
  else {
22076
- var image = shape.image;
22077
- if (image != null) {
22078
- var newTextureItem = new DynamicAtlasItemImage(image, baseTexture);
22079
- shape.texture = newTextureItem.texture;
22080
- atlas.set(newTextureItem.id, newTextureItem);
22081
- }
22082
- else {
22083
- shape.texture = defaultTexture;
22084
- }
22077
+ var newTextureItem = new DynamicAtlasItemImage(image.url, image.width, image.height, image.source, baseTexture);
22078
+ shape.texture = newTextureItem.texture;
22079
+ atlas.set(newTextureItem.id, newTextureItem);
22085
22080
  }
22086
22081
  }
22087
22082
  else {
@@ -22249,7 +22244,7 @@ var EShapeContainer = /** @class */ (function (_super) {
22249
22244
  _this._pixelScale = 1;
22250
22245
  _this._pixelScaleId = -2; // Since this._shapeScaleId starts from -1.
22251
22246
  _this._shapeScale = 1;
22252
- _this._shapeScaleId = -1; // Since PIXI.Transform._worldID starts from zero.
22247
+ _this._shapeScaleId = -1; // Since Transform._worldID starts from zero.
22253
22248
  _this._work = new pixi_js.Point();
22254
22249
  _this._buffers = [];
22255
22250
  return _this;
@@ -28966,345 +28961,6 @@ var DDynamicTextGeometry = /** @class */ (function (_super) {
28966
28961
  return DDynamicTextGeometry;
28967
28962
  }(pixi_js.MeshGeometry));
28968
28963
 
28969
- /*
28970
- * Copyright (C) 2019 Toshiba Corporation
28971
- * SPDX-License-Identifier: Apache-2.0
28972
- */
28973
- var DDynamicTextStyle = /** @class */ (function () {
28974
- function DDynamicTextStyle(options, onChange) {
28975
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
28976
- this._id = 0;
28977
- this._idApproved = -1;
28978
- var defaultOptions = this.getDefaultOptions();
28979
- if (options) {
28980
- this._align = (_a = options.align) !== null && _a !== void 0 ? _a : defaultOptions.align;
28981
- this._fontFamily = (_b = options.fontFamily) !== null && _b !== void 0 ? _b : defaultOptions.fontFamily;
28982
- this._fontSize = (_c = options.fontSize) !== null && _c !== void 0 ? _c : defaultOptions.fontSize;
28983
- this._fontStyle = (_d = options.fontStyle) !== null && _d !== void 0 ? _d : defaultOptions.fontStyle;
28984
- this._fontVariant = (_e = options.fontVariant) !== null && _e !== void 0 ? _e : defaultOptions.fontVariant;
28985
- this._fontWeight = (_f = options.fontWeight) !== null && _f !== void 0 ? _f : defaultOptions.fontWeight;
28986
- this._fill = (_g = options.fill) !== null && _g !== void 0 ? _g : defaultOptions.fill;
28987
- this._clipping = (_h = options.clipping) !== null && _h !== void 0 ? _h : defaultOptions.clipping;
28988
- this._fitting = (_j = options.fitting) !== null && _j !== void 0 ? _j : defaultOptions.fitting;
28989
- this._wordWrap = toEnum((_k = options.wordWrap) !== null && _k !== void 0 ? _k : defaultOptions.wordWrap, DDynamicTextStyleWordWrap);
28990
- this._lineHeight = (_l = options.lineHeight) !== null && _l !== void 0 ? _l : defaultOptions.lineHeight;
28991
- }
28992
- else {
28993
- this._align = defaultOptions.align;
28994
- this._fontFamily = defaultOptions.fontFamily;
28995
- this._fontSize = defaultOptions.fontSize;
28996
- this._fontStyle = defaultOptions.fontStyle;
28997
- this._fontVariant = defaultOptions.fontVariant;
28998
- this._fontWeight = defaultOptions.fontWeight;
28999
- this._fill = defaultOptions.fill;
29000
- this._clipping = defaultOptions.clipping;
29001
- this._fitting = defaultOptions.fitting;
29002
- this._wordWrap = toEnum(defaultOptions.wordWrap, DDynamicTextStyleWordWrap);
29003
- this._lineHeight = defaultOptions.lineHeight;
29004
- }
29005
- this._fontSizeFitted = this._fontSize;
29006
- this._lineHeightFitted = this._lineHeight;
29007
- this._isFontFitted = false;
29008
- this._fontIdFontSize = this._fontSize;
29009
- this._fontIdId = -1;
29010
- this._fontId = "";
29011
- this._fontIdApproved = "";
29012
- this._fillApproved = 0x000000;
29013
- this._onChange = onChange;
29014
- }
29015
- DDynamicTextStyle.prototype.getDefaultOptions = function () {
29016
- var result = DDynamicTextStyle.DEFAULT_OPTIONS;
29017
- if (result == null) {
29018
- result = this.newDefaultOptions();
29019
- DDynamicTextStyle.DEFAULT_OPTIONS = result;
29020
- }
29021
- return result;
29022
- };
29023
- DDynamicTextStyle.prototype.newDefaultOptions = function () {
29024
- var theme = DThemes.getInstance().get("DBase");
29025
- return {
29026
- align: "left",
29027
- fontFamily: theme.getFontFamilly(),
29028
- fontSize: theme.getFontSize(),
29029
- fontStyle: "normal",
29030
- fontVariant: "normal",
29031
- fontWeight: "normal",
29032
- fill: theme.getColor(new DBaseStateSetImpl()),
29033
- clipping: true,
29034
- fitting: false,
29035
- wordWrap: DDynamicTextStyleWordWrap.NONE,
29036
- lineHeight: theme.getLineHeight()
29037
- };
29038
- };
29039
- Object.defineProperty(DDynamicTextStyle.prototype, "id", {
29040
- get: function () {
29041
- return this._id;
29042
- },
29043
- enumerable: false,
29044
- configurable: true
29045
- });
29046
- Object.defineProperty(DDynamicTextStyle.prototype, "idApproved", {
29047
- get: function () {
29048
- return this._idApproved;
29049
- },
29050
- enumerable: false,
29051
- configurable: true
29052
- });
29053
- Object.defineProperty(DDynamicTextStyle.prototype, "fontId", {
29054
- get: function () {
29055
- this.update();
29056
- return this._fontId;
29057
- },
29058
- enumerable: false,
29059
- configurable: true
29060
- });
29061
- Object.defineProperty(DDynamicTextStyle.prototype, "fontIdFontSize", {
29062
- get: function () {
29063
- this.update();
29064
- return this._fontSizeFitted;
29065
- },
29066
- enumerable: false,
29067
- configurable: true
29068
- });
29069
- Object.defineProperty(DDynamicTextStyle.prototype, "fontIdApproved", {
29070
- get: function () {
29071
- return this._fontIdApproved;
29072
- },
29073
- enumerable: false,
29074
- configurable: true
29075
- });
29076
- Object.defineProperty(DDynamicTextStyle.prototype, "fill", {
29077
- get: function () {
29078
- return this._fill;
29079
- },
29080
- set: function (fill) {
29081
- if (this._fill !== fill) {
29082
- this._fill = fill;
29083
- this.onChange();
29084
- }
29085
- },
29086
- enumerable: false,
29087
- configurable: true
29088
- });
29089
- DDynamicTextStyle.prototype.onChange = function () {
29090
- this._id += 1;
29091
- this._onChange();
29092
- };
29093
- Object.defineProperty(DDynamicTextStyle.prototype, "fillApproved", {
29094
- get: function () {
29095
- return this._fillApproved;
29096
- },
29097
- enumerable: false,
29098
- configurable: true
29099
- });
29100
- DDynamicTextStyle.prototype.approve = function () {
29101
- this.update();
29102
- this._idApproved = this._id;
29103
- this._fontIdApproved = this._fontId;
29104
- this._fillApproved = this._fill;
29105
- };
29106
- Object.defineProperty(DDynamicTextStyle.prototype, "fontFamily", {
29107
- get: function () {
29108
- return this._fontFamily;
29109
- },
29110
- set: function (fontFamily) {
29111
- if (this._fontFamily !== fontFamily) {
29112
- this._fontFamily = fontFamily;
29113
- this.onChange();
29114
- }
29115
- },
29116
- enumerable: false,
29117
- configurable: true
29118
- });
29119
- Object.defineProperty(DDynamicTextStyle.prototype, "fontSize", {
29120
- get: function () {
29121
- return this._fontSize;
29122
- },
29123
- set: function (fontSize) {
29124
- if (this._fontSize !== fontSize) {
29125
- this._fontSize = fontSize;
29126
- this._fontSizeFitted = fontSize;
29127
- this._lineHeightFitted = this._lineHeight;
29128
- this._isFontFitted = false;
29129
- this.onChange();
29130
- }
29131
- },
29132
- enumerable: false,
29133
- configurable: true
29134
- });
29135
- Object.defineProperty(DDynamicTextStyle.prototype, "fontSizeFitted", {
29136
- get: function () {
29137
- return this._fontSizeFitted;
29138
- },
29139
- enumerable: false,
29140
- configurable: true
29141
- });
29142
- Object.defineProperty(DDynamicTextStyle.prototype, "isFontFitted", {
29143
- get: function () {
29144
- return this._isFontFitted;
29145
- },
29146
- enumerable: false,
29147
- configurable: true
29148
- });
29149
- Object.defineProperty(DDynamicTextStyle.prototype, "fontStyle", {
29150
- get: function () {
29151
- return this._fontStyle;
29152
- },
29153
- set: function (fontStyle) {
29154
- if (this._fontStyle !== fontStyle) {
29155
- this._fontStyle = fontStyle;
29156
- this.onChange();
29157
- }
29158
- },
29159
- enumerable: false,
29160
- configurable: true
29161
- });
29162
- Object.defineProperty(DDynamicTextStyle.prototype, "fontVariant", {
29163
- get: function () {
29164
- return this._fontVariant;
29165
- },
29166
- set: function (fontVariant) {
29167
- if (this._fontVariant !== fontVariant) {
29168
- this._fontVariant = fontVariant;
29169
- this.onChange();
29170
- }
29171
- },
29172
- enumerable: false,
29173
- configurable: true
29174
- });
29175
- Object.defineProperty(DDynamicTextStyle.prototype, "fontWeight", {
29176
- get: function () {
29177
- return this._fontWeight;
29178
- },
29179
- set: function (fontWeight) {
29180
- if (this._fontWeight !== fontWeight) {
29181
- this._fontWeight = fontWeight;
29182
- this.onChange();
29183
- }
29184
- },
29185
- enumerable: false,
29186
- configurable: true
29187
- });
29188
- DDynamicTextStyle.prototype.update = function () {
29189
- if (this._fontIdId !== this._id) {
29190
- this._fontIdId = this._id;
29191
- var fontIdFontSize = this._fitting ? this._fontSizeFitted : this._fontSize;
29192
- this._fontIdFontSize = fontIdFontSize;
29193
- this._fontId = this.toFontId(fontIdFontSize);
29194
- }
29195
- };
29196
- DDynamicTextStyle.prototype.toFontId = function (fontSize) {
29197
- return "".concat(this._fontStyle, " ").concat(this._fontVariant, " ").concat(this._fontWeight, " ").concat(fontSize, "px ").concat(this._fontFamily);
29198
- };
29199
- Object.defineProperty(DDynamicTextStyle.prototype, "clipping", {
29200
- get: function () {
29201
- return this._clipping;
29202
- },
29203
- set: function (clipping) {
29204
- if (this._clipping !== clipping) {
29205
- this._clipping = clipping;
29206
- this.onChange();
29207
- }
29208
- },
29209
- enumerable: false,
29210
- configurable: true
29211
- });
29212
- Object.defineProperty(DDynamicTextStyle.prototype, "fitting", {
29213
- get: function () {
29214
- return this._fitting;
29215
- },
29216
- set: function (fitting) {
29217
- if (this._fitting !== fitting) {
29218
- this._fitting = fitting;
29219
- this.onChange();
29220
- }
29221
- },
29222
- enumerable: false,
29223
- configurable: true
29224
- });
29225
- Object.defineProperty(DDynamicTextStyle.prototype, "wordWrap", {
29226
- get: function () {
29227
- return this._wordWrap;
29228
- },
29229
- set: function (wordWrap) {
29230
- if (this._wordWrap !== wordWrap) {
29231
- this._wordWrap = wordWrap;
29232
- this.onChange();
29233
- }
29234
- },
29235
- enumerable: false,
29236
- configurable: true
29237
- });
29238
- Object.defineProperty(DDynamicTextStyle.prototype, "lineHeight", {
29239
- get: function () {
29240
- return this._lineHeight;
29241
- },
29242
- set: function (lineHeight) {
29243
- if (this._lineHeight !== lineHeight) {
29244
- this._lineHeight = lineHeight;
29245
- this._fontSizeFitted = this._fontSize;
29246
- this._lineHeightFitted = lineHeight;
29247
- this._isFontFitted = false;
29248
- this.onChange();
29249
- }
29250
- },
29251
- enumerable: false,
29252
- configurable: true
29253
- });
29254
- Object.defineProperty(DDynamicTextStyle.prototype, "lineHeightFitted", {
29255
- get: function () {
29256
- return this._lineHeightFitted;
29257
- },
29258
- set: function (lineHeightFitted) {
29259
- if (this._lineHeightFitted !== lineHeightFitted) {
29260
- this._lineHeightFitted = lineHeightFitted;
29261
- this.onChange();
29262
- }
29263
- },
29264
- enumerable: false,
29265
- configurable: true
29266
- });
29267
- DDynamicTextStyle.prototype.fit = function (fontSize, lineHeight) {
29268
- var isChanged = false;
29269
- if (fontSize < this._fontSizeFitted) {
29270
- this._fontSizeFitted = fontSize;
29271
- isChanged = true;
29272
- }
29273
- if (this._lineHeightFitted !== lineHeight) {
29274
- this._lineHeightFitted = lineHeight;
29275
- isChanged = true;
29276
- }
29277
- if (this._isFontFitted !== true) {
29278
- this._isFontFitted = true;
29279
- isChanged = true;
29280
- }
29281
- if (isChanged) {
29282
- this.onChange();
29283
- }
29284
- return isChanged;
29285
- };
29286
- DDynamicTextStyle.prototype.unfit = function () {
29287
- var isChanged = false;
29288
- if (this._isFontFitted !== false) {
29289
- this._isFontFitted = false;
29290
- isChanged = true;
29291
- }
29292
- if (this._fontSizeFitted !== this._fontSize) {
29293
- this._fontSizeFitted = this._fontSize;
29294
- isChanged = true;
29295
- }
29296
- if (this._lineHeightFitted !== this._lineHeight) {
29297
- this._lineHeightFitted = this._lineHeight;
29298
- isChanged = true;
29299
- }
29300
- if (isChanged) {
29301
- this.onChange();
29302
- }
29303
- return isChanged;
29304
- };
29305
- return DDynamicTextStyle;
29306
- }());
29307
-
29308
28964
  /*
29309
28965
  * Copyright (C) 2019 Toshiba Corporation
29310
28966
  * SPDX-License-Identifier: Apache-2.0
@@ -29382,13 +29038,11 @@ var UtilFont = /** @class */ (function () {
29382
29038
  */
29383
29039
  var DDynamicText = /** @class */ (function (_super) {
29384
29040
  __extends(DDynamicText, _super);
29385
- function DDynamicText(options) {
29041
+ function DDynamicText(style) {
29386
29042
  var _this = _super.call(this, new DDynamicTextGeometry(), new pixi_js.MeshMaterial(pixi_js.Texture.EMPTY)) || this;
29387
- _this._style = new DDynamicTextStyle(options, function () {
29388
- _this._isDirty = true;
29389
- _this._isGeometryDirty = true;
29390
- _this._atlas = null;
29391
- _this.update_();
29043
+ _this._style = style;
29044
+ style.on("change", function () {
29045
+ _this.onStyleChange();
29392
29046
  });
29393
29047
  _this._text = "";
29394
29048
  _this._textApproved = "";
@@ -29412,15 +29066,21 @@ var DDynamicText = /** @class */ (function (_super) {
29412
29066
  };
29413
29067
  return _this;
29414
29068
  }
29069
+ DDynamicText.prototype.onStyleChange = function () {
29070
+ this._isDirty = true;
29071
+ this._isGeometryDirty = true;
29072
+ this._atlas = null;
29073
+ this.update_();
29074
+ };
29415
29075
  DDynamicText.prototype.update_ = function () {
29416
29076
  var layer = DApplications.getLayer(this);
29417
29077
  if (layer) {
29418
- var style = this._style;
29419
29078
  if (this._isDirty) {
29420
29079
  this._isDirty = false;
29421
29080
  var text = this._text;
29422
29081
  var textApproved = this._textApproved;
29423
29082
  this._textApproved = text;
29083
+ var style = this._style;
29424
29084
  var fontId = style.fontId;
29425
29085
  var fontIdApproved = style.fontIdApproved;
29426
29086
  var fontIdFontSize = style.fontIdFontSize;
@@ -29613,203 +29273,737 @@ var DDynamicText = /** @class */ (function (_super) {
29613
29273
  * Copyright (C) 2019 Toshiba Corporation
29614
29274
  * SPDX-License-Identifier: Apache-2.0
29615
29275
  */
29616
- var toTextStyle = function (theme, options, state) {
29617
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
29618
- var style = (_a = options === null || options === void 0 ? void 0 : options.text) === null || _a === void 0 ? void 0 : _a.style;
29619
- if (style != null) {
29620
- var fill = (_b = style.fill) !== null && _b !== void 0 ? _b : theme.getColor(state);
29621
- var fontSize = (_c = style.fontSize) !== null && _c !== void 0 ? _c : theme.getFontSize();
29622
- var fontFamily = (_d = style.fontFamily) !== null && _d !== void 0 ? _d : theme.getFontFamilly();
29623
- var fontWeight = (_e = style.fontWeight) !== null && _e !== void 0 ? _e : theme.getFontWeight();
29624
- var fontStyle = (_f = style.fontStyle) !== null && _f !== void 0 ? _f : theme.getFontStyle();
29625
- var fontVariant = (_g = style.fontVariant) !== null && _g !== void 0 ? _g : theme.getFontVariant();
29626
- var clipping = (_h = style.clipping) !== null && _h !== void 0 ? _h : theme.getTextStyleClipping();
29627
- var fitting = (_j = style.fitting) !== null && _j !== void 0 ? _j : theme.getTextStyleFitting();
29628
- var wordWrap = (_k = style.wordWrap) !== null && _k !== void 0 ? _k : theme.getTextStyleWordWrap();
29629
- var lineHeight = (_l = style.lineHeight) !== null && _l !== void 0 ? _l : theme.getLineHeight();
29630
- return {
29631
- fill: fill,
29632
- fontSize: fontSize,
29633
- fontFamily: fontFamily,
29634
- fontWeight: fontWeight,
29635
- fontStyle: fontStyle,
29636
- fontVariant: fontVariant,
29637
- clipping: clipping,
29638
- fitting: fitting,
29639
- wordWrap: wordWrap,
29640
- lineHeight: lineHeight
29641
- };
29276
+ var DDynamicTextStyle = /** @class */ (function (_super) {
29277
+ __extends(DDynamicTextStyle, _super);
29278
+ function DDynamicTextStyle(parent, theme, options) {
29279
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
29280
+ var _this = _super.call(this) || this;
29281
+ _this._id = 0;
29282
+ _this._idApproved = -1;
29283
+ if (options) {
29284
+ _this._fontFamily = (_a = options.fontFamily) !== null && _a !== void 0 ? _a : theme.getFontFamilly();
29285
+ _this._fontSize = (_b = options.fontSize) !== null && _b !== void 0 ? _b : theme.getFontSize();
29286
+ _this._fontStyle = (_c = options.fontStyle) !== null && _c !== void 0 ? _c : theme.getFontStyle();
29287
+ _this._fontVariant = (_d = options.fontVariant) !== null && _d !== void 0 ? _d : theme.getFontVariant();
29288
+ _this._fontWeight = (_e = options.fontWeight) !== null && _e !== void 0 ? _e : theme.getFontWeight();
29289
+ _this._clipping = (_f = options.clipping) !== null && _f !== void 0 ? _f : theme.getTextStyleClipping();
29290
+ _this._fitting = (_g = options.fitting) !== null && _g !== void 0 ? _g : theme.getTextStyleFitting();
29291
+ _this._wordWrap = toEnum((_h = options.wordWrap) !== null && _h !== void 0 ? _h : theme.getTextStyleWordWrap(), DDynamicTextStyleWordWrap);
29292
+ _this._lineHeight = (_j = options.lineHeight) !== null && _j !== void 0 ? _j : theme.getLineHeight();
29293
+ }
29294
+ else {
29295
+ _this._fontFamily = theme.getFontFamilly();
29296
+ _this._fontSize = theme.getFontSize();
29297
+ _this._fontStyle = theme.getFontStyle();
29298
+ _this._fontVariant = theme.getFontVariant();
29299
+ _this._fontWeight = theme.getFontWeight();
29300
+ _this._clipping = theme.getTextStyleClipping();
29301
+ _this._fitting = theme.getTextStyleFitting();
29302
+ _this._wordWrap = theme.getTextStyleWordWrap();
29303
+ _this._lineHeight = theme.getLineHeight();
29304
+ }
29305
+ _this._fill = theme.getColor(parent.state);
29306
+ _this._fontSizeFitted = _this._fontSize;
29307
+ _this._lineHeightFitted = _this._lineHeight;
29308
+ _this._isFontFitted = false;
29309
+ _this._fontIdFontSize = _this._fontSize;
29310
+ _this._fontIdId = -1;
29311
+ _this._fontId = "";
29312
+ _this._fontIdApproved = "";
29313
+ _this._fillApproved = 0x000000;
29314
+ return _this;
29642
29315
  }
29643
- return {
29644
- fill: theme.getColor(state),
29645
- fontSize: theme.getFontSize(),
29646
- fontFamily: theme.getFontFamilly(),
29647
- fontWeight: theme.getFontWeight(),
29648
- fontStyle: theme.getFontStyle(),
29649
- fontVariant: theme.getFontVariant(),
29650
- clipping: theme.getTextStyleClipping(),
29651
- fitting: theme.getTextStyleFitting(),
29652
- wordWrap: theme.getTextStyleWordWrap(),
29653
- lineHeight: theme.getLineHeight()
29654
- };
29655
- };
29656
- var toTextAlign = function (theme, options) {
29657
- var _a, _b, _c;
29658
- var align = (_a = options === null || options === void 0 ? void 0 : options.text) === null || _a === void 0 ? void 0 : _a.align;
29659
- return {
29660
- vertical: toEnum((_b = align === null || align === void 0 ? void 0 : align.vertical) !== null && _b !== void 0 ? _b : theme.getTextAlignVertical(), DAlignVertical),
29661
- horizontal: toEnum((_c = align === null || align === void 0 ? void 0 : align.horizontal) !== null && _c !== void 0 ? _c : theme.getTextAlignHorizontal(), DAlignHorizontal)
29316
+ Object.defineProperty(DDynamicTextStyle.prototype, "id", {
29317
+ get: function () {
29318
+ return this._id;
29319
+ },
29320
+ enumerable: false,
29321
+ configurable: true
29322
+ });
29323
+ Object.defineProperty(DDynamicTextStyle.prototype, "idApproved", {
29324
+ get: function () {
29325
+ return this._idApproved;
29326
+ },
29327
+ enumerable: false,
29328
+ configurable: true
29329
+ });
29330
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontId", {
29331
+ get: function () {
29332
+ this.update();
29333
+ return this._fontId;
29334
+ },
29335
+ enumerable: false,
29336
+ configurable: true
29337
+ });
29338
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontIdFontSize", {
29339
+ get: function () {
29340
+ this.update();
29341
+ return this._fontSizeFitted;
29342
+ },
29343
+ enumerable: false,
29344
+ configurable: true
29345
+ });
29346
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontIdApproved", {
29347
+ get: function () {
29348
+ return this._fontIdApproved;
29349
+ },
29350
+ enumerable: false,
29351
+ configurable: true
29352
+ });
29353
+ Object.defineProperty(DDynamicTextStyle.prototype, "fill", {
29354
+ get: function () {
29355
+ return this._fill;
29356
+ },
29357
+ set: function (fill) {
29358
+ if (this._fill !== fill) {
29359
+ this._fill = fill;
29360
+ this.onChange();
29361
+ }
29362
+ },
29363
+ enumerable: false,
29364
+ configurable: true
29365
+ });
29366
+ DDynamicTextStyle.prototype.onChange = function () {
29367
+ this._id += 1;
29368
+ this.emit("change", this);
29662
29369
  };
29663
- };
29664
- /**
29665
- * A base class for UI classes with a text support.
29666
- * See {@link DTextBaseEvents} for event defaults.
29667
- */
29668
- var DTextBase = /** @class */ (function (_super) {
29669
- __extends(DTextBase, _super);
29670
- function DTextBase() {
29671
- return _super !== null && _super.apply(this, arguments) || this;
29672
- }
29673
- DTextBase.prototype.init = function (options) {
29674
- var _a, _b, _c, _d;
29675
- _super.prototype.init.call(this, options);
29676
- var theme = this.theme;
29677
- this._textValue = (_b = (_a = options === null || options === void 0 ? void 0 : options.text) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : theme.newTextValue();
29678
- this._textValueComputed = this.computeTextValue();
29679
- var text = options === null || options === void 0 ? void 0 : options.text;
29680
- this._textColor = text === null || text === void 0 ? void 0 : text.color;
29681
- this._textAlpha = text === null || text === void 0 ? void 0 : text.alpha;
29682
- this._textStyle = toTextStyle(theme, options, this.state);
29683
- this._textAlign = toTextAlign(theme, options);
29684
- this._textFormatter = (_c = text === null || text === void 0 ? void 0 : text.formatter) !== null && _c !== void 0 ? _c : theme.getTextFormatter();
29685
- this._isTextVisible = true;
29686
- this._isOverflowMaskEnabled = (_d = options === null || options === void 0 ? void 0 : options.mask) !== null && _d !== void 0 ? _d : theme.isOverflowMaskEnabled();
29687
- this.onTextChange();
29688
- this.createOrUpdateText();
29370
+ Object.defineProperty(DDynamicTextStyle.prototype, "fillApproved", {
29371
+ get: function () {
29372
+ return this._fillApproved;
29373
+ },
29374
+ enumerable: false,
29375
+ configurable: true
29376
+ });
29377
+ DDynamicTextStyle.prototype.approve = function () {
29378
+ this.update();
29379
+ this._idApproved = this._id;
29380
+ this._fontIdApproved = this._fontId;
29381
+ this._fillApproved = this._fill;
29689
29382
  };
29690
- Object.defineProperty(DTextBase.prototype, "text", {
29383
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontFamily", {
29691
29384
  get: function () {
29692
- return this._textValue;
29385
+ return this._fontFamily;
29693
29386
  },
29694
- set: function (text) {
29695
- if (this._textValue !== text) {
29696
- this._textValue = text;
29697
- this.updateTextValue();
29387
+ set: function (fontFamily) {
29388
+ if (this._fontFamily !== fontFamily) {
29389
+ this._fontFamily = fontFamily;
29390
+ this.onChange();
29698
29391
  }
29699
29392
  },
29700
29393
  enumerable: false,
29701
29394
  configurable: true
29702
29395
  });
29703
- DTextBase.prototype.onTextChange = function () {
29704
- // DO NOTHING
29396
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontSize", {
29397
+ get: function () {
29398
+ return this._fontSize;
29399
+ },
29400
+ set: function (fontSize) {
29401
+ if (this._fontSize !== fontSize) {
29402
+ this._fontSize = fontSize;
29403
+ this._fontSizeFitted = fontSize;
29404
+ this._lineHeightFitted = this._lineHeight;
29405
+ this._isFontFitted = false;
29406
+ this.onChange();
29407
+ }
29408
+ },
29409
+ enumerable: false,
29410
+ configurable: true
29411
+ });
29412
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontSizeFitted", {
29413
+ get: function () {
29414
+ return this._fontSizeFitted;
29415
+ },
29416
+ enumerable: false,
29417
+ configurable: true
29418
+ });
29419
+ Object.defineProperty(DDynamicTextStyle.prototype, "isFontFitted", {
29420
+ get: function () {
29421
+ return this._isFontFitted;
29422
+ },
29423
+ enumerable: false,
29424
+ configurable: true
29425
+ });
29426
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontStyle", {
29427
+ get: function () {
29428
+ return this._fontStyle;
29429
+ },
29430
+ set: function (fontStyle) {
29431
+ if (this._fontStyle !== fontStyle) {
29432
+ this._fontStyle = fontStyle;
29433
+ this.onChange();
29434
+ }
29435
+ },
29436
+ enumerable: false,
29437
+ configurable: true
29438
+ });
29439
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontVariant", {
29440
+ get: function () {
29441
+ return this._fontVariant;
29442
+ },
29443
+ set: function (fontVariant) {
29444
+ if (this._fontVariant !== fontVariant) {
29445
+ this._fontVariant = fontVariant;
29446
+ this.onChange();
29447
+ }
29448
+ },
29449
+ enumerable: false,
29450
+ configurable: true
29451
+ });
29452
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontWeight", {
29453
+ get: function () {
29454
+ return this._fontWeight;
29455
+ },
29456
+ set: function (fontWeight) {
29457
+ if (this._fontWeight !== fontWeight) {
29458
+ this._fontWeight = fontWeight;
29459
+ this.onChange();
29460
+ }
29461
+ },
29462
+ enumerable: false,
29463
+ configurable: true
29464
+ });
29465
+ DDynamicTextStyle.prototype.update = function () {
29466
+ if (this._fontIdId !== this._id) {
29467
+ this._fontIdId = this._id;
29468
+ var fontIdFontSize = this._fitting ? this._fontSizeFitted : this._fontSize;
29469
+ this._fontIdFontSize = fontIdFontSize;
29470
+ this._fontId = this.toFontId(fontIdFontSize);
29471
+ }
29705
29472
  };
29706
- DTextBase.prototype.computeTextValue = function () {
29707
- var textValue = this._textValue;
29708
- if (textValue !== undefined) {
29709
- if (isFunction(textValue)) {
29710
- var result = textValue(this.state);
29711
- if (result !== undefined) {
29712
- return result;
29713
- }
29473
+ DDynamicTextStyle.prototype.toFontId = function (fontSize) {
29474
+ return "".concat(this._fontStyle, " ").concat(this._fontVariant, " ").concat(this._fontWeight, " ").concat(fontSize, "px ").concat(this._fontFamily);
29475
+ };
29476
+ Object.defineProperty(DDynamicTextStyle.prototype, "clipping", {
29477
+ get: function () {
29478
+ return this._clipping;
29479
+ },
29480
+ set: function (clipping) {
29481
+ if (this._clipping !== clipping) {
29482
+ this._clipping = clipping;
29483
+ this.onChange();
29714
29484
  }
29715
- else {
29716
- return textValue;
29485
+ },
29486
+ enumerable: false,
29487
+ configurable: true
29488
+ });
29489
+ Object.defineProperty(DDynamicTextStyle.prototype, "fitting", {
29490
+ get: function () {
29491
+ return this._fitting;
29492
+ },
29493
+ set: function (fitting) {
29494
+ if (this._fitting !== fitting) {
29495
+ this._fitting = fitting;
29496
+ this.onChange();
29497
+ }
29498
+ },
29499
+ enumerable: false,
29500
+ configurable: true
29501
+ });
29502
+ Object.defineProperty(DDynamicTextStyle.prototype, "wordWrap", {
29503
+ get: function () {
29504
+ return this._wordWrap;
29505
+ },
29506
+ set: function (wordWrap) {
29507
+ if (this._wordWrap !== wordWrap) {
29508
+ this._wordWrap = wordWrap;
29509
+ this.onChange();
29510
+ }
29511
+ },
29512
+ enumerable: false,
29513
+ configurable: true
29514
+ });
29515
+ Object.defineProperty(DDynamicTextStyle.prototype, "lineHeight", {
29516
+ get: function () {
29517
+ return this._lineHeight;
29518
+ },
29519
+ set: function (lineHeight) {
29520
+ if (this._lineHeight !== lineHeight) {
29521
+ this._lineHeight = lineHeight;
29522
+ this._fontSizeFitted = this._fontSize;
29523
+ this._lineHeightFitted = lineHeight;
29524
+ this._isFontFitted = false;
29525
+ this.onChange();
29526
+ }
29527
+ },
29528
+ enumerable: false,
29529
+ configurable: true
29530
+ });
29531
+ Object.defineProperty(DDynamicTextStyle.prototype, "lineHeightFitted", {
29532
+ get: function () {
29533
+ return this._lineHeightFitted;
29534
+ },
29535
+ set: function (lineHeightFitted) {
29536
+ if (this._lineHeightFitted !== lineHeightFitted) {
29537
+ this._lineHeightFitted = lineHeightFitted;
29538
+ this.onChange();
29717
29539
  }
29540
+ },
29541
+ enumerable: false,
29542
+ configurable: true
29543
+ });
29544
+ DDynamicTextStyle.prototype.fit = function (fontSize, lineHeight) {
29545
+ var isChanged = false;
29546
+ if (fontSize < this._fontSizeFitted) {
29547
+ this._fontSizeFitted = fontSize;
29548
+ isChanged = true;
29549
+ }
29550
+ if (this._lineHeightFitted !== lineHeight) {
29551
+ this._lineHeightFitted = lineHeight;
29552
+ isChanged = true;
29553
+ }
29554
+ if (this._isFontFitted !== true) {
29555
+ this._isFontFitted = true;
29556
+ isChanged = true;
29557
+ }
29558
+ if (isChanged) {
29559
+ this.onChange();
29718
29560
  }
29719
- return this.theme.getTextValue(this.state);
29561
+ return isChanged;
29720
29562
  };
29721
- DTextBase.prototype.createOrUpdateText = function () {
29722
- var textValueComputed = this._textValueComputed;
29723
- if (textValueComputed !== undefined) {
29724
- var formatted = this._textFormatter(textValueComputed, this);
29725
- var text = this._text;
29726
- if (text == null) {
29727
- if (0 < formatted.length) {
29728
- var newText = this.newText();
29729
- newText.visible = this._isTextVisible;
29730
- this._text = newText;
29731
- this.addChild(newText);
29732
- this.updateTextPosition(newText);
29733
- var overflowMask = this.getOverflowMask();
29734
- if (overflowMask) {
29735
- newText.mask = overflowMask;
29736
- }
29737
- newText.text = formatted;
29738
- this.toDirty();
29739
- DApplications.update(this);
29740
- }
29563
+ DDynamicTextStyle.prototype.unfit = function () {
29564
+ var isChanged = false;
29565
+ if (this._isFontFitted !== false) {
29566
+ this._isFontFitted = false;
29567
+ isChanged = true;
29568
+ }
29569
+ if (this._fontSizeFitted !== this._fontSize) {
29570
+ this._fontSizeFitted = this._fontSize;
29571
+ isChanged = true;
29572
+ }
29573
+ if (this._lineHeightFitted !== this._lineHeight) {
29574
+ this._lineHeightFitted = this._lineHeight;
29575
+ isChanged = true;
29576
+ }
29577
+ if (isChanged) {
29578
+ this.onChange();
29579
+ }
29580
+ return isChanged;
29581
+ };
29582
+ return DDynamicTextStyle;
29583
+ }(pixi_js.utils.EventEmitter));
29584
+
29585
+ var DTextPieceAlignImpl = /** @class */ (function () {
29586
+ function DTextPieceAlignImpl(parent, theme, options) {
29587
+ var _a, _b;
29588
+ this._parent = parent;
29589
+ this._vertical = toEnum((_a = options === null || options === void 0 ? void 0 : options.vertical) !== null && _a !== void 0 ? _a : theme.getTextAlignVertical(), DAlignVertical);
29590
+ this._horizontal = toEnum((_b = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _b !== void 0 ? _b : theme.getTextAlignHorizontal(), DAlignHorizontal);
29591
+ }
29592
+ Object.defineProperty(DTextPieceAlignImpl.prototype, "vertical", {
29593
+ get: function () {
29594
+ return this._vertical;
29595
+ },
29596
+ set: function (vertical) {
29597
+ vertical = toEnum(vertical, DAlignVertical);
29598
+ if (this._vertical !== vertical) {
29599
+ this._vertical = vertical;
29600
+ this.onChange();
29741
29601
  }
29742
- else if (text.text !== formatted) {
29743
- text.text = formatted;
29744
- this.toDirty();
29745
- DApplications.update(this);
29602
+ },
29603
+ enumerable: false,
29604
+ configurable: true
29605
+ });
29606
+ Object.defineProperty(DTextPieceAlignImpl.prototype, "horizontal", {
29607
+ get: function () {
29608
+ return this._horizontal;
29609
+ },
29610
+ set: function (horizontal) {
29611
+ horizontal = toEnum(horizontal, DAlignHorizontal);
29612
+ if (this._horizontal !== horizontal) {
29613
+ this._horizontal = horizontal;
29614
+ this.onChange();
29615
+ }
29616
+ },
29617
+ enumerable: false,
29618
+ configurable: true
29619
+ });
29620
+ DTextPieceAlignImpl.prototype.set = function (vertical, horizontal) {
29621
+ var isChanged = false;
29622
+ if (vertical != null) {
29623
+ vertical = toEnum(vertical, DAlignVertical);
29624
+ if (this._vertical !== vertical) {
29625
+ this._vertical = vertical;
29626
+ isChanged = true;
29746
29627
  }
29747
29628
  }
29748
- else {
29749
- var text = this._text;
29750
- if (text != null && text.text !== "") {
29751
- text.text = "";
29752
- this.toDirty();
29753
- DApplications.update(this);
29629
+ if (horizontal != null) {
29630
+ horizontal = toEnum(horizontal, DAlignHorizontal);
29631
+ if (this._horizontal !== horizontal) {
29632
+ this._horizontal = horizontal;
29633
+ isChanged = true;
29754
29634
  }
29755
29635
  }
29636
+ if (isChanged) {
29637
+ this.onChange();
29638
+ }
29639
+ return this;
29756
29640
  };
29757
- DTextBase.prototype.newText = function () {
29758
- return new DDynamicText(this._textStyle);
29641
+ DTextPieceAlignImpl.prototype.onChange = function () {
29642
+ var parent = this._parent;
29643
+ parent.toDirty();
29644
+ DApplications.update(parent);
29759
29645
  };
29760
- DTextBase.prototype.getOverflowMask = function () {
29761
- if (this._isOverflowMaskEnabled) {
29762
- if (this._overflowMask == null) {
29763
- this._overflowMask = new DBaseOverflowMaskSimple(this);
29764
- this._reflowable.add(this._overflowMask);
29765
- this.toDirty();
29646
+ return DTextPieceAlignImpl;
29647
+ }());
29648
+
29649
+ /*
29650
+ * Copyright (C) 2019 Toshiba Corporation
29651
+ * SPDX-License-Identifier: Apache-2.0
29652
+ */
29653
+ var DTextPieceStyleImpl = /** @class */ (function () {
29654
+ function DTextPieceStyleImpl(parent, style) {
29655
+ this._parent = parent;
29656
+ this._style = style;
29657
+ }
29658
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "fontFamily", {
29659
+ get: function () {
29660
+ return this._style.fontFamily;
29661
+ },
29662
+ set: function (fontFamily) {
29663
+ var style = this._style;
29664
+ if (style.fontFamily !== fontFamily) {
29665
+ style.fontFamily = fontFamily;
29666
+ this.onChange();
29667
+ }
29668
+ },
29669
+ enumerable: false,
29670
+ configurable: true
29671
+ });
29672
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "fontSize", {
29673
+ get: function () {
29674
+ return this._style.fontSize;
29675
+ },
29676
+ set: function (fontSize) {
29677
+ var style = this._style;
29678
+ if (style.fontSize !== fontSize) {
29679
+ style.fontSize = fontSize;
29680
+ this.onChange();
29681
+ }
29682
+ },
29683
+ enumerable: false,
29684
+ configurable: true
29685
+ });
29686
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "fontStyle", {
29687
+ get: function () {
29688
+ return this._style.fontStyle;
29689
+ },
29690
+ set: function (fontStyle) {
29691
+ var style = this._style;
29692
+ if (style.fontStyle !== fontStyle) {
29693
+ style.fontStyle = fontStyle;
29694
+ this.onChange();
29695
+ }
29696
+ },
29697
+ enumerable: false,
29698
+ configurable: true
29699
+ });
29700
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "fontVariant", {
29701
+ get: function () {
29702
+ return this._style.fontVariant;
29703
+ },
29704
+ set: function (fontVariant) {
29705
+ var style = this._style;
29706
+ if (style.fontVariant !== fontVariant) {
29707
+ style.fontVariant = fontVariant;
29708
+ this.onChange();
29709
+ }
29710
+ },
29711
+ enumerable: false,
29712
+ configurable: true
29713
+ });
29714
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "fontWeight", {
29715
+ get: function () {
29716
+ return this._style.fontWeight;
29717
+ },
29718
+ set: function (fontWeight) {
29719
+ var style = this._style;
29720
+ if (style.fontWeight !== fontWeight) {
29721
+ style.fontWeight = fontWeight;
29722
+ this.onChange();
29723
+ }
29724
+ },
29725
+ enumerable: false,
29726
+ configurable: true
29727
+ });
29728
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "clipping", {
29729
+ get: function () {
29730
+ return this._style.clipping;
29731
+ },
29732
+ set: function (clipping) {
29733
+ var style = this._style;
29734
+ if (style.clipping !== clipping) {
29735
+ style.clipping = clipping;
29736
+ this.onChange();
29737
+ }
29738
+ },
29739
+ enumerable: false,
29740
+ configurable: true
29741
+ });
29742
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "fitting", {
29743
+ get: function () {
29744
+ return this._style.fitting;
29745
+ },
29746
+ set: function (fitting) {
29747
+ var style = this._style;
29748
+ if (style.fitting !== fitting) {
29749
+ style.fitting = fitting;
29750
+ this.onChange();
29751
+ }
29752
+ },
29753
+ enumerable: false,
29754
+ configurable: true
29755
+ });
29756
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "wordWrap", {
29757
+ get: function () {
29758
+ return this._style.wordWrap;
29759
+ },
29760
+ set: function (wordWrap) {
29761
+ wordWrap = toEnum(wordWrap, DDynamicTextStyleWordWrap);
29762
+ var style = this._style;
29763
+ if (style.wordWrap !== wordWrap) {
29764
+ style.wordWrap = wordWrap;
29765
+ this.onChange();
29766
+ }
29767
+ },
29768
+ enumerable: false,
29769
+ configurable: true
29770
+ });
29771
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "lineHeight", {
29772
+ get: function () {
29773
+ return this._style.lineHeight;
29774
+ },
29775
+ set: function (lineHeight) {
29776
+ var style = this._style;
29777
+ if (style.lineHeight !== lineHeight) {
29778
+ style.lineHeight = lineHeight;
29779
+ this.onChange();
29766
29780
  }
29767
- return this._overflowMask;
29781
+ },
29782
+ enumerable: false,
29783
+ configurable: true
29784
+ });
29785
+ DTextPieceStyleImpl.prototype.onChange = function () {
29786
+ DApplications.update(this._parent);
29787
+ };
29788
+ return DTextPieceStyleImpl;
29789
+ }());
29790
+
29791
+ var DTextPieceImpl = /** @class */ (function (_super) {
29792
+ __extends(DTextPieceImpl, _super);
29793
+ function DTextPieceImpl(parent, theme, options) {
29794
+ var _a, _b;
29795
+ var _this = _super.call(this) || this;
29796
+ _this._parent = parent;
29797
+ _this._theme = theme;
29798
+ _this._value = (_a = options === null || options === void 0 ? void 0 : options.value) !== null && _a !== void 0 ? _a : theme.newTextValue();
29799
+ _this._computed = _this.newComputed();
29800
+ _this._color = options === null || options === void 0 ? void 0 : options.color;
29801
+ _this._alpha = options === null || options === void 0 ? void 0 : options.alpha;
29802
+ var dstyle = new DDynamicTextStyle(parent, theme, options === null || options === void 0 ? void 0 : options.style);
29803
+ _this._dstyle = dstyle;
29804
+ _this._style = new DTextPieceStyleImpl(parent, dstyle);
29805
+ _this._align = new DTextPieceAlignImpl(parent, theme, options === null || options === void 0 ? void 0 : options.align);
29806
+ _this._formatter = (_b = options === null || options === void 0 ? void 0 : options.formatter) !== null && _b !== void 0 ? _b : theme.getTextFormatter();
29807
+ _this._isVisible = true;
29808
+ _this.onComputedChange();
29809
+ if (_this.updateObject()) {
29810
+ parent.toDirty();
29811
+ DApplications.update(parent);
29768
29812
  }
29769
- return null;
29813
+ return _this;
29814
+ }
29815
+ Object.defineProperty(DTextPieceImpl.prototype, "value", {
29816
+ get: function () {
29817
+ return this._value;
29818
+ },
29819
+ set: function (value) {
29820
+ if (this._value !== value) {
29821
+ this._value = value;
29822
+ this.onValueChange();
29823
+ }
29824
+ },
29825
+ enumerable: false,
29826
+ configurable: true
29827
+ });
29828
+ DTextPieceImpl.prototype.getValue = function () {
29829
+ return this._value;
29770
29830
  };
29771
- DTextBase.prototype.updateTextPosition = function (text) {
29772
- var align = this._textAlign;
29773
- var padding = this._padding;
29774
- var auto = this._auto;
29775
- var textX = 0;
29776
- var pleft = padding.getLeft();
29777
- var alignHorizontal = align.horizontal;
29778
- if (auto.width.isOn || alignHorizontal === DAlignHorizontal.LEFT) {
29779
- textX = pleft;
29831
+ DTextPieceImpl.prototype.setValue = function (value, forcibly) {
29832
+ if (forcibly || this._value !== value) {
29833
+ this._value = value;
29834
+ this.onValueChange(forcibly);
29780
29835
  }
29781
- else {
29782
- var width = this.width;
29783
- var textWidth = text.width;
29784
- var pright = padding.getRight();
29785
- if (alignHorizontal === DAlignHorizontal.CENTER) {
29786
- textX = pleft + (width - pleft - pright - textWidth) * 0.5;
29836
+ };
29837
+ DTextPieceImpl.prototype.onValueChange = function (forcibly) {
29838
+ var newComputed = this.newComputed();
29839
+ if (forcibly || this._computed !== newComputed) {
29840
+ this._computed = newComputed;
29841
+ this.onComputedChange();
29842
+ if (this.updateObject()) {
29843
+ var parent_1 = this._parent;
29844
+ parent_1.toDirty();
29845
+ DApplications.update(parent_1);
29787
29846
  }
29788
- else {
29789
- textX = width - textWidth - pright;
29847
+ }
29848
+ };
29849
+ DTextPieceImpl.prototype.compute = function (forcibly) {
29850
+ this.onValueChange(forcibly);
29851
+ };
29852
+ Object.defineProperty(DTextPieceImpl.prototype, "computed", {
29853
+ get: function () {
29854
+ return this._computed;
29855
+ },
29856
+ enumerable: false,
29857
+ configurable: true
29858
+ });
29859
+ Object.defineProperty(DTextPieceImpl.prototype, "formatter", {
29860
+ get: function () {
29861
+ return this._formatter;
29862
+ },
29863
+ set: function (formatter) {
29864
+ if (this._formatter !== formatter) {
29865
+ this._formatter = formatter;
29866
+ this.onValueChange(true);
29867
+ }
29868
+ },
29869
+ enumerable: false,
29870
+ configurable: true
29871
+ });
29872
+ Object.defineProperty(DTextPieceImpl.prototype, "color", {
29873
+ get: function () {
29874
+ return this._color;
29875
+ },
29876
+ set: function (color) {
29877
+ if (this._color !== color) {
29878
+ this._color = color;
29879
+ this.onColorChange();
29880
+ }
29881
+ },
29882
+ enumerable: false,
29883
+ configurable: true
29884
+ });
29885
+ Object.defineProperty(DTextPieceImpl.prototype, "alpha", {
29886
+ get: function () {
29887
+ return this._alpha;
29888
+ },
29889
+ set: function (alpha) {
29890
+ if (this._alpha !== alpha) {
29891
+ this._alpha = alpha;
29892
+ this.onColorChange();
29893
+ }
29894
+ },
29895
+ enumerable: false,
29896
+ configurable: true
29897
+ });
29898
+ DTextPieceImpl.prototype.onColorChange = function () {
29899
+ var object = this._object;
29900
+ if (object != null) {
29901
+ var parent_2 = this._parent;
29902
+ var state = parent_2.state;
29903
+ var color = this.newColor(state);
29904
+ var alpha = this.newAlpha(state);
29905
+ var style = object.style;
29906
+ if (style.fill !== color || object.alpha !== alpha) {
29907
+ style.fill = color;
29908
+ object.alpha = alpha;
29909
+ DApplications.update(parent_2);
29790
29910
  }
29791
29911
  }
29792
- var textY = 0;
29793
- var ptop = padding.getTop();
29794
- var alignVertical = align.vertical;
29795
- if (auto.height.isOn || alignVertical === DAlignVertical.TOP) {
29796
- textY = ptop;
29912
+ };
29913
+ Object.defineProperty(DTextPieceImpl.prototype, "align", {
29914
+ get: function () {
29915
+ return this._align;
29916
+ },
29917
+ enumerable: false,
29918
+ configurable: true
29919
+ });
29920
+ Object.defineProperty(DTextPieceImpl.prototype, "style", {
29921
+ get: function () {
29922
+ return this._style;
29923
+ },
29924
+ enumerable: false,
29925
+ configurable: true
29926
+ });
29927
+ Object.defineProperty(DTextPieceImpl.prototype, "object", {
29928
+ get: function () {
29929
+ return this._object;
29930
+ },
29931
+ enumerable: false,
29932
+ configurable: true
29933
+ });
29934
+ DTextPieceImpl.prototype.update = function (layouter) {
29935
+ // Compute a value
29936
+ var newComputed = this.newComputed();
29937
+ if (this._computed !== newComputed) {
29938
+ this._computed = newComputed;
29939
+ this.onComputedChange();
29940
+ this.updateObject();
29941
+ }
29942
+ var object = this._object;
29943
+ if (object != null) {
29944
+ // Update the color
29945
+ var state = this._parent.state;
29946
+ object.style.fill = this.newColor(state);
29947
+ object.alpha = this.newAlpha(state);
29948
+ // Layout
29949
+ layouter.set(object);
29797
29950
  }
29798
29951
  else {
29799
- var height = this.height;
29800
- var textHeight = text.height;
29801
- var pbottom = padding.getBottom();
29802
- if (alignVertical === DAlignVertical.MIDDLE) {
29803
- textY = ptop + (height - ptop - pbottom - textHeight) * 0.5;
29952
+ // Layout
29953
+ layouter.set(null);
29954
+ }
29955
+ };
29956
+ DTextPieceImpl.prototype.updateObject = function () {
29957
+ var computed = this._computed;
29958
+ if (computed !== undefined) {
29959
+ var formatted = this._formatter(computed, this);
29960
+ var object = this._object;
29961
+ if (object == null) {
29962
+ if (0 < formatted.length) {
29963
+ var newObject = this.newObject();
29964
+ newObject.visible = this._isVisible;
29965
+ this._object = newObject;
29966
+ var parent_3 = this._parent;
29967
+ parent_3.addChild(newObject);
29968
+ var overflowMask = parent_3.getOverflowMask();
29969
+ if (overflowMask) {
29970
+ newObject.mask = overflowMask;
29971
+ }
29972
+ newObject.text = formatted;
29973
+ return true;
29974
+ }
29975
+ }
29976
+ else if (object.text !== formatted) {
29977
+ object.text = formatted;
29978
+ return true;
29979
+ }
29980
+ }
29981
+ else {
29982
+ var object = this._object;
29983
+ if (object != null && object.text !== "") {
29984
+ object.text = "";
29985
+ return true;
29986
+ }
29987
+ }
29988
+ return false;
29989
+ };
29990
+ DTextPieceImpl.prototype.newComputed = function () {
29991
+ var value = this._value;
29992
+ if (value !== undefined) {
29993
+ if (isFunction(value)) {
29994
+ var result = value(this._parent.state);
29995
+ if (result !== undefined) {
29996
+ return result;
29997
+ }
29804
29998
  }
29805
29999
  else {
29806
- textY = height - textHeight - pbottom;
30000
+ return value;
29807
30001
  }
29808
30002
  }
29809
- text.position.set(textX, textY);
30003
+ return this._theme.getTextValue(this._parent.state);
29810
30004
  };
29811
- DTextBase.prototype.getTextColor = function (theme, state) {
29812
- var color = this._textColor;
30005
+ DTextPieceImpl.prototype.newColor = function (state) {
30006
+ var color = this._color;
29813
30007
  if (color !== undefined) {
29814
30008
  if (isFunction(color)) {
29815
30009
  var result = color(state);
@@ -29821,10 +30015,10 @@ var DTextBase = /** @class */ (function (_super) {
29821
30015
  return color;
29822
30016
  }
29823
30017
  }
29824
- return theme.getColor(state);
30018
+ return this._theme.getColor(state);
29825
30019
  };
29826
- DTextBase.prototype.getTextAlpha = function (theme, state) {
29827
- var alpha = this._textAlpha;
30020
+ DTextPieceImpl.prototype.newAlpha = function (state) {
30021
+ var alpha = this._alpha;
29828
30022
  if (alpha !== undefined) {
29829
30023
  if (isFunction(alpha)) {
29830
30024
  var result = alpha(state);
@@ -29836,57 +30030,144 @@ var DTextBase = /** @class */ (function (_super) {
29836
30030
  return alpha;
29837
30031
  }
29838
30032
  }
29839
- return theme.getAlpha(state);
30033
+ return this._theme.getAlpha(state);
29840
30034
  };
29841
- DTextBase.prototype.updateTextColor = function (text) {
29842
- var theme = this.theme;
29843
- var state = this.state;
29844
- text.style.fill = this.getTextColor(theme, state);
29845
- text.alpha = this.getTextAlpha(theme, state);
30035
+ DTextPieceImpl.prototype.newObject = function () {
30036
+ return new DDynamicText(this._dstyle);
29846
30037
  };
29847
- DTextBase.prototype.updateTextValue = function () {
29848
- var newTextValueComputed = this.computeTextValue();
29849
- if (this._textValueComputed !== newTextValueComputed) {
29850
- this._textValueComputed = newTextValueComputed;
29851
- this.onTextChange();
29852
- this.createOrUpdateText();
29853
- }
30038
+ Object.defineProperty(DTextPieceImpl.prototype, "visible", {
30039
+ get: function () {
30040
+ var object = this._object;
30041
+ if (object != null) {
30042
+ return object.visible;
30043
+ }
30044
+ return this._isVisible;
30045
+ },
30046
+ set: function (visible) {
30047
+ var object = this._object;
30048
+ if (object != null) {
30049
+ object.visible = visible;
30050
+ }
30051
+ this._isVisible = visible;
30052
+ },
30053
+ enumerable: false,
30054
+ configurable: true
30055
+ });
30056
+ DTextPieceImpl.prototype.show = function () {
30057
+ this.visible = true;
30058
+ return this;
29854
30059
  };
29855
- DTextBase.prototype.updateText = function () {
29856
- var text = this._text;
29857
- if (text) {
29858
- this.updateTextValue();
29859
- this.updateTextPosition(text);
29860
- this.updateTextColor(text);
30060
+ DTextPieceImpl.prototype.hide = function () {
30061
+ this.visible = false;
30062
+ return this;
30063
+ };
30064
+ DTextPieceImpl.prototype.isShown = function () {
30065
+ return this.visible;
30066
+ };
30067
+ DTextPieceImpl.prototype.onComputedChange = function () {
30068
+ this.emit("change", this);
30069
+ };
30070
+ DTextPieceImpl.prototype.destroy = function () {
30071
+ var object = this._object;
30072
+ if (object) {
30073
+ this._object = undefined;
30074
+ object.destroy();
29861
30075
  }
30076
+ return this;
29862
30077
  };
29863
- DTextBase.prototype.showText = function () {
29864
- var text = this._text;
29865
- if (text) {
29866
- text.visible = true;
30078
+ return DTextPieceImpl;
30079
+ }(pixi_js.utils.EventEmitter));
30080
+
30081
+ /*
30082
+ * Copyright (C) 2019 Toshiba Corporation
30083
+ * SPDX-License-Identifier: Apache-2.0
30084
+ */
30085
+ /**
30086
+ * A base class for UI classes with a text support.
30087
+ * See {@link DTextBaseEvents} for event defaults.
30088
+ */
30089
+ var DTextBase = /** @class */ (function (_super) {
30090
+ __extends(DTextBase, _super);
30091
+ function DTextBase() {
30092
+ return _super !== null && _super.apply(this, arguments) || this;
30093
+ }
30094
+ DTextBase.prototype.init = function (options) {
30095
+ _super.prototype.init.call(this, options);
30096
+ this.getText();
30097
+ };
30098
+ DTextBase.prototype.getOverflowMask = function () {
30099
+ var result = this._overflowMask;
30100
+ if (result === undefined) {
30101
+ result = this.newOverflowMask();
30102
+ this._overflowMask = result;
29867
30103
  }
29868
- this._isTextVisible = true;
30104
+ return null;
29869
30105
  };
29870
- DTextBase.prototype.hideText = function () {
29871
- var text = this._text;
29872
- if (text) {
29873
- text.visible = false;
30106
+ DTextBase.prototype.newOverflowMask = function () {
30107
+ var _a, _b;
30108
+ if ((_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.mask) !== null && _b !== void 0 ? _b : this.theme.isOverflowMaskEnabled()) {
30109
+ var result = new DBaseOverflowMaskSimple(this);
30110
+ this._reflowable.add(result);
30111
+ this.toDirty();
30112
+ return result;
30113
+ }
30114
+ else {
30115
+ return null;
29874
30116
  }
29875
- this._isTextVisible = false;
30117
+ };
30118
+ Object.defineProperty(DTextBase.prototype, "text", {
30119
+ get: function () {
30120
+ var _a;
30121
+ return ((_a = this._text) !== null && _a !== void 0 ? _a : (this._text = this.newText()));
30122
+ },
30123
+ set: function (text) {
30124
+ this.text.value = text;
30125
+ },
30126
+ enumerable: false,
30127
+ configurable: true
30128
+ });
30129
+ DTextBase.prototype.getText = function () {
30130
+ var _a;
30131
+ return ((_a = this._text) !== null && _a !== void 0 ? _a : (this._text = this.newText()));
30132
+ };
30133
+ DTextBase.prototype.newText = function () {
30134
+ var _a;
30135
+ return new DTextPieceImpl(this, this.theme, (_a = this._options) === null || _a === void 0 ? void 0 : _a.text);
29876
30136
  };
29877
30137
  DTextBase.prototype.onReflow = function () {
29878
30138
  _super.prototype.onReflow.call(this);
29879
- this.updateText();
30139
+ this.onReflowTextAndImage();
30140
+ };
30141
+ DTextBase.prototype.getLayouter = function () {
30142
+ var _a;
30143
+ return ((_a = DTextBase.LAYOUTER) !== null && _a !== void 0 ? _a : (DTextBase.LAYOUTER = new DImagePieceLayouter()));
30144
+ };
30145
+ DTextBase.prototype.onReflowTextAndImage = function () {
30146
+ var layouter = this.getLayouter();
30147
+ var text = this.getText();
30148
+ text.update(layouter);
30149
+ var auto = this._auto;
30150
+ layouter.execute(this._padding, text.align, auto.width.isOn ? null : this.width, auto.height.isOn ? null : this.height);
30151
+ layouter.clear();
29880
30152
  };
29881
30153
  DTextBase.prototype.isRefitable = function (target) {
29882
- return _super.prototype.isRefitable.call(this, target) || (target != null && target === this._text);
30154
+ if (_super.prototype.isRefitable.call(this, target)) {
30155
+ return true;
30156
+ }
30157
+ if (target != null) {
30158
+ var text = this._text;
30159
+ if (text != null && target === text.object) {
30160
+ return true;
30161
+ }
30162
+ }
30163
+ return false;
29883
30164
  };
29884
30165
  DTextBase.prototype.applyTitle = function () {
29885
- var text = this._text;
29886
- if (this._title.length <= 0 && text && "clipped" in text && text.clipped) {
30166
+ var object = this.text.object;
30167
+ if (this._title.length <= 0 && object != null && object.clipped) {
29887
30168
  var layer = DApplications.getLayer(this);
29888
30169
  if (layer) {
29889
- layer.view.title = text.text;
30170
+ layer.view.title = object.text;
29890
30171
  }
29891
30172
  }
29892
30173
  else {
@@ -29900,7 +30181,6 @@ var DTextBase = /** @class */ (function (_super) {
29900
30181
  // Text
29901
30182
  var text = this._text;
29902
30183
  if (text) {
29903
- this._text = null;
29904
30184
  text.destroy();
29905
30185
  }
29906
30186
  // Overflow mask
@@ -30532,7 +30812,7 @@ var DImagePieceContainerImpl = /** @class */ (function () {
30532
30812
  }
30533
30813
  return false;
30534
30814
  };
30535
- DImagePieceContainerImpl.prototype.updateTextAndImage = function (layouter) {
30815
+ DImagePieceContainerImpl.prototype.update = function (layouter) {
30536
30816
  var pieces = this._pieces;
30537
30817
  for (var i = 0, imax = pieces.length; i < imax; ++i) {
30538
30818
  var piece = pieces[i];
@@ -30542,6 +30822,54 @@ var DImagePieceContainerImpl = /** @class */ (function () {
30542
30822
  layouter.add(piece);
30543
30823
  }
30544
30824
  };
30825
+ Object.defineProperty(DImagePieceContainerImpl.prototype, "object", {
30826
+ get: function () {
30827
+ return this._pieces[0].object;
30828
+ },
30829
+ enumerable: false,
30830
+ configurable: true
30831
+ });
30832
+ Object.defineProperty(DImagePieceContainerImpl.prototype, "align", {
30833
+ get: function () {
30834
+ return this._pieces[0].align;
30835
+ },
30836
+ enumerable: false,
30837
+ configurable: true
30838
+ });
30839
+ Object.defineProperty(DImagePieceContainerImpl.prototype, "margin", {
30840
+ get: function () {
30841
+ return this._pieces[0].margin;
30842
+ },
30843
+ enumerable: false,
30844
+ configurable: true
30845
+ });
30846
+ Object.defineProperty(DImagePieceContainerImpl.prototype, "tint", {
30847
+ get: function () {
30848
+ return this._pieces[0].tint;
30849
+ },
30850
+ enumerable: false,
30851
+ configurable: true
30852
+ });
30853
+ Object.defineProperty(DImagePieceContainerImpl.prototype, "source", {
30854
+ get: function () {
30855
+ return this._pieces[0].source;
30856
+ },
30857
+ set: function (source) {
30858
+ this._pieces[0].source = source;
30859
+ },
30860
+ enumerable: false,
30861
+ configurable: true
30862
+ });
30863
+ Object.defineProperty(DImagePieceContainerImpl.prototype, "rotation", {
30864
+ get: function () {
30865
+ return this._pieces[0].rotation;
30866
+ },
30867
+ set: function (rotation) {
30868
+ this._pieces[0].rotation = rotation;
30869
+ },
30870
+ enumerable: false,
30871
+ configurable: true
30872
+ });
30545
30873
  DImagePieceContainerImpl.prototype.add = function (options) {
30546
30874
  var result = this.newImage(this._theme, options);
30547
30875
  this._pieces.push(result);
@@ -30616,24 +30944,13 @@ var DImageBase = /** @class */ (function (_super) {
30616
30944
  _super.prototype.onStateChange.call(this, newState, oldState);
30617
30945
  this.getImage().onStateChange(newState, oldState);
30618
30946
  };
30619
- DImageBase.prototype.updateText = function () {
30620
- this.updateTextValue();
30621
- this.updateTextAndImage();
30622
- };
30623
- DImageBase.prototype.updateTextAndImage = function () {
30624
- var _a;
30625
- var layouter = ((_a = DImageBase.LAYOUTER) !== null && _a !== void 0 ? _a : (DImageBase.LAYOUTER = new DImagePieceLayouter()));
30626
- this.getImage().updateTextAndImage(layouter);
30627
- var text = this._text;
30628
- if (text != null) {
30629
- this.updateTextColor(text);
30630
- layouter.set(text);
30631
- }
30632
- else {
30633
- layouter.set(null);
30634
- }
30947
+ DImageBase.prototype.onReflowTextAndImage = function () {
30948
+ var layouter = this.getLayouter();
30949
+ this.getImage().update(layouter);
30950
+ var text = this.getText();
30951
+ text.update(layouter);
30635
30952
  var auto = this._auto;
30636
- layouter.execute(this._padding, this._textAlign, auto.width.isOn ? null : this.width, auto.height.isOn ? null : this.height);
30953
+ layouter.execute(this._padding, text.align, auto.width.isOn ? null : this.width, auto.height.isOn ? null : this.height);
30637
30954
  layouter.clear();
30638
30955
  };
30639
30956
  DImageBase.prototype.isRefitable = function (target) {
@@ -31922,16 +32239,16 @@ var DInput = /** @class */ (function (_super) {
31922
32239
  return _this.containsPoint(point);
31923
32240
  },
31924
32241
  onStart: function () {
31925
- _this.hideText();
32242
+ _this.text.hide();
31926
32243
  },
31927
32244
  onCancel: function () {
31928
- _this.showText();
32245
+ _this.text.show();
31929
32246
  },
31930
32247
  onEnd: function () {
31931
32248
  // DO NOTHING
31932
32249
  },
31933
32250
  getValue: function () {
31934
- return _this._textValueComputed;
32251
+ return _this.text.computed;
31935
32252
  },
31936
32253
  onValueInput: function (newValue) {
31937
32254
  _this.onValueInput(newValue);
@@ -31950,7 +32267,7 @@ var DInput = /** @class */ (function (_super) {
31950
32267
  };
31951
32268
  Object.defineProperty(DInput.prototype, "value", {
31952
32269
  get: function () {
31953
- return this._textValueComputed;
32270
+ return this.text.computed;
31954
32271
  },
31955
32272
  set: function (value) {
31956
32273
  this.text = value;
@@ -31958,9 +32275,13 @@ var DInput = /** @class */ (function (_super) {
31958
32275
  enumerable: false,
31959
32276
  configurable: true
31960
32277
  });
31961
- DInput.prototype.onTextChange = function () {
31962
- _super.prototype.onTextChange.call(this);
31963
- this.validate();
32278
+ DInput.prototype.newText = function () {
32279
+ var _this = this;
32280
+ var result = _super.prototype.newText.call(this);
32281
+ result.on("change", function () {
32282
+ _this.validate();
32283
+ });
32284
+ return result;
31964
32285
  };
31965
32286
  DInput.prototype.onValueChange = function (newValue, oldValue) {
31966
32287
  this.emit("change", newValue, oldValue, this);
@@ -35219,7 +35540,7 @@ var imageElementCache = {};
35219
35540
  var toImageElement = function (dataUrl) {
35220
35541
  var cachedImageElement = imageElementCache[dataUrl];
35221
35542
  if (cachedImageElement != null) {
35222
- if (cachedImageElement instanceof HTMLImageElement) {
35543
+ if ("url" in cachedImageElement) {
35223
35544
  return Promise.resolve(cachedImageElement);
35224
35545
  }
35225
35546
  else {
@@ -35230,8 +35551,14 @@ var toImageElement = function (dataUrl) {
35230
35551
  var result = new Promise(function (resolve, reject) {
35231
35552
  var imageElement = document.createElement("img");
35232
35553
  imageElement.onload = function () {
35233
- imageElementCache[dataUrl] = imageElement;
35234
- resolve(imageElement);
35554
+ var resolved = {
35555
+ url: dataUrl,
35556
+ width: imageElement.width,
35557
+ height: imageElement.height,
35558
+ source: imageElement
35559
+ };
35560
+ imageElementCache[dataUrl] = resolved;
35561
+ resolve(resolved);
35235
35562
  };
35236
35563
  imageElement.onabort = imageElement.onerror = function () {
35237
35564
  reject();
@@ -40386,6 +40713,9 @@ var EShapeGroup = /** @class */ (function (_super) {
40386
40713
  enumerable: false,
40387
40714
  configurable: true
40388
40715
  });
40716
+ EShapeGroup.prototype.serializeGradient = function (manager) {
40717
+ return -1;
40718
+ };
40389
40719
  Object.defineProperty(EShapeGroup.prototype, "radius", {
40390
40720
  get: function () {
40391
40721
  var children = this.children;
@@ -40423,6 +40753,9 @@ var EShapeGroup = /** @class */ (function (_super) {
40423
40753
  enumerable: false,
40424
40754
  configurable: true
40425
40755
  });
40756
+ EShapeGroup.prototype.serializeImage = function (manager) {
40757
+ return -1;
40758
+ };
40426
40759
  Object.defineProperty(EShapeGroup.prototype, "points", {
40427
40760
  get: function () {
40428
40761
  var children = this.children;
@@ -44584,9 +44917,9 @@ var DMenuItemText = /** @class */ (function (_super) {
44584
44917
  var shortcuts = this._shortcuts;
44585
44918
  if (shortcuts != null && 0 < shortcuts.length) {
44586
44919
  var shortcut = shortcuts[0];
44587
- var shortcutText = this.newText();
44920
+ var shortcutText = this.newShortcutText();
44588
44921
  this._shortcutText = shortcutText;
44589
- this.snippet.add(this._shortcutText, true);
44922
+ this.snippet.add(shortcutText, true);
44590
44923
  shortcutText.text = UtilKeyboardEvent.toString(shortcut);
44591
44924
  }
44592
44925
  else {
@@ -44594,6 +44927,10 @@ var DMenuItemText = /** @class */ (function (_super) {
44594
44927
  }
44595
44928
  this._shortcutMargin = this.theme.getShortcutTextMargin();
44596
44929
  };
44930
+ DMenuItemText.prototype.newShortcutText = function () {
44931
+ var _a, _b;
44932
+ return new DDynamicText(new DDynamicTextStyle(this, this.theme, (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.style));
44933
+ };
44597
44934
  DMenuItemText.prototype.updateShortcutText = function () {
44598
44935
  var text = this._shortcutText;
44599
44936
  var margin = this._shortcutMargin;
@@ -44618,8 +44955,7 @@ var DMenuItemText = /** @class */ (function (_super) {
44618
44955
  text.position.set(textX, textY);
44619
44956
  }
44620
44957
  };
44621
- DMenuItemText.prototype.updateTextColor = function (text) {
44622
- _super.prototype.updateTextColor.call(this, text);
44958
+ DMenuItemText.prototype.updateShortcutColor = function () {
44623
44959
  var shortcutText = this._shortcutText;
44624
44960
  if (shortcutText != null) {
44625
44961
  var theme = this.theme;
@@ -44628,8 +44964,9 @@ var DMenuItemText = /** @class */ (function (_super) {
44628
44964
  shortcutText.alpha = theme.getShortcutAlpha(state);
44629
44965
  }
44630
44966
  };
44631
- DMenuItemText.prototype.updateText = function () {
44632
- _super.prototype.updateText.call(this);
44967
+ DMenuItemText.prototype.onReflow = function () {
44968
+ _super.prototype.onReflow.call(this);
44969
+ this.updateShortcutColor();
44633
44970
  this.updateShortcutText();
44634
44971
  };
44635
44972
  DMenuItemText.prototype.getType = function () {
@@ -46329,9 +46666,9 @@ var EShapeActionValueMiscWrite = /** @class */ (function (_super) {
46329
46666
  */
46330
46667
  var createImageSdf = function (dataUrl, convertToSdf) {
46331
46668
  if (convertToSdf) {
46332
- return toImageElement(dataUrl).then(function (imageElement) {
46669
+ return toImageElement(dataUrl).then(function (image) {
46333
46670
  var generator = DynamicSDFFontGenerator.getInstance().init();
46334
- generator.updateTexture(imageElement);
46671
+ generator.updateTexture(image.width, image.height, image.source);
46335
46672
  generator.render();
46336
46673
  var canvas = document.createElement("canvas");
46337
46674
  generator.read(canvas);
@@ -46339,8 +46676,8 @@ var createImageSdf = function (dataUrl, convertToSdf) {
46339
46676
  });
46340
46677
  }
46341
46678
  else {
46342
- return toImageElement(dataUrl).then(function (imageElement) {
46343
- return new EShapeImageSdf(imageElement);
46679
+ return toImageElement(dataUrl).then(function (image) {
46680
+ return new EShapeImageSdf(image);
46344
46681
  });
46345
46682
  }
46346
46683
  };
@@ -46350,8 +46687,8 @@ var createImageSdf = function (dataUrl, convertToSdf) {
46350
46687
  * SPDX-License-Identifier: Apache-2.0
46351
46688
  */
46352
46689
  var createImage = function (dataUrl) {
46353
- return toImageElement(dataUrl).then(function (imageElement) {
46354
- return new EShapeImage(imageElement);
46690
+ return toImageElement(dataUrl).then(function (image) {
46691
+ return new EShapeImage(image);
46355
46692
  });
46356
46693
  };
46357
46694
 
@@ -50404,6 +50741,12 @@ var DThemeWhiteInput = /** @class */ (function (_super) {
50404
50741
  }
50405
50742
  return DThemeWhiteConstants.BORDER_COLOR;
50406
50743
  };
50744
+ DThemeWhiteInput.prototype.getOutlineColor = function (state) {
50745
+ if (state.isInvalid) {
50746
+ return DThemeWhiteConstants.INVALID_COLOR;
50747
+ }
50748
+ return _super.prototype.getOutlineColor.call(this, state);
50749
+ };
50407
50750
  DThemeWhiteInput.prototype.getHeight = function () {
50408
50751
  return this.getLineHeight();
50409
50752
  };
@@ -52408,14 +52751,14 @@ var loadThemeWhitePane = function () {
52408
52751
  * Copyright (C) 2019 Toshiba Corporation
52409
52752
  * SPDX-License-Identifier: Apache-2.0
52410
52753
  */
52411
- var formatter$l = function (value) {
52412
- if (value) {
52413
- var text = value.text;
52414
- if (isString(text)) {
52415
- return text;
52754
+ var formatter$l = function (item) {
52755
+ if (item) {
52756
+ var value = item.text.value;
52757
+ if (isString(value)) {
52758
+ return value;
52416
52759
  }
52417
- else if (text != null) {
52418
- var computed = text(value.state);
52760
+ else if (value != null) {
52761
+ var computed = value(item.state);
52419
52762
  if (computed != null) {
52420
52763
  return computed;
52421
52764
  }
@@ -52441,19 +52784,19 @@ var DThemeWhiteSelect = /** @class */ (function (_super) {
52441
52784
  * Copyright (C) 2019 Toshiba Corporation
52442
52785
  * SPDX-License-Identifier: Apache-2.0
52443
52786
  */
52444
- var formatter$k = function (values) {
52445
- if (values) {
52787
+ var formatter$k = function (items) {
52788
+ if (items) {
52446
52789
  var result = "";
52447
52790
  var delimiter = "";
52448
- for (var i = 0, imax = values.length; i < imax; ++i) {
52449
- var value = values[i];
52450
- var text = value.text;
52451
- if (isString(text)) {
52452
- result += delimiter + text;
52791
+ for (var i = 0, imax = items.length; i < imax; ++i) {
52792
+ var item = items[i];
52793
+ var value = item.text.value;
52794
+ if (isString(value)) {
52795
+ result += delimiter + value;
52453
52796
  delimiter = ", ";
52454
52797
  }
52455
- else if (text != null) {
52456
- var computed = text(value.state);
52798
+ else if (value != null) {
52799
+ var computed = value(item.state);
52457
52800
  if (computed != null) {
52458
52801
  result += delimiter + computed;
52459
52802
  delimiter = ", ";
@@ -61378,6 +61721,12 @@ var DThemeDarkInput = /** @class */ (function (_super) {
61378
61721
  }
61379
61722
  return null;
61380
61723
  };
61724
+ DThemeDarkInput.prototype.getOutlineColor = function (state) {
61725
+ if (state.isInvalid) {
61726
+ return DThemeDarkConstants.INVALID_COLOR;
61727
+ }
61728
+ return _super.prototype.getOutlineColor.call(this, state);
61729
+ };
61381
61730
  DThemeDarkInput.prototype.getHeight = function () {
61382
61731
  return this.getLineHeight();
61383
61732
  };
@@ -63380,14 +63729,14 @@ var loadThemeDarkPane = function () {
63380
63729
  * Copyright (C) 2019 Toshiba Corporation
63381
63730
  * SPDX-License-Identifier: Apache-2.0
63382
63731
  */
63383
- var formatter$a = function (value) {
63384
- if (value) {
63385
- var text = value.text;
63386
- if (isString(text)) {
63387
- return text;
63732
+ var formatter$a = function (item) {
63733
+ if (item) {
63734
+ var value = item.text.value;
63735
+ if (isString(value)) {
63736
+ return value;
63388
63737
  }
63389
- else if (text != null) {
63390
- var computed = text(value.state);
63738
+ else if (value != null) {
63739
+ var computed = value(item.state);
63391
63740
  if (computed != null) {
63392
63741
  return computed;
63393
63742
  }
@@ -63413,19 +63762,19 @@ var DThemeDarkSelect = /** @class */ (function (_super) {
63413
63762
  * Copyright (C) 2019 Toshiba Corporation
63414
63763
  * SPDX-License-Identifier: Apache-2.0
63415
63764
  */
63416
- var formatter$9 = function (values) {
63417
- if (values) {
63765
+ var formatter$9 = function (items) {
63766
+ if (items) {
63418
63767
  var result = "";
63419
63768
  var delimiter = "";
63420
- for (var i = 0, imax = values.length; i < imax; ++i) {
63421
- var value = values[i];
63422
- var text = value.text;
63423
- if (isString(text)) {
63424
- result += delimiter + text;
63769
+ for (var i = 0, imax = items.length; i < imax; ++i) {
63770
+ var item = items[i];
63771
+ var value = item.text.value;
63772
+ if (isString(value)) {
63773
+ result += delimiter + value;
63425
63774
  delimiter = ", ";
63426
63775
  }
63427
- else if (text != null) {
63428
- var computed = text(value.state);
63776
+ else if (value != null) {
63777
+ var computed = value(item.state);
63429
63778
  if (computed != null) {
63430
63779
  result += delimiter + computed;
63431
63780
  delimiter = ", ";
@@ -74275,7 +74624,7 @@ var DButtonColorGradient = /** @class */ (function (_super) {
74275
74624
  var view = DPickerColorGradientView.from(1, 10, checkers, texture);
74276
74625
  this._view = view;
74277
74626
  view.setRectangle(0, 0, 0, texture.width, texture.height);
74278
- view.setData(0, this._textValueComputed);
74627
+ view.setData(0, this.text.computed);
74279
74628
  view.update();
74280
74629
  this.image = view;
74281
74630
  }
@@ -74284,13 +74633,13 @@ var DButtonColorGradient = /** @class */ (function (_super) {
74284
74633
  DButtonColorGradient.prototype.onActivate = function (e) {
74285
74634
  var _this = this;
74286
74635
  _super.prototype.onActivate.call(this, e);
74287
- var value = this._textValueComputed;
74636
+ var computed = this.text.computed;
74288
74637
  var dialog = this.dialog;
74289
- if (value != null) {
74290
- dialog.value.fromObject(value);
74638
+ if (computed != null) {
74639
+ dialog.value.fromObject(computed);
74291
74640
  }
74292
74641
  dialog.open(this).then(function (newValue) {
74293
- _this.onValueChange(newValue, _this.toClone(value));
74642
+ _this.onValueChange(newValue, _this.toClone(computed));
74294
74643
  });
74295
74644
  };
74296
74645
  DButtonColorGradient.prototype.toClone = function (value) {
@@ -74301,17 +74650,15 @@ var DButtonColorGradient = /** @class */ (function (_super) {
74301
74650
  return result;
74302
74651
  };
74303
74652
  DButtonColorGradient.prototype.onValueChange = function (newValue, oldValue) {
74304
- var value = this._textValueComputed;
74305
- if (value != null) {
74306
- value.fromObject(newValue);
74653
+ var computed = this.text.computed;
74654
+ if (computed != null) {
74655
+ computed.fromObject(newValue);
74307
74656
  }
74308
74657
  var view = this._view;
74309
74658
  if (view != null) {
74310
74659
  view.update();
74311
74660
  }
74312
- this.onTextChange();
74313
- this.createOrUpdateText();
74314
- DApplications.update(this);
74661
+ this.text.compute(true);
74315
74662
  this.emit("change", newValue, oldValue, this);
74316
74663
  };
74317
74664
  Object.defineProperty(DButtonColorGradient.prototype, "dialog", {
@@ -74344,7 +74691,7 @@ var DButtonColorGradient = /** @class */ (function (_super) {
74344
74691
  };
74345
74692
  Object.defineProperty(DButtonColorGradient.prototype, "value", {
74346
74693
  get: function () {
74347
- return this._textValueComputed;
74694
+ return this.text.computed;
74348
74695
  },
74349
74696
  enumerable: false,
74350
74697
  configurable: true
@@ -74433,14 +74780,14 @@ var DButtonColor = /** @class */ (function (_super) {
74433
74780
  var _this = this;
74434
74781
  _super.prototype.onActivate.call(this, e);
74435
74782
  var dialog = this.dialog;
74436
- var value = this._textValueComputed;
74437
- if (value != null) {
74783
+ var computed = this.text.computed;
74784
+ if (computed != null) {
74438
74785
  var dialogCurrent = dialog.current;
74439
- dialogCurrent.color = value.color;
74440
- dialogCurrent.alpha = value.alpha;
74786
+ dialogCurrent.color = computed.color;
74787
+ dialogCurrent.alpha = computed.alpha;
74441
74788
  var dialogNew = dialog.new;
74442
- dialogNew.color = value.color;
74443
- dialogNew.alpha = value.alpha;
74789
+ dialogNew.color = computed.color;
74790
+ dialogNew.alpha = computed.alpha;
74444
74791
  }
74445
74792
  dialog.open(this).then(function () {
74446
74793
  _this.onValueChange(_this.toClone(dialog.new), _this.toClone(dialog.current));
@@ -74453,10 +74800,10 @@ var DButtonColor = /** @class */ (function (_super) {
74453
74800
  };
74454
74801
  };
74455
74802
  DButtonColor.prototype.onValueChange = function (newValue, oldValue) {
74456
- var value = this._textValueComputed;
74457
- if (value != null) {
74458
- value.color = newValue.color;
74459
- value.alpha = newValue.alpha;
74803
+ var computed = this.text.computed;
74804
+ if (computed != null) {
74805
+ computed.color = newValue.color;
74806
+ computed.alpha = newValue.alpha;
74460
74807
  }
74461
74808
  this.onColorChange();
74462
74809
  this.emit("change", newValue, oldValue, this);
@@ -74464,16 +74811,12 @@ var DButtonColor = /** @class */ (function (_super) {
74464
74811
  DButtonColor.prototype.onColorChange = function () {
74465
74812
  var image = this.image.get(0);
74466
74813
  if (image != null) {
74467
- var value = this._textValueComputed;
74468
- if (value != null) {
74469
- image.tint.color = value.color;
74814
+ var computed = this.text.computed;
74815
+ if (computed != null) {
74816
+ image.tint.color = computed.color;
74470
74817
  }
74471
74818
  }
74472
- this.updateTextForcibly();
74473
- };
74474
- DButtonColor.prototype.updateTextForcibly = function () {
74475
- this.onTextChange();
74476
- this.createOrUpdateText();
74819
+ this.text.compute(true);
74477
74820
  };
74478
74821
  Object.defineProperty(DButtonColor.prototype, "dialog", {
74479
74822
  get: function () {
@@ -74517,13 +74860,14 @@ var DButtonColor = /** @class */ (function (_super) {
74517
74860
  });
74518
74861
  DButtonColor.prototype.newValue = function () {
74519
74862
  var _this = this;
74520
- var value = this._textValueComputed;
74521
- return new DPickerColorAndAlpha(value, function (color) {
74522
- value.color = color;
74863
+ var text = this.text;
74864
+ var computed = text.computed;
74865
+ return new DPickerColorAndAlpha(computed, function (color) {
74866
+ computed.color = color;
74523
74867
  _this.onColorChange();
74524
74868
  }, function (alpha) {
74525
- value.alpha = alpha;
74526
- _this.updateTextForcibly();
74869
+ computed.alpha = alpha;
74870
+ text.compute(true);
74527
74871
  });
74528
74872
  };
74529
74873
  DButtonColor.prototype.getType = function () {
@@ -74560,7 +74904,7 @@ var DButtonDate = /** @class */ (function (_super) {
74560
74904
  var _this = this;
74561
74905
  var _a, _b;
74562
74906
  _super.prototype.onActivate.call(this, e);
74563
- var value = (_b = (_a = this._textValueComputed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
74907
+ var value = (_b = (_a = this.text.computed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
74564
74908
  var dialog = this.dialog;
74565
74909
  dialog.current = new Date(value);
74566
74910
  dialog.new = new Date(value);
@@ -74604,11 +74948,11 @@ var DButtonDate = /** @class */ (function (_super) {
74604
74948
  Object.defineProperty(DButtonDate.prototype, "value", {
74605
74949
  get: function () {
74606
74950
  var _a;
74607
- return (_a = this._textValueComputed) !== null && _a !== void 0 ? _a : new Date();
74951
+ return (_a = this.text.computed) !== null && _a !== void 0 ? _a : new Date();
74608
74952
  },
74609
74953
  set: function (value) {
74610
- var textValueComputed = this._textValueComputed;
74611
- if (textValueComputed === undefined || textValueComputed.getTime() !== value.getTime()) {
74954
+ var computed = this.text.computed;
74955
+ if (computed === undefined || computed.getTime() !== value.getTime()) {
74612
74956
  this.text = value;
74613
74957
  }
74614
74958
  },
@@ -74634,7 +74978,7 @@ var DButtonDatetime = /** @class */ (function (_super) {
74634
74978
  var _this = this;
74635
74979
  var _a, _b;
74636
74980
  _super.prototype.onActivate.call(this, e);
74637
- var value = (_b = (_a = this._textValueComputed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
74981
+ var value = (_b = (_a = this.text.computed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
74638
74982
  var dialog = this.dialog;
74639
74983
  dialog.current = new Date(value);
74640
74984
  dialog.new = new Date(value);
@@ -74687,11 +75031,11 @@ var DButtonDatetime = /** @class */ (function (_super) {
74687
75031
  Object.defineProperty(DButtonDatetime.prototype, "value", {
74688
75032
  get: function () {
74689
75033
  var _a;
74690
- return (_a = this._textValueComputed) !== null && _a !== void 0 ? _a : new Date();
75034
+ return (_a = this.text.computed) !== null && _a !== void 0 ? _a : new Date();
74691
75035
  },
74692
75036
  set: function (value) {
74693
- var textValueComputed = this._textValueComputed;
74694
- if (textValueComputed === undefined || textValueComputed.getTime() !== value.getTime()) {
75037
+ var computed = this.text.computed;
75038
+ if (computed === undefined || computed.getTime() !== value.getTime()) {
74695
75039
  this.text = value;
74696
75040
  }
74697
75041
  },
@@ -77776,7 +78120,7 @@ var DButtonSelect = /** @class */ (function (_super) {
77776
78120
  var _a;
77777
78121
  _super.prototype.onActivate.call(this, e);
77778
78122
  var dialog = this.dialog;
77779
- var oldValue = (_a = this._textValueComputed) !== null && _a !== void 0 ? _a : null;
78123
+ var oldValue = (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
77780
78124
  this._dialogSetter(dialog, oldValue);
77781
78125
  dialog.open(this).then(function () {
77782
78126
  var newValue = _this._dialogGetter(dialog);
@@ -77809,7 +78153,7 @@ var DButtonSelect = /** @class */ (function (_super) {
77809
78153
  Object.defineProperty(DButtonSelect.prototype, "value", {
77810
78154
  get: function () {
77811
78155
  var _a;
77812
- return (_a = this._textValueComputed) !== null && _a !== void 0 ? _a : null;
78156
+ return (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
77813
78157
  },
77814
78158
  set: function (value) {
77815
78159
  this.text = value;
@@ -77836,7 +78180,7 @@ var DButtonTime = /** @class */ (function (_super) {
77836
78180
  var _this = this;
77837
78181
  var _a, _b;
77838
78182
  _super.prototype.onActivate.call(this, e);
77839
- var value = (_b = (_a = this._textValueComputed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
78183
+ var value = (_b = (_a = this.text.computed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
77840
78184
  var dialog = this.dialog;
77841
78185
  dialog.current = new Date(value);
77842
78186
  dialog.new = new Date(value);
@@ -77888,11 +78232,11 @@ var DButtonTime = /** @class */ (function (_super) {
77888
78232
  Object.defineProperty(DButtonTime.prototype, "value", {
77889
78233
  get: function () {
77890
78234
  var _a;
77891
- return (_a = this._textValueComputed) !== null && _a !== void 0 ? _a : new Date();
78235
+ return (_a = this.text.computed) !== null && _a !== void 0 ? _a : new Date();
77892
78236
  },
77893
78237
  set: function (value) {
77894
- var textValueComputed = this._textValueComputed;
77895
- if (textValueComputed === undefined || textValueComputed.getTime() !== value.getTime()) {
78238
+ var computed = this.text.computed;
78239
+ if (computed === undefined || computed.getTime() !== value.getTime()) {
77896
78240
  this.text = value;
77897
78241
  }
77898
78242
  },
@@ -87032,7 +87376,7 @@ var DDialogProcessing = /** @class */ (function (_super) {
87032
87376
  _this._delayDone = (_a = delay === null || delay === void 0 ? void 0 : delay.done) !== null && _a !== void 0 ? _a : theme.getDoneDelay();
87033
87377
  var delayClose = delay === null || delay === void 0 ? void 0 : delay.close;
87034
87378
  _this._delayClose = delayClose !== undefined ? delayClose : theme.getCloseDelay();
87035
- _this._messageText = _this.message.text;
87379
+ _this._messageText = _this.message.text.value;
87036
87380
  return _this;
87037
87381
  }
87038
87382
  DDialogProcessing.prototype.newMessage = function (options) {
@@ -87390,7 +87734,7 @@ var DIndicatorProcessing = /** @class */ (function () {
87390
87734
  }
87391
87735
  state.unlock();
87392
87736
  if (this._isTextEnabled) {
87393
- this._textValueBackup = parent.text;
87737
+ this._textValueBackup = parent.text.value;
87394
87738
  var textValue = this._textValue;
87395
87739
  if (textValue !== undefined) {
87396
87740
  parent.text = textValue;
@@ -90491,7 +90835,7 @@ var DTableBodyCellSelectDialog = /** @class */ (function (_super) {
90491
90835
  var selecting = this._column.selecting;
90492
90836
  var dialog = selecting.dialog;
90493
90837
  if (dialog) {
90494
- var oldValue_1 = (_a = this._textValueComputed) !== null && _a !== void 0 ? _a : null;
90838
+ var oldValue_1 = (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
90495
90839
  selecting.setter(dialog, oldValue_1);
90496
90840
  dialog.open(this).then(function () {
90497
90841
  var newValue = selecting.getter(dialog);
@@ -90548,11 +90892,8 @@ var DTableBodyCellSelectDialog = /** @class */ (function (_super) {
90548
90892
  });
90549
90893
  Object.defineProperty(DTableBodyCellSelectDialog.prototype, "value", {
90550
90894
  get: function () {
90551
- var textValueComputed = this._textValueComputed;
90552
- if (textValueComputed !== undefined) {
90553
- return textValueComputed;
90554
- }
90555
- return null;
90895
+ var _a;
90896
+ return (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
90556
90897
  },
90557
90898
  set: function (value) {
90558
90899
  this.text = value;
@@ -90564,10 +90905,7 @@ var DTableBodyCellSelectDialog = /** @class */ (function (_super) {
90564
90905
  this._row = row;
90565
90906
  this._rowIndex = rowIndex;
90566
90907
  if (forcibly) {
90567
- this._textValue = value;
90568
- this._textValueComputed = value;
90569
- this.onTextChange();
90570
- this.createOrUpdateText();
90908
+ this.text.setValue(value, true);
90571
90909
  }
90572
90910
  else {
90573
90911
  this.text = value;
@@ -90696,7 +91034,7 @@ var DTableBodyCellSelectPromise = /** @class */ (function (_super) {
90696
91034
  promise().then(function (newValue) {
90697
91035
  var _a;
90698
91036
  if (_this._isSyncEnabled) {
90699
- var oldValue = (_a = _this._textValueComputed) !== null && _a !== void 0 ? _a : null;
91037
+ var oldValue = (_a = _this.text.computed) !== null && _a !== void 0 ? _a : null;
90700
91038
  if (newValue !== oldValue) {
90701
91039
  _this.text = newValue;
90702
91040
  _this.onValueChange(newValue, oldValue);
@@ -90749,11 +91087,8 @@ var DTableBodyCellSelectPromise = /** @class */ (function (_super) {
90749
91087
  });
90750
91088
  Object.defineProperty(DTableBodyCellSelectPromise.prototype, "value", {
90751
91089
  get: function () {
90752
- var textValueComputed = this._textValueComputed;
90753
- if (textValueComputed !== undefined) {
90754
- return textValueComputed;
90755
- }
90756
- return null;
91090
+ var _a;
91091
+ return (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
90757
91092
  },
90758
91093
  set: function (value) {
90759
91094
  this.text = value;
@@ -90765,10 +91100,7 @@ var DTableBodyCellSelectPromise = /** @class */ (function (_super) {
90765
91100
  this._row = row;
90766
91101
  this._rowIndex = rowIndex;
90767
91102
  if (forcibly) {
90768
- this._textValue = value;
90769
- this._textValueComputed = value;
90770
- this.onTextChange();
90771
- this.createOrUpdateText();
91103
+ this.text.setValue(value, true);
90772
91104
  }
90773
91105
  else {
90774
91106
  this.text = value;
@@ -91223,24 +91555,21 @@ var DTableBodyCellDate = /** @class */ (function (_super) {
91223
91555
  this._rowIndex = rowIndex;
91224
91556
  if (value instanceof Date) {
91225
91557
  if (forcibly) {
91226
- this._textValue = value;
91227
- this._textValueComputed = value;
91228
- this.onTextChange();
91229
- this.createOrUpdateText();
91558
+ this.text.setValue(value, true);
91230
91559
  }
91231
91560
  else {
91232
91561
  this.text = value;
91233
91562
  }
91234
91563
  }
91235
91564
  else if (isNumber(value)) {
91236
- var textValueComputed = this._textValueComputed;
91237
- if (textValueComputed === undefined) {
91565
+ var text = this.text;
91566
+ var computed = text.computed;
91567
+ if (computed === undefined) {
91238
91568
  this.text = new Date(value);
91239
91569
  }
91240
- else if (textValueComputed.getTime() !== value) {
91241
- textValueComputed.setTime(value);
91242
- this.onTextChange();
91243
- this.createOrUpdateText();
91570
+ else if (computed.getTime() !== value) {
91571
+ computed.setTime(value);
91572
+ text.compute(true);
91244
91573
  }
91245
91574
  }
91246
91575
  DTableBodyCells.set(this, row, columnIndex, this._column);
@@ -91316,24 +91645,21 @@ var DTableBodyCellDatetime = /** @class */ (function (_super) {
91316
91645
  this._rowIndex = rowIndex;
91317
91646
  if (value instanceof Date) {
91318
91647
  if (forcibly) {
91319
- this._textValue = value;
91320
- this._textValueComputed = value;
91321
- this.onTextChange();
91322
- this.createOrUpdateText();
91648
+ this.text.setValue(value, true);
91323
91649
  }
91324
91650
  else {
91325
91651
  this.text = value;
91326
91652
  }
91327
91653
  }
91328
91654
  else if (isNumber(value)) {
91329
- var textValueComputed = this._textValueComputed;
91330
- if (textValueComputed == null) {
91655
+ var text = this.text;
91656
+ var computed = text.computed;
91657
+ if (computed == null) {
91331
91658
  this.text = new Date(value);
91332
91659
  }
91333
- else if (textValueComputed.getTime() !== value) {
91334
- textValueComputed.setTime(value);
91335
- this.onTextChange();
91336
- this.createOrUpdateText();
91660
+ else if (computed.getTime() !== value) {
91661
+ computed.setTime(value);
91662
+ text.compute(true);
91337
91663
  }
91338
91664
  }
91339
91665
  DTableBodyCells.set(this, row, columnIndex, this._column);
@@ -92205,24 +92531,21 @@ var DTableBodyCellTime = /** @class */ (function (_super) {
92205
92531
  this._rowIndex = rowIndex;
92206
92532
  if (value instanceof Date) {
92207
92533
  if (forcibly) {
92208
- this._textValue = value;
92209
- this._textValueComputed = value;
92210
- this.onTextChange();
92211
- this.createOrUpdateText();
92534
+ this.text.setValue(value, true);
92212
92535
  }
92213
92536
  else {
92214
92537
  this.text = value;
92215
92538
  }
92216
92539
  }
92217
92540
  else if (isNumber(value)) {
92218
- var textValueComputed = this._textValueComputed;
92219
- if (textValueComputed == null) {
92541
+ var text = this.text;
92542
+ var computed = text.computed;
92543
+ if (computed == null) {
92220
92544
  this.text = new Date(value);
92221
92545
  }
92222
- else if (textValueComputed.getTime() !== value) {
92223
- textValueComputed.setTime(value);
92224
- this.onTextChange();
92225
- this.createOrUpdateText();
92546
+ else if (computed.getTime() !== value) {
92547
+ computed.setTime(value);
92548
+ text.compute(true);
92226
92549
  }
92227
92550
  }
92228
92551
  DTableBodyCells.set(this, row, columnIndex, this._column);