@nanahoshi/mona-ui 0.6.1 → 0.7.1

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 (34) hide show
  1. package/fesm2022/nanahoshi-mona-ui-button.mjs +10 -3
  2. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +1 -1
  3. package/fesm2022/nanahoshi-mona-ui-chip.mjs +1 -1
  4. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1 -1
  5. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +1 -1
  6. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +1 -1
  7. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1 -1
  8. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1 -1
  9. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1 -1
  10. package/fesm2022/nanahoshi-mona-ui-editor.mjs +13 -13
  11. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
  12. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-5-9r0o20.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-BbBPZj7t.mjs} +2 -2
  13. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Ib52xf0V.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BkISJoqL.mjs} +2 -2
  14. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-DReEfWfG.mjs +121 -0
  15. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-g25a3EYL.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-QDo6TweF.mjs} +63 -10
  16. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-BCIs_lmz.mjs +231 -0
  17. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-qsRN5qZF.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DWzYyGnb.mjs} +82 -33
  18. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  19. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1 -1
  20. package/fesm2022/nanahoshi-mona-ui-notification.mjs +1 -1
  21. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1 -1
  22. package/fesm2022/nanahoshi-mona-ui-pager.mjs +1 -1
  23. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +1 -1
  24. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1 -1
  25. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1 -1
  26. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1 -1
  27. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +1 -1
  28. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +1 -1
  29. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1 -1
  30. package/fesm2022/nanahoshi-mona-ui-window.mjs +1 -1
  31. package/package.json +1 -1
  32. package/types/nanahoshi-mona-ui-button.d.ts +7 -1
  33. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-D6GBsZr8.mjs +0 -121
  34. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-0vCJC8II.mjs +0 -231
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { computed, input, Directive, inject, Component, signal, ElementRef, viewChild, output, effect, untracked, afterNextRender, ChangeDetectionStrategy, LOCALE_ID, model } from '@angular/core';
3
- import { k as gridListTableCellThemeVariants, l as gridDetailContentCellThemeVariants, m as gridDetailIndentCellThemeVariants, n as gridDetailRowThemeVariants, c as GridService, o as gridListTableRowThemeVariants, p as gridCellEditorBaseThemeVariants, q as gridCellEditorInputThemeVariants, h as GridLockedCellDirective, f as GridLogicalCellDirective, r as gridCellBaseThemeVariants, s as gridCellContainerThemeVariants, t as gridCellDirtyIndicatorThemeVariants, u as gridCellTextThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-qsRN5qZF.mjs';
2
+ import { computed, input, Directive, inject, Component, signal, ElementRef, viewChild, output, effect, untracked, afterNextRender, ChangeDetectionStrategy, Injector, LOCALE_ID, model } from '@angular/core';
3
+ import { k as gridListTableCellThemeVariants, l as gridDetailContentCellThemeVariants, m as gridDetailIndentCellThemeVariants, n as gridDetailRowThemeVariants, c as GridService, o as gridListTableRowThemeVariants, p as gridCellEditorBaseThemeVariants, q as gridCellEditorInputThemeVariants, h as GridLockedCellDirective, f as GridLogicalCellDirective, G as GridNavigationService, r as gridCellBaseThemeVariants, s as gridCellContainerThemeVariants, t as gridCellDirtyIndicatorThemeVariants, u as gridCellTextThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DWzYyGnb.mjs';
4
4
  import { ImmutableList } from '@mirei/ts-collections';
5
5
  import * as i1 from '@angular/cdk/a11y';
6
6
  import { A11yModule } from '@angular/cdk/a11y';
@@ -292,7 +292,7 @@ class GridCommandCellComponent {
292
292
  this.gridService.commitRowEdit(event);
293
293
  }
294
294
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCommandCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
295
- 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", "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"] }] }); }
295
+ 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"] }] }); }
296
296
  }
297
297
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCommandCellComponent, decorators: [{
298
298
  type: Component,
@@ -310,6 +310,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
310
310
  }, 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" }]
311
311
  }], 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 }] }] } });
312
312
 
