@nanahoshi/mona-ui 0.19.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/THIRD_PARTY_NOTICES.md +60 -0
  2. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +120 -99
  3. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +16 -10
  4. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +24 -14
  5. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-Bg7rckst.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-BuybF7tX.mjs} +2 -2
  6. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BSSpaCLL.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Dj-SaNzk.mjs} +2 -2
  7. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-D9AwQFDV.mjs → nanahoshi-mona-ui-grid-grid-list.component-CYAm4l84.mjs} +5 -5
  8. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-Byb9iTes.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-B_Gm--X6.mjs} +28 -17
  9. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-CBmdtrXm.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-X0X487Rm.mjs} +5 -5
  10. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CyzJFQIy.mjs} +18 -9
  11. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  12. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +3722 -16
  13. package/fesm2022/nanahoshi-mona-ui-locales.mjs +4973 -0
  14. package/fesm2022/nanahoshi-mona-ui-pager.mjs +23 -13
  15. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +14 -5
  16. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +22 -13
  17. package/locales/package.json +4 -0
  18. package/package.json +5 -1
  19. package/types/nanahoshi-mona-ui-calendar.d.ts +25 -21
  20. package/types/nanahoshi-mona-ui-date-picker.d.ts +7 -4
  21. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +8 -5
  22. package/types/nanahoshi-mona-ui-grid.d.ts +12 -1
  23. package/types/nanahoshi-mona-ui-i18n.d.ts +49 -2
  24. package/types/nanahoshi-mona-ui-locales.d.ts +4889 -0
  25. package/types/nanahoshi-mona-ui-pager.d.ts +1 -0
  26. package/types/nanahoshi-mona-ui-stepper.d.ts +2 -1
  27. package/types/nanahoshi-mona-ui-time-picker.d.ts +4 -2
