@wcardinal/wcardinal-ui 0.333.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.
Files changed (38) hide show
  1. package/dist/types/wcardinal/ui/d-button-select.d.ts +3 -3
  2. package/dist/types/wcardinal/ui/d-dialog-select-search-dismissable-impl.d.ts +7 -7
  3. package/dist/types/wcardinal/ui/d-dialog-select-search-dismissable.d.ts +4 -4
  4. package/dist/types/wcardinal/ui/d-dialog-select-search-impl.d.ts +4 -4
  5. package/dist/types/wcardinal/ui/d-dialog-select-search.d.ts +2 -2
  6. package/dist/types/wcardinal/ui/d-dialog-select.d.ts +42 -14
  7. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.d.ts +2 -0
  8. package/dist/types/wcardinal/ui/theme/white/d-theme-white-dialog-select.d.ts +2 -0
  9. package/dist/types/wcardinal/ui/util/index.d.ts +1 -0
  10. package/dist/types/wcardinal/ui/util/to-id.d.ts +1 -0
  11. package/dist/wcardinal/ui/d-button-select.js +2 -37
  12. package/dist/wcardinal/ui/d-button-select.js.map +1 -1
  13. package/dist/wcardinal/ui/d-dialog-select-search-dismissable-impl.js.map +1 -1
  14. package/dist/wcardinal/ui/d-dialog-select-search-dismissable.js.map +1 -1
  15. package/dist/wcardinal/ui/d-dialog-select-search-impl.js +1 -1
  16. package/dist/wcardinal/ui/d-dialog-select-search-impl.js.map +1 -1
  17. package/dist/wcardinal/ui/d-dialog-select-search.js.map +1 -1
  18. package/dist/wcardinal/ui/d-dialog-select.js +162 -15
  19. package/dist/wcardinal/ui/d-dialog-select.js.map +1 -1
  20. package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.js +9 -1
  21. package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.js.map +1 -1
  22. package/dist/wcardinal/ui/theme/white/d-theme-white-dialog-select.js +9 -1
  23. package/dist/wcardinal/ui/theme/white/d-theme-white-dialog-select.js.map +1 -1
  24. package/dist/wcardinal/ui/util/index.js +1 -0
  25. package/dist/wcardinal/ui/util/index.js.map +1 -1
  26. package/dist/wcardinal/ui/util/to-id.js +27 -0
  27. package/dist/wcardinal/ui/util/to-id.js.map +1 -0
  28. package/dist/wcardinal-ui-theme-dark.js +10 -2
  29. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  30. package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
  31. package/dist/wcardinal-ui-theme-white.js +10 -2
  32. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  33. package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
  34. package/dist/wcardinal-ui.cjs.js +203 -56
  35. package/dist/wcardinal-ui.js +189 -54
  36. package/dist/wcardinal-ui.min.js +2 -2
  37. package/dist/wcardinal-ui.min.js.map +1 -1
  38. package/package.json +1 -1
@@ -14,6 +14,9 @@ import { DNoteSmallNoItemsFound } from "./d-note-small-no-items-found";
14
14
  import { DNoteSmallSearching } from "./d-note-small-searching";
15
15
  import { UtilTransition } from "./util/util-transition";
16
16
  import { DDialogSelectSearhDismissableImpl } from "./d-dialog-select-search-dismissable-impl";