313
+ const FOCUSABLE_TARGET_SELECTOR$1 = "button, input, select, textarea, a[href], [tabindex]";
313
314
  class GridEditorComponent {
314
315
  #datePopupOpen;
315
316
  #elementRef;
@@ -379,6 +380,12 @@ class GridEditorComponent {
379
380
  ...(ngDevMode ? [{ debugName: "isNew" }] : /* istanbul ignore next */ []));
380
381
  this.session = input.required(/* @ts-ignore */
381
382
  ...(ngDevMode ? [{ debugName: "session" }] : /* istanbul ignore next */ []));
383
+ this.tabNavigate = output();
384
+ /**
385
+ * @description Enables Tab and Shift+Tab traversal between editable cells while cell editing.
386
+ */
387
+ this.tabNavigationEnabled = input(false, /* @ts-ignore */
388
+ ...(ngDevMode ? [{ debugName: "tabNavigationEnabled" }] : /* istanbul ignore next */ []));
382
389
  effect(() => {
383
390
  const column = this.column();
384
391
  if (column.dataType !== "number") {
@@ -444,6 +451,14 @@ class GridEditorComponent {
444
451
  this.cancel.emit();
445
452
  }
446
453
  }
454
+ onHostKeydown(event) {
455
+ if (event.key !== "Tab" || !this.tabNavigationEnabled() || event.defaultPrevented) {
456
+ return;
457
+ }
458
+ event.preventDefault();
459
+ event.stopPropagation();
460
+ this.tabNavigate.emit(event.shiftKey ? "previous" : "next");
461
+ }
447
462
  #coerceNumberValue(value) {
448
463
  if (typeof value === "number") {
449
464
  return Number.isFinite(value) ? value : null;
@@ -466,6 +481,10 @@ class GridEditorComponent {
466
481
  if (!this.autoFocus()) {
467
482
  return;
468
483
  }
484
+ if (this.column().editTemplate) {
485
+ this.#focusTemplateTarget();
486
+ return;
487
+ }
469
488
  this.textBoxRef()?.focus();
470
489
  this.numericTextBoxRef()?.focus();
471
490
  const type = this.column().dataType;
@@ -477,11 +496,16 @@ class GridEditorComponent {
477
496
  this.#focusBooleanInput();
478
497
  }
479
498
  }
499
+ #focusTemplateTarget() {
500
+ const targets = Array.from(this.#elementRef.nativeElement.querySelectorAll(FOCUSABLE_TARGET_SELECTOR$1));
501
+ const target = targets.find(candidate => !candidate.hasAttribute("disabled") && candidate.getAttribute("aria-hidden") !== "true");
502
+ target?.focus();
503
+ }
480
504
  #setFieldValue(value) {
481
505
  this.formField()().value.set(value);
482
506
  }
483
507
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
484
- 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 } }, outputs: { cancel: "cancel", commit: "commit" }, host: { 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"] }] }); }
508
+ 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"] }] }); }
485
509
  }
486
510
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridEditorComponent, decorators: [{
487
511
  type: Component,
@@ -495,9 +519,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
495
519
  TextBoxComponent,
496
520
  TooltipComponent
497
521
  ], host: {
498
- "[class]": "baseClass()"
522
+ "[class]": "baseClass()",
523
+ "(keydown)": "onHostKeydown($event)"
499
524
  }, 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" }]
500
- }], 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 }] }] } });
525
+ }], 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 }] }] } });
501
526
 
