@wcardinal/wcardinal-ui 0.294.0 → 0.295.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/wcardinal/ui/d-table-data-tree-item-accessor.d.ts +9 -4
- package/dist/types/wcardinal/ui/d-table-data-tree-selection-impl.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-table-data-tree.d.ts +2 -2
- package/dist/wcardinal/ui/d-table-data-tree-filter.js +12 -8
- package/dist/wcardinal/ui/d-table-data-tree-filter.js.map +1 -1
- package/dist/wcardinal/ui/d-table-data-tree-item-accessor.js +13 -3
- package/dist/wcardinal/ui/d-table-data-tree-item-accessor.js.map +1 -1
- package/dist/wcardinal/ui/d-table-data-tree-selection-impl.js +7 -5
- package/dist/wcardinal/ui/d-table-data-tree-selection-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-table-data-tree.js +5 -4
- package/dist/wcardinal/ui/d-table-data-tree.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +38 -21
- package/dist/wcardinal-ui.js +38 -21
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.295.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -87882,43 +87882,47 @@ var DTableDataTreeFilter = /** @class */ (function (_super) {
|
|
|
87882
87882
|
}
|
|
87883
87883
|
};
|
|
87884
87884
|
DTableDataTreeFilter.prototype.hasFiltered = function (parent, nodes, filter) {
|
|
87885
|
-
var
|
|
87885
|
+
var accessor = this._parent.accessor;
|
|
87886
|
+
var toChildren = accessor.toChildren;
|
|
87887
|
+
var hasChildren = accessor.hasChildren;
|
|
87886
87888
|
for (var i = 0, imax = nodes.length; i < imax; ++i) {
|
|
87887
87889
|
var node = nodes[i];
|
|
87888
87890
|
if (this.isFiltered(node, -1, filter)) {
|
|
87889
87891
|
return true;
|
|
87890
87892
|
}
|
|
87891
87893
|
var children = toChildren(node);
|
|
87892
|
-
if (children
|
|
87893
|
-
0 < children.length &&
|
|
87894
|
-
this.hasFiltered(parent, children, filter)) {
|
|
87894
|
+
if (hasChildren(node, children) && this.hasFiltered(parent, children, filter)) {
|
|
87895
87895
|
return true;
|
|
87896
87896
|
}
|
|
87897
87897
|
}
|
|
87898
87898
|
return false;
|
|
87899
87899
|
};
|
|
87900
87900
|
DTableDataTreeFilter.prototype.addAllToFiltered = function (parent, nodes, filtered, cursor) {
|
|
87901
|
-
var
|
|
87901
|
+
var accessor = this._parent.accessor;
|
|
87902
|
+
var toChildren = accessor.toChildren;
|
|
87903
|
+
var hasChildren = accessor.hasChildren;
|
|
87902
87904
|
for (var i = 0, imax = nodes.length; i < imax; ++i) {
|
|
87903
87905
|
var node = nodes[i];
|
|
87904
87906
|
filtered.push(cursor[0]);
|
|
87905
87907
|
cursor[0] += 1;
|
|
87906
87908
|
var children = toChildren(node);
|
|
87907
|
-
if (
|
|
87909
|
+
if (hasChildren(node, children) && parent.isOpened(node)) {
|
|
87908
87910
|
this.addAllToFiltered(parent, children, filtered, cursor);
|
|
87909
87911
|
}
|
|
87910
87912
|
}
|
|
87911
87913
|
};
|
|
87912
87914
|
DTableDataTreeFilter.prototype.newFilteredSub = function (parent, nodes, filter, filtered, cursor) {
|
|
87913
87915
|
var result = false;
|
|
87914
|
-
var
|
|
87916
|
+
var accessor = this._parent.accessor;
|
|
87917
|
+
var toChildren = accessor.toChildren;
|
|
87918
|
+
var hasChildren = accessor.hasChildren;
|
|
87915
87919
|
for (var i = 0, imax = nodes.length; i < imax; ++i) {
|
|
87916
87920
|
var node = nodes[i];
|
|
87917
87921
|
var index = cursor[0];
|
|
87918
87922
|
cursor[0] += 1;
|
|
87919
87923
|
var isFiltered = this.isFiltered(node, index, filter);
|
|
87920
87924
|
var children = toChildren(node);
|
|
87921
|
-
if (
|
|
87925
|
+
if (hasChildren(node, children)) {
|
|
87922
87926
|
if (parent.isOpened(node)) {
|
|
87923
87927
|
if (isFiltered) {
|
|
87924
87928
|
filtered.push(index);
|
|
@@ -88026,11 +88030,21 @@ var toParent = function (node) {
|
|
|
88026
88030
|
var toChildren$1 = function (node) {
|
|
88027
88031
|
return node.children;
|
|
88028
88032
|
};
|
|
88033
|
+
var hasChildren = function (node, children) {
|
|
88034
|
+
return children != null && 0 < children.length;
|
|
88035
|
+
};
|
|
88029
88036
|
var DTableDataTreeItemAccessor = /** @class */ (function () {
|
|
88030
88037
|
function DTableDataTreeItemAccessor(options) {
|
|
88031
|
-
|
|
88032
|
-
|
|
88033
|
-
|
|
88038
|
+
if (options != null) {
|
|
88039
|
+
this.toParent = options.toParent || toParent;
|
|
88040
|
+
this.toChildren = options.toChildren || toChildren$1;
|
|
88041
|
+
this.hasChildren = options.hasChildren || hasChildren;
|
|
88042
|
+
}
|
|
88043
|
+
else {
|
|
88044
|
+
this.toParent = toParent;
|
|
88045
|
+
this.toChildren = toChildren$1;
|
|
88046
|
+
this.hasChildren = hasChildren;
|
|
88047
|
+
}
|
|
88034
88048
|
}
|
|
88035
88049
|
return DTableDataTreeItemAccessor;
|
|
88036
88050
|
}());
|
|
@@ -88072,9 +88086,11 @@ var DTableDataTreeSelectionImpl = /** @class */ (function (_super) {
|
|
|
88072
88086
|
});
|
|
88073
88087
|
DTableDataTreeSelectionImpl.prototype.onNodeChange = function (nodes) {
|
|
88074
88088
|
if (nodes != null) {
|
|
88075
|
-
var
|
|
88089
|
+
var accessor = this._parent.accessor;
|
|
88090
|
+
var toChildren = accessor.toChildren;
|
|
88091
|
+
var hasChildren = accessor.hasChildren;
|
|
88076
88092
|
var oldRows = this._rows;
|
|
88077
|
-
var newRows = this.newRows(nodes, toChildren, oldRows, new Set());
|
|
88093
|
+
var newRows = this.newRows(nodes, toChildren, hasChildren, oldRows, new Set());
|
|
88078
88094
|
if (oldRows.size !== newRows.size) {
|
|
88079
88095
|
this._rows = newRows;
|
|
88080
88096
|
this.onChange();
|
|
@@ -88088,15 +88104,15 @@ var DTableDataTreeSelectionImpl = /** @class */ (function (_super) {
|
|
|
88088
88104
|
}
|
|
88089
88105
|
}
|
|
88090
88106
|
};
|
|
88091
|
-
DTableDataTreeSelectionImpl.prototype.newRows = function (nodes, toChildren, rows, result) {
|
|
88107
|
+
DTableDataTreeSelectionImpl.prototype.newRows = function (nodes, toChildren, hasChildren, rows, result) {
|
|
88092
88108
|
for (var i = 0, imax = nodes.length; i < imax; ++i) {
|
|
88093
88109
|
var node = nodes[i];
|
|
88094
88110
|
if (rows.has(node)) {
|
|
88095
88111
|
result.add(node);
|
|
88096
88112
|
}
|
|
88097
88113
|
var children = toChildren(node);
|
|
88098
|
-
if (children
|
|
88099
|
-
this.newRows(children, toChildren, rows, result);
|
|
88114
|
+
if (hasChildren(node, children)) {
|
|
88115
|
+
this.newRows(children, toChildren, hasChildren, rows, result);
|
|
88100
88116
|
}
|
|
88101
88117
|
}
|
|
88102
88118
|
return result;
|
|
@@ -88535,7 +88551,8 @@ var DTableDataTree = /** @class */ (function (_super) {
|
|
|
88535
88551
|
var supplimentals = this._supplimentals;
|
|
88536
88552
|
var flags = this._flags;
|
|
88537
88553
|
if (nodes != null) {
|
|
88538
|
-
var
|
|
88554
|
+
var accessor = this._accessor;
|
|
88555
|
+
var irows = this.newRows(nodes, 0, 0, rows, supplimentals, flags, this._reverse, accessor.toChildren, accessor.hasChildren);
|
|
88539
88556
|
if (irows !== rows.length) {
|
|
88540
88557
|
rows.length = irows;
|
|
88541
88558
|
supplimentals.length = irows;
|
|
@@ -88549,7 +88566,7 @@ var DTableDataTree = /** @class */ (function (_super) {
|
|
|
88549
88566
|
DTableDataTree.prototype.toSupplimental = function (ilevel, hasChildren, isOpened) {
|
|
88550
88567
|
return (ilevel << 2) | (hasChildren ? 2 : 0) | (isOpened ? 1 : 0);
|
|
88551
88568
|
};
|
|
88552
|
-
DTableDataTree.prototype.newRows = function (nodes, irows, ilevel, rows, supplimentals, flags, reverse, toChildren) {
|
|
88569
|
+
DTableDataTree.prototype.newRows = function (nodes, irows, ilevel, rows, supplimentals, flags, reverse, toChildren, hasChildren) {
|
|
88553
88570
|
var nodesLength = nodes.length;
|
|
88554
88571
|
var istart = reverse ? nodesLength - 1 : 0;
|
|
88555
88572
|
var idelta = reverse ? -1 : +1;
|
|
@@ -88557,7 +88574,7 @@ var DTableDataTree = /** @class */ (function (_super) {
|
|
|
88557
88574
|
var node = nodes[i];
|
|
88558
88575
|
var children = toChildren(node);
|
|
88559
88576
|
var isOpened = flags.has(node);
|
|
88560
|
-
var supplimental = this.toSupplimental(ilevel,
|
|
88577
|
+
var supplimental = this.toSupplimental(ilevel, hasChildren(node, children), isOpened);
|
|
88561
88578
|
if (irows < rows.length) {
|
|
88562
88579
|
rows[irows] = node;
|
|
88563
88580
|
supplimentals[irows] = supplimental;
|
|
@@ -88568,7 +88585,7 @@ var DTableDataTree = /** @class */ (function (_super) {
|
|
|
88568
88585
|
}
|
|
88569
88586
|
irows += 1;
|
|
88570
88587
|
if (isOpened && children) {
|
|
88571
|
-
irows = this.newRows(children, irows, ilevel + 1, rows, supplimentals, flags, reverse, toChildren);
|
|
88588
|
+
irows = this.newRows(children, irows, ilevel + 1, rows, supplimentals, flags, reverse, toChildren, hasChildren);
|
|
88572
88589
|
}
|
|
88573
88590
|
}
|
|
88574
88591
|
return irows;
|
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.295.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -69661,43 +69661,47 @@
|
|
|
69661
69661
|
}
|
|
69662
69662
|
};
|
|
69663
69663
|
DTableDataTreeFilter.prototype.hasFiltered = function (parent, nodes, filter) {
|
|
69664
|
-
var
|
|
69664
|
+
var accessor = this._parent.accessor;
|
|
69665
|
+
var toChildren = accessor.toChildren;
|
|
69666
|
+
var hasChildren = accessor.hasChildren;
|
|
69665
69667
|
for (var i = 0, imax = nodes.length; i < imax; ++i) {
|
|
69666
69668
|
var node = nodes[i];
|
|
69667
69669
|
if (this.isFiltered(node, -1, filter)) {
|
|
69668
69670
|
return true;
|
|
69669
69671
|
}
|
|
69670
69672
|
var children = toChildren(node);
|
|
69671
|
-
if (children
|
|
69672
|
-
0 < children.length &&
|
|
69673
|
-
this.hasFiltered(parent, children, filter)) {
|
|
69673
|
+
if (hasChildren(node, children) && this.hasFiltered(parent, children, filter)) {
|
|
69674
69674
|
return true;
|
|
69675
69675
|
}
|
|
69676
69676
|
}
|
|
69677
69677
|
return false;
|
|
69678
69678
|
};
|
|
69679
69679
|
DTableDataTreeFilter.prototype.addAllToFiltered = function (parent, nodes, filtered, cursor) {
|
|
69680
|
-
var
|
|
69680
|
+
var accessor = this._parent.accessor;
|
|
69681
|
+
var toChildren = accessor.toChildren;
|
|
69682
|
+
var hasChildren = accessor.hasChildren;
|
|
69681
69683
|
for (var i = 0, imax = nodes.length; i < imax; ++i) {
|
|
69682
69684
|
var node = nodes[i];
|
|
69683
69685
|
filtered.push(cursor[0]);
|
|
69684
69686
|
cursor[0] += 1;
|
|
69685
69687
|
var children = toChildren(node);
|
|
69686
|
-
if (
|
|
69688
|
+
if (hasChildren(node, children) && parent.isOpened(node)) {
|
|
69687
69689
|
this.addAllToFiltered(parent, children, filtered, cursor);
|
|
69688
69690
|
}
|
|
69689
69691
|
}
|
|
69690
69692
|
};
|
|
69691
69693
|
DTableDataTreeFilter.prototype.newFilteredSub = function (parent, nodes, filter, filtered, cursor) {
|
|
69692
69694
|
var result = false;
|
|
69693
|
-
var
|
|
69695
|
+
var accessor = this._parent.accessor;
|
|
69696
|
+
var toChildren = accessor.toChildren;
|
|
69697
|
+
var hasChildren = accessor.hasChildren;
|
|
69694
69698
|
for (var i = 0, imax = nodes.length; i < imax; ++i) {
|
|
69695
69699
|
var node = nodes[i];
|
|
69696
69700
|
var index = cursor[0];
|
|
69697
69701
|
cursor[0] += 1;
|
|
69698
69702
|
var isFiltered = this.isFiltered(node, index, filter);
|
|
69699
69703
|
var children = toChildren(node);
|
|
69700
|
-
if (
|
|
69704
|
+
if (hasChildren(node, children)) {
|
|
69701
69705
|
if (parent.isOpened(node)) {
|
|
69702
69706
|
if (isFiltered) {
|
|
69703
69707
|
filtered.push(index);
|
|
@@ -69805,11 +69809,21 @@
|
|
|
69805
69809
|
var toChildren$1 = function (node) {
|
|
69806
69810
|
return node.children;
|
|
69807
69811
|
};
|
|
69812
|
+
var hasChildren = function (node, children) {
|
|
69813
|
+
return children != null && 0 < children.length;
|
|
69814
|
+
};
|
|
69808
69815
|
var DTableDataTreeItemAccessor = /** @class */ (function () {
|
|
69809
69816
|
function DTableDataTreeItemAccessor(options) {
|
|
69810
|
-
|
|
69811
|
-
|
|
69812
|
-
|
|
69817
|
+
if (options != null) {
|
|
69818
|
+
this.toParent = options.toParent || toParent;
|
|
69819
|
+
this.toChildren = options.toChildren || toChildren$1;
|
|
69820
|
+
this.hasChildren = options.hasChildren || hasChildren;
|
|
69821
|
+
}
|
|
69822
|
+
else {
|
|
69823
|
+
this.toParent = toParent;
|
|
69824
|
+
this.toChildren = toChildren$1;
|
|
69825
|
+
this.hasChildren = hasChildren;
|
|
69826
|
+
}
|
|
69813
69827
|
}
|
|
69814
69828
|
return DTableDataTreeItemAccessor;
|
|
69815
69829
|
}());
|
|
@@ -69851,9 +69865,11 @@
|
|
|
69851
69865
|
});
|
|
69852
69866
|
DTableDataTreeSelectionImpl.prototype.onNodeChange = function (nodes) {
|
|
69853
69867
|
if (nodes != null) {
|
|
69854
|
-
var
|
|
69868
|
+
var accessor = this._parent.accessor;
|
|
69869
|
+
var toChildren = accessor.toChildren;
|
|
69870
|
+
var hasChildren = accessor.hasChildren;
|
|
69855
69871
|
var oldRows = this._rows;
|
|
69856
|
-
var newRows = this.newRows(nodes, toChildren, oldRows, new Set());
|
|
69872
|
+
var newRows = this.newRows(nodes, toChildren, hasChildren, oldRows, new Set());
|
|
69857
69873
|
if (oldRows.size !== newRows.size) {
|
|
69858
69874
|
this._rows = newRows;
|
|
69859
69875
|
this.onChange();
|
|
@@ -69867,15 +69883,15 @@
|
|
|
69867
69883
|
}
|
|
69868
69884
|
}
|
|
69869
69885
|
};
|
|
69870
|
-
DTableDataTreeSelectionImpl.prototype.newRows = function (nodes, toChildren, rows, result) {
|
|
69886
|
+
DTableDataTreeSelectionImpl.prototype.newRows = function (nodes, toChildren, hasChildren, rows, result) {
|
|
69871
69887
|
for (var i = 0, imax = nodes.length; i < imax; ++i) {
|
|
69872
69888
|
var node = nodes[i];
|
|
69873
69889
|
if (rows.has(node)) {
|
|
69874
69890
|
result.add(node);
|
|
69875
69891
|
}
|
|
69876
69892
|
var children = toChildren(node);
|
|
69877
|
-
if (children
|
|
69878
|
-
this.newRows(children, toChildren, rows, result);
|
|
69893
|
+
if (hasChildren(node, children)) {
|
|
69894
|
+
this.newRows(children, toChildren, hasChildren, rows, result);
|
|
69879
69895
|
}
|
|
69880
69896
|
}
|
|
69881
69897
|
return result;
|
|
@@ -70314,7 +70330,8 @@
|
|
|
70314
70330
|
var supplimentals = this._supplimentals;
|
|
70315
70331
|
var flags = this._flags;
|
|
70316
70332
|
if (nodes != null) {
|
|
70317
|
-
var
|
|
70333
|
+
var accessor = this._accessor;
|
|
70334
|
+
var irows = this.newRows(nodes, 0, 0, rows, supplimentals, flags, this._reverse, accessor.toChildren, accessor.hasChildren);
|
|
70318
70335
|
if (irows !== rows.length) {
|
|
70319
70336
|
rows.length = irows;
|
|
70320
70337
|
supplimentals.length = irows;
|
|
@@ -70328,7 +70345,7 @@
|
|
|
70328
70345
|
DTableDataTree.prototype.toSupplimental = function (ilevel, hasChildren, isOpened) {
|
|
70329
70346
|
return (ilevel << 2) | (hasChildren ? 2 : 0) | (isOpened ? 1 : 0);
|
|
70330
70347
|
};
|
|
70331
|
-
DTableDataTree.prototype.newRows = function (nodes, irows, ilevel, rows, supplimentals, flags, reverse, toChildren) {
|
|
70348
|
+
DTableDataTree.prototype.newRows = function (nodes, irows, ilevel, rows, supplimentals, flags, reverse, toChildren, hasChildren) {
|
|
70332
70349
|
var nodesLength = nodes.length;
|
|
70333
70350
|
var istart = reverse ? nodesLength - 1 : 0;
|
|
70334
70351
|
var idelta = reverse ? -1 : +1;
|
|
@@ -70336,7 +70353,7 @@
|
|
|
70336
70353
|
var node = nodes[i];
|
|
70337
70354
|
var children = toChildren(node);
|
|
70338
70355
|
var isOpened = flags.has(node);
|
|
70339
|
-
var supplimental = this.toSupplimental(ilevel,
|
|
70356
|
+
var supplimental = this.toSupplimental(ilevel, hasChildren(node, children), isOpened);
|
|
70340
70357
|
if (irows < rows.length) {
|
|
70341
70358
|
rows[irows] = node;
|
|
70342
70359
|
supplimentals[irows] = supplimental;
|
|
@@ -70347,7 +70364,7 @@
|
|
|
70347
70364
|
}
|
|
70348
70365
|
irows += 1;
|
|
70349
70366
|
if (isOpened && children) {
|
|
70350
|
-
irows = this.newRows(children, irows, ilevel + 1, rows, supplimentals, flags, reverse, toChildren);
|
|
70367
|
+
irows = this.newRows(children, irows, ilevel + 1, rows, supplimentals, flags, reverse, toChildren, hasChildren);
|
|
70351
70368
|
}
|
|
70352
70369
|
}
|
|
70353
70370
|
return irows;
|