@nanahoshi/mona-ui 0.18.6 → 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 (116) hide show
  1. package/README.md +71 -13
  2. package/THIRD_PARTY_NOTICES.md +60 -0
  3. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -3
  4. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +17 -9
  5. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +16 -7
  6. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +196 -101
  7. package/fesm2022/nanahoshi-mona-ui-card.mjs +22 -14
  8. package/fesm2022/nanahoshi-mona-ui-chart.mjs +78 -18
  9. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +1 -1
  10. package/fesm2022/nanahoshi-mona-ui-chip.mjs +11 -3
  11. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +1 -2
  12. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +23 -5
  13. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +49 -28
  14. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +42 -26
  15. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +11 -3
  16. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +39 -21
  17. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +88 -55
  18. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +57 -25
  19. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +13 -5
  20. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +17 -6
  21. package/fesm2022/nanahoshi-mona-ui-editor.mjs +178 -59
  22. package/fesm2022/nanahoshi-mona-ui-filter.mjs +137 -54
  23. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-WEDbZ5vy.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-BuybF7tX.mjs} +2 -2
  24. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-ibH5osCg.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Dj-SaNzk.mjs} +2 -2
  25. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-CYAm4l84.mjs +145 -0
  26. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-hc-LeIb0.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-B_Gm--X6.mjs} +46 -31
  27. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DYajpOb9.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-X0X487Rm.mjs} +5 -5
  28. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-Pm8Fbp6M.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CyzJFQIy.mjs} +99 -42
  29. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  30. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4874 -0
  31. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +12 -4
  32. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -21
  33. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +33 -18
  34. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +10 -10
  35. package/fesm2022/nanahoshi-mona-ui-list.mjs +2 -0
  36. package/fesm2022/nanahoshi-mona-ui-locales.mjs +4973 -0
  37. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +29 -16
  38. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +12 -3
  39. package/fesm2022/nanahoshi-mona-ui-notification.mjs +23 -18
  40. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +211 -106
  41. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +14 -6
  42. package/fesm2022/nanahoshi-mona-ui-pager.mjs +66 -29
  43. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +57 -46
  44. package/fesm2022/nanahoshi-mona-ui-popup.mjs +35 -15
  45. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +38 -17
  46. package/fesm2022/nanahoshi-mona-ui-rating.mjs +25 -7
  47. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +431 -101
  48. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +1 -1
  49. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +26 -8
  50. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +222 -28
  51. package/fesm2022/nanahoshi-mona-ui-slider.mjs +91 -36
  52. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +34 -15
  53. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +39 -23
  54. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +50 -25
  55. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +41 -14
  56. package/fesm2022/nanahoshi-mona-ui-switch.mjs +9 -9
  57. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +74 -56
  58. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +16 -8
  59. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +47 -24
  60. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +66 -27
  61. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +23 -15
  62. package/fesm2022/nanahoshi-mona-ui-window.mjs +71 -40
  63. package/i18n/package.json +4 -0
  64. package/locales/package.json +4 -0
  65. package/package.json +9 -1
  66. package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -1
  67. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +9 -3
  68. package/types/nanahoshi-mona-ui-button-group.d.ts +9 -3
  69. package/types/nanahoshi-mona-ui-calendar.d.ts +29 -15
  70. package/types/nanahoshi-mona-ui-card.d.ts +8 -2
  71. package/types/nanahoshi-mona-ui-chart.d.ts +10 -1
  72. package/types/nanahoshi-mona-ui-chip.d.ts +7 -1
  73. package/types/nanahoshi-mona-ui-color-gradient.d.ts +6 -1
  74. package/types/nanahoshi-mona-ui-color-palette.d.ts +21 -10
  75. package/types/nanahoshi-mona-ui-color-picker.d.ts +30 -20
  76. package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -1
  77. package/types/nanahoshi-mona-ui-date-picker.d.ts +14 -6
  78. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +40 -12
  79. package/types/nanahoshi-mona-ui-dialog.d.ts +16 -7
  80. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -1
  81. package/types/nanahoshi-mona-ui-dropdowns.d.ts +4 -1
  82. package/types/nanahoshi-mona-ui-editor.d.ts +6 -1
  83. package/types/nanahoshi-mona-ui-filter.d.ts +16 -10
  84. package/types/nanahoshi-mona-ui-grid.d.ts +50 -2
  85. package/types/nanahoshi-mona-ui-i18n.d.ts +680 -0
  86. package/types/nanahoshi-mona-ui-internal-list.d.ts +7 -2
  87. package/types/nanahoshi-mona-ui-internal-tree.d.ts +7 -3
  88. package/types/nanahoshi-mona-ui-list-box.d.ts +9 -4
  89. package/types/nanahoshi-mona-ui-list-view.d.ts +6 -6
  90. package/types/nanahoshi-mona-ui-list.d.ts +1 -1
  91. package/types/nanahoshi-mona-ui-locales.d.ts +4889 -0
  92. package/types/nanahoshi-mona-ui-menubar.d.ts +59 -58
  93. package/types/nanahoshi-mona-ui-multi-select.d.ts +6 -1
  94. package/types/nanahoshi-mona-ui-notification.d.ts +11 -5
  95. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +24 -15
  96. package/types/nanahoshi-mona-ui-otp-input.d.ts +9 -3
  97. package/types/nanahoshi-mona-ui-pager.d.ts +20 -6
  98. package/types/nanahoshi-mona-ui-popup.d.ts +2 -1
  99. package/types/nanahoshi-mona-ui-progress-bar.d.ts +9 -7
  100. package/types/nanahoshi-mona-ui-rating.d.ts +19 -12
  101. package/types/nanahoshi-mona-ui-scroll-view.d.ts +34 -28
  102. package/types/nanahoshi-mona-ui-sheet.d.ts +8 -2
  103. package/types/nanahoshi-mona-ui-sidebar.d.ts +3 -0
  104. package/types/nanahoshi-mona-ui-slider.d.ts +44 -26
  105. package/types/nanahoshi-mona-ui-spinner.d.ts +13 -4
  106. package/types/nanahoshi-mona-ui-split-button.d.ts +62 -56
  107. package/types/nanahoshi-mona-ui-splitter.d.ts +9 -6
  108. package/types/nanahoshi-mona-ui-stepper.d.ts +10 -3
  109. package/types/nanahoshi-mona-ui-switch.d.ts +1 -1
  110. package/types/nanahoshi-mona-ui-tabs.d.ts +96 -35
  111. package/types/nanahoshi-mona-ui-text-box.d.ts +11 -5
  112. package/types/nanahoshi-mona-ui-time-picker.d.ts +11 -4
  113. package/types/nanahoshi-mona-ui-time-selector.d.ts +16 -5
  114. package/types/nanahoshi-mona-ui-tree-view.d.ts +15 -10
  115. package/types/nanahoshi-mona-ui-window.d.ts +26 -20
  116. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ZM3CneJ0.mjs +0 -145
