@nanahoshi/mona-ui 0.24.6 → 0.24.8

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 (78) hide show
  1. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1 -1
  2. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +14 -4
  3. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1 -1
  4. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1 -1
  5. package/fesm2022/nanahoshi-mona-ui-filter.mjs +233 -231
  6. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-CD_ODHpU.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DdyHnUIr.mjs} +24 -12
  7. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-B6gq7Hu3.mjs +208 -0
  8. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DdUY3I7P.mjs +1100 -0
  9. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-Sa1aAtJ-.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-DG8Bu4Dy.mjs} +34 -21
  10. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BvUM9nPt.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CVqpbMcb.mjs} +2565 -928
  11. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  12. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +79 -11
  13. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +20 -4
  14. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +335 -45
  15. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +565 -197
  16. package/fesm2022/nanahoshi-mona-ui-internal.mjs +28 -2
  17. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +598 -208
  18. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +193 -74
  19. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +58 -11
  20. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +62 -11
  21. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +62 -11
  22. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +69 -11
  23. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +58 -11
  24. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +62 -11
  25. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +58 -11
  26. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +58 -11
  27. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +62 -11
  28. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +78 -11
  29. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +58 -11
  30. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +58 -11
  31. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +58 -11
  32. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1 -1
  33. package/fesm2022/nanahoshi-mona-ui-pager.mjs +367 -463
  34. package/fesm2022/nanahoshi-mona-ui-query.mjs +317 -122
  35. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +205 -140
  36. package/i18n/catalogs/en-US.messages.json +64 -17
  37. package/locales/ar-sa/ar-sa.messages.json +58 -11
  38. package/locales/de-de/de-de.messages.json +58 -11
  39. package/locales/es-es/es-es.messages.json +58 -11
  40. package/locales/fr-fr/fr-fr.messages.json +58 -11
  41. package/locales/id-id/id-id.messages.json +58 -11
  42. package/locales/it-it/it-it.messages.json +58 -11
  43. package/locales/ja-jp/ja-jp.messages.json +58 -11
  44. package/locales/ko-kr/ko-kr.messages.json +58 -11
  45. package/locales/pt-br/pt-br.messages.json +58 -11
  46. package/locales/ru-ru/ru-ru.messages.json +58 -11
  47. package/locales/tr-tr/tr-tr.messages.json +58 -11
  48. package/locales/zh-cn/zh-cn.messages.json +58 -11
  49. package/locales/zh-tw/zh-tw.messages.json +58 -11
  50. package/package.json +1 -1
  51. package/types/nanahoshi-mona-ui-check-box.d.ts +11 -1
  52. package/types/nanahoshi-mona-ui-filter.d.ts +54 -32
  53. package/types/nanahoshi-mona-ui-grid.d.ts +359 -110
  54. package/types/nanahoshi-mona-ui-i18n.d.ts +97 -6
  55. package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +14 -2
  56. package/types/nanahoshi-mona-ui-internal-list.d.ts +89 -10
  57. package/types/nanahoshi-mona-ui-internal-tree.d.ts +155 -40
  58. package/types/nanahoshi-mona-ui-internal.d.ts +10 -2
  59. package/types/nanahoshi-mona-ui-list-box.d.ts +148 -47
  60. package/types/nanahoshi-mona-ui-list-view.d.ts +111 -21
  61. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +53 -6
  62. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +53 -6
  63. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +53 -6
  64. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +53 -6
  65. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +53 -6
  66. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +53 -6
  67. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +53 -6
  68. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +53 -6
  69. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +53 -6
  70. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +53 -6
  71. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +53 -6
  72. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +53 -6
  73. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +53 -6
  74. package/types/nanahoshi-mona-ui-pager.d.ts +159 -76
  75. package/types/nanahoshi-mona-ui-query.d.ts +45 -14
  76. package/types/nanahoshi-mona-ui-tree-view.d.ts +84 -40
  77. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-0jN7I1jo.mjs +0 -176
  78. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BI_iE7pl.mjs +0 -946