@@ -9,7 +9,7 @@ import { CalendarDecadeCellTemplateDirective, CalendarMonthCellTemplateDirective
9
9
  import { CalendarService, datePopupThemeVariants, DateInputPrefixTemplateDirective } from '@nanahoshi/mona-ui/date-input';
10
10
  import * as i1 from '@nanahoshi/mona-ui/dropdowns';
11
11
  import { DropdownService, DropdownPopupInputToken, DropdownPopupHandlerDirective } from '@nanahoshi/mona-ui/dropdowns';
12
- import { MonaI18nService, gregorianDateTime, parseGregorianDate } from '@nanahoshi/mona-ui/i18n';
12
+ import { MonaI18nService, gregorianDateTime, getLocaleDateInputFormat, parseGregorianDate } from '@nanahoshi/mona-ui/i18n';
13
13
  import { themeControlSurfaceClasses, createElementControlId } from '@nanahoshi/mona-ui/internal';
14
14
  import { TextBoxComponent, TextBoxSuffixTemplateDirective, TextBoxPrefixTemplateDirective } from '@nanahoshi/mona-ui/text-box';
15
15
  import { fromEvent } from 'rxjs';
@@ -100,7 +100,7 @@ class DatePickerComponent {
100
100
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
101
101
  this.currentDateString = linkedSignal(() => {
102
102
  const value = this.value();
103
- const format = this.format();
103
+ const format = this.effectiveFormat();
104
104
  const locale = this.#i18n.localeId();
105
105
  if (!value) {
106
106
  return "";
@@ -110,6 +110,10 @@ class DatePickerComponent {
110
110
  ...(ngDevMode ? [{ debugName: "currentDateString" }] : /* istanbul ignore next */ []));
111
111
  this.decadeCellTemplate = contentChild(CalendarDecadeCellTemplateDirective, /* @ts-ignore */
112
112
  ...(ngDevMode ? [{ debugName: "decadeCellTemplate" }] : /* istanbul ignore next */ []));
113
+ this.effectiveFormat = computed(() => {
114
+ return this.format() ?? getLocaleDateInputFormat(this.#i18n.localeId());
115
+ }, /* @ts-ignore */
116
+ ...(ngDevMode ? [{ debugName: "effectiveFormat" }] : /* istanbul ignore next */ []));
113
117
  this.expanded = computed(() => this.#dropdownService.popupRef() !== null, /* @ts-ignore */
114
118
  ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
115
119
  this.inputAttributes = computed(() => {
@@ -170,14 +174,16 @@ class DatePickerComponent {
170
174
  this.disabledDates = input(/* @ts-ignore */
171
175
  ...(ngDevMode ? [undefined, { debugName: "disabledDates" }] : /* istanbul ignore next */ []));
172
176
  /**
173
- * @description Sets the first day of the week.
177
+ * @description Sets the first day of the week. If not specified, derives from the active locale.
178
+ * @default null
174
179
  */
175
- this.firstDay = input("monday", /* @ts-ignore */
180
+ this.firstDay = input(null, /* @ts-ignore */
176
181
  ...(ngDevMode ? [{ debugName: "firstDay" }] : /* istanbul ignore next */ []));
177
182
  /**
178
- * @description Sets the date format of the date picker.
183
+ * @description Sets the date format of the date picker. If not specified, derives from the active locale.
184
+ * @default null
179
185
  */
180
- this.format = input("dd/MM/yyyy", /* @ts-ignore */
186
+ this.format = input(null, /* @ts-ignore */
181
187
  ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
182
188
  /**
183
189
  * @description Marks the date picker as invalid. When bound to a signal form field via `[formField]`,
@@ -317,7 +323,7 @@ class DatePickerComponent {
317
323
  return;
318
324
  }
319
325
  const locale = this.#i18n.localeId();
320
- const dateTime = parseGregorianDate(this.currentDateString(), this.format(), locale);
326
+ const dateTime = parseGregorianDate(this.currentDateString(), this.effectiveFormat(), locale);
321
327
  if (this.dateStringEquals(this.value(), dateTime.toJSDate())) {
322
328
  this.touch.emit();
323
329
  return;
@@ -361,8 +367,8 @@ class DatePickerComponent {
361
367
  dateStringEquals(date1, date2) {
362
368
  if (date1 && date2) {
363
369
  const locale = this.#i18n.localeId();
364
- return (gregorianDateTime(date1, locale).toFormat(this.format()) ===
365
- gregorianDateTime(date2, locale).toFormat(this.format()));
370
+ return (gregorianDateTime(date1, locale).toFormat(this.effectiveFormat()) ===
371
+ gregorianDateTime(date2, locale).toFormat(this.effectiveFormat()));
366
372
  }
367
373
  return date1 === date2;
368
374
  }
@@ -437,7 +443,7 @@ class DatePickerComponent {
437
443
  useExisting: forwardRef(() => DatePickerComponent),
438
444
  multi: false
439
445
  }
440
- ], queries: [{ propertyName: "decadeCellTemplate", first: true, predicate: CalendarDecadeCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "monthCellTemplate", first: true, predicate: CalendarMonthCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "prefixTemplate", first: true, predicate: DateInputPrefixTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "yearCellTemplate", first: true, predicate: CalendarYearCellTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }], ngImport: i0, template: "<mona-text-box\n (inputBlur)=\"onDateInputBlur()\"\n (valueChange)=\"onDateStringEdit($event)\"\n [disabled]=\"disabled()\"\n [value]=\"currentDateString()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly() || readonlyInput()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalid()\"\n [required]=\"required()\"\n [clearButton]=\"showClearButton()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"touched()\">\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 [rounded]=\"'none'\"\n [size]=\"size()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openCalendar\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"disabled() || readonly()\"\n [tabindex]=\"-1\"\n (click)=\"onDateInputButtonClick()\">\n <i class=\"ri-calendar-line\"></i>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #popupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().datePicker\"\n cdkTrapFocus>\n <mona-calendar\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n [weekNumber]=\"weekNumber()\"\n [firstDay]=\"firstDay()\"\n [value]=\"value()\"\n (valueChange)=\"onCalendarValueChange($event)\">\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</ng-template>\n", dependencies: [{ kind: "component", type: CalendarComponent, selector: "mona-calendar", inputs: ["disabled", "disabledDates", "firstDay", "invalid", "maxDate", "minDate", "readonly", "rounded", "selection", "required", "touched", "class", "value", "weekNumber"], outputs: ["disabledChange", "touch", "valueChange"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["clearButton", "disabled", "inputAttributes", "inputClass", "inputStyle", "invalid", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "ng-template[monaTextBoxSuffixTemplate]" }, { kind: "directive", type: CalendarDecadeCellTemplateDirective, selector: "ng-template[monaCalendarDecadeCellTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CalendarMonthCellTemplateDirective, selector: "ng-template[monaCalendarMonthCellTemplate]" }, { kind: "directive", type: CalendarYearCellTemplateDirective, selector: "ng-template[monaCalendarYearCellTemplate]" }, { kind: "directive", type: TextBoxPrefixTemplateDirective, selector: "ng-template[monaTextBoxPrefixTemplate]" }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] }); }
446
+ ], queries: [{ propertyName: "decadeCellTemplate", first: true, predicate: CalendarDecadeCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "monthCellTemplate", first: true, predicate: CalendarMonthCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "prefixTemplate", first: true, predicate: DateInputPrefixTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "yearCellTemplate", first: true, predicate: CalendarYearCellTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }], ngImport: i0, template: "<mona-text-box\n (inputBlur)=\"onDateInputBlur()\"\n (valueChange)=\"onDateStringEdit($event)\"\n [disabled]=\"disabled()\"\n [value]=\"currentDateString()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly() || readonlyInput()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalid()\"\n [required]=\"required()\"\n [clearButton]=\"showClearButton()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"touched()\">\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 [rounded]=\"'none'\"\n [size]=\"size()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openCalendar\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"disabled() || readonly()\"\n [tabindex]=\"-1\"\n (click)=\"onDateInputButtonClick()\">\n <i class=\"ri-calendar-line\"></i>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #popupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().datePicker\"\n cdkTrapFocus>\n <mona-calendar\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n [weekNumber]=\"weekNumber()\"\n [firstDay]=\"firstDay()\"\n [value]=\"value()\"\n (valueChange)=\"onCalendarValueChange($event)\">\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</ng-template>\n", dependencies: [{ kind: "component", type: CalendarComponent, selector: "mona-calendar", inputs: ["disabled", "disabledDates", "firstDay", "invalid", "maxDate", "minDate", "readonly", "required", "rounded", "selection", "touched", "class", "value", "weekNumber"], outputs: ["disabledChange", "touch", "valueChange"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["clearButton", "disabled", "inputAttributes", "inputClass", "inputStyle", "invalid", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "ng-template[monaTextBoxSuffixTemplate]" }, { kind: "directive", type: CalendarDecadeCellTemplateDirective, selector: "ng-template[monaCalendarDecadeCellTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CalendarMonthCellTemplateDirective, selector: "ng-template[monaCalendarMonthCellTemplate]" }, { kind: "directive", type: CalendarYearCellTemplateDirective, selector: "ng-template[monaCalendarYearCellTemplate]" }, { kind: "directive", type: TextBoxPrefixTemplateDirective, selector: "ng-template[monaTextBoxPrefixTemplate]" }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] }); }
441
447
  }
442
448
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DatePickerComponent, decorators: [{
443
449
  type: Component,
@@ -1,7 +1,7 @@
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 { inject, DestroyRef, ElementRef, computed, signal, linkedSignal, contentChild, viewChild, TemplateRef, output, input, model, effect, untracked, afterNextRender, forwardRef, Component } from '@angular/core';
4
+ import { inject, DestroyRef, ElementRef, signal, computed, linkedSignal, contentChild, viewChild, TemplateRef, output, input, model, effect, untracked, afterNextRender, forwardRef, Component } from '@angular/core';
5
5
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
6
  import { any } from '@mirei/ts-collections';
7
7
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
@@ -10,7 +10,7 @@ import { CalendarDecadeCellTemplateDirective, CalendarMonthCellTemplateDirective
10
10
  import { CalendarService, TimeSelectorService, datePopupThemeVariants, DateInputPrefixTemplateDirective } from '@nanahoshi/mona-ui/date-input';
11
11
  import * as i1 from '@nanahoshi/mona-ui/dropdowns';
12
12
  import { DropdownService, DropdownPopupInputToken, DropdownPopupHandlerDirective } from '@nanahoshi/mona-ui/dropdowns';
13
- import { injectComponentDirection, MonaI18nService, gregorianDateTime, parseGregorianDate } from '@nanahoshi/mona-ui/i18n';
13
+ import { injectComponentDirection, MonaI18nService, gregorianDateTime, getLocaleDateTimeInputFormat, parseGregorianDate } from '@nanahoshi/mona-ui/i18n';
14
14
  import { themeControlSurfaceClasses, createElementControlId } from '@nanahoshi/mona-ui/internal';
15
15
  import { TextBoxComponent, TextBoxSuffixTemplateDirective, TextBoxPrefixTemplateDirective } from '@nanahoshi/mona-ui/text-box';
16
16
  import { TimeSelectorComponent } from '@nanahoshi/mona-ui/time-selector';
@@ -115,8 +115,6 @@ class DateTimePickerComponent {
115
115
  this.#i18n = inject(MonaI18nService);
116
116
  this.#id = createElementControlId();
117
117
  this.#timeSelectorService = inject(TimeSelectorService);
118
- this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
119
- ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
120
118
  this.activeView = signal("date", /* @ts-ignore */
121
119
  ...(ngDevMode ? [{ debugName: "activeView" }] : /* istanbul ignore next */ []));
122
120
  this.baseClass = computed(() => {
@@ -130,7 +128,7 @@ class DateTimePickerComponent {
130
128
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
131
129
  this.currentDateString = linkedSignal(() => {
132
130
  const value = this.value();
133
- const format = this.format();
131
+ const format = this.effectiveFormat();
134
132
  const locale = this.#i18n.localeId();
135
133
  if (!value) {
136
134
  return "";
@@ -140,6 +138,14 @@ class DateTimePickerComponent {
140
138
  ...(ngDevMode ? [{ debugName: "currentDateString" }] : /* istanbul ignore next */ []));
141
139
  this.decadeCellTemplate = contentChild(CalendarDecadeCellTemplateDirective, /* @ts-ignore */
142
140
  ...(ngDevMode ? [{ debugName: "decadeCellTemplate" }] : /* istanbul ignore next */ []));
141
+ this.effectiveFormat = computed(() => {
142
+ return (this.format() ??
143
+ getLocaleDateTimeInputFormat(this.#i18n.localeId(), {
144
+ hourFormat: this.hourFormat(),
145
+ showSeconds: this.showSeconds()
146
+ }));
147
+ }, /* @ts-ignore */
148
+ ...(ngDevMode ? [{ debugName: "effectiveFormat" }] : /* istanbul ignore next */ []));
143
149
  this.expanded = computed(() => this.#dropdownService.popupRef() !== null, /* @ts-ignore */
144
150
  ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
145
151
  this.footerClass = computed(() => {
@@ -168,6 +174,8 @@ class DateTimePickerComponent {
168
174
  ...(ngDevMode ? [{ debugName: "inputAttributes" }] : /* istanbul ignore next */ []));
169
175
  this.invalidState = computed(() => this.touched() && (this.invalid() || (this.required() && !this.value())), /* @ts-ignore */
170
176
  ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
177
+ this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
178
+ ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
171
179
  this.messages = this.#i18n.componentMessages("dateTimePicker", DATETIME_PICKER_DEFAULT_MESSAGES);
172
180
  this.monthCellTemplate = contentChild(CalendarMonthCellTemplateDirective, /* @ts-ignore */
173
181
  ...(ngDevMode ? [{ debugName: "monthCellTemplate" }] : /* istanbul ignore next */ []));
@@ -236,14 +244,16 @@ class DateTimePickerComponent {
236
244
  this.disabledDates = input(/* @ts-ignore */
237
245
  ...(ngDevMode ? [undefined, { debugName: "disabledDates" }] : /* istanbul ignore next */ []));
238
246
  /**
239
- * @description Sets the first day of the week.
247
+ * @description Sets the first day of the week. If not specified, derives from the active locale.
248
+ * @default null
240
249
  */
241
- this.firstDay = input("monday", /* @ts-ignore */
250
+ this.firstDay = input(null, /* @ts-ignore */
242
251
  ...(ngDevMode ? [{ debugName: "firstDay" }] : /* istanbul ignore next */ []));
243
252
  /**
244
- * @description Sets the date format of the date time picker.
253
+ * @description Sets the date format of the date time picker. If not specified, derives from the active locale, hourFormat, and showSeconds.
254
+ * @default null
245
255
  */
246
- this.format = input("dd/MM/yyyy HH:mm", /* @ts-ignore */
256
+ this.format = input(null, /* @ts-ignore */
247
257
  ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
248
258
  /**
249
259
  * @description Sets the hour format of the time picker.
@@ -420,7 +430,7 @@ class DateTimePickerComponent {
420
430
  return;
421
431
  }
422
432
  const locale = this.#i18n.localeId();
423
- const dateTime = parseGregorianDate(this.currentDateString(), this.format(), locale);
433
+ const dateTime = parseGregorianDate(this.currentDateString(), this.effectiveFormat(), locale);
424
434
  if (this.dateStringEquals(this.value(), dateTime.toJSDate())) {
425
435
  this.touch.emit();
426
436
  return;
@@ -475,8 +485,8 @@ class DateTimePickerComponent {
475
485
  dateStringEquals(date1, date2) {
476
486
  if (date1 && date2) {
477
487
  const locale = this.#i18n.localeId();
478
- return (gregorianDateTime(date1, locale).toFormat(this.format()) ===
479
- gregorianDateTime(date2, locale).toFormat(this.format()));
488
+ return (gregorianDateTime(date1, locale).toFormat(this.effectiveFormat()) ===
489
+ gregorianDateTime(date2, locale).toFormat(this.effectiveFormat()));
480
490
  }
481
491
  return date1 === date2;
482
492
  }
@@ -548,7 +558,7 @@ class DateTimePickerComponent {
548
558
  }
549
559
  setCurrentDate(date) {
550
560
  this.value.set(date);
551
- this.updateCurrentDateString(date, this.format());
561
+ this.updateCurrentDateString(date, this.effectiveFormat());
552
562
  this.touch.emit();
553
563
  }
554
564
  setKeyboardSubscriptions() {
@@ -630,7 +640,7 @@ class DateTimePickerComponent {
630
640
  useExisting: forwardRef(() => DateTimePickerComponent),
631
641
  multi: false
632
642
  }
633
- ], queries: [{ propertyName: "decadeCellTemplate", first: true, predicate: CalendarDecadeCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "monthCellTemplate", first: true, predicate: CalendarMonthCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "prefixTemplate", first: true, predicate: DateInputPrefixTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "yearCellTemplate", first: true, predicate: CalendarYearCellTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "popupTemplate", first: true, predicate: ["datePopupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }], ngImport: i0, template: "<mona-text-box\n (inputBlur)=\"onDateInputBlur()\"\n (valueChange)=\"onDateStringEdit($event)\"\n [clearButton]=\"showClearButton()\"\n [disabled]=\"disabled()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalid()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly() || readonlyInput()\"\n [required]=\"required()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"touched()\"\n [value]=\"currentDateString()\">\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]=\"disabled() || readonly()\"\n [tabindex]=\"-1\">\n <i class=\"ri-calendar-line\"></i>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #datePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n class=\"flex h-68 flex-col\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().dateTimePicker\"\n cdkTrapFocus>\n <div [class]=\"headerClass()\">\n <mona-button-group\n selection=\"single\"\n [allowEmpty]=\"false\"\n class=\"w-full\"\n [disabled]=\"disabled()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n role=\"tablist\">\n <button monaButton [selected]=\"activeView() === 'date'\" (click)=\"activeView.set('date')\" role=\"tab\">\n {{ messages().date }}\n </button>\n <button monaButton [selected]=\"activeView() === 'time'\" (click)=\"activeView.set('time')\" role=\"tab\">\n {{ messages().time }}\n </button>\n </mona-button-group>\n </div>\n <div class=\"overflow-hidden\">\n @if (activeView() === \"date\") {\n <div class=\"flex h-full items-center justify-center\" [attr.aria-label]=\"messages().calendar\">\n <mona-calendar\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [firstDay]=\"firstDay()\"\n [weekNumber]=\"weekNumber()\"\n [value]=\"navigatedDate()\"\n [disabled]=\"disabled()\"\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 max-h-64 items-center justify-center\" [attr.aria-label]=\"messages().timePicker\">\n <mona-time-selector\n [value]=\"navigatedDate()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [max]=\"timePickerMax()\"\n [min]=\"timePickerMin()\"\n [footer]=\"false\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [hourFormat]=\"hourFormat()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n }\n </div>\n <div [class]=\"footerClass()\">\n <button\n monaButton\n look=\"primary\"\n [disabled]=\"disabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onSetDateClick()\">\n {{ messages().set }}\n </button>\n <button\n monaButton\n look=\"default\"\n [disabled]=\"disabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onCancelClick()\">\n {{ messages().cancel }}\n </button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: CalendarComponent, selector: "mona-calendar", inputs: ["disabled", "disabledDates", "firstDay", "invalid", "maxDate", "minDate", "readonly", "rounded", "selection", "required", "touched", "class", "value", "weekNumber"], outputs: ["disabledChange", "touch", "valueChange"] }, { kind: "component", type: TimeSelectorComponent, selector: "mona-time-selector", inputs: ["aria-label", "disabled", "focusOnMount", "footer", "hourFormat", "hourStep", "invalid", "max", "min", "minuteStep", "readonly", "required", "rounded", "secondStep", "showSeconds", "size", "touched", "value"], outputs: ["touch", "valueChange"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["clearButton", "disabled", "inputAttributes", "inputClass", "inputStyle", "invalid", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "ng-template[monaTextBoxSuffixTemplate]" }, { kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "disabled", "look", "rounded", "selection", "size", "class"], outputs: ["buttonClick", "disabledChange", "selectionChange"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: CalendarDecadeCellTemplateDirective, selector: "ng-template[monaCalendarDecadeCellTemplate]" }, { kind: "directive", type: CalendarMonthCellTemplateDirective, selector: "ng-template[monaCalendarMonthCellTemplate]" }, { kind: "directive", type: CalendarYearCellTemplateDirective, selector: "ng-template[monaCalendarYearCellTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TextBoxPrefixTemplateDirective, selector: "ng-template[monaTextBoxPrefixTemplate]" }] }); }
643
+ ], queries: [{ propertyName: "decadeCellTemplate", first: true, predicate: CalendarDecadeCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "monthCellTemplate", first: true, predicate: CalendarMonthCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "prefixTemplate", first: true, predicate: DateInputPrefixTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "yearCellTemplate", first: true, predicate: CalendarYearCellTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "popupTemplate", first: true, predicate: ["datePopupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }], ngImport: i0, template: "<mona-text-box\n (inputBlur)=\"onDateInputBlur()\"\n (valueChange)=\"onDateStringEdit($event)\"\n [clearButton]=\"showClearButton()\"\n [disabled]=\"disabled()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalid()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly() || readonlyInput()\"\n [required]=\"required()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"touched()\"\n [value]=\"currentDateString()\">\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]=\"disabled() || readonly()\"\n [tabindex]=\"-1\">\n <i class=\"ri-calendar-line\"></i>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #datePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n class=\"flex h-68 flex-col\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().dateTimePicker\"\n cdkTrapFocus>\n <div [class]=\"headerClass()\">\n <mona-button-group\n selection=\"single\"\n [allowEmpty]=\"false\"\n class=\"w-full\"\n [disabled]=\"disabled()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n role=\"tablist\">\n <button monaButton [selected]=\"activeView() === 'date'\" (click)=\"activeView.set('date')\" role=\"tab\">\n {{ messages().date }}\n </button>\n <button monaButton [selected]=\"activeView() === 'time'\" (click)=\"activeView.set('time')\" role=\"tab\">\n {{ messages().time }}\n </button>\n </mona-button-group>\n </div>\n <div class=\"overflow-hidden\">\n @if (activeView() === \"date\") {\n <div class=\"flex h-full items-center justify-center\" [attr.aria-label]=\"messages().calendar\">\n <mona-calendar\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [firstDay]=\"firstDay()\"\n [weekNumber]=\"weekNumber()\"\n [value]=\"navigatedDate()\"\n [disabled]=\"disabled()\"\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 max-h-64 items-center justify-center\" [attr.aria-label]=\"messages().timePicker\">\n <mona-time-selector\n [value]=\"navigatedDate()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [max]=\"timePickerMax()\"\n [min]=\"timePickerMin()\"\n [footer]=\"false\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [hourFormat]=\"hourFormat()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n }\n </div>\n <div [class]=\"footerClass()\">\n <button\n monaButton\n look=\"primary\"\n [disabled]=\"disabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onSetDateClick()\">\n {{ messages().set }}\n </button>\n <button\n monaButton\n look=\"default\"\n [disabled]=\"disabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onCancelClick()\">\n {{ messages().cancel }}\n </button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: CalendarComponent, selector: "mona-calendar", inputs: ["disabled", "disabledDates", "firstDay", "invalid", "maxDate", "minDate", "readonly", "required", "rounded", "selection", "touched", "class", "value", "weekNumber"], outputs: ["disabledChange", "touch", "valueChange"] }, { kind: "component", type: TimeSelectorComponent, selector: "mona-time-selector", inputs: ["aria-label", "disabled", "focusOnMount", "footer", "hourFormat", "hourStep", "invalid", "max", "min", "minuteStep", "readonly", "required", "rounded", "secondStep", "showSeconds", "size", "touched", "value"], outputs: ["touch", "valueChange"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["clearButton", "disabled", "inputAttributes", "inputClass", "inputStyle", "invalid", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "ng-template[monaTextBoxSuffixTemplate]" }, { kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "disabled", "look", "rounded", "selection", "size", "class"], outputs: ["buttonClick", "disabledChange", "selectionChange"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: CalendarDecadeCellTemplateDirective, selector: "ng-template[monaCalendarDecadeCellTemplate]" }, { kind: "directive", type: CalendarMonthCellTemplateDirective, selector: "ng-template[monaCalendarMonthCellTemplate]" }, { kind: "directive", type: CalendarYearCellTemplateDirective, selector: "ng-template[monaCalendarYearCellTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TextBoxPrefixTemplateDirective, selector: "ng-template[monaTextBoxPrefixTemplate]" }] }); }
634
644
  }
635
645
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DateTimePickerComponent, decorators: [{
636
646
  type: Component,
@@ -2,7 +2,7 @@ import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { ImmutableDictionary } from '@mirei/ts-collections';
5
- import { c as GridService } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs';
5
+ import { c as GridService } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CyzJFQIy.mjs';
6
6
 
7
7
  class GridFooterCellComponent {
8
8
  constructor() {
@@ -102,4 +102,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
102
102
  }], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], columnIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnIndex", required: true }] }], groupKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupKey", required: false }] }] } });
103
103
 
104
104
  export { GridFooterCellComponent };
105
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-cell.component-Bg7rckst.mjs.map
105
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-cell.component-BuybF7tX.mjs.map
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { computed, input, Directive } from '@angular/core';
3
- import { z as gridFooterTableCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs';
3
+ import { z as gridFooterTableCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CyzJFQIy.mjs';
4
4
 
5
5
  class GridFooterTableCellDirective {
6
6
  constructor() {
@@ -35,4 +35,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
35
35
  }], propDecorators: { footerCellMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerCellMinWidth", required: false }] }], footerCellWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerCellWidth", required: false }] }], footerColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerColumn", required: false }] }] } });
36
36
 
37
37
  export { GridFooterTableCellDirective };
38
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BSSpaCLL.mjs.map
38
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Dj-SaNzk.mjs.map
@@ -7,10 +7,10 @@ import { ImmutableList, span } from '@mirei/ts-collections';
7
7
  import { SlicePipe } from '@nanahoshi/mona-ui/common';
8
8
  import { ContextMenuComponent } from '@nanahoshi/mona-ui/contextmenu';
9
9
  import { fromEvent } from 'rxjs';
10
- import { G as GridAddRowComponent, a as GridCellComponent, b as GridRowDirective, c as GridCellDirective, d as GridDetailRowDirective, e as GridDetailIndentCellDirective, f as GridDetailContentCellDirective, g as GridToggleComponent, h as GridSelectionCheckboxComponent, i as GridRowReorderHandleComponent } from './nanahoshi-mona-ui-grid-grid-toggle.component-Byb9iTes.mjs';
11
- import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BSSpaCLL.mjs';
12
- import { G as GridNavigationService, a as GridRowFlattenerService, g as gridListBaseThemeVariants, b as gridFooterTableRowThemeVariants, c as GridService, d as gridGroupRowThemeVariants, e as gridRowDragPlaceholderThemeVariants, f as gridRowDragPreviewThemeVariants, h as gridListTableThemeVariants, i as GridLogicalCellDirective, j as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs';
13
- import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-Bg7rckst.mjs';
10
+ import { G as GridAddRowComponent, a as GridCellComponent, b as GridRowDirective, c as GridCellDirective, d as GridDetailRowDirective, e as GridDetailIndentCellDirective, f as GridDetailContentCellDirective, g as GridToggleComponent, h as GridSelectionCheckboxComponent, i as GridRowReorderHandleComponent } from './nanahoshi-mona-ui-grid-grid-toggle.component-B_Gm--X6.mjs';
11
+ import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Dj-SaNzk.mjs';
12
+ import { G as GridNavigationService, a as GridRowFlattenerService, g as gridListBaseThemeVariants, b as gridFooterTableRowThemeVariants, c as GridService, d as gridGroupRowThemeVariants, e as gridRowDragPlaceholderThemeVariants, f as gridRowDragPreviewThemeVariants, h as gridListTableThemeVariants, i as GridLogicalCellDirective, j as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CyzJFQIy.mjs';
13
+ import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-BuybF7tX.mjs';
14
14
 
15
15
  class GridListComponent {
16
16
  #destroyRef;
@@ -142,4 +142,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
142
142
  }], ctorParameters: () => [], propDecorators: { bodyTableElementRef: [{ type: i0.ViewChild, args: ["bodyTable", { isSignal: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
143
143
 
144
144
  export { GridListComponent };
145
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-D9AwQFDV.mjs.map
145
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-CYAm4l84.mjs.map
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { computed, input, Directive, inject, Component, signal, ElementRef, viewChild, output, effect, untracked, afterNextRender, ChangeDetectionStrategy, Injector, LOCALE_ID, model } from '@angular/core';
3
- import { m as gridListTableCellThemeVariants, n as gridDetailContentCellThemeVariants, o as gridDetailIndentCellThemeVariants, p as gridDetailRowThemeVariants, c as GridService, q as gridListTableRowThemeVariants, r as gridCellEditorBaseThemeVariants, s as gridCellEditorInputThemeVariants, j as GridLockedCellDirective, i as GridLogicalCellDirective, G as GridNavigationService, t as gridCellBaseThemeVariants, u as gridCellContainerThemeVariants, v as gridCellDirtyIndicatorThemeVariants, w as gridCellTextThemeVariants, x as gridRowReorderHandleThemeVariants, y as gridSelectionCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs';
3
+ import { m as gridListTableCellThemeVariants, n as gridDetailContentCellThemeVariants, o as gridDetailIndentCellThemeVariants, p as gridDetailRowThemeVariants, c as GridService, q as gridListTableRowThemeVariants, r as gridCellEditorBaseThemeVariants, s as gridCellEditorInputThemeVariants, j as GridLockedCellDirective, i as GridLogicalCellDirective, G as GridNavigationService, t as gridCellBaseThemeVariants, u as gridCellContainerThemeVariants, v as gridCellDirtyIndicatorThemeVariants, w as gridCellTextThemeVariants, x as gridRowReorderHandleThemeVariants, y as gridSelectionCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CyzJFQIy.mjs';
4
4
  import { ImmutableList } from '@mirei/ts-collections';
5
5
  import * as i1 from '@angular/cdk/a11y';
6
6
  import { A11yModule, LiveAnnouncer } from '@angular/cdk/a11y';
@@ -767,15 +767,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
767
767
  }, template: "@let dataItem = row().data;\n@let dataKey = column().field;\n\n@if (column().kind === \"command\") {\n <mona-grid-command-cell [column]=\"column()\" [row]=\"row()\"></mona-grid-command-cell>\n} @else {\n <div\n role=\"gridcell\"\n [class]=\"cellContainerClass()\"\n cdkMonitorSubtreeFocus\n [attr.data-uid]=\"cellUid()\"\n [attr.data-ruid]=\"row().uid\"\n [attr.data-field]=\"dataKey\"\n [attr.data-col-index]=\"column().index\"\n [attr.aria-readonly]=\"!(gridService.editableOptions().enabled && column().editable)\"\n (dblclick)=\"onCellDoubleClick($event)\">\n @if (isEditing() && gridService.editSession(); as session) {\n <mona-grid-editor\n [column]=\"column()\"\n [autoFocus]=\"shouldAutoFocusEditor()\"\n [session]=\"session\"\n [tabNavigationEnabled]=\"editContextIsCellMode()\"\n (commit)=\"onEditCommit()\"\n (cancel)=\"onEditCancel()\"\n (tabNavigate)=\"onEditTabNavigate($event)\"></mona-grid-editor>\n } @else if (column().cellTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().cellTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem, column: column().field }\"></ng-container>\n } @else {\n <span [class]=\"cellTextClass()\">{{ formattedDisplayValue() }}</span>\n }\n @if (!isCellPristine()) {\n <span aria-hidden=\"true\" [class]=\"cellDirtyIndicatorClass()\" [title]=\"gridService.messages().modified\"></span>\n }\n </div>\n}\n" }]
768
768
  }], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], row: [{ type: i0.Input, args: [{ isSignal: true, alias: "row", required: true }] }] } });
769
769
 
770
- const ROW_REORDER_DISABLED_REASON_TEXT = {
771
- disabled: "Row reordering is disabled.",
772
- editing: "Finish editing to reorder rows.",
773
- filtered: "Clear filters to reorder rows.",
774
- grouped: "Clear grouping to reorder rows.",
775
- "single-row": "At least two rows are needed to reorder.",
776
- sorted: "Clear sorting to reorder rows.",
777
- "virtual-scroll": "Row reordering isn't available while virtual scrolling is enabled."
778
- };
779
770
  class GridRowReorderHandleComponent {
780
771
  constructor() {
781
772
  this.#gridService = inject(GridService);
@@ -784,15 +775,33 @@ class GridRowReorderHandleComponent {
784
775
  const absoluteIndex = this.pageIndex() + this.#gridService.paginationState().skip;
785
776
  const label = this.#gridService.getRowReorderAriaLabel(this.row(), absoluteIndex);
786
777
  const reasonText = this.disabledReasonText();
787
- const suffix = reasonText == null ? "" : ` ${reasonText}`;
788
- return `${label}. ${this.#gridService.messages().rowReorderKeyboardHint}${suffix}`;
778
+ const messages = this.#gridService.messages();
779
+ return messages.rowReorderHandleAriaLabel(label, messages.rowReorderKeyboardHint, reasonText ?? undefined);
789
780
  }, /* @ts-ignore */
790
781
  ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
791
782
  this.disabled = computed(() => !this.#gridService.canReorderRow(this.row()), /* @ts-ignore */
792
783
  ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
793
784
  this.disabledReasonText = computed(() => {
794
785
  const reason = this.#gridService.rowReorderDisabledReason();
795
- return reason == null ? null : ROW_REORDER_DISABLED_REASON_TEXT[reason];
786
+ const messages = this.#gridService.messages();
787
+ switch (reason) {
788
+ case null:
789
+ return null;
790
+ case "disabled":
791
+ return messages.rowReorderDisabled;
792
+ case "editing":
793
+ return messages.rowReorderDisabledEditing;
794
+ case "filtered":
795
+ return messages.rowReorderDisabledFiltered;
796
+ case "grouped":
797
+ return messages.rowReorderDisabledGrouped;
798
+ case "single-row":
799
+ return messages.rowReorderDisabledSingleRow;
800
+ case "sorted":
801
+ return messages.rowReorderDisabledSorted;
802
+ case "virtual-scroll":
803
+ return messages.rowReorderDisabledVirtualScroll;
804
+ }
796
805
  }, /* @ts-ignore */
797
806
  ...(ngDevMode ? [{ debugName: "disabledReasonText" }] : /* istanbul ignore next */ []));
798
807
  this.handleClass = computed(() => gridRowReorderHandleThemeVariants(), /* @ts-ignore */
@@ -824,15 +833,17 @@ class GridRowReorderHandleComponent {
824
833
  const moved = this.#gridService.requestRowReorder(this.row(), this.pageIndex(), targetIndex);
825
834
  if (moved) {
826
835
  const skip = this.#gridService.paginationState().skip;
827
- this.#liveAnnouncer.announce(`Moved row ${skip + this.pageIndex() + 1} to position ${skip + targetIndex + 1}.`);
836
+ const fromRowNumber = skip + this.pageIndex() + 1;
837
+ const toPosition = skip + targetIndex + 1;
838
+ this.#liveAnnouncer.announce(this.#gridService.messages().rowReorderMoved(fromRowNumber, toPosition));
828
839
  }
829
840
  }
830
841
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridRowReorderHandleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
831
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: GridRowReorderHandleComponent, isStandalone: true, selector: "mona-grid-row-reorder-handle", inputs: { pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: true, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "$event.stopPropagation()", "contextmenu": "$event.stopPropagation()", "dblclick": "$event.stopPropagation()" } }, ngImport: i0, template: "<button\n type=\"button\"\n cdkDragHandle\n [class]=\"handleClass()\"\n [disabled]=\"disabled()\"\n [attr.title]=\"disabledReasonText()\"\n [attr.aria-label]=\"ariaLabel()\"\n aria-keyshortcuts=\"Alt+ArrowUp Alt+ArrowDown\"\n (keydown)=\"onKeydown($event)\">\n <i aria-hidden=\"true\" class=\"ri-draggable\"></i>\n</button>\n", dependencies: [{ kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
842
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: GridRowReorderHandleComponent, isStandalone: true, selector: "mona-grid-row-reorder-handle", inputs: { pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: true, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "$event.stopPropagation()", "contextmenu": "$event.stopPropagation()", "dblclick": "$event.stopPropagation()" } }, ngImport: i0, template: "<button\n type=\"button\"\n cdkDragHandle\n [class]=\"handleClass()\"\n [disabled]=\"disabled()\"\n [attr.title]=\"disabledReasonText()\"\n [attr.aria-label]=\"ariaLabel()\"\n aria-keyshortcuts=\"Alt+ArrowUp Alt+ArrowDown\"\n (keydown)=\"onKeydown($event)\">\n <i aria-hidden=\"true\" class=\"ri-draggable\"></i>\n</button>\n", dependencies: [{ kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }] }); }
832
843
  }
833
844
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridRowReorderHandleComponent, decorators: [{
834
845
  type: Component,
835
- args: [{ selector: "mona-grid-row-reorder-handle", imports: [CdkDragHandle], changeDetection: ChangeDetectionStrategy.OnPush, host: {
846
+ args: [{ selector: "mona-grid-row-reorder-handle", imports: [CdkDragHandle], host: {
836
847
  "(click)": "$event.stopPropagation()",
837
848
  "(contextmenu)": "$event.stopPropagation()",
838
849
  "(dblclick)": "$event.stopPropagation()"
@@ -912,4 +923,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
912
923
  }], propDecorators: { expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: true }] }, { type: i0.Output, args: ["expandedChange"] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: true }] }] } });
913
924
 
914
925
  export { GridAddRowComponent as G, GridCellComponent as a, GridRowDirective as b, GridCellDirective as c, GridDetailRowDirective as d, GridDetailIndentCellDirective as e, GridDetailContentCellDirective as f, GridToggleComponent as g, GridSelectionCheckboxComponent as h, GridRowReorderHandleComponent as i };
915
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-toggle.component-Byb9iTes.mjs.map
926
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-toggle.component-B_Gm--X6.mjs.map
@@ -8,10 +8,10 @@ import { SlicePipe } from '@nanahoshi/mona-ui/common';
8
8
  import { ContextMenuComponent } from '@nanahoshi/mona-ui/contextmenu';
9
9
  import { rxTimeout } from '@nanahoshi/mona-ui/internal';
10
10
  import { fromEvent } from 'rxjs';
11
- import { G as GridAddRowComponent, a as GridCellComponent, b as GridRowDirective, c as GridCellDirective, d as GridDetailRowDirective, e as GridDetailIndentCellDirective, f as GridDetailContentCellDirective, g as GridToggleComponent, h as GridSelectionCheckboxComponent, i as GridRowReorderHandleComponent } from './nanahoshi-mona-ui-grid-grid-toggle.component-Byb9iTes.mjs';
12
- import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BSSpaCLL.mjs';
13
- import { G as GridNavigationService, c as GridService, a as GridRowFlattenerService, g as gridListBaseThemeVariants, k as gridFooterThemeVariants, l as gridFooterTableThemeVariants, b as gridFooterTableRowThemeVariants, d as gridGroupRowThemeVariants, h as gridListTableThemeVariants, i as GridLogicalCellDirective, j as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs';
14
- import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-Bg7rckst.mjs';
11
+ import { G as GridAddRowComponent, a as GridCellComponent, b as GridRowDirective, c as GridCellDirective, d as GridDetailRowDirective, e as GridDetailIndentCellDirective, f as GridDetailContentCellDirective, g as GridToggleComponent, h as GridSelectionCheckboxComponent, i as GridRowReorderHandleComponent } from './nanahoshi-mona-ui-grid-grid-toggle.component-B_Gm--X6.mjs';
12
+ import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Dj-SaNzk.mjs';
13
+ import { G as GridNavigationService, c as GridService, a as GridRowFlattenerService, g as gridListBaseThemeVariants, k as gridFooterThemeVariants, l as gridFooterTableThemeVariants, b as gridFooterTableRowThemeVariants, d as gridGroupRowThemeVariants, h as gridListTableThemeVariants, i as GridLogicalCellDirective, j as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CyzJFQIy.mjs';
14
+ import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-BuybF7tX.mjs';
15
15
 
16
16
  class GridVirtualListComponent {
17
17
  #destroyRef;
@@ -230,4 +230,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
230
230
  }], ctorParameters: () => [], propDecorators: { addRowScrollElementRef: [{ type: i0.ViewChild, args: ["addRowScrollElement", { isSignal: true }] }], bodyTableElementRef: [{ type: i0.ViewChild, args: ["bodyTable", { isSignal: true }] }], footerScrollElementRef: [{ type: i0.ViewChild, args: ["footerScrollElement", { isSignal: true }] }], viewport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
231
231
 
232
232
  export { GridVirtualListComponent };
233
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-virtual-list.component-CBmdtrXm.mjs.map
233
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-virtual-list.component-X0X487Rm.mjs.map