@nanahoshi/mona-ui 0.37.0 → 0.39.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/date-picker.md +2 -0
- package/docs/api/date-range-picker.md +2 -0
- package/docs/api/datetime-picker.md +2 -0
- 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/time-picker.md +2 -0
- package/docs/api/tree-view.md +2 -2
- package/docs/auto-complete.md +2 -0
- package/docs/combo-box.md +2 -0
- package/docs/date-picker.md +5 -1
- package/docs/date-range-picker.md +5 -1
- package/docs/datetime-picker.md +5 -1
- 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/docs/time-picker.md +5 -1
- package/dropdown-tree/package.json +4 -0
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +36 -2
- package/fesm2022/nanahoshi-mona-ui-date-range-picker.mjs +37 -3
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +52 -5
- 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 +730 -60
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +8 -2
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +4 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-S2iCn8TV.mjs → nanahoshi-mona-ui-grid-grid-list.component-BoSXXLKQ.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-BUJvgihp.mjs → nanahoshi-mona-ui-grid-grid-row.component-Df2gfS0X.mjs} +3 -1
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-Wndy-_Bt.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-xjrcCXXF.mjs} +2 -2
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +8 -4
- 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-time-picker.mjs +39 -4
- 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-date-picker.d.ts +25 -1
- package/types/nanahoshi-mona-ui-date-range-picker.d.ts +26 -1
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +34 -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 +218 -9
- 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
- package/types/nanahoshi-mona-ui-time-picker.d.ts +29 -2
|
@@ -8,7 +8,7 @@ import { ButtonDirective } from "@nanahoshi/mona-ui/button";
|
|
|
8
8
|
import { CalendarComponent, CalendarDecadeCellTemplateDirective, CalendarMonthCellTemplateDirective, CalendarYearCellTemplateDirective } from "@nanahoshi/mona-ui/calendar";
|
|
9
9
|
import { CalendarService, checkTypedDate, datePopupThemeVariants, isDateDisabled, parseTypedDate, typedDateParseError } from "@nanahoshi/mona-ui/date-input";
|
|
10
10
|
import * as i1 from "@nanahoshi/mona-ui/dropdowns";
|
|
11
|
-
import { DROPDOWN_POPUP_INPUT_TOKEN, DropdownPopupHandlerDirective, DropdownService } from "@nanahoshi/mona-ui/dropdowns";
|
|
11
|
+
import { DROPDOWN_POPUP_INPUT_TOKEN, DropdownPopupHandlerDirective, DropdownService, dropdownSheetPickerClasses } from "@nanahoshi/mona-ui/dropdowns";
|
|
12
12
|
import { MonaI18nService, formatNumber, getLocaleDateInputFormat, getLocaleFirstDayOfWeek, gregorianDateTime } from "@nanahoshi/mona-ui/i18n";
|
|
13
13
|
import { FIELD_ASSOCIATION_BOUNDARY, createElementControlId, injectEffectiveDisabled, injectLabelAssociation, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
14
14
|
import { TextBoxComponent } from "@nanahoshi/mona-ui/text-box";
|
|
@@ -389,11 +389,12 @@ var DateRangePickerComponent = class DateRangePickerComponent {
|
|
|
389
389
|
rounded: this.rounded(),
|
|
390
390
|
size: this.size()
|
|
391
391
|
});
|
|
392
|
-
|
|
392
|
+
const sheetClass = this.sheet() ? dropdownSheetPickerClasses : "";
|
|
393
|
+
return twMerge(variantClass, dateRangePickerPopupThemeVariants(), sheetClass, this.popupClass());
|
|
393
394
|
}, ...ngDevMode ? [{ debugName: "pickerPopupClass" }] : /* istanbul ignore next */ []);
|
|
394
395
|
this.popupId = createElementControlId();
|
|
395
396
|
this.popupTemplate = viewChild.required("popupTemplate", ...ngDevMode ? [{ debugName: "popupTemplate" }] : /* istanbul ignore next */ []);
|
|
396
|
-
this.presetClass = computed(() => dateRangePickerPresetThemeVariants({ size: this.size() }), ...ngDevMode ? [{ debugName: "presetClass" }] : /* istanbul ignore next */ []);
|
|
397
|
+
this.presetClass = computed(() => twMerge(dateRangePickerPresetThemeVariants({ size: this.size() }), this.sheet() ? "h-11" : ""), ...ngDevMode ? [{ debugName: "presetClass" }] : /* istanbul ignore next */ []);
|
|
397
398
|
this.presetItems = computed(() => {
|
|
398
399
|
const presets = this.presets();
|
|
399
400
|
if (presets.length === 0) return [];
|
|
@@ -409,11 +410,14 @@ var DateRangePickerComponent = class DateRangePickerComponent {
|
|
|
409
410
|
}, ...ngDevMode ? [{ debugName: "presetItems" }] : /* istanbul ignore next */ []);
|
|
410
411
|
this.presetListClass = dateRangePickerPresetListThemeVariants();
|
|
411
412
|
this.separatorClass = dateRangePickerSeparatorThemeVariants();
|
|
413
|
+
this.sheet = this.#dropdownService.sheet.asReadonly();
|
|
412
414
|
this.sizerClass = computed(() => dateRangePickerSizerThemeVariants({ clearButton: this.showClearButton() }), ...ngDevMode ? [{ debugName: "sizerClass" }] : /* istanbul ignore next */ []);
|
|
413
415
|
this.startInputId = createElementControlId();
|
|
414
416
|
this.startInvalid = computed(() => this.typedInput.partErrors().start.length > 0 || this.fieldInvalid(), ...ngDevMode ? [{ debugName: "startInvalid" }] : /* istanbul ignore next */ []);
|
|
415
417
|
this.startSizerTexts = computed(() => sizerTexts(this.#sampleTexts(), this.startPlaceholder()), ...ngDevMode ? [{ debugName: "startSizerTexts" }] : /* istanbul ignore next */ []);
|
|
416
418
|
this.yearCellTemplate = contentChild(CalendarYearCellTemplateDirective, ...ngDevMode ? [{ debugName: "yearCellTemplate" }] : /* istanbul ignore next */ []);
|
|
419
|
+
this.adaptiveMode = input("none", ...ngDevMode ? [{ debugName: "adaptiveMode" }] : /* istanbul ignore next */ []);
|
|
420
|
+
this.adaptiveTitle = input("", ...ngDevMode ? [{ debugName: "adaptiveTitle" }] : /* istanbul ignore next */ []);
|
|
417
421
|
this.ariaDescribedBy = input("", {
|
|
418
422
|
...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
|
|
419
423
|
alias: "aria-describedby"
|
|
@@ -634,6 +638,20 @@ var DateRangePickerComponent = class DateRangePickerComponent {
|
|
|
634
638
|
isStandalone: true,
|
|
635
639
|
selector: "mona-date-range-picker",
|
|
636
640
|
inputs: {
|
|
641
|
+
adaptiveMode: {
|
|
642
|
+
classPropertyName: "adaptiveMode",
|
|
643
|
+
publicName: "adaptiveMode",
|
|
644
|
+
isSignal: true,
|
|
645
|
+
isRequired: false,
|
|
646
|
+
transformFunction: null
|
|
647
|
+
},
|
|
648
|
+
adaptiveTitle: {
|
|
649
|
+
classPropertyName: "adaptiveTitle",
|
|
650
|
+
publicName: "adaptiveTitle",
|
|
651
|
+
isSignal: true,
|
|
652
|
+
isRequired: false,
|
|
653
|
+
transformFunction: null
|
|
654
|
+
},
|
|
637
655
|
ariaDescribedBy: {
|
|
638
656
|
classPropertyName: "ariaDescribedBy",
|
|
639
657
|
publicName: "aria-describedby",
|
|
@@ -1085,6 +1103,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1085
1103
|
type: i0.ContentChild,
|
|
1086
1104
|
args: [i0.forwardRef(() => CalendarYearCellTemplateDirective), { isSignal: true }]
|
|
1087
1105
|
}],
|
|
1106
|
+
adaptiveMode: [{
|
|
1107
|
+
type: i0.Input,
|
|
1108
|
+
args: [{
|
|
1109
|
+
isSignal: true,
|
|
1110
|
+
alias: "adaptiveMode",
|
|
1111
|
+
required: false
|
|
1112
|
+
}]
|
|
1113
|
+
}],
|
|
1114
|
+
adaptiveTitle: [{
|
|
1115
|
+
type: i0.Input,
|
|
1116
|
+
args: [{
|
|
1117
|
+
isSignal: true,
|
|
1118
|
+
alias: "adaptiveTitle",
|
|
1119
|
+
required: false
|
|
1120
|
+
}]
|
|
1121
|
+
}],
|
|
1088
1122
|
ariaDescribedBy: [{
|
|
1089
1123
|
type: i0.Input,
|
|
1090
1124
|
args: [{
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { CdkTrapFocus } from "@angular/cdk/a11y";
|
|
2
2
|
import { NgTemplateOutlet } from "@angular/common";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
import { Component, DestroyRef, ElementRef, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, linkedSignal, model, output, signal, untracked, viewChild } from "@angular/core";
|
|
4
|
+
import { Component, DOCUMENT, DestroyRef, ElementRef, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, linkedSignal, model, output, signal, untracked, viewChild } from "@angular/core";
|
|
5
5
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
6
6
|
import { LucideCalendar } from "@lucide/angular";
|
|
7
7
|
import { ButtonDirective } from "@nanahoshi/mona-ui/button";
|
|
8
8
|
import { CalendarComponent, CalendarDecadeCellTemplateDirective, CalendarMonthCellTemplateDirective, CalendarYearCellTemplateDirective } from "@nanahoshi/mona-ui/calendar";
|
|
9
9
|
import { CalendarService, DateInputPrefixTemplateDirective, TimeSelectorService, createTypedDateInput, datePopupThemeVariants, getLocaleHourFormat } from "@nanahoshi/mona-ui/date-input";
|
|
10
10
|
import * as i1 from "@nanahoshi/mona-ui/dropdowns";
|
|
11
|
-
import { DROPDOWN_POPUP_INPUT_TOKEN, DropdownPopupHandlerDirective, DropdownService } from "@nanahoshi/mona-ui/dropdowns";
|
|
11
|
+
import { DROPDOWN_POPUP_INPUT_TOKEN, DropdownPopupHandlerDirective, DropdownService, dropdownSheetPickerClasses } from "@nanahoshi/mona-ui/dropdowns";
|
|
12
12
|
import { MonaI18nService, getLocaleDateTimeInputFormat, injectComponentDirection } from "@nanahoshi/mona-ui/i18n";
|
|
13
13
|
import { FIELD_ASSOCIATION_BOUNDARY, createElementControlId, injectEffectiveDisabled, injectLabelAssociation, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
14
14
|
import { TextBoxComponent, TextBoxPrefixTemplateDirective, TextBoxSuffixTemplateDirective } from "@nanahoshi/mona-ui/text-box";
|
|
@@ -95,6 +95,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
|
|
|
95
95
|
#calendarService;
|
|
96
96
|
#destroyRef;
|
|
97
97
|
#direction;
|
|
98
|
+
#document;
|
|
98
99
|
#dropdownService;
|
|
99
100
|
#hostElementRef;
|
|
100
101
|
#i18n;
|
|
@@ -104,6 +105,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
|
|
|
104
105
|
this.#calendarService = inject(CalendarService);
|
|
105
106
|
this.#destroyRef = inject(DestroyRef);
|
|
106
107
|
this.#direction = injectComponentDirection();
|
|
108
|
+
this.#document = inject(DOCUMENT);
|
|
107
109
|
this.#dropdownService = inject(DropdownService);
|
|
108
110
|
this.#hostElementRef = inject(ElementRef);
|
|
109
111
|
this.#i18n = inject(MonaI18nService);
|
|
@@ -162,6 +164,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
|
|
|
162
164
|
this.messages = this.#i18n.componentMessages("dateTimePicker", DATETIME_PICKER_DEFAULT_MESSAGES);
|
|
163
165
|
this.monthCellTemplate = contentChild(CalendarMonthCellTemplateDirective, ...ngDevMode ? [{ debugName: "monthCellTemplate" }] : /* istanbul ignore next */ []);
|
|
164
166
|
this.navigatedDate = linkedSignal(() => this.value() ?? this.startDate(), ...ngDevMode ? [{ debugName: "navigatedDate" }] : /* istanbul ignore next */ []);
|
|
167
|
+
this.panelHeight = signal(null, ...ngDevMode ? [{ debugName: "panelHeight" }] : /* istanbul ignore next */ []);
|
|
165
168
|
this.panelId = createElementControlId();
|
|
166
169
|
this.pickerPopupClass = computed(() => {
|
|
167
170
|
const rounded = this.rounded();
|
|
@@ -171,7 +174,9 @@ var DateTimePickerComponent = class DateTimePickerComponent {
|
|
|
171
174
|
rounded,
|
|
172
175
|
size
|
|
173
176
|
});
|
|
174
|
-
|
|
177
|
+
const layoutClass = "flex h-68 flex-col";
|
|
178
|
+
const sheetClass = this.sheet() ? dropdownSheetPickerClasses : "";
|
|
179
|
+
return twMerge(variantClass, layoutClass, sheetClass, userClass);
|
|
175
180
|
}, ...ngDevMode ? [{ debugName: "pickerPopupClass" }] : /* istanbul ignore next */ []);
|
|
176
181
|
this.popupId = createElementControlId();
|
|
177
182
|
this.popupTemplate = viewChild.required("datePopupTemplate", ...ngDevMode ? [{ debugName: "popupTemplate" }] : /* istanbul ignore next */ []);
|
|
@@ -179,6 +184,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
|
|
|
179
184
|
...ngDevMode ? { debugName: "prefixTemplate" } : /* istanbul ignore next */ {},
|
|
180
185
|
read: TemplateRef
|
|
181
186
|
});
|
|
187
|
+
this.sheet = this.#dropdownService.sheet.asReadonly();
|
|
182
188
|
this.timePickerMax = computed(() => {
|
|
183
189
|
const maxDate = this.max();
|
|
184
190
|
const navigatedDate = this.navigatedDate();
|
|
@@ -197,8 +203,11 @@ var DateTimePickerComponent = class DateTimePickerComponent {
|
|
|
197
203
|
if (min.year === date.year && min.month === date.month && min.day === date.day) return minDate;
|
|
198
204
|
return null;
|
|
199
205
|
}, ...ngDevMode ? [{ debugName: "timePickerMin" }] : /* istanbul ignore next */ []);
|
|
206
|
+
this.timeSelectorSize = computed(() => this.sheet() ? "large" : this.size(), ...ngDevMode ? [{ debugName: "timeSelectorSize" }] : /* istanbul ignore next */ []);
|
|
200
207
|
this.timeTabId = createElementControlId();
|
|
201
208
|
this.yearCellTemplate = contentChild(CalendarYearCellTemplateDirective, ...ngDevMode ? [{ debugName: "yearCellTemplate" }] : /* istanbul ignore next */ []);
|
|
209
|
+
this.adaptiveMode = input("none", ...ngDevMode ? [{ debugName: "adaptiveMode" }] : /* istanbul ignore next */ []);
|
|
210
|
+
this.adaptiveTitle = input("", ...ngDevMode ? [{ debugName: "adaptiveTitle" }] : /* istanbul ignore next */ []);
|
|
202
211
|
this.ariaDescribedBy = input("", {
|
|
203
212
|
...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
|
|
204
213
|
alias: "aria-describedby"
|
|
@@ -297,6 +306,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
|
|
|
297
306
|
afterNextRender({ read: () => {
|
|
298
307
|
this.setPopupKeyboardSubscription();
|
|
299
308
|
this.setPopupCloseSubscription();
|
|
309
|
+
this.setPopupOpenSubscription();
|
|
300
310
|
} });
|
|
301
311
|
}
|
|
302
312
|
focus(options) {
|
|
@@ -413,6 +423,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
|
|
|
413
423
|
this.activeView.set("date");
|
|
414
424
|
this.focusViewOnMount.set(true);
|
|
415
425
|
this.navigatedDate.set(this.value() ?? this.startDate());
|
|
426
|
+
this.panelHeight.set(null);
|
|
416
427
|
});
|
|
417
428
|
}
|
|
418
429
|
setPopupKeyboardSubscription() {
|
|
@@ -439,6 +450,12 @@ var DateTimePickerComponent = class DateTimePickerComponent {
|
|
|
439
450
|
}
|
|
440
451
|
});
|
|
441
452
|
}
|
|
453
|
+
setPopupOpenSubscription() {
|
|
454
|
+
this.#dropdownService.popupOpenComplete$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
|
|
455
|
+
const panel = this.#dropdownService.sheet() ? this.#document.getElementById(this.panelId) : null;
|
|
456
|
+
this.panelHeight.set(panel?.offsetHeight || null);
|
|
457
|
+
});
|
|
458
|
+
}
|
|
442
459
|
startDate() {
|
|
443
460
|
return this.updateDateIfNotInRange(/* @__PURE__ */ new Date());
|
|
444
461
|
}
|
|
@@ -467,6 +484,20 @@ var DateTimePickerComponent = class DateTimePickerComponent {
|
|
|
467
484
|
isStandalone: true,
|
|
468
485
|
selector: "mona-datetime-picker",
|
|
469
486
|
inputs: {
|
|
487
|
+
adaptiveMode: {
|
|
488
|
+
classPropertyName: "adaptiveMode",
|
|
489
|
+
publicName: "adaptiveMode",
|
|
490
|
+
isSignal: true,
|
|
491
|
+
isRequired: false,
|
|
492
|
+
transformFunction: null
|
|
493
|
+
},
|
|
494
|
+
adaptiveTitle: {
|
|
495
|
+
classPropertyName: "adaptiveTitle",
|
|
496
|
+
publicName: "adaptiveTitle",
|
|
497
|
+
isSignal: true,
|
|
498
|
+
isRequired: false,
|
|
499
|
+
transformFunction: null
|
|
500
|
+
},
|
|
470
501
|
ariaDescribedBy: {
|
|
471
502
|
classPropertyName: "ariaDescribedBy",
|
|
472
503
|
publicName: "aria-describedby",
|
|
@@ -755,7 +786,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
|
|
|
755
786
|
}],
|
|
756
787
|
hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }],
|
|
757
788
|
ngImport: i0,
|
|
758
|
-
template: "<mona-text-box\n (inputBlur)=\"onInputBlur()\"\n (valueChange)=\"typedInput.edit($event)\"\n [aria-describedby]=\"describedBy() ?? ''\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"labelledBy() ?? ''\"\n [clearButton]=\"showClearButton()\"\n [disabled]=\"effectiveDisabled()\"\n [inputAttributes]=\"inputAttributes()\"\n [inputId]=\"inputId()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [value]=\"typedInput.text()\">\n @if (prefixTemplate()) {\n <ng-template monaTextBoxPrefixTemplate>\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </ng-template>\n }\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openDateTimePicker\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n (click)=\"onDateInputButtonClick()\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideCalendar [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #datePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n
|
|
789
|
+
template: "<mona-text-box\n (inputBlur)=\"onInputBlur()\"\n (valueChange)=\"typedInput.edit($event)\"\n [aria-describedby]=\"describedBy() ?? ''\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"labelledBy() ?? ''\"\n [clearButton]=\"showClearButton()\"\n [disabled]=\"effectiveDisabled()\"\n [inputAttributes]=\"inputAttributes()\"\n [inputId]=\"inputId()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [value]=\"typedInput.text()\">\n @if (prefixTemplate()) {\n <ng-template monaTextBoxPrefixTemplate>\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </ng-template>\n }\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openDateTimePicker\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n (click)=\"onDateInputButtonClick()\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideCalendar [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #datePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().dateTimePicker\"\n cdkTrapFocus>\n <div [class]=\"headerClass()\">\n <div class=\"flex w-full gap-1\" role=\"tablist\" (keydown)=\"onTabKeydown($event)\">\n <button\n monaButton\n type=\"button\"\n role=\"tab\"\n class=\"flex-1\"\n [id]=\"dateTabId\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"activeView() === 'date'\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [selected]=\"activeView() === 'date'\"\n [size]=\"size()\"\n [tabindex]=\"activeView() === 'date' ? 0 : -1\"\n (click)=\"selectTab('date')\">\n {{ messages().date }}\n </button>\n <button\n monaButton\n type=\"button\"\n role=\"tab\"\n class=\"flex-1\"\n [id]=\"timeTabId\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"activeView() === 'time'\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [selected]=\"activeView() === 'time'\"\n [size]=\"size()\"\n [tabindex]=\"activeView() === 'time' ? 0 : -1\"\n (click)=\"selectTab('time')\">\n {{ messages().time }}\n </button>\n </div>\n </div>\n <div\n class=\"overflow-hidden\"\n role=\"tabpanel\"\n [id]=\"panelId\"\n [style.height.px]=\"panelHeight()\"\n [attr.aria-labelledby]=\"activeView() === 'date' ? dateTabId : timeTabId\">\n @if (activeView() === \"date\") {\n <div class=\"flex h-full items-center justify-center\">\n <mona-calendar\n [focusOnMount]=\"focusViewOnMount()\"\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [firstDay]=\"firstDay()\"\n [weekNumber]=\"weekNumber()\"\n [value]=\"navigatedDate()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n (valueChange)=\"onCalendarValueChange($event)\"\n class=\"flex-1 border-none shadow-none\">\n @if (decadeCellTemplate()) {\n <ng-template monaCalendarDecadeCellTemplate let-year>\n <ng-container\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year }\"></ng-container>\n </ng-template>\n }\n @if (monthCellTemplate()) {\n <ng-template monaCalendarMonthCellTemplate let-day let-date=\"date\">\n <ng-container\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: day, date }\"></ng-container>\n </ng-template>\n }\n @if (yearCellTemplate()) {\n <ng-template monaCalendarYearCellTemplate let-year let-text=\"text\">\n <ng-container\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year, text }\"></ng-container>\n </ng-template>\n }\n </mona-calendar>\n </div>\n }\n @if (activeView() === \"time\") {\n <div class=\"flex h-full items-center justify-center\" [class.max-h-64]=\"!sheet()\">\n <mona-time-selector\n [focusOnMount]=\"focusViewOnMount()\"\n [value]=\"navigatedDate()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [max]=\"timePickerMax()\"\n [min]=\"timePickerMin()\"\n [footer]=\"false\"\n [size]=\"timeSelectorSize()\"\n [rounded]=\"rounded()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n }\n </div>\n <div [class]=\"footerClass()\">\n <button\n monaButton\n look=\"primary\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onSetDateClick()\">\n {{ messages().set }}\n </button>\n <button\n monaButton\n look=\"default\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onCancelClick()\">\n {{ messages().cancel }}\n </button>\n </div>\n </div>\n</ng-template>\n",
|
|
759
790
|
dependencies: [
|
|
760
791
|
{
|
|
761
792
|
kind: "component",
|
|
@@ -965,7 +996,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
965
996
|
"(focusout)": "onFocusOut($event)",
|
|
966
997
|
"(keydown)": "onKeydown($event)"
|
|
967
998
|
},
|
|
968
|
-
template: "<mona-text-box\n (inputBlur)=\"onInputBlur()\"\n (valueChange)=\"typedInput.edit($event)\"\n [aria-describedby]=\"describedBy() ?? ''\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"labelledBy() ?? ''\"\n [clearButton]=\"showClearButton()\"\n [disabled]=\"effectiveDisabled()\"\n [inputAttributes]=\"inputAttributes()\"\n [inputId]=\"inputId()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [value]=\"typedInput.text()\">\n @if (prefixTemplate()) {\n <ng-template monaTextBoxPrefixTemplate>\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </ng-template>\n }\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openDateTimePicker\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n (click)=\"onDateInputButtonClick()\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideCalendar [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #datePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n
|
|
999
|
+
template: "<mona-text-box\n (inputBlur)=\"onInputBlur()\"\n (valueChange)=\"typedInput.edit($event)\"\n [aria-describedby]=\"describedBy() ?? ''\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"labelledBy() ?? ''\"\n [clearButton]=\"showClearButton()\"\n [disabled]=\"effectiveDisabled()\"\n [inputAttributes]=\"inputAttributes()\"\n [inputId]=\"inputId()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [value]=\"typedInput.text()\">\n @if (prefixTemplate()) {\n <ng-template monaTextBoxPrefixTemplate>\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </ng-template>\n }\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openDateTimePicker\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n (click)=\"onDateInputButtonClick()\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideCalendar [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #datePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().dateTimePicker\"\n cdkTrapFocus>\n <div [class]=\"headerClass()\">\n <div class=\"flex w-full gap-1\" role=\"tablist\" (keydown)=\"onTabKeydown($event)\">\n <button\n monaButton\n type=\"button\"\n role=\"tab\"\n class=\"flex-1\"\n [id]=\"dateTabId\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"activeView() === 'date'\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [selected]=\"activeView() === 'date'\"\n [size]=\"size()\"\n [tabindex]=\"activeView() === 'date' ? 0 : -1\"\n (click)=\"selectTab('date')\">\n {{ messages().date }}\n </button>\n <button\n monaButton\n type=\"button\"\n role=\"tab\"\n class=\"flex-1\"\n [id]=\"timeTabId\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"activeView() === 'time'\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [selected]=\"activeView() === 'time'\"\n [size]=\"size()\"\n [tabindex]=\"activeView() === 'time' ? 0 : -1\"\n (click)=\"selectTab('time')\">\n {{ messages().time }}\n </button>\n </div>\n </div>\n <div\n class=\"overflow-hidden\"\n role=\"tabpanel\"\n [id]=\"panelId\"\n [style.height.px]=\"panelHeight()\"\n [attr.aria-labelledby]=\"activeView() === 'date' ? dateTabId : timeTabId\">\n @if (activeView() === \"date\") {\n <div class=\"flex h-full items-center justify-center\">\n <mona-calendar\n [focusOnMount]=\"focusViewOnMount()\"\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [firstDay]=\"firstDay()\"\n [weekNumber]=\"weekNumber()\"\n [value]=\"navigatedDate()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n (valueChange)=\"onCalendarValueChange($event)\"\n class=\"flex-1 border-none shadow-none\">\n @if (decadeCellTemplate()) {\n <ng-template monaCalendarDecadeCellTemplate let-year>\n <ng-container\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year }\"></ng-container>\n </ng-template>\n }\n @if (monthCellTemplate()) {\n <ng-template monaCalendarMonthCellTemplate let-day let-date=\"date\">\n <ng-container\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: day, date }\"></ng-container>\n </ng-template>\n }\n @if (yearCellTemplate()) {\n <ng-template monaCalendarYearCellTemplate let-year let-text=\"text\">\n <ng-container\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year, text }\"></ng-container>\n </ng-template>\n }\n </mona-calendar>\n </div>\n }\n @if (activeView() === \"time\") {\n <div class=\"flex h-full items-center justify-center\" [class.max-h-64]=\"!sheet()\">\n <mona-time-selector\n [focusOnMount]=\"focusViewOnMount()\"\n [value]=\"navigatedDate()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [max]=\"timePickerMax()\"\n [min]=\"timePickerMin()\"\n [footer]=\"false\"\n [size]=\"timeSelectorSize()\"\n [rounded]=\"rounded()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n }\n </div>\n <div [class]=\"footerClass()\">\n <button\n monaButton\n look=\"primary\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onSetDateClick()\">\n {{ messages().set }}\n </button>\n <button\n monaButton\n look=\"default\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onCancelClick()\">\n {{ messages().cancel }}\n </button>\n </div>\n </div>\n</ng-template>\n"
|
|
969
1000
|
}]
|
|
970
1001
|
}],
|
|
971
1002
|
ctorParameters: () => [],
|
|
@@ -993,6 +1024,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
993
1024
|
type: i0.ContentChild,
|
|
994
1025
|
args: [i0.forwardRef(() => CalendarYearCellTemplateDirective), { isSignal: true }]
|
|
995
1026
|
}],
|
|
1027
|
+
adaptiveMode: [{
|
|
1028
|
+
type: i0.Input,
|
|
1029
|
+
args: [{
|
|
1030
|
+
isSignal: true,
|
|
1031
|
+
alias: "adaptiveMode",
|
|
1032
|
+
required: false
|
|
1033
|
+
}]
|
|
1034
|
+
}],
|
|
1035
|
+
adaptiveTitle: [{
|
|
1036
|
+
type: i0.Input,
|
|
1037
|
+
args: [{
|
|
1038
|
+
isSignal: true,
|
|
1039
|
+
alias: "adaptiveTitle",
|
|
1040
|
+
required: false
|
|
1041
|
+
}]
|
|
1042
|
+
}],
|
|
996
1043
|
ariaDescribedBy: [{
|
|
997
1044
|
type: i0.Input,
|
|
998
1045
|
args: [{
|
|
@@ -3,7 +3,7 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
import { Component, DestroyRef, Directive, ElementRef, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, linkedSignal, model, output, untracked, viewChild } from "@angular/core";
|
|
4
4
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
5
5
|
import * as i1 from "@nanahoshi/mona-ui/dropdowns";
|
|
6
|
-
import { DROPDOWN_DATA_INPUT_TOKEN, DROPDOWN_POPUP_INPUT_TOKEN, DropdownDataHandlerDirective, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, DropdownListPopupHandlerDirective, DropdownListService, DropdownLiveRegionDirective, DropdownNoDataTemplateDirective, DropdownPrefixTemplateDirective, DropdownService, dropdownPopupThemeVariants } from "@nanahoshi/mona-ui/dropdowns";
|
|
6
|
+
import { DROPDOWN_DATA_INPUT_TOKEN, DROPDOWN_POPUP_INPUT_TOKEN, DropdownDataHandlerDirective, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, DropdownListPopupHandlerDirective, DropdownListService, DropdownLiveRegionDirective, DropdownNoDataTemplateDirective, DropdownPrefixTemplateDirective, DropdownService, dropdownPopupThemeVariants, dropdownSheetSurfaceClasses } from "@nanahoshi/mona-ui/dropdowns";
|
|
7
7
|
import { FIELD_ASSOCIATION_BOUNDARY, TYPEAHEAD_RESET_DELAY, createElementControlId, injectEffectiveDisabled, injectLabelAssociation, isTypeaheadKey, setupTypeahead, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
8
8
|
import { IndicatorIconComponent } from "@nanahoshi/mona-ui/internal/indicator-icon";
|
|
9
9
|
import { ListComponent, ListFooterTemplateDirective, ListGroupHeaderTemplateDirective, ListHeaderTemplateDirective, ListItemTemplateDirective, ListNoDataTemplateDirective, ListService } from "@nanahoshi/mona-ui/internal/list";
|
|
@@ -187,8 +187,10 @@ var DropdownListComponent = class DropdownListComponent {
|
|
|
187
187
|
size
|
|
188
188
|
});
|
|
189
189
|
const heightClass = this.popupHeight() ? "max-h-none" : "";
|
|
190
|
-
|
|
190
|
+
const sheetClass = this.sheet() ? dropdownSheetSurfaceClasses : "";
|
|
191
|
+
return twMerge(variantClass, heightClass, sheetClass, userClass);
|
|
191
192
|
}, ...ngDevMode ? [{ debugName: "listPopupClass" }] : /* istanbul ignore next */ []);
|
|
193
|
+
this.listSize = computed(() => this.sheet() ? "large" : this.size(), ...ngDevMode ? [{ debugName: "listSize" }] : /* istanbul ignore next */ []);
|
|
192
194
|
this.messages = this.#i18n.componentMessages("dropdownList", DROPDOWN_LIST_DEFAULT_MESSAGES);
|
|
193
195
|
this.noDataTemplate = contentChild(DropdownNoDataTemplateDirective, {
|
|
194
196
|
...ngDevMode ? { debugName: "noDataTemplate" } : /* istanbul ignore next */ {},
|
|
@@ -210,6 +212,7 @@ var DropdownListComponent = class DropdownListComponent {
|
|
|
210
212
|
this.selectedListItem = computed(() => {
|
|
211
213
|
return this.#listService.selectedListItems().firstOrDefault();
|
|
212
214
|
}, ...ngDevMode ? [{ debugName: "selectedListItem" }] : /* istanbul ignore next */ []);
|
|
215
|
+
this.sheet = this.#dropdownService.sheet.asReadonly();
|
|
213
216
|
this.valueContainerClass = computed(() => {
|
|
214
217
|
const hasTemplate = this.valueTemplate() != null;
|
|
215
218
|
return dropdownListValueContainerThemeVariants({ hasTemplate });
|
|
@@ -223,6 +226,8 @@ var DropdownListComponent = class DropdownListComponent {
|
|
|
223
226
|
if (!listItem) return "";
|
|
224
227
|
return this.#listService.getItemText(listItem);
|
|
225
228
|
}, ...ngDevMode ? [{ debugName: "valueText" }] : /* istanbul ignore next */ []);
|
|
229
|
+
this.adaptiveMode = input("none", ...ngDevMode ? [{ debugName: "adaptiveMode" }] : /* istanbul ignore next */ []);
|
|
230
|
+
this.adaptiveTitle = input("", ...ngDevMode ? [{ debugName: "adaptiveTitle" }] : /* istanbul ignore next */ []);
|
|
226
231
|
this.ariaDescribedBy = input("", {
|
|
227
232
|
...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
|
|
228
233
|
alias: "aria-describedby"
|
|
@@ -480,6 +485,20 @@ var DropdownListComponent = class DropdownListComponent {
|
|
|
480
485
|
isStandalone: true,
|
|
481
486
|
selector: "mona-dropdown-list",
|
|
482
487
|
inputs: {
|
|
488
|
+
adaptiveMode: {
|
|
489
|
+
classPropertyName: "adaptiveMode",
|
|
490
|
+
publicName: "adaptiveMode",
|
|
491
|
+
isSignal: true,
|
|
492
|
+
isRequired: false,
|
|
493
|
+
transformFunction: null
|
|
494
|
+
},
|
|
495
|
+
adaptiveTitle: {
|
|
496
|
+
classPropertyName: "adaptiveTitle",
|
|
497
|
+
publicName: "adaptiveTitle",
|
|
498
|
+
isSignal: true,
|
|
499
|
+
isRequired: false,
|
|
500
|
+
transformFunction: null
|
|
501
|
+
},
|
|
483
502
|
ariaDescribedBy: {
|
|
484
503
|
classPropertyName: "ariaDescribedBy",
|
|
485
504
|
publicName: "aria-describedby",
|
|
@@ -759,7 +778,7 @@ var DropdownListComponent = class DropdownListComponent {
|
|
|
759
778
|
{ directive: i1.DropdownLiveRegionDirective }
|
|
760
779
|
],
|
|
761
780
|
ngImport: i0,
|
|
762
|
-
template: "@if (prefixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </span>\n}\n\n<span [class]=\"valueContainerClass()\">\n @if (!valueTemplate()) {\n <span>\n @if (selectedListItem()) {\n <span>{{ valueText() }}</span>\n } @else {\n <span>{{ placeholder() }}</span>\n }\n </span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"valueTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedDataItem() }\"></ng-container>\n }\n</span>\n\n@if (clearButtonVisible()) {\n <mona-indicator-icon\n preset=\"clear\"\n [interactive]=\"true\"\n [label]=\"messages().clear\"\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\n}\n\n@if (loading()) {\n <mona-indicator-icon preset=\"loading\" [size]=\"12\"></mona-indicator-icon>\n}\n\n<mona-indicator-icon preset=\"dropdown\" [size]=\"18\"></mona-indicator-icon>\n\n<ng-template #popupTemplate>\n <div [class]=\"listPopupClass()\" (pointerdown)=\"onPopupPointerDown($event)\">\n <mona-list [listId]=\"listId\" [focusOnMount]=\"false\" [size]=\"
|
|
781
|
+
template: "@if (prefixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </span>\n}\n\n<span [class]=\"valueContainerClass()\">\n @if (!valueTemplate()) {\n <span>\n @if (selectedListItem()) {\n <span>{{ valueText() }}</span>\n } @else {\n <span>{{ placeholder() }}</span>\n }\n </span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"valueTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedDataItem() }\"></ng-container>\n }\n</span>\n\n@if (clearButtonVisible()) {\n <mona-indicator-icon\n preset=\"clear\"\n [interactive]=\"true\"\n [label]=\"messages().clear\"\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\n}\n\n@if (loading()) {\n <mona-indicator-icon preset=\"loading\" [size]=\"12\"></mona-indicator-icon>\n}\n\n<mona-indicator-icon preset=\"dropdown\" [size]=\"18\"></mona-indicator-icon>\n\n<ng-template #popupTemplate>\n <div [class]=\"listPopupClass()\" (pointerdown)=\"onPopupPointerDown($event)\">\n <mona-list [listId]=\"listId\" [focusOnMount]=\"false\" [size]=\"listSize()\" (itemSelect)=\"onItemSelect($event)\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate()\"></ng-container>\n </ng-template>\n }\n </mona-list>\n </div>\n</ng-template>\n",
|
|
763
782
|
dependencies: [
|
|
764
783
|
{
|
|
765
784
|
kind: "directive",
|
|
@@ -901,7 +920,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
901
920
|
"[class]": "baseClass()",
|
|
902
921
|
"(focusout)": "onFocusOut($event)"
|
|
903
922
|
},
|
|
904
|
-
template: "@if (prefixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </span>\n}\n\n<span [class]=\"valueContainerClass()\">\n @if (!valueTemplate()) {\n <span>\n @if (selectedListItem()) {\n <span>{{ valueText() }}</span>\n } @else {\n <span>{{ placeholder() }}</span>\n }\n </span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"valueTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedDataItem() }\"></ng-container>\n }\n</span>\n\n@if (clearButtonVisible()) {\n <mona-indicator-icon\n preset=\"clear\"\n [interactive]=\"true\"\n [label]=\"messages().clear\"\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\n}\n\n@if (loading()) {\n <mona-indicator-icon preset=\"loading\" [size]=\"12\"></mona-indicator-icon>\n}\n\n<mona-indicator-icon preset=\"dropdown\" [size]=\"18\"></mona-indicator-icon>\n\n<ng-template #popupTemplate>\n <div [class]=\"listPopupClass()\" (pointerdown)=\"onPopupPointerDown($event)\">\n <mona-list [listId]=\"listId\" [focusOnMount]=\"false\" [size]=\"
|
|
923
|
+
template: "@if (prefixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </span>\n}\n\n<span [class]=\"valueContainerClass()\">\n @if (!valueTemplate()) {\n <span>\n @if (selectedListItem()) {\n <span>{{ valueText() }}</span>\n } @else {\n <span>{{ placeholder() }}</span>\n }\n </span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"valueTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedDataItem() }\"></ng-container>\n }\n</span>\n\n@if (clearButtonVisible()) {\n <mona-indicator-icon\n preset=\"clear\"\n [interactive]=\"true\"\n [label]=\"messages().clear\"\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\n}\n\n@if (loading()) {\n <mona-indicator-icon preset=\"loading\" [size]=\"12\"></mona-indicator-icon>\n}\n\n<mona-indicator-icon preset=\"dropdown\" [size]=\"18\"></mona-indicator-icon>\n\n<ng-template #popupTemplate>\n <div [class]=\"listPopupClass()\" (pointerdown)=\"onPopupPointerDown($event)\">\n <mona-list [listId]=\"listId\" [focusOnMount]=\"false\" [size]=\"listSize()\" (itemSelect)=\"onItemSelect($event)\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate()\"></ng-container>\n </ng-template>\n }\n </mona-list>\n </div>\n</ng-template>\n"
|
|
905
924
|
}]
|
|
906
925
|
}],
|
|
907
926
|
ctorParameters: () => [],
|
|
@@ -959,6 +978,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
959
978
|
isSignal: true
|
|
960
979
|
}]
|
|
961
980
|
}],
|
|
981
|
+
adaptiveMode: [{
|
|
982
|
+
type: i0.Input,
|
|
983
|
+
args: [{
|
|
984
|
+
isSignal: true,
|
|
985
|
+
alias: "adaptiveMode",
|
|
986
|
+
required: false
|
|
987
|
+
}]
|
|
988
|
+
}],
|
|
989
|
+
adaptiveTitle: [{
|
|
990
|
+
type: i0.Input,
|
|
991
|
+
args: [{
|
|
992
|
+
isSignal: true,
|
|
993
|
+
alias: "adaptiveTitle",
|
|
994
|
+
required: false
|
|
995
|
+
}]
|
|
996
|
+
}],
|
|
962
997
|
ariaDescribedBy: [{
|
|
963
998
|
type: i0.Input,
|
|
964
999
|
args: [{
|
|
@@ -1168,6 +1203,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1168
1203
|
}]
|
|
1169
1204
|
}
|
|
1170
1205
|
});
|
|
1171
|
-
export { DROPDOWN_LIST_DEFAULT_MESSAGES, DropdownListComponent, DropdownListValueTemplateDirective };
|
|
1206
|
+
export { DROPDOWN_LIST_DEFAULT_MESSAGES, DropdownListComponent, DropdownListValueTemplateDirective, dropdownListAffixContainerThemeVariants, dropdownListInputThemeVariants, dropdownListValueContainerThemeVariants };
|
|
1172
1207
|
|
|
1173
1208
|
//# sourceMappingURL=nanahoshi-mona-ui-dropdown-list.mjs.map
|