@@ -1,13 +1,13 @@
1
- import { G as GridNavigationService, a as GridService, g as gridListBaseThemeVariants, e as gridFooterThemeVariants, f as gridFooterTableThemeVariants, c as gridListTableThemeVariants, h as GRID_DEFAULT_VIRTUAL_ROW_HEIGHT, d as GridColgroupComponent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BvUM9nPt.mjs';
1
+ import { e as GridNavigationService, G as GridService, g as gridListBaseThemeVariants, f as gridFooterThemeVariants, h as gridFooterTableThemeVariants, c as gridListTableThemeVariants, i as GRID_DEFAULT_VIRTUAL_ROW_HEIGHT, d as GridColgroupComponent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CVqpbMcb.mjs';
2
2
  import { CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf } from '@angular/cdk/scrolling';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, DestroyRef, ElementRef, Injector, viewChild, computed, input, effect, untracked, afterNextRender, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { inject, DestroyRef, ElementRef, Injector, viewChild, computed, input, effect, untracked, afterNextRender, Component } from '@angular/core';
5
5
  import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
6
  import { ImmutableList } from '@mirei/ts-collections';
7
7
  import { rxTimeout } from '@nanahoshi/mona-ui/internal';
8
- import { fromEvent } from 'rxjs';
9
- import { G as GridAddRowComponent, a as GridDetailRowComponent, b as GridGroupRowComponent, c as GridRowComponent } from './nanahoshi-mona-ui-grid-grid-row.component-BI_iE7pl.mjs';
10
- import { GridFooterRowComponent } from './nanahoshi-mona-ui-grid-grid-footer-row.component-CD_ODHpU.mjs';
8
+ import { ContextMenuComponent } from '@nanahoshi/mona-ui/contextmenu';
9
+ import { a as GridAddRowComponent, b as GridGroupRowComponent, c as GridRowComponent } from './nanahoshi-mona-ui-grid-grid-row.component-DdUY3I7P.mjs';
10
+ import { GridFooterRowComponent } from './nanahoshi-mona-ui-grid-grid-footer-row.component-DdyHnUIr.mjs';
11
11
 
12
12
  class GridVirtualListComponent {
13
13
  #destroyRef;
@@ -43,6 +43,9 @@ class GridVirtualListComponent {
43
43
  return gridFooterTableThemeVariants();
44
44
  }, /* @ts-ignore */
45
45
  ...(ngDevMode ? [{ debugName: "footerTableClass" }] : /* istanbul ignore next */ []));
46
+ /** The grid footer is the last row of the grid: after the header rows, the add row and every body row. */
47
+ this.gridAriaRowCount = computed(() => this.gridService.bodyAriaRowStart() + this.bodyRows().length + 1, /* @ts-ignore */
48
+ ...(ngDevMode ? [{ debugName: "gridAriaRowCount" }] : /* istanbul ignore next */ []));
46
49
  this.gridService = inject(GridService);
47
50
  this.tableClass = computed(() => {
48
51
  return gridListTableThemeVariants();
@@ -67,7 +70,7 @@ class GridVirtualListComponent {
67
70
  const bodyScrollElement = this.#hostElementRef.nativeElement.querySelector(".cdk-virtual-scroll-viewport");
68
71
  this.gridService.bodyTableElement.set(bodyTableElement);
69
72
  this.gridService.bodyScrollElement.set(bodyScrollElement);
70
- this.setFocusSubscription();
73
+ this.setRowScroller();
71
74
  this.setScrollEndSubscription();
72
75
  this.#destroyRef.onDestroy(() => {
73
76
  if (this.gridService.bodyTableElement() === bodyTableElement) {
@@ -82,12 +85,13 @@ class GridVirtualListComponent {
82
85
  });
83
86
  }
84
87
  });
88
+ effect(() => {
89
+ const count = this.bodyRows().length;
90
+ untracked(() => this.gridService.renderedBodyRowCount.set(count));
91
+ });
85
92
  this.setGroupSubscriptions();
86
93
  this.setSelectedKeysLoadSubscription();
87
94
  }
88
- onViewportFocus() {
89
- this.#gridNavigationService.focusActiveCellOrFirstHeader();
90
- }
91
95
  trackBodyRow(_, bodyRow) {
92
96
  return bodyRow.key;
93
97
  }
@@ -96,13 +100,6 @@ class GridVirtualListComponent {
96
100
  element.scrollLeft = scrollLeft;
97
101
  }
98
102
  }
