@wcardinal/wcardinal-ui 0.358.0 → 0.361.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-diagram-canvas-base.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-diagram-serialized.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-dialog-select.d.ts +10 -10
- package/dist/types/wcardinal/ui/util/index.d.ts +1 -0
- package/dist/types/wcardinal/ui/util/to-label-with.d.ts +1 -0
- package/dist/wcardinal/ui/d-diagram-canvas-base.js +2 -2
- package/dist/wcardinal/ui/d-diagram-canvas-base.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-serialized.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-select.js +28 -14
- package/dist/wcardinal/ui/d-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/d-select.js +4 -10
- package/dist/wcardinal/ui/d-select.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.js +2 -2
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-dialog-select.js +2 -2
- package/dist/wcardinal/ui/theme/white/d-theme-white-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/util/index.js +1 -0
- package/dist/wcardinal/ui/util/index.js.map +1 -1
- package/dist/wcardinal/ui/util/to-label-with.js +27 -0
- package/dist/wcardinal/ui/util/to-label-with.js.map +1 -0
- package/dist/wcardinal/ui/util/to-label.js +2 -20
- package/dist/wcardinal/ui/util/to-label.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +4 -2
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +4 -2
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
- package/dist/wcardinal-ui.cjs.js +47 -31
- package/dist/wcardinal-ui.js +45 -29
- 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.361.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -49492,7 +49492,7 @@ var loadThemeWhiteButtonSecondary = function () {
|
|
|
49492
49492
|
* Copyright (C) 2019 Toshiba Corporation
|
|
49493
49493
|
* SPDX-License-Identifier: Apache-2.0
|
|
49494
49494
|
*/
|
|
49495
|
-
var
|
|
49495
|
+
var toLabelWith = function (target, def) {
|
|
49496
49496
|
if (target != null) {
|
|
49497
49497
|
if (isString(target)) {
|
|
49498
49498
|
return target;
|
|
@@ -49510,7 +49510,15 @@ var toLabel$1 = function (target) {
|
|
|
49510
49510
|
return target.id;
|
|
49511
49511
|
}
|
|
49512
49512
|
}
|
|
49513
|
-
return
|
|
49513
|
+
return def;
|
|
49514
|
+
};
|
|
49515
|
+
|
|
49516
|
+
/*
|
|
49517
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
49518
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
49519
|
+
*/
|
|
49520
|
+
var toLabel$1 = function (target) {
|
|
49521
|
+
return toLabelWith(target, "");
|
|
49514
49522
|
};
|
|
49515
49523
|
|
|
49516
49524
|
/*
|
|
@@ -49578,7 +49586,7 @@ var DThemeWhiteDialogSelect = /** @class */ (function (_super) {
|
|
|
49578
49586
|
return toId(category);
|
|
49579
49587
|
};
|
|
49580
49588
|
DThemeWhiteDialogSelect.prototype.toCategoryLabel = function (category) {
|
|
49581
|
-
return
|
|
49589
|
+
return toLabelWith(category, "All");
|
|
49582
49590
|
};
|
|
49583
49591
|
return DThemeWhiteDialogSelect;
|
|
49584
49592
|
}(DThemeWhiteDialogLayered));
|
|
@@ -58881,7 +58889,7 @@ var DThemeDarkDialogSelect = /** @class */ (function (_super) {
|
|
|
58881
58889
|
return toId(category);
|
|
58882
58890
|
};
|
|
58883
58891
|
DThemeDarkDialogSelect.prototype.toCategoryLabel = function (category) {
|
|
58884
|
-
return
|
|
58892
|
+
return toLabelWith(category, "All");
|
|
58885
58893
|
};
|
|
58886
58894
|
return DThemeDarkDialogSelect;
|
|
58887
58895
|
}(DThemeDarkDialogLayered));
|
|
@@ -69311,16 +69319,10 @@ var DSelect = /** @class */ (function (_super) {
|
|
|
69311
69319
|
_super.prototype.onMenuReplaced.call(this, newMenu, oldMenu);
|
|
69312
69320
|
// Update the value
|
|
69313
69321
|
var value = this._value;
|
|
69314
|
-
|
|
69315
|
-
|
|
69316
|
-
|
|
69317
|
-
|
|
69318
|
-
this.text = item;
|
|
69319
|
-
}
|
|
69320
|
-
else {
|
|
69321
|
-
this._value = null;
|
|
69322
|
-
this.text = null;
|
|
69323
|
-
}
|
|
69322
|
+
var item = this.findMenuItem(newMenu, value);
|
|
69323
|
+
if (item != null) {
|
|
69324
|
+
this._value = value;
|
|
69325
|
+
this.text = item;
|
|
69324
69326
|
}
|
|
69325
69327
|
else {
|
|
69326
69328
|
this._value = null;
|
|
@@ -74278,6 +74280,9 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
74278
74280
|
if (result.width === undefined && result.weight === undefined) {
|
|
74279
74281
|
result.width = 140;
|
|
74280
74282
|
}
|
|
74283
|
+
if (result.state === undefined) {
|
|
74284
|
+
result.state = DBaseState.DISABLED;
|
|
74285
|
+
}
|
|
74281
74286
|
return result;
|
|
74282
74287
|
};
|
|
74283
74288
|
DDialogSelect.prototype.onSelectCategoryChange = function (categoryId) {
|
|
@@ -74516,9 +74521,7 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
74516
74521
|
this.onCategoryFetched(selectCategory, categoriesOrPromise);
|
|
74517
74522
|
}
|
|
74518
74523
|
else {
|
|
74519
|
-
selectCategory.state.isEnabled = false;
|
|
74520
74524
|
categoriesOrPromise.then(function (categories) {
|
|
74521
|
-
selectCategory.state.isEnabled = true;
|
|
74522
74525
|
_this.onCategoryFetched(selectCategory, categories);
|
|
74523
74526
|
});
|
|
74524
74527
|
}
|
|
@@ -74533,12 +74536,20 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
74533
74536
|
};
|
|
74534
74537
|
DDialogSelect.prototype.onCategoryFetched = function (selectCategory, categories) {
|
|
74535
74538
|
var items = [];
|
|
74539
|
+
var toId = this.newToCategoryId();
|
|
74540
|
+
var toLabel = this.newToCategoryLabel();
|
|
74541
|
+
items.push({
|
|
74542
|
+
value: null,
|
|
74543
|
+
text: {
|
|
74544
|
+
value: toLabel(null)
|
|
74545
|
+
}
|
|
74546
|
+
});
|
|
74536
74547
|
for (var i = 0, imax = categories.length; i < imax; ++i) {
|
|
74537
74548
|
var category = categories[i];
|
|
74538
74549
|
items.push({
|
|
74539
|
-
value:
|
|
74550
|
+
value: toId(category),
|
|
74540
74551
|
text: {
|
|
74541
|
-
value:
|
|
74552
|
+
value: toLabel(category)
|
|
74542
74553
|
}
|
|
74543
74554
|
});
|
|
74544
74555
|
}
|
|
@@ -74546,36 +74557,40 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
74546
74557
|
fit: true,
|
|
74547
74558
|
items: items
|
|
74548
74559
|
});
|
|
74549
|
-
|
|
74550
|
-
|
|
74551
|
-
selectCategory.show();
|
|
74552
|
-
this.search.create([this.input.value, newValue]);
|
|
74560
|
+
selectCategory.state.isEnabled = true;
|
|
74561
|
+
this.search.create([this.input.value, null]);
|
|
74553
74562
|
};
|
|
74554
|
-
DDialogSelect.prototype.
|
|
74563
|
+
DDialogSelect.prototype.newToCategoryId = function () {
|
|
74555
74564
|
var options = this._options;
|
|
74556
74565
|
if (options != null) {
|
|
74557
74566
|
var category = options.category;
|
|
74558
74567
|
if (category != null) {
|
|
74559
74568
|
var toId = category.toId;
|
|
74560
74569
|
if (toId != null) {
|
|
74561
|
-
return toId
|
|
74570
|
+
return toId;
|
|
74562
74571
|
}
|
|
74563
74572
|
}
|
|
74564
74573
|
}
|
|
74565
|
-
|
|
74574
|
+
var theme = this.theme;
|
|
74575
|
+
return function (category) {
|
|
74576
|
+
return theme.toCategoryId(category);
|
|
74577
|
+
};
|
|
74566
74578
|
};
|
|
74567
|
-
DDialogSelect.prototype.
|
|
74579
|
+
DDialogSelect.prototype.newToCategoryLabel = function () {
|
|
74568
74580
|
var options = this._options;
|
|
74569
74581
|
if (options != null) {
|
|
74570
74582
|
var category = options.category;
|
|
74571
74583
|
if (category != null) {
|
|
74572
74584
|
var toLabel = category.toLabel;
|
|
74573
74585
|
if (toLabel != null) {
|
|
74574
|
-
return toLabel
|
|
74586
|
+
return toLabel;
|
|
74575
74587
|
}
|
|
74576
74588
|
}
|
|
74577
74589
|
}
|
|
74578
|
-
|
|
74590
|
+
var theme = this.theme;
|
|
74591
|
+
return function (category) {
|
|
74592
|
+
return theme.toCategoryLabel(category);
|
|
74593
|
+
};
|
|
74579
74594
|
};
|
|
74580
74595
|
DDialogSelect.prototype.findCategories = function () {
|
|
74581
74596
|
var options = this._options;
|
|
@@ -81198,13 +81213,13 @@ var DDiagramCanvasBase = /** @class */ (function (_super) {
|
|
|
81198
81213
|
// Label, Category, Summary and Description
|
|
81199
81214
|
if (options != null) {
|
|
81200
81215
|
_this._label = (_a = options.label) !== null && _a !== void 0 ? _a : "";
|
|
81201
|
-
_this._category = (_b = options.category) !== null && _b !== void 0 ? _b :
|
|
81216
|
+
_this._category = (_b = options.category) !== null && _b !== void 0 ? _b : null;
|
|
81202
81217
|
_this._summary = (_c = options.summary) !== null && _c !== void 0 ? _c : "";
|
|
81203
81218
|
_this._description = (_d = options.description) !== null && _d !== void 0 ? _d : "";
|
|
81204
81219
|
}
|
|
81205
81220
|
else {
|
|
81206
81221
|
_this._label = "";
|
|
81207
|
-
_this._category =
|
|
81222
|
+
_this._category = null;
|
|
81208
81223
|
_this._summary = "";
|
|
81209
81224
|
_this._description = "";
|
|
81210
81225
|
}
|
|
@@ -95900,6 +95915,7 @@ exports.toId = toId;
|
|
|
95900
95915
|
exports.toImageElement = toImageElement;
|
|
95901
95916
|
exports.toIndexOf = toIndexOf;
|
|
95902
95917
|
exports.toLabel = toLabel$1;
|
|
95918
|
+
exports.toLabelWith = toLabelWith;
|
|
95903
95919
|
exports.toLength = toLength;
|
|
95904
95920
|
exports.toLineIndexCount = toLineIndexCount;
|
|
95905
95921
|
exports.toLineOfAnyPointCount = toLineOfAnyPointCount;
|
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.361.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -47278,7 +47278,7 @@
|
|
|
47278
47278
|
* Copyright (C) 2019 Toshiba Corporation
|
|
47279
47279
|
* SPDX-License-Identifier: Apache-2.0
|
|
47280
47280
|
*/
|
|
47281
|
-
var
|
|
47281
|
+
var toLabelWith = function (target, def) {
|
|
47282
47282
|
if (target != null) {
|
|
47283
47283
|
if (isString(target)) {
|
|
47284
47284
|
return target;
|
|
@@ -47296,7 +47296,15 @@
|
|
|
47296
47296
|
return target.id;
|
|
47297
47297
|
}
|
|
47298
47298
|
}
|
|
47299
|
-
return
|
|
47299
|
+
return def;
|
|
47300
|
+
};
|
|
47301
|
+
|
|
47302
|
+
/*
|
|
47303
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
47304
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
47305
|
+
*/
|
|
47306
|
+
var toLabel$1 = function (target) {
|
|
47307
|
+
return toLabelWith(target, "");
|
|
47300
47308
|
};
|
|
47301
47309
|
|
|
47302
47310
|
/*
|
|
@@ -50665,16 +50673,10 @@
|
|
|
50665
50673
|
_super.prototype.onMenuReplaced.call(this, newMenu, oldMenu);
|
|
50666
50674
|
// Update the value
|
|
50667
50675
|
var value = this._value;
|
|
50668
|
-
|
|
50669
|
-
|
|
50670
|
-
|
|
50671
|
-
|
|
50672
|
-
this.text = item;
|
|
50673
|
-
}
|
|
50674
|
-
else {
|
|
50675
|
-
this._value = null;
|
|
50676
|
-
this.text = null;
|
|
50677
|
-
}
|
|
50676
|
+
var item = this.findMenuItem(newMenu, value);
|
|
50677
|
+
if (item != null) {
|
|
50678
|
+
this._value = value;
|
|
50679
|
+
this.text = item;
|
|
50678
50680
|
}
|
|
50679
50681
|
else {
|
|
50680
50682
|
this._value = null;
|
|
@@ -55702,6 +55704,9 @@
|
|
|
55702
55704
|
if (result.width === undefined && result.weight === undefined) {
|
|
55703
55705
|
result.width = 140;
|
|
55704
55706
|
}
|
|
55707
|
+
if (result.state === undefined) {
|
|
55708
|
+
result.state = DBaseState.DISABLED;
|
|
55709
|
+
}
|
|
55705
55710
|
return result;
|
|
55706
55711
|
};
|
|
55707
55712
|
DDialogSelect.prototype.onSelectCategoryChange = function (categoryId) {
|
|
@@ -55940,9 +55945,7 @@
|
|
|
55940
55945
|
this.onCategoryFetched(selectCategory, categoriesOrPromise);
|
|
55941
55946
|
}
|
|
55942
55947
|
else {
|
|
55943
|
-
selectCategory.state.isEnabled = false;
|
|
55944
55948
|
categoriesOrPromise.then(function (categories) {
|
|
55945
|
-
selectCategory.state.isEnabled = true;
|
|
55946
55949
|
_this.onCategoryFetched(selectCategory, categories);
|
|
55947
55950
|
});
|
|
55948
55951
|
}
|
|
@@ -55957,12 +55960,20 @@
|
|
|
55957
55960
|
};
|
|
55958
55961
|
DDialogSelect.prototype.onCategoryFetched = function (selectCategory, categories) {
|
|
55959
55962
|
var items = [];
|
|
55963
|
+
var toId = this.newToCategoryId();
|
|
55964
|
+
var toLabel = this.newToCategoryLabel();
|
|
55965
|
+
items.push({
|
|
55966
|
+
value: null,
|
|
55967
|
+
text: {
|
|
55968
|
+
value: toLabel(null)
|
|
55969
|
+
}
|
|
55970
|
+
});
|
|
55960
55971
|
for (var i = 0, imax = categories.length; i < imax; ++i) {
|
|
55961
55972
|
var category = categories[i];
|
|
55962
55973
|
items.push({
|
|
55963
|
-
value:
|
|
55974
|
+
value: toId(category),
|
|
55964
55975
|
text: {
|
|
55965
|
-
value:
|
|
55976
|
+
value: toLabel(category)
|
|
55966
55977
|
}
|
|
55967
55978
|
});
|
|
55968
55979
|
}
|
|
@@ -55970,36 +55981,40 @@
|
|
|
55970
55981
|
fit: true,
|
|
55971
55982
|
items: items
|
|
55972
55983
|
});
|
|
55973
|
-
|
|
55974
|
-
|
|
55975
|
-
selectCategory.show();
|
|
55976
|
-
this.search.create([this.input.value, newValue]);
|
|
55984
|
+
selectCategory.state.isEnabled = true;
|
|
55985
|
+
this.search.create([this.input.value, null]);
|
|
55977
55986
|
};
|
|
55978
|
-
DDialogSelect.prototype.
|
|
55987
|
+
DDialogSelect.prototype.newToCategoryId = function () {
|
|
55979
55988
|
var options = this._options;
|
|
55980
55989
|
if (options != null) {
|
|
55981
55990
|
var category = options.category;
|
|
55982
55991
|
if (category != null) {
|
|
55983
55992
|
var toId = category.toId;
|
|
55984
55993
|
if (toId != null) {
|
|
55985
|
-
return toId
|
|
55994
|
+
return toId;
|
|
55986
55995
|
}
|
|
55987
55996
|
}
|
|
55988
55997
|
}
|
|
55989
|
-
|
|
55998
|
+
var theme = this.theme;
|
|
55999
|
+
return function (category) {
|
|
56000
|
+
return theme.toCategoryId(category);
|
|
56001
|
+
};
|
|
55990
56002
|
};
|
|
55991
|
-
DDialogSelect.prototype.
|
|
56003
|
+
DDialogSelect.prototype.newToCategoryLabel = function () {
|
|
55992
56004
|
var options = this._options;
|
|
55993
56005
|
if (options != null) {
|
|
55994
56006
|
var category = options.category;
|
|
55995
56007
|
if (category != null) {
|
|
55996
56008
|
var toLabel = category.toLabel;
|
|
55997
56009
|
if (toLabel != null) {
|
|
55998
|
-
return toLabel
|
|
56010
|
+
return toLabel;
|
|
55999
56011
|
}
|
|
56000
56012
|
}
|
|
56001
56013
|
}
|
|
56002
|
-
|
|
56014
|
+
var theme = this.theme;
|
|
56015
|
+
return function (category) {
|
|
56016
|
+
return theme.toCategoryLabel(category);
|
|
56017
|
+
};
|
|
56003
56018
|
};
|
|
56004
56019
|
DDialogSelect.prototype.findCategories = function () {
|
|
56005
56020
|
var options = this._options;
|
|
@@ -62642,13 +62657,13 @@
|
|
|
62642
62657
|
// Label, Category, Summary and Description
|
|
62643
62658
|
if (options != null) {
|
|
62644
62659
|
_this._label = (_a = options.label) !== null && _a !== void 0 ? _a : "";
|
|
62645
|
-
_this._category = (_b = options.category) !== null && _b !== void 0 ? _b :
|
|
62660
|
+
_this._category = (_b = options.category) !== null && _b !== void 0 ? _b : null;
|
|
62646
62661
|
_this._summary = (_c = options.summary) !== null && _c !== void 0 ? _c : "";
|
|
62647
62662
|
_this._description = (_d = options.description) !== null && _d !== void 0 ? _d : "";
|
|
62648
62663
|
}
|
|
62649
62664
|
else {
|
|
62650
62665
|
_this._label = "";
|
|
62651
|
-
_this._category =
|
|
62666
|
+
_this._category = null;
|
|
62652
62667
|
_this._summary = "";
|
|
62653
62668
|
_this._description = "";
|
|
62654
62669
|
}
|
|
@@ -76340,6 +76355,7 @@
|
|
|
76340
76355
|
toEnum: toEnum,
|
|
76341
76356
|
toId: toId,
|
|
76342
76357
|
toIndexOf: toIndexOf,
|
|
76358
|
+
toLabelWith: toLabelWith,
|
|
76343
76359
|
toLabel: toLabel$1,
|
|
76344
76360
|
toMerged: toMerged,
|
|
76345
76361
|
toPadded: toPadded,
|