17
+ import { DSelect } from "./d-select";
18
+ import { DMenu } from "./d-menu";
19
+ import { isArray } from "./util/is-array";
17
20
  var DDialogSelect = /** @class */ (function (_super) {
18
21
  __extends(DDialogSelect, _super);
19
22
  function DDialogSelect(options) {
@@ -54,7 +57,7 @@ var DDialogSelect = /** @class */ (function (_super) {
54
57
  get: function () {
55
58
  var result = this._inputLayout;
56
59
  if (result == null) {
57
- result = this.newInputLayout(this.input, this.theme, this._options);
60
+ result = this.newInputLayout();
58
61
  this._inputLayout = result;
59
62
  }
60
63
  return result;
@@ -62,20 +65,78 @@ var DDialogSelect = /** @class */ (function (_super) {
62
65
  enumerable: false,
63
66
  configurable: true
64
67
  });
65
- DDialogSelect.prototype.newInputLayout = function (input, theme, options) {
66
- return new DLayoutHorizontal(this.toInputLayoutOptions(input, theme, options));
67
- };
68
- DDialogSelect.prototype.toInputLayoutOptions = function (input, theme, options) {
69
- var margin = this.toInputMargin(theme, options);
70
- return {
68
+ DDialogSelect.prototype.newInputLayout = function () {
69
+ return new DLayoutHorizontal({
71
70
  width: "padding",
72
71
  height: "auto",
73
- children: [
74
- new DLayoutSpace({ width: margin }),
75
- input,
76
- new DLayoutSpace({ width: margin })
77
- ]
78
- };
72
+ children: [this.spaceLeft, this.selectCategory, this.input, this.spaceRight]
73
+ });
74
+ };
75
+ Object.defineProperty(DDialogSelect.prototype, "spaceLeft", {
76
+ get: function () {
77
+ var result = this._spaceLeft;
78
+ if (result == null) {
79
+ result = this.newSpace();
80
+ this._spaceLeft = result;
81
+ }
82
+ return result;
83
+ },
84
+ enumerable: false,
85
+ configurable: true
86
+ });
87
+ Object.defineProperty(DDialogSelect.prototype, "spaceRight", {
88
+ get: function () {
89
+ var result = this._spaceRight;
90
+ if (result == null) {
91
+ result = this.newSpace();
92
+ this._spaceRight = result;
93
+ }
94
+ return result;
95
+ },
96
+ enumerable: false,
97
+ configurable: true
98
+ });
99
+ DDialogSelect.prototype.newSpace = function () {
100
+ return new DLayoutSpace({
101
+ width: this.toInputMargin(this.theme, this._options)
102
+ });
103
+ };
104
+ Object.defineProperty(DDialogSelect.prototype, "selectCategory", {
105
+ get: function () {
106
+ var result = this._selectCategory;
107
+ if (result === undefined) {
108
+ result = this.newSelectCategory();
109
+ this._selectCategory = result;
110
+ }
111
+ return result;
112
+ },
113
+ enumerable: false,
114
+ configurable: true
115
+ });
116
+ DDialogSelect.prototype.newSelectCategory = function () {
117
+ var _this = this;
118
+ var options = this._options;
119
+ if (options != null) {
120
+ var controller = options.controller;
121
+ if (controller != null && controller.getCategories != null) {
122
+ var result = new DSelect(this.toSelectCategoryOptions(this.theme, this._options));
123
+ result.on("change", function (value) {
124
+ _this.onSelectCategoryChange(value);
125
+ });
126
+ return result;
127
+ }
128
+ }
129
+ return null;
130
+ };
131
+ DDialogSelect.prototype.toSelectCategoryOptions = function (theme, options) {
132
+ var result = (options === null || options === void 0 ? void 0 : options.category) || {};
133
+ if (result.width === undefined && result.weight === undefined) {
134
+ result.width = 140;
135
+ }
136
+ return result;
137
+ };
138
+ DDialogSelect.prototype.onSelectCategoryChange = function (categoryId) {
139
+ this.search.create([this.input.value, categoryId]);
79
140
  };
80
141
  Object.defineProperty(DDialogSelect.prototype, "input", {
81
142
  get: function () {
@@ -93,7 +154,7 @@ var DDialogSelect = /** @class */ (function (_super) {
93
154
  var _this = this;
94
155
  var result = new DInputSearch(this.toInputOptions(this.theme, this._options));
95
156
  result.on("input", function (value) {
96
- _this.search.create([value]);
157
+ _this.onInputInput(value);
97
158
  });
98
159
  return result;
99
160
  };
@@ -108,6 +169,10 @@ var DDialogSelect = /** @class */ (function (_super) {
108
169
  var _a, _b;
109
170
  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();
110
171
  };
172
+ DDialogSelect.prototype.onInputInput = function (value) {
173
+ var _a, _b;
174
+ this.search.create([value, (_b = (_a = this.selectCategory) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null]);
175
+ };
111
176
  Object.defineProperty(DDialogSelect.prototype, "list", {
112
177
  get: function () {
113
178
  var result = this._list;
@@ -286,9 +351,91 @@ var DDialogSelect = /** @class */ (function (_super) {
286
351
  return "DDialogSelect";
287
352
  };
288
353
  DDialogSelect.prototype.onOpen = function () {
354
+ var _this = this;
289
355
  _super.prototype.onOpen.call(this);
290
356
  this.list.selection.clear();
291
- this.search.create([this.input.value]);
357
+ var selectCategory = this.selectCategory;
358
+ if (selectCategory != null) {
359
+ if (this._isCategoryFetched !== true) {
360
+ this._isCategoryFetched = true;
361
+ var categoriesOrPromise = this.findCategories();
362
+ if (categoriesOrPromise == null) {
363
+ this.search.create([this.input.value, null]);
364
+ }
365
+ else if (isArray(categoriesOrPromise)) {
366
+ this.onCategoryFetched(selectCategory, categoriesOrPromise);
367
+ }
368
+ else {
369
+ selectCategory.state.isEnabled = false;
370
+ categoriesOrPromise.then(function (categories) {
371
+ selectCategory.state.isEnabled = true;
372
+ _this.onCategoryFetched(selectCategory, categories);
373
+ });
374
+ }
375
+ }
376
+ else {
377
+ this.search.create([this.input.value, selectCategory.value]);
378
+ }
379
+ }
380
+ else {
381
+ this.search.create([this.input.value, null]);
382
+ }
383
+ };
384
+ DDialogSelect.prototype.onCategoryFetched = function (selectCategory, categories) {
385
+ var items = [];
386
+ for (var i = 0, imax = categories.length; i < imax; ++i) {
387
+ var category = categories[i];
388
+ items.push({
389
+ value: this.toCategoryId(category),
390
+ text: {
391
+ value: this.toCategoryLabel(category)
392
+ }
393
+ });
394
+ }
395
+ selectCategory.menu = new DMenu({
396
+ fit: true,
397
+ items: items
398
+ });
399
+ var newValue = 0 < items.length ? items[0].value : null;
400
+ selectCategory.value = newValue;
401
+ selectCategory.show();
402
+ this.search.create([this.input.value, newValue]);
403
+ };
404
+ DDialogSelect.prototype.toCategoryId = function (target) {
405
+ var options = this._options;
406
+ if (options != null) {
407
+ var category = options.category;
408
+ if (category != null) {
409
+ var toId = category.toId;
410
+ if (toId != null) {
411
+ return toId(target);
412
+ }
413
+ }
414
+ }
415
+ return this.theme.toCategoryId(target);
416
+ };
417
+ DDialogSelect.prototype.toCategoryLabel = function (target) {
418
+ var options = this._options;
419
+ if (options != null) {
420
+ var category = options.category;
421
+ if (category != null) {
422
+ var toLabel = category.toLabel;
423
+ if (toLabel != null) {
424
+ return toLabel(target);
425
+ }
426
+ }
427
+ }
428
+ return this.theme.toCategoryLabel(target);
429
+ };
430
+ DDialogSelect.prototype.findCategories = function () {
431
+ var options = this._options;
432
+ if (options != null) {
433
+ var controller = options.controller;
434
+ if (controller != null && controller.getCategories != null) {
435
+ return controller.getCategories();
436
+ }
437
+ }
438
+ return null;
292
439
  };
293
440
  DDialogSelect.prototype.onOk = function (value) {
294
441
  this.emit("select", value, this);
@@ -1 +1 @@
1
- {"version":3,"file":"d-dialog-select.js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AAK,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACxC,CAAC;IAES,4BAAI,GAAd,UAAe,KAA+C;QAC7D,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACjC,iBAAM,IAAI,YAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAED,+BAAO,GAAP;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,KAAK,EAAE;YACV,KAAK,CAAC,OAAO,EAAE,CAAC;SAChB;QACD,IAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,SAAS,EAAE;YACd,SAAS,CAAC,OAAO,EAAE,CAAC;SACpB;QACD,IAAM,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAChD,IAAI,gBAAgB,EAAE;YACrB,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,EAAE,CAAC;SAC5B;QACD,IAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;QAC1C,IAAI,aAAa,EAAE;YAClB,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,EAAE,CAAC;SACzB;QACD,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,EAAE,CAAC;SACf;QACD,iBAAM,OAAO,WAAE,CAAC;IACjB,CAAC;IACF,oBAAC;AAAD,CAAC,AAzTD,CAIU,cAAc,GAqTvB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DisplayObject } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport {\n\tDDialogLayered,\n\tDDialogLayeredEvents,\n\tDDialogLayeredOptions,\n\tDThemeDialogLayered\n} from \"./d-dialog-layered\";\nimport { DDialogSelectList, DDialogSelectListOptions } from \"./d-dialog-select-list\";\nimport { DDialogSelectSearhImpl } from \"./d-dialog-select-search-impl\";\nimport { DInputSearch, DInputSearchOptions } from \"./d-input-search\";\nimport { DLayoutHorizontal, DLayoutHorizontalOptions } from \"./d-layout-horizontal\";\nimport { DLayoutSpace } from \"./d-layout-space\";\nimport { DListOptions } from \"./d-list\";\nimport { DListDataSelection } from \"./d-list-data-selection\";\nimport { DNote, DNoteOptions } from \"./d-note\";\nimport { DNoteSmallError } from \"./d-note-small-error\";\nimport { DNoteSmallNoItemsFound } from \"./d-note-small-no-items-found\";\nimport { DNoteSmallSearching } from \"./d-note-small-searching\";\nimport { DOnOptions } from \"./d-on-options\";\nimport { UtilTransition } from \"./util/util-transition\";\nimport { DDialogSelectSearch } from \"./d-dialog-select-search\";\nimport { DDialogSelectSearhDismissableOptions } from \"./d-dialog-select-search-dismissable\";\nimport { DDialogSelectSearhDismissableImpl } from \"./d-dialog-select-search-dismissable-impl\";\n\nexport interface DDialogSelectInputOpitons extends DInputSearchOptions {\n\tmargin?: number;\n}\n\n/**\n * {@link DDialogSelect} search function.\n */\nexport type DDialogSelectSearchFunction<VALUE> = (word: string) => Promise<VALUE[]>;\n\n/**\n * {@link DDialogSelect} controller.\n */\nexport interface DDialogSelectController<VALUE> {\n\tsearch: DDialogSelectSearch<VALUE> | DDialogSelectSearchFunction<VALUE>;\n}\n\n/**\n * {@link DDialogSelect} note options.\n */\nexport interface DDialogSelectNoteOptions {\n\terror?: DNoteOptions | null;\n\tnoItemsFound?: DNoteOptions | null;\n\tsearching?: DNoteOptions | null;\n}\n\nexport type DDialogSelectItemToLabel<VALUE> = (result: VALUE, caller: any) => string;\n\nexport type DDialogSelectItemIsEqual<VALUE> = (a: VALUE, b: VALUE, caller: any) => boolean;\n\n/**\n * {@link DDialogSelect} events.\n */\nexport interface DDialogSelectEvents<VALUE, EMITTER> extends DDialogLayeredEvents<VALUE, EMITTER> {\n\tselect(value: VALUE, self: EMITTER): void;\n}\n\n/**\n * {@link DDialogSelect} \"on\" options.\n */\nexport interface DDialogSelectOnOptions<VALUE, EMITTER>\n\textends Partial<DDialogSelectEvents<VALUE, EMITTER>>,\n\t\tDOnOptions {}\n\n/**\n * {@link DDialogSelect} options.\n */\nexport interface DDialogSelectOptions<\n\tVALUE,\n\tTHEME extends DThemeDialogSelect<VALUE> = DThemeDialogSelect<VALUE>,\n\tEMITTER = any\n> extends DDialogLayeredOptions<VALUE, THEME> {\n\tcontroller?: DDialogSelectController<VALUE>;\n\tdismiss?: DDialogSelectSearhDismissableOptions<VALUE>;\n\tinput?: DDialogSelectInputOpitons;\n\tlist?: DListOptions<VALUE>;\n\tnote?: DDialogSelectNoteOptions;\n\ton?: DDialogSelectOnOptions<VALUE, EMITTER>;\n}\n\n/**\n * {@link DDialogSelect} theme.\n */\nexport interface DThemeDialogSelect<VALUE = unknown> extends DThemeDialogLayered {\n\tgetInputMargin(): number;\n}\n\nexport class DDialogSelect<\n\tVALUE = unknown,\n\tTHEME extends DThemeDialogSelect<VALUE> = DThemeDialogSelect<VALUE>,\n\tOPTIONS extends DDialogSelectOptions<VALUE, THEME> = DDialogSelectOptions<VALUE, THEME>\n> extends DDialogLayered<VALUE | null, THEME, OPTIONS> {\n\tprotected _value: VALUE | null;\n\tprotected _input?: DInputSearch;\n\tprotected _inputLayout?: DLayoutHorizontal;\n\tprotected _list?: DDialogSelectList<VALUE>;\n\tprotected _search?: DDialogSelectSearch<VALUE>;\n\tprotected _noteError?: DNote | null;\n\tprotected _noteNoItemsFound?: DNote | null;\n\tprotected _noteSearching?: DNote | null;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis._value = null;\n\n\t\t// Controller binding\n\t\tconst transition = new UtilTransition();\n\t\tconst search = this.search;\n\t\tsearch.on(\"success\", (e: unknown, results: VALUE[]): void => {\n\t\t\tif (0 < results.length) {\n\t\t\t\ttransition.hide();\n\t\t\t} else {\n\t\t\t\ttransition.show(this.noteNoItemsFound);\n\t\t\t}\n\t\t\tthis.onSearched(results);\n\t\t});\n\t\tsearch.on(\"fail\", (): void => {\n\t\t\ttransition.show(this.noteError);\n\t\t\tthis.onSearched([]);\n\t\t});\n\t\tsearch.on(\"change\", (): void => {\n\t\t\tif (!search.isDone()) {\n\t\t\t\tconst noteSearching = this.noteSearching;\n\t\t\t\tif (noteSearching) {\n\t\t\t\t\ttransition.show(noteSearching);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected newContentChildren(theme: THEME, options?: OPTIONS): Array<DisplayObject | null> {\n\t\tconst result = super.newContentChildren(theme, options);\n\t\tresult.push(this.inputLayout, this.list);\n\t\treturn result;\n\t}\n\n\tprotected get inputLayout(): DLayoutHorizontal {\n\t\tlet result = this._inputLayout;\n\t\tif (result == null) {\n\t\t\tresult = this.newInputLayout(this.input, this.theme, this._options);\n\t\t\tthis._inputLayout = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newInputLayout(\n\t\tinput: DInputSearch,\n\t\ttheme: THEME,\n\t\toptions: OPTIONS | undefined\n\t): DLayoutHorizontal {\n\t\treturn new DLayoutHorizontal(this.toInputLayoutOptions(input, theme, options));\n\t}\n\n\tprotected toInputLayoutOptions(\n\t\tinput: DInputSearch,\n\t\ttheme: THEME,\n\t\toptions: OPTIONS | undefined\n\t): DLayoutHorizontalOptions {\n\t\tconst margin = this.toInputMargin(theme, options);\n\t\treturn {\n\t\t\twidth: \"padding\",\n\t\t\theight: \"auto\",\n\t\t\tchildren: [\n\t\t\t\tnew DLayoutSpace({ width: margin }),\n\t\t\t\tinput,\n\t\t\t\tnew DLayoutSpace({ width: margin })\n\t\t\t]\n\t\t};\n\t}\n\n\tget input(): DInputSearch {\n\t\tlet result = this._input;\n\t\tif (result == null) {\n\t\t\tresult = this.newInput();\n\t\t\tthis._input = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newInput(): DInputSearch {\n\t\tconst result = new DInputSearch(this.toInputOptions(this.theme, this._options));\n\t\tresult.on(\"input\", (value: string): void => {\n\t\t\tthis.search.create([value]);\n\t\t});\n\t\treturn result;\n\t}\n\n\tprotected toInputOptions(theme: THEME, options?: OPTIONS): DInputSearchOptions {\n\t\tconst result = options?.input || {};\n\t\tif (result.width === undefined && result.weight === undefined) {\n\t\t\tresult.weight = 1;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected toInputMargin(theme: THEME, options?: OPTIONS): number {\n\t\treturn options?.input?.margin ?? theme.getInputMargin();\n\t}\n\n\tget list(): DDialogSelectList<VALUE> {\n\t\tlet result = this._list;\n\t\tif (result == null) {\n\t\t\tresult = this.newList();\n\t\t\tthis._list = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newList(): DDialogSelectList<VALUE> {\n\t\tconst result = new DDialogSelectList<VALUE>(this.toListOptions(this.theme, this._options));\n\t\tresult.selection.on(\"change\", (selection: DListDataSelection<VALUE>): void => {\n\t\t\tthis.onListSelectionChange(selection);\n\t\t});\n\t\treturn result;\n\t}\n\n\tprotected onListSelectionChange(selection: DListDataSelection<VALUE>): void {\n\t\tlet selected = selection.first;\n\t\tif (selected == null) {\n\t\t\treturn;\n\t\t}\n\t\tconst options = this._options;\n\t\tif (options) {\n\t\t\tconst dismiss = options.dismiss;\n\t\t\tif (dismiss) {\n\t\t\t\tif (selected === dismiss.value) {\n\t\t\t\t\tselected = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._value = selected;\n\t\tthis.onOk(selected);\n\t}\n\n\tprotected toListOptions(theme: THEME, options?: OPTIONS): DDialogSelectListOptions<VALUE> {\n\t\tconst result = options?.list || {};\n\t\tif (result.width === undefined) {\n\t\t\tresult.width = \"padding\";\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected get noteError(): DNote | null {\n\t\tlet result = this._noteError;\n\t\tif (result == null) {\n\t\t\tresult = this.newNoteError();\n\t\t\tthis._noteError = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newNoteError(): DNote | null {\n\t\tconst error = this._options?.note?.error;\n\t\tif (error !== null) {\n\t\t\treturn new DNoteSmallError(this.toNoteOptions(this.list, error));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected get noteNoItemsFound(): DNote | null {\n\t\tlet result = this._noteNoItemsFound;\n\t\tif (result == null) {\n\t\t\tresult = this.newNoteNoItemsFound();\n\t\t\tthis._noteNoItemsFound = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newNoteNoItemsFound(): DNote | null {\n\t\tconst noItemsFound = this._options?.note?.noItemsFound;\n\t\tif (noItemsFound !== null) {\n\t\t\treturn new DNoteSmallNoItemsFound(this.toNoteOptions(this.list, noItemsFound));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected get noteSearching(): DNote | null {\n\t\tlet result = this._noteSearching;\n\t\tif (result == null) {\n\t\t\tresult = this.newNoteSearching();\n\t\t\tthis._noteSearching = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newNoteSearching(): DNote | null {\n\t\tconst searching = this._options?.note?.searching;\n\t\t// Because the `searching` note is disabled by default,\n\t\t// if options.searching is missing, i.e., if its value is undefined,\n\t\t// this method returns null. This is why `!=` is used here instead of `!==`.\n\t\tif (searching != null) {\n\t\t\treturn new DNoteSmallSearching(this.toNoteOptions(this.list, searching));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected toNoteOptions(parent: DBase, options?: DNoteOptions): DNoteOptions {\n\t\tif (options != null) {\n\t\t\tif (options.parent == null) {\n\t\t\t\toptions.parent = parent;\n\t\t\t}\n\t\t\tif (options.visible == null) {\n\t\t\t\toptions.visible = false;\n\t\t\t}\n\t\t\treturn options;\n\t\t}\n\t\treturn {\n\t\t\tparent,\n\t\t\tvisible: false\n\t\t};\n\t}\n\n\tprotected get search(): DDialogSelectSearch<VALUE> {\n\t\tlet result = this._search;\n\t\tif (result == null) {\n\t\t\tresult = this.newSearch();\n\t\t\tthis._search = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newSearch(): DDialogSelectSearch<VALUE> {\n\t\tconst options = this._options;\n\t\tif (options) {\n\t\t\tconst controller = options.controller;\n\t\t\tif (controller) {\n\t\t\t\tconst dismiss = options.dismiss;\n\t\t\t\tconst search = controller.search;\n\t\t\t\tif (\"create\" in search) {\n\t\t\t\t\tif (dismiss != null) {\n\t\t\t\t\t\treturn new DDialogSelectSearhDismissableImpl(search, dismiss);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn search;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (dismiss != null) {\n\t\t\t\t\t\treturn new DDialogSelectSearhDismissableImpl(\n\t\t\t\t\t\t\tnew DDialogSelectSearhImpl(search),\n\t\t\t\t\t\t\tdismiss\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn new DDialogSelectSearhImpl(search);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new DDialogSelectSearhImpl();\n\t}\n\n\tget value(): VALUE | null {\n\t\treturn this._value;\n\t}\n\n\tprotected onSearched(results: VALUE[]): void {\n\t\tthis.list.data.items = results;\n\t}\n\n\tprotected getResolvedValue(): VALUE | null | PromiseLike<VALUE | null> {\n\t\treturn this._value;\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DDialogSelect\";\n\t}\n\n\tprotected onOpen(): void {\n\t\tsuper.onOpen();\n\t\tthis.list.selection.clear();\n\t\tthis.search.create([this.input.value]);\n\t}\n\n\tprotected onOk(value: VALUE | null | PromiseLike<VALUE | null>): void {\n\t\tthis.emit(\"select\", value, this);\n\t\tsuper.onOk(value);\n\t}\n\n\tdestroy(): void {\n\t\tconst input = this._input;\n\t\tif (input) {\n\t\t\tinput.destroy();\n\t\t}\n\t\tconst noteError = this._noteError;\n\t\tif (noteError) {\n\t\t\tnoteError.destroy();\n\t\t}\n\t\tconst noteNoItemsFound = this._noteNoItemsFound;\n\t\tif (noteNoItemsFound) {\n\t\t\tnoteNoItemsFound?.destroy();\n\t\t}\n\t\tconst noteSearching = this._noteSearching;\n\t\tif (noteSearching) {\n\t\t\tnoteSearching?.destroy();\n\t\t}\n\t\tconst list = this._list;\n\t\tif (list) {\n\t\t\tlist.destroy();\n\t\t}\n\t\tsuper.destroy();\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-dialog-select.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-dialog-select.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EACN,cAAc,EAId,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAA4B,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAuB,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIhD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AAC9F,OAAO,EAAE,OAAO,EAAkB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA6F1C;IAeU,iCAA4C;IAcrD,uBAAY,OAAiB;QAA7B,YACC,kBAAM,OAAO,CAAC,SA2Bd;QAzBA,KAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAEnB,qBAAqB;QACrB,IAAM,UAAU,GAAG,IAAI,cAAc,EAAE,C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AAC;AAAD,CAAC,AAhdD,CAeU,cAAc,GAicvB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DisplayObject } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport {\n\tDDialogLayered,\n\tDDialogLayeredEvents,\n\tDDialogLayeredOptions,\n\tDThemeDialogLayered\n} from \"./d-dialog-layered\";\nimport { DDialogSelectList, DDialogSelectListOptions } from \"./d-dialog-select-list\";\nimport { DDialogSelectSearhImpl } from \"./d-dialog-select-search-impl\";\nimport { DInputSearch, DInputSearchOptions } from \"./d-input-search\";\nimport { DLayoutHorizontal } from \"./d-layout-horizontal\";\nimport { DLayoutSpace } from \"./d-layout-space\";\nimport { DListOptions } from \"./d-list\";\nimport { DListDataSelection } from \"./d-list-data-selection\";\nimport { DNote, DNoteOptions } from \"./d-note\";\nimport { DNoteSmallError } from \"./d-note-small-error\";\nimport { DNoteSmallNoItemsFound } from \"./d-note-small-no-items-found\";\nimport { DNoteSmallSearching } from \"./d-note-small-searching\";\nimport { DOnOptions } from \"./d-on-options\";\nimport { UtilTransition } from \"./util/util-transition\";\nimport { DDialogSelectSearch } from \"./d-dialog-select-search\";\nimport { DDialogSelectSearhDismissableOptions } from \"./d-dialog-select-search-dismissable\";\nimport { DDialogSelectSearhDismissableImpl } from \"./d-dialog-select-search-dismissable-impl\";\nimport { DSelect, DSelectOptions } from \"./d-select\";\nimport { DMenu } from \"./d-menu\";\nimport { isArray } from \"./util/is-array\";\n\nexport interface DDialogSelectInputOpitons extends DInputSearchOptions {\n\tmargin?: number;\n}\n\n/**\n * {@link DDialogSelect} search function.\n */\nexport type DDialogSelectSearchFunction<VALUE, CATEGORY, CATEGORY_ID> = (\n\tword: string,\n\tcategoryId: CATEGORY_ID\n) => Promise<VALUE[]>;\n\n/**\n * {@link DDialogSelect} controller.\n */\nexport interface DDialogSelectController<VALUE, CATEGORY, CATEGORY_ID> {\n\tsearch:\n\t\t| DDialogSelectSearch<VALUE, CATEGORY, CATEGORY_ID>\n\t\t| DDialogSelectSearchFunction<VALUE, CATEGORY, CATEGORY_ID>;\n\tgetCategories?: () => Promise<CATEGORY[]>;\n}\n\n/**\n * {@link DDialogSelect} note options.\n */\nexport interface DDialogSelectNoteOptions {\n\terror?: DNoteOptions | null;\n\tnoItemsFound?: DNoteOptions | null;\n\tsearching?: DNoteOptions | null;\n}\n\nexport type DDialogSelectItemToLabel<VALUE> = (result: VALUE, caller: any) => string;\n\nexport type DDialogSelectItemIsEqual<VALUE> = (a: VALUE, b: VALUE, caller: any) => boolean;\n\n/**\n * {@link DDialogSelect} events.\n */\nexport interface DDialogSelectEvents<VALUE, EMITTER> extends DDialogLayeredEvents<VALUE, EMITTER> {\n\tselect(value: VALUE, self: EMITTER): void;\n}\n\n/**\n * {@link DDialogSelect} category options.\n */\nexport interface DDialogSelectCategoryOptions<VALUE, CATEGORY, CATEGORY_ID>\n\textends DSelectOptions<CATEGORY_ID> {\n\ttoId?: (category: CATEGORY) => CATEGORY_ID;\n\ttoLabel?: (category: CATEGORY) => string;\n}\n\n/**\n * {@link DDialogSelect} \"on\" options.\n */\nexport interface DDialogSelectOnOptions<VALUE, EMITTER>\n\textends Partial<DDialogSelectEvents<VALUE, EMITTER>>,\n\t\tDOnOptions {}\n\n/**\n * {@link DDialogSelect} options.\n */\nexport interface DDialogSelectOptions<\n\tVALUE,\n\tCATEGORY = unknown,\n\tCATEGORY_ID = unknown,\n\tTHEME extends DThemeDialogSelect<VALUE, CATEGORY, CATEGORY_ID> = DThemeDialogSelect<\n\t\tVALUE,\n\t\tCATEGORY,\n\t\tCATEGORY_ID\n\t>,\n\tEMITTER = any\n> extends DDialogLayeredOptions<VALUE, THEME> {\n\tcontroller?: DDialogSelectController<VALUE, CATEGORY, CATEGORY_ID>;\n\tcategory?: DDialogSelectCategoryOptions<VALUE, CATEGORY, CATEGORY_ID>;\n\tdismiss?: DDialogSelectSearhDismissableOptions<VALUE, CATEGORY, CATEGORY_ID>;\n\tinput?: DDialogSelectInputOpitons;\n\tlist?: DListOptions<VALUE>;\n\tnote?: DDialogSelectNoteOptions;\n\ton?: DDialogSelectOnOptions<VALUE, EMITTER>;\n}\n\n/**\n * {@link DDialogSelect} theme.\n */\nexport interface DThemeDialogSelect<VALUE = unknown, CATEGORY = unknown, CATEGORY_ID = unknown>\n\textends DThemeDialogLayered {\n\tgetInputMargin(): number;\n\ttoCategoryId(category: CATEGORY): CATEGORY_ID;\n\ttoCategoryLabel(category: CATEGORY): string;\n}\n\nexport class DDialogSelect<\n\tVALUE = unknown,\n\tCATEGORY = unknown,\n\tCATEGORY_ID = unknown,\n\tTHEME extends DThemeDialogSelect<VALUE, CATEGORY, CATEGORY_ID> = DThemeDialogSelect<\n\t\tVALUE,\n\t\tCATEGORY,\n\t\tCATEGORY_ID\n\t>,\n\tOPTIONS extends DDialogSelectOptions<\n\t\tVALUE,\n\t\tCATEGORY,\n\t\tCATEGORY_ID,\n\t\tTHEME\n\t> = DDialogSelectOptions<VALUE, CATEGORY, CATEGORY_ID, THEME>\n> extends DDialogLayered<VALUE | null, THEME, OPTIONS> {\n\tprotected _value: VALUE | null;\n\tprotected _spaceLeft?: DLayoutSpace;\n\tprotected _spaceRight?: DLayoutSpace;\n\tprotected _selectCategory?: DSelect<CATEGORY_ID> | null;\n\tprotected _isCategoryFetched?: boolean;\n\tprotected _input?: DInputSearch;\n\tprotected _inputLayout?: DLayoutHorizontal;\n\tprotected _list?: DDialogSelectList<VALUE>;\n\tprotected _search?: DDialogSelectSearch<VALUE, CATEGORY, CATEGORY_ID>;\n\tprotected _noteError?: DNote | null;\n\tprotected _noteNoItemsFound?: DNote | null;\n\tprotected _noteSearching?: DNote | null;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis._value = null;\n\n\t\t// Controller binding\n\t\tconst transition = new UtilTransition();\n\t\tconst search = this.search;\n\t\tsearch.on(\"success\", (e: unknown, results: VALUE[]): void => {\n\t\t\tif (0 < results.length) {\n\t\t\t\ttransition.hide();\n\t\t\t} else {\n\t\t\t\ttransition.show(this.noteNoItemsFound);\n\t\t\t}\n\t\t\tthis.onSearched(results);\n\t\t});\n\t\tsearch.on(\"fail\", (): void => {\n\t\t\ttransition.show(this.noteError);\n\t\t\tthis.onSearched([]);\n\t\t});\n\t\tsearch.on(\"change\", (): void => {\n\t\t\tif (!search.isDone()) {\n\t\t\t\tconst noteSearching = this.noteSearching;\n\t\t\t\tif (noteSearching) {\n\t\t\t\t\ttransition.show(noteSearching);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected newContentChildren(theme: THEME, options?: OPTIONS): Array<DisplayObject | null> {\n\t\tconst result = super.newContentChildren(theme, options);\n\t\tresult.push(this.inputLayout, this.list);\n\t\treturn result;\n\t}\n\n\tprotected get inputLayout(): DLayoutHorizontal {\n\t\tlet result = this._inputLayout;\n\t\tif (result == null) {\n\t\t\tresult = this.newInputLayout();\n\t\t\tthis._inputLayout = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newInputLayout(): DLayoutHorizontal {\n\t\treturn new DLayoutHorizontal({\n\t\t\twidth: \"padding\",\n\t\t\theight: \"auto\",\n\t\t\tchildren: [this.spaceLeft, this.selectCategory, this.input, this.spaceRight]\n\t\t});\n\t}\n\n\tprotected get spaceLeft(): DLayoutSpace {\n\t\tlet result = this._spaceLeft;\n\t\tif (result == null) {\n\t\t\tresult = this.newSpace();\n\t\t\tthis._spaceLeft = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected get spaceRight(): DLayoutSpace {\n\t\tlet result = this._spaceRight;\n\t\tif (result == null) {\n\t\t\tresult = this.newSpace();\n\t\t\tthis._spaceRight = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newSpace(): DLayoutSpace {\n\t\treturn new DLayoutSpace({\n\t\t\twidth: this.toInputMargin(this.theme, this._options)\n\t\t});\n\t}\n\n\tprotected get selectCategory(): DSelect<CATEGORY_ID> | null {\n\t\tlet result = this._selectCategory;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newSelectCategory();\n\t\t\tthis._selectCategory = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newSelectCategory(): DSelect<CATEGORY_ID> | null {\n\t\tconst options = this._options;\n\t\tif (options != null) {\n\t\t\tconst controller = options.controller;\n\t\t\tif (controller != null && controller.getCategories != null) {\n\t\t\t\tconst result = new DSelect<CATEGORY_ID>(\n\t\t\t\t\tthis.toSelectCategoryOptions(this.theme, this._options)\n\t\t\t\t);\n\t\t\t\tresult.on(\"change\", (value: CATEGORY_ID) => {\n\t\t\t\t\tthis.onSelectCategoryChange(value);\n\t\t\t\t});\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected toSelectCategoryOptions(\n\t\ttheme: THEME,\n\t\toptions?: OPTIONS\n\t): DSelectOptions<CATEGORY_ID> {\n\t\tconst result = options?.category || {};\n\t\tif (result.width === undefined && result.weight === undefined) {\n\t\t\tresult.width = 140;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected onSelectCategoryChange(categoryId: CATEGORY_ID): void {\n\t\tthis.search.create([this.input.value, categoryId]);\n\t}\n\n\tget input(): DInputSearch {\n\t\tlet result = this._input;\n\t\tif (result == null) {\n\t\t\tresult = this.newInput();\n\t\t\tthis._input = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newInput(): DInputSearch {\n\t\tconst result = new DInputSearch(this.toInputOptions(this.theme, this._options));\n\t\tresult.on(\"input\", (value: string): void => {\n\t\t\tthis.onInputInput(value);\n\t\t});\n\t\treturn result;\n\t}\n\n\tprotected toInputOptions(theme: THEME, options?: OPTIONS): DInputSearchOptions {\n\t\tconst result = options?.input || {};\n\t\tif (result.width === undefined && result.weight === undefined) {\n\t\t\tresult.weight = 1;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected toInputMargin(theme: THEME, options?: OPTIONS): number {\n\t\treturn options?.input?.margin ?? theme.getInputMargin();\n\t}\n\n\tprotected onInputInput(value: string): void {\n\t\tthis.search.create([value, this.selectCategory?.value ?? null]);\n\t}\n\n\tget list(): DDialogSelectList<VALUE> {\n\t\tlet result = this._list;\n\t\tif (result == null) {\n\t\t\tresult = this.newList();\n\t\t\tthis._list = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newList(): DDialogSelectList<VALUE> {\n\t\tconst result = new DDialogSelectList<VALUE>(this.toListOptions(this.theme, this._options));\n\t\tresult.selection.on(\"change\", (selection: DListDataSelection<VALUE>): void => {\n\t\t\tthis.onListSelectionChange(selection);\n\t\t});\n\t\treturn result;\n\t}\n\n\tprotected onListSelectionChange(selection: DListDataSelection<VALUE>): void {\n\t\tlet selected = selection.first;\n\t\tif (selected == null) {\n\t\t\treturn;\n\t\t}\n\t\tconst options = this._options;\n\t\tif (options) {\n\t\t\tconst dismiss = options.dismiss;\n\t\t\tif (dismiss) {\n\t\t\t\tif (selected === dismiss.value) {\n\t\t\t\t\tselected = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._value = selected;\n\t\tthis.onOk(selected);\n\t}\n\n\tprotected toListOptions(theme: THEME, options?: OPTIONS): DDialogSelectListOptions<VALUE> {\n\t\tconst result = options?.list || {};\n\t\tif (result.width === undefined) {\n\t\t\tresult.width = \"padding\";\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected get noteError(): DNote | null {\n\t\tlet result = this._noteError;\n\t\tif (result == null) {\n\t\t\tresult = this.newNoteError();\n\t\t\tthis._noteError = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newNoteError(): DNote | null {\n\t\tconst error = this._options?.note?.error;\n\t\tif (error !== null) {\n\t\t\treturn new DNoteSmallError(this.toNoteOptions(this.list, error));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected get noteNoItemsFound(): DNote | null {\n\t\tlet result = this._noteNoItemsFound;\n\t\tif (result == null) {\n\t\t\tresult = this.newNoteNoItemsFound();\n\t\t\tthis._noteNoItemsFound = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newNoteNoItemsFound(): DNote | null {\n\t\tconst noItemsFound = this._options?.note?.noItemsFound;\n\t\tif (noItemsFound !== null) {\n\t\t\treturn new DNoteSmallNoItemsFound(this.toNoteOptions(this.list, noItemsFound));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected get noteSearching(): DNote | null {\n\t\tlet result = this._noteSearching;\n\t\tif (result == null) {\n\t\t\tresult = this.newNoteSearching();\n\t\t\tthis._noteSearching = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newNoteSearching(): DNote | null {\n\t\tconst searching = this._options?.note?.searching;\n\t\t// Because the `searching` note is disabled by default,\n\t\t// if options.searching is missing, i.e., if its value is undefined,\n\t\t// this method returns null. This is why `!=` is used here instead of `!==`.\n\t\tif (searching != null) {\n\t\t\treturn new DNoteSmallSearching(this.toNoteOptions(this.list, searching));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected toNoteOptions(parent: DBase, options?: DNoteOptions): DNoteOptions {\n\t\tif (options != null) {\n\t\t\tif (options.parent == null) {\n\t\t\t\toptions.parent = parent;\n\t\t\t}\n\t\t\tif (options.visible == null) {\n\t\t\t\toptions.visible = false;\n\t\t\t}\n\t\t\treturn options;\n\t\t}\n\t\treturn {\n\t\t\tparent,\n\t\t\tvisible: false\n\t\t};\n\t}\n\n\tprotected get search(): DDialogSelectSearch<VALUE, CATEGORY, CATEGORY_ID> {\n\t\tlet result = this._search;\n\t\tif (result == null) {\n\t\t\tresult = this.newSearch();\n\t\t\tthis._search = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newSearch(): DDialogSelectSearch<VALUE, CATEGORY, CATEGORY_ID> {\n\t\tconst options = this._options;\n\t\tif (options) {\n\t\t\tconst controller = options.controller;\n\t\t\tif (controller) {\n\t\t\t\tconst dismiss = options.dismiss;\n\t\t\t\tconst search = controller.search;\n\t\t\t\tif (\"create\" in search) {\n\t\t\t\t\tif (dismiss != null) {\n\t\t\t\t\t\treturn new DDialogSelectSearhDismissableImpl(search, dismiss);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn search;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (dismiss != null) {\n\t\t\t\t\t\treturn new DDialogSelectSearhDismissableImpl(\n\t\t\t\t\t\t\tnew DDialogSelectSearhImpl(search),\n\t\t\t\t\t\t\tdismiss\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn new DDialogSelectSearhImpl(search);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new DDialogSelectSearhImpl();\n\t}\n\n\tget value(): VALUE | null {\n\t\treturn this._value;\n\t}\n\n\tprotected onSearched(results: VALUE[]): void {\n\t\tthis.list.data.items = results;\n\t}\n\n\tprotected getResolvedValue(): VALUE | null | PromiseLike<VALUE | null> {\n\t\treturn this._value;\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DDialogSelect\";\n\t}\n\n\tprotected onOpen(): void {\n\t\tsuper.onOpen();\n\t\tthis.list.selection.clear();\n\t\tconst selectCategory = this.selectCategory;\n\t\tif (selectCategory != null) {\n\t\t\tif (this._isCategoryFetched !== true) {\n\t\t\t\tthis._isCategoryFetched = true;\n\t\t\t\tconst categoriesOrPromise = this.findCategories();\n\t\t\t\tif (categoriesOrPromise == null) {\n\t\t\t\t\tthis.search.create([this.input.value, null]);\n\t\t\t\t} else if (isArray(categoriesOrPromise)) {\n\t\t\t\t\tthis.onCategoryFetched(selectCategory, categoriesOrPromise);\n\t\t\t\t} else {\n\t\t\t\t\tselectCategory.state.isEnabled = false;\n\t\t\t\t\tcategoriesOrPromise.then((categories) => {\n\t\t\t\t\t\tselectCategory.state.isEnabled = true;\n\t\t\t\t\t\tthis.onCategoryFetched(selectCategory, categories);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.search.create([this.input.value, selectCategory.value]);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.search.create([this.input.value, null]);\n\t\t}\n\t}\n\n\tprotected onCategoryFetched(\n\t\tselectCategory: DSelect<CATEGORY_ID>,\n\t\tcategories: CATEGORY[]\n\t): void {\n\t\tconst items = [];\n\t\tfor (let i = 0, imax = categories.length; i < imax; ++i) {\n\t\t\tconst category = categories[i];\n\t\t\titems.push({\n\t\t\t\tvalue: this.toCategoryId(category),\n\t\t\t\ttext: {\n\t\t\t\t\tvalue: this.toCategoryLabel(category)\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tselectCategory.menu = new DMenu<CATEGORY_ID>({\n\t\t\tfit: true,\n\t\t\titems\n\t\t});\n\t\tconst newValue = 0 < items.length ? items[0].value : null;\n\t\tselectCategory.value = newValue;\n\t\tselectCategory.show();\n\t\tthis.search.create([this.input.value, newValue]);\n\t}\n\n\tprotected toCategoryId(target: CATEGORY): CATEGORY_ID {\n\t\tconst options = this._options;\n\t\tif (options != null) {\n\t\t\tconst category = options.category;\n\t\t\tif (category != null) {\n\t\t\t\tconst toId = category.toId;\n\t\t\t\tif (toId != null) {\n\t\t\t\t\treturn toId(target);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this.theme.toCategoryId(target);\n\t}\n\n\tprotected toCategoryLabel(target: CATEGORY): string {\n\t\tconst options = this._options;\n\t\tif (options != null) {\n\t\t\tconst category = options.category;\n\t\t\tif (category != null) {\n\t\t\t\tconst toLabel = category.toLabel;\n\t\t\t\tif (toLabel != null) {\n\t\t\t\t\treturn toLabel(target);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this.theme.toCategoryLabel(target);\n\t}\n\n\tprotected findCategories(): Promise<CATEGORY[]> | CATEGORY[] | null {\n\t\tconst options = this._options;\n\t\tif (options != null) {\n\t\t\tconst controller = options.controller;\n\t\t\tif (controller != null && controller.getCategories != null) {\n\t\t\t\treturn controller.getCategories();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onOk(value: VALUE | null | PromiseLike<VALUE | null>): void {\n\t\tthis.emit(\"select\", value, this);\n\t\tsuper.onOk(value);\n\t}\n\n\tdestroy(): void {\n\t\tconst input = this._input;\n\t\tif (input) {\n\t\t\tinput.destroy();\n\t\t}\n\t\tconst noteError = this._noteError;\n\t\tif (noteError) {\n\t\t\tnoteError.destroy();\n\t\t}\n\t\tconst noteNoItemsFound = this._noteNoItemsFound;\n\t\tif (noteNoItemsFound) {\n\t\t\tnoteNoItemsFound?.destroy();\n\t\t}\n\t\tconst noteSearching = this._noteSearching;\n\t\tif (noteSearching) {\n\t\t\tnoteSearching?.destroy();\n\t\t}\n\t\tconst list = this._list;\n\t\tif (list) {\n\t\t\tlist.destroy();\n\t\t}\n\t\tsuper.destroy();\n\t}\n}\n"]}
@@ -3,6 +3,8 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { __extends } from "tslib";
6
+ import { toId } from "../../util/to-id";
7
+ import { toLabel } from "../../util/to-label";
6
8
  import { DThemeDarkDialogLayered } from "./d-theme-dark-dialog-layered";
7
9
  var DThemeDarkDialogSelect = /** @class */ (function (_super) {
8
10
  __extends(DThemeDarkDialogSelect, _super);
@@ -16,7 +18,13 @@ var DThemeDarkDialogSelect = /** @class */ (function (_super) {
16
18
  return null;
17
19
  };
18
20
  DThemeDarkDialogSelect.prototype.getInputMargin = function () {
19
- return 32;
21
+ return 19;
22
+ };
23
+ DThemeDarkDialogSelect.prototype.toCategoryId = function (category) {
24
+ return toId(category);
25
+ };
26
+ DThemeDarkDialogSelect.prototype.toCategoryLabel = function (category) {
27
+ return toLabel(category);
20
28
  };
21
29
  return DThemeDarkDialogSelect;
22
30
  }(DThemeDarkDialogLayered));
@@ -1 +1 @@
1
- {"version":3,"file":"d-theme-dark-dialog-select.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAKH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE;IACS,0CAAuB;IADhC;;IAeA,CAAC;IAXA,yCAAQ,GAAR;QACC,OAAO,GAAG,CAAC;IACZ,CAAC;IAED,0CAAS,GAAT;QACC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,+CAAc,GAAd;QACC,OAAO,EAAE,CAAC;IACX,CAAC;IACF,6BAAC;AAAD,CAAC,AAfD,CACS,uBAAuB,GAc/B","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DCoordinateSize } from \"../../d-coordinate\";\nimport { DDialogLayeredFooterOptions } from \"../../d-dialog-layered-footer\";\nimport { DThemeDialogSelect } from \"../../d-dialog-select\";\nimport { DThemeDarkDialogLayered } from \"./d-theme-dark-dialog-layered\";\n\nexport class DThemeDarkDialogSelect<VALUE>\n\textends DThemeDarkDialogLayered\n\timplements DThemeDialogSelect<VALUE>\n{\n\tgetWidth(): DCoordinateSize {\n\t\treturn 480;\n\t}\n\n\tgetFooter(): DDialogLayeredFooterOptions | undefined | null {\n\t\treturn null;\n\t}\n\n\tgetInputMargin(): number {\n\t\treturn 32;\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-theme-dark-dialog-select.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAKH,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE;IACS,0CAAuB;IADhC;;IAuBA,CAAC;IAnBA,yCAAQ,GAAR;QACC,OAAO,GAAG,CAAC;IACZ,CAAC;IAED,0CAAS,GAAT;QACC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,+CAAc,GAAd;QACC,OAAO,EAAE,CAAC;IACX,CAAC;IAED,6CAAY,GAAZ,UAAa,QAAiB;QAC7B,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC;IAED,gDAAe,GAAf,UAAgB,QAAiB;QAChC,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;IACF,6BAAC;AAAD,CAAC,AAvBD,CACS,uBAAuB,GAsB/B","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DCoordinateSize } from \"../../d-coordinate\";\nimport { DDialogLayeredFooterOptions } from \"../../d-dialog-layered-footer\";\nimport { DThemeDialogSelect } from \"../../d-dialog-select\";\nimport { toId } from \"../../util/to-id\";\nimport { toLabel } from \"../../util/to-label\";\nimport { DThemeDarkDialogLayered } from \"./d-theme-dark-dialog-layered\";\n\nexport class DThemeDarkDialogSelect<VALUE>\n\textends DThemeDarkDialogLayered\n\timplements DThemeDialogSelect<VALUE>\n{\n\tgetWidth(): DCoordinateSize {\n\t\treturn 480;\n\t}\n\n\tgetFooter(): DDialogLayeredFooterOptions | undefined | null {\n\t\treturn null;\n\t}\n\n\tgetInputMargin(): number {\n\t\treturn 19;\n\t}\n\n\ttoCategoryId(category: unknown): unknown {\n\t\treturn toId(category);\n\t}\n\n\ttoCategoryLabel(category: unknown): string {\n\t\treturn toLabel(category);\n\t}\n}\n"]}
@@ -3,6 +3,8 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { __extends } from "tslib";
6
+ import { toId } from "../../util/to-id";
7
+ import { toLabel } from "../../util/to-label";
6
8
  import { DThemeWhiteDialogLayered } from "./d-theme-white-dialog-layered";
7
9
  var DThemeWhiteDialogSelect = /** @class */ (function (_super) {
8
10
  __extends(DThemeWhiteDialogSelect, _super);
@@ -16,7 +18,13 @@ var DThemeWhiteDialogSelect = /** @class */ (function (_super) {
16
18
  return null;
17
19
  };
18
20
  DThemeWhiteDialogSelect.prototype.getInputMargin = function () {
19
- return 32;
21
+ return 19;
22
+ };
23
+ DThemeWhiteDialogSelect.prototype.toCategoryId = function (category) {
24
+ return toId(category);
25
+ };
26
+ DThemeWhiteDialogSelect.prototype.toCategoryLabel = function (category) {
27
+ return toLabel(category);
20
28
  };
21
29
  return DThemeWhiteDialogSelect;
22
30
  }(DThemeWhiteDialogLayered));
@@ -1 +1 @@
1
- {"version":3,"file":"d-theme-white-dialog-select.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/white/d-theme-white-dialog-select.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAKH,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E;IACS,2CAAwB;IADjC;;IAeA,CAAC;IAXA,0CAAQ,GAAR;QACC,OAAO,GAAG,CAAC;IACZ,CAAC;IAED,2CAAS,GAAT;QACC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,gDAAc,GAAd;QACC,OAAO,EAAE,CAAC;IACX,CAAC;IACF,8BAAC;AAAD,CAAC,AAfD,CACS,wBAAwB,GAchC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DCoordinateSize } from \"../../d-coordinate\";\nimport { DDialogLayeredFooterOptions } from \"../../d-dialog-layered-footer\";\nimport { DThemeDialogSelect } from \"../../d-dialog-select\";\nimport { DThemeWhiteDialogLayered } from \"./d-theme-white-dialog-layered\";\n\nexport class DThemeWhiteDialogSelect<VALUE>\n\textends DThemeWhiteDialogLayered\n\timplements DThemeDialogSelect<VALUE>\n{\n\tgetWidth(): DCoordinateSize {\n\t\treturn 480;\n\t}\n\n\tgetFooter(): DDialogLayeredFooterOptions | undefined | null {\n\t\treturn null;\n\t}\n\n\tgetInputMargin(): number {\n\t\treturn 32;\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-theme-white-dialog-select.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/white/d-theme-white-dialog-select.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAKH,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E;IACS,2CAAwB;IADjC;;IAuBA,CAAC;IAnBA,0CAAQ,GAAR;QACC,OAAO,GAAG,CAAC;IACZ,CAAC;IAED,2CAAS,GAAT;QACC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,gDAAc,GAAd;QACC,OAAO,EAAE,CAAC;IACX,CAAC;IAED,8CAAY,GAAZ,UAAa,QAAiB;QAC7B,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC;IAED,iDAAe,GAAf,UAAgB,QAAiB;QAChC,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;IACF,8BAAC;AAAD,CAAC,AAvBD,CACS,wBAAwB,GAsBhC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DCoordinateSize } from \"../../d-coordinate\";\nimport { DDialogLayeredFooterOptions } from \"../../d-dialog-layered-footer\";\nimport { DThemeDialogSelect } from \"../../d-dialog-select\";\nimport { toId } from \"../../util/to-id\";\nimport { toLabel } from \"../../util/to-label\";\nimport { DThemeWhiteDialogLayered } from \"./d-theme-white-dialog-layered\";\n\nexport class DThemeWhiteDialogSelect<VALUE>\n\textends DThemeWhiteDialogLayered\n\timplements DThemeDialogSelect<VALUE>\n{\n\tgetWidth(): DCoordinateSize {\n\t\treturn 480;\n\t}\n\n\tgetFooter(): DDialogLayeredFooterOptions | undefined | null {\n\t\treturn null;\n\t}\n\n\tgetInputMargin(): number {\n\t\treturn 19;\n\t}\n\n\ttoCategoryId(category: unknown): unknown {\n\t\treturn toId(category);\n\t}\n\n\ttoCategoryLabel(category: unknown): string {\n\t\treturn toLabel(category);\n\t}\n}\n"]}
@@ -35,6 +35,7 @@ export * from "./number-formatters";
35
35
  export * from "./to-ceiling-index";
36
36
  export * from "./to-cloned";
37
37
  export * from "./to-enum";
38
+ export * from "./to-id";
38
39
  export * from "./to-index-of";
39
40
  export * from "./to-label";
40
41
  export * from "./to-merged";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/util/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wCAAwC,CAAC;AACvD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC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PDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./format-node\";\nexport * from \"./deep-partial\";\nexport * from \"./dynamic-atlas-item-empty\";\nexport * from \"./dynamic-atlas-item-font-atlas\";\nexport * from \"./dynamic-atlas-item-image\";\nexport * from \"./dynamic-atlas-item-text\";\nexport * from \"./dynamic-atlas-item-white\";\nexport * from \"./dynamic-atlas-item\";\nexport * from \"./dynamic-atlas\";\nexport * from \"./dynamic-font-atlas-chaaracter-origin\";\nexport * from \"./dynamic-font-atlas-character-type\";\nexport * from \"./dynamic-font-atlas-character\";\nexport * from \"./dynamic-font-atlas-characters\";\nexport * from \"./dynamic-font-atlas-font\";\nexport * from \"./dynamic-font-atlas\";\nexport * from \"./dynamic-font-atlases\";\nexport * from \"./dynamic-sdf-font-atlas\";\nexport * from \"./dynamic-sdf-font-atlases\";\nexport * from \"./dynamic-sdf-font-generator\";\nexport * from \"./is-array\";\nexport * from \"./is-function\";\nexport * from \"./is-nan\";\nexport * from \"./is-number\";\nexport * from \"./is-object\";\nexport * from \"./is-string\";\nexport * from \"./lazy\";\nexport * from \"./number-formatter-function\";\nexport * from \"./number-formatter-impl\";\nexport * from \"./number-formatter\";\nexport * from \"./number-formatters\";\nexport * from \"./to-ceiling-index\";\nexport * from \"./to-cloned\";\nexport * from \"./to-enum\";\nexport * from \"./to-index-of\";\nexport * from \"./to-label\";\nexport * from \"./to-merged\";\nexport * from \"./to-padded\";\nexport * from \"./to-string\";\nexport * from \"./to-svg-texture\";\nexport * from \"./to-svg-url\";\nexport * from \"./util-alpha\";\nexport * from \"./util-svg-atlas-builder\";\nexport * from \"./util-attach\";\nexport * from \"./util-character-iterator\";\nexport * from \"./util-click-outside\";\nexport * from \"./util-clipboard\";\nexport * from \"./util-gesture-data\";\nexport * from \"./util-gesture-easing-history\";\nexport * from \"./util-gesture-easing\";\nexport * from \"./util-gesture-mode\";\nexport * from \"./util-gesture-modifier\";\nexport * from \"./util-gesture-modifiers\";\nexport * from \"./util-gesture\";\nexport * from \"./util-extract\";\nexport * from \"./util-extractor-pixels\";\nexport * from \"./util-extractor\";\nexport * from \"./util-file-downloader\";\nexport * from \"./util-file-opener\";\nexport * from \"./util-font\";\nexport * from \"./util-hsv\";\nexport * from \"./util-html-element-clipper-ex-impl\";\nexport * from \"./util-html-element-clipper-ex-rects-impl\";\nexport * from \"./util-html-element-clipper-ex-rects\";\nexport * from \"./util-html-element-clipper-ex\";\nexport * from \"./util-html-element-when\";\nexport * from \"./util-html-element\";\nexport * from \"./util-input-input\";\nexport * from \"./util-input-number\";\nexport * from \"./util-input-text-area\";\nexport * from \"./util-input-text\";\nexport * from \"./util-input\";\nexport * from \"./util-keyboard-event\";\nexport * from \"./util-name\";\nexport * from \"./util-overlay\";\nexport * from \"./util-pointer-event\";\nexport * from \"./util-rgb\";\nexport * from \"./util-rgba\";\nexport * from \"./util-state-blinker\";\nexport * from \"./util-transition\";\nexport * from \"./util-wheel-event\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/util/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wCAAwC,CAAC;AACvD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,YAAY,CAAC;AAC3B,cAA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AAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./format-node\";\nexport * from \"./deep-partial\";\nexport * from \"./dynamic-atlas-item-empty\";\nexport * from \"./dynamic-atlas-item-font-atlas\";\nexport * from \"./dynamic-atlas-item-image\";\nexport * from \"./dynamic-atlas-item-text\";\nexport * from \"./dynamic-atlas-item-white\";\nexport * from \"./dynamic-atlas-item\";\nexport * from \"./dynamic-atlas\";\nexport * from \"./dynamic-font-atlas-chaaracter-origin\";\nexport * from \"./dynamic-font-atlas-character-type\";\nexport * from \"./dynamic-font-atlas-character\";\nexport * from \"./dynamic-font-atlas-characters\";\nexport * from \"./dynamic-font-atlas-font\";\nexport * from \"./dynamic-font-atlas\";\nexport * from \"./dynamic-font-atlases\";\nexport * from \"./dynamic-sdf-font-atlas\";\nexport * from \"./dynamic-sdf-font-atlases\";\nexport * from \"./dynamic-sdf-font-generator\";\nexport * from \"./is-array\";\nexport * from \"./is-function\";\nexport * from \"./is-nan\";\nexport * from \"./is-number\";\nexport * from \"./is-object\";\nexport * from \"./is-string\";\nexport * from \"./lazy\";\nexport * from \"./number-formatter-function\";\nexport * from \"./number-formatter-impl\";\nexport * from \"./number-formatter\";\nexport * from \"./number-formatters\";\nexport * from \"./to-ceiling-index\";\nexport * from \"./to-cloned\";\nexport * from \"./to-enum\";\nexport * from \"./to-id\";\nexport * from \"./to-index-of\";\nexport * from \"./to-label\";\nexport * from \"./to-merged\";\nexport * from \"./to-padded\";\nexport * from \"./to-string\";\nexport * from \"./to-svg-texture\";\nexport * from \"./to-svg-url\";\nexport * from \"./util-alpha\";\nexport * from \"./util-svg-atlas-builder\";\nexport * from \"./util-attach\";\nexport * from \"./util-character-iterator\";\nexport * from \"./util-click-outside\";\nexport * from \"./util-clipboard\";\nexport * from \"./util-gesture-data\";\nexport * from \"./util-gesture-easing-history\";\nexport * from \"./util-gesture-easing\";\nexport * from \"./util-gesture-mode\";\nexport * from \"./util-gesture-modifier\";\nexport * from \"./util-gesture-modifiers\";\nexport * from \"./util-gesture\";\nexport * from \"./util-extract\";\nexport * from \"./util-extractor-pixels\";\nexport * from \"./util-extractor\";\nexport * from \"./util-file-downloader\";\nexport * from \"./util-file-opener\";\nexport * from \"./util-font\";\nexport * from \"./util-hsv\";\nexport * from \"./util-html-element-clipper-ex-impl\";\nexport * from \"./util-html-element-clipper-ex-rects-impl\";\nexport * from \"./util-html-element-clipper-ex-rects\";\nexport * from \"./util-html-element-clipper-ex\";\nexport * from \"./util-html-element-when\";\nexport * from \"./util-html-element\";\nexport * from \"./util-input-input\";\nexport * from \"./util-input-number\";\nexport * from \"./util-input-text-area\";\nexport * from \"./util-input-text\";\nexport * from \"./util-input\";\nexport * from \"./util-keyboard-event\";\nexport * from \"./util-name\";\nexport * from \"./util-overlay\";\nexport * from \"./util-pointer-event\";\nexport * from \"./util-rgb\";\nexport * from \"./util-rgba\";\nexport * from \"./util-state-blinker\";\nexport * from \"./util-transition\";\nexport * from \"./util-wheel-event\";\n"]}
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Copyright (C) 2019 Toshiba Corporation
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { isNumber } from "./is-number";
6
+ import { isString } from "./is-string";
7
+ export var toId = function (target) {
8
+ if (target != null) {
9
+ if (isString(target)) {
10
+ return target;
11
+ }
12
+ else if (isNumber(target)) {
13
+ return target;
14
+ }
15
+ else if ("id" in target) {
16
+ return target.id;
17
+ }
18
+ else if ("name" in target) {
19
+ return target.name;
20
+ }
21
+ else if ("label" in target) {
22
+ return target.label;
23
+ }
24
+ }
25
+ return 0;
26
+ };
27
+ //# sourceMappingURL=to-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-id.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/util/to-id.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,CAAC,IAAM,IAAI,GAAG,UAAC,MAAW;IAC/B,IAAI,MAAM,IAAI,IAAI,EAAE;QACnB,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE;YACrB,OAAO,MAAM,CAAC;SACd;aAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE;YAC5B,OAAO,MAAM,CAAC;SACd;aAAM,IAAI,IAAI,IAAI,MAAM,EAAE;YAC1B,OAAO,MAAM,CAAC,EAAE,CAAC;SACjB;aAAM,IAAI,MAAM,IAAI,MAAM,EAAE;YAC5B,OAAO,MAAM,CAAC,IAAI,CAAC;SACnB;aAAM,IAAI,OAAO,IAAI,MAAM,EAAE;YAC7B,OAAO,MAAM,CAAC,KAAK,CAAC;SACpB;KACD;IACD,OAAO,CAAC,CAAC;AACV,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { isNumber } from \"./is-number\";\nimport { isString } from \"./is-string\";\n\nexport const toId = (target: any): unknown => {\n\tif (target != null) {\n\t\tif (isString(target)) {\n\t\t\treturn target;\n\t\t} else if (isNumber(target)) {\n\t\t\treturn target;\n\t\t} else if (\"id\" in target) {\n\t\t\treturn target.id;\n\t\t} else if (\"name\" in target) {\n\t\t\treturn target.name;\n\t\t} else if (\"label\" in target) {\n\t\t\treturn target.label;\n\t\t}\n\t}\n\treturn 0;\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.333.0
2
+ Winter Cardinal UI v0.334.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -2190,6 +2190,8 @@
2190
2190
  return DThemeDarkButtonSelect;
2191
2191
  }(DThemeDarkButton));
2192
2192
 
2193
+ const toId = wcardinal.ui.toId;
2194
+
2193
2195
  /*
2194
2196
  * Copyright (C) 2019 Toshiba Corporation
2195
2197
  * SPDX-License-Identifier: Apache-2.0
@@ -2206,7 +2208,13 @@
2206
2208
  return null;
2207
2209
  };
2208
2210
  DThemeDarkDialogSelect.prototype.getInputMargin = function () {
2209
- return 32;
2211
+ return 19;
2212
+ };
2213
+ DThemeDarkDialogSelect.prototype.toCategoryId = function (category) {
2214
+ return toId(category);
2215
+ };
2216
+ DThemeDarkDialogSelect.prototype.toCategoryLabel = function (category) {
2217
+ return toLabel(category);
2210
2218
  };
2211
2219
  return DThemeDarkDialogSelect;
2212
2220
  }(DThemeDarkDialogLayered));