@@ -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-Pm8Fbp6M.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';
@@ -212,6 +212,8 @@ class GridCommandCellComponent {
212
212
  return this.newRow() || (row != null && context?.mode === "row" && context.rowUid === row.uid);
213
213
  }, /* @ts-ignore */
214
214
  ...(ngDevMode ? [{ debugName: "isEditing" }] : /* istanbul ignore next */ []));
215
+ this.messages = computed(() => this.gridService.messages(), /* @ts-ignore */
216
+ ...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
215
217
  this.rowErrorMessages = computed(() => {
216
218
  if (!this.isEditing()) {
217
219
  return [];
@@ -227,7 +229,7 @@ class GridCommandCellComponent {
227
229
  .filter((message) => !!message);
228
230
  }, /* @ts-ignore */
229
231
  ...(ngDevMode ? [{ debugName: "rowErrorMessages" }] : /* istanbul ignore next */ []));
230
- this.rowErrorTooltip = computed(() => this.rowErrorMessages().join("\n") || "This row has validation errors.", /* @ts-ignore */
232
+ this.rowErrorTooltip = computed(() => this.rowErrorMessages().join("\n") || this.messages().rowValidationError, /* @ts-ignore */
231
233
  ...(ngDevMode ? [{ debugName: "rowErrorTooltip" }] : /* istanbul ignore next */ []));
232
234
  this.column = input.required(/* @ts-ignore */
233
235
  ...(ngDevMode ? [{ debugName: "column" }] : /* istanbul ignore next */ []));
@@ -267,18 +269,18 @@ class GridCommandCellComponent {
267
269
  }
268
270
  const dialogRef = this.#dialogService.show({
269
271
  actions: [
270
- { look: "error", text: "Delete" },
271
- { look: "default", text: "Cancel" }
272
+ { look: "error", text: this.messages().delete },
273
+ { look: "default", text: this.messages().cancel }
272
274
  ],
273
275
  closeOnEscape: true,
274
- text: "Are you sure you want to delete this item?",
275
- title: "Delete row?",
276
+ text: this.messages().deleteRowConfirmation,
277
+ title: this.messages().deleteRowTitle,
276
278
  type: "warning",
277
279
  modal: true,
278
280
  width: 360
279
281
  });
280
282
  dialogRef.result.pipe(take(1)).subscribe(result => {
281
- if (!result.viaClose && result.action.text === "Delete") {
283
+ if (!result.viaClose && result.action.text === this.messages().delete) {
282
284
  this.gridService.removeRow(row, event);
283
285
  }
284
286
  dialogRef.close();
@@ -293,7 +295,7 @@ class GridCommandCellComponent {
293
295
  this.gridService.commitRowEdit(event);
294
296
  }
295
297
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCommandCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
296
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridCommandCellComponent, isStandalone: true, selector: "mona-grid-command-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, newRow: { classPropertyName: "newRow", publicName: "newRow", isSignal: true, isRequired: false, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "w-full" }, ngImport: i0, template: "@if (column().commandTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().commandTemplate\"\n [ngTemplateOutletContext]=\"commandContext()\"></ng-container>\n} @else {\n <div class=\"flex h-full items-center gap-1 px-1\">\n @if (isEditing()) {\n @if (hasRowError()) {\n <span class=\"shrink-0 px-1 text-error\" #rowErrorIcon>\n <svg lucideOctagonAlert [size]=\"14\"></svg>\n </span>\n <mona-tooltip [target]=\"rowErrorIcon\">\n <span class=\"p-1 whitespace-pre-line\">{{ rowErrorTooltip() }}</span>\n </mona-tooltip>\n }\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n aria-label=\"Save row\"\n title=\"Save\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"save($event)\">\n <svg lucideCheck [size]=\"14\"></svg>\n </button>\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n aria-label=\"Cancel row edit\"\n title=\"Cancel\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"cancel($event)\">\n <svg lucideX [size]=\"14\"></svg>\n </button>\n } @else {\n @if (canEditRows()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n aria-label=\"Edit row\"\n title=\"Edit\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"edit($event)\">\n <svg lucidePencil [size]=\"14\"></svg>\n </button>\n }\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n aria-label=\"Remove row\"\n title=\"Remove\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"remove($event)\">\n <svg lucideTrash2 [size]=\"14\"></svg>\n </button>\n }\n </div>\n}\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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideCheck, selector: "svg[lucideCheck]" }, { kind: "component", type: LucideOctagonAlert, selector: "svg[lucideOctagonAlert], svg[lucideAlertOctagon]" }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "component", type: LucidePencil, selector: "svg[lucidePencil]" }, { kind: "component", type: LucideTrash2, selector: "svg[lucideTrash2]" }, { kind: "component", type: TooltipComponent, selector: "mona-tooltip", inputs: ["disabled", "hideDelay", "position", "rounded", "showDelay", "target"], outputs: ["hidden", "shown"] }] }); }
298
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridCommandCellComponent, isStandalone: true, selector: "mona-grid-command-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, newRow: { classPropertyName: "newRow", publicName: "newRow", isSignal: true, isRequired: false, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "w-full" }, ngImport: i0, template: "@if (column().commandTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().commandTemplate\"\n [ngTemplateOutletContext]=\"commandContext()\"></ng-container>\n} @else {\n <div class=\"flex h-full items-center gap-1 px-1\">\n @if (isEditing()) {\n @if (hasRowError()) {\n <span class=\"shrink-0 px-1 text-error\" #rowErrorIcon>\n <svg lucideOctagonAlert [size]=\"14\"></svg>\n </span>\n <mona-tooltip [target]=\"rowErrorIcon\">\n <span class=\"p-1 whitespace-pre-line\">{{ rowErrorTooltip() }}</span>\n </mona-tooltip>\n }\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().saveRow\"\n [attr.title]=\"messages().save\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"save($event)\">\n <svg lucideCheck [size]=\"14\"></svg>\n </button>\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().cancelRowEdit\"\n [attr.title]=\"messages().cancel\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"cancel($event)\">\n <svg lucideX [size]=\"14\"></svg>\n </button>\n } @else {\n @if (canEditRows()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().editRow\"\n [attr.title]=\"messages().edit\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"edit($event)\">\n <svg lucidePencil [size]=\"14\"></svg>\n </button>\n }\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().removeRow\"\n [attr.title]=\"messages().remove\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"remove($event)\">\n <svg lucideTrash2 [size]=\"14\"></svg>\n </button>\n }\n </div>\n}\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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideCheck, selector: "svg[lucideCheck]" }, { kind: "component", type: LucideOctagonAlert, selector: "svg[lucideOctagonAlert], svg[lucideAlertOctagon]" }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "component", type: LucidePencil, selector: "svg[lucidePencil]" }, { kind: "component", type: LucideTrash2, selector: "svg[lucideTrash2]" }, { kind: "component", type: TooltipComponent, selector: "mona-tooltip", inputs: ["disabled", "hideDelay", "position", "rounded", "showDelay", "target"], outputs: ["hidden", "shown"] }] }); }
297
299
  }
298
300
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCommandCellComponent, decorators: [{
299
301
  type: Component,
@@ -308,18 +310,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
308
310
  TooltipComponent
309
311
  ], host: {
310
312
  class: "w-full"
311
- }, template: "@if (column().commandTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().commandTemplate\"\n [ngTemplateOutletContext]=\"commandContext()\"></ng-container>\n} @else {\n <div class=\"flex h-full items-center gap-1 px-1\">\n @if (isEditing()) {\n @if (hasRowError()) {\n <span class=\"shrink-0 px-1 text-error\" #rowErrorIcon>\n <svg lucideOctagonAlert [size]=\"14\"></svg>\n </span>\n <mona-tooltip [target]=\"rowErrorIcon\">\n <span class=\"p-1 whitespace-pre-line\">{{ rowErrorTooltip() }}</span>\n </mona-tooltip>\n }\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n aria-label=\"Save row\"\n title=\"Save\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"save($event)\">\n <svg lucideCheck [size]=\"14\"></svg>\n </button>\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n aria-label=\"Cancel row edit\"\n title=\"Cancel\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"cancel($event)\">\n <svg lucideX [size]=\"14\"></svg>\n </button>\n } @else {\n @if (canEditRows()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n aria-label=\"Edit row\"\n title=\"Edit\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"edit($event)\">\n <svg lucidePencil [size]=\"14\"></svg>\n </button>\n }\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n aria-label=\"Remove row\"\n title=\"Remove\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"remove($event)\">\n <svg lucideTrash2 [size]=\"14\"></svg>\n </button>\n }\n </div>\n}\n" }]
313
+ }, template: "@if (column().commandTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().commandTemplate\"\n [ngTemplateOutletContext]=\"commandContext()\"></ng-container>\n} @else {\n <div class=\"flex h-full items-center gap-1 px-1\">\n @if (isEditing()) {\n @if (hasRowError()) {\n <span class=\"shrink-0 px-1 text-error\" #rowErrorIcon>\n <svg lucideOctagonAlert [size]=\"14\"></svg>\n </span>\n <mona-tooltip [target]=\"rowErrorIcon\">\n <span class=\"p-1 whitespace-pre-line\">{{ rowErrorTooltip() }}</span>\n </mona-tooltip>\n }\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().saveRow\"\n [attr.title]=\"messages().save\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"save($event)\">\n <svg lucideCheck [size]=\"14\"></svg>\n </button>\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().cancelRowEdit\"\n [attr.title]=\"messages().cancel\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"cancel($event)\">\n <svg lucideX [size]=\"14\"></svg>\n </button>\n } @else {\n @if (canEditRows()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().editRow\"\n [attr.title]=\"messages().edit\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"edit($event)\">\n <svg lucidePencil [size]=\"14\"></svg>\n </button>\n }\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().removeRow\"\n [attr.title]=\"messages().remove\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"remove($event)\">\n <svg lucideTrash2 [size]=\"14\"></svg>\n </button>\n }\n </div>\n}\n" }]
312
314
  }], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], newRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "newRow", required: false }] }], row: [{ type: i0.Input, args: [{ isSignal: true, alias: "row", required: false }] }] } });
