@wcardinal/wcardinal-ui 0.304.0 → 0.306.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 (74) hide show
  1. package/dist/types/wcardinal/ui/d-controller-focus-impl.d.ts +2 -1
  2. package/dist/types/wcardinal/ui/d-controller-focus.d.ts +2 -1
  3. package/dist/types/wcardinal/ui/d-controller-keyboard-impl.d.ts +11 -0
  4. package/dist/types/wcardinal/ui/d-controller-keyboard.d.ts +1 -7
  5. package/dist/types/wcardinal/ui/index.d.ts +1 -0
  6. package/dist/types/wcardinal/ui/shape/variant/e-shape-group-size-editor.d.ts +2 -2
  7. package/dist/types/wcardinal/ui/shape/variant/e-shape-group-size-shadowed.d.ts +2 -2
  8. package/dist/types/wcardinal/ui/shape/variant/e-shape-group-size-viewer.d.ts +2 -2
  9. package/dist/types/wcardinal/ui/shape/variant/e-shape-group-size.d.ts +2 -2
  10. package/dist/wcardinal/ui/d-controller-focus-impl.js +10 -3
  11. package/dist/wcardinal/ui/d-controller-focus-impl.js.map +1 -1
  12. package/dist/wcardinal/ui/d-controller-focus.js.map +1 -1
  13. package/dist/wcardinal/ui/d-controller-keyboard-impl.js +66 -0
  14. package/dist/wcardinal/ui/d-controller-keyboard-impl.js.map +1 -0
  15. package/dist/wcardinal/ui/d-controller-keyboard.js +1 -61
  16. package/dist/wcardinal/ui/d-controller-keyboard.js.map +1 -1
  17. package/dist/wcardinal/ui/d-controllers.js +2 -2
  18. package/dist/wcardinal/ui/d-controllers.js.map +1 -1
  19. package/dist/wcardinal/ui/index.js +1 -0
  20. package/dist/wcardinal/ui/index.js.map +1 -1
  21. package/dist/wcardinal/ui/shape/variant/e-shape-embedded-layer.js +8 -1
  22. package/dist/wcardinal/ui/shape/variant/e-shape-embedded-layer.js.map +1 -1
  23. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-editor.js +2 -1
  24. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-editor.js.map +1 -1
  25. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-shadowed.js +2 -2
  26. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-shadowed.js.map +1 -1
  27. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-viewer.js +2 -1
  28. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-viewer.js.map +1 -1
  29. package/dist/wcardinal/ui/shape/variant/e-shape-group-size.js.map +1 -1
  30. package/dist/wcardinal/ui/shape/variant/to-resized.js +80 -20
  31. package/dist/wcardinal/ui/shape/variant/to-resized.js.map +1 -1
  32. package/dist/wcardinal/ui/theme/dark/d-theme-dark-base.js +15 -9
  33. package/dist/wcardinal/ui/theme/dark/d-theme-dark-base.js.map +1 -1
  34. package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog-processing-message.js +0 -8
  35. package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog-processing-message.js.map +1 -1
  36. package/dist/wcardinal/ui/theme/dark/d-theme-dark-list-items.js +5 -5
  37. package/dist/wcardinal/ui/theme/dark/d-theme-dark-list-items.js.map +1 -1
  38. package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body-cells.js +2 -2
  39. package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body-cells.js.map +1 -1
  40. package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body-row.js +1 -1
  41. package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body-row.js.map +1 -1
  42. package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body.js +1 -1
  43. package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body.js.map +1 -1
  44. package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-header-cell.js +1 -1
  45. package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-header-cell.js.map +1 -1
  46. package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-header.js +2 -2
  47. package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-header.js.map +1 -1
  48. package/dist/wcardinal/ui/theme/white/d-theme-white-base.js +15 -9
  49. package/dist/wcardinal/ui/theme/white/d-theme-white-base.js.map +1 -1
  50. package/dist/wcardinal/ui/theme/white/d-theme-white-dialog-processing-message.js +0 -8
  51. package/dist/wcardinal/ui/theme/white/d-theme-white-dialog-processing-message.js.map +1 -1
  52. package/dist/wcardinal/ui/theme/white/d-theme-white-list-items.js +1 -1
  53. package/dist/wcardinal/ui/theme/white/d-theme-white-list-items.js.map +1 -1
  54. package/dist/wcardinal/ui/theme/white/d-theme-white-table-body-cells.js +2 -2
  55. package/dist/wcardinal/ui/theme/white/d-theme-white-table-body-cells.js.map +1 -1
  56. package/dist/wcardinal/ui/theme/white/d-theme-white-table-body-row.js +1 -1
  57. package/dist/wcardinal/ui/theme/white/d-theme-white-table-body-row.js.map +1 -1
  58. package/dist/wcardinal/ui/theme/white/d-theme-white-table-body.js +1 -1
  59. package/dist/wcardinal/ui/theme/white/d-theme-white-table-body.js.map +1 -1
  60. package/dist/wcardinal/ui/theme/white/d-theme-white-table-header-cell.js +1 -1
  61. package/dist/wcardinal/ui/theme/white/d-theme-white-table-header-cell.js.map +1 -1
  62. package/dist/wcardinal/ui/theme/white/d-theme-white-table-header.js +2 -2
  63. package/dist/wcardinal/ui/theme/white/d-theme-white-table-header.js.map +1 -1
  64. package/dist/wcardinal-ui-theme-dark.js +28 -30
  65. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  66. package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
  67. package/dist/wcardinal-ui-theme-white.js +24 -26
  68. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  69. package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
  70. package/dist/wcardinal-ui.cjs.js +160 -92
  71. package/dist/wcardinal-ui.js +110 -38
  72. package/dist/wcardinal-ui.min.js +2 -2
  73. package/dist/wcardinal-ui.min.js.map +1 -1
  74. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.304.0