99
- setFocusSubscription() {
100
- fromEvent(this.#hostElementRef.nativeElement, "focus")
101
- .pipe(takeUntilDestroyed(this.#destroyRef))
102
- .subscribe(() => {
103
- this.#gridNavigationService.focusActiveCellOrFirstHeader();
104
- });
105
- }
106
103
  setGroupSubscriptions() {
107
104
  // Workaround for @angular/components issue #21793 — virtual scroll does not update
108
105
  // the rendered range when data changes until the user scrolls.
@@ -116,6 +113,22 @@ class GridVirtualListComponent {
116
113
  }, { injector: this.#injector });
117
114
  });
118
115
  }
116
+ /**
117
+ * Lets keyboard navigation reach rows that aren't drawn: PageDown, Ctrl+End and the arrows scroll to the
118
+ * row, which takes focus once it is drawn. Scrolling the focused row out and back returns focus to it.
119
+ */
120
+ setRowScroller() {
121
+ const viewport = this.viewport();
122
+ this.#gridNavigationService.setRowScroller({
123
+ isNavigableRow: index => this.bodyRows()[index] != null,
124
+ rowCount: () => this.bodyRows().length,
125
+ scrollToRow: index => viewport.scrollToIndex(index)
126
+ });
127
+ viewport.renderedRangeStream
128
+ .pipe(takeUntilDestroyed(this.#destroyRef))
129
+ .subscribe(() => afterNextRender(() => this.#gridNavigationService.restoreLostFocus(), { injector: this.#injector }));
130
+ this.#destroyRef.onDestroy(() => this.#gridNavigationService.setRowScroller(null));
131
+ }
119
132
  setScrollEndSubscription() {
120
133
  const viewport = this.viewport();
121
134
  viewport.scrolledIndexChange.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
@@ -149,25 +162,25 @@ class GridVirtualListComponent {
149
162
  });
150
163
  }
151
164
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridVirtualListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
152
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridVirtualListComponent, isStandalone: true, selector: "mona-grid-virtual-list", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()", "style.--mona-grid-row-height": "gridService.virtualScrollOptions().height + 'px'" } }, viewQueries: [{ propertyName: "addRowScrollElementRef", first: true, predicate: ["addRowScrollElement"], descendants: true, isSignal: true }, { propertyName: "bodyTableElementRef", first: true, predicate: ["bodyTable"], descendants: true, isSignal: true }, { propertyName: "footerScrollElementRef", first: true, predicate: ["footerScrollElement"], descendants: true, isSignal: true }, { propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], ngImport: i0, template: "@if (gridService.addRowVisible()) {\n <div\n class=\"shrink-0 overflow-hidden border-b border-b-border\"\n [style.margin-inline-end.px]=\"gridService.scrollbarGutterWidth()\"\n #addRowScrollElement>\n <table role=\"presentation\" [class]=\"tableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tbody role=\"rowgroup\">\n <tr monaGridAddRow></tr>\n </tbody>\n </table>\n </div>\n}\n\n<cdk-virtual-scroll-viewport\n class=\"flex-1 min-h-0\"\n [itemSize]=\"gridService.virtualScrollOptions().height\"\n [minBufferPx]=\"gridService.virtualGridMinBuffer()\"\n [maxBufferPx]=\"gridService.virtualGridMaxBuffer()\">\n <table role=\"presentation\" #bodyTable [class]=\"tableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tbody role=\"rowgroup\" tabindex=\"0\" (focus)=\"onViewportFocus()\">\n <ng-container *cdkVirtualFor=\"let bodyRow of bodyRows(); let rowIndex = index; trackBy: trackBodyRow\">\n @if (bodyRow.type === \"group\") {\n <tr monaGridGroupRow [group]=\"bodyRow\" [rowIndex]=\"rowIndex\"></tr>\n } @else if (bodyRow.type === \"groupFooter\") {\n <tr monaGridFooterRow [groupKey]=\"bodyRow.groupAggregate.groupKey\"></tr>\n } @else {\n <tr monaGridRow [row]=\"bodyRow.row\" [index]=\"rowIndex\"></tr>\n @if (gridService.isRowExpanded(bodyRow.row) && !gridService.rowDragInProgress()) {\n <tr monaGridDetailRow [row]=\"bodyRow.row\"></tr>\n }\n }\n </ng-container>\n </tbody>\n </table>\n</cdk-virtual-scroll-viewport>\n\n@if (gridService.hasFooter()) {\n <div [class]=\"footerClass()\" [style.margin-inline-end.px]=\"gridService.scrollbarGutterWidth()\" #footerScrollElement>\n <div>\n <table role=\"presentation\" [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tfoot role=\"rowgroup\">\n <tr monaGridFooterRow></tr>\n </tfoot>\n </table>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: GridAddRowComponent, selector: "tr[monaGridAddRow]" }, { kind: "component", type: GridColgroupComponent, selector: "colgroup[monaGridColgroup]" }, { kind: "component", type: GridDetailRowComponent, selector: "tr[monaGridDetailRow]", inputs: ["row"] }, { kind: "component", type: GridFooterRowComponent, selector: "tr[monaGridFooterRow]", inputs: ["groupKey"] }, { kind: "component", type: GridGroupRowComponent, selector: "tr[monaGridGroupRow]", inputs: ["group", "rowIndex"] }, { kind: "component", type: GridRowComponent, selector: "tr[monaGridRow]", inputs: ["index", "row"], exportAs: ["monaGridRow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
165
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridVirtualListComponent, isStandalone: true, selector: "mona-grid-virtual-list", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()", "style.--mona-grid-row-height": "gridService.virtualScrollOptions().height + 'px'" } }, viewQueries: [{ propertyName: "addRowScrollElementRef", first: true, predicate: ["addRowScrollElement"], descendants: true, isSignal: true }, { propertyName: "bodyTableElementRef", first: true, predicate: ["bodyTable"], descendants: true, isSignal: true }, { propertyName: "footerScrollElementRef", first: true, predicate: ["footerScrollElement"], descendants: true, isSignal: true }, { propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], ngImport: i0, template: "@if (gridService.addRowVisible()) {\n <div\n class=\"shrink-0 overflow-hidden border-b border-b-border\"\n [style.margin-inline-end.px]=\"gridService.scrollbarGutterWidth()\"\n #addRowScrollElement>\n <table role=\"presentation\" [class]=\"tableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tbody role=\"rowgroup\">\n <tr monaGridAddRow></tr>\n </tbody>\n </table>\n </div>\n}\n\n<cdk-virtual-scroll-viewport\n class=\"flex-1 min-h-0\"\n [itemSize]=\"gridService.virtualScrollOptions().height\"\n [minBufferPx]=\"gridService.virtualGridMinBuffer()\"\n [maxBufferPx]=\"gridService.virtualGridMaxBuffer()\">\n <table role=\"presentation\" #bodyTable [class]=\"tableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tbody role=\"rowgroup\" #bodyElement>\n <ng-container *cdkVirtualFor=\"let bodyRow of bodyRows(); let rowIndex = index; trackBy: trackBodyRow\">\n @let ariaRowIndex = gridService.bodyAriaRowStart() + rowIndex + 1;\n @if (bodyRow.type === \"group\") {\n <tr monaGridGroupRow [group]=\"bodyRow\" [rowIndex]=\"rowIndex\" [ariaRowIndex]=\"ariaRowIndex\"></tr>\n } @else if (bodyRow.type === \"groupFooter\") {\n <tr\n monaGridFooterRow\n [groupKey]=\"bodyRow.groupAggregate.groupKey\"\n [rowIndex]=\"rowIndex\"\n [section]=\"'body'\"\n [ariaLevel]=\"bodyRow.depth + 2\"\n [ariaRowIndex]=\"ariaRowIndex\"></tr>\n } @else {\n <!-- Detail rows aren't drawn with virtual scrolling: they would break the fixed row height. -->\n <tr monaGridRow [row]=\"bodyRow.row\" [index]=\"rowIndex\" [ariaRowIndex]=\"ariaRowIndex\"></tr>\n }\n </ng-container>\n </tbody>\n </table>\n</cdk-virtual-scroll-viewport>\n@if (gridService.contextMenuItems().length !== 0) {\n <mona-contextmenu [target]=\"bodyElement\" [items]=\"gridService.contextMenuItems()\" />\n}\n\n@if (gridService.hasFooter()) {\n <div [class]=\"footerClass()\" [style.margin-inline-end.px]=\"gridService.scrollbarGutterWidth()\" #footerScrollElement>\n <div>\n <table role=\"presentation\" [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tfoot role=\"rowgroup\">\n <tr monaGridFooterRow [ariaRowIndex]=\"gridAriaRowCount()\"></tr>\n </tfoot>\n </table>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: ContextMenuComponent, selector: "mona-contextmenu", inputs: ["ariaLabel", "items", "minWidth", "rounded", "size", "target", "width"], outputs: ["menuClick"] }, { kind: "component", type: CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: GridAddRowComponent, selector: "tr[monaGridAddRow]" }, { kind: "component", type: GridColgroupComponent, selector: "colgroup[monaGridColgroup]" }, { kind: "component", type: GridFooterRowComponent, selector: "tr[monaGridFooterRow]", inputs: ["ariaLevel", "ariaRowIndex", "groupKey", "rowIndex", "section"] }, { kind: "component", type: GridGroupRowComponent, selector: "tr[monaGridGroupRow]", inputs: ["ariaRowIndex", "group", "rowIndex"] }, { kind: "component", type: GridRowComponent, selector: "tr[monaGridRow]", inputs: ["ariaRowIndex", "index", "row"], exportAs: ["monaGridRow"] }] }); }
153
166
  }
154
167
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridVirtualListComponent, decorators: [{
155
168
  type: Component,
156
169
  args: [{ selector: "mona-grid-virtual-list", imports: [
170
+ ContextMenuComponent,
157
171
  CdkVirtualScrollViewport,
158
172
  CdkFixedSizeVirtualScroll,
159
173
  CdkVirtualForOf,
160
174
  GridAddRowComponent,
161
175
  GridColgroupComponent,
162
- GridDetailRowComponent,
163
176
  GridFooterRowComponent,
164
177
  GridGroupRowComponent,
165
178
  GridRowComponent
166
- ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
179
+ ], host: {
167
180
  "[class]": "baseClass()",
168
181
  "[style.--mona-grid-row-height]": "gridService.virtualScrollOptions().height + 'px'"
169
- }, template: "@if (gridService.addRowVisible()) {\n <div\n class=\"shrink-0 overflow-hidden border-b border-b-border\"\n [style.margin-inline-end.px]=\"gridService.scrollbarGutterWidth()\"\n #addRowScrollElement>\n <table role=\"presentation\" [class]=\"tableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tbody role=\"rowgroup\">\n <tr monaGridAddRow></tr>\n </tbody>\n </table>\n </div>\n}\n\n<cdk-virtual-scroll-viewport\n class=\"flex-1 min-h-0\"\n [itemSize]=\"gridService.virtualScrollOptions().height\"\n [minBufferPx]=\"gridService.virtualGridMinBuffer()\"\n [maxBufferPx]=\"gridService.virtualGridMaxBuffer()\">\n <table role=\"presentation\" #bodyTable [class]=\"tableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tbody role=\"rowgroup\" tabindex=\"0\" (focus)=\"onViewportFocus()\">\n <ng-container *cdkVirtualFor=\"let bodyRow of bodyRows(); let rowIndex = index; trackBy: trackBodyRow\">\n @if (bodyRow.type === \"group\") {\n <tr monaGridGroupRow [group]=\"bodyRow\" [rowIndex]=\"rowIndex\"></tr>\n } @else if (bodyRow.type === \"groupFooter\") {\n <tr monaGridFooterRow [groupKey]=\"bodyRow.groupAggregate.groupKey\"></tr>\n } @else {\n <tr monaGridRow [row]=\"bodyRow.row\" [index]=\"rowIndex\"></tr>\n @if (gridService.isRowExpanded(bodyRow.row) && !gridService.rowDragInProgress()) {\n <tr monaGridDetailRow [row]=\"bodyRow.row\"></tr>\n }\n }\n </ng-container>\n </tbody>\n </table>\n</cdk-virtual-scroll-viewport>\n\n@if (gridService.hasFooter()) {\n <div [class]=\"footerClass()\" [style.margin-inline-end.px]=\"gridService.scrollbarGutterWidth()\" #footerScrollElement>\n <div>\n <table role=\"presentation\" [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tfoot role=\"rowgroup\">\n <tr monaGridFooterRow></tr>\n </tfoot>\n </table>\n </div>\n </div>\n}\n" }]
182
+ }, template: "@if (gridService.addRowVisible()) {\n <div\n class=\"shrink-0 overflow-hidden border-b border-b-border\"\n [style.margin-inline-end.px]=\"gridService.scrollbarGutterWidth()\"\n #addRowScrollElement>\n <table role=\"presentation\" [class]=\"tableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tbody role=\"rowgroup\">\n <tr monaGridAddRow></tr>\n </tbody>\n </table>\n </div>\n}\n\n<cdk-virtual-scroll-viewport\n class=\"flex-1 min-h-0\"\n [itemSize]=\"gridService.virtualScrollOptions().height\"\n [minBufferPx]=\"gridService.virtualGridMinBuffer()\"\n [maxBufferPx]=\"gridService.virtualGridMaxBuffer()\">\n <table role=\"presentation\" #bodyTable [class]=\"tableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tbody role=\"rowgroup\" #bodyElement>\n <ng-container *cdkVirtualFor=\"let bodyRow of bodyRows(); let rowIndex = index; trackBy: trackBodyRow\">\n @let ariaRowIndex = gridService.bodyAriaRowStart() + rowIndex + 1;\n @if (bodyRow.type === \"group\") {\n <tr monaGridGroupRow [group]=\"bodyRow\" [rowIndex]=\"rowIndex\" [ariaRowIndex]=\"ariaRowIndex\"></tr>\n } @else if (bodyRow.type === \"groupFooter\") {\n <tr\n monaGridFooterRow\n [groupKey]=\"bodyRow.groupAggregate.groupKey\"\n [rowIndex]=\"rowIndex\"\n [section]=\"'body'\"\n [ariaLevel]=\"bodyRow.depth + 2\"\n [ariaRowIndex]=\"ariaRowIndex\"></tr>\n } @else {\n <!-- Detail rows aren't drawn with virtual scrolling: they would break the fixed row height. -->\n <tr monaGridRow [row]=\"bodyRow.row\" [index]=\"rowIndex\" [ariaRowIndex]=\"ariaRowIndex\"></tr>\n }\n </ng-container>\n </tbody>\n </table>\n</cdk-virtual-scroll-viewport>\n@if (gridService.contextMenuItems().length !== 0) {\n <mona-contextmenu [target]=\"bodyElement\" [items]=\"gridService.contextMenuItems()\" />\n}\n\n@if (gridService.hasFooter()) {\n <div [class]=\"footerClass()\" [style.margin-inline-end.px]=\"gridService.scrollbarGutterWidth()\" #footerScrollElement>\n <div>\n <table role=\"presentation\" [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tfoot role=\"rowgroup\">\n <tr monaGridFooterRow [ariaRowIndex]=\"gridAriaRowCount()\"></tr>\n </tfoot>\n </table>\n </div>\n </div>\n}\n" }]
170
183
  }], 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 }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
171
184
 
172
185
  export { GridVirtualListComponent };
173
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-virtual-list.component-Sa1aAtJ-.mjs.map
186
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-virtual-list.component-DG8Bu4Dy.mjs.map