313
315
 
314
316
  const FOCUSABLE_TARGET_SELECTOR$1 = "button, input, select, textarea, a[href], [tabindex]";
315
317
  class GridEditorComponent {
316
318
  #datePopupOpen;
317
319
  #elementRef;
320
+ #gridService;
318
321
  #ignoreNextBooleanFocusOut;
319
322
  constructor() {
320
323
  this.#datePopupOpen = signal(false, /* @ts-ignore */
321
324
  ...(ngDevMode ? [{ debugName: "#datePopupOpen" }] : /* istanbul ignore next */ []));
322
325
  this.#elementRef = inject((ElementRef));
326
+ this.#gridService = inject(GridService, { optional: true });
323
327
  this.#ignoreNextBooleanFocusOut = false;
324
328
  this.numericTextBoxRef = viewChild(NumericTextBoxComponent, /* @ts-ignore */
325
329
  ...(ngDevMode ? [{ debugName: "numericTextBoxRef" }] : /* istanbul ignore next */ []));
@@ -352,7 +356,7 @@ class GridEditorComponent {
352
356
  ...(ngDevMode ? [{ debugName: "editorInputClass" }] : /* istanbul ignore next */ []));
353
357
  this.fieldErrorMessage = computed(() => {
354
358
  const [firstError] = this.formField()().errors();
355
- return firstError?.message ?? "Invalid value.";
359
+ return firstError?.message ?? this.#gridService?.messages().fieldValidationError ?? "";
356
360
  }, /* @ts-ignore */
357
361
  ...(ngDevMode ? [{ debugName: "fieldErrorMessage" }] : /* istanbul ignore next */ []));
358
362
  this.formField = computed(() => {
@@ -506,7 +510,7 @@ class GridEditorComponent {
506
510
  this.formField()().value.set(value);
507
511
  }
508
512
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
509
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridEditorComponent, isStandalone: true, selector: "mona-grid-editor", inputs: { autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, isNew: { classPropertyName: "isNew", publicName: "isNew", isSignal: true, isRequired: false, transformFunction: null }, session: { classPropertyName: "session", publicName: "session", isSignal: true, isRequired: true, transformFunction: null }, tabNavigationEnabled: { classPropertyName: "tabNavigationEnabled", publicName: "tabNavigationEnabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cancel: "cancel", commit: "commit", tabNavigate: "tabNavigate" }, host: { listeners: { "keydown": "onHostKeydown($event)" }, properties: { "class": "baseClass()" } }, viewQueries: [{ propertyName: "numericTextBoxRef", first: true, predicate: NumericTextBoxComponent, descendants: true, isSignal: true }, { propertyName: "textBoxRef", first: true, predicate: TextBoxComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (column().editTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().editTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: editTemplateContext() }\"></ng-container>\n} @else {\n <div class=\"relative flex items-center w-full h-full\">\n @switch (column().dataType) {\n @case (\"string\") {\n <mona-text-box\n [class]=\"editorInputClass()\"\n [inputAttributes]=\"{ autocomplete: 'off' }\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"commit.emit()\"\n (keydown.escape)=\"onEditCancel()\"\n (inputBlur)=\"commit.emit()\"\n [size]=\"'small'\"></mona-text-box>\n }\n @case (\"number\") {\n <mona-numeric-text-box\n [class]=\"editorInputClass()\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"commit.emit()\"\n (keydown.escape)=\"onEditCancel()\"\n (inputBlur)=\"commit.emit()\"\n [size]=\"'small'\"></mona-numeric-text-box>\n }\n @case (\"boolean\") {\n <mona-check-box\n class=\"{{ editorInputClass() }} ml-2\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (click)=\"onBooleanEditorClick()\"\n (focusout)=\"onBooleanEditorFocusOut($event)\"\n (pointerdown)=\"onBooleanEditorPointerDown()\"\n (keydown.escape)=\"onEditCancel()\"\n (keydown.enter)=\"commit.emit()\"></mona-check-box>\n }\n @case (\"date\") {\n <mona-date-picker\n [class]=\"editorInputClass()\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"onDatePickerEnter($event)\"\n (keydown.escape)=\"onEditCancel()\"\n (focusout)=\"onDatePickerFocusOut($event)\"\n (opened)=\"onDatePickerOpen()\"\n (closed)=\"onDatePickerClose()\"\n size=\"small\"></mona-date-picker>\n }\n }\n @if (hasFieldError()) {\n <span class=\"shrink-0 px-1 text-error\" #fieldErrorIcon>\n <svg lucideOctagonAlert [size]=\"12\"></svg>\n </span>\n <mona-tooltip [target]=\"fieldErrorIcon\">\n <span class=\"p-1\">{{ fieldErrorMessage() }}</span>\n </mona-tooltip>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: CheckBoxComponent, selector: "mona-check-box", inputs: ["checked", "disabled", "indeterminate", "invalid", "label", "labelPosition", "labelSize", "required", "rounded", "tabIndex", "touched", "class"], outputs: ["checkedChange", "inputBlur", "inputChange", "inputFocus", "touch"] }, { kind: "component", type: DatePickerComponent, selector: "mona-date-picker", inputs: ["disabled", "disabledDates", "firstDay", "format", "invalid", "max", "min", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "readonlyInput", "required", "rounded", "showClearButton", "size", "touched", "class", "value", "weekNumber"], outputs: ["close", "closed", "open", "opened", "touch", "valueChange"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: LucideOctagonAlert, selector: "svg[lucideOctagonAlert], svg[lucideAlertOctagon]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NumericTextBoxComponent, selector: "mona-numeric-text-box", inputs: ["aria-label", "decimals", "disabled", "formatter", "maxValue", "minValue", "nullable", "readonly", "required", "invalid", "rounded", "size", "spinners", "step", "tabindex", "touched", "class", "value"], outputs: ["inputBlur", "inputFocus", "inputFocusOut", "touch", "valueChange"] }, { kind: "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: "component", type: TooltipComponent, selector: "mona-tooltip", inputs: ["disabled", "hideDelay", "position", "rounded", "showDelay", "target"], outputs: ["hidden", "shown"] }] }); }
513
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridEditorComponent, isStandalone: true, selector: "mona-grid-editor", inputs: { autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, isNew: { classPropertyName: "isNew", publicName: "isNew", isSignal: true, isRequired: false, transformFunction: null }, session: { classPropertyName: "session", publicName: "session", isSignal: true, isRequired: true, transformFunction: null }, tabNavigationEnabled: { classPropertyName: "tabNavigationEnabled", publicName: "tabNavigationEnabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cancel: "cancel", commit: "commit", tabNavigate: "tabNavigate" }, host: { listeners: { "keydown": "onHostKeydown($event)" }, properties: { "class": "baseClass()" } }, viewQueries: [{ propertyName: "numericTextBoxRef", first: true, predicate: NumericTextBoxComponent, descendants: true, isSignal: true }, { propertyName: "textBoxRef", first: true, predicate: TextBoxComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (column().editTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().editTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: editTemplateContext() }\"></ng-container>\n} @else {\n <div class=\"relative flex items-center w-full h-full\">\n @switch (column().dataType) {\n @case (\"string\") {\n <mona-text-box\n [class]=\"editorInputClass()\"\n [inputAttributes]=\"{ autocomplete: 'off' }\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"commit.emit()\"\n (keydown.escape)=\"onEditCancel()\"\n (inputBlur)=\"commit.emit()\"\n [size]=\"'small'\"></mona-text-box>\n }\n @case (\"number\") {\n <mona-numeric-text-box\n [class]=\"editorInputClass()\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"commit.emit()\"\n (keydown.escape)=\"onEditCancel()\"\n (inputBlur)=\"commit.emit()\"\n [size]=\"'small'\"></mona-numeric-text-box>\n }\n @case (\"boolean\") {\n <mona-check-box\n class=\"{{ editorInputClass() }} ms-2\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (click)=\"onBooleanEditorClick()\"\n (focusout)=\"onBooleanEditorFocusOut($event)\"\n (pointerdown)=\"onBooleanEditorPointerDown()\"\n (keydown.escape)=\"onEditCancel()\"\n (keydown.enter)=\"commit.emit()\"></mona-check-box>\n }\n @case (\"date\") {\n <mona-date-picker\n [class]=\"editorInputClass()\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"onDatePickerEnter($event)\"\n (keydown.escape)=\"onEditCancel()\"\n (focusout)=\"onDatePickerFocusOut($event)\"\n (opened)=\"onDatePickerOpen()\"\n (closed)=\"onDatePickerClose()\"\n size=\"small\"></mona-date-picker>\n }\n }\n @if (hasFieldError()) {\n <span class=\"shrink-0 px-1 text-error\" #fieldErrorIcon>\n <svg lucideOctagonAlert [size]=\"12\"></svg>\n </span>\n <mona-tooltip [target]=\"fieldErrorIcon\">\n <span class=\"p-1\">{{ fieldErrorMessage() }}</span>\n </mona-tooltip>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: CheckBoxComponent, selector: "mona-check-box", inputs: ["checked", "disabled", "indeterminate", "invalid", "label", "labelPosition", "labelSize", "required", "rounded", "tabIndex", "touched", "class"], outputs: ["checkedChange", "inputBlur", "inputChange", "inputFocus", "touch"] }, { kind: "component", type: DatePickerComponent, selector: "mona-date-picker", inputs: ["disabled", "disabledDates", "firstDay", "format", "invalid", "max", "min", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "readonlyInput", "required", "rounded", "showClearButton", "size", "touched", "class", "value", "weekNumber"], outputs: ["close", "closed", "open", "opened", "touch", "valueChange"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: LucideOctagonAlert, selector: "svg[lucideOctagonAlert], svg[lucideAlertOctagon]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NumericTextBoxComponent, selector: "mona-numeric-text-box", inputs: ["aria-label", "decimals", "disabled", "formatter", "invalid", "maxValue", "minValue", "nullable", "readonly", "required", "rounded", "size", "spinners", "step", "tabindex", "touched", "class", "value"], outputs: ["inputBlur", "inputFocus", "inputFocusOut", "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: "component", type: TooltipComponent, selector: "mona-tooltip", inputs: ["disabled", "hideDelay", "position", "rounded", "showDelay", "target"], outputs: ["hidden", "shown"] }] }); }
510
514
  }
511
515
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridEditorComponent, decorators: [{
512
516
  type: Component,
@@ -522,7 +526,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
522
526
  ], host: {
523
527
  "[class]": "baseClass()",
524
528
  "(keydown)": "onHostKeydown($event)"
525
- }, template: "@if (column().editTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().editTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: editTemplateContext() }\"></ng-container>\n} @else {\n <div class=\"relative flex items-center w-full h-full\">\n @switch (column().dataType) {\n @case (\"string\") {\n <mona-text-box\n [class]=\"editorInputClass()\"\n [inputAttributes]=\"{ autocomplete: 'off' }\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"commit.emit()\"\n (keydown.escape)=\"onEditCancel()\"\n (inputBlur)=\"commit.emit()\"\n [size]=\"'small'\"></mona-text-box>\n }\n @case (\"number\") {\n <mona-numeric-text-box\n [class]=\"editorInputClass()\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"commit.emit()\"\n (keydown.escape)=\"onEditCancel()\"\n (inputBlur)=\"commit.emit()\"\n [size]=\"'small'\"></mona-numeric-text-box>\n }\n @case (\"boolean\") {\n <mona-check-box\n class=\"{{ editorInputClass() }} ml-2\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (click)=\"onBooleanEditorClick()\"\n (focusout)=\"onBooleanEditorFocusOut($event)\"\n (pointerdown)=\"onBooleanEditorPointerDown()\"\n (keydown.escape)=\"onEditCancel()\"\n (keydown.enter)=\"commit.emit()\"></mona-check-box>\n }\n @case (\"date\") {\n <mona-date-picker\n [class]=\"editorInputClass()\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"onDatePickerEnter($event)\"\n (keydown.escape)=\"onEditCancel()\"\n (focusout)=\"onDatePickerFocusOut($event)\"\n (opened)=\"onDatePickerOpen()\"\n (closed)=\"onDatePickerClose()\"\n size=\"small\"></mona-date-picker>\n }\n }\n @if (hasFieldError()) {\n <span class=\"shrink-0 px-1 text-error\" #fieldErrorIcon>\n <svg lucideOctagonAlert [size]=\"12\"></svg>\n </span>\n <mona-tooltip [target]=\"fieldErrorIcon\">\n <span class=\"p-1\">{{ fieldErrorMessage() }}</span>\n </mona-tooltip>\n }\n </div>\n}\n" }]
529
+ }, template: "@if (column().editTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().editTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: editTemplateContext() }\"></ng-container>\n} @else {\n <div class=\"relative flex items-center w-full h-full\">\n @switch (column().dataType) {\n @case (\"string\") {\n <mona-text-box\n [class]=\"editorInputClass()\"\n [inputAttributes]=\"{ autocomplete: 'off' }\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"commit.emit()\"\n (keydown.escape)=\"onEditCancel()\"\n (inputBlur)=\"commit.emit()\"\n [size]=\"'small'\"></mona-text-box>\n }\n @case (\"number\") {\n <mona-numeric-text-box\n [class]=\"editorInputClass()\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"commit.emit()\"\n (keydown.escape)=\"onEditCancel()\"\n (inputBlur)=\"commit.emit()\"\n [size]=\"'small'\"></mona-numeric-text-box>\n }\n @case (\"boolean\") {\n <mona-check-box\n class=\"{{ editorInputClass() }} ms-2\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (click)=\"onBooleanEditorClick()\"\n (focusout)=\"onBooleanEditorFocusOut($event)\"\n (pointerdown)=\"onBooleanEditorPointerDown()\"\n (keydown.escape)=\"onEditCancel()\"\n (keydown.enter)=\"commit.emit()\"></mona-check-box>\n }\n @case (\"date\") {\n <mona-date-picker\n [class]=\"editorInputClass()\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"onDatePickerEnter($event)\"\n (keydown.escape)=\"onEditCancel()\"\n (focusout)=\"onDatePickerFocusOut($event)\"\n (opened)=\"onDatePickerOpen()\"\n (closed)=\"onDatePickerClose()\"\n size=\"small\"></mona-date-picker>\n }\n }\n @if (hasFieldError()) {\n <span class=\"shrink-0 px-1 text-error\" #fieldErrorIcon>\n <svg lucideOctagonAlert [size]=\"12\"></svg>\n </span>\n <mona-tooltip [target]=\"fieldErrorIcon\">\n <span class=\"p-1\">{{ fieldErrorMessage() }}</span>\n </mona-tooltip>\n }\n </div>\n}\n" }]
526
530
  }], ctorParameters: () => [], propDecorators: { numericTextBoxRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => NumericTextBoxComponent), { isSignal: true }] }], textBoxRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TextBoxComponent), { isSignal: true }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], cancel: [{ type: i0.Output, args: ["cancel"] }], column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], commit: [{ type: i0.Output, args: ["commit"] }], isNew: [{ type: i0.Input, args: [{ isSignal: true, alias: "isNew", required: false }] }], session: [{ type: i0.Input, args: [{ isSignal: true, alias: "session", required: true }] }], tabNavigate: [{ type: i0.Output, args: ["tabNavigate"] }], tabNavigationEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabNavigationEnabled", required: false }] }] } });