2
+ Winter Cardinal UI v0.306.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -16434,7 +16434,7 @@
16434
16434
  this._isFittable = isFittable;
16435
16435
  }
16436
16436
  EShapeGroupSizeEditor.prototype.init = function () {
16437
- // DO NOTHING
16437
+ return this;
16438
16438
  };
16439
16439
  Object.defineProperty(EShapeGroupSizeEditor.prototype, "x", {
16440
16440
  get: function () {
@@ -16514,6 +16514,7 @@
16514
16514
  if (this._isFittable) {
16515
16515
  this.doFit();
16516
16516
  }
16517
+ return this;
16517
16518
  };
16518
16519
  EShapeGroupSizeEditor.prototype.doFit = function () {
16519
16520
  var parent = this._parent;
@@ -16684,6 +16685,7 @@
16684
16685
  EShapeGroupSizeViewer.prototype.init = function () {
16685
16686
  this._base.copyFrom(this);
16686
16687
  this.onChange();
16688
+ return this;
16687
16689
  };
16688
16690
  EShapeGroupSizeViewer.prototype.clone = function () {
16689
16691
  var base = this._base;
@@ -16726,7 +16728,7 @@
16726
16728
  return p.x === this._x && p.y === this._y;
16727
16729
  };
16728
16730
  EShapeGroupSizeViewer.prototype.fit = function () {
16729
- // DO NOTHING
16731
+ return this;
16730
16732
  };
16731
16733
  EShapeGroupSizeViewer.prototype.onChange = function () {
16732
16734
  var base = this._base;
@@ -21232,7 +21234,14 @@
21232
21234
  }
21233
21235
  result.onChildTransformChange();
21234
21236
  result.toDirty();
21235
- result.size.init();
21237
+ var size = this.size;
21238
+ if (size instanceof EShapeGroupSizeViewer) {
21239
+ var base = size.base;
21240
+ result.size.set(base.x, base.y).init().set(size.x, size.y);
21241
+ }
21242
+ else {
21243
+ result.size.init();
21244
+ }
21236
21245
  return result;
21237
21246
  };
21238
21247
  EShapeEmbeddedLayer.prototype.newClone = function () {
@@ -38458,7 +38467,7 @@
38458
38467
  this._size = new pixi_js.Point(x, y);
38459
38468
  }
38460
38469
  EShapeGroupSizeShadowed.prototype.init = function () {
38461
- // DO NOTHING
38470
+ return this;
38462
38471
  };
38463
38472
  Object.defineProperty(EShapeGroupSizeShadowed.prototype, "x", {
38464
38473
  get: function () {
@@ -38535,7 +38544,7 @@
38535
38544
  return this._size.equals(point);
38536
38545
  };
38537
38546
  EShapeGroupSizeShadowed.prototype.fit = function () {
38538
- // DO NOTHING
38547
+ return this;
38539
38548
  };
38540
38549
  EShapeGroupSizeShadowed.prototype.onChange = function (ox, oy) {
38541
38550
  this._parent.onSizeChange();
@@ -44274,46 +44283,104 @@
44274
44283
  * SPDX-License-Identifier: Apache-2.0
44275
44284
  */
44276
44285
  var toResized = function (shape, from, to, centerMode, isPerfect) {
44286
+ var cposition = EShapeCapabilities.contains(shape, EShapeCapability.POSITION);
44287
+ var cwidth = EShapeCapabilities.contains(shape, EShapeCapability.WIDTH);
44288
+ var cheight = EShapeCapabilities.contains(shape, EShapeCapability.HEIGHT);
44277
44289
  shape.disallowUploadedUpdate();
44278
44290
  var position = shape.transform.position;
44279
44291
  if (centerMode) {
44280
44292
  var dx = Math.abs(to.x - from.x);
44281
44293
  var dy = Math.abs(to.y - from.y);
44282
44294
  if (isPerfect) {
44283
- var hsize = Math.max(dx, dy);
44284
- var size = hsize + hsize;
44285
- shape.size.set(toSizeNormalized(size), toSizeNormalized(size));
44286
- position.set(toSizeRounded(from.x), toSizeRounded(from.y));
44295
+ var d = Math.max(dx, dy);
44296
+ var s = toSizeNormalized(d + d);
44297
+ var x = toSizeRounded(from.x);
44298
+ var y = toSizeRounded(from.y);
44299
+ var size = shape.size;
44300
+ if (cwidth && cheight) {
44301
+ size.set(s, s);
44302
+ }
44303
+ else if (cwidth) {
44304
+ size.x = s;
44305
+ }
44306
+ else if (cheight) {
44307
+ size.y = s;
44308
+ }
44309
+ if (cposition) {
44310
+ position.set(x, y);
44311
+ }
44287
44312
  }
44288
44313
  else {
44289
- shape.size.set(toSizeNormalized(dx + dx), toSizeNormalized(dy + dy));
44290
- position.set(toSizeRounded(from.x), toSizeRounded(from.y));
44314
+ var w = toSizeNormalized(dx + dx);
44315
+ var h = toSizeNormalized(dy + dy);
44316
+ var x = toSizeRounded(from.x);
44317
+ var y = toSizeRounded(from.y);
44318
+ var size = shape.size;
44319
+ if (cwidth && cheight) {
44320
+ size.set(w, h);
44321
+ }
44322
+ else if (cwidth) {
44323
+ size.x = w;
44324
+ }
44325
+ else if (cheight) {
44326
+ size.y = h;
44327
+ }
44328
+ if (cposition) {
44329
+ position.set(x, y);
44330
+ }
44291
44331
  }
44292
44332
  }
44293
44333
  else {
44294
44334
  if (isPerfect) {
44295
44335
  var dx = to.x - from.x;
44296
44336
  var dy = to.y - from.y;
44297
- var size = Math.max(Math.abs(dx), Math.abs(dy));
44298
- var x2 = from.x + (dx < 0 ? -size : +size);
44299
- var y2 = from.y + (dy < 0 ? -size : +size);
44300
- var hsize = size * 0.5;
44301
- var x = Math.min(from.x, x2) + hsize;
44302
- var y = Math.min(from.y, y2) + hsize;
44303
- shape.size.set(toSizeNormalized(size), toSizeNormalized(size));
44304
- position.set(toSizeRounded(x), toSizeRounded(y));
44337
+ var d = Math.max(Math.abs(dx), Math.abs(dy));
44338
+ var x2 = from.x + (dx < 0 ? -d : +d);
44339
+ var y2 = from.y + (dy < 0 ? -d : +d);
44340
+ var hd = d * 0.5;
44341
+ var s = toSizeNormalized(d);
44342
+ var x = toSizeRounded(Math.min(from.x, x2) + hd);
44343
+ var y = toSizeRounded(Math.min(from.y, y2) + hd);
44344
+ var size = shape.size;
44345
+ if (cwidth && cheight) {
44346
+ size.set(s, s);
44347
+ }
44348
+ else if (cwidth) {
44349
+ size.x = s;
44350
+ }
44351
+ else if (cheight) {
44352
+ size.y = s;
44353
+ }
44354
+ if (cposition) {
44355
+ position.set(x, y);
44356
+ }
44305
44357
  }
44306
44358
  else {
44307
44359
  var x0 = Math.min(from.x, to.x);
44308
44360
  var y0 = Math.min(from.y, to.y);
44309
44361
  var x1 = Math.max(from.x, to.x);
44310
44362
  var y1 = Math.max(from.y, to.y);
44311
- var width = x1 - x0;
44312
- var height = y1 - y0;
44313
- var px = width * 0.5;
44314
- var py = height * 0.5;
44315
- shape.size.set(toSizeNormalized(width), toSizeNormalized(height));
44316
- position.set(toSizeRounded(x0 + px), toSizeRounded(y0 + py));
44363
+ var dx = x1 - x0;
44364
+ var dy = y1 - y0;
44365
+ var px = dx * 0.5;
44366
+ var py = dy * 0.5;
44367
+ var w = toSizeNormalized(dx);
44368
+ var h = toSizeNormalized(dy);
44369
+ var x = toSizeRounded(x0 + px);
44370
+ var y = toSizeRounded(y0 + py);
44371
+ var size = shape.size;
44372
+ if (cwidth && cheight) {
44373
+ size.set(w, h);
44374
+ }
44375
+ else if (cwidth) {
44376
+ size.x = w;
44377
+ }
44378
+ else if (cheight) {
44379
+ size.y = h;
44380
+ }
44381
+ if (cposition) {
44382
+ position.set(x, y);
44383
+ }
44317
44384
  }
44318
44385
  }
44319
44386
  shape.allowUploadedUpdate();
@@ -47677,12 +47744,12 @@
47677
47744
  * Copyright (C) 2019 Toshiba Corporation
47678
47745
  * SPDX-License-Identifier: Apache-2.0
47679
47746
  */
47680
- var DControllerKeyboard = /** @class */ (function (_super) {
47681
- __extends(DControllerKeyboard, _super);
47682
- function DControllerKeyboard() {
47747
+ var DControllerKeyboardImpl = /** @class */ (function (_super) {
47748
+ __extends(DControllerKeyboardImpl, _super);
47749
+ function DControllerKeyboardImpl() {
47683
47750
  return _super !== null && _super.apply(this, arguments) || this;
47684
47751
  }
47685
- DControllerKeyboard.prototype.init = function (element, stage, focusController) {
47752
+ DControllerKeyboardImpl.prototype.init = function (element, stage, focusController) {
47686
47753
  var _this = this;
47687
47754
  element.addEventListener("keydown", function (e) {
47688
47755
  _this.emit("keydown", e);
@@ -47726,13 +47793,13 @@
47726
47793
  }
47727
47794
  });
47728
47795
  };
47729
- DControllerKeyboard.prototype.hasOnKeyDown = function (target) {
47796
+ DControllerKeyboardImpl.prototype.hasOnKeyDown = function (target) {
47730
47797
  return "onKeyDown" in target;
47731
47798
  };
47732
- DControllerKeyboard.prototype.hasOnKeyUp = function (target) {
47799
+ DControllerKeyboardImpl.prototype.hasOnKeyUp = function (target) {
47733
47800
  return "onKeyUp" in target;
47734
47801
  };
47735
- return DControllerKeyboard;
47802
+ return DControllerKeyboardImpl;
47736
47803
  }(pixi_js.utils.EventEmitter));
47737
47804
 
47738
47805
  /*
@@ -47745,7 +47812,7 @@
47745
47812
  // Keyboard
47746
47813
  DControllers.getKeyboardController = function () {
47747
47814
  if (this.KEYBOARD == null) {
47748
- this.KEYBOARD = new DControllerKeyboard();
47815
+ this.KEYBOARD = new DControllerKeyboardImpl();
47749
47816
  }
47750
47817
  return this.KEYBOARD;
47751
47818
  };
@@ -48071,9 +48138,12 @@
48071
48138
  * Copyright (C) 2019 Toshiba Corporation
48072
48139
  * SPDX-License-Identifier: Apache-2.0
48073
48140
  */
48074
- var DControllerFocusImpl = /** @class */ (function () {
48141
+ var DControllerFocusImpl = /** @class */ (function (_super) {
48142
+ __extends(DControllerFocusImpl, _super);
48075
48143
  function DControllerFocusImpl() {
48076
- this._focused = null;
48144
+ var _this = _super !== null && _super.apply(this, arguments) || this;
48145
+ _this._focused = null;
48146
+ return _this;
48077
48147
  }
48078
48148
  DControllerFocusImpl.prototype.focus = function (focusable) {
48079
48149
  var previous = this._focused;
@@ -48085,6 +48155,7 @@
48085
48155
  if (this.isFocusable(focusable)) {
48086
48156
  focusable.state.isFocused = true;
48087
48157
  }
48158
+ this.emit("change", focusable, previous, this);
48088
48159
  return previous;
48089
48160
  }
48090
48161
  return null;
@@ -48093,6 +48164,7 @@
48093
48164
  if (focusable != null && this._focused === focusable) {
48094
48165
  this._focused = null;
48095
48166
  focusable.state.isFocused = false;
48167
+ this.emit("change", null, focusable, this);
48096
48168
  return focusable;
48097
48169
  }
48098
48170
  return null;
@@ -48319,7 +48391,7 @@
48319
48391
  return target != null && "state" in target && target.state.isFocusReverse;
48320
48392
  };
48321
48393
  return DControllerFocusImpl;
48322
- }());
48394
+ }(pixi_js.utils.EventEmitter));
48323
48395
 
48324
48396
  /*
48325
48397
  * Copyright (C) 2019 Toshiba Corporation
@@ -74061,7 +74133,7 @@
74061
74133
  DContent: DContent,
74062
74134
  DControllerCommandImpl: DControllerCommandImpl,
74063
74135
  DControllerFocusImpl: DControllerFocusImpl,
74064
- DControllerKeyboard: DControllerKeyboard,
74136
+ DControllerKeyboardImpl: DControllerKeyboardImpl,
74065
74137
  DControllers: DControllers,
74066
74138
  DCornerMask: DCornerMask,
74067
74139
  DDiagramBaseControllerOpenType: DDiagramBaseControllerOpenType,