@nanahoshi/mona-ui 0.37.0 → 0.38.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/docs/api/common.md +1 -1
- package/docs/api/dropdown-list.md +2 -0
- package/docs/api/dropdown-tree.md +81 -0
- package/docs/api/dropdowns.md +34 -8
- package/docs/api/i18n.md +33 -4
- package/docs/api/list.md +1 -1
- package/docs/api/locales.md +14 -14
- package/docs/api/multi-select-tree.md +75 -0
- package/docs/api/multi-select.md +3 -1
- package/docs/api/popup.md +1 -1
- package/docs/api/tree-view.md +2 -2
- package/docs/auto-complete.md +2 -0
- package/docs/combo-box.md +2 -0
- package/docs/dropdown-list.md +52 -0
- package/docs/dropdown-tree.md +427 -0
- package/docs/multi-select-tree.md +353 -0
- package/docs/multi-select.md +6 -0
- package/dropdown-tree/package.json +4 -0
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +40 -5
- package/fesm2022/nanahoshi-mona-ui-dropdown-tree.mjs +1061 -0
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +701 -60
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +8 -2
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +2 -0
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +2 -0
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +13 -0
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +80 -37
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +7 -0
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +7 -0
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +7 -0
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +7 -0
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +7 -0
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +7 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +7 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +7 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +17 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +7 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +17 -0
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +7 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +7 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +7 -0
- package/fesm2022/nanahoshi-mona-ui-multi-select-tree.mjs +1179 -0
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +42 -7
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +3 -1
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -1
- package/i18n/catalogs/en-US.messages.json +9 -0
- package/llms.txt +6 -2
- package/locales/ar-sa/ar-sa.messages.json +9 -0
- package/locales/de-de/de-de.messages.json +9 -0
- package/locales/es-es/es-es.messages.json +9 -0
- package/locales/fr-fr/fr-fr.messages.json +9 -0
- package/locales/id-id/id-id.messages.json +9 -0
- package/locales/it-it/it-it.messages.json +9 -0
- package/locales/ja-jp/ja-jp.messages.json +9 -0
- package/locales/ko-kr/ko-kr.messages.json +9 -0
- package/locales/pl-pl/pl-pl.messages.json +9 -0
- package/locales/pt-br/pt-br.messages.json +9 -0
- package/locales/ru-ru/ru-ru.messages.json +9 -0
- package/locales/tr-tr/tr-tr.messages.json +9 -0
- package/locales/zh-cn/zh-cn.messages.json +9 -0
- package/locales/zh-tw/zh-tw.messages.json +9 -0
- package/multi-select-tree/package.json +4 -0
- package/package.json +9 -1
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +33 -5
- package/types/nanahoshi-mona-ui-dropdown-tree.d.ts +414 -0
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +198 -8
- package/types/nanahoshi-mona-ui-i18n.d.ts +12 -0
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +36 -0
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +9 -0
- package/types/nanahoshi-mona-ui-multi-select-tree.d.ts +456 -0
- package/types/nanahoshi-mona-ui-multi-select.d.ts +43 -7
|
@@ -1,22 +1,433 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { DOCUMENT, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, afterNextRender, effect, inject, input, output, signal, untracked } from "@angular/core";
|
|
2
|
+
import { Component, DOCUMENT, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, afterNextRender, computed, effect, inject, input, output, signal, untracked } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
import { LucideX } from "@lucide/angular";
|
|
5
|
+
import { ButtonDirective } from "@nanahoshi/mona-ui/button";
|
|
6
|
+
import { MonaI18nService, formatNumber, injectComponentDirection } from "@nanahoshi/mona-ui/i18n";
|
|
7
|
+
import { PopupCloseEvent, PopupCloseSource, PopupDataInjectionToken, PopupRef, PopupService, dropdownPopupAnimation, slideFromBottomPopupAnimation } from "@nanahoshi/mona-ui/popup";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { focusCanReturn, setupTypeahead, themeOverlaySurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
10
|
+
import { FilterInputComponent } from "@nanahoshi/mona-ui/internal/filter-input";
|
|
11
|
+
import { injectLiveAnnouncer } from "@nanahoshi/mona-ui/internal/live-announcer";
|
|
12
|
+
import { TREE_DEFAULT_MESSAGES, TreeComponent, TreeNodeTemplateDirective, TreeService, handleTreeNavigationKey } from "@nanahoshi/mona-ui/internal/tree";
|
|
13
|
+
import { PlaceholderComponent } from "@nanahoshi/mona-ui/placeholder";
|
|
3
14
|
import { takeUntilDestroyed, toObservable } from "@angular/core/rxjs-interop";
|
|
4
15
|
import { ListService } from "@nanahoshi/mona-ui/internal/list";
|
|
5
16
|
import { PreventableEvent } from "@nanahoshi/mona-ui/common";
|
|
6
|
-
import {
|
|
7
|
-
import { Subject, filter, fromEvent, switchMap, take, takeUntil } from "rxjs";
|
|
17
|
+
import { Subject, filter, fromEvent, merge, switchMap, take, takeUntil } from "rxjs";
|
|
8
18
|
import { ConnectionPositionPair } from "@angular/cdk/overlay";
|
|
9
|
-
import { focusCanReturn, themeOverlaySurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
10
|
-
import { MonaI18nService, formatNumber } from "@nanahoshi/mona-ui/i18n";
|
|
11
|
-
import { injectLiveAnnouncer } from "@nanahoshi/mona-ui/internal/live-announcer";
|
|
12
|
-
import { cva } from "class-variance-authority";
|
|
13
19
|
const DROPDOWN_DATA_INPUT_TOKEN = new InjectionToken("DROPDOWN_DATA_INPUT");
|
|
14
20
|
const DropdownDataInputToken = DROPDOWN_DATA_INPUT_TOKEN;
|
|
15
21
|
const DROPDOWN_POPUP_INPUT_TOKEN = new InjectionToken("DROPDOWN_POPUP_INPUT");
|
|
22
|
+
function localizeNumber(value, options) {
|
|
23
|
+
return formatNumber(value, "en-US", options);
|
|
24
|
+
}
|
|
25
|
+
const DROPDOWNS_DEFAULT_MESSAGES = {
|
|
26
|
+
close: "Close",
|
|
27
|
+
itemPosition: (text, position, total) => `${text}, ${localizeNumber(position)} of ${localizeNumber(total)}`,
|
|
28
|
+
noResultsFound: "No results found",
|
|
29
|
+
resultsAvailable: (count) => count === 1 ? `${localizeNumber(count)} result available` : `${localizeNumber(count)} results available`
|
|
30
|
+
};
|
|
31
|
+
const dropdownSheetThemeVariants = cva(`
|
|
32
|
+
flex h-full max-h-[inherit] min-h-0 w-full flex-col overflow-clip
|
|
33
|
+
rounded-t-xl border-t border-border
|
|
34
|
+
pb-[env(safe-area-inset-bottom)] ps-[env(safe-area-inset-left)] pe-[env(safe-area-inset-right)]
|
|
35
|
+
rtl:ps-[env(safe-area-inset-right)] rtl:pe-[env(safe-area-inset-left)]
|
|
36
|
+
${themeOverlaySurfaceClasses} text-foreground shadow-(--shadow-overlay)
|
|
37
|
+
`);
|
|
38
|
+
const dropdownSheetSurfaceClasses = `
|
|
39
|
+
h-full max-h-none flex-1 rounded-none border-0 shadow-none text-base
|
|
40
|
+
[&_[role=option]]:min-h-11 [&_mona-tree-node>div]:py-2.5
|
|
41
|
+
`;
|
|
42
|
+
var DropdownSheetComponent = class DropdownSheetComponent {
|
|
43
|
+
constructor() {
|
|
44
|
+
this.#popupRef = inject(PopupRef);
|
|
45
|
+
this.data = inject(PopupDataInjectionToken);
|
|
46
|
+
this.messages = inject(MonaI18nService).componentMessages("dropdowns", DROPDOWNS_DEFAULT_MESSAGES);
|
|
47
|
+
this.sheetClass = dropdownSheetThemeVariants();
|
|
48
|
+
}
|
|
49
|
+
#popupRef;
|
|
50
|
+
closeSheet() {
|
|
51
|
+
this.#popupRef.close(new PopupCloseEvent({ via: PopupCloseSource.CloseButton }));
|
|
52
|
+
}
|
|
53
|
+
onPointerDown(event) {
|
|
54
|
+
if (event.target?.tagName !== "INPUT") event.preventDefault();
|
|
55
|
+
}
|
|
56
|
+
static {
|
|
57
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
58
|
+
minVersion: "12.0.0",
|
|
59
|
+
version: "22.2.6",
|
|
60
|
+
ngImport: i0,
|
|
61
|
+
type: DropdownSheetComponent,
|
|
62
|
+
deps: [],
|
|
63
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
static {
|
|
67
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
68
|
+
minVersion: "14.0.0",
|
|
69
|
+
version: "22.2.6",
|
|
70
|
+
type: DropdownSheetComponent,
|
|
71
|
+
isStandalone: true,
|
|
72
|
+
selector: "mona-dropdown-sheet",
|
|
73
|
+
host: { classAttribute: "contents" },
|
|
74
|
+
ngImport: i0,
|
|
75
|
+
template: "<section [class]=\"sheetClass\" (pointerdown)=\"onPointerDown($event)\">\n <span aria-hidden=\"true\" class=\"mx-auto mt-2 h-1 w-10 shrink-0 rounded-full bg-border\"></span>\n <header class=\"flex shrink-0 items-center gap-3 ps-4 pe-2\">\n <span class=\"min-w-0 flex-1 truncate text-base font-semibold\">{{ data.title() }}</span>\n <button\n monaButton\n type=\"button\"\n look=\"ghost\"\n size=\"small\"\n tabindex=\"-1\"\n class=\"min-h-11 min-w-11 shrink-0\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().close\"\n (click)=\"closeSheet()\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </header>\n <div class=\"flex min-h-0 flex-1 flex-col\">\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\n </div>\n</section>\n",
|
|
76
|
+
dependencies: [
|
|
77
|
+
{
|
|
78
|
+
kind: "directive",
|
|
79
|
+
type: ButtonDirective,
|
|
80
|
+
selector: "button[monaButton]",
|
|
81
|
+
inputs: [
|
|
82
|
+
"aria-haspopup",
|
|
83
|
+
"disabled",
|
|
84
|
+
"iconOnly",
|
|
85
|
+
"loading",
|
|
86
|
+
"look",
|
|
87
|
+
"rounded",
|
|
88
|
+
"selected",
|
|
89
|
+
"size",
|
|
90
|
+
"tabindex",
|
|
91
|
+
"toggleable",
|
|
92
|
+
"type",
|
|
93
|
+
"class",
|
|
94
|
+
"value"
|
|
95
|
+
],
|
|
96
|
+
outputs: ["lookChange", "selectedChange"]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
kind: "component",
|
|
100
|
+
type: LucideX,
|
|
101
|
+
selector: "svg[lucideX]"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
kind: "directive",
|
|
105
|
+
type: NgTemplateOutlet,
|
|
106
|
+
selector: "[ngTemplateOutlet]",
|
|
107
|
+
inputs: [
|
|
108
|
+
"ngTemplateOutletContext",
|
|
109
|
+
"ngTemplateOutlet",
|
|
110
|
+
"ngTemplateOutletInjector"
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
118
|
+
minVersion: "12.0.0",
|
|
119
|
+
version: "22.2.6",
|
|
120
|
+
ngImport: i0,
|
|
121
|
+
type: DropdownSheetComponent,
|
|
122
|
+
decorators: [{
|
|
123
|
+
type: Component,
|
|
124
|
+
args: [{
|
|
125
|
+
selector: "mona-dropdown-sheet",
|
|
126
|
+
imports: [
|
|
127
|
+
ButtonDirective,
|
|
128
|
+
LucideX,
|
|
129
|
+
NgTemplateOutlet
|
|
130
|
+
],
|
|
131
|
+
host: { class: "contents" },
|
|
132
|
+
template: "<section [class]=\"sheetClass\" (pointerdown)=\"onPointerDown($event)\">\n <span aria-hidden=\"true\" class=\"mx-auto mt-2 h-1 w-10 shrink-0 rounded-full bg-border\"></span>\n <header class=\"flex shrink-0 items-center gap-3 ps-4 pe-2\">\n <span class=\"min-w-0 flex-1 truncate text-base font-semibold\">{{ data.title() }}</span>\n <button\n monaButton\n type=\"button\"\n look=\"ghost\"\n size=\"small\"\n tabindex=\"-1\"\n class=\"min-h-11 min-w-11 shrink-0\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().close\"\n (click)=\"closeSheet()\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </header>\n <div class=\"flex min-h-0 flex-1 flex-col\">\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\n </div>\n</section>\n"
|
|
133
|
+
}]
|
|
134
|
+
}]
|
|
135
|
+
});
|
|
136
|
+
var DropdownTreePopupComponent = class DropdownTreePopupComponent {
|
|
137
|
+
#announcer;
|
|
138
|
+
#i18n;
|
|
139
|
+
constructor() {
|
|
140
|
+
this.#announcer = injectLiveAnnouncer();
|
|
141
|
+
this.#i18n = inject(MonaI18nService);
|
|
142
|
+
this.activeDescendant = computed(() => {
|
|
143
|
+
const node = this.treeService.navigatedNode();
|
|
144
|
+
return node ? this.treeService.getNodeElementId(node.uid) : null;
|
|
145
|
+
}, ...ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []);
|
|
146
|
+
this.empty = computed(() => this.treeService.viewNodeSet().isEmpty(), ...ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []);
|
|
147
|
+
this.emptyText = computed(() => this.treeService.isTreeFiltered() ? this.messages().noMatches : this.messages().noData, ...ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []);
|
|
148
|
+
this.filterAriaLabel = computed(() => {
|
|
149
|
+
const name = this.ariaLabel().trim();
|
|
150
|
+
return name ? this.messages().filterLabel(name) : this.messages().filterTree;
|
|
151
|
+
}, ...ngDevMode ? [{ debugName: "filterAriaLabel" }] : /* istanbul ignore next */ []);
|
|
152
|
+
this.messages = this.#i18n.componentMessages("treeView", TREE_DEFAULT_MESSAGES);
|
|
153
|
+
this.noDataId = computed(() => `${this.treeId()}-no-data`, ...ngDevMode ? [{ debugName: "noDataId" }] : /* istanbul ignore next */ []);
|
|
154
|
+
this.treeService = inject(TreeService);
|
|
155
|
+
this.ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
156
|
+
this.ariaLabelledBy = input("", ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
157
|
+
this.footerTemplate = input(null, ...ngDevMode ? [{ debugName: "footerTemplate" }] : /* istanbul ignore next */ []);
|
|
158
|
+
this.headerTemplate = input(null, ...ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []);
|
|
159
|
+
this.itemTemplate = input(null, ...ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
|
|
160
|
+
this.noDataTemplate = input(null, ...ngDevMode ? [{ debugName: "noDataTemplate" }] : /* istanbul ignore next */ []);
|
|
161
|
+
this.popupClass = input("", ...ngDevMode ? [{ debugName: "popupClass" }] : /* istanbul ignore next */ []);
|
|
162
|
+
this.size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
163
|
+
this.treeId = input.required(...ngDevMode ? [{ debugName: "treeId" }] : /* istanbul ignore next */ []);
|
|
164
|
+
let opening = true;
|
|
165
|
+
effect(() => {
|
|
166
|
+
const filterText = this.treeService.filterText();
|
|
167
|
+
const matchCount = this.treeService.matchCount();
|
|
168
|
+
untracked(() => {
|
|
169
|
+
if (opening) {
|
|
170
|
+
opening = false;
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (!filterText) return;
|
|
174
|
+
const messages = this.messages();
|
|
175
|
+
this.#announcer.announce(matchCount === 0 ? messages.noMatches : messages.results(matchCount), "polite");
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
onFilterChange(event) {
|
|
180
|
+
this.treeService.filterChange$.next(event);
|
|
181
|
+
if (!event.isDefaultPrevented()) this.treeService.filter$.next(event.filter);
|
|
182
|
+
}
|
|
183
|
+
onPointerDown(event) {
|
|
184
|
+
if (event.target?.tagName !== "INPUT") event.preventDefault();
|
|
185
|
+
}
|
|
186
|
+
static {
|
|
187
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
188
|
+
minVersion: "12.0.0",
|
|
189
|
+
version: "22.2.6",
|
|
190
|
+
ngImport: i0,
|
|
191
|
+
type: DropdownTreePopupComponent,
|
|
192
|
+
deps: [],
|
|
193
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
static {
|
|
197
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
198
|
+
minVersion: "17.0.0",
|
|
199
|
+
version: "22.2.6",
|
|
200
|
+
type: DropdownTreePopupComponent,
|
|
201
|
+
isStandalone: true,
|
|
202
|
+
selector: "mona-dropdown-tree-popup",
|
|
203
|
+
inputs: {
|
|
204
|
+
ariaLabel: {
|
|
205
|
+
classPropertyName: "ariaLabel",
|
|
206
|
+
publicName: "ariaLabel",
|
|
207
|
+
isSignal: true,
|
|
208
|
+
isRequired: false,
|
|
209
|
+
transformFunction: null
|
|
210
|
+
},
|
|
211
|
+
ariaLabelledBy: {
|
|
212
|
+
classPropertyName: "ariaLabelledBy",
|
|
213
|
+
publicName: "ariaLabelledBy",
|
|
214
|
+
isSignal: true,
|
|
215
|
+
isRequired: false,
|
|
216
|
+
transformFunction: null
|
|
217
|
+
},
|
|
218
|
+
footerTemplate: {
|
|
219
|
+
classPropertyName: "footerTemplate",
|
|
220
|
+
publicName: "footerTemplate",
|
|
221
|
+
isSignal: true,
|
|
222
|
+
isRequired: false,
|
|
223
|
+
transformFunction: null
|
|
224
|
+
},
|
|
225
|
+
headerTemplate: {
|
|
226
|
+
classPropertyName: "headerTemplate",
|
|
227
|
+
publicName: "headerTemplate",
|
|
228
|
+
isSignal: true,
|
|
229
|
+
isRequired: false,
|
|
230
|
+
transformFunction: null
|
|
231
|
+
},
|
|
232
|
+
itemTemplate: {
|
|
233
|
+
classPropertyName: "itemTemplate",
|
|
234
|
+
publicName: "itemTemplate",
|
|
235
|
+
isSignal: true,
|
|
236
|
+
isRequired: false,
|
|
237
|
+
transformFunction: null
|
|
238
|
+
},
|
|
239
|
+
noDataTemplate: {
|
|
240
|
+
classPropertyName: "noDataTemplate",
|
|
241
|
+
publicName: "noDataTemplate",
|
|
242
|
+
isSignal: true,
|
|
243
|
+
isRequired: false,
|
|
244
|
+
transformFunction: null
|
|
245
|
+
},
|
|
246
|
+
popupClass: {
|
|
247
|
+
classPropertyName: "popupClass",
|
|
248
|
+
publicName: "popupClass",
|
|
249
|
+
isSignal: true,
|
|
250
|
+
isRequired: false,
|
|
251
|
+
transformFunction: null
|
|
252
|
+
},
|
|
253
|
+
size: {
|
|
254
|
+
classPropertyName: "size",
|
|
255
|
+
publicName: "size",
|
|
256
|
+
isSignal: true,
|
|
257
|
+
isRequired: false,
|
|
258
|
+
transformFunction: null
|
|
259
|
+
},
|
|
260
|
+
treeId: {
|
|
261
|
+
classPropertyName: "treeId",
|
|
262
|
+
publicName: "treeId",
|
|
263
|
+
isSignal: true,
|
|
264
|
+
isRequired: true,
|
|
265
|
+
transformFunction: null
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
host: { classAttribute: "contents" },
|
|
269
|
+
ngImport: i0,
|
|
270
|
+
template: "<div [class]=\"popupClass()\" (pointerdown)=\"onPointerDown($event)\">\n @if (headerTemplate()) {\n <ng-container [ngTemplateOutlet]=\"headerTemplate() ?? null\"></ng-container>\n }\n @if (treeService.filterableOptions().enabled) {\n <div class=\"p-2\">\n <mona-filter-input\n [filter]=\"treeService.filterText()\"\n [debounce]=\"treeService.filterableOptions().debounce\"\n [placeholder]=\"treeService.filterPlaceholder()\"\n [ariaLabel]=\"filterAriaLabel()\"\n [controls]=\"treeId()\"\n [activeDescendant]=\"activeDescendant()\"\n [size]=\"size()\"\n (filterChange)=\"onFilterChange($event)\"></mona-filter-input>\n </div>\n }\n <!-- An empty tree keeps its named tree element, lying over the \"No data\" or \"No matching items\" text that describes it. -->\n <div class=\"relative min-h-0 flex-1 overflow-auto [scrollbar-width:thin] [&>mona-tree]:text-[length:inherit]\">\n @if (empty()) {\n @if (noDataTemplate()) {\n <div [id]=\"noDataId()\" class=\"contents\">\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n </div>\n } @else {\n <mona-placeholder\n [id]=\"noDataId()\"\n [text]=\"emptyText()\"\n class=\"flex w-full items-center justify-center py-4\"></mona-placeholder>\n }\n }\n <mona-tree\n [id]=\"treeId()\"\n [focusable]=\"false\"\n [class.absolute]=\"empty()\"\n [class.inset-0]=\"empty()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [ariaDescribedBy]=\"empty() ? noDataId() : ''\">\n @if (itemTemplate()) {\n <ng-template monaTreeNodeTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n </mona-tree>\n </div>\n @if (footerTemplate()) {\n <ng-container [ngTemplateOutlet]=\"footerTemplate() ?? null\"></ng-container>\n }\n</div>\n",
|
|
271
|
+
dependencies: [
|
|
272
|
+
{
|
|
273
|
+
kind: "component",
|
|
274
|
+
type: FilterInputComponent,
|
|
275
|
+
selector: "mona-filter-input",
|
|
276
|
+
inputs: [
|
|
277
|
+
"activeDescendant",
|
|
278
|
+
"ariaControls",
|
|
279
|
+
"ariaLabel",
|
|
280
|
+
"autoFocus",
|
|
281
|
+
"controls",
|
|
282
|
+
"debounce",
|
|
283
|
+
"filter",
|
|
284
|
+
"placeholder",
|
|
285
|
+
"size"
|
|
286
|
+
],
|
|
287
|
+
outputs: [
|
|
288
|
+
"filterChange",
|
|
289
|
+
"inputBlur",
|
|
290
|
+
"inputFocus"
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
kind: "directive",
|
|
295
|
+
type: NgTemplateOutlet,
|
|
296
|
+
selector: "[ngTemplateOutlet]",
|
|
297
|
+
inputs: [
|
|
298
|
+
"ngTemplateOutletContext",
|
|
299
|
+
"ngTemplateOutlet",
|
|
300
|
+
"ngTemplateOutletInjector"
|
|
301
|
+
]
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
kind: "component",
|
|
305
|
+
type: PlaceholderComponent,
|
|
306
|
+
selector: "mona-placeholder",
|
|
307
|
+
inputs: ["text", "class"]
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
kind: "component",
|
|
311
|
+
type: TreeComponent,
|
|
312
|
+
selector: "mona-tree",
|
|
313
|
+
inputs: [
|
|
314
|
+
"ariaDescribedBy",
|
|
315
|
+
"ariaLabel",
|
|
316
|
+
"ariaLabelledBy",
|
|
317
|
+
"data",
|
|
318
|
+
"focusable"
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
kind: "directive",
|
|
323
|
+
type: TreeNodeTemplateDirective,
|
|
324
|
+
selector: "ng-template[monaTreeNodeTemplate]"
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
331
|
+
minVersion: "12.0.0",
|
|
332
|
+
version: "22.2.6",
|
|
333
|
+
ngImport: i0,
|
|
334
|
+
type: DropdownTreePopupComponent,
|
|
335
|
+
decorators: [{
|
|
336
|
+
type: Component,
|
|
337
|
+
args: [{
|
|
338
|
+
selector: "mona-dropdown-tree-popup",
|
|
339
|
+
imports: [
|
|
340
|
+
FilterInputComponent,
|
|
341
|
+
NgTemplateOutlet,
|
|
342
|
+
PlaceholderComponent,
|
|
343
|
+
TreeComponent,
|
|
344
|
+
TreeNodeTemplateDirective
|
|
345
|
+
],
|
|
346
|
+
host: { class: "contents" },
|
|
347
|
+
template: "<div [class]=\"popupClass()\" (pointerdown)=\"onPointerDown($event)\">\n @if (headerTemplate()) {\n <ng-container [ngTemplateOutlet]=\"headerTemplate() ?? null\"></ng-container>\n }\n @if (treeService.filterableOptions().enabled) {\n <div class=\"p-2\">\n <mona-filter-input\n [filter]=\"treeService.filterText()\"\n [debounce]=\"treeService.filterableOptions().debounce\"\n [placeholder]=\"treeService.filterPlaceholder()\"\n [ariaLabel]=\"filterAriaLabel()\"\n [controls]=\"treeId()\"\n [activeDescendant]=\"activeDescendant()\"\n [size]=\"size()\"\n (filterChange)=\"onFilterChange($event)\"></mona-filter-input>\n </div>\n }\n <!-- An empty tree keeps its named tree element, lying over the \"No data\" or \"No matching items\" text that describes it. -->\n <div class=\"relative min-h-0 flex-1 overflow-auto [scrollbar-width:thin] [&>mona-tree]:text-[length:inherit]\">\n @if (empty()) {\n @if (noDataTemplate()) {\n <div [id]=\"noDataId()\" class=\"contents\">\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n </div>\n } @else {\n <mona-placeholder\n [id]=\"noDataId()\"\n [text]=\"emptyText()\"\n class=\"flex w-full items-center justify-center py-4\"></mona-placeholder>\n }\n }\n <mona-tree\n [id]=\"treeId()\"\n [focusable]=\"false\"\n [class.absolute]=\"empty()\"\n [class.inset-0]=\"empty()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [ariaDescribedBy]=\"empty() ? noDataId() : ''\">\n @if (itemTemplate()) {\n <ng-template monaTreeNodeTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n </mona-tree>\n </div>\n @if (footerTemplate()) {\n <ng-container [ngTemplateOutlet]=\"footerTemplate() ?? null\"></ng-container>\n }\n</div>\n"
|
|
348
|
+
}]
|
|
349
|
+
}],
|
|
350
|
+
ctorParameters: () => [],
|
|
351
|
+
propDecorators: {
|
|
352
|
+
ariaLabel: [{
|
|
353
|
+
type: i0.Input,
|
|
354
|
+
args: [{
|
|
355
|
+
isSignal: true,
|
|
356
|
+
alias: "ariaLabel",
|
|
357
|
+
required: false
|
|
358
|
+
}]
|
|
359
|
+
}],
|
|
360
|
+
ariaLabelledBy: [{
|
|
361
|
+
type: i0.Input,
|
|
362
|
+
args: [{
|
|
363
|
+
isSignal: true,
|
|
364
|
+
alias: "ariaLabelledBy",
|
|
365
|
+
required: false
|
|
366
|
+
}]
|
|
367
|
+
}],
|
|
368
|
+
footerTemplate: [{
|
|
369
|
+
type: i0.Input,
|
|
370
|
+
args: [{
|
|
371
|
+
isSignal: true,
|
|
372
|
+
alias: "footerTemplate",
|
|
373
|
+
required: false
|
|
374
|
+
}]
|
|
375
|
+
}],
|
|
376
|
+
headerTemplate: [{
|
|
377
|
+
type: i0.Input,
|
|
378
|
+
args: [{
|
|
379
|
+
isSignal: true,
|
|
380
|
+
alias: "headerTemplate",
|
|
381
|
+
required: false
|
|
382
|
+
}]
|
|
383
|
+
}],
|
|
384
|
+
itemTemplate: [{
|
|
385
|
+
type: i0.Input,
|
|
386
|
+
args: [{
|
|
387
|
+
isSignal: true,
|
|
388
|
+
alias: "itemTemplate",
|
|
389
|
+
required: false
|
|
390
|
+
}]
|
|
391
|
+
}],
|
|
392
|
+
noDataTemplate: [{
|
|
393
|
+
type: i0.Input,
|
|
394
|
+
args: [{
|
|
395
|
+
isSignal: true,
|
|
396
|
+
alias: "noDataTemplate",
|
|
397
|
+
required: false
|
|
398
|
+
}]
|
|
399
|
+
}],
|
|
400
|
+
popupClass: [{
|
|
401
|
+
type: i0.Input,
|
|
402
|
+
args: [{
|
|
403
|
+
isSignal: true,
|
|
404
|
+
alias: "popupClass",
|
|
405
|
+
required: false
|
|
406
|
+
}]
|
|
407
|
+
}],
|
|
408
|
+
size: [{
|
|
409
|
+
type: i0.Input,
|
|
410
|
+
args: [{
|
|
411
|
+
isSignal: true,
|
|
412
|
+
alias: "size",
|
|
413
|
+
required: false
|
|
414
|
+
}]
|
|
415
|
+
}],
|
|
416
|
+
treeId: [{
|
|
417
|
+
type: i0.Input,
|
|
418
|
+
args: [{
|
|
419
|
+
isSignal: true,
|
|
420
|
+
alias: "treeId",
|
|
421
|
+
required: true
|
|
422
|
+
}]
|
|
423
|
+
}]
|
|
424
|
+
}
|
|
425
|
+
});
|
|
16
426
|
var DropdownFilterableDirective = class DropdownFilterableDirective {
|
|
17
427
|
#defaultOptions;
|
|
18
428
|
#destroyRef;
|
|
19
429
|
#listService;
|
|
430
|
+
#treeService;
|
|
20
431
|
constructor() {
|
|
21
432
|
this.#defaultOptions = {
|
|
22
433
|
enabled: true,
|
|
@@ -25,7 +436,8 @@ var DropdownFilterableDirective = class DropdownFilterableDirective {
|
|
|
25
436
|
caseSensitive: false
|
|
26
437
|
};
|
|
27
438
|
this.#destroyRef = inject(DestroyRef);
|
|
28
|
-
this.#listService = inject(ListService);
|
|
439
|
+
this.#listService = inject(ListService, { optional: true });
|
|
440
|
+
this.#treeService = inject(TreeService, { optional: true });
|
|
29
441
|
this.filter = input("", ...ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []);
|
|
30
442
|
this.filterChange = output();
|
|
31
443
|
this.filterPlaceholder = input("", ...ngDevMode ? [{ debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []);
|
|
@@ -35,25 +447,32 @@ var DropdownFilterableDirective = class DropdownFilterableDirective {
|
|
|
35
447
|
});
|
|
36
448
|
effect(() => {
|
|
37
449
|
const filter = this.filter();
|
|
38
|
-
untracked(() =>
|
|
450
|
+
untracked(() => {
|
|
451
|
+
this.#listService?.setFilter(filter);
|
|
452
|
+
this.#treeService?.filter$.next(filter);
|
|
453
|
+
});
|
|
39
454
|
});
|
|
40
455
|
effect(() => {
|
|
41
456
|
const filterPlaceholder = this.filterPlaceholder();
|
|
42
|
-
untracked(() =>
|
|
457
|
+
untracked(() => {
|
|
458
|
+
this.#listService?.setFilterPlaceholder(filterPlaceholder);
|
|
459
|
+
this.#treeService?.filterPlaceholder.set(filterPlaceholder);
|
|
460
|
+
});
|
|
43
461
|
});
|
|
44
462
|
effect(() => {
|
|
45
463
|
const options = this.options();
|
|
46
464
|
untracked(() => {
|
|
47
|
-
|
|
48
|
-
else this.#listService.setFilterableOptions({
|
|
465
|
+
const filterableOptions = options === "" ? this.#defaultOptions : {
|
|
49
466
|
...this.#defaultOptions,
|
|
50
467
|
...options,
|
|
51
468
|
enabled: options.enabled ?? this.#defaultOptions.enabled
|
|
52
|
-
}
|
|
469
|
+
};
|
|
470
|
+
this.#listService?.setFilterableOptions(filterableOptions);
|
|
471
|
+
this.#treeService?.setFilterableOptions(filterableOptions);
|
|
53
472
|
});
|
|
54
473
|
});
|
|
55
474
|
afterNextRender({ read: () => {
|
|
56
|
-
this.#listService
|
|
475
|
+
(this.#listService?.filterChange$ ?? this.#treeService?.filterChange$)?.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((filter) => {
|
|
57
476
|
this.filterChange.emit(filter);
|
|
58
477
|
});
|
|
59
478
|
} });
|
|
@@ -74,7 +493,7 @@ var DropdownFilterableDirective = class DropdownFilterableDirective {
|
|
|
74
493
|
version: "22.2.6",
|
|
75
494
|
type: DropdownFilterableDirective,
|
|
76
495
|
isStandalone: true,
|
|
77
|
-
selector: "\n mona-auto-complete[monaDropDownFilterable],\n mona-dropdown-list[monaDropDownFilterable],\n mona-combo-box[monaDropDownFilterable],\n mona-multi-select[monaDropDownFilterable]\n ",
|
|
496
|
+
selector: "\n mona-auto-complete[monaDropDownFilterable],\n mona-dropdown-list[monaDropDownFilterable],\n mona-combo-box[monaDropDownFilterable],\n mona-dropdown-tree[monaDropDownFilterable],\n mona-multi-select[monaDropDownFilterable],\n mona-multi-select-tree[monaDropDownFilterable]\n ",
|
|
78
497
|
inputs: {
|
|
79
498
|
filter: {
|
|
80
499
|
classPropertyName: "filter",
|
|
@@ -114,7 +533,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
114
533
|
mona-auto-complete[monaDropDownFilterable],
|
|
115
534
|
mona-dropdown-list[monaDropDownFilterable],
|
|
116
535
|
mona-combo-box[monaDropDownFilterable],
|
|
117
|
-
mona-
|
|
536
|
+
mona-dropdown-tree[monaDropDownFilterable],
|
|
537
|
+
mona-multi-select[monaDropDownFilterable],
|
|
538
|
+
mona-multi-select-tree[monaDropDownFilterable]
|
|
118
539
|
` }]
|
|
119
540
|
}],
|
|
120
541
|
ctorParameters: () => [],
|
|
@@ -166,7 +587,7 @@ var DropdownFooterTemplateDirective = class DropdownFooterTemplateDirective {
|
|
|
166
587
|
version: "22.2.6",
|
|
167
588
|
type: DropdownFooterTemplateDirective,
|
|
168
589
|
isStandalone: true,
|
|
169
|
-
selector: "\n ng-template[monaDropDownFooterTemplate],\n ng-template[monaAutoCompleteFooterTemplate],\n ng-template[monaDropDownListFooterTemplate],\n ng-template[monaDropDownTreeFooterTemplate],\n ng-template[monaComboBoxFooterTemplate],\n ng-template[monaMultiSelectFooterTemplate]\n ",
|
|
590
|
+
selector: "\n ng-template[monaDropDownFooterTemplate],\n ng-template[monaAutoCompleteFooterTemplate],\n ng-template[monaDropDownListFooterTemplate],\n ng-template[monaDropDownTreeFooterTemplate],\n ng-template[monaComboBoxFooterTemplate],\n ng-template[monaMultiSelectFooterTemplate],\n ng-template[monaMultiSelectTreeFooterTemplate]\n ",
|
|
170
591
|
ngImport: i0
|
|
171
592
|
});
|
|
172
593
|
}
|
|
@@ -184,7 +605,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
184
605
|
ng-template[monaDropDownListFooterTemplate],
|
|
185
606
|
ng-template[monaDropDownTreeFooterTemplate],
|
|
186
607
|
ng-template[monaComboBoxFooterTemplate],
|
|
187
|
-
ng-template[monaMultiSelectFooterTemplate]
|
|
608
|
+
ng-template[monaMultiSelectFooterTemplate],
|
|
609
|
+
ng-template[monaMultiSelectTreeFooterTemplate]
|
|
188
610
|
` }]
|
|
189
611
|
}]
|
|
190
612
|
});
|
|
@@ -344,7 +766,7 @@ var DropdownHeaderTemplateDirective = class DropdownHeaderTemplateDirective {
|
|
|
344
766
|
version: "22.2.6",
|
|
345
767
|
type: DropdownHeaderTemplateDirective,
|
|
346
768
|
isStandalone: true,
|
|
347
|
-
selector: "\n ng-template[monaDropDownHeaderTemplate],\n ng-template[monaAutoCompleteHeaderTemplate],\n ng-template[monaDropDownListHeaderTemplate],\n ng-template[monaDropDownTreeHeaderTemplate],\n ng-template[monaComboBoxHeaderTemplate],\n ng-template[monaMultiSelectHeaderTemplate]\n
|
|
769
|
+
selector: "\n ng-template[monaDropDownHeaderTemplate],\n ng-template[monaAutoCompleteHeaderTemplate],\n ng-template[monaDropDownListHeaderTemplate],\n ng-template[monaDropDownTreeHeaderTemplate],\n ng-template[monaComboBoxHeaderTemplate],\n ng-template[monaMultiSelectHeaderTemplate],\n ng-template[monaMultiSelectTreeHeaderTemplate]\n ",
|
|
348
770
|
ngImport: i0
|
|
349
771
|
});
|
|
350
772
|
}
|
|
@@ -362,8 +784,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
362
784
|
ng-template[monaDropDownListHeaderTemplate],
|
|
363
785
|
ng-template[monaDropDownTreeHeaderTemplate],
|
|
364
786
|
ng-template[monaComboBoxHeaderTemplate],
|
|
365
|
-
ng-template[monaMultiSelectHeaderTemplate]
|
|
366
|
-
|
|
787
|
+
ng-template[monaMultiSelectHeaderTemplate],
|
|
788
|
+
ng-template[monaMultiSelectTreeHeaderTemplate]
|
|
789
|
+
` }]
|
|
367
790
|
}]
|
|
368
791
|
});
|
|
369
792
|
var DropdownItemTemplateDirective = class DropdownItemTemplateDirective {
|
|
@@ -383,7 +806,7 @@ var DropdownItemTemplateDirective = class DropdownItemTemplateDirective {
|
|
|
383
806
|
version: "22.2.6",
|
|
384
807
|
type: DropdownItemTemplateDirective,
|
|
385
808
|
isStandalone: true,
|
|
386
|
-
selector: "\n ng-template[monaDropDownItemTemplate],\n ng-template[monaAutoCompleteItemTemplate],\n ng-template[monaDropDownListItemTemplate],\n ng-template[monaComboBoxItemTemplate],\n ng-template[monaMultiSelectItemTemplate]\n ",
|
|
809
|
+
selector: "\n ng-template[monaDropDownItemTemplate],\n ng-template[monaAutoCompleteItemTemplate],\n ng-template[monaDropDownListItemTemplate],\n ng-template[monaDropDownTreeItemTemplate],\n ng-template[monaComboBoxItemTemplate],\n ng-template[monaMultiSelectItemTemplate],\n ng-template[monaMultiSelectTreeItemTemplate]\n ",
|
|
387
810
|
ngImport: i0
|
|
388
811
|
});
|
|
389
812
|
}
|
|
@@ -399,8 +822,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
399
822
|
ng-template[monaDropDownItemTemplate],
|
|
400
823
|
ng-template[monaAutoCompleteItemTemplate],
|
|
401
824
|
ng-template[monaDropDownListItemTemplate],
|
|
825
|
+
ng-template[monaDropDownTreeItemTemplate],
|
|
402
826
|
ng-template[monaComboBoxItemTemplate],
|
|
403
|
-
ng-template[monaMultiSelectItemTemplate]
|
|
827
|
+
ng-template[monaMultiSelectItemTemplate],
|
|
828
|
+
ng-template[monaMultiSelectTreeItemTemplate]
|
|
404
829
|
` }]
|
|
405
830
|
}]
|
|
406
831
|
});
|
|
@@ -421,7 +846,7 @@ var DropdownNoDataTemplateDirective = class DropdownNoDataTemplateDirective {
|
|
|
421
846
|
version: "22.2.6",
|
|
422
847
|
type: DropdownNoDataTemplateDirective,
|
|
423
848
|
isStandalone: true,
|
|
424
|
-
selector: "\n ng-template[monaDropDownNoDataTemplate],\n ng-template[monaAutoCompleteNoDataTemplate],\n ng-template[monaDropDownListNoDataTemplate],\n ng-template[monaDropDownTreeNoDataTemplate],\n ng-template[monaComboBoxNoDataTemplate],\n ng-template[monaMultiSelectNoDataTemplate]\n ",
|
|
849
|
+
selector: "\n ng-template[monaDropDownNoDataTemplate],\n ng-template[monaAutoCompleteNoDataTemplate],\n ng-template[monaDropDownListNoDataTemplate],\n ng-template[monaDropDownTreeNoDataTemplate],\n ng-template[monaComboBoxNoDataTemplate],\n ng-template[monaMultiSelectNoDataTemplate],\n ng-template[monaMultiSelectTreeNoDataTemplate]\n ",
|
|
425
850
|
ngImport: i0
|
|
426
851
|
});
|
|
427
852
|
}
|
|
@@ -439,7 +864,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
439
864
|
ng-template[monaDropDownListNoDataTemplate],
|
|
440
865
|
ng-template[monaDropDownTreeNoDataTemplate],
|
|
441
866
|
ng-template[monaComboBoxNoDataTemplate],
|
|
442
|
-
ng-template[monaMultiSelectNoDataTemplate]
|
|
867
|
+
ng-template[monaMultiSelectNoDataTemplate],
|
|
868
|
+
ng-template[monaMultiSelectTreeNoDataTemplate]
|
|
443
869
|
` }]
|
|
444
870
|
}]
|
|
445
871
|
});
|
|
@@ -615,6 +1041,7 @@ var DropdownService = class DropdownService {
|
|
|
615
1041
|
this.popupRef = signal(null, ...ngDevMode ? [{ debugName: "popupRef" }] : /* istanbul ignore next */ []);
|
|
616
1042
|
this.popupTemplate = signal(null, ...ngDevMode ? [{ debugName: "popupTemplate" }] : /* istanbul ignore next */ []);
|
|
617
1043
|
this.restoreFocus = signal("auto", ...ngDevMode ? [{ debugName: "restoreFocus" }] : /* istanbul ignore next */ []);
|
|
1044
|
+
this.sheet = signal(false, ...ngDevMode ? [{ debugName: "sheet" }] : /* istanbul ignore next */ []);
|
|
618
1045
|
this.triggerPopupOpen$ = new Subject();
|
|
619
1046
|
this.triggerPopupToggle$ = new Subject();
|
|
620
1047
|
}
|
|
@@ -659,6 +1086,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
659
1086
|
type: DropdownService,
|
|
660
1087
|
decorators: [{ type: Injectable }]
|
|
661
1088
|
});
|
|
1089
|
+
const SMALL_SCREEN_QUERY = "(max-width: 639.98px)";
|
|
1090
|
+
const SHEET_MAX_HEIGHT_RATIO = .85;
|
|
662
1091
|
var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
|
|
663
1092
|
#destroyRef = inject(DestroyRef);
|
|
664
1093
|
#document = inject(DOCUMENT);
|
|
@@ -680,32 +1109,8 @@ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
|
|
|
680
1109
|
closePopup() {
|
|
681
1110
|
this.#dropdownService.popupRef()?.close();
|
|
682
1111
|
}
|
|
683
|
-
|
|
684
|
-
if (typeof maxHeight === "number") return maxHeight;
|
|
685
|
-
if (maxHeight === "auto" && height === "auto") return "auto";
|
|
686
|
-
if (!maxHeight || maxHeight === "auto") {
|
|
687
|
-
if (!height || height === "auto") return 200;
|
|
688
|
-
return height;
|
|
689
|
-
}
|
|
690
|
-
return maxHeight ?? 200;
|
|
691
|
-
}
|
|
692
|
-
getMinWidth(minWidth, width) {
|
|
693
|
-
if (typeof minWidth === "number") return minWidth;
|
|
694
|
-
if (!minWidth || minWidth === "auto") {
|
|
695
|
-
if (!width || width === "auto") return this.#hostElementRef.nativeElement.getBoundingClientRect().width;
|
|
696
|
-
return width;
|
|
697
|
-
}
|
|
698
|
-
return minWidth ?? this.#hostElementRef.nativeElement.getBoundingClientRect().width;
|
|
699
|
-
}
|
|
700
|
-
openPopup(settings) {
|
|
701
|
-
let popupRef = this.#dropdownService.popupRef();
|
|
702
|
-
if (popupRef || this.#host.disabled() || this.#host.readonly()) return;
|
|
703
|
-
const event = new PreventableEvent("popupOpen");
|
|
704
|
-
this.#host.open.emit(event);
|
|
705
|
-
if (event.isDefaultPrevented()) return;
|
|
706
|
-
const anchor = this.#hostElementRef.nativeElement;
|
|
1112
|
+
createPopup(anchor, content, settings) {
|
|
707
1113
|
const anchorConnectionPoint = settings.anchorConnectionPoint ?? "bottomleft";
|
|
708
|
-
const content = this.#dropdownService.popupTemplate();
|
|
709
1114
|
const closeOnOutsideClick = settings.closeOnOutsideClick ?? true;
|
|
710
1115
|
const closeOnScroll = settings.closeOnScroll ?? true;
|
|
711
1116
|
const hasBackdrop = settings.hasBackdrop ?? false;
|
|
@@ -721,7 +1126,7 @@ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
|
|
|
721
1126
|
const width = settings.width ?? (this.#host.popupWidth() || anchor.getBoundingClientRect().width);
|
|
722
1127
|
const withPush = settings.withPush ?? false;
|
|
723
1128
|
const withScrollTracking = settings.withScrollTracking ?? false;
|
|
724
|
-
|
|
1129
|
+
return this.#popupService.create({
|
|
725
1130
|
anchor,
|
|
726
1131
|
anchorConnectionPoint,
|
|
727
1132
|
animation: dropdownPopupAnimation,
|
|
@@ -739,6 +1144,84 @@ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
|
|
|
739
1144
|
withPush,
|
|
740
1145
|
withScrollTracking
|
|
741
1146
|
});
|
|
1147
|
+
}
|
|
1148
|
+
createSheet(anchor, content, restoreFocus) {
|
|
1149
|
+
const data = {
|
|
1150
|
+
content,
|
|
1151
|
+
title: computed(() => this.sheetTitle())
|
|
1152
|
+
};
|
|
1153
|
+
const popupRef = this.#popupService.create({
|
|
1154
|
+
anchor,
|
|
1155
|
+
animation: slideFromBottomPopupAnimation,
|
|
1156
|
+
backdropClass: [
|
|
1157
|
+
"fixed",
|
|
1158
|
+
"inset-0",
|
|
1159
|
+
"bg-background/50",
|
|
1160
|
+
"backdrop-blur-xs",
|
|
1161
|
+
"[transition-duration:240ms]!"
|
|
1162
|
+
],
|
|
1163
|
+
blockScroll: true,
|
|
1164
|
+
closeOnBackdropClick: true,
|
|
1165
|
+
closeOnEscape: true,
|
|
1166
|
+
closeOnOutsideClick: false,
|
|
1167
|
+
closeOnScroll: false,
|
|
1168
|
+
content: DropdownSheetComponent,
|
|
1169
|
+
data,
|
|
1170
|
+
hasBackdrop: true,
|
|
1171
|
+
maxHeight: `${SHEET_MAX_HEIGHT_RATIO * 100}dvh`,
|
|
1172
|
+
popupClass: "overflow-clip",
|
|
1173
|
+
popupWrapperClass: "mona-popup-constrain-height",
|
|
1174
|
+
positionStrategy: "global",
|
|
1175
|
+
restoreFocus,
|
|
1176
|
+
width: "100dvw"
|
|
1177
|
+
});
|
|
1178
|
+
this.followVisualViewport(popupRef);
|
|
1179
|
+
return popupRef;
|
|
1180
|
+
}
|
|
1181
|
+
followVisualViewport(popupRef) {
|
|
1182
|
+
const strategy = popupRef.overlayRef.getConfig().positionStrategy;
|
|
1183
|
+
if (typeof strategy?.bottom !== "function" || typeof strategy.left !== "function") return;
|
|
1184
|
+
const view = this.#document.defaultView;
|
|
1185
|
+
const viewport = view?.visualViewport ?? null;
|
|
1186
|
+
const place = () => {
|
|
1187
|
+
const keyboardInset = view && viewport ? Math.max(0, view.innerHeight - viewport.height - viewport.offsetTop) : 0;
|
|
1188
|
+
strategy.bottom?.(`${Math.round(keyboardInset)}px`);
|
|
1189
|
+
strategy.left?.("0px");
|
|
1190
|
+
if (viewport) popupRef.overlayRef.updateSize({ maxHeight: `${Math.round(viewport.height * SHEET_MAX_HEIGHT_RATIO)}px` });
|
|
1191
|
+
popupRef.overlayRef.updatePosition();
|
|
1192
|
+
};
|
|
1193
|
+
place();
|
|
1194
|
+
if (viewport) merge(fromEvent(viewport, "resize"), fromEvent(viewport, "scroll")).pipe(takeUntil(popupRef.closed)).subscribe(place);
|
|
1195
|
+
}
|
|
1196
|
+
getMaxHeight(maxHeight, height) {
|
|
1197
|
+
if (typeof maxHeight === "number") return maxHeight;
|
|
1198
|
+
if (maxHeight === "auto" && height === "auto") return "auto";
|
|
1199
|
+
if (!maxHeight || maxHeight === "auto") {
|
|
1200
|
+
if (!height || height === "auto") return 200;
|
|
1201
|
+
return height;
|
|
1202
|
+
}
|
|
1203
|
+
return maxHeight ?? 200;
|
|
1204
|
+
}
|
|
1205
|
+
getMinWidth(minWidth, width) {
|
|
1206
|
+
if (typeof minWidth === "number") return minWidth;
|
|
1207
|
+
if (!minWidth || minWidth === "auto") {
|
|
1208
|
+
if (!width || width === "auto") return this.#hostElementRef.nativeElement.getBoundingClientRect().width;
|
|
1209
|
+
return width;
|
|
1210
|
+
}
|
|
1211
|
+
return minWidth ?? this.#hostElementRef.nativeElement.getBoundingClientRect().width;
|
|
1212
|
+
}
|
|
1213
|
+
openPopup(settings) {
|
|
1214
|
+
let popupRef = this.#dropdownService.popupRef();
|
|
1215
|
+
if (popupRef || this.#host.disabled() || this.#host.readonly()) return;
|
|
1216
|
+
const event = new PreventableEvent("popupOpen");
|
|
1217
|
+
this.#host.open.emit(event);
|
|
1218
|
+
if (event.isDefaultPrevented()) return;
|
|
1219
|
+
const anchor = this.#hostElementRef.nativeElement;
|
|
1220
|
+
const content = this.#dropdownService.popupTemplate();
|
|
1221
|
+
const restoreFocus = this.#dropdownService.restoreFocus();
|
|
1222
|
+
const sheet = this.opensAsSheet();
|
|
1223
|
+
this.#dropdownService.sheet.set(sheet);
|
|
1224
|
+
popupRef = sheet ? this.createSheet(anchor, content, restoreFocus) : this.createPopup(anchor, content, settings);
|
|
742
1225
|
this.#dropdownService.popupRef.set(popupRef);
|
|
743
1226
|
this.setPopupCloseSubscriptions(popupRef);
|
|
744
1227
|
window.setTimeout(() => {
|
|
@@ -747,6 +1230,10 @@ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
|
|
|
747
1230
|
this.#host.opened.emit();
|
|
748
1231
|
});
|
|
749
1232
|
}
|
|
1233
|
+
opensAsSheet() {
|
|
1234
|
+
if (this.#host.adaptiveMode?.() !== "auto") return false;
|
|
1235
|
+
return this.#document.defaultView?.matchMedia?.(SMALL_SCREEN_QUERY).matches ?? false;
|
|
1236
|
+
}
|
|
750
1237
|
setPopupCloseSubscriptions(popupRef) {
|
|
751
1238
|
popupRef.beforeClose.pipe(takeUntil(popupRef.closed)).subscribe((event) => {
|
|
752
1239
|
if (!this.#hostDestroyed) this.#host.close.emit(event);
|
|
@@ -757,10 +1244,17 @@ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
|
|
|
757
1244
|
popupRef.closed.pipe(take(1)).subscribe((event) => {
|
|
758
1245
|
this.#dropdownService.focusCanReturn.set(focusCanReturn(this.#document, this.#hostElementRef.nativeElement, popupRef.overlayRef.overlayElement));
|
|
759
1246
|
this.#dropdownService.popupRef.set(null);
|
|
1247
|
+
this.#dropdownService.sheet.set(false);
|
|
760
1248
|
this.#dropdownService.popupCloseComplete$.next(event);
|
|
761
1249
|
if (!this.#hostDestroyed) this.#host.closed.emit();
|
|
762
1250
|
});
|
|
763
1251
|
}
|
|
1252
|
+
sheetTitle() {
|
|
1253
|
+
const title = this.#host.adaptiveTitle?.().trim();
|
|
1254
|
+
if (title) return title;
|
|
1255
|
+
const host = this.#hostElementRef.nativeElement;
|
|
1256
|
+
return (host.getAttribute("aria-labelledby") ?? "").split(/\s+/).filter((id) => id.length > 0).map((id) => this.#document.getElementById(id)?.textContent?.replace(/\s+/g, " ").trim() ?? "").filter((text) => text.length > 0).join(" ") || host.getAttribute("aria-label")?.trim() || "";
|
|
1257
|
+
}
|
|
764
1258
|
togglePopup(settings) {
|
|
765
1259
|
if (this.#dropdownService.popupRef()) {
|
|
766
1260
|
this.closePopup();
|
|
@@ -917,14 +1411,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
917
1411
|
}],
|
|
918
1412
|
ctorParameters: () => []
|
|
919
1413
|
});
|
|
920
|
-
function localizeNumber(value, options) {
|
|
921
|
-
return formatNumber(value, "en-US", options);
|
|
922
|
-
}
|
|
923
|
-
const DROPDOWNS_DEFAULT_MESSAGES = {
|
|
924
|
-
itemPosition: (text, position, total) => `${text}, ${localizeNumber(position)} of ${localizeNumber(total)}`,
|
|
925
|
-
noResultsFound: "No results found",
|
|
926
|
-
resultsAvailable: (count) => count === 1 ? `${localizeNumber(count)} result available` : `${localizeNumber(count)} results available`
|
|
927
|
-
};
|
|
928
1414
|
var DropdownLiveRegionDirective = class DropdownLiveRegionDirective {
|
|
929
1415
|
#dropdownService = inject(DropdownService);
|
|
930
1416
|
#i18n = inject(MonaI18nService);
|
|
@@ -1048,6 +1534,156 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1048
1534
|
args: [{ selector: "ng-template[monaDropdownSuffixTemplate]" }]
|
|
1049
1535
|
}]
|
|
1050
1536
|
});
|
|
1537
|
+
var DropdownTreePopupHandlerDirective = class DropdownTreePopupHandlerDirective {
|
|
1538
|
+
#destroyRef = inject(DestroyRef);
|
|
1539
|
+
#direction = injectComponentDirection();
|
|
1540
|
+
#dropdownService = inject(DropdownService);
|
|
1541
|
+
#host = inject(DROPDOWN_POPUP_INPUT_TOKEN);
|
|
1542
|
+
#hostElementRef = inject(ElementRef);
|
|
1543
|
+
#treeService = inject(TreeService);
|
|
1544
|
+
#typeahead$ = new Subject();
|
|
1545
|
+
constructor() {
|
|
1546
|
+
afterNextRender({ read: () => {
|
|
1547
|
+
this.setHostEvents();
|
|
1548
|
+
setupTypeahead(this.#typeahead$).pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((buffer) => {
|
|
1549
|
+
const node = this.#treeService.findNodeByText(buffer);
|
|
1550
|
+
if (node) this.#treeService.navigatedNode.set(node);
|
|
1551
|
+
});
|
|
1552
|
+
} });
|
|
1553
|
+
effect((onCleanup) => {
|
|
1554
|
+
const popupElement = this.#dropdownService.popupRef()?.overlayRef.overlayElement;
|
|
1555
|
+
if (popupElement == null) return;
|
|
1556
|
+
untracked(() => this.activateCurrentNode());
|
|
1557
|
+
const onKeydown = (event) => this.handleFilterKeydown(event);
|
|
1558
|
+
popupElement.addEventListener("keydown", onKeydown);
|
|
1559
|
+
onCleanup(() => popupElement.removeEventListener("keydown", onKeydown));
|
|
1560
|
+
});
|
|
1561
|
+
effect(() => {
|
|
1562
|
+
const filterText = this.#treeService.filterText();
|
|
1563
|
+
untracked(() => {
|
|
1564
|
+
if (!filterText || this.#dropdownService.popupRef() === null) return;
|
|
1565
|
+
const match = this.#treeService.findFirstMatch();
|
|
1566
|
+
if (match) this.#treeService.navigatedNode.set(match);
|
|
1567
|
+
});
|
|
1568
|
+
});
|
|
1569
|
+
this.#dropdownService.popupCloseComplete$.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
1570
|
+
this.#treeService.navigatedNode.set(null);
|
|
1571
|
+
this.#treeService.clearFilter();
|
|
1572
|
+
});
|
|
1573
|
+
}
|
|
1574
|
+
activateCurrentNode() {
|
|
1575
|
+
const treeService = this.#treeService;
|
|
1576
|
+
const node = treeService.selectedNodes().firstOrDefault() ?? TreeService.flatten(treeService.nodeSet()).firstOrDefault((n) => n.checked()) ?? null;
|
|
1577
|
+
if (node === null) {
|
|
1578
|
+
treeService.navigatedNode.set(null);
|
|
1579
|
+
treeService.navigate("first");
|
|
1580
|
+
return;
|
|
1581
|
+
}
|
|
1582
|
+
const ancestors = [];
|
|
1583
|
+
for (let parent = node.parent; parent !== null; parent = parent.parent) ancestors.unshift(parent);
|
|
1584
|
+
for (const ancestor of ancestors) if (!treeService.isExpanded(ancestor)) treeService.setNodeExpand(ancestor, true);
|
|
1585
|
+
treeService.navigatedNode.set(node);
|
|
1586
|
+
}
|
|
1587
|
+
closePopup() {
|
|
1588
|
+
this.#dropdownService.popupRef()?.close();
|
|
1589
|
+
}
|
|
1590
|
+
handleFilterKeydown(event) {
|
|
1591
|
+
const target = event.target;
|
|
1592
|
+
if (event.isComposing || event.keyCode === 229 || !(target instanceof HTMLInputElement) || target.closest("mona-filter-input") === null) return;
|
|
1593
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") this.navigate(event);
|
|
1594
|
+
else if (event.key === "Enter") {
|
|
1595
|
+
event.preventDefault();
|
|
1596
|
+
this.#dropdownService.keydown$.next(event);
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
handleHostKeydown(event) {
|
|
1600
|
+
if (event.isComposing || event.keyCode === 229) return;
|
|
1601
|
+
const beforeKeydown = new PreventableEvent("beforeKeydown", event);
|
|
1602
|
+
this.#dropdownService.beforeKeydown$.next(beforeKeydown);
|
|
1603
|
+
if (beforeKeydown.isDefaultPrevented()) return;
|
|
1604
|
+
const popupRef = this.#dropdownService.popupRef();
|
|
1605
|
+
if (event.key === "Escape") {
|
|
1606
|
+
popupRef?.close(new PopupCloseEvent({
|
|
1607
|
+
event,
|
|
1608
|
+
originalEvent: event,
|
|
1609
|
+
via: PopupCloseSource.Escape
|
|
1610
|
+
}));
|
|
1611
|
+
return;
|
|
1612
|
+
}
|
|
1613
|
+
if (event.key === "Tab") {
|
|
1614
|
+
this.closePopup();
|
|
1615
|
+
return;
|
|
1616
|
+
}
|
|
1617
|
+
if (event.altKey && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
|
|
1618
|
+
event.preventDefault();
|
|
1619
|
+
if (event.key === "ArrowDown") this.#dropdownService.triggerPopupOpen$.next({});
|
|
1620
|
+
else this.closePopup();
|
|
1621
|
+
return;
|
|
1622
|
+
}
|
|
1623
|
+
const opening = event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ";
|
|
1624
|
+
if (popupRef === null) {
|
|
1625
|
+
if (opening) {
|
|
1626
|
+
event.preventDefault();
|
|
1627
|
+
this.#dropdownService.triggerPopupOpen$.next({});
|
|
1628
|
+
} else this.#dropdownService.keydown$.next(event);
|
|
1629
|
+
return;
|
|
1630
|
+
}
|
|
1631
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
1632
|
+
event.preventDefault();
|
|
1633
|
+
this.#dropdownService.keydown$.next(event);
|
|
1634
|
+
return;
|
|
1635
|
+
}
|
|
1636
|
+
if (!this.navigate(event)) this.#dropdownService.keydown$.next(event);
|
|
1637
|
+
}
|
|
1638
|
+
navigate(event) {
|
|
1639
|
+
return handleTreeNavigationKey(event, {
|
|
1640
|
+
rtl: this.#direction() === "rtl",
|
|
1641
|
+
treeService: this.#treeService,
|
|
1642
|
+
typeahead: (key) => this.#typeahead$.next(key)
|
|
1643
|
+
});
|
|
1644
|
+
}
|
|
1645
|
+
setHostEvents() {
|
|
1646
|
+
const host = this.#hostElementRef.nativeElement;
|
|
1647
|
+
const usable = () => !this.#host.disabled() && !this.#host.readonly();
|
|
1648
|
+
fromEvent(host, "click").pipe(takeUntilDestroyed(this.#destroyRef), filter((event) => usable() && event.target?.tagName !== "INPUT")).subscribe(() => this.#dropdownService.triggerPopupToggle$.next({}));
|
|
1649
|
+
fromEvent(host, "keydown").pipe(takeUntilDestroyed(this.#destroyRef), filter(usable)).subscribe((event) => this.handleHostKeydown(event));
|
|
1650
|
+
}
|
|
1651
|
+
static {
|
|
1652
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1653
|
+
minVersion: "12.0.0",
|
|
1654
|
+
version: "22.2.6",
|
|
1655
|
+
ngImport: i0,
|
|
1656
|
+
type: DropdownTreePopupHandlerDirective,
|
|
1657
|
+
deps: [],
|
|
1658
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1659
|
+
});
|
|
1660
|
+
}
|
|
1661
|
+
static {
|
|
1662
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1663
|
+
minVersion: "14.0.0",
|
|
1664
|
+
version: "22.2.6",
|
|
1665
|
+
type: DropdownTreePopupHandlerDirective,
|
|
1666
|
+
isStandalone: true,
|
|
1667
|
+
selector: "[monaDropdownTreePopupHandler]",
|
|
1668
|
+
hostDirectives: [{ directive: DropdownPopupHandlerDirective }],
|
|
1669
|
+
ngImport: i0
|
|
1670
|
+
});
|
|
1671
|
+
}
|
|
1672
|
+
};
|
|
1673
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1674
|
+
minVersion: "12.0.0",
|
|
1675
|
+
version: "22.2.6",
|
|
1676
|
+
ngImport: i0,
|
|
1677
|
+
type: DropdownTreePopupHandlerDirective,
|
|
1678
|
+
decorators: [{
|
|
1679
|
+
type: Directive,
|
|
1680
|
+
args: [{
|
|
1681
|
+
selector: "[monaDropdownTreePopupHandler]",
|
|
1682
|
+
hostDirectives: [DropdownPopupHandlerDirective]
|
|
1683
|
+
}]
|
|
1684
|
+
}],
|
|
1685
|
+
ctorParameters: () => []
|
|
1686
|
+
});
|
|
1051
1687
|
const dropdownPopupThemeVariants = cva(`
|
|
1052
1688
|
h-full max-h-64 overflow-auto
|
|
1053
1689
|
[scrollbar-color:var(--color-scrollbar-thumb)_var(--color-scrollbar-track)] [scrollbar-width:thin]
|
|
@@ -1075,6 +1711,11 @@ const dropdownPopupThemeVariants = cva(`
|
|
|
1075
1711
|
size: "medium"
|
|
1076
1712
|
}
|
|
1077
1713
|
});
|
|
1078
|
-
|
|
1714
|
+
function readDropdownField(item, field) {
|
|
1715
|
+
if (!field) return item;
|
|
1716
|
+
if (typeof field === "string") return item?.[field];
|
|
1717
|
+
return field(item);
|
|
1718
|
+
}
|
|
1719
|
+
export { DROPDOWNS_DEFAULT_MESSAGES, DROPDOWN_DATA_INPUT_TOKEN, DROPDOWN_POPUP_INPUT_TOKEN, DropdownDataHandlerDirective, DropdownDataInputToken, DropdownFilterableDirective, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownGroupableDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, DropdownListPopupHandlerDirective, DropdownListService, DropdownLiveRegionDirective, DropdownNoDataTemplateDirective, DropdownPopupHandlerDirective, DropdownPrefixTemplateDirective, DropdownService, DropdownSheetComponent, DropdownSuffixTemplateDirective, DropdownTreePopupComponent, DropdownTreePopupHandlerDirective, DropdownVirtualScrollDirective, dropdownPopupThemeVariants, dropdownSheetSurfaceClasses, dropdownSheetThemeVariants, readDropdownField };
|
|
1079
1720
|
|
|
1080
1721
|
//# sourceMappingURL=nanahoshi-mona-ui-dropdowns.mjs.map
|