527
531
 
528
532
  class GridAddRowComponent {
@@ -754,24 +758,15 @@ class GridCellComponent {
754
758
  this.gridService.startCellEdit(this.cellUid(), this.row(), this.column(), originalEvent);
755
759
  }
756
760
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
757
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridCellComponent, isStandalone: true, selector: "mona-grid-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, 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=\"Modified\"></span>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "component", type: GridCommandCellComponent, selector: "mona-grid-command-cell", inputs: ["column", "newRow", "row"] }, { kind: "component", type: GridEditorComponent, selector: "mona-grid-editor", inputs: ["autoFocus", "column", "isNew", "session", "tabNavigationEnabled"], outputs: ["cancel", "commit", "tabNavigate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
761
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridCellComponent, isStandalone: true, selector: "mona-grid-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, 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", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "component", type: GridCommandCellComponent, selector: "mona-grid-command-cell", inputs: ["column", "newRow", "row"] }, { kind: "component", type: GridEditorComponent, selector: "mona-grid-editor", inputs: ["autoFocus", "column", "isNew", "session", "tabNavigationEnabled"], outputs: ["cancel", "commit", "tabNavigate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
758
762
  }
759
763
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCellComponent, decorators: [{
760
764
  type: Component,
761
765
  args: [{ selector: "mona-grid-cell", imports: [A11yModule, GridCommandCellComponent, GridEditorComponent, NgTemplateOutlet], host: {
762
766
  "[class]": "baseClass()"
763
- }, 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=\"Modified\"></span>\n }\n </div>\n}\n" }]
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" }]
764
768
  }], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], row: [{ type: i0.Input, args: [{ isSignal: true, alias: "row", required: true }] }] } });
