@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.
- package/dist/types/wcardinal/ui/d-dialog-select.d.ts +14 -6
- package/dist/types/wcardinal/ui/index.d.ts +0 -2
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-en-us-dialog-select.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-ja-jp-dialog-select.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-dialog-select.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-en-us-dialog-select.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-ja-jp-dialog-select.d.ts +1 -0
- package/dist/wcardinal/ui/d-dialog-select.js +77 -97
- package/dist/wcardinal/ui/d-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/index.js +0 -2
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.js +3 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-en-us-dialog-select.js +3 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-en-us-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-ja-jp-dialog-select.js +3 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-ja-jp-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-dialog-select.js +3 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-en-us-dialog-select.js +3 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-en-us-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-ja-jp-dialog-select.js +3 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-ja-jp-dialog-select.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +7 -1
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +7 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +7 -1
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +7 -1
- package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +7 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +7 -1
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +95 -156
- package/dist/wcardinal-ui.js +77 -156
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/wcardinal/ui/d-dialog-select-search-dismissable-impl.d.ts +0 -14
- package/dist/types/wcardinal/ui/d-dialog-select-search-dismissable.d.ts +0 -11
- package/dist/wcardinal/ui/d-dialog-select-search-dismissable-impl.js +0 -61
- package/dist/wcardinal/ui/d-dialog-select-search-dismissable-impl.js.map +0 -1
- package/dist/wcardinal/ui/d-dialog-select-search-dismissable.js +0 -6
- package/dist/wcardinal/ui/d-dialog-select-search-dismissable.js.map +0 -1
|
@@ -10,9 +10,9 @@ import { DListDataSelection } from "./d-list-data-selection";
|
|
|
10
10
|
import { DNote, DNoteOptions } from "./d-note";
|
|
11
11
|
import { DOnOptions } from "./d-on-options";
|
|
12
12
|
import { DDialogSelectSearch } from "./d-dialog-select-search";
|
|
13
|
-
import { DDialogSelectSearhDismissableOptions } from "./d-dialog-select-search-dismissable";
|
|
14
13
|
import { DSelect, DSelectOptions } from "./d-select";
|
|
15
14
|
import { DDialogSelectSearchFunction } from "./d-dialog-select-search-function";
|
|
15
|
+
import { DButton, DButtonOptions } from "./d-button";
|
|
16
16
|
export interface DDialogSelectInputOpitons extends DInputSearchOptions {
|
|
17
17
|
margin?: number;
|
|
18
18
|
}
|
|
@@ -61,13 +61,19 @@ export interface DDialogSelectCategoryOptions<VALUE, CATEGORY_ID> extends DSelec
|
|
|
61
61
|
*/
|
|
62
62
|
export interface DDialogSelectOnOptions<VALUE, EMITTER> extends Partial<DDialogSelectEvents<VALUE, EMITTER>>, DOnOptions {
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* {@link DDialogSelect} "dismiss" options.
|
|
66
|
+
*/
|
|
67
|
+
export interface DDialogSelectDismissableOptions extends DButtonOptions<string> {
|
|
68
|
+
enabled?: boolean;
|
|
69
|
+
}
|
|
64
70
|
/**
|
|
65
71
|
* {@link DDialogSelect} options.
|
|
66
72
|
*/
|
|
67
73
|
export interface DDialogSelectOptions<VALUE, CATEGORY_ID = unknown, THEME extends DThemeDialogSelect<VALUE, CATEGORY_ID> = DThemeDialogSelect<VALUE, CATEGORY_ID>, EMITTER = any> extends DDialogLayeredOptions<VALUE, THEME> {
|
|
68
74
|
controller?: DDialogSelectController<VALUE, CATEGORY_ID>;
|
|
69
75
|
category?: DDialogSelectCategoryOptions<VALUE, CATEGORY_ID>;
|
|
70
|
-
dismiss?:
|
|
76
|
+
dismiss?: DDialogSelectDismissableOptions;
|
|
71
77
|
input?: DDialogSelectInputOpitons;
|
|
72
78
|
list?: DListOptions<VALUE>;
|
|
73
79
|
note?: DDialogSelectNoteOptions;
|
|
@@ -78,13 +84,13 @@ export interface DDialogSelectOptions<VALUE, CATEGORY_ID = unknown, THEME extend
|
|
|
78
84
|
*/
|
|
79
85
|
export interface DThemeDialogSelect<VALUE = unknown, CATEGORY_ID = unknown> extends DThemeDialogLayered {
|
|
80
86
|
getInputMargin(): number;
|
|
87
|
+
isDismissable(): boolean;
|
|
88
|
+
getDismissLabel(): string;
|
|
81
89
|
isCategoryDismissable(): boolean;
|
|
82
90
|
getCategoryDismissLabel(): string;
|
|
83
91
|
}
|
|
84
92
|
export declare class DDialogSelect<VALUE = unknown, CATEGORY_ID = unknown, THEME extends DThemeDialogSelect<VALUE, CATEGORY_ID> = DThemeDialogSelect<VALUE, CATEGORY_ID>, OPTIONS extends DDialogSelectOptions<VALUE, CATEGORY_ID, THEME> = DDialogSelectOptions<VALUE, CATEGORY_ID, THEME>> extends DDialogLayered<VALUE | null, THEME, OPTIONS> {
|
|
85
93
|
protected _value: VALUE | null;
|
|
86
|
-
protected _spaceLeft?: DLayoutSpace;
|
|
87
|
-
protected _spaceRight?: DLayoutSpace;
|
|
88
94
|
protected _selectCategory?: DSelect<CATEGORY_ID | null>;
|
|
89
95
|
protected _isCategoryFetched?: boolean;
|
|
90
96
|
protected _categories: DDialogSelectCategory<CATEGORY_ID>[];
|
|
@@ -95,12 +101,11 @@ export declare class DDialogSelect<VALUE = unknown, CATEGORY_ID = unknown, THEME
|
|
|
95
101
|
protected _noteError?: DNote | null;
|
|
96
102
|
protected _noteNoItemsFound?: DNote | null;
|
|
97
103
|
protected _noteSearching?: DNote | null;
|
|
104
|
+
protected _buttonDismiss?: DButton<string> | null;
|
|
98
105
|
constructor(options?: OPTIONS);
|
|
99
106
|
protected newContentChildren(theme: THEME, options?: OPTIONS): Array<DisplayObject | null>;
|
|
100
107
|
protected get inputLayout(): DLayoutHorizontal;
|
|
101
108
|
protected newInputLayout(): DLayoutHorizontal;
|
|
102
|
-
protected get spaceLeft(): DLayoutSpace;
|
|
103
|
-
protected get spaceRight(): DLayoutSpace;
|
|
104
109
|
protected newSpace(): DLayoutSpace;
|
|
105
110
|
protected get selectCategory(): DSelect<CATEGORY_ID | null>;
|
|
106
111
|
protected newSelectCategory(): DSelect<CATEGORY_ID | null>;
|
|
@@ -124,6 +129,9 @@ export declare class DDialogSelect<VALUE = unknown, CATEGORY_ID = unknown, THEME
|
|
|
124
129
|
protected toNoteOptions(parent: DBase, options?: DNoteOptions): DNoteOptions;
|
|
125
130
|
protected get search(): DDialogSelectSearch<VALUE, CATEGORY_ID>;
|
|
126
131
|
protected newSearch(): DDialogSelectSearch<VALUE, CATEGORY_ID>;
|
|
132
|
+
protected get buttonDismiss(): DButton<string> | null;
|
|
133
|
+
protected newButtonDismiss(): DButton<string> | null;
|
|
134
|
+
protected toButtonDismissOptions(options?: OPTIONS): DDialogSelectDismissableOptions;
|
|
127
135
|
get value(): VALUE | null;
|
|
128
136
|
protected onSearched(results: VALUE[]): void;
|
|
129
137
|
protected getResolvedValue(): VALUE | null | PromiseLike<VALUE | null>;
|
|
@@ -293,8 +293,6 @@ export * from "./d-dialog-save-as";
|
|
|
293
293
|
export * from "./d-dialog-select-list-item-updater";
|
|
294
294
|
export * from "./d-dialog-select-list-item";
|
|
295
295
|
export * from "./d-dialog-select-list";
|
|
296
|
-
export * from "./d-dialog-select-search-dismissable-impl";
|
|
297
|
-
export * from "./d-dialog-select-search-dismissable";
|
|
298
296
|
export * from "./d-dialog-select-search-function";
|
|
299
297
|
export * from "./d-dialog-select-search-impl";
|
|
300
298
|
export * from "./d-dialog-select-search";
|
|
@@ -6,6 +6,8 @@ export declare abstract class DThemeDarkDialogSelect<VALUE> extends DThemeDarkDi
|
|
|
6
6
|
getWidth(): DCoordinateSize;
|
|
7
7
|
getFooter(): DDialogLayeredFooterOptions | undefined | null;
|
|
8
8
|
getInputMargin(): number;
|
|
9
|
+
isDismissable(): boolean;
|
|
10
|
+
abstract getDismissLabel(): string;
|
|
9
11
|
isCategoryDismissable(): boolean;
|
|
10
12
|
abstract getCategoryDismissLabel(): string;
|
|
11
13
|
}
|
|
@@ -6,6 +6,8 @@ export declare abstract class DThemeWhiteDialogSelect<VALUE> extends DThemeWhite
|
|
|
6
6
|
getWidth(): DCoordinateSize;
|
|
7
7
|
getFooter(): DDialogLayeredFooterOptions | undefined | null;
|
|
8
8
|
getInputMargin(): number;
|
|
9
|
+
isDismissable(): boolean;
|
|
10
|
+
abstract getDismissLabel(): string;
|
|
9
11
|
isCategoryDismissable(): boolean;
|
|
10
12
|
abstract getCategoryDismissLabel(): string;
|
|
11
13
|
}
|
|
@@ -13,9 +13,9 @@ import { DNoteSmallError } from "./d-note-small-error";
|
|
|
13
13
|
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
|
-
import { DDialogSelectSearhDismissableImpl } from "./d-dialog-select-search-dismissable-impl";
|
|
17
16
|
import { DSelect } from "./d-select";
|
|
18
17
|
import { DMenu } from "./d-menu";
|
|
18
|
+
import { DButton } from "./d-button";
|
|
19
19
|
var DDialogSelect = /** @class */ (function (_super) {
|
|
20
20
|
__extends(DDialogSelect, _super);
|
|
21
21
|
function DDialogSelect(options) {
|
|
@@ -57,17 +57,13 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
57
57
|
}
|
|
58
58
|
DDialogSelect.prototype.newContentChildren = function (theme, options) {
|
|
59
59
|
var result = _super.prototype.newContentChildren.call(this, theme, options);
|
|
60
|
-
result.push(this.inputLayout, this.list);
|
|
60
|
+
result.push(this.inputLayout, this.list, this.buttonDismiss);
|
|
61
61
|
return result;
|
|
62
62
|
};
|
|
63
63
|
Object.defineProperty(DDialogSelect.prototype, "inputLayout", {
|
|
64
64
|
get: function () {
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
result = this.newInputLayout();
|
|
68
|
-
this._inputLayout = result;
|
|
69
|
-
}
|
|
70
|
-
return result;
|
|
65
|
+
var _a;
|
|
66
|
+
return ((_a = this._inputLayout) !== null && _a !== void 0 ? _a : (this._inputLayout = this.newInputLayout()));
|
|
71
67
|
},
|
|
72
68
|
enumerable: false,
|
|
73
69
|
configurable: true
|
|
@@ -76,33 +72,9 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
76
72
|
return new DLayoutHorizontal({
|
|
77
73
|
width: "padding",
|
|
78
74
|
height: "auto",
|
|
79
|
-
children: [this.
|
|
75
|
+
children: [this.selectCategory, this.input]
|
|
80
76
|
});
|
|
81
77
|
};
|
|
82
|
-
Object.defineProperty(DDialogSelect.prototype, "spaceLeft", {
|
|
83
|
-
get: function () {
|
|
84
|
-
var result = this._spaceLeft;
|
|
85
|
-
if (result == null) {
|
|
86
|
-
result = this.newSpace();
|
|
87
|
-
this._spaceLeft = result;
|
|
88
|
-
}
|
|
89
|
-
return result;
|
|
90
|
-
},
|
|
91
|
-
enumerable: false,
|
|
92
|
-
configurable: true
|
|
93
|
-
});
|
|
94
|
-
Object.defineProperty(DDialogSelect.prototype, "spaceRight", {
|
|
95
|
-
get: function () {
|
|
96
|
-
var result = this._spaceRight;
|
|
97
|
-
if (result == null) {
|
|
98
|
-
result = this.newSpace();
|
|
99
|
-
this._spaceRight = result;
|
|
100
|
-
}
|
|
101
|
-
return result;
|
|
102
|
-
},
|
|
103
|
-
enumerable: false,
|
|
104
|
-
configurable: true
|
|
105
|
-
});
|
|
106
78
|
DDialogSelect.prototype.newSpace = function () {
|
|
107
79
|
return new DLayoutSpace({
|
|
108
80
|
width: this.toInputMargin(this.theme, this._options)
|
|
@@ -110,12 +82,8 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
110
82
|
};
|
|
111
83
|
Object.defineProperty(DDialogSelect.prototype, "selectCategory", {
|
|
112
84
|
get: function () {
|
|
113
|
-
var
|
|
114
|
-
|
|
115
|
-
result = this.newSelectCategory();
|
|
116
|
-
this._selectCategory = result;
|
|
117
|
-
}
|
|
118
|
-
return result;
|
|
85
|
+
var _a;
|
|
86
|
+
return ((_a = this._selectCategory) !== null && _a !== void 0 ? _a : (this._selectCategory = this.newSelectCategory()));
|
|
119
87
|
},
|
|
120
88
|
enumerable: false,
|
|
121
89
|
configurable: true
|
|
@@ -143,12 +111,8 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
143
111
|
};
|
|
144
112
|
Object.defineProperty(DDialogSelect.prototype, "input", {
|
|
145
113
|
get: function () {
|
|
146
|
-
var
|
|
147
|
-
|
|
148
|
-
result = this.newInput();
|
|
149
|
-
this._input = result;
|
|
150
|
-
}
|
|
151
|
-
return result;
|
|
114
|
+
var _a;
|
|
115
|
+
return ((_a = this._input) !== null && _a !== void 0 ? _a : (this._input = this.newInput()));
|
|
152
116
|
},
|
|
153
117
|
enumerable: false,
|
|
154
118
|
configurable: true
|
|
@@ -182,12 +146,8 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
182
146
|
};
|
|
183
147
|
Object.defineProperty(DDialogSelect.prototype, "list", {
|
|
184
148
|
get: function () {
|
|
185
|
-
var
|
|
186
|
-
|
|
187
|
-
result = this.newList();
|
|
188
|
-
this._list = result;
|
|
189
|
-
}
|
|
190
|
-
return result;
|
|
149
|
+
var _a;
|
|
150
|
+
return ((_a = this._list) !== null && _a !== void 0 ? _a : (this._list = this.newList()));
|
|
191
151
|
},
|
|
192
152
|
enumerable: false,
|
|
193
153
|
configurable: true
|
|
@@ -205,15 +165,6 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
205
165
|
if (selected == null) {
|
|
206
166
|
return;
|
|
207
167
|
}
|
|
208
|
-
var options = this._options;
|
|
209
|
-
if (options) {
|
|
210
|
-
var dismiss = options.dismiss;
|
|
211
|
-
if (dismiss) {
|
|
212
|
-
if (selected === dismiss.value) {
|
|
213
|
-
selected = null;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
168
|
this._value = selected;
|
|
218
169
|
this.onOk(selected);
|
|
219
170
|
};
|
|
@@ -226,12 +177,8 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
226
177
|
};
|
|
227
178
|
Object.defineProperty(DDialogSelect.prototype, "noteError", {
|
|
228
179
|
get: function () {
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
result = this.newNoteError();
|
|
232
|
-
this._noteError = result;
|
|
233
|
-
}
|
|
234
|
-
return result;
|
|
180
|
+
var _a;
|
|
181
|
+
return ((_a = this._noteError) !== null && _a !== void 0 ? _a : (this._noteError = this.newNoteError()));
|
|
235
182
|
},
|
|
236
183
|
enumerable: false,
|
|
237
184
|
configurable: true
|
|
@@ -246,12 +193,8 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
246
193
|
};
|
|
247
194
|
Object.defineProperty(DDialogSelect.prototype, "noteNoItemsFound", {
|
|
248
195
|
get: function () {
|
|
249
|
-
var
|
|
250
|
-
|
|
251
|
-
result = this.newNoteNoItemsFound();
|
|
252
|
-
this._noteNoItemsFound = result;
|
|
253
|
-
}
|
|
254
|
-
return result;
|
|
196
|
+
var _a;
|
|
197
|
+
return ((_a = this._noteNoItemsFound) !== null && _a !== void 0 ? _a : (this._noteNoItemsFound = this.newNoteNoItemsFound()));
|
|
255
198
|
},
|
|
256
199
|
enumerable: false,
|
|
257
200
|
configurable: true
|
|
@@ -266,12 +209,8 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
266
209
|
};
|
|
267
210
|
Object.defineProperty(DDialogSelect.prototype, "noteSearching", {
|
|
268
211
|
get: function () {
|
|
269
|
-
var
|
|
270
|
-
|
|
271
|
-
result = this.newNoteSearching();
|
|
272
|
-
this._noteSearching = result;
|
|
273
|
-
}
|
|
274
|
-
return result;
|
|
212
|
+
var _a;
|
|
213
|
+
return ((_a = this._noteSearching) !== null && _a !== void 0 ? _a : (this._noteSearching = this.newNoteSearching()));
|
|
275
214
|
},
|
|
276
215
|
enumerable: false,
|
|
277
216
|
configurable: true
|
|
@@ -304,12 +243,8 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
304
243
|
};
|
|
305
244
|
Object.defineProperty(DDialogSelect.prototype, "search", {
|
|
306
245
|
get: function () {
|
|
307
|
-
var
|
|
308
|
-
|
|
309
|
-
result = this.newSearch();
|
|
310
|
-
this._search = result;
|
|
311
|
-
}
|
|
312
|
-
return result;
|
|
246
|
+
var _a;
|
|
247
|
+
return ((_a = this._search) !== null && _a !== void 0 ? _a : (this._search = this.newSearch()));
|
|
313
248
|
},
|
|
314
249
|
enumerable: false,
|
|
315
250
|
configurable: true
|
|
@@ -319,28 +254,73 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
319
254
|
if (options) {
|
|
320
255
|
var controller = options.controller;
|
|
321
256
|
if (controller) {
|
|
322
|
-
var dismiss = options.dismiss;
|
|
323
257
|
var search = controller.search;
|
|
324
258
|
if ("create" in search) {
|
|
325
|
-
|
|
326
|
-
return new DDialogSelectSearhDismissableImpl(search, dismiss);
|
|
327
|
-
}
|
|
328
|
-
else {
|
|
329
|
-
return search;
|
|
330
|
-
}
|
|
259
|
+
return search;
|
|
331
260
|
}
|
|
332
261
|
else {
|
|
333
|
-
|
|
334
|
-
return new DDialogSelectSearhDismissableImpl(new DDialogSelectSearhImpl(search), dismiss);
|
|
335
|
-
}
|
|
336
|
-
else {
|
|
337
|
-
return new DDialogSelectSearhImpl(search);
|
|
338
|
-
}
|
|
262
|
+
return new DDialogSelectSearhImpl(search);
|
|
339
263
|
}
|
|
340
264
|
}
|
|
341
265
|
}
|
|
342
266
|
return new DDialogSelectSearhImpl();
|
|
343
267
|
};
|
|
268
|
+
Object.defineProperty(DDialogSelect.prototype, "buttonDismiss", {
|
|
269
|
+
get: function () {
|
|
270
|
+
var result = this._buttonDismiss;
|
|
271
|
+
if (result === undefined) {
|
|
272
|
+
result = this.newButtonDismiss();
|
|
273
|
+
this._buttonDismiss = result;
|
|
274
|
+
}
|
|
275
|
+
return result;
|
|
276
|
+
},
|
|
277
|
+
enumerable: false,
|
|
278
|
+
configurable: true
|
|
279
|
+
});
|
|
280
|
+
DDialogSelect.prototype.newButtonDismiss = function () {
|
|
281
|
+
var _this = this;
|
|
282
|
+
var options = this.toButtonDismissOptions(this._options);
|
|
283
|
+
if (options.enabled === true) {
|
|
284
|
+
var result = new DButton(options);
|
|
285
|
+
result.on("active", function () {
|
|
286
|
+
_this._value = null;
|
|
287
|
+
_this.onOk(null);
|
|
288
|
+
});
|
|
289
|
+
return result;
|
|
290
|
+
}
|
|
291
|
+
return null;
|
|
292
|
+
};
|
|
293
|
+
DDialogSelect.prototype.toButtonDismissOptions = function (options) {
|
|
294
|
+
var theme = this.theme;
|
|
295
|
+
if (options != null) {
|
|
296
|
+
var dismiss = options.dismiss;
|
|
297
|
+
if (dismiss != null) {
|
|
298
|
+
if (dismiss.enabled === undefined) {
|
|
299
|
+
dismiss.enabled = theme.isDismissable();
|
|
300
|
+
}
|
|
301
|
+
if (dismiss.weight === undefined && dismiss.width === undefined) {
|
|
302
|
+
dismiss.width = "padding";
|
|
303
|
+
}
|
|
304
|
+
var text = dismiss.text;
|
|
305
|
+
if (text === undefined) {
|
|
306
|
+
dismiss.text = {
|
|
307
|
+
value: theme.getDismissLabel()
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
else if (text.value === undefined) {
|
|
311
|
+
text.value = theme.getDismissLabel();
|
|
312
|
+
}
|
|
313
|
+
return dismiss;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return {
|
|
317
|
+
width: "padding",
|
|
318
|
+
enabled: theme.isDismissable(),
|
|
319
|
+
text: {
|
|
320
|
+
value: theme.getDismissLabel()
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
};
|
|
344
324
|
Object.defineProperty(DDialogSelect.prototype, "value", {
|
|
345
325
|
get: function () {
|
|
346
326
|
return this._value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-dialog-select.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-dialog-select.ts"],"names":[],"mappings":"AAAA;;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,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,AA7aD,CASU,cAAc,GAoavB","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 { DDialogSelectSearchFunction } from \"./d-dialog-select-search-function\";\n\nexport interface DDialogSelectInputOpitons extends DInputSearchOptions {\n\tmargin?: number;\n}\n\n/**\n * {@link DDialogSelect} controller.\n */\nexport interface DDialogSelectController<VALUE, CATEGORY_ID = unknown> {\n\tsearch:\n\t\t| DDialogSelectSearch<VALUE, CATEGORY_ID>\n\t\t| DDialogSelectSearchFunction<VALUE, CATEGORY_ID>;\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 dismiss options.\n */\nexport interface DDialogSelectCategoryDismissOptions {\n\tenable?: boolean;\n\tlabel?: string;\n}\n\nexport interface DDialogSelectCategory<CATEGORY_ID> {\n\tid: CATEGORY_ID;\n\tlabel: string;\n}\n\n/**\n * {@link DDialogSelect} category options.\n */\nexport interface DDialogSelectCategoryOptions<VALUE, CATEGORY_ID>\n\textends DSelectOptions<CATEGORY_ID | null> {\n\tdismiss?: DDialogSelectCategoryDismissOptions;\n\titems?: DDialogSelectCategory<CATEGORY_ID>[];\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_ID = unknown,\n\tTHEME extends DThemeDialogSelect<VALUE, CATEGORY_ID> = DThemeDialogSelect<VALUE, CATEGORY_ID>,\n\tEMITTER = any\n> extends DDialogLayeredOptions<VALUE, THEME> {\n\tcontroller?: DDialogSelectController<VALUE, CATEGORY_ID>;\n\tcategory?: DDialogSelectCategoryOptions<VALUE, CATEGORY_ID>;\n\tdismiss?: DDialogSelectSearhDismissableOptions<VALUE, 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_ID = unknown>\n\textends DThemeDialogLayered {\n\tgetInputMargin(): number;\n\tisCategoryDismissable(): boolean;\n\tgetCategoryDismissLabel(): string;\n}\n\nexport class DDialogSelect<\n\tVALUE = unknown,\n\tCATEGORY_ID = unknown,\n\tTHEME extends DThemeDialogSelect<VALUE, CATEGORY_ID> = DThemeDialogSelect<VALUE, CATEGORY_ID>,\n\tOPTIONS extends DDialogSelectOptions<VALUE, CATEGORY_ID, THEME> = DDialogSelectOptions<\n\t\tVALUE,\n\t\tCATEGORY_ID,\n\t\tTHEME\n\t>\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 _categories: DDialogSelectCategory<CATEGORY_ID>[];\n\tprotected _input?: DInputSearch;\n\tprotected _inputLayout?: DLayoutHorizontal;\n\tprotected _list?: DDialogSelectList<VALUE>;\n\tprotected _search?: DDialogSelectSearch<VALUE, 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\t// Value\n\t\tthis._value = null;\n\n\t\t// Categories\n\t\tconst categories = options?.category?.items ?? [];\n\t\tthis._categories = categories;\n\t\tif (0 < categories.length) {\n\t\t\tthis.onCategoriesChange(categories);\n\t\t}\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 == null) {\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 result = new DSelect<CATEGORY_ID | null>(\n\t\t\tthis.toSelectCategoryOptions(this.theme, this._options)\n\t\t);\n\t\tresult.on(\"change\", (value: CATEGORY_ID) => {\n\t\t\tthis.onSelectCategoryChange(value);\n\t\t});\n\t\treturn result;\n\t}\n\n\tprotected toSelectCategoryOptions(\n\t\ttheme: THEME,\n\t\toptions?: OPTIONS\n\t): DSelectOptions<CATEGORY_ID | null> {\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\tif (result.visible === undefined) {\n\t\t\tresult.visible = false;\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\tif (0 < this._categories.length) {\n\t\t\tthis.search.create([value, this.selectCategory.value]);\n\t\t} else {\n\t\t\tthis.search.create([value]);\n\t\t}\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_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_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\tif (0 < this._categories.length) {\n\t\t\tthis.search.create([this.input.value, this.selectCategory.value]);\n\t\t} else {\n\t\t\tthis.search.create([this.input.value]);\n\t\t}\n\t}\n\n\tget categories(): DDialogSelectCategory<CATEGORY_ID>[] {\n\t\treturn this._categories;\n\t}\n\n\tset categories(categories: DDialogSelectCategory<CATEGORY_ID>[]) {\n\t\tthis._categories = categories;\n\t\tthis.onCategoriesChange(categories);\n\t}\n\n\tprotected onCategoriesChange(categories: DDialogSelectCategory<CATEGORY_ID>[]): void {\n\t\tconst selectCategory = this.selectCategory;\n\t\tif (0 < categories.length) {\n\t\t\tconst items = [];\n\t\t\tconst theme = this.theme;\n\t\t\tconst options = this.options?.category?.dismiss ?? {};\n\t\t\tif (options.enable ?? theme.isCategoryDismissable()) {\n\t\t\t\titems.push({\n\t\t\t\t\tvalue: null,\n\t\t\t\t\ttext: {\n\t\t\t\t\t\tvalue: options.label ?? theme.getCategoryDismissLabel()\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tfor (let i = 0, imax = categories.length; i < imax; ++i) {\n\t\t\t\tconst category = categories[i];\n\t\t\t\titems.push({\n\t\t\t\t\tvalue: category.id,\n\t\t\t\t\ttext: {\n\t\t\t\t\t\tvalue: category.label\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tselectCategory.menu = new DMenu<CATEGORY_ID | null>({\n\t\t\t\tfit: true,\n\t\t\t\titems\n\t\t\t});\n\t\t\tselectCategory.show();\n\t\t} else {\n\t\t\tselectCategory.hide();\n\t\t}\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;AAExD,OAAO,EAAE,OAAO,EAAkB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAkB,MAAM,YA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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 { DSelect, DSelectOptions } from \"./d-select\";\nimport { DMenu } from \"./d-menu\";\nimport { DDialogSelectSearchFunction } from \"./d-dialog-select-search-function\";\nimport { DButton, DButtonOptions } from \"./d-button\";\n\nexport interface DDialogSelectInputOpitons extends DInputSearchOptions {\n\tmargin?: number;\n}\n\n/**\n * {@link DDialogSelect} controller.\n */\nexport interface DDialogSelectController<VALUE, CATEGORY_ID = unknown> {\n\tsearch:\n\t\t| DDialogSelectSearch<VALUE, CATEGORY_ID>\n\t\t| DDialogSelectSearchFunction<VALUE, CATEGORY_ID>;\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 dismiss options.\n */\nexport interface DDialogSelectCategoryDismissOptions {\n\tenable?: boolean;\n\tlabel?: string;\n}\n\nexport interface DDialogSelectCategory<CATEGORY_ID> {\n\tid: CATEGORY_ID;\n\tlabel: string;\n}\n\n/**\n * {@link DDialogSelect} category options.\n */\nexport interface DDialogSelectCategoryOptions<VALUE, CATEGORY_ID>\n\textends DSelectOptions<CATEGORY_ID | null> {\n\tdismiss?: DDialogSelectCategoryDismissOptions;\n\titems?: DDialogSelectCategory<CATEGORY_ID>[];\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} \"dismiss\" options.\n */\nexport interface DDialogSelectDismissableOptions extends DButtonOptions<string> {\n\tenabled?: boolean;\n}\n\n/**\n * {@link DDialogSelect} options.\n */\nexport interface DDialogSelectOptions<\n\tVALUE,\n\tCATEGORY_ID = unknown,\n\tTHEME extends DThemeDialogSelect<VALUE, CATEGORY_ID> = DThemeDialogSelect<VALUE, CATEGORY_ID>,\n\tEMITTER = any\n> extends DDialogLayeredOptions<VALUE, THEME> {\n\tcontroller?: DDialogSelectController<VALUE, CATEGORY_ID>;\n\tcategory?: DDialogSelectCategoryOptions<VALUE, CATEGORY_ID>;\n\tdismiss?: DDialogSelectDismissableOptions;\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_ID = unknown>\n\textends DThemeDialogLayered {\n\tgetInputMargin(): number;\n\tisDismissable(): boolean;\n\tgetDismissLabel(): string;\n\tisCategoryDismissable(): boolean;\n\tgetCategoryDismissLabel(): string;\n}\n\nexport class DDialogSelect<\n\tVALUE = unknown,\n\tCATEGORY_ID = unknown,\n\tTHEME extends DThemeDialogSelect<VALUE, CATEGORY_ID> = DThemeDialogSelect<VALUE, CATEGORY_ID>,\n\tOPTIONS extends DDialogSelectOptions<VALUE, CATEGORY_ID, THEME> = DDialogSelectOptions<\n\t\tVALUE,\n\t\tCATEGORY_ID,\n\t\tTHEME\n\t>\n> extends DDialogLayered<VALUE | null, THEME, OPTIONS> {\n\tprotected _value: VALUE | null;\n\tprotected _selectCategory?: DSelect<CATEGORY_ID | null>;\n\tprotected _isCategoryFetched?: boolean;\n\tprotected _categories: DDialogSelectCategory<CATEGORY_ID>[];\n\tprotected _input?: DInputSearch;\n\tprotected _inputLayout?: DLayoutHorizontal;\n\tprotected _list?: DDialogSelectList<VALUE>;\n\tprotected _search?: DDialogSelectSearch<VALUE, CATEGORY_ID>;\n\tprotected _noteError?: DNote | null;\n\tprotected _noteNoItemsFound?: DNote | null;\n\tprotected _noteSearching?: DNote | null;\n\tprotected _buttonDismiss?: DButton<string> | null;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\t// Value\n\t\tthis._value = null;\n\n\t\t// Categories\n\t\tconst categories = options?.category?.items ?? [];\n\t\tthis._categories = categories;\n\t\tif (0 < categories.length) {\n\t\t\tthis.onCategoriesChange(categories);\n\t\t}\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, this.buttonDismiss);\n\t\treturn result;\n\t}\n\n\tprotected get inputLayout(): DLayoutHorizontal {\n\t\treturn (this._inputLayout ??= this.newInputLayout());\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.selectCategory, this.input]\n\t\t});\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\treturn (this._selectCategory ??= this.newSelectCategory());\n\t}\n\n\tprotected newSelectCategory(): DSelect<CATEGORY_ID | null> {\n\t\tconst result = new DSelect<CATEGORY_ID | null>(\n\t\t\tthis.toSelectCategoryOptions(this.theme, this._options)\n\t\t);\n\t\tresult.on(\"change\", (value: CATEGORY_ID) => {\n\t\t\tthis.onSelectCategoryChange(value);\n\t\t});\n\t\treturn result;\n\t}\n\n\tprotected toSelectCategoryOptions(\n\t\ttheme: THEME,\n\t\toptions?: OPTIONS\n\t): DSelectOptions<CATEGORY_ID | null> {\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\tif (result.visible === undefined) {\n\t\t\tresult.visible = false;\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\treturn (this._input ??= this.newInput());\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\tif (0 < this._categories.length) {\n\t\t\tthis.search.create([value, this.selectCategory.value]);\n\t\t} else {\n\t\t\tthis.search.create([value]);\n\t\t}\n\t}\n\n\tget list(): DDialogSelectList<VALUE> {\n\t\treturn (this._list ??= this.newList());\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\tconst selected = selection.first;\n\t\tif (selected == null) {\n\t\t\treturn;\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\treturn (this._noteError ??= this.newNoteError());\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\treturn (this._noteNoItemsFound ??= this.newNoteNoItemsFound());\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\treturn (this._noteSearching ??= this.newNoteSearching());\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_ID> {\n\t\treturn (this._search ??= this.newSearch());\n\t}\n\n\tprotected newSearch(): DDialogSelectSearch<VALUE, 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 search = controller.search;\n\t\t\t\tif (\"create\" in search) {\n\t\t\t\t\treturn search;\n\t\t\t\t} else {\n\t\t\t\t\treturn new DDialogSelectSearhImpl(search);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new DDialogSelectSearhImpl();\n\t}\n\n\tprotected get buttonDismiss(): DButton<string> | null {\n\t\tlet result = this._buttonDismiss;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newButtonDismiss();\n\t\t\tthis._buttonDismiss = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonDismiss(): DButton<string> | null {\n\t\tconst options = this.toButtonDismissOptions(this._options);\n\t\tif (options.enabled === true) {\n\t\t\tconst result = new DButton<string>(options);\n\t\t\tresult.on(\"active\", () => {\n\t\t\t\tthis._value = null;\n\t\t\t\tthis.onOk(null);\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected toButtonDismissOptions(options?: OPTIONS): DDialogSelectDismissableOptions {\n\t\tconst theme = this.theme;\n\t\tif (options != null) {\n\t\t\tconst dismiss = options.dismiss;\n\t\t\tif (dismiss != null) {\n\t\t\t\tif (dismiss.enabled === undefined) {\n\t\t\t\t\tdismiss.enabled = theme.isDismissable();\n\t\t\t\t}\n\t\t\t\tif (dismiss.weight === undefined && dismiss.width === undefined) {\n\t\t\t\t\tdismiss.width = \"padding\";\n\t\t\t\t}\n\t\t\t\tconst text = dismiss.text;\n\t\t\t\tif (text === undefined) {\n\t\t\t\t\tdismiss.text = {\n\t\t\t\t\t\tvalue: theme.getDismissLabel()\n\t\t\t\t\t};\n\t\t\t\t} else if (text.value === undefined) {\n\t\t\t\t\ttext.value = theme.getDismissLabel();\n\t\t\t\t}\n\t\t\t\treturn dismiss;\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\twidth: \"padding\",\n\t\t\tenabled: theme.isDismissable(),\n\t\t\ttext: {\n\t\t\t\tvalue: theme.getDismissLabel()\n\t\t\t}\n\t\t};\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\tif (0 < this._categories.length) {\n\t\t\tthis.search.create([this.input.value, this.selectCategory.value]);\n\t\t} else {\n\t\t\tthis.search.create([this.input.value]);\n\t\t}\n\t}\n\n\tget categories(): DDialogSelectCategory<CATEGORY_ID>[] {\n\t\treturn this._categories;\n\t}\n\n\tset categories(categories: DDialogSelectCategory<CATEGORY_ID>[]) {\n\t\tthis._categories = categories;\n\t\tthis.onCategoriesChange(categories);\n\t}\n\n\tprotected onCategoriesChange(categories: DDialogSelectCategory<CATEGORY_ID>[]): void {\n\t\tconst selectCategory = this.selectCategory;\n\t\tif (0 < categories.length) {\n\t\t\tconst items = [];\n\t\t\tconst theme = this.theme;\n\t\t\tconst options = this.options?.category?.dismiss ?? {};\n\t\t\tif (options.enable ?? theme.isCategoryDismissable()) {\n\t\t\t\titems.push({\n\t\t\t\t\tvalue: null,\n\t\t\t\t\ttext: {\n\t\t\t\t\t\tvalue: options.label ?? theme.getCategoryDismissLabel()\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tfor (let i = 0, imax = categories.length; i < imax; ++i) {\n\t\t\t\tconst category = categories[i];\n\t\t\t\titems.push({\n\t\t\t\t\tvalue: category.id,\n\t\t\t\t\ttext: {\n\t\t\t\t\t\tvalue: category.label\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tselectCategory.menu = new DMenu<CATEGORY_ID | null>({\n\t\t\t\tfit: true,\n\t\t\t\titems\n\t\t\t});\n\t\t\tselectCategory.show();\n\t\t} else {\n\t\t\tselectCategory.hide();\n\t\t}\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"]}
|
|
@@ -297,8 +297,6 @@ export * from "./d-dialog-save-as";
|
|
|
297
297
|
export * from "./d-dialog-select-list-item-updater";
|
|
298
298
|
export * from "./d-dialog-select-list-item";
|
|
299
299
|
export * from "./d-dialog-select-list";
|
|
300
|
-
export * from "./d-dialog-select-search-dismissable-impl";
|
|
301
|
-
export * from "./d-dialog-select-search-dismissable";
|
|
302
300
|
export * from "./d-dialog-select-search-function";
|
|
303
301
|
export * from "./d-dialog-select-search-impl";
|
|
304
302
|
export * from "./d-dialog-select-search";
|