@wcardinal/wcardinal-ui 0.284.0 → 0.286.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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.284.0
2
+ Winter Cardinal UI v0.286.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -12793,17 +12793,44 @@
12793
12793
  var keyExpression = void 0;
12794
12794
  var event_1;
12795
12795
  if (0 <= arrowIndex) {
12796
- keyExpression = expression.substring(0, arrowIndex).trim();
12796
+ keyExpression = expression.substring(0, arrowIndex).trim().toLowerCase();
12797
12797
  event_1 = expression.substring(arrowIndex + 2).trim();
12798
12798
  }
12799
12799
  else {
12800
- keyExpression = expression.trim();
12800
+ keyExpression = expression.trim().toLowerCase();
12801
+ }
12802
+ var alt = false;
12803
+ var ctrl = false;
12804
+ var shift = false;
12805
+ var key = "a";
12806
+ var length_1 = keyExpression.length;
12807
+ var i = 0;
12808
+ var j = 1;
12809
+ for (; j < length_1; ++j) {
12810
+ var c = keyExpression.charAt(j);
12811
+ if (c === "+") {
12812
+ var part = keyExpression.substring(i, j);
12813
+ switch (part) {
12814
+ case "alt":
12815
+ alt = true;
12816
+ break;
12817
+ case "ctrl":
12818
+ ctrl = true;
12819
+ break;
12820
+ case "shift":
12821
+ shift = true;
12822
+ break;
12823
+ default:
12824
+ key = part;
12825
+ break;
12826
+ }
12827
+ j += 1;
12828
+ i = j;
12829
+ }
12830
+ }
12831
+ if (i !== j) {
12832
+ key = keyExpression.substring(i, j);
12801
12833
  }
12802
- var keys = keyExpression.toLowerCase().split("+");
12803
- var alt = 0 <= keys.indexOf("alt");
12804
- var ctrl = 0 <= keys.indexOf("ctrl");
12805
- var shift = 0 <= keys.indexOf("shift");
12806
- var key = keys[keys.length - 1];
12807
12834
  return setShortcutKeyAndWhich({
12808
12835
  alt: alt,
12809
12836
  ctrl: ctrl,
@@ -67174,7 +67201,18 @@
67174
67201
  }
67175
67202
  var data = body.data;
67176
67203
  if (data && data.toggle) {
67177
- data.toggle(row);
67204
+ if (data.isExpanded(row)) {
67205
+ if (data.collapse(row)) {
67206
+ this.emit("collapse", this);
67207
+ data.emit("collapse", row, this);
67208
+ }
67209
+ }
67210
+ else {
67211
+ if (data.expand(row)) {
67212
+ this.emit("expand", this);
67213
+ data.emit("expand", row, this);
67214
+ }
67215
+ }
67178
67216
  }
67179
67217
  };
67180
67218
  DTableBodyCellInputTree.prototype.onRowSelect = function (e, local) {
@@ -67605,7 +67643,18 @@
67605
67643
  }
67606
67644
  var data = body.data;
67607
67645
  if (data && data.toggle) {
67608
- data.toggle(row);
67646
+ if (data.isExpanded(row)) {
67647
+ if (data.collapse(row)) {
67648
+ this.emit("collapse", this);
67649
+ data.emit("collapse", row, this);
67650
+ }
67651
+ }
67652
+ else {
67653
+ if (data.expand(row)) {
67654
+ this.emit("expand", this);
67655
+ data.emit("expand", row, this);
67656
+ }
67657
+ }
67609
67658
  }
67610
67659
  };
67611
67660
  DTableBodyCellTree.prototype.onRowSelect = function (e, local) {
@@ -70196,7 +70245,6 @@
70196
70245
  this._isRowsDirty = true;
70197
70246
  this._filter.toDirty();
70198
70247
  this.update(true);
70199
- this.emit("expand", node, this);
70200
70248
  return true;
70201
70249
  }
70202
70250
  return false;
@@ -70208,7 +70256,6 @@
70208
70256
  this._isRowsDirty = true;
70209
70257
  this._filter.toDirty();
70210
70258
  this.update(true);
70211
- this.emit("collapse", node, this);
70212
70259
  return true;
70213
70260
  }
70214
70261
  return false;