@nanahoshi/mona-ui 0.9.0 → 0.11.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/fesm2022/nanahoshi-mona-ui-combo-box.mjs +53 -25
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +53 -24
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-D05Rq7-1.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-C86jzKCU.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Bad0K1Cw.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-D_GxIU2u.mjs} +2 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-C9VBe6IU.mjs +145 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-DvuQvc7E.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-BpgLVr6a.mjs} +79 -6
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-9f5wNcOJ.mjs +233 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-RQvhjBse.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CChyqXg7.mjs} +329 -55
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +24 -21
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +46 -12
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1 -1
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +2 -2
- package/types/nanahoshi-mona-ui-combo-box.d.ts +26 -10
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +25 -9
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +3 -3
- package/types/nanahoshi-mona-ui-grid.d.ts +107 -17
- package/types/nanahoshi-mona-ui-internal-list.d.ts +13 -4
- package/types/nanahoshi-mona-ui-multi-select.d.ts +26 -10
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-QqUUL60F.mjs +0 -122
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-BmahjOXq.mjs +0 -232
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CellEditEvent,
|
|
1
|
+
export { C as CellEditEvent, A as GridAddCommandDirective, B as GridAddEvent, D as GridCancelCommandDirective, E as GridCancelEvent, F as GridCellTemplateDirective, H as GridColumnComponent, I as GridColumnTitleTemplateDirective, J as GridCommandColumnComponent, K as GridComponent, L as GridContextMenuDirective, M as GridDetailTemplateDirective, N as GridEditCommandDirective, O as GridEditEvent, P as GridEditTemplateDirective, Q as GridEditableDirective, R as GridExportDirective, S as GridFilterableDirective, T as GridFooterTemplateDirective, U as GridGroupFooterTemplateDirective, V as GridGroupableDirective, W as GridHeaderTemplateDirective, X as GridNoDataTemplateDirective, Y as GridRemoveCommandDirective, Z as GridRemoveEvent, _ as GridReorderableDirective, $ as GridResizableDirective, a0 as GridRowReorderableDirective, a1 as GridSaveCommandDirective, a2 as GridSaveEvent, a3 as GridSelectableDirective, a4 as GridSortableDirective, a5 as GridStatePersistenceDirective, a6 as GridToolbarTemplateDirective, a7 as GridVirtualScrollDirective, a8 as RowEditEvent, a9 as RowReorderEvent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CChyqXg7.mjs';
|
|
2
2
|
//# sourceMappingURL=nanahoshi-mona-ui-grid.mjs.map
|
|
@@ -246,6 +246,25 @@ class ListService {
|
|
|
246
246
|
getItemPosition(item) {
|
|
247
247
|
return this.itemPositions().get(item.uid) ?? null;
|
|
248
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* Resolves the selection value of a data item through `valueField`.
|
|
251
|
+
*
|
|
252
|
+
* When no `valueField` is configured, the data item itself is the value.
|
|
253
|
+
* When `valueField` is a string, the item property is read with a nullish fallback to the item.
|
|
254
|
+
* When `valueField` is a function, its result is used as-is.
|
|
255
|
+
*
|
|
256
|
+
* Falsy results such as `0`, `false`, and `""` are valid values and do not fall back to the item.
|
|
257
|
+
*/
|
|
258
|
+
getDataItemValue(dataItem) {
|
|
259
|
+
const valueField = this.valueField();
|
|
260
|
+
if (!valueField) {
|
|
261
|
+
return dataItem;
|
|
262
|
+
}
|
|
263
|
+
if (typeof valueField === "string") {
|
|
264
|
+
return dataItem?.[valueField] ?? dataItem;
|
|
265
|
+
}
|
|
266
|
+
return valueField(dataItem);
|
|
267
|
+
}
|
|
249
268
|
clearFilter() {
|
|
250
269
|
this.filterText.set("");
|
|
251
270
|
}
|
|
@@ -431,16 +450,10 @@ class ListService {
|
|
|
431
450
|
this.selectableOptions.update(o => ({ ...o, ...options }));
|
|
432
451
|
}
|
|
433
452
|
setSelectedDataItems(dataItems) {
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
else {
|
|
439
|
-
const selectedKeys = from(dataItems)
|
|
440
|
-
.select(item => this.getDataItemSelectionKey(item))
|
|
441
|
-
.toImmutableSet();
|
|
442
|
-
this.selectedKeys.update(set => set.clear().addAll(selectedKeys));
|
|
443
|
-
}
|
|
453
|
+
const selectedKeys = from(dataItems)
|
|
454
|
+
.select(item => this.getDataItemValue(item))
|
|
455
|
+
.toImmutableSet();
|
|
456
|
+
this.selectedKeys.update(set => set.clear().addAll(selectedKeys));
|
|
444
457
|
}
|
|
445
458
|
setSelectedKeys(selectedKeys) {
|
|
446
459
|
this.selectedKeys.update(set => set.clear().addAll(selectedKeys));
|
|
@@ -477,16 +490,6 @@ class ListService {
|
|
|
477
490
|
return false;
|
|
478
491
|
}
|
|
479
492
|
}
|
|
480
|
-
getDataItemSelectionKey(dataItem) {
|
|
481
|
-
const valueField = this.valueField();
|
|
482
|
-
if (!valueField) {
|
|
483
|
-
return dataItem;
|
|
484
|
-
}
|
|
485
|
-
if (typeof valueField === "string") {
|
|
486
|
-
return dataItem?.[valueField] ?? dataItem;
|
|
487
|
-
}
|
|
488
|
-
return valueField(dataItem);
|
|
489
|
-
}
|
|
490
493
|
getOrderKey(item) {
|
|
491
494
|
const orderBy = this.groupableOptions().orderBy;
|
|
492
495
|
if (orderBy) {
|
|
@@ -513,7 +516,7 @@ class ListService {
|
|
|
513
516
|
return prevItem;
|
|
514
517
|
}
|
|
515
518
|
getSelectionKey(item) {
|
|
516
|
-
return this.
|
|
519
|
+
return this.getDataItemValue(item.data);
|
|
517
520
|
}
|
|
518
521
|
navigateForMultipleSelection(viewItems, direction) {
|
|
519
522
|
const selectedKeys = this.selectedKeys();
|
|
@@ -344,16 +344,31 @@ class MultiSelectComponent {
|
|
|
344
344
|
this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
|
|
345
345
|
/**
|
|
346
346
|
* @description Sets the value field of the multi select component.
|
|
347
|
-
* It
|
|
347
|
+
* It is used for stable item identity, matching externally supplied values, and primitive
|
|
348
|
+
* value projection when {@link valuePrimitive} is enabled.
|
|
349
|
+
* It can be null, string, or a function that takes an item and returns a value.
|
|
348
350
|
* If null, the item itself will be used as the value representation.
|
|
351
|
+
* Should resolve to a stable, unique scalar.
|
|
349
352
|
* @default null
|
|
350
353
|
*/
|
|
351
354
|
this.valueField = input(/* @ts-ignore */
|
|
352
355
|
...(ngDevMode ? [undefined, { debugName: "valueField" }] : /* istanbul ignore next */ []));
|
|
353
356
|
/**
|
|
354
|
-
* @description
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
+
* @description Determines whether the bound value contains complete data items
|
|
358
|
+
* or values extracted through {@link valueField}.
|
|
359
|
+
*
|
|
360
|
+
* When `false`, selecting an item writes the complete data item.
|
|
361
|
+
* When `true`, selecting an item writes the value resolved through `valueField`.
|
|
362
|
+
*
|
|
363
|
+
* @default false
|
|
364
|
+
*/
|
|
365
|
+
this.valuePrimitive = input(false, /* @ts-ignore */
|
|
366
|
+
...(ngDevMode ? [{ debugName: "valuePrimitive" }] : /* istanbul ignore next */ []));
|
|
367
|
+
/**
|
|
368
|
+
* @description Two-way bindable current selected values. Implements `FormValueControl<Iterable<TValue>>`,
|
|
369
|
+
* enabling signal forms `[formField]` binding.
|
|
370
|
+
* Object mode contains selected data items; primitive mode (see {@link valuePrimitive}) contains values
|
|
371
|
+
* resolved through {@link valueField}. An empty selection is represented by an empty iterable/array.
|
|
357
372
|
* @default []
|
|
358
373
|
*/
|
|
359
374
|
this.value = model([], /* @ts-ignore */
|
|
@@ -372,9 +387,10 @@ class MultiSelectComponent {
|
|
|
372
387
|
effect(() => {
|
|
373
388
|
const valueField = this.valueField();
|
|
374
389
|
const value = this.value();
|
|
390
|
+
const valuePrimitive = this.valuePrimitive();
|
|
375
391
|
untracked(() => {
|
|
376
392
|
this.#listService.setValueField(valueField ?? "");
|
|
377
|
-
this
|
|
393
|
+
this.synchronizeSelection(value);
|
|
378
394
|
});
|
|
379
395
|
});
|
|
380
396
|
effect(() => {
|
|
@@ -389,7 +405,7 @@ class MultiSelectComponent {
|
|
|
389
405
|
this.touch.emit();
|
|
390
406
|
}
|
|
391
407
|
onItemSelect() {
|
|
392
|
-
this.updateValue(this.
|
|
408
|
+
this.updateValue(this.getSelectedControlValues());
|
|
393
409
|
if (this.autoClose()) {
|
|
394
410
|
this.#popupRef()?.close();
|
|
395
411
|
}
|
|
@@ -400,7 +416,7 @@ class MultiSelectComponent {
|
|
|
400
416
|
return;
|
|
401
417
|
}
|
|
402
418
|
this.#listService.deselectItems([listItem]);
|
|
403
|
-
this.updateValue(this.
|
|
419
|
+
this.updateValue(this.getSelectedControlValues());
|
|
404
420
|
this.focus();
|
|
405
421
|
}
|
|
406
422
|
onSelectedItemGroupRemove(event) {
|
|
@@ -413,7 +429,7 @@ class MultiSelectComponent {
|
|
|
413
429
|
.takeLast(selectedItemCount - this.visibleTagCount())
|
|
414
430
|
.toArray();
|
|
415
431
|
this.#listService.deselectItems(removedItems);
|
|
416
|
-
this.updateValue(this.
|
|
432
|
+
this.updateValue(this.getSelectedControlValues());
|
|
417
433
|
this.focus();
|
|
418
434
|
}
|
|
419
435
|
onValueClear(event) {
|
|
@@ -426,6 +442,16 @@ class MultiSelectComponent {
|
|
|
426
442
|
this.#listService.clearSelections();
|
|
427
443
|
this.focus();
|
|
428
444
|
}
|
|
445
|
+
getSelectedControlValues() {
|
|
446
|
+
return this.selectedListItems()
|
|
447
|
+
.select(item => {
|
|
448
|
+
const value = this.valuePrimitive()
|
|
449
|
+
? this.#listService.getDataItemValue(item.data)
|
|
450
|
+
: item.data;
|
|
451
|
+
return value;
|
|
452
|
+
})
|
|
453
|
+
.toArray();
|
|
454
|
+
}
|
|
429
455
|
handleEnterKey() {
|
|
430
456
|
if (!this.#popupRef()) {
|
|
431
457
|
this.#dropdownService.triggerPopupOpen$.next({});
|
|
@@ -442,7 +468,7 @@ class MultiSelectComponent {
|
|
|
442
468
|
else {
|
|
443
469
|
this.#listService.selectItem(highlightedItem);
|
|
444
470
|
}
|
|
445
|
-
this.updateValue(this.
|
|
471
|
+
this.updateValue(this.getSelectedControlValues());
|
|
446
472
|
if (this.autoClose()) {
|
|
447
473
|
this.#popupRef()?.close();
|
|
448
474
|
}
|
|
@@ -468,7 +494,7 @@ class MultiSelectComponent {
|
|
|
468
494
|
}
|
|
469
495
|
const lastSelectedItem = selectedItems.last();
|
|
470
496
|
this.#listService.deselectItems([lastSelectedItem]);
|
|
471
|
-
this.updateValue(this.
|
|
497
|
+
this.updateValue(this.getSelectedControlValues());
|
|
472
498
|
});
|
|
473
499
|
}
|
|
474
500
|
setEnterKeySubscription() {
|
|
@@ -485,6 +511,14 @@ class MultiSelectComponent {
|
|
|
485
511
|
this.setBackspaceKeySubscription();
|
|
486
512
|
this.setEnterKeySubscription();
|
|
487
513
|
}
|
|
514
|
+
synchronizeSelection(value) {
|
|
515
|
+
if (this.valuePrimitive()) {
|
|
516
|
+
this.#listService.setSelectedKeys(value);
|
|
517
|
+
}
|
|
518
|
+
else {
|
|
519
|
+
this.#listService.setSelectedDataItems(value);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
488
522
|
updateValue(value, notify = true) {
|
|
489
523
|
this.value.set(value);
|
|
490
524
|
if (notify) {
|
|
@@ -492,7 +526,7 @@ class MultiSelectComponent {
|
|
|
492
526
|
}
|
|
493
527
|
}
|
|
494
528
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: MultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
495
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: MultiSelectComponent, isStandalone: true, selector: "mona-multi-select", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null }, checkboxes: { classPropertyName: "checkboxes", publicName: "checkboxes", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, itemDisabled: { classPropertyName: "itemDisabled", publicName: "itemDisabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, popupHeight: { classPropertyName: "popupHeight", publicName: "popupHeight", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", disabled: "disabledChange", open: "open", opened: "opened", touch: "touch", value: "valueChange" }, host: { listeners: { "blur": "onBlur()" }, properties: { "attr.aria-activedescendant": "activeDescendant()", "attr.aria-busy": "loading() ? 'true' : undefined", "attr.aria-controls": "listId", "attr.aria-disabled": "disabled() ? true : undefined", "attr.aria-expanded": "expanded()", "attr.aria-haspopup": "'listbox'", "attr.aria-invalid": "invalidState() ? true : undefined", "attr.aria-label": "ariaLabel()", "attr.aria-labelledby": "ariaLabelledBy()", "attr.aria-readonly": "readonly() ? true : undefined", "attr.aria-required": "required() ? true : undefined", "attr.data-disabled": "disabled() || null", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "attr.role": "'combobox'", "attr.tabindex": "disabled() ? null : 0", "class": "baseClass()" } }, providers: [
|
|
529
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: MultiSelectComponent, isStandalone: true, selector: "mona-multi-select", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null }, checkboxes: { classPropertyName: "checkboxes", publicName: "checkboxes", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, itemDisabled: { classPropertyName: "itemDisabled", publicName: "itemDisabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, popupHeight: { classPropertyName: "popupHeight", publicName: "popupHeight", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, valuePrimitive: { classPropertyName: "valuePrimitive", publicName: "valuePrimitive", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", disabled: "disabledChange", open: "open", opened: "opened", touch: "touch", value: "valueChange" }, host: { listeners: { "blur": "onBlur()" }, properties: { "attr.aria-activedescendant": "activeDescendant()", "attr.aria-busy": "loading() ? 'true' : undefined", "attr.aria-controls": "listId", "attr.aria-disabled": "disabled() ? true : undefined", "attr.aria-expanded": "expanded()", "attr.aria-haspopup": "'listbox'", "attr.aria-invalid": "invalidState() ? true : undefined", "attr.aria-label": "ariaLabel()", "attr.aria-labelledby": "ariaLabelledBy()", "attr.aria-readonly": "readonly() ? true : undefined", "attr.aria-required": "required() ? true : undefined", "attr.data-disabled": "disabled() || null", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "attr.role": "'combobox'", "attr.tabindex": "disabled() ? null : 0", "class": "baseClass()" } }, providers: [
|
|
496
530
|
ListService,
|
|
497
531
|
DropdownService,
|
|
498
532
|
MultiSelectService,
|
|
@@ -557,7 +591,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
557
591
|
}, template: "@if (prefixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </span>\n}\n\n<div [class]=\"itemContainerClass()\">\n @for (pair of valueTextMap(); track pair.key) {\n <mona-chip\n look=\"default\"\n [tabindex]=\"-1\"\n [removable]=\"true\"\n [removeTabIndex]=\"-1\"\n [disabled]=\"disabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (remove)=\"onSelectedItemRemove($event, pair.key!)\">\n @if (tagTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"tagTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: pair.key!.data }\"></ng-container>\n } @else {\n {{ pair.value }}\n }\n </mona-chip>\n }\n\n @if (tagCount() >= 0 && selectedListItems().length > tagCount()) {\n <mona-chip\n look=\"outline\"\n [tabindex]=\"-1\"\n [removable]=\"true\"\n [removeTabIndex]=\"-1\"\n [disabled]=\"disabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (remove)=\"onSelectedItemGroupRemove($event)\">\n @let remainingCount = selectedDataItems().length - tagCount();\n @if (summaryTagTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"summaryTagTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedDataItems(), tagCount: tagCount() }\"></ng-container>\n } @else {\n @let itemLabel = remainingCount === 1 ? \"item\" : \"items\";\n + {{ remainingCount }} {{ itemLabel }}\n }\n </mona-chip>\n }\n</div>\n\n@if (showClearButton() && selectedListItems().length !== 0 && !loading()) {\n <mona-indicator-icon\n preset=\"clear\"\n [class]=\"indicatorClass()\"\n [interactive]=\"true\"\n label=\"Clear\"\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\n}\n\n@if (loading()) {\n <mona-indicator-icon preset=\"loading\" [class]=\"indicatorClass()\" [size]=\"12\"></mona-indicator-icon>\n}\n\n<mona-indicator-icon preset=\"dropdown\" [class]=\"indicatorClass()\" [size]=\"18\"></mona-indicator-icon>\n\n<span monaDropdownLiveRegion></span>\n\n<ng-template #popupTemplate>\n <div [class]=\"listPopupClass()\">\n <mona-list [listId]=\"listId\" [focusOnMount]=\"false\" [size]=\"size()\" (itemSelect)=\"onItemSelect()\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n </ng-template>\n }\n </mona-list>\n </div>\n</ng-template>\n" }]
|
|
558
592
|
}], ctorParameters: () => [], propDecorators: { footerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownFooterTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], groupHeaderTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownGroupHeaderTemplateDirective), { ...{
|
|
559
593
|
read: TemplateRef
|
|
560
|
-
}, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownHeaderTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownItemTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], noDataTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownNoDataTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], popupTemplate: [{ type: i0.ViewChild, args: ["popupTemplate", { isSignal: true }] }], prefixTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownPrefixTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], tagTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MultiSelectTagTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], autoClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoClose", required: false }] }], checkboxes: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkboxes", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], closed: [{ type: i0.Output, args: ["closed"] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], itemDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemDisabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], open: [{ type: i0.Output, args: ["open"] }], opened: [{ type: i0.Output, args: ["opened"] }], popupClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupClass", required: false }] }], popupHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupHeight", required: false }] }], popupWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupWidth", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
594
|
+
}, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownHeaderTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownItemTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], noDataTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownNoDataTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], popupTemplate: [{ type: i0.ViewChild, args: ["popupTemplate", { isSignal: true }] }], prefixTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownPrefixTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], tagTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MultiSelectTagTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], autoClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoClose", required: false }] }], checkboxes: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkboxes", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], closed: [{ type: i0.Output, args: ["closed"] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], itemDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemDisabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], open: [{ type: i0.Output, args: ["open"] }], opened: [{ type: i0.Output, args: ["opened"] }], popupClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupClass", required: false }] }], popupHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupHeight", required: false }] }], popupWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupWidth", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: false }] }], valuePrimitive: [{ type: i0.Input, args: [{ isSignal: true, alias: "valuePrimitive", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
561
595
|
|
|
562
596
|
class MultiSelectSummaryTagTemplateDirective {
|
|
563
597
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: MultiSelectSummaryTagTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -700,7 +700,7 @@ class PagerComponent {
|
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
703
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: PagerComponent, isStandalone: true, selector: "mona-pager", inputs: { firstLast: { classPropertyName: "firstLast", publicName: "firstLast", isSignal: true, isRequired: false, transformFunction: null }, navigable: { classPropertyName: "navigable", publicName: "navigable", isSignal: true, isRequired: false, transformFunction: null }, pageInput: { classPropertyName: "pageInput", publicName: "pageInput", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeValues: { classPropertyName: "pageSizeValues", publicName: "pageSizeValues", isSignal: true, isRequired: false, transformFunction: null }, previousNext: { classPropertyName: "previousNext", publicName: "previousNext", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showInfo: { classPropertyName: "showInfo", publicName: "showInfo", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, skip: { classPropertyName: "skip", publicName: "skip", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, userClasses: { classPropertyName: "userClasses", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, visiblePages: { classPropertyName: "visiblePages", publicName: "visiblePages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange", pageSizeChange: "pageSizeChange" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.tabindex": "navigable() ? 0 : null", "class": "baseClasses()" } }, queries: [{ propertyName: "navigationButtonsTemplateList", predicate: PagerNavigationButtonsTemplateDirective, isSignal: true }, { propertyName: "numericButtonsTemplate", first: true, predicate: PagerNumericButtonsTemplateDirective, descendants: true, isSignal: true }, { propertyName: "pageSizeTemplate", first: true, predicate: PagerPageSizeTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "pagerInfoTemplate", first: true, predicate: PagerInfoTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "pageSizeDropdownList", first: true, predicate: ["pageSizeDropdownList"], descendants: true, isSignal: true }], ngImport: i0, template: "@let numericButtonsTemplateRef = numericButtonsTemplate()?.templateRef;\n@let pageSizeTemplateRef = pageSizeTemplate();\n@let pagerInfoTemplateRef = pagerInfoTemplate()?.templateRef;\n\n@if (type() === \"numeric\") {\n @if (pageListVisible()) {\n <ol [class]=\"listClasses()\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n\n @if (numericButtonsTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"numericButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"{ totalPages: pageCount() }\"></ng-container>\n } @else {\n @if (pages().length !== 0) {\n <li [class]=\"pageItemClasses(page() === 1)\">\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === 1\"\n [attr.aria-label]=\"'Page 1'\"\n [attr.aria-current]=\"page() === 1 ? 'page' : null\"\n (click)=\"onPageClick(1)\">\n 1\n </button>\n </li>\n }\n @if (previousJumperVisible()) {\n <li>\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"jumpPreviousLabel()\"\n (click)=\"onJumpPreviousClick()\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n\n @for (pageItem of pages() | monaSlice: 1 : pages().length - 1; track $index) {\n <li [attr.data-page]=\"pageItem.page\" [class]=\"pageItemClasses(page() === pageItem.page)\">\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === pageItem.page\"\n [attr.aria-label]=\"'Page ' + pageItem.text\"\n [attr.aria-current]=\"page() === pageItem.page ? 'page' : null\"\n (click)=\"onPageClick(pageItem.page)\">\n {{ pageItem.text }}\n </button>\n </li>\n }\n\n @if (nextJumperVisible()) {\n <li>\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"jumpNextLabel()\"\n (click)=\"onJumpNextClick()\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n\n @if (pages().length > 1) {\n <li [class]=\"pageItemClasses(page() === pageCount())\">\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === pageCount()\"\n [attr.aria-label]=\"'Page ' + pageCount()\"\n [attr.aria-current]=\"page() === pageCount() ? 'page' : null\"\n (click)=\"onPageClick(pageCount())\">\n {{ pageCount() }}\n </button>\n </li>\n }\n }\n\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n\n @if (pageInputVisible() && pageInput()) {\n <li>\n <mona-numeric-text-box\n monaPagerFocusable\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [ngModel]=\"inputValue()\"\n (ngModelChange)=\"inputValue.set($event)\"\n (inputBlur)=\"onPageInputBlur()\"></mona-numeric-text-box>\n </li>\n }\n\n @if (pageInputVisible() && pageSizeDropdownData().length > 0) {\n <li>\n @if (pageSizeTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pageSizeTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: pageSizeDropdownData() }\">\n </ng-container>\n } @else {\n <mona-dropdown-list\n monaPagerFocusable\n [data]=\"pageSizeDropdownData()\"\n [ngModel]=\"pageSize()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (ngModelChange)=\"onPageSizeValueChange($event)\"\n #pageSizeDropdownList>\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ item }} / page</span>\n </ng-template>\n </mona-dropdown-list>\n }\n </li>\n }\n </ol>\n }\n @if (infoVisible()) {\n @if (pagerInfoTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pagerInfoTemplateRef\"\n [ngTemplateOutletContext]=\"pagerInfoTemplateContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses()\">{{ pagerInfo() }}</span>\n }\n }\n}\n@if (type() === \"input\") {\n <div [class]=\"inputClasses()\">\n @if (pageListVisible()) {\n <ol [class]=\"listClasses()\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n <li class=\"flex items-center gap-2 mx-2\">\n <span>Page</span>\n <mona-numeric-text-box\n monaPagerFocusable\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [ngModel]=\"inputValue()\"\n (ngModelChange)=\"inputValue.set($event)\"\n (inputBlur)=\"onPageInputBlur()\"></mona-numeric-text-box>\n <span>of</span>\n <span>{{ pageCount() }}</span>\n </li>\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n }\n </div>\n @if (infoVisible()) {\n @if (pagerInfoTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pagerInfoTemplateRef\"\n [ngTemplateOutletContext]=\"pagerInfoTemplateContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses()\">{{ pagerInfo() }}</span>\n }\n }\n}\n@if (!pageListVisible()) {\n <ol [class]=\"listClasses()\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (pageCount() !== 0) {\n <li>\n <mona-dropdown-list\n monaPagerFocusable\n [data]=\"pageList()\"\n [ngModel]=\"page()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n monaDropDownVirtualScroll\n (ngModelChange)=\"onPageClick($event)\"\n style=\"width: 75px\"></mona-dropdown-list>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n}\n\n<ng-template #firstPageButton>\n <li>\n @let firstPageTemplate = firstPageNavigationTemplate();\n @if (firstPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{\n totalPages: pageCount(),\n pageSize: pagerPageSize(),\n disabled: page() === 1\n }\">\n </ng-container>\n } @else {\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"firstPageLabel\"\n (click)=\"onPageClick(1)\"\n [disabled]=\"page() === 1\">\n <svg lucideChevronsLeft [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #previousPageButton>\n <li>\n @let previousPageTemplate = previousPageNavigationTemplate();\n @if (previousPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"previousPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{\n totalPages: pageCount(),\n pageSize: pagerPageSize(),\n disabled: page() <= 1\n }\">\n </ng-container>\n } @else {\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"page() <= 1\"\n [attr.aria-label]=\"previousPageLabel\"\n (click)=\"onPreviousPageClick()\">\n <svg lucideChevronLeft [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #nextPageButton>\n <li>\n @let nextPageTemplate = nextPageNavigationTemplate();\n @if (nextPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"nextPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{\n totalPages: pageCount(),\n pageSize: pagerPageSize(),\n disabled: page() < 1 || page() === pageCount()\n }\">\n </ng-container>\n } @else {\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"page() < 1 || page() === pageCount()\"\n [attr.aria-label]=\"nextPageLabel\"\n (click)=\"onNextPageClick()\">\n <svg lucideChevronRight [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #lastPageButton>\n <li>\n @let lastPageTemplate = lastPageNavigationTemplate();\n @if (lastPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"lastPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{\n totalPages: pageCount(),\n pageSize: pagerPageSize(),\n disabled: page() === pageCount()\n }\">\n </ng-container>\n } @else {\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"lastPageLabel\"\n (click)=\"onPageClick(pageCount())\"\n [disabled]=\"page() === pageCount()\">\n <svg lucideChevronsRight [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: NumericTextBoxComponent, selector: "mona-numeric-text-box", inputs: ["aria-label", "decimals", "disabled", "formatter", "maxValue", "minValue", "nullable", "readonly", "required", "invalid", "rounded", "size", "spinners", "step", "tabindex", "touched", "class", "value"], outputs: ["inputBlur", "inputFocus", "inputFocusOut", "touch", "valueChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-label", "aria-labelledby", "data", "disabled", "itemDisabled", "invalid", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "valueField", "value"], outputs: ["close", "closed", "disabledChange", "open", "opened", "touch", "valueChange"] }, { kind: "directive", type: PagerFocusableDirective, selector: "[monaPagerFocusable]" }, { kind: "directive", type: DropdownVirtualScrollDirective, selector: " mona-auto-complete[monaDropDownVirtualScroll], mona-dropdown-list[monaDropDownVirtualScroll], mona-combo-box[monaDropDownVirtualScroll], mona-multi-select[monaDropDownVirtualScroll] ", inputs: ["monaDropDownVirtualScroll"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DropdownListValueTemplateDirective, selector: "ng-template[monaDropDownListValueTemplate]" }, { kind: "component", type: LucideEllipsis, selector: "svg[lucideEllipsis], svg[lucideMoreHorizontal]" }, { kind: "component", type: LucideChevronsLeft, selector: "svg[lucideChevronsLeft]" }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideChevronsRight, selector: "svg[lucideChevronsRight]" }, { kind: "pipe", type: SlicePipe, name: "monaSlice" }] }); }
|
|
703
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: PagerComponent, isStandalone: true, selector: "mona-pager", inputs: { firstLast: { classPropertyName: "firstLast", publicName: "firstLast", isSignal: true, isRequired: false, transformFunction: null }, navigable: { classPropertyName: "navigable", publicName: "navigable", isSignal: true, isRequired: false, transformFunction: null }, pageInput: { classPropertyName: "pageInput", publicName: "pageInput", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeValues: { classPropertyName: "pageSizeValues", publicName: "pageSizeValues", isSignal: true, isRequired: false, transformFunction: null }, previousNext: { classPropertyName: "previousNext", publicName: "previousNext", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showInfo: { classPropertyName: "showInfo", publicName: "showInfo", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, skip: { classPropertyName: "skip", publicName: "skip", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, userClasses: { classPropertyName: "userClasses", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, visiblePages: { classPropertyName: "visiblePages", publicName: "visiblePages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange", pageSizeChange: "pageSizeChange" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.tabindex": "navigable() ? 0 : null", "class": "baseClasses()" } }, queries: [{ propertyName: "navigationButtonsTemplateList", predicate: PagerNavigationButtonsTemplateDirective, isSignal: true }, { propertyName: "numericButtonsTemplate", first: true, predicate: PagerNumericButtonsTemplateDirective, descendants: true, isSignal: true }, { propertyName: "pageSizeTemplate", first: true, predicate: PagerPageSizeTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "pagerInfoTemplate", first: true, predicate: PagerInfoTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "pageSizeDropdownList", first: true, predicate: ["pageSizeDropdownList"], descendants: true, isSignal: true }], ngImport: i0, template: "@let numericButtonsTemplateRef = numericButtonsTemplate()?.templateRef;\n@let pageSizeTemplateRef = pageSizeTemplate();\n@let pagerInfoTemplateRef = pagerInfoTemplate()?.templateRef;\n\n@if (type() === \"numeric\") {\n @if (pageListVisible()) {\n <ol [class]=\"listClasses()\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n\n @if (numericButtonsTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"numericButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"{ totalPages: pageCount() }\"></ng-container>\n } @else {\n @if (pages().length !== 0) {\n <li [class]=\"pageItemClasses(page() === 1)\">\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === 1\"\n [attr.aria-label]=\"'Page 1'\"\n [attr.aria-current]=\"page() === 1 ? 'page' : null\"\n (click)=\"onPageClick(1)\">\n 1\n </button>\n </li>\n }\n @if (previousJumperVisible()) {\n <li>\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"jumpPreviousLabel()\"\n (click)=\"onJumpPreviousClick()\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n\n @for (pageItem of pages() | monaSlice: 1 : pages().length - 1; track $index) {\n <li [attr.data-page]=\"pageItem.page\" [class]=\"pageItemClasses(page() === pageItem.page)\">\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === pageItem.page\"\n [attr.aria-label]=\"'Page ' + pageItem.text\"\n [attr.aria-current]=\"page() === pageItem.page ? 'page' : null\"\n (click)=\"onPageClick(pageItem.page)\">\n {{ pageItem.text }}\n </button>\n </li>\n }\n\n @if (nextJumperVisible()) {\n <li>\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"jumpNextLabel()\"\n (click)=\"onJumpNextClick()\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n\n @if (pages().length > 1) {\n <li [class]=\"pageItemClasses(page() === pageCount())\">\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === pageCount()\"\n [attr.aria-label]=\"'Page ' + pageCount()\"\n [attr.aria-current]=\"page() === pageCount() ? 'page' : null\"\n (click)=\"onPageClick(pageCount())\">\n {{ pageCount() }}\n </button>\n </li>\n }\n }\n\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n\n @if (pageInputVisible() && pageInput()) {\n <li>\n <mona-numeric-text-box\n monaPagerFocusable\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [ngModel]=\"inputValue()\"\n (ngModelChange)=\"inputValue.set($event)\"\n (inputBlur)=\"onPageInputBlur()\"></mona-numeric-text-box>\n </li>\n }\n\n @if (pageInputVisible() && pageSizeDropdownData().length > 0) {\n <li>\n @if (pageSizeTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pageSizeTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: pageSizeDropdownData() }\">\n </ng-container>\n } @else {\n <mona-dropdown-list\n monaPagerFocusable\n [data]=\"pageSizeDropdownData()\"\n [ngModel]=\"pageSize()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (ngModelChange)=\"onPageSizeValueChange($event)\"\n #pageSizeDropdownList>\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ item }} / page</span>\n </ng-template>\n </mona-dropdown-list>\n }\n </li>\n }\n </ol>\n }\n @if (infoVisible()) {\n @if (pagerInfoTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pagerInfoTemplateRef\"\n [ngTemplateOutletContext]=\"pagerInfoTemplateContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses()\">{{ pagerInfo() }}</span>\n }\n }\n}\n@if (type() === \"input\") {\n <div [class]=\"inputClasses()\">\n @if (pageListVisible()) {\n <ol [class]=\"listClasses()\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n <li class=\"flex items-center gap-2 mx-2\">\n <span>Page</span>\n <mona-numeric-text-box\n monaPagerFocusable\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [ngModel]=\"inputValue()\"\n (ngModelChange)=\"inputValue.set($event)\"\n (inputBlur)=\"onPageInputBlur()\"></mona-numeric-text-box>\n <span>of</span>\n <span>{{ pageCount() }}</span>\n </li>\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n }\n </div>\n @if (infoVisible()) {\n @if (pagerInfoTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pagerInfoTemplateRef\"\n [ngTemplateOutletContext]=\"pagerInfoTemplateContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses()\">{{ pagerInfo() }}</span>\n }\n }\n}\n@if (!pageListVisible()) {\n <ol [class]=\"listClasses()\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (pageCount() !== 0) {\n <li>\n <mona-dropdown-list\n monaPagerFocusable\n [data]=\"pageList()\"\n [ngModel]=\"page()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n monaDropDownVirtualScroll\n (ngModelChange)=\"onPageClick($event)\"\n style=\"width: 75px\"></mona-dropdown-list>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n}\n\n<ng-template #firstPageButton>\n <li>\n @let firstPageTemplate = firstPageNavigationTemplate();\n @if (firstPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{\n totalPages: pageCount(),\n pageSize: pagerPageSize(),\n disabled: page() === 1\n }\">\n </ng-container>\n } @else {\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"firstPageLabel\"\n (click)=\"onPageClick(1)\"\n [disabled]=\"page() === 1\">\n <svg lucideChevronsLeft [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #previousPageButton>\n <li>\n @let previousPageTemplate = previousPageNavigationTemplate();\n @if (previousPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"previousPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{\n totalPages: pageCount(),\n pageSize: pagerPageSize(),\n disabled: page() <= 1\n }\">\n </ng-container>\n } @else {\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"page() <= 1\"\n [attr.aria-label]=\"previousPageLabel\"\n (click)=\"onPreviousPageClick()\">\n <svg lucideChevronLeft [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #nextPageButton>\n <li>\n @let nextPageTemplate = nextPageNavigationTemplate();\n @if (nextPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"nextPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{\n totalPages: pageCount(),\n pageSize: pagerPageSize(),\n disabled: page() < 1 || page() === pageCount()\n }\">\n </ng-container>\n } @else {\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"page() < 1 || page() === pageCount()\"\n [attr.aria-label]=\"nextPageLabel\"\n (click)=\"onNextPageClick()\">\n <svg lucideChevronRight [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #lastPageButton>\n <li>\n @let lastPageTemplate = lastPageNavigationTemplate();\n @if (lastPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"lastPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{\n totalPages: pageCount(),\n pageSize: pagerPageSize(),\n disabled: page() === pageCount()\n }\">\n </ng-container>\n } @else {\n <button\n monaPagerFocusable\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"lastPageLabel\"\n (click)=\"onPageClick(pageCount())\"\n [disabled]=\"page() === pageCount()\">\n <svg lucideChevronsRight [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: NumericTextBoxComponent, selector: "mona-numeric-text-box", inputs: ["aria-label", "decimals", "disabled", "formatter", "maxValue", "minValue", "nullable", "readonly", "required", "invalid", "rounded", "size", "spinners", "step", "tabindex", "touched", "class", "value"], outputs: ["inputBlur", "inputFocus", "inputFocusOut", "touch", "valueChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-label", "aria-labelledby", "data", "disabled", "itemDisabled", "invalid", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "valueField", "valuePrimitive", "value"], outputs: ["close", "closed", "disabledChange", "open", "opened", "touch", "valueChange"] }, { kind: "directive", type: PagerFocusableDirective, selector: "[monaPagerFocusable]" }, { kind: "directive", type: DropdownVirtualScrollDirective, selector: " mona-auto-complete[monaDropDownVirtualScroll], mona-dropdown-list[monaDropDownVirtualScroll], mona-combo-box[monaDropDownVirtualScroll], mona-multi-select[monaDropDownVirtualScroll] ", inputs: ["monaDropDownVirtualScroll"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DropdownListValueTemplateDirective, selector: "ng-template[monaDropDownListValueTemplate]" }, { kind: "component", type: LucideEllipsis, selector: "svg[lucideEllipsis], svg[lucideMoreHorizontal]" }, { kind: "component", type: LucideChevronsLeft, selector: "svg[lucideChevronsLeft]" }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideChevronsRight, selector: "svg[lucideChevronsRight]" }, { kind: "pipe", type: SlicePipe, name: "monaSlice" }] }); }
|
|
704
704
|
}
|
|
705
705
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerComponent, decorators: [{
|
|
706
706
|
type: Component,
|
package/package.json
CHANGED
|
@@ -169,7 +169,7 @@ declare class AutoCompleteComponent<TData = unknown> implements FormValueControl
|
|
|
169
169
|
* If null, the item itself is used as the display text.
|
|
170
170
|
* @default null
|
|
171
171
|
*/
|
|
172
|
-
readonly textField: _angular_core.InputSignal<DropdownFieldSelectorType<TData>>;
|
|
172
|
+
readonly textField: _angular_core.InputSignal<DropdownFieldSelectorType<TData, string>>;
|
|
173
173
|
/**
|
|
174
174
|
* @description Emitted when the autocomplete is interacted with on blur, selection, clear, or committed input.
|
|
175
175
|
* The `FormField` directive listens to this to mark the field as touched.
|
|
@@ -191,7 +191,7 @@ declare class AutoCompleteComponent<TData = unknown> implements FormValueControl
|
|
|
191
191
|
* If null, the item itself is used as the value.
|
|
192
192
|
* @default null
|
|
193
193
|
*/
|
|
194
|
-
readonly valueField: _angular_core.InputSignal<DropdownFieldSelectorType<TData>>;
|
|
194
|
+
readonly valueField: _angular_core.InputSignal<DropdownFieldSelectorType<TData, unknown>>;
|
|
195
195
|
/**
|
|
196
196
|
* @description Two-way bindable current autocomplete value. Implements `FormValueControl<string | null>`,
|
|
197
197
|
* enabling signal forms `[formField]` binding.
|
|
@@ -31,7 +31,7 @@ type ComboBoxAffixContainerVariantInput = VariantInputs<ComboBoxAffixContainerVa
|
|
|
31
31
|
type ComboBoxVariantProps = ComboBoxBaseVariantProps & ComboBoxTextInputVariantProps & ComboBoxAffixContainerVariantProps;
|
|
32
32
|
type ComboBoxVariantInput = Omit<ComboBoxBaseVariantInput, "focused" | "invalid"> & ComboBoxTextInputVariantInput & ComboBoxAffixContainerVariantInput;
|
|
33
33
|
|
|
34
|
-
declare class ComboBoxComponent<TData = unknown> implements FormValueControl<
|
|
34
|
+
declare class ComboBoxComponent<TData = unknown, TValue = TData> implements FormValueControl<TValue | null>, ComboBoxVariantInput, DropdownDataInput<TData>, DropdownPopupInput, DropdownPopupVariantInput {
|
|
35
35
|
#private;
|
|
36
36
|
protected readonly activeDescendant: _angular_core.Signal<string | null>;
|
|
37
37
|
protected readonly affixClass: _angular_core.Signal<string>;
|
|
@@ -168,7 +168,7 @@ declare class ComboBoxComponent<TData = unknown> implements FormValueControl<TDa
|
|
|
168
168
|
* If not set, the item itself is used as the text representation.
|
|
169
169
|
* @default undefined
|
|
170
170
|
*/
|
|
171
|
-
readonly textField: _angular_core.InputSignal<DropdownFieldSelectorType<TData>>;
|
|
171
|
+
readonly textField: _angular_core.InputSignal<DropdownFieldSelectorType<TData, string>>;
|
|
172
172
|
/**
|
|
173
173
|
* @description Emitted when the combo box is interacted with on blur, selection, clear, or committed input.
|
|
174
174
|
* The `FormField` directive listens to this to mark the field as touched.
|
|
@@ -192,17 +192,31 @@ declare class ComboBoxComponent<TData = unknown> implements FormValueControl<TDa
|
|
|
192
192
|
readonly valueAdd: _angular_core.OutputEmitterRef<string>;
|
|
193
193
|
/**
|
|
194
194
|
* @description Property name or accessor used to derive the value from a data item.
|
|
195
|
-
*
|
|
195
|
+
* It is used for stable item identity, matching externally supplied values, and primitive
|
|
196
|
+
* value projection when {@link valuePrimitive} is enabled.
|
|
197
|
+
* When omitted, the item itself is used as the value representation.
|
|
198
|
+
* Should resolve to a stable, unique scalar.
|
|
196
199
|
* @default undefined
|
|
197
200
|
*/
|
|
198
|
-
readonly valueField: _angular_core.InputSignal<DropdownFieldSelectorType<TData>>;
|
|
201
|
+
readonly valueField: _angular_core.InputSignal<DropdownFieldSelectorType<TData, unknown>>;
|
|
199
202
|
/**
|
|
200
|
-
* @description
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
+
* @description Determines whether the bound value contains complete data items
|
|
204
|
+
* or values extracted through {@link valueField}.
|
|
205
|
+
*
|
|
206
|
+
* When `false`, selecting an item writes the complete data item.
|
|
207
|
+
* When `true`, selecting an item writes the value resolved through `valueField`.
|
|
208
|
+
*
|
|
209
|
+
* @default false
|
|
210
|
+
*/
|
|
211
|
+
readonly valuePrimitive: _angular_core.InputSignal<boolean>;
|
|
212
|
+
/**
|
|
213
|
+
* @description Two-way bindable current selected value. Implements `FormValueControl<TValue | null>`,
|
|
214
|
+
* enabling signal forms `[formField]` binding.
|
|
215
|
+
* Object mode returns the selected data item; primitive mode (see {@link valuePrimitive}) returns the value
|
|
216
|
+
* resolved through {@link valueField}. `null` represents no selection.
|
|
203
217
|
* @default null
|
|
204
218
|
*/
|
|
205
|
-
readonly value: _angular_core.ModelSignal<
|
|
219
|
+
readonly value: _angular_core.ModelSignal<TValue | null>;
|
|
206
220
|
constructor();
|
|
207
221
|
protected onInputBlur(): void;
|
|
208
222
|
protected onItemSelect(event: SelectionChangeEvent<TData>): void;
|
|
@@ -223,8 +237,10 @@ declare class ComboBoxComponent<TData = unknown> implements FormValueControl<TDa
|
|
|
223
237
|
private setSpaceKeySubscription;
|
|
224
238
|
private setSubscriptions;
|
|
225
239
|
private updateValue;
|
|
226
|
-
|
|
227
|
-
|
|
240
|
+
private getControlValue;
|
|
241
|
+
private synchronizeSelection;
|
|
242
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboBoxComponent<any, any>, never>;
|
|
243
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ComboBoxComponent<any, any>, "mona-combo-box", never, { "allowCustomValue": { "alias": "allowCustomValue"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "itemDisabled": { "alias": "itemDisabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "popupHeight": { "alias": "popupHeight"; "required": false; "isSignal": true; }; "popupWidth": { "alias": "popupWidth"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "valuePrimitive": { "alias": "valuePrimitive"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "disabled": "disabledChange"; "open": "open"; "opened": "opened"; "touch": "touch"; "valueAdd": "valueAdd"; "value": "valueChange"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate", "prefixTemplate"], never, true, [{ directive: typeof i1.DropdownDataHandlerDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DropdownListPopupHandlerDirective; inputs: {}; outputs: {}; }]>;
|
|
228
244
|
}
|
|
229
245
|
|
|
230
246
|
export { ComboBoxComponent };
|
|
@@ -32,7 +32,7 @@ type DropdownListValueContainerVariantInput = VariantInputs<DropdownListValueCon
|
|
|
32
32
|
type DropDownListVariantProps = DropdownListInputVariantProps & DropdownListAffixContainerVariantProps & DropdownListValueContainerVariantProps;
|
|
33
33
|
type DropDownListVariantInput = Omit<DropdownListInputVariantInput, "expanded" | "hasPrefix" | "invalid"> & DropdownListAffixContainerVariantInput & Omit<DropdownListValueContainerVariantInput, "hasTemplate">;
|
|
34
34
|
|
|
35
|
-
declare class DropdownListComponent<TData = unknown> implements FormValueControl<
|
|
35
|
+
declare class DropdownListComponent<TData = unknown, TValue = TData> implements FormValueControl<TValue | null>, DropDownListVariantInput, DropdownDataInput<TData>, DropdownPopupInput {
|
|
36
36
|
#private;
|
|
37
37
|
protected readonly activeDescendant: _angular_core.Signal<string | null>;
|
|
38
38
|
protected readonly affixClass: _angular_core.Signal<string>;
|
|
@@ -158,7 +158,7 @@ declare class DropdownListComponent<TData = unknown> implements FormValueControl
|
|
|
158
158
|
* If omitted, the item itself is used as the display text.
|
|
159
159
|
* @default undefined
|
|
160
160
|
*/
|
|
161
|
-
readonly textField: _angular_core.InputSignal<DropdownFieldSelectorType<TData>>;
|
|
161
|
+
readonly textField: _angular_core.InputSignal<DropdownFieldSelectorType<TData, string>>;
|
|
162
162
|
/**
|
|
163
163
|
* @description Emitted when the control is interacted with via blur, selection, or clear.
|
|
164
164
|
* The `FormField` directive listens to this to mark the field as touched.
|
|
@@ -176,24 +176,39 @@ declare class DropdownListComponent<TData = unknown> implements FormValueControl
|
|
|
176
176
|
readonly userClass: _angular_core.InputSignal<string>;
|
|
177
177
|
/**
|
|
178
178
|
* @description Property name or accessor used to derive the value from a data item.
|
|
179
|
-
*
|
|
179
|
+
* It is used for stable item identity, matching externally supplied values, and primitive
|
|
180
|
+
* value projection when {@link valuePrimitive} is enabled.
|
|
181
|
+
* When omitted, the item itself is used as the value.
|
|
182
|
+
* Should resolve to a stable, unique scalar.
|
|
180
183
|
* @default undefined
|
|
181
184
|
*/
|
|
182
|
-
readonly valueField: _angular_core.InputSignal<DropdownFieldSelectorType<TData>>;
|
|
185
|
+
readonly valueField: _angular_core.InputSignal<DropdownFieldSelectorType<TData, unknown>>;
|
|
186
|
+
/**
|
|
187
|
+
* @description Determines whether the bound value contains complete data items
|
|
188
|
+
* or values extracted through {@link valueField}.
|
|
189
|
+
*
|
|
190
|
+
* When `false`, selecting an item writes the complete data item.
|
|
191
|
+
* When `true`, selecting an item writes the value resolved through `valueField`.
|
|
192
|
+
*
|
|
193
|
+
* @default false
|
|
194
|
+
*/
|
|
195
|
+
readonly valuePrimitive: _angular_core.InputSignal<boolean>;
|
|
183
196
|
/**
|
|
184
197
|
* @description Currently selected value, two-way bindable and compatible with Signal Forms via `[formField]`.
|
|
185
|
-
*
|
|
198
|
+
* Object mode returns the selected data item; primitive mode (see {@link valuePrimitive}) returns the value
|
|
199
|
+
* resolved through {@link valueField}. `null` represents no selection.
|
|
186
200
|
* @default null
|
|
187
201
|
*/
|
|
188
|
-
readonly value: _angular_core.ModelSignal<
|
|
202
|
+
readonly value: _angular_core.ModelSignal<TValue | null>;
|
|
189
203
|
constructor();
|
|
190
|
-
setValue(value:
|
|
204
|
+
setValue(value: TValue): void;
|
|
191
205
|
protected onBlur(): void;
|
|
192
206
|
protected onItemSelect(event: SelectionChangeEvent<TData>): void;
|
|
193
207
|
protected onValueClear(event: MouseEvent | KeyboardEvent): void;
|
|
194
208
|
private closePopup;
|
|
195
209
|
private cycleThroughMatchedItems;
|
|
196
210
|
focus(): void;
|
|
211
|
+
private getControlValue;
|
|
197
212
|
private handleEnterKey;
|
|
198
213
|
private handleHomeEndKeys;
|
|
199
214
|
private initialize;
|
|
@@ -204,9 +219,10 @@ declare class DropdownListComponent<TData = unknown> implements FormValueControl
|
|
|
204
219
|
private setPopupCloseSubscriptions;
|
|
205
220
|
private setSubscriptions;
|
|
206
221
|
private setTypeaheadSubscription;
|
|
222
|
+
private synchronizeSelection;
|
|
207
223
|
private updateValue;
|
|
208
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DropdownListComponent<any>, never>;
|
|
209
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DropdownListComponent<any>, "mona-dropdown-list", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "itemDisabled": { "alias": "itemDisabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "popupHeight": { "alias": "popupHeight"; "required": false; "isSignal": true; }; "popupWidth": { "alias": "popupWidth"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "disabled": "disabledChange"; "open": "open"; "opened": "opened"; "touch": "touch"; "value": "valueChange"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate", "prefixTemplate", "valueTemplate"], never, true, [{ directive: typeof i1.DropdownDataHandlerDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DropdownListPopupHandlerDirective; inputs: {}; outputs: {}; }]>;
|
|
224
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DropdownListComponent<any, any>, never>;
|
|
225
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DropdownListComponent<any, any>, "mona-dropdown-list", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "itemDisabled": { "alias": "itemDisabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "popupHeight": { "alias": "popupHeight"; "required": false; "isSignal": true; }; "popupWidth": { "alias": "popupWidth"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "valuePrimitive": { "alias": "valuePrimitive"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "disabled": "disabledChange"; "open": "open"; "opened": "opened"; "touch": "touch"; "value": "valueChange"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate", "prefixTemplate", "valueTemplate"], never, true, [{ directive: typeof i1.DropdownDataHandlerDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DropdownListPopupHandlerDirective; inputs: {}; outputs: {}; }]>;
|
|
210
226
|
}
|
|
211
227
|
|
|
212
228
|
declare class DropdownListValueTemplateDirective {
|
|
@@ -10,14 +10,14 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
10
10
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
11
11
|
import { VariantProps } from 'class-variance-authority';
|
|
12
12
|
|
|
13
|
-
type DropdownFieldSelectorType<TData> = string | Selector<TData,
|
|
13
|
+
type DropdownFieldSelectorType<TData, TResult = unknown> = string | Selector<TData, TResult> | null | undefined;
|
|
14
14
|
type DropdownFieldPredicateType<TData> = string | Predicate<TData> | null | undefined;
|
|
15
15
|
|
|
16
16
|
interface DropdownDataInput<TData> {
|
|
17
17
|
readonly data: InputSignal<Iterable<TData>>;
|
|
18
18
|
readonly itemDisabled: InputSignal<DropdownFieldPredicateType<TData>>;
|
|
19
|
-
readonly textField: InputSignal<DropdownFieldSelectorType<TData>>;
|
|
20
|
-
readonly valueField: InputSignal<DropdownFieldSelectorType<TData>>;
|
|
19
|
+
readonly textField: InputSignal<DropdownFieldSelectorType<TData, string>>;
|
|
20
|
+
readonly valueField: InputSignal<DropdownFieldSelectorType<TData, unknown>>;
|
|
21
21
|
}
|
|
22
22
|
declare const DropdownDataInputToken: InjectionToken<DropdownDataInput<unknown>>;
|
|
23
23
|
|