765
769
 
766
- const ROW_REORDER_DISABLED_REASON_TEXT = {
767
- disabled: "Row reordering is disabled.",
768
- editing: "Finish editing to reorder rows.",
769
- filtered: "Clear filters to reorder rows.",
770
- grouped: "Clear grouping to reorder rows.",
771
- "single-row": "At least two rows are needed to reorder.",
772
- sorted: "Clear sorting to reorder rows.",
773
- "virtual-scroll": "Row reordering isn't available while virtual scrolling is enabled."
774
- };
775
770
  class GridRowReorderHandleComponent {
776
771
  constructor() {
777
772
  this.#gridService = inject(GridService);
@@ -780,15 +775,33 @@ class GridRowReorderHandleComponent {
780
775
  const absoluteIndex = this.pageIndex() + this.#gridService.paginationState().skip;
781
776
  const label = this.#gridService.getRowReorderAriaLabel(this.row(), absoluteIndex);
782
777
  const reasonText = this.disabledReasonText();
783
- const suffix = reasonText == null ? "" : ` ${reasonText}`;
784
- return `${label}. Use Alt plus Up Arrow or Alt plus Down Arrow to move.${suffix}`;
778
+ const messages = this.#gridService.messages();
779
+ return messages.rowReorderHandleAriaLabel(label, messages.rowReorderKeyboardHint, reasonText ?? undefined);
785
780
  }, /* @ts-ignore */
786
781
  ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
787
782
  this.disabled = computed(() => !this.#gridService.canReorderRow(this.row()), /* @ts-ignore */
788
783
  ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
789
784
  this.disabledReasonText = computed(() => {
790
785
  const reason = this.#gridService.rowReorderDisabledReason();
791
- 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
+ }
792
805
  }, /* @ts-ignore */
793
806
  ...(ngDevMode ? [{ debugName: "disabledReasonText" }] : /* istanbul ignore next */ []));
794
807
  this.handleClass = computed(() => gridRowReorderHandleThemeVariants(), /* @ts-ignore */
@@ -820,15 +833,17 @@ class GridRowReorderHandleComponent {
820
833
  const moved = this.#gridService.requestRowReorder(this.row(), this.pageIndex(), targetIndex);
821
834
  if (moved) {
822
835
  const skip = this.#gridService.paginationState().skip;
823
- 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));
824
839
  }
825
840
  }
826
841
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridRowReorderHandleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
827
- 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"] }] }); }
828
843
  }
