@wcardinal/wcardinal-ui 0.332.0 → 0.334.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-base-padding-adjustable.d.ts +12 -34
- package/dist/types/wcardinal/ui/d-base.d.ts +2 -0
- package/dist/types/wcardinal/ui/d-button-select.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-dialog-select-search-dismissable-impl.d.ts +7 -7
- package/dist/types/wcardinal/ui/d-dialog-select-search-dismissable.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-dialog-select-search-impl.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-dialog-select-search.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-dialog-select.d.ts +42 -14
- package/dist/types/wcardinal/ui/d-table-body-cell-input-tree-input.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-body-cell-tree.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-tree-item-text.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-dialog-select.d.ts +2 -0
- package/dist/types/wcardinal/ui/util/index.d.ts +1 -0
- package/dist/types/wcardinal/ui/util/to-id.d.ts +1 -0
- package/dist/wcardinal/ui/d-base-padding-adjustable.js +27 -88
- package/dist/wcardinal/ui/d-base-padding-adjustable.js.map +1 -1
- package/dist/wcardinal/ui/d-base.js +5 -1
- package/dist/wcardinal/ui/d-base.js.map +1 -1
- package/dist/wcardinal/ui/d-button-select.js +2 -37
- package/dist/wcardinal/ui/d-button-select.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-select-search-dismissable-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-select-search-dismissable.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-select-search-impl.js +1 -1
- package/dist/wcardinal/ui/d-dialog-select-search-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-select-search.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-select.js +162 -15
- package/dist/wcardinal/ui/d-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-input-tree-input.js +5 -4
- package/dist/wcardinal/ui/d-table-body-cell-input-tree-input.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-tree.js +4 -4
- package/dist/wcardinal/ui/d-table-body-cell-tree.js.map +1 -1
- package/dist/wcardinal/ui/d-tree-item-text.js +3 -1
- package/dist/wcardinal/ui/d-tree-item-text.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js +6 -2
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.js +9 -1
- 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 +9 -1
- 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-id.js +27 -0
- package/dist/wcardinal/ui/util/to-id.js.map +1 -0
- package/dist/wcardinal-ui-theme-dark.js +10 -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 +10 -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 +252 -156
- package/dist/wcardinal-ui.js +238 -154
- 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.334.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -13780,7 +13780,8 @@ var DBase = /** @class */ (function (_super) {
|
|
|
13780
13780
|
_this._snippet = new DBaseSnippetContainer(_this);
|
|
13781
13781
|
_this._reflowable = new DBaseReflowableContainer();
|
|
13782
13782
|
_this._clearType = toEnum((_b = options === null || options === void 0 ? void 0 : options.clear) !== null && _b !== void 0 ? _b : theme.getClearType(), DLayoutClearType);
|
|
13783
|
-
_this._padding =
|
|
13783
|
+
_this._padding = _this.newPadding(theme, options, function () {
|
|
13784
|
+
_this.toDirty();
|
|
13784
13785
|
_this.toParentResized();
|
|
13785
13786
|
_this.toHierarchyDirty();
|
|
13786
13787
|
DApplications.update(_this);
|
|
@@ -14026,6 +14027,9 @@ var DBase = /** @class */ (function (_super) {
|
|
|
14026
14027
|
_this.emit("init", _this);
|
|
14027
14028
|
return _this;
|
|
14028
14029
|
}
|
|
14030
|
+
DBase.prototype.newPadding = function (theme, options, callback) {
|
|
14031
|
+
return new DBasePadding(theme, options, callback);
|
|
14032
|
+
};
|
|
14029
14033
|
DBase.prototype.toCursor = function (cursor, state) {
|
|
14030
14034
|
if (cursor) {
|
|
14031
14035
|
if (isFunction(cursor)) {
|
|
@@ -18360,14 +18364,18 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
18360
18364
|
EShapeConnectorEdgeImpl.prototype.attach = function () {
|
|
18361
18365
|
var shape = this._acceptor.shape;
|
|
18362
18366
|
if (shape) {
|
|
18363
|
-
shape.connector.add(this)
|
|
18367
|
+
if (shape.connector.add(this)) {
|
|
18368
|
+
this.onAcceptorChange();
|
|
18369
|
+
}
|
|
18364
18370
|
}
|
|
18365
18371
|
return this;
|
|
18366
18372
|
};
|
|
18367
18373
|
EShapeConnectorEdgeImpl.prototype.detach = function () {
|
|
18368
18374
|
var shape = this._acceptor.shape;
|
|
18369
18375
|
if (shape) {
|
|
18370
|
-
shape.connector.remove(this)
|
|
18376
|
+
if (shape.connector.remove(this)) {
|
|
18377
|
+
this.onAcceptorChange();
|
|
18378
|
+
}
|
|
18371
18379
|
}
|
|
18372
18380
|
return this;
|
|
18373
18381
|
};
|
|
@@ -49265,6 +49273,31 @@ var DThemeWhiteButtonSelect = /** @class */ (function (_super) {
|
|
|
49265
49273
|
return DThemeWhiteButtonSelect;
|
|
49266
49274
|
}(DThemeWhiteButton));
|
|
49267
49275
|
|
|
49276
|
+
/*
|
|
49277
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
49278
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
49279
|
+
*/
|
|
49280
|
+
var toId = function (target) {
|
|
49281
|
+
if (target != null) {
|
|
49282
|
+
if (isString(target)) {
|
|
49283
|
+
return target;
|
|
49284
|
+
}
|
|
49285
|
+
else if (isNumber(target)) {
|
|
49286
|
+
return target;
|
|
49287
|
+
}
|
|
49288
|
+
else if ("id" in target) {
|
|
49289
|
+
return target.id;
|
|
49290
|
+
}
|
|
49291
|
+
else if ("name" in target) {
|
|
49292
|
+
return target.name;
|
|
49293
|
+
}
|
|
49294
|
+
else if ("label" in target) {
|
|
49295
|
+
return target.label;
|
|
49296
|
+
}
|
|
49297
|
+
}
|
|
49298
|
+
return 0;
|
|
49299
|
+
};
|
|
49300
|
+
|
|
49268
49301
|
/*
|
|
49269
49302
|
* Copyright (C) 2019 Toshiba Corporation
|
|
49270
49303
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -49281,7 +49314,13 @@ var DThemeWhiteDialogSelect = /** @class */ (function (_super) {
|
|
|
49281
49314
|
return null;
|
|
49282
49315
|
};
|
|
49283
49316
|
DThemeWhiteDialogSelect.prototype.getInputMargin = function () {
|
|
49284
|
-
return
|
|
49317
|
+
return 19;
|
|
49318
|
+
};
|
|
49319
|
+
DThemeWhiteDialogSelect.prototype.toCategoryId = function (category) {
|
|
49320
|
+
return toId(category);
|
|
49321
|
+
};
|
|
49322
|
+
DThemeWhiteDialogSelect.prototype.toCategoryLabel = function (category) {
|
|
49323
|
+
return toLabel$1(category);
|
|
49285
49324
|
};
|
|
49286
49325
|
return DThemeWhiteDialogSelect;
|
|
49287
49326
|
}(DThemeWhiteDialogLayered));
|
|
@@ -58556,7 +58595,13 @@ var DThemeDarkDialogSelect = /** @class */ (function (_super) {
|
|
|
58556
58595
|
return null;
|
|
58557
58596
|
};
|
|
58558
58597
|
DThemeDarkDialogSelect.prototype.getInputMargin = function () {
|
|
58559
|
-
return
|
|
58598
|
+
return 19;
|
|
58599
|
+
};
|
|
58600
|
+
DThemeDarkDialogSelect.prototype.toCategoryId = function (category) {
|
|
58601
|
+
return toId(category);
|
|
58602
|
+
};
|
|
58603
|
+
DThemeDarkDialogSelect.prototype.toCategoryLabel = function (category) {
|
|
58604
|
+
return toLabel$1(category);
|
|
58560
58605
|
};
|
|
58561
58606
|
return DThemeDarkDialogSelect;
|
|
58562
58607
|
}(DThemeDarkDialogLayered));
|
|
@@ -68360,128 +68405,66 @@ var DApplication = /** @class */ (function () {
|
|
|
68360
68405
|
* Copyright (C) 2019 Toshiba Corporation
|
|
68361
68406
|
* SPDX-License-Identifier: Apache-2.0
|
|
68362
68407
|
*/
|
|
68363
|
-
var DBasePaddingAdjustable = /** @class */ (function () {
|
|
68364
|
-
|
|
68365
|
-
|
|
68366
|
-
|
|
68367
|
-
|
|
68368
|
-
|
|
68369
|
-
|
|
68370
|
-
|
|
68371
|
-
|
|
68372
|
-
}
|
|
68408
|
+
var DBasePaddingAdjustable = /** @class */ (function (_super) {
|
|
68409
|
+
__extends(DBasePaddingAdjustable, _super);
|
|
68410
|
+
function DBasePaddingAdjustable(theme, options, callback) {
|
|
68411
|
+
var _this = _super.call(this, theme, options, callback) || this;
|
|
68412
|
+
_this._atop = 0;
|
|
68413
|
+
_this._aright = 0;
|
|
68414
|
+
_this._abottom = 0;
|
|
68415
|
+
_this._aleft = 0;
|
|
68416
|
+
return _this;
|
|
68373
68417
|
}
|
|
68374
|
-
DBasePaddingAdjustable.prototype.getTheme = function () {
|
|
68375
|
-
return this._target.getTheme();
|
|
68376
|
-
};
|
|
68377
|
-
DBasePaddingAdjustable.prototype.setTheme = function (theme) {
|
|
68378
|
-
this._target.setTheme(theme);
|
|
68379
|
-
};
|
|
68380
68418
|
DBasePaddingAdjustable.prototype.getLeft = function () {
|
|
68381
|
-
return
|
|
68419
|
+
return _super.prototype.getLeft.call(this) + this._aleft;
|
|
68382
68420
|
};
|
|
68383
|
-
DBasePaddingAdjustable.prototype.adjLeft = function (
|
|
68384
|
-
if (this.
|
|
68385
|
-
this.
|
|
68421
|
+
DBasePaddingAdjustable.prototype.adjLeft = function (aleft) {
|
|
68422
|
+
if (this._aleft !== aleft) {
|
|
68423
|
+
this._aleft = aleft;
|
|
68386
68424
|
var callback = this._callback;
|
|
68387
68425
|
if (callback) {
|
|
68388
68426
|
callback();
|
|
68389
68427
|
}
|
|
68390
68428
|
}
|
|
68391
68429
|
};
|
|
68392
|
-
Object.defineProperty(DBasePaddingAdjustable.prototype, "left", {
|
|
68393
|
-
get: function () {
|
|
68394
|
-
return this._target.left;
|
|
68395
|
-
},
|
|
68396
|
-
set: function (left) {
|
|
68397
|
-
this._target.left = left;
|
|
68398
|
-
},
|
|
68399
|
-
enumerable: false,
|
|
68400
|
-
configurable: true
|
|
68401
|
-
});
|
|
68402
68430
|
DBasePaddingAdjustable.prototype.getTop = function () {
|
|
68403
|
-
return
|
|
68431
|
+
return _super.prototype.getTop.call(this) + this._atop;
|
|
68404
68432
|
};
|
|
68405
|
-
DBasePaddingAdjustable.prototype.adjTop = function (
|
|
68406
|
-
if (this.
|
|
68407
|
-
this.
|
|
68433
|
+
DBasePaddingAdjustable.prototype.adjTop = function (atop) {
|
|
68434
|
+
if (this._atop !== atop) {
|
|
68435
|
+
this._atop = atop;
|
|
68408
68436
|
var callback = this._callback;
|
|
68409
68437
|
if (callback) {
|
|
68410
68438
|
callback();
|
|
68411
68439
|
}
|
|
68412
68440
|
}
|
|
68413
68441
|
};
|
|
68414
|
-
Object.defineProperty(DBasePaddingAdjustable.prototype, "top", {
|
|
68415
|
-
get: function () {
|
|
68416
|
-
return this._target.top;
|
|
68417
|
-
},
|
|
68418
|
-
set: function (top) {
|
|
68419
|
-
this._target.top = top;
|
|
68420
|
-
},
|
|
68421
|
-
enumerable: false,
|
|
68422
|
-
configurable: true
|
|
68423
|
-
});
|
|
68424
68442
|
DBasePaddingAdjustable.prototype.getRight = function () {
|
|
68425
|
-
return
|
|
68443
|
+
return _super.prototype.getRight.call(this) + this._aright;
|
|
68426
68444
|
};
|
|
68427
|
-
DBasePaddingAdjustable.prototype.adjRight = function (
|
|
68428
|
-
if (this.
|
|
68429
|
-
this.
|
|
68445
|
+
DBasePaddingAdjustable.prototype.adjRight = function (aright) {
|
|
68446
|
+
if (this._aright !== aright) {
|
|
68447
|
+
this._aright = aright;
|
|
68430
68448
|
var callback = this._callback;
|
|
68431
68449
|
if (callback) {
|
|
68432
68450
|
callback();
|
|
68433
68451
|
}
|
|
68434
68452
|
}
|
|
68435
68453
|
};
|
|
68436
|
-
Object.defineProperty(DBasePaddingAdjustable.prototype, "right", {
|
|
68437
|
-
get: function () {
|
|
68438
|
-
return this._target.right;
|
|
68439
|
-
},
|
|
68440
|
-
set: function (right) {
|
|
68441
|
-
this._target.right = right;
|
|
68442
|
-
},
|
|
68443
|
-
enumerable: false,
|
|
68444
|
-
configurable: true
|
|
68445
|
-
});
|
|
68446
68454
|
DBasePaddingAdjustable.prototype.getBottom = function () {
|
|
68447
|
-
return
|
|
68455
|
+
return _super.prototype.getBottom.call(this) + this._abottom;
|
|
68448
68456
|
};
|
|
68449
|
-
DBasePaddingAdjustable.prototype.adjBottom = function (
|
|
68450
|
-
if (this.
|
|
68451
|
-
this.
|
|
68457
|
+
DBasePaddingAdjustable.prototype.adjBottom = function (abottom) {
|
|
68458
|
+
if (this._abottom !== abottom) {
|
|
68459
|
+
this._abottom = abottom;
|
|
68452
68460
|
var callback = this._callback;
|
|
68453
68461
|
if (callback) {
|
|
68454
68462
|
callback();
|
|
68455
68463
|
}
|
|
68456
68464
|
}
|
|
68457
68465
|
};
|
|
68458
|
-
Object.defineProperty(DBasePaddingAdjustable.prototype, "bottom", {
|
|
68459
|
-
get: function () {
|
|
68460
|
-
return this._target.bottom;
|
|
68461
|
-
},
|
|
68462
|
-
set: function (bottom) {
|
|
68463
|
-
this._target.bottom = bottom;
|
|
68464
|
-
},
|
|
68465
|
-
enumerable: false,
|
|
68466
|
-
configurable: true
|
|
68467
|
-
});
|
|
68468
|
-
DBasePaddingAdjustable.prototype.set = function (top, right, bottom, left) {
|
|
68469
|
-
var target = this._target;
|
|
68470
|
-
if (right == null) {
|
|
68471
|
-
target.set(top);
|
|
68472
|
-
}
|
|
68473
|
-
else if (bottom == null) {
|
|
68474
|
-
target.set(top, right);
|
|
68475
|
-
}
|
|
68476
|
-
else if (left == null) {
|
|
68477
|
-
target.set(top, right, bottom);
|
|
68478
|
-
}
|
|
68479
|
-
else {
|
|
68480
|
-
target.set(top, right, bottom, left);
|
|
68481
|
-
}
|
|
68482
|
-
};
|
|
68483
68466
|
return DBasePaddingAdjustable;
|
|
68484
|
-
}());
|
|
68467
|
+
}(DBasePadding));
|
|
68485
68468
|
|
|
68486
68469
|
/*
|
|
68487
68470
|
* Copyright (C) 2019 Toshiba Corporation
|
|
@@ -73677,7 +73660,7 @@ var DDialogSelectSearhImpl = /** @class */ (function (_super) {
|
|
|
73677
73660
|
DDialogSelectSearhImpl.prototype.create = function (args) {
|
|
73678
73661
|
var _this = this;
|
|
73679
73662
|
var id = ++this._id;
|
|
73680
|
-
this._search(args[0]).then(function (searchResult) {
|
|
73663
|
+
this._search(args[0], args[1]).then(function (searchResult) {
|
|
73681
73664
|
if (_this._id === id) {
|
|
73682
73665
|
_this._idCompleted = id;
|
|
73683
73666
|
_this.emit("success", _this, searchResult);
|
|
@@ -73890,7 +73873,7 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
73890
73873
|
get: function () {
|
|
73891
73874
|
var result = this._inputLayout;
|
|
73892
73875
|
if (result == null) {
|
|
73893
|
-
result = this.newInputLayout(
|
|
73876
|
+
result = this.newInputLayout();
|
|
73894
73877
|
this._inputLayout = result;
|
|
73895
73878
|
}
|
|
73896
73879
|
return result;
|
|
@@ -73898,20 +73881,78 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
73898
73881
|
enumerable: false,
|
|
73899
73882
|
configurable: true
|
|
73900
73883
|
});
|
|
73901
|
-
DDialogSelect.prototype.newInputLayout = function (
|
|
73902
|
-
return new DLayoutHorizontal(
|
|
73903
|
-
};
|
|
73904
|
-
DDialogSelect.prototype.toInputLayoutOptions = function (input, theme, options) {
|
|
73905
|
-
var margin = this.toInputMargin(theme, options);
|
|
73906
|
-
return {
|
|
73884
|
+
DDialogSelect.prototype.newInputLayout = function () {
|
|
73885
|
+
return new DLayoutHorizontal({
|
|
73907
73886
|
width: "padding",
|
|
73908
73887
|
height: "auto",
|
|
73909
|
-
children: [
|
|
73910
|
-
|
|
73911
|
-
|
|
73912
|
-
|
|
73913
|
-
|
|
73914
|
-
|
|
73888
|
+
children: [this.spaceLeft, this.selectCategory, this.input, this.spaceRight]
|
|
73889
|
+
});
|
|
73890
|
+
};
|
|
73891
|
+
Object.defineProperty(DDialogSelect.prototype, "spaceLeft", {
|
|
73892
|
+
get: function () {
|
|
73893
|
+
var result = this._spaceLeft;
|
|
73894
|
+
if (result == null) {
|
|
73895
|
+
result = this.newSpace();
|
|
73896
|
+
this._spaceLeft = result;
|
|
73897
|
+
}
|
|
73898
|
+
return result;
|
|
73899
|
+
},
|
|
73900
|
+
enumerable: false,
|
|
73901
|
+
configurable: true
|
|
73902
|
+
});
|
|
73903
|
+
Object.defineProperty(DDialogSelect.prototype, "spaceRight", {
|
|
73904
|
+
get: function () {
|
|
73905
|
+
var result = this._spaceRight;
|
|
73906
|
+
if (result == null) {
|
|
73907
|
+
result = this.newSpace();
|
|
73908
|
+
this._spaceRight = result;
|
|
73909
|
+
}
|
|
73910
|
+
return result;
|
|
73911
|
+
},
|
|
73912
|
+
enumerable: false,
|
|
73913
|
+
configurable: true
|
|
73914
|
+
});
|
|
73915
|
+
DDialogSelect.prototype.newSpace = function () {
|
|
73916
|
+
return new DLayoutSpace({
|
|
73917
|
+
width: this.toInputMargin(this.theme, this._options)
|
|
73918
|
+
});
|
|
73919
|
+
};
|
|
73920
|
+
Object.defineProperty(DDialogSelect.prototype, "selectCategory", {
|
|
73921
|
+
get: function () {
|
|
73922
|
+
var result = this._selectCategory;
|
|
73923
|
+
if (result === undefined) {
|
|
73924
|
+
result = this.newSelectCategory();
|
|
73925
|
+
this._selectCategory = result;
|
|
73926
|
+
}
|
|
73927
|
+
return result;
|
|
73928
|
+
},
|
|
73929
|
+
enumerable: false,
|
|
73930
|
+
configurable: true
|
|
73931
|
+
});
|
|
73932
|
+
DDialogSelect.prototype.newSelectCategory = function () {
|
|
73933
|
+
var _this = this;
|
|
73934
|
+
var options = this._options;
|
|
73935
|
+
if (options != null) {
|
|
73936
|
+
var controller = options.controller;
|
|
73937
|
+
if (controller != null && controller.getCategories != null) {
|
|
73938
|
+
var result = new DSelect(this.toSelectCategoryOptions(this.theme, this._options));
|
|
73939
|
+
result.on("change", function (value) {
|
|
73940
|
+
_this.onSelectCategoryChange(value);
|
|
73941
|
+
});
|
|
73942
|
+
return result;
|
|
73943
|
+
}
|
|
73944
|
+
}
|
|
73945
|
+
return null;
|
|
73946
|
+
};
|
|
73947
|
+
DDialogSelect.prototype.toSelectCategoryOptions = function (theme, options) {
|
|
73948
|
+
var result = (options === null || options === void 0 ? void 0 : options.category) || {};
|
|
73949
|
+
if (result.width === undefined && result.weight === undefined) {
|
|
73950
|
+
result.width = 140;
|
|
73951
|
+
}
|
|
73952
|
+
return result;
|
|
73953
|
+
};
|
|
73954
|
+
DDialogSelect.prototype.onSelectCategoryChange = function (categoryId) {
|
|
73955
|
+
this.search.create([this.input.value, categoryId]);
|
|
73915
73956
|
};
|
|
73916
73957
|
Object.defineProperty(DDialogSelect.prototype, "input", {
|
|
73917
73958
|
get: function () {
|
|
@@ -73929,7 +73970,7 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
73929
73970
|
var _this = this;
|
|
73930
73971
|
var result = new DInputSearch(this.toInputOptions(this.theme, this._options));
|
|
73931
73972
|
result.on("input", function (value) {
|
|
73932
|
-
_this.
|
|
73973
|
+
_this.onInputInput(value);
|
|
73933
73974
|
});
|
|
73934
73975
|
return result;
|
|
73935
73976
|
};
|
|
@@ -73944,6 +73985,10 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
73944
73985
|
var _a, _b;
|
|
73945
73986
|
return (_b = (_a = options === null || options === void 0 ? void 0 : options.input) === null || _a === void 0 ? void 0 : _a.margin) !== null && _b !== void 0 ? _b : theme.getInputMargin();
|
|
73946
73987
|
};
|
|
73988
|
+
DDialogSelect.prototype.onInputInput = function (value) {
|
|
73989
|
+
var _a, _b;
|
|
73990
|
+
this.search.create([value, (_b = (_a = this.selectCategory) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null]);
|
|
73991
|
+
};
|
|
73947
73992
|
Object.defineProperty(DDialogSelect.prototype, "list", {
|
|
73948
73993
|
get: function () {
|
|
73949
73994
|
var result = this._list;
|
|
@@ -74122,9 +74167,91 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
74122
74167
|
return "DDialogSelect";
|
|
74123
74168
|
};
|
|
74124
74169
|
DDialogSelect.prototype.onOpen = function () {
|
|
74170
|
+
var _this = this;
|
|
74125
74171
|
_super.prototype.onOpen.call(this);
|
|
74126
74172
|
this.list.selection.clear();
|
|
74127
|
-
this.
|
|
74173
|
+
var selectCategory = this.selectCategory;
|
|
74174
|
+
if (selectCategory != null) {
|
|
74175
|
+
if (this._isCategoryFetched !== true) {
|
|
74176
|
+
this._isCategoryFetched = true;
|
|
74177
|
+
var categoriesOrPromise = this.findCategories();
|
|
74178
|
+
if (categoriesOrPromise == null) {
|
|
74179
|
+
this.search.create([this.input.value, null]);
|
|
74180
|
+
}
|
|
74181
|
+
else if (isArray(categoriesOrPromise)) {
|
|
74182
|
+
this.onCategoryFetched(selectCategory, categoriesOrPromise);
|
|
74183
|
+
}
|
|
74184
|
+
else {
|
|
74185
|
+
selectCategory.state.isEnabled = false;
|
|
74186
|
+
categoriesOrPromise.then(function (categories) {
|
|
74187
|
+
selectCategory.state.isEnabled = true;
|
|
74188
|
+
_this.onCategoryFetched(selectCategory, categories);
|
|
74189
|
+
});
|
|
74190
|
+
}
|
|
74191
|
+
}
|
|
74192
|
+
else {
|
|
74193
|
+
this.search.create([this.input.value, selectCategory.value]);
|
|
74194
|
+
}
|
|
74195
|
+
}
|
|
74196
|
+
else {
|
|
74197
|
+
this.search.create([this.input.value, null]);
|
|
74198
|
+
}
|
|
74199
|
+
};
|
|
74200
|
+
DDialogSelect.prototype.onCategoryFetched = function (selectCategory, categories) {
|
|
74201
|
+
var items = [];
|
|
74202
|
+
for (var i = 0, imax = categories.length; i < imax; ++i) {
|
|
74203
|
+
var category = categories[i];
|
|
74204
|
+
items.push({
|
|
74205
|
+
value: this.toCategoryId(category),
|
|
74206
|
+
text: {
|
|
74207
|
+
value: this.toCategoryLabel(category)
|
|
74208
|
+
}
|
|
74209
|
+
});
|
|
74210
|
+
}
|
|
74211
|
+
selectCategory.menu = new DMenu({
|
|
74212
|
+
fit: true,
|
|
74213
|
+
items: items
|
|
74214
|
+
});
|
|
74215
|
+
var newValue = 0 < items.length ? items[0].value : null;
|
|
74216
|
+
selectCategory.value = newValue;
|
|
74217
|
+
selectCategory.show();
|
|
74218
|
+
this.search.create([this.input.value, newValue]);
|
|
74219
|
+
};
|
|
74220
|
+
DDialogSelect.prototype.toCategoryId = function (target) {
|
|
74221
|
+
var options = this._options;
|
|
74222
|
+
if (options != null) {
|
|
74223
|
+
var category = options.category;
|
|
74224
|
+
if (category != null) {
|
|
74225
|
+
var toId = category.toId;
|
|
74226
|
+
if (toId != null) {
|
|
74227
|
+
return toId(target);
|
|
74228
|
+
}
|
|
74229
|
+
}
|
|
74230
|
+
}
|
|
74231
|
+
return this.theme.toCategoryId(target);
|
|
74232
|
+
};
|
|
74233
|
+
DDialogSelect.prototype.toCategoryLabel = function (target) {
|
|
74234
|
+
var options = this._options;
|
|
74235
|
+
if (options != null) {
|
|
74236
|
+
var category = options.category;
|
|
74237
|
+
if (category != null) {
|
|
74238
|
+
var toLabel = category.toLabel;
|
|
74239
|
+
if (toLabel != null) {
|
|
74240
|
+
return toLabel(target);
|
|
74241
|
+
}
|
|
74242
|
+
}
|
|
74243
|
+
}
|
|
74244
|
+
return this.theme.toCategoryLabel(target);
|
|
74245
|
+
};
|
|
74246
|
+
DDialogSelect.prototype.findCategories = function () {
|
|
74247
|
+
var options = this._options;
|
|
74248
|
+
if (options != null) {
|
|
74249
|
+
var controller = options.controller;
|
|
74250
|
+
if (controller != null && controller.getCategories != null) {
|
|
74251
|
+
return controller.getCategories();
|
|
74252
|
+
}
|
|
74253
|
+
}
|
|
74254
|
+
return null;
|
|
74128
74255
|
};
|
|
74129
74256
|
DDialogSelect.prototype.onOk = function (value) {
|
|
74130
74257
|
this.emit("select", value, this);
|
|
@@ -74167,47 +74294,12 @@ var defaultGetter$1 = function (dialog) {
|
|
|
74167
74294
|
var defaultSetter$1 = function () {
|
|
74168
74295
|
// DO NOTHING
|
|
74169
74296
|
};
|
|
74170
|
-
var toOptions = function (options) {
|
|
74171
|
-
var _a, _b, _c;
|
|
74172
|
-
if (options) {
|
|
74173
|
-
// Try to copy text.formatter to dialog.item.text.formatter at first
|
|
74174
|
-
var formatter = (_a = options.text) === null || _a === void 0 ? void 0 : _a.formatter;
|
|
74175
|
-
if (formatter !== undefined) {
|
|
74176
|
-
var dialog = options.dialog;
|
|
74177
|
-
if (!(dialog && "open" in dialog)) {
|
|
74178
|
-
dialog = dialog || {};
|
|
74179
|
-
var item = (dialog.item = dialog.item || {});
|
|
74180
|
-
var text = (item.text = item.text || {});
|
|
74181
|
-
if (text.formatter === undefined) {
|
|
74182
|
-
// Assumes formatter is ( value: DIALOG_VALUE | null, caller: any ) => string.
|
|
74183
|
-
text.formatter = formatter;
|
|
74184
|
-
}
|
|
74185
|
-
}
|
|
74186
|
-
}
|
|
74187
|
-
else {
|
|
74188
|
-
// Try to copy dialog.item.text.formatter to text.formatter
|
|
74189
|
-
var dialog = options.dialog;
|
|
74190
|
-
if (!(dialog && "open" in dialog)) {
|
|
74191
|
-
var dialogFormatter = (_c = (_b = dialog === null || dialog === void 0 ? void 0 : dialog.item) === null || _b === void 0 ? void 0 : _b.text) === null || _c === void 0 ? void 0 : _c.formatter;
|
|
74192
|
-
if (dialogFormatter !== undefined) {
|
|
74193
|
-
var text = options.text || {};
|
|
74194
|
-
options.text = text;
|
|
74195
|
-
if (text.formatter === undefined) {
|
|
74196
|
-
// Assumes dialogFormatter is ( value: VALUE | null, caller: any ) => string.
|
|
74197
|
-
text.formatter = dialogFormatter;
|
|
74198
|
-
}
|
|
74199
|
-
}
|
|
74200
|
-
}
|
|
74201
|
-
}
|
|
74202
|
-
}
|
|
74203
|
-
return options;
|
|
74204
|
-
};
|
|
74205
74297
|
var DButtonSelect = /** @class */ (function (_super) {
|
|
74206
74298
|
__extends(DButtonSelect, _super);
|
|
74207
74299
|
function DButtonSelect(options) {
|
|
74208
74300
|
var _this = this;
|
|
74209
74301
|
var _a, _b;
|
|
74210
|
-
_this = _super.call(this,
|
|
74302
|
+
_this = _super.call(this, options) || this;
|
|
74211
74303
|
_this._dialogGetter = (_a = options === null || options === void 0 ? void 0 : options.getter) !== null && _a !== void 0 ? _a : defaultGetter$1;
|
|
74212
74304
|
_this._dialogSetter = (_b = options === null || options === void 0 ? void 0 : options.setter) !== null && _b !== void 0 ? _b : defaultSetter$1;
|
|
74213
74305
|
return _this;
|
|
@@ -74237,7 +74329,7 @@ var DButtonSelect = /** @class */ (function (_super) {
|
|
|
74237
74329
|
dialog = options;
|
|
74238
74330
|
}
|
|
74239
74331
|
else {
|
|
74240
|
-
// Assumes DIALOG === DDialogSelect<DIALOG_VALUE>.
|
|
74332
|
+
// Assumes DIALOG === DDialogSelect<DIALOG_VALUE, DIALOG_CATEGORY, DIALOG_CATEGORY_ID>.
|
|
74241
74333
|
dialog = new DDialogSelect(options);
|
|
74242
74334
|
}
|
|
74243
74335
|
this._dialog = dialog;
|
|
@@ -87474,11 +87566,12 @@ var DTableBodyCellInputText = /** @class */ (function (_super) {
|
|
|
87474
87566
|
*/
|
|
87475
87567
|
var DTableBodyCellInputTreeInput = /** @class */ (function (_super) {
|
|
87476
87568
|
__extends(DTableBodyCellInputTreeInput, _super);
|
|
87477
|
-
function DTableBodyCellInputTreeInput(
|
|
87478
|
-
|
|
87479
|
-
_this._padding = new DBasePaddingAdjustable(_this._padding);
|
|
87480
|
-
return _this;
|
|
87569
|
+
function DTableBodyCellInputTreeInput() {
|
|
87570
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
87481
87571
|
}
|
|
87572
|
+
DTableBodyCellInputTreeInput.prototype.newPadding = function (theme, options, callback) {
|
|
87573
|
+
return new DBasePaddingAdjustable(theme, options, callback);
|
|
87574
|
+
};
|
|
87482
87575
|
Object.defineProperty(DTableBodyCellInputTreeInput.prototype, "padding", {
|
|
87483
87576
|
get: function () {
|
|
87484
87577
|
return this._padding;
|
|
@@ -88010,12 +88103,12 @@ var DTableBodyCellTime = /** @class */ (function (_super) {
|
|
|
88010
88103
|
var DTableBodyCellTree = /** @class */ (function (_super) {
|
|
88011
88104
|
__extends(DTableBodyCellTree, _super);
|
|
88012
88105
|
function DTableBodyCellTree(columnIndex, column, onChange, options) {
|
|
88013
|
-
var _this = this;
|
|
88014
88106
|
var _a;
|
|
88015
|
-
|
|
88016
|
-
_this._padding = new DBasePaddingAdjustable(_this._padding);
|
|
88017
|
-
return _this;
|
|
88107
|
+
return _super.call(this, columnIndex, column, onChange, DLinks.toStateOptions((_a = options === null || options === void 0 ? void 0 : options.link) === null || _a === void 0 ? void 0 : _a.target, options)) || this;
|
|
88018
88108
|
}
|
|
88109
|
+
DTableBodyCellTree.prototype.newPadding = function (theme, options, callback) {
|
|
88110
|
+
return new DBasePaddingAdjustable(theme, options, callback);
|
|
88111
|
+
};
|
|
88019
88112
|
DTableBodyCellTree.prototype.onClick = function (e) {
|
|
88020
88113
|
var _a;
|
|
88021
88114
|
if (((_a = this.link) === null || _a === void 0 ? void 0 : _a.onClick(this, e)) !== true) {
|
|
@@ -93086,10 +93179,12 @@ var DTreeItemText = /** @class */ (function (_super) {
|
|
|
93086
93179
|
__extends(DTreeItemText, _super);
|
|
93087
93180
|
function DTreeItemText(data, options) {
|
|
93088
93181
|
var _this = _super.call(this, options) || this;
|
|
93089
|
-
_this._padding = new DBasePaddingAdjustable(_this._padding);
|
|
93090
93182
|
_this._data = data;
|
|
93091
93183
|
return _this;
|
|
93092
93184
|
}
|
|
93185
|
+
DTreeItemText.prototype.newPadding = function (theme, options, callback) {
|
|
93186
|
+
return new DBasePaddingAdjustable(theme, options, callback);
|
|
93187
|
+
};
|
|
93093
93188
|
Object.defineProperty(DTreeItemText.prototype, "node", {
|
|
93094
93189
|
get: function () {
|
|
93095
93190
|
return this._node;
|
|
@@ -95181,6 +95276,7 @@ exports.toDash = toDash;
|
|
|
95181
95276
|
exports.toEnum = toEnum;
|
|
95182
95277
|
exports.toGradientImageUrl = toGradientImageUrl;
|
|
95183
95278
|
exports.toGradientSerialized = toGradientSerialized;
|
|
95279
|
+
exports.toId = toId;
|
|
95184
95280
|
exports.toImageElement = toImageElement;
|
|
95185
95281
|
exports.toIndexOf = toIndexOf;
|
|
95186
95282
|
exports.toLabel = toLabel$1;
|