502
527
  class GridAddRowComponent {
503
528
  constructor() {
@@ -522,7 +547,7 @@ class GridAddRowComponent {
522
547
  this.gridService.patchAddCell(column.field, value);
523
548
  }
524
549
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridAddRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
525
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridAddRowComponent, isStandalone: true, selector: "tr[monaGridAddRow]", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "row", "data-grid-add-row": "true" }, properties: { "class": "baseClass()" } }, ngImport: i0, template: "@if (gridService.addRowData(); as rowData) {\n @let session = gridService.editSession();\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [grouped]=\"true\"\n [indentCell]=\"true\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"gridService.groupColumns().length * gridService.groupColumnWidth\"\n [masterDetailToggle]=\"true\"\n [rowIndex]=\"-1\"\n [colIndex]=\"0\"\n [cellKind]=\"'detail'\"\n [firstInRow]=\"true\"\n [lastInRow]=\"columns().length === 0\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.detailColumnWidth\"></td>\n }\n @for (column of columns(); track $index) {\n @let colIndex = gridService.masterDetailTemplate() ? $index + 1 : $index;\n <td\n monaGridCell\n monaGridLockedCell\n [column]=\"column\"\n [dataCell]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"column.kind\"\n [colIndex]=\"colIndex\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [section]=\"'add'\"\n [firstInRow]=\"colIndex === 0\"\n [lastInRow]=\"colIndex === columns().length - (gridService.masterDetailTemplate() ? 0 : 1)\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\"\n [style.min-width.px]=\"column.minWidth\">\n @if (column.kind === \"command\") {\n <mona-grid-command-cell [column]=\"column\" [newRow]=\"true\"></mona-grid-command-cell>\n } @else if (column.editable && session) {\n <mona-grid-editor\n [column]=\"column\"\n [autoFocus]=\"isFirstEditableColumn(column)\"\n [isNew]=\"true\"\n [session]=\"session\"\n (commit)=\"onCommit()\"\n (cancel)=\"onCancel()\"></mona-grid-editor>\n } @else {\n <span class=\"block truncate px-2\">{{ rowData[column.field] }}</span>\n }\n </td>\n }\n}\n", dependencies: [{ kind: "directive", type: GridCellDirective, selector: "td[monaGridCell]", inputs: ["dataCell", "groupHeader", "groupToggle", "grouped", "indentCell", "lastInRow", "masterDetailContent", "masterDetailToggle", "nextRowType", "prevRowType"] }, { 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"], outputs: ["cancel", "commit"] }, { kind: "directive", type: GridLockedCellDirective, selector: "td[monaGridLockedCell], th[monaGridLockedCell]", inputs: ["column", "lockedCellHeader", "lockedStructuralOffset"] }, { kind: "directive", type: GridLogicalCellDirective, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: ["cellKind", "colIndex", "columnId", "firstInRow", "groupHeader", "groupKey", "lastInRow", "rowIndex", "rowUid", "section"], outputs: ["edit", "toggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
550
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridAddRowComponent, isStandalone: true, selector: "tr[monaGridAddRow]", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "row", "data-grid-add-row": "true" }, properties: { "class": "baseClass()" } }, ngImport: i0, template: "@if (gridService.addRowData(); as rowData) {\n @let session = gridService.editSession();\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [grouped]=\"true\"\n [indentCell]=\"true\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [lockedStructuralOffset]=\"gridService.groupColumns().length * gridService.groupColumnWidth\"\n [masterDetailToggle]=\"true\"\n [rowIndex]=\"-1\"\n [colIndex]=\"0\"\n [cellKind]=\"'detail'\"\n [firstInRow]=\"true\"\n [lastInRow]=\"columns().length === 0\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.detailColumnWidth\"></td>\n }\n @for (column of columns(); track $index) {\n @let colIndex = gridService.masterDetailTemplate() ? $index + 1 : $index;\n <td\n monaGridCell\n monaGridLockedCell\n [column]=\"column\"\n [dataCell]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"column.kind\"\n [colIndex]=\"colIndex\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [section]=\"'add'\"\n [firstInRow]=\"colIndex === 0\"\n [lastInRow]=\"colIndex === columns().length - (gridService.masterDetailTemplate() ? 0 : 1)\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\"\n [style.min-width.px]=\"column.minWidth\">\n @if (column.kind === \"command\") {\n <mona-grid-command-cell [column]=\"column\" [newRow]=\"true\"></mona-grid-command-cell>\n } @else if (column.editable && session) {\n <mona-grid-editor\n [column]=\"column\"\n [autoFocus]=\"isFirstEditableColumn(column)\"\n [isNew]=\"true\"\n [session]=\"session\"\n (commit)=\"onCommit()\"\n (cancel)=\"onCancel()\"></mona-grid-editor>\n } @else {\n <span class=\"block truncate px-2\">{{ rowData[column.field] }}</span>\n }\n </td>\n }\n}\n", dependencies: [{ kind: "directive", type: GridCellDirective, selector: "td[monaGridCell]", inputs: ["dataCell", "groupHeader", "groupToggle", "grouped", "indentCell", "lastInRow", "masterDetailContent", "masterDetailToggle", "nextRowType", "prevRowType"] }, { 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: GridLockedCellDirective, selector: "td[monaGridLockedCell], th[monaGridLockedCell]", inputs: ["column", "lockedCellHeader", "lockedStructuralOffset"] }, { kind: "directive", type: GridLogicalCellDirective, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: ["cellKind", "colIndex", "columnId", "editable", "firstInRow", "groupHeader", "groupKey", "lastInRow", "rowIndex", "rowUid", "section"], outputs: ["edit", "toggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
526
551
  }
527
552
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridAddRowComponent, decorators: [{
528
553
  type: Component,
@@ -543,7 +568,10 @@ const FOCUSABLE_TARGET_SELECTOR = "button, input, select, textarea, a[href], [ta
543
568
  class GridCellComponent {
544
569
  constructor() {
545
570
  this.#elementRef = inject((ElementRef));
571
+ this.#gridNavigationService = inject(GridNavigationService);
572
+ this.#injector = inject(Injector);
546
573
  this.#locale = inject(LOCALE_ID);
574
+ this.#logicalCell = inject(GridLogicalCellDirective, { optional: true });
547
575
  this.baseClass = computed(() => {
548
576
  return gridCellBaseThemeVariants();
549
577
  }, /* @ts-ignore */
@@ -570,6 +598,8 @@ class GridCellComponent {
570
598
  return effectiveRowData[this.column().field];
571
599
  }, /* @ts-ignore */
572
600
  ...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
601
+ this.editContextIsCellMode = computed(() => this.gridService.editContext()?.mode === "cell", /* @ts-ignore */
602
+ ...(ngDevMode ? [{ debugName: "editContextIsCellMode" }] : /* istanbul ignore next */ []));
573
603
  this.formattedDisplayValue = computed(() => {
574
604
  const column = this.column();
575
605
  const value = this.displayValue();
@@ -627,7 +657,10 @@ class GridCellComponent {
627
657
  ...(ngDevMode ? [{ debugName: "row" }] : /* istanbul ignore next */ []));
628
658
  }
629
659
  #elementRef;
660
+ #gridNavigationService;
661
+ #injector;
630
662
  #locale;
663
+ #logicalCell;
631
664
  handleLogicalCellEnter(originalEvent) {
632
665
  if (!this.gridService.editableOptions().enabled || !this.column().editable || this.column().kind !== "data") {
633
666
  return;
@@ -671,6 +704,26 @@ class GridCellComponent {
671
704
  this.focusHostCell();
672
705
  }
673
706
  }
707
+ onEditTabNavigate(direction) {
708
+ const context = this.gridService.editContext();
709
+ if (context?.mode !== "cell") {
710
+ return;
711
+ }
712
+ const rowUid = this.row().uid;
713
+ const columnId = this.column().id;
714
+ if (!this.gridService.stopCellEdit()) {
715
+ return;
716
+ }
717
+ // The commit may replace the row data, so wait for the grid to re-render before starting the next edit.
718
+ afterNextRender({
719
+ read: () => {
720
+ if (this.#gridNavigationService.focusAdjacentEditableCell(rowUid, columnId, direction)) {
721
+ return;
722
+ }
723
+ this.#logicalCell?.focusNextPageTabTarget(direction === "previous");
724
+ }
725
+ }, { injector: this.#injector });
726
+ }
674
727
  focusHostCell() {
675
728
  const cellElement = this.#elementRef.nativeElement.closest("td");
676
729
  cellElement?.focus();
@@ -700,13 +753,13 @@ class GridCellComponent {
700
753
  this.gridService.startCellEdit(this.cellUid(), this.row(), this.column(), originalEvent);
701
754
  }
702
755
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
703
- 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 (commit)=\"onEditCommit()\"\n (cancel)=\"onEditCancel()\"></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"], outputs: ["cancel", "commit"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
756
+ 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"] }] }); }
704
757
  }
705
758
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCellComponent, decorators: [{
706
759
  type: Component,
707
760
  args: [{ selector: "mona-grid-cell", imports: [A11yModule, GridCommandCellComponent, GridEditorComponent, NgTemplateOutlet], host: {
708
761
  "[class]": "baseClass()"
709
- }, 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 (commit)=\"onEditCommit()\"\n (cancel)=\"onEditCancel()\"></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" }]
762
+ }, 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" }]
710
763
  }], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], row: [{ type: i0.Input, args: [{ isSignal: true, alias: "row", required: true }] }] } });
711
764
 
712
765
  class GridToggleComponent {
@@ -741,4 +794,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
741
794
  }], 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 }] }] } });
742
795
 
743
796
  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 };
744
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-toggle.component-g25a3EYL.mjs.map
797
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-toggle.component-QDo6TweF.mjs.map