829
844
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridRowReorderHandleComponent, decorators: [{
830
845
  type: Component,
831
- args: [{ selector: "mona-grid-row-reorder-handle", imports: [CdkDragHandle], changeDetection: ChangeDetectionStrategy.OnPush, host: {
846
+ args: [{ selector: "mona-grid-row-reorder-handle", imports: [CdkDragHandle], host: {
832
847
  "(click)": "$event.stopPropagation()",
833
848
  "(contextmenu)": "$event.stopPropagation()",
834
849
  "(dblclick)": "$event.stopPropagation()"
@@ -843,7 +858,7 @@ class GridSelectionCheckboxComponent {
843
858
  if (labelFn) {
844
859
  return labelFn(this.row().data);
845
860
  }
846
- return `Select row ${this.rowIndex() + 1}`;
861
+ return this.#gridService.messages().selectRow(this.rowIndex() + 1);
847
862
  }, /* @ts-ignore */
848
863
  ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
849
864
  this.checked = computed(() => this.#gridService.isRowSelected(this.row()), /* @ts-ignore */
@@ -908,4 +923,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
908
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 }] }] } });
909
924
 
910
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 };
911
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-toggle.component-hc-LeIb0.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-hc-LeIb0.mjs';
12
- import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-ibH5osCg.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-Pm8Fbp6M.mjs';
14
- import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-WEDbZ5vy.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-DYajpOb9.mjs.map
233
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-virtual-list.component-X0X487Rm.mjs.map