@wcardinal/wcardinal-ui 0.387.0 → 0.388.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 (51) hide show
  1. package/dist/types/wcardinal/ui/d-dialog-select.d.ts +14 -6
  2. package/dist/types/wcardinal/ui/index.d.ts +0 -2
  3. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.d.ts +2 -0
  4. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-en-us-dialog-select.d.ts +1 -0
  5. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-ja-jp-dialog-select.d.ts +1 -0
  6. package/dist/types/wcardinal/ui/theme/white/d-theme-white-dialog-select.d.ts +2 -0
  7. package/dist/types/wcardinal/ui/theme/white/d-theme-white-en-us-dialog-select.d.ts +1 -0
  8. package/dist/types/wcardinal/ui/theme/white/d-theme-white-ja-jp-dialog-select.d.ts +1 -0
  9. package/dist/wcardinal/ui/d-dialog-select.js +77 -97
  10. package/dist/wcardinal/ui/d-dialog-select.js.map +1 -1
  11. package/dist/wcardinal/ui/index.js +0 -2
  12. package/dist/wcardinal/ui/index.js.map +1 -1
  13. package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.js +3 -0
  14. package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.js.map +1 -1
  15. package/dist/wcardinal/ui/theme/dark/d-theme-dark-en-us-dialog-select.js +3 -0
  16. package/dist/wcardinal/ui/theme/dark/d-theme-dark-en-us-dialog-select.js.map +1 -1
  17. package/dist/wcardinal/ui/theme/dark/d-theme-dark-ja-jp-dialog-select.js +3 -0
  18. package/dist/wcardinal/ui/theme/dark/d-theme-dark-ja-jp-dialog-select.js.map +1 -1
  19. package/dist/wcardinal/ui/theme/white/d-theme-white-dialog-select.js +3 -0
  20. package/dist/wcardinal/ui/theme/white/d-theme-white-dialog-select.js.map +1 -1
  21. package/dist/wcardinal/ui/theme/white/d-theme-white-en-us-dialog-select.js +3 -0
  22. package/dist/wcardinal/ui/theme/white/d-theme-white-en-us-dialog-select.js.map +1 -1
  23. package/dist/wcardinal/ui/theme/white/d-theme-white-ja-jp-dialog-select.js +3 -0
  24. package/dist/wcardinal/ui/theme/white/d-theme-white-ja-jp-dialog-select.js.map +1 -1
  25. package/dist/wcardinal-ui-theme-dark-en-us.js +7 -1
  26. package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
  27. package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
  28. package/dist/wcardinal-ui-theme-dark-ja-jp.js +7 -1
  29. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
  30. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
  31. package/dist/wcardinal-ui-theme-dark.js +7 -1
  32. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  33. package/dist/wcardinal-ui-theme-white-en-us.js +7 -1
  34. package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
  35. package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
  36. package/dist/wcardinal-ui-theme-white-ja-jp.js +7 -1
  37. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
  38. package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
  39. package/dist/wcardinal-ui-theme-white.js +7 -1
  40. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  41. package/dist/wcardinal-ui.cjs.js +95 -156
  42. package/dist/wcardinal-ui.js +77 -156
  43. package/dist/wcardinal-ui.min.js +2 -2
  44. package/dist/wcardinal-ui.min.js.map +1 -1
  45. package/package.json +1 -1
  46. package/dist/types/wcardinal/ui/d-dialog-select-search-dismissable-impl.d.ts +0 -14
  47. package/dist/types/wcardinal/ui/d-dialog-select-search-dismissable.d.ts +0 -11
  48. package/dist/wcardinal/ui/d-dialog-select-search-dismissable-impl.js +0 -61
  49. package/dist/wcardinal/ui/d-dialog-select-search-dismissable-impl.js.map +0 -1
  50. package/dist/wcardinal/ui/d-dialog-select-search-dismissable.js +0 -6
  51. package/dist/wcardinal/ui/d-dialog-select-search-dismissable.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.387.0
2
+ Winter Cardinal UI v0.388.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -54140,6 +54140,9 @@ var DThemeWhiteDialogSelect = /** @class */ (function (_super) {
54140
54140
  DThemeWhiteDialogSelect.prototype.getInputMargin = function () {
54141
54141
  return 19;
54142
54142
  };
54143
+ DThemeWhiteDialogSelect.prototype.isDismissable = function () {
54144
+ return false;
54145
+ };
54143
54146
  DThemeWhiteDialogSelect.prototype.isCategoryDismissable = function () {
54144
54147
  return true;
54145
54148
  };
@@ -54155,6 +54158,9 @@ var DThemeWhiteEnUsDialogSelect = /** @class */ (function (_super) {
54155
54158
  function DThemeWhiteEnUsDialogSelect() {
54156
54159
  return _super !== null && _super.apply(this, arguments) || this;
54157
54160
  }
54161
+ DThemeWhiteEnUsDialogSelect.prototype.getDismissLabel = function () {
54162
+ return "None";
54163
+ };
54158
54164
  DThemeWhiteEnUsDialogSelect.prototype.getCategoryDismissLabel = function () {
54159
54165
  return "All";
54160
54166
  };
@@ -57002,6 +57008,9 @@ var DThemeWhiteJaJpDialogSelect = /** @class */ (function (_super) {
57002
57008
  function DThemeWhiteJaJpDialogSelect() {
57003
57009
  return _super !== null && _super.apply(this, arguments) || this;
57004
57010
  }
57011
+ DThemeWhiteJaJpDialogSelect.prototype.getDismissLabel = function () {
57012
+ return "なし";
57013
+ };
57005
57014
  DThemeWhiteJaJpDialogSelect.prototype.getCategoryDismissLabel = function () {
57006
57015
  return "全て";
57007
57016
  };
@@ -64447,6 +64456,9 @@ var DThemeDarkDialogSelect = /** @class */ (function (_super) {
64447
64456
  DThemeDarkDialogSelect.prototype.getInputMargin = function () {
64448
64457
  return 19;
64449
64458
  };
64459
+ DThemeDarkDialogSelect.prototype.isDismissable = function () {
64460
+ return false;
64461
+ };
64450
64462
  DThemeDarkDialogSelect.prototype.isCategoryDismissable = function () {
64451
64463
  return true;
64452
64464
  };
@@ -64462,6 +64474,9 @@ var DThemeDarkEnUsDialogSelect = /** @class */ (function (_super) {
64462
64474
  function DThemeDarkEnUsDialogSelect() {
64463
64475
  return _super !== null && _super.apply(this, arguments) || this;
64464
64476
  }
64477
+ DThemeDarkEnUsDialogSelect.prototype.getDismissLabel = function () {
64478
+ return "None";
64479
+ };
64465
64480
  DThemeDarkEnUsDialogSelect.prototype.getCategoryDismissLabel = function () {
64466
64481
  return "All";
64467
64482
  };
@@ -67306,6 +67321,9 @@ var DThemeDarkJaJpDialogSelect = /** @class */ (function (_super) {
67306
67321
  function DThemeDarkJaJpDialogSelect() {
67307
67322
  return _super !== null && _super.apply(this, arguments) || this;
67308
67323
  }
67324
+ DThemeDarkJaJpDialogSelect.prototype.getDismissLabel = function () {
67325
+ return "なし";
67326
+ };
67309
67327
  DThemeDarkJaJpDialogSelect.prototype.getCategoryDismissLabel = function () {
67310
67328
  return "全て";
67311
67329
  };
@@ -76014,64 +76032,6 @@ var DNoteSmallSearching = /** @class */ (function (_super) {
76014
76032
  return DNoteSmallSearching;
76015
76033
  }(DNoteSmall));
76016
76034
 
76017
- /*
76018
- * Copyright (C) 2019 Toshiba Corporation
76019
- * SPDX-License-Identifier: Apache-2.0
76020
- */
76021
- var DDialogSelectSearhDismissableImpl = /** @class */ (function (_super) {
76022
- __extends(DDialogSelectSearhDismissableImpl, _super);
76023
- function DDialogSelectSearhDismissableImpl(target, options) {
76024
- var _this = _super.call(this) || this;
76025
- _this._target = target;
76026
- _this._value = options.value;
76027
- _this._filter = options.filter;
76028
- target.on("change", function () {
76029
- _this.emit("change", _this);
76030
- });
76031
- target.on("success", function (e, values) {
76032
- _this.emit("success", _this, _this.toDismissable(values));
76033
- });
76034
- target.on("fail", function () {
76035
- _this.emit("fail", _this);
76036
- });
76037
- return _this;
76038
- }
76039
- DDialogSelectSearhDismissableImpl.prototype.toDismissValue = function (args) {
76040
- if (args == null) {
76041
- return;
76042
- }
76043
- var value = this._value;
76044
- if (value === undefined) {
76045
- return;
76046
- }
76047
- var filter = this._filter;
76048
- if (filter != null && !filter(value, args[0])) {
76049
- return;
76050
- }
76051
- return value;
76052
- };
76053
- DDialogSelectSearhDismissableImpl.prototype.toDismissable = function (values) {
76054
- var value = this.toDismissValue(this._args);
76055
- if (value === undefined) {
76056
- return values;
76057
- }
76058
- var result = [];
76059
- for (var i = 0, imax = values.length; i < imax; ++i) {
76060
- result.push(values[i]);
76061
- }
76062
- result.push(value);
76063
- return result;
76064
- };
76065
- DDialogSelectSearhDismissableImpl.prototype.create = function (args) {
76066
- this._args = args;
76067
- this._target.create(args);
76068
- };
76069
- DDialogSelectSearhDismissableImpl.prototype.isDone = function () {
76070
- return this._target.isDone();
76071
- };
76072
- return DDialogSelectSearhDismissableImpl;
76073
- }(pixi_js.utils.EventEmitter));
76074
-
76075
76035
  /*
76076
76036
  * Copyright (C) 2019 Toshiba Corporation
76077
76037
  * SPDX-License-Identifier: Apache-2.0
@@ -76117,17 +76077,13 @@ var DDialogSelect = /** @class */ (function (_super) {
76117
76077
  }
76118
76078
  DDialogSelect.prototype.newContentChildren = function (theme, options) {
76119
76079
  var result = _super.prototype.newContentChildren.call(this, theme, options);
76120
- result.push(this.inputLayout, this.list);
76080
+ result.push(this.inputLayout, this.list, this.buttonDismiss);
76121
76081
  return result;
76122
76082
  };
76123
76083
  Object.defineProperty(DDialogSelect.prototype, "inputLayout", {
76124
76084
  get: function () {
76125
- var result = this._inputLayout;
76126
- if (result == null) {
76127
- result = this.newInputLayout();
76128
- this._inputLayout = result;
76129
- }
76130
- return result;
76085
+ var _a;
76086
+ return ((_a = this._inputLayout) !== null && _a !== void 0 ? _a : (this._inputLayout = this.newInputLayout()));
76131
76087
  },
76132
76088
  enumerable: false,
76133
76089
  configurable: true
@@ -76136,33 +76092,9 @@ var DDialogSelect = /** @class */ (function (_super) {
76136
76092
  return new DLayoutHorizontal({
76137
76093
  width: "padding",
76138
76094
  height: "auto",
76139
- children: [this.spaceLeft, this.selectCategory, this.input, this.spaceRight]
76095
+ children: [this.selectCategory, this.input]
76140
76096
  });
76141
76097
  };
76142
- Object.defineProperty(DDialogSelect.prototype, "spaceLeft", {
76143
- get: function () {
76144
- var result = this._spaceLeft;
76145
- if (result == null) {
76146
- result = this.newSpace();
76147
- this._spaceLeft = result;
76148
- }
76149
- return result;
76150
- },
76151
- enumerable: false,
76152
- configurable: true
76153
- });
76154
- Object.defineProperty(DDialogSelect.prototype, "spaceRight", {
76155
- get: function () {
76156
- var result = this._spaceRight;
76157
- if (result == null) {
76158
- result = this.newSpace();
76159
- this._spaceRight = result;
76160
- }
76161
- return result;
76162
- },
76163
- enumerable: false,
76164
- configurable: true
76165
- });
76166
76098
  DDialogSelect.prototype.newSpace = function () {
76167
76099
  return new DLayoutSpace({
76168
76100
  width: this.toInputMargin(this.theme, this._options)
@@ -76170,12 +76102,8 @@ var DDialogSelect = /** @class */ (function (_super) {
76170
76102
  };
76171
76103
  Object.defineProperty(DDialogSelect.prototype, "selectCategory", {
76172
76104
  get: function () {
76173
- var result = this._selectCategory;
76174
- if (result == null) {
76175
- result = this.newSelectCategory();
76176
- this._selectCategory = result;
76177
- }
76178
- return result;
76105
+ var _a;
76106
+ return ((_a = this._selectCategory) !== null && _a !== void 0 ? _a : (this._selectCategory = this.newSelectCategory()));
76179
76107
  },
76180
76108
  enumerable: false,
76181
76109
  configurable: true
@@ -76203,12 +76131,8 @@ var DDialogSelect = /** @class */ (function (_super) {
76203
76131
  };
76204
76132
  Object.defineProperty(DDialogSelect.prototype, "input", {
76205
76133
  get: function () {
76206
- var result = this._input;
76207
- if (result == null) {
76208
- result = this.newInput();
76209
- this._input = result;
76210
- }
76211
- return result;
76134
+ var _a;
76135
+ return ((_a = this._input) !== null && _a !== void 0 ? _a : (this._input = this.newInput()));
76212
76136
  },
76213
76137
  enumerable: false,
76214
76138
  configurable: true
@@ -76242,12 +76166,8 @@ var DDialogSelect = /** @class */ (function (_super) {
76242
76166
  };
76243
76167
  Object.defineProperty(DDialogSelect.prototype, "list", {
76244
76168
  get: function () {
76245
- var result = this._list;
76246
- if (result == null) {
76247
- result = this.newList();
76248
- this._list = result;
76249
- }
76250
- return result;
76169
+ var _a;
76170
+ return ((_a = this._list) !== null && _a !== void 0 ? _a : (this._list = this.newList()));
76251
76171
  },
76252
76172
  enumerable: false,
76253
76173
  configurable: true
@@ -76265,15 +76185,6 @@ var DDialogSelect = /** @class */ (function (_super) {
76265
76185
  if (selected == null) {
76266
76186
  return;
76267
76187
  }
76268
- var options = this._options;
76269
- if (options) {
76270
- var dismiss = options.dismiss;
76271
- if (dismiss) {
76272
- if (selected === dismiss.value) {
76273
- selected = null;
76274
- }
76275
- }
76276
- }
76277
76188
  this._value = selected;
76278
76189
  this.onOk(selected);
76279
76190
  };
@@ -76286,12 +76197,8 @@ var DDialogSelect = /** @class */ (function (_super) {
76286
76197
  };
76287
76198
  Object.defineProperty(DDialogSelect.prototype, "noteError", {
76288
76199
  get: function () {
76289
- var result = this._noteError;
76290
- if (result == null) {
76291
- result = this.newNoteError();
76292
- this._noteError = result;
76293
- }
76294
- return result;
76200
+ var _a;
76201
+ return ((_a = this._noteError) !== null && _a !== void 0 ? _a : (this._noteError = this.newNoteError()));
76295
76202
  },
76296
76203
  enumerable: false,
76297
76204
  configurable: true
@@ -76306,12 +76213,8 @@ var DDialogSelect = /** @class */ (function (_super) {
76306
76213
  };
76307
76214
  Object.defineProperty(DDialogSelect.prototype, "noteNoItemsFound", {
76308
76215
  get: function () {
76309
- var result = this._noteNoItemsFound;
76310
- if (result == null) {
76311
- result = this.newNoteNoItemsFound();
76312
- this._noteNoItemsFound = result;
76313
- }
76314
- return result;
76216
+ var _a;
76217
+ return ((_a = this._noteNoItemsFound) !== null && _a !== void 0 ? _a : (this._noteNoItemsFound = this.newNoteNoItemsFound()));
76315
76218
  },
76316
76219
  enumerable: false,
76317
76220
  configurable: true
@@ -76326,12 +76229,8 @@ var DDialogSelect = /** @class */ (function (_super) {
76326
76229
  };
76327
76230
  Object.defineProperty(DDialogSelect.prototype, "noteSearching", {
76328
76231
  get: function () {
76329
- var result = this._noteSearching;
76330
- if (result == null) {
76331
- result = this.newNoteSearching();
76332
- this._noteSearching = result;
76333
- }
76334
- return result;
76232
+ var _a;
76233
+ return ((_a = this._noteSearching) !== null && _a !== void 0 ? _a : (this._noteSearching = this.newNoteSearching()));
76335
76234
  },
76336
76235
  enumerable: false,
76337
76236
  configurable: true
@@ -76364,12 +76263,8 @@ var DDialogSelect = /** @class */ (function (_super) {
76364
76263
  };
76365
76264
  Object.defineProperty(DDialogSelect.prototype, "search", {
76366
76265
  get: function () {
76367
- var result = this._search;
76368
- if (result == null) {
76369
- result = this.newSearch();
76370
- this._search = result;
76371
- }
76372
- return result;
76266
+ var _a;
76267
+ return ((_a = this._search) !== null && _a !== void 0 ? _a : (this._search = this.newSearch()));
76373
76268
  },
76374
76269
  enumerable: false,
76375
76270
  configurable: true
@@ -76379,28 +76274,73 @@ var DDialogSelect = /** @class */ (function (_super) {
76379
76274
  if (options) {
76380
76275
  var controller = options.controller;
76381
76276
  if (controller) {
76382
- var dismiss = options.dismiss;
76383
76277
  var search = controller.search;
76384
76278
  if ("create" in search) {
76385
- if (dismiss != null) {
76386
- return new DDialogSelectSearhDismissableImpl(search, dismiss);
76387
- }
76388
- else {
76389
- return search;
76390
- }
76279
+ return search;
76391
76280
  }
76392
76281
  else {
76393
- if (dismiss != null) {
76394
- return new DDialogSelectSearhDismissableImpl(new DDialogSelectSearhImpl(search), dismiss);
76395
- }
76396
- else {
76397
- return new DDialogSelectSearhImpl(search);
76398
- }
76282
+ return new DDialogSelectSearhImpl(search);
76399
76283
  }
76400
76284
  }
76401
76285
  }
76402
76286
  return new DDialogSelectSearhImpl();
76403
76287
  };
76288
+ Object.defineProperty(DDialogSelect.prototype, "buttonDismiss", {
76289
+ get: function () {
76290
+ var result = this._buttonDismiss;
76291
+ if (result === undefined) {
76292
+ result = this.newButtonDismiss();
76293
+ this._buttonDismiss = result;
76294
+ }
76295
+ return result;
76296
+ },
76297
+ enumerable: false,
76298
+ configurable: true
76299
+ });
76300
+ DDialogSelect.prototype.newButtonDismiss = function () {
76301
+ var _this = this;
76302
+ var options = this.toButtonDismissOptions(this._options);
76303
+ if (options.enabled === true) {
76304
+ var result = new DButton(options);
76305
+ result.on("active", function () {
76306
+ _this._value = null;
76307
+ _this.onOk(null);
76308
+ });
76309
+ return result;
76310
+ }
76311
+ return null;
76312
+ };
76313
+ DDialogSelect.prototype.toButtonDismissOptions = function (options) {
76314
+ var theme = this.theme;
76315
+ if (options != null) {
76316
+ var dismiss = options.dismiss;
76317
+ if (dismiss != null) {
76318
+ if (dismiss.enabled === undefined) {
76319
+ dismiss.enabled = theme.isDismissable();
76320
+ }
76321
+ if (dismiss.weight === undefined && dismiss.width === undefined) {
76322
+ dismiss.width = "padding";
76323
+ }
76324
+ var text = dismiss.text;
76325
+ if (text === undefined) {
76326
+ dismiss.text = {
76327
+ value: theme.getDismissLabel()
76328
+ };
76329
+ }
76330
+ else if (text.value === undefined) {
76331
+ text.value = theme.getDismissLabel();
76332
+ }
76333
+ return dismiss;
76334
+ }
76335
+ }
76336
+ return {
76337
+ width: "padding",
76338
+ enabled: theme.isDismissable(),
76339
+ text: {
76340
+ value: theme.getDismissLabel()
76341
+ }
76342
+ };
76343
+ };
76404
76344
  Object.defineProperty(DDialogSelect.prototype, "value", {
76405
76345
  get: function () {
76406
76346
  return this._value;
@@ -96618,7 +96558,6 @@ exports.DDialogSelect = DDialogSelect;
96618
96558
  exports.DDialogSelectList = DDialogSelectList;
96619
96559
  exports.DDialogSelectListItem = DDialogSelectListItem;
96620
96560
  exports.DDialogSelectListItemUpdater = DDialogSelectListItemUpdater;
96621
- exports.DDialogSelectSearhDismissableImpl = DDialogSelectSearhDismissableImpl;
96622
96561
  exports.DDialogSelectSearhImpl = DDialogSelectSearhImpl;
96623
96562
  exports.DDialogState = DDialogState;
96624
96563
  exports.DDialogTime = DDialogTime;