@nanahoshi/mona-ui 0.20.1 → 0.21.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.
@@ -1,6 +1,6 @@
1
1
  import { PreventableEvent, deepEquals } from '@nanahoshi/mona-ui/common';
2
2
  import * as i0 from '@angular/core';
3
- import { Directive, signal, inject, DOCUMENT, computed, Injector, PLATFORM_ID, effect, Injectable, input, contentChildren, untracked, DestroyRef, output, afterNextRender, model, afterRenderEffect, isDevMode, InjectionToken, contentChild, TemplateRef, forwardRef, Component, ChangeDetectionStrategy, ElementRef, Pipe, linkedSignal, viewChild } from '@angular/core';
3
+ import { Directive, signal, computed, inject, DOCUMENT, Injector, PLATFORM_ID, effect, Injectable, input, contentChildren, untracked, DestroyRef, output, afterNextRender, model, afterRenderEffect, isDevMode, InjectionToken, contentChild, TemplateRef, forwardRef, Component, ChangeDetectionStrategy, ElementRef, afterEveryRender, Pipe, linkedSignal, viewChild } from '@angular/core';
4
4
  import { isPlatformBrowser, DOCUMENT as DOCUMENT$1, NgTemplateOutlet } from '@angular/common';
5
5
  import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
6
  import { form } from '@angular/forms/signals';
@@ -13,7 +13,7 @@ import { ContextMenuItemComponent } from '@nanahoshi/mona-ui/contextmenu';
13
13
  import { CdkDropList, CdkDrag, CdkDragPreview, CdkDragPlaceholder } from '@angular/cdk/drag-drop';
14
14
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
15
15
  import { ChipComponent } from '@nanahoshi/mona-ui/chip';
16
- import { FilterService, FilterMenuComponent } from '@nanahoshi/mona-ui/filter';
16
+ import { FilterService, FilterMenuComponent, FILTER_DEFAULT_MESSAGES } from '@nanahoshi/mona-ui/filter';
17
17
  import { PagerComponent } from '@nanahoshi/mona-ui/pager';
18
18
  import { PlaceholderComponent } from '@nanahoshi/mona-ui/placeholder';
19
19
  import { PopupService, PopupComponent } from '@nanahoshi/mona-ui/popup';
@@ -159,6 +159,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
159
159
  }]
160
160
  }] });
161
161
 
162
+ /** Fixed item height used when virtual scrolling has no explicit height. */
163
+ const GRID_DEFAULT_VIRTUAL_ROW_HEIGHT = 36;
164
+
165
+ function toGridComparableValue(value) {
166
+ if (value instanceof Date) {
167
+ return value.getTime();
168
+ }
169
+ switch (typeof value) {
170
+ case "bigint":
171
+ case "boolean":
172
+ case "number":
173
+ case "string":
174
+ return value;
175
+ default:
176
+ return null;
177
+ }
178
+ }
179
+ /** Nullish and unsupported values sort first ascending, with stable ties. */
180
+ function compareGridComparableValues(left, right) {
181
+ if (left == null) {
182
+ return right == null ? 0 : -1;
183
+ }
184
+ if (right == null) {
185
+ return 1;
186
+ }
187
+ return left < right ? -1 : left > right ? 1 : 0;
188
+ }
189
+
162
190
  class Row {
163
191
  constructor(data, uid = v4()) {
164
192
  this.data = data;
@@ -222,6 +250,7 @@ const GRID_DEFAULT_MESSAGES = {
222
250
  rowReorderDisabledEditing: "Finish editing to reorder rows.",
223
251
  rowReorderDisabledFiltered: "Clear filters to reorder rows.",
224
252
  rowReorderDisabledGrouped: "Clear grouping to reorder rows.",
253
+ rowReorderDisabledServerBinding: "Row reordering isn't available with server binding.",
225
254
  rowReorderDisabledSingleRow: "At least two rows are needed to reorder.",
226
255
  rowReorderDisabledSorted: "Clear sorting to reorder rows.",
227
256
  rowReorderDisabledVirtualScroll: "Row reordering isn't available while virtual scrolling is enabled.",
@@ -238,6 +267,10 @@ const GRID_DEFAULT_MESSAGES = {
238
267
  const GRID_STATE_VERSION = 1;
239
268
  class GridService {
240
269
  #anchorRowKey;
270
+ // Counts how many *selected* keys fall inside the current selection scope, iterating the
271
+ // (usually much smaller) selection rather than rescanning the whole scope on every toggle.
272
+ #bulkSelectionRowKeys;
273
+ #bulkSelectionSelectedCount;
241
274
  #document;
242
275
  #editContext;
243
276
  #editSession;
@@ -251,18 +284,42 @@ class GridService {
251
284
  #reorderableOptions;
252
285
  #resizableOptions;
253
286
  #rowReorderableOptions;
254
- #scrollbarGutterMeasurementSource;
255
- #scrollbarGutterWidth;
256
287
  #rowUidByData;
257
288
  #rowUidByKeyObject;
289
+ #scrollbarGutterMeasurementSource;
290
+ #scrollbarGutterWidth;
291
+ #serverBindingEnabled;
292
+ #serverLoading;
293
+ #serverTotal;
258
294
  #textMeasureCache;
259
- // Counts how many *selected* keys fall inside the current selection scope, iterating the
260
- // (usually much smaller) selection rather than rescanning the whole scope on every toggle.
261
- #bulkSelectionRowKeys;
262
- #bulkSelectionSelectedCount;
295
+ #dataStateEmissionPending;
263
296
  constructor() {
264
297
  this.#anchorRowKey = signal(null, /* @ts-ignore */
265
298
  ...(ngDevMode ? [{ debugName: "#anchorRowKey" }] : /* istanbul ignore next */ []));
299
+ // Counts how many *selected* keys fall inside the current selection scope, iterating the
300
+ // (usually much smaller) selection rather than rescanning the whole scope on every toggle.
301
+ this.#bulkSelectionRowKeys = computed(() => {
302
+ const keys = new Set();
303
+ for (const row of this.bulkSelectionRows()) {
304
+ keys.add(this.getRowSelectionKey(row));
305
+ }
306
+ return keys;
307
+ }, /* @ts-ignore */
308
+ ...(ngDevMode ? [{ debugName: "#bulkSelectionRowKeys" }] : /* istanbul ignore next */ []));
309
+ this.#bulkSelectionSelectedCount = computed(() => {
310
+ const scopeKeys = this.#bulkSelectionRowKeys();
311
+ if (scopeKeys.size === 0) {
312
+ return 0;
313
+ }
314
+ let count = 0;
315
+ for (const key of this.selectedKeys()) {
316
+ if (scopeKeys.has(key)) {
317
+ count++;
318
+ }
319
+ }
320
+ return count;
321
+ }, /* @ts-ignore */
322
+ ...(ngDevMode ? [{ debugName: "#bulkSelectionSelectedCount" }] : /* istanbul ignore next */ []));
266
323
  this.#document = inject(DOCUMENT);
267
324
  this.#editContext = signal(null, /* @ts-ignore */
268
325
  ...(ngDevMode ? [{ debugName: "#editContext" }] : /* istanbul ignore next */ []));
@@ -287,13 +344,21 @@ class GridService {
287
344
  ...(ngDevMode ? [{ debugName: "#resizableOptions" }] : /* istanbul ignore next */ []));
288
345
  this.#rowReorderableOptions = signal({ enabled: false }, /* @ts-ignore */
289
346
  ...(ngDevMode ? [{ debugName: "#rowReorderableOptions" }] : /* istanbul ignore next */ []));
347
+ this.#rowUidByData = new WeakMap();
348
+ this.#rowUidByKeyObject = new WeakMap();
290
349
  this.#scrollbarGutterMeasurementSource = signal("fallback", /* @ts-ignore */
291
350
  ...(ngDevMode ? [{ debugName: "#scrollbarGutterMeasurementSource" }] : /* istanbul ignore next */ []));
292
351
  this.#scrollbarGutterWidth = signal(0, /* @ts-ignore */
293
352
  ...(ngDevMode ? [{ debugName: "#scrollbarGutterWidth" }] : /* istanbul ignore next */ []));
294
- this.#rowUidByData = new WeakMap();
295
- this.#rowUidByKeyObject = new WeakMap();
353
+ this.#serverBindingEnabled = signal(false, /* @ts-ignore */
354
+ ...(ngDevMode ? [{ debugName: "#serverBindingEnabled" }] : /* istanbul ignore next */ []));
355
+ this.#serverLoading = signal(false, /* @ts-ignore */
356
+ ...(ngDevMode ? [{ debugName: "#serverLoading" }] : /* istanbul ignore next */ []));
357
+ this.#serverTotal = signal(0, /* @ts-ignore */
358
+ ...(ngDevMode ? [{ debugName: "#serverTotal" }] : /* istanbul ignore next */ []));
296
359
  this.#textMeasureCache = new Map();
360
+ this.#dataStateEmissionPending = false;
361
+ this.add$ = new Subject();
297
362
  this.addRowData = computed(() => {
298
363
  const session = this.#editSession();
299
364
  return session?.operation === "create" ? session.model() : null;
@@ -301,36 +366,6 @@ class GridService {
301
366
  ...(ngDevMode ? [{ debugName: "addRowData" }] : /* istanbul ignore next */ []));
302
367
  this.addRowVisible = computed(() => this.addRowData() != null, /* @ts-ignore */
303
368
  ...(ngDevMode ? [{ debugName: "addRowVisible" }] : /* istanbul ignore next */ []));
304
- this.add$ = new Subject();
305
- // Counts how many *selected* keys fall inside the current selection scope, iterating the
306
- // (usually much smaller) selection rather than rescanning the whole scope on every toggle.
307
- this.#bulkSelectionRowKeys = computed(() => {
308
- const keys = new Set();
309
- for (const row of this.bulkSelectionRows()) {
310
- keys.add(this.getRowSelectionKey(row));
311
- }
312
- return keys;
313
- }, /* @ts-ignore */
314
- ...(ngDevMode ? [{ debugName: "#bulkSelectionRowKeys" }] : /* istanbul ignore next */ []));
315
- this.#bulkSelectionSelectedCount = computed(() => {
316
- const scopeKeys = this.#bulkSelectionRowKeys();
317
- if (scopeKeys.size === 0) {
318
- return 0;
319
- }
320
- let count = 0;
321
- for (const key of this.selectedKeys()) {
322
- if (scopeKeys.has(key)) {
323
- count++;
324
- }
325
- }
326
- return count;
327
- }, /* @ts-ignore */
328
- ...(ngDevMode ? [{ debugName: "#bulkSelectionSelectedCount" }] : /* istanbul ignore next */ []));
329
- this.allBulkSelectionRowsSelected = computed(() => {
330
- const scopeSize = this.#bulkSelectionRowKeys().size;
331
- return scopeSize > 0 && this.#bulkSelectionSelectedCount() === scopeSize;
332
- }, /* @ts-ignore */
333
- ...(ngDevMode ? [{ debugName: "allBulkSelectionRowsSelected" }] : /* istanbul ignore next */ []));
334
369
  this.aggregateColumns = computed(() => {
335
370
  return this.visibleColumns()
336
371
  .where(column => column.kind === "data" && column.aggregate != null)
@@ -349,6 +384,11 @@ class GridService {
349
384
  .select(row => row.data)
350
385
  .toArray(), /* @ts-ignore */
351
386
  ...(ngDevMode ? [{ debugName: "aggregateRows" }] : /* istanbul ignore next */ []));
387
+ this.allBulkSelectionRowsSelected = computed(() => {
388
+ const scopeSize = this.#bulkSelectionRowKeys().size;
389
+ return scopeSize > 0 && this.#bulkSelectionSelectedCount() === scopeSize;
390
+ }, /* @ts-ignore */
391
+ ...(ngDevMode ? [{ debugName: "allBulkSelectionRowsSelected" }] : /* istanbul ignore next */ []));
352
392
  this.appliedFilters = signal(ImmutableDictionary.create(), /* @ts-ignore */
353
393
  ...(ngDevMode ? [{ debugName: "appliedFilters" }] : /* istanbul ignore next */ []));
354
394
  this.appliedGroupSorts = signal(ImmutableDictionary.create(), /* @ts-ignore */
@@ -367,8 +407,8 @@ class GridService {
367
407
  return this.viewRows();
368
408
  }, /* @ts-ignore */
369
409
  ...(ngDevMode ? [{ debugName: "bulkSelectionRows" }] : /* istanbul ignore next */ []));
370
- this.cellEdit$ = new Subject();
371
410
  this.cancel$ = new Subject();
411
+ this.cellEdit$ = new Subject();
372
412
  /** Set of currently collapsed group keys (global, shared by both paginated and virtual list). */
373
413
  this.collapsedGroupKeys = signal(ImmutableSet.create(), /* @ts-ignore */
374
414
  ...(ngDevMode ? [{ debugName: "collapsedGroupKeys" }] : /* istanbul ignore next */ []));
@@ -379,18 +419,22 @@ class GridService {
379
419
  ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
380
420
  this.contextMenuItems = signal(ImmutableSet.create(), /* @ts-ignore */
381
421
  ...(ngDevMode ? [{ debugName: "contextMenuItems" }] : /* istanbul ignore next */ []));
382
- this.detailColumnWidth = 36;
422
+ this.dataStateChange$ = new Subject();
383
423
  this.detailColumnOffset = computed(() => this.structuralColumnOffset("detail", this.groupStructuralWidth()), /* @ts-ignore */
384
424
  ...(ngDevMode ? [{ debugName: "detailColumnOffset" }] : /* istanbul ignore next */ []));
425
+ this.detailColumnWidth = 36;
385
426
  this.detailStructuralWidth = computed(() => this.masterDetailTemplate() != null ? this.detailColumnWidth : 0, /* @ts-ignore */
386
427
  ...(ngDevMode ? [{ debugName: "detailStructuralWidth" }] : /* istanbul ignore next */ []));
428
+ this.draggingRowUid = signal(null, /* @ts-ignore */
429
+ ...(ngDevMode ? [{ debugName: "draggingRowUid" }] : /* istanbul ignore next */ []));
430
+ this.edit$ = new Subject();
387
431
  this.editBaseDict = computed(() => {
388
432
  const pairs = this.#editSource().select(item => new KeyValuePair(item.$rowId, item));
389
433
  return ImmutableDictionary.create(pairs);
390
434
  }, /* @ts-ignore */
391
435
  ...(ngDevMode ? [{ debugName: "editBaseDict" }] : /* istanbul ignore next */ []));
392
436
  this.editContext = this.#editContext.asReadonly();
393
- this.edit$ = new Subject();
437
+ this.editSession = this.#editSession.asReadonly();
394
438
  this.editViewDict = computed(() => {
395
439
  const session = this.#editSession();
396
440
  if (session == null || session.operation !== "update" || session.rowUid == null) {
@@ -401,7 +445,6 @@ class GridService {
401
445
  return ImmutableDictionary.create(pairs);
402
446
  }, /* @ts-ignore */
403
447
  ...(ngDevMode ? [{ debugName: "editViewDict" }] : /* istanbul ignore next */ []));
404
- this.editSession = this.#editSession.asReadonly();
405
448
  this.editableOptions = signal({ enabled: false, mode: "cell" }, /* @ts-ignore */
406
449
  ...(ngDevMode ? [{ debugName: "editableOptions" }] : /* istanbul ignore next */ []));
407
450
  this.editingRowUid = computed(() => this.#editContext()?.rowUid ?? null, /* @ts-ignore */
@@ -438,12 +481,12 @@ class GridService {
438
481
  ...(ngDevMode ? [{ debugName: "groupStructuralWidth" }] : /* istanbul ignore next */ []));
439
482
  this.groupableOptions = signal({ enabled: false, showFooter: false }, /* @ts-ignore */
440
483
  ...(ngDevMode ? [{ debugName: "groupableOptions" }] : /* istanbul ignore next */ []));
484
+ this.hasFooter = computed(() => this.aggregateColumns().any(), /* @ts-ignore */
485
+ ...(ngDevMode ? [{ debugName: "hasFooter" }] : /* istanbul ignore next */ []));
441
486
  this.hasLeftLockedColumns = computed(() => this.rowReorderColumnVisible() ||
442
487
  this.selectionColumnVisible() ||
443
488
  this.visibleColumns().any(column => column.locked && column.lockedPosition === "left"), /* @ts-ignore */
444
489
  ...(ngDevMode ? [{ debugName: "hasLeftLockedColumns" }] : /* istanbul ignore next */ []));
445
- this.hasFooter = computed(() => this.aggregateColumns().any(), /* @ts-ignore */
446
- ...(ngDevMode ? [{ debugName: "hasFooter" }] : /* istanbul ignore next */ []));
447
490
  this.hasLiveScrollbarGutterWidth = computed(() => this.#scrollbarGutterMeasurementSource() === "body", /* @ts-ignore */
448
491
  ...(ngDevMode ? [{ debugName: "hasLiveScrollbarGutterWidth" }] : /* istanbul ignore next */ []));
449
492
  this.headerTableElement = signal(null, /* @ts-ignore */
@@ -464,6 +507,13 @@ class GridService {
464
507
  return groupCount > 0 ? (groupCount - 1) * this.groupColumnWidth : null;
465
508
  }, /* @ts-ignore */
466
509
  ...(ngDevMode ? [{ debugName: "lastLeftStructuralOffset" }] : /* istanbul ignore next */ []));
510
+ this.leadingLogicalColumnCount = computed(() => this.visibleStructuralColumns().length, /* @ts-ignore */
511
+ ...(ngDevMode ? [{ debugName: "leadingLogicalColumnCount" }] : /* istanbul ignore next */ []));
512
+ this.leadingStructuralColumnCount = computed(() => this.groupColumns().length + this.visibleStructuralColumns().length, /* @ts-ignore */
513
+ ...(ngDevMode ? [{ debugName: "leadingStructuralColumnCount" }] : /* istanbul ignore next */ []));
514
+ this.leadingStructuralWidth = computed(() => this.groupStructuralWidth() +
515
+ this.visibleStructuralColumns().reduce((total, column) => total + column.width, 0), /* @ts-ignore */
516
+ ...(ngDevMode ? [{ debugName: "leadingStructuralWidth" }] : /* istanbul ignore next */ []));
467
517
  this.leftLockedStructuralWidth = computed(() => {
468
518
  if (!this.hasLeftLockedColumns()) {
469
519
  return 0;
@@ -497,13 +547,6 @@ class GridService {
497
547
  return states;
498
548
  }, /* @ts-ignore */
499
549
  ...(ngDevMode ? [{ debugName: "lockedColumnStates" }] : /* istanbul ignore next */ []));
500
- this.leadingStructuralWidth = computed(() => this.groupStructuralWidth() +
501
- this.visibleStructuralColumns().reduce((total, column) => total + column.width, 0), /* @ts-ignore */
502
- ...(ngDevMode ? [{ debugName: "leadingStructuralWidth" }] : /* istanbul ignore next */ []));
503
- this.leadingStructuralColumnCount = computed(() => this.groupColumns().length + this.visibleStructuralColumns().length, /* @ts-ignore */
504
- ...(ngDevMode ? [{ debugName: "leadingStructuralColumnCount" }] : /* istanbul ignore next */ []));
505
- this.leadingLogicalColumnCount = computed(() => this.visibleStructuralColumns().length, /* @ts-ignore */
506
- ...(ngDevMode ? [{ debugName: "leadingLogicalColumnCount" }] : /* istanbul ignore next */ []));
507
550
  this.masterDetailEmptyCellWidth = computed(() => {
508
551
  return this.detailColumnWidth * (this.groupColumns().length + 1);
509
552
  }, /* @ts-ignore */
@@ -519,6 +562,8 @@ class GridService {
519
562
  this.messages = this.#i18n.componentMessages("grid", GRID_DEFAULT_MESSAGES);
520
563
  this.newRowFactory = signal(() => ({}), /* @ts-ignore */
521
564
  ...(ngDevMode ? [{ debugName: "newRowFactory" }] : /* istanbul ignore next */ []));
565
+ this.pagerTotal = computed(() => this.serverBindingEnabled() ? this.serverTotal() : this.viewRowCount(), /* @ts-ignore */
566
+ ...(ngDevMode ? [{ debugName: "pagerTotal" }] : /* istanbul ignore next */ []));
522
567
  this.paginationState = signal({ page: 1, skip: 0, take: 10 }, /* @ts-ignore */
523
568
  ...(ngDevMode ? [{ debugName: "paginationState" }] : /* istanbul ignore next */ []));
524
569
  this.remove$ = new Subject();
@@ -539,6 +584,9 @@ class GridService {
539
584
  if (!this.rowReorderableOptions().enabled) {
540
585
  return "disabled";
541
586
  }
587
+ if (this.serverBindingEnabled()) {
588
+ return "server-binding";
589
+ }
542
590
  if (this.virtualScrollOptions().enabled) {
543
591
  return "virtual-scroll";
544
592
  }
@@ -568,8 +616,6 @@ class GridService {
568
616
  this.rows = signal(ImmutableList.create(), /* @ts-ignore */
569
617
  ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
570
618
  this.save$ = new Subject();
571
- this.draggingRowUid = signal(null, /* @ts-ignore */
572
- ...(ngDevMode ? [{ debugName: "draggingRowUid" }] : /* istanbul ignore next */ []));
573
619
  this.scrollEnd$ = new Subject();
574
620
  this.scrollEndThreshold = signal(5, /* @ts-ignore */
575
621
  ...(ngDevMode ? [{ debugName: "scrollEndThreshold" }] : /* istanbul ignore next */ []));
@@ -596,16 +642,19 @@ class GridService {
596
642
  .toImmutableSet();
597
643
  }, /* @ts-ignore */
598
644
  ...(ngDevMode ? [{ debugName: "selectedRows" }] : /* istanbul ignore next */ []));
599
- this.selectionColumnWidth = 40;
645
+ this.selectionColumnOffset = computed(() => this.structuralColumnOffset("selection", this.groupStructuralWidth()), /* @ts-ignore */
646
+ ...(ngDevMode ? [{ debugName: "selectionColumnOffset" }] : /* istanbul ignore next */ []));
600
647
  this.selectionColumnVisible = computed(() => {
601
648
  const options = this.selectableOptions();
602
649
  return options.enabled === true && options.showCheckboxes === true;
603
650
  }, /* @ts-ignore */
604
651
  ...(ngDevMode ? [{ debugName: "selectionColumnVisible" }] : /* istanbul ignore next */ []));
605
- this.selectionColumnOffset = computed(() => this.structuralColumnOffset("selection", this.groupStructuralWidth()), /* @ts-ignore */
606
- ...(ngDevMode ? [{ debugName: "selectionColumnOffset" }] : /* istanbul ignore next */ []));
652
+ this.selectionColumnWidth = 40;
607
653
  this.selectionStructuralWidth = computed(() => this.selectionColumnVisible() ? this.selectionColumnWidth : 0, /* @ts-ignore */
608
654
  ...(ngDevMode ? [{ debugName: "selectionStructuralWidth" }] : /* istanbul ignore next */ []));
655
+ this.serverBindingEnabled = this.#serverBindingEnabled.asReadonly();
656
+ this.serverLoading = this.#serverLoading.asReadonly();
657
+ this.serverTotal = this.#serverTotal.asReadonly();
609
658
  this.someBulkSelectionRowsSelected = computed(() => {
610
659
  const scopeSize = this.#bulkSelectionRowKeys().size;
611
660
  const count = this.#bulkSelectionSelectedCount();
@@ -651,6 +700,9 @@ class GridService {
651
700
  }, /* @ts-ignore */
652
701
  ...(ngDevMode ? [{ debugName: "tableWidth" }] : /* istanbul ignore next */ []));
653
702
  this.viewPageRows = computed(() => {
703
+ if (this.serverBindingEnabled()) {
704
+ return this.viewRows();
705
+ }
654
706
  const skip = this.paginationState().skip;
655
707
  const take = this.paginationState().take;
656
708
  const viewRows = this.viewRows();
@@ -664,6 +716,9 @@ class GridService {
664
716
  ...(ngDevMode ? [{ debugName: "viewRowCount" }] : /* istanbul ignore next */ []));
665
717
  this.viewRows = computed(() => {
666
718
  const rows = this.rows();
719
+ if (this.serverBindingEnabled()) {
720
+ return rows;
721
+ }
667
722
  const appliedFilters = this.appliedFilters();
668
723
  const appliedSorts = this.appliedSorts();
669
724
  const groupColumns = this.groupColumns();
@@ -693,7 +748,10 @@ class GridService {
693
748
  ...(ngDevMode ? [{ debugName: "virtualGridMaxBuffer" }] : /* istanbul ignore next */ []));
694
749
  this.virtualGridMinBuffer = signal(0, /* @ts-ignore */
695
750
  ...(ngDevMode ? [{ debugName: "virtualGridMinBuffer" }] : /* istanbul ignore next */ []));
696
- this.virtualScrollOptions = signal({ enabled: false, height: 32 }, /* @ts-ignore */
751
+ this.virtualScrollOptions = signal({
752
+ enabled: false,
753
+ height: GRID_DEFAULT_VIRTUAL_ROW_HEIGHT
754
+ }, /* @ts-ignore */
697
755
  ...(ngDevMode ? [{ debugName: "virtualScrollOptions" }] : /* istanbul ignore next */ []));
698
756
  this.visibleColumns = computed(() => this.columns()
699
757
  .where(column => !column.hidden)
@@ -723,6 +781,7 @@ class GridService {
723
781
  if (options.schemaVersion != null && state.schemaVersion !== options.schemaVersion) {
724
782
  return { ignoredColumns: [], missingColumns: [], status: "rejected-schema" };
725
783
  }
784
+ const previousDataState = this.getDataState();
726
785
  let columns = this.columns().toArray();
727
786
  const columnById = new Map();
728
787
  for (const column of columns) {
@@ -773,6 +832,12 @@ class GridService {
773
832
  if (options.persistPageSize !== false && state.pageSize != null) {
774
833
  this.setPageState({ page: 1, skip: 0, take: state.pageSize });
775
834
  }
835
+ if (this.serverBindingEnabled()) {
836
+ this.setPageState({ skip: 0 });
837
+ }
838
+ if (!deepEquals(previousDataState, this.getDataState())) {
839
+ this.requestDataStateChange({ resetPage: true });
840
+ }
776
841
  return { ignoredColumns, missingColumns, status: "applied" };
777
842
  }
778
843
  canReorderRow(row) {
@@ -837,10 +902,10 @@ class GridService {
837
902
  .where(filter => filter != null)
838
903
  .toArray(),
839
904
  group: this.getGroupDescriptors(this.groupColumns()),
840
- sort: this.appliedSorts()
841
- .values()
842
- .select(state => ({ dir: state.sort.dir, field: state.sort.field }))
843
- .toArray(),
905
+ sort: this.getSortDescriptors().map(sort => ({
906
+ dir: sort.dir,
907
+ field: sort.field
908
+ })),
844
909
  version: GRID_STATE_VERSION
845
910
  };
846
911
  if (options.schemaVersion != null) {
@@ -937,6 +1002,20 @@ class GridService {
937
1002
  getColumnWidth(column) {
938
1003
  return this.normalizeRenderedWidth(column.calculatedWidth ?? column.width ?? column.minWidth ?? 0);
939
1004
  }
1005
+ getDataState() {
1006
+ const { skip, take } = this.paginationState();
1007
+ return {
1008
+ skip,
1009
+ take,
1010
+ sort: this.getSortDescriptors(),
1011
+ filter: this.appliedFilters()
1012
+ .values()
1013
+ .select(state => state.filter)
1014
+ .where(filter => filter != null)
1015
+ .select(filter => this.cloneFilter(filter))
1016
+ .toArray()
1017
+ };
1018
+ }
940
1019
  getGroupDescriptors(columns) {
941
1020
  return select(columns, c => ({
942
1021
  field: c.field,
@@ -948,6 +1027,16 @@ class GridService {
948
1027
  const label = options.rowAriaLabel?.(row.data, absoluteIndex);
949
1028
  return label ?? this.messages().reorderRow(absoluteIndex + 1);
950
1029
  }
1030
+ /** Sort order shared by models, persistence, and server requests. */
1031
+ getSortDescriptors() {
1032
+ const columns = this.columns().toArray();
1033
+ return this.appliedSorts()
1034
+ .values()
1035
+ .toArray()
1036
+ .sort((left, right) => (columns.find(c => c.field === left.sort.field)?.sortIndex ?? Number.MAX_SAFE_INTEGER) -
1037
+ (columns.find(c => c.field === right.sort.field)?.sortIndex ?? Number.MAX_SAFE_INTEGER))
1038
+ .map(state => ({ ...state.sort }));
1039
+ }
951
1040
  handleMultipleSelection(event, row) {
952
1041
  if (event.shiftKey) {
953
1042
  this.selectRowRange(row);
@@ -1121,6 +1210,24 @@ class GridService {
1121
1210
  this.remove$.next(event);
1122
1211
  return !event.isDefaultPrevented();
1123
1212
  }
1213
+ requestDataStateChange(options = {}) {
1214
+ if (!this.serverBindingEnabled()) {
1215
+ return;
1216
+ }
1217
+ if (options.resetPage) {
1218
+ this.setPageState({ skip: 0 });
1219
+ }
1220
+ if (this.#dataStateEmissionPending) {
1221
+ return;
1222
+ }
1223
+ this.#dataStateEmissionPending = true;
1224
+ queueMicrotask(() => {
1225
+ this.#dataStateEmissionPending = false;
1226
+ if (this.serverBindingEnabled()) {
1227
+ this.dataStateChange$.next(this.getDataState());
1228
+ }
1229
+ });
1230
+ }
1124
1231
  requestRowReorder(row, previousPageIndex, currentPageIndex) {
1125
1232
  if (!this.rowReorderInteractionEnabled()) {
1126
1233
  return false;
@@ -1283,7 +1390,19 @@ class GridService {
1283
1390
  this.newRowFactory.set(factory);
1284
1391
  }
1285
1392
  setPageState(state) {
1286
- this.paginationState.update(v => ({ ...v, ...state }));
1393
+ const current = this.paginationState();
1394
+ const take = state.take ?? current.take;
1395
+ const skip = state.skip ?? (state.page != null ? (state.page - 1) * take : current.skip);
1396
+ if (this.serverBindingEnabled()) {
1397
+ this.validateServerInteger(skip, "skip");
1398
+ if (!Number.isSafeInteger(take) || take <= 0) {
1399
+ throw new Error("monaGridServerBinding: pageSize must be a finite positive integer.");
1400
+ }
1401
+ }
1402
+ const page = Math.floor(skip / take) + 1;
1403
+ if (current.skip !== skip || current.take !== take || current.page !== page) {
1404
+ this.paginationState.set({ skip, take, page });
1405
+ }
1287
1406
  }
1288
1407
  setReorderableOptions(options) {
1289
1408
  this.#reorderableOptions.update(v => ({ ...v, ...options }));
@@ -1297,12 +1416,6 @@ class GridService {
1297
1416
  setRowReorderableOptions(options) {
1298
1417
  this.#rowReorderableOptions.set(options);
1299
1418
  }
1300
- setRows(value, rowKey = null) {
1301
- this.rows.set(ImmutableList.create(select(value, r => new Row(r, this.getRowUid(r, rowKey)))));
1302
- }
1303
- setSelectableOptions(options) {
1304
- this.selectableOptions.update(v => ({ ...v, ...options }));
1305
- }
1306
1419
  setRowSelected(row, selected) {
1307
1420
  const key = this.getRowSelectionKey(row);
1308
1421
  const mode = this.selectableOptions().mode;
@@ -1317,14 +1430,44 @@ class GridService {
1317
1430
  }
1318
1431
  this.selectedKeys.update(keys => keys.remove(key));
1319
1432
  }
1320
- setSortableOptions(options) {
1321
- this.sortableOptions.update(v => ({ ...v, ...options }));
1433
+ setRows(value, rowKey = null) {
1434
+ this.rows.set(ImmutableList.create(select(value, r => new Row(r, this.getRowUid(r, rowKey)))));
1322
1435
  }
1323
1436
  setScrollEndThreshold(threshold) {
1324
1437
  this.scrollEndThreshold.set(threshold);
1325
1438
  }
1439
+ setSelectableOptions(options) {
1440
+ this.selectableOptions.update(v => ({ ...v, ...options }));
1441
+ }
1442
+ setServerBindingEnabled(enabled) {
1443
+ if (enabled && this.virtualScrollOptions().enabled) {
1444
+ throw new Error("monaGridServerBinding and monaGridVirtualScroll cannot be enabled together.");
1445
+ }
1446
+ this.#serverBindingEnabled.set(enabled);
1447
+ }
1448
+ setServerLoading(loading) {
1449
+ this.#serverLoading.set(loading);
1450
+ }
1451
+ setServerSkip(skip) {
1452
+ this.validateServerInteger(skip, "skip");
1453
+ this.setPageState({ skip, page: Math.floor(skip / this.paginationState().take) + 1 });
1454
+ }
1455
+ setServerTotal(total) {
1456
+ this.validateServerInteger(total, "total");
1457
+ this.#serverTotal.set(total);
1458
+ }
1459
+ setSortableOptions(options) {
1460
+ this.sortableOptions.update(v => ({ ...v, ...options }));
1461
+ }
1326
1462
  setVirtualScrollOptions(options) {
1327
- this.virtualScrollOptions.update(v => ({ ...v, ...options }));
1463
+ const height = options.height ?? this.virtualScrollOptions().height ?? GRID_DEFAULT_VIRTUAL_ROW_HEIGHT;
1464
+ if (!Number.isFinite(height) || height <= 0) {
1465
+ throw new Error("monaGridVirtualScroll: height must be finite and greater than zero.");
1466
+ }
1467
+ if (options.enabled && this.serverBindingEnabled()) {
1468
+ throw new Error("monaGridServerBinding and monaGridVirtualScroll cannot be enabled together.");
1469
+ }
1470
+ this.virtualScrollOptions.update(v => ({ ...v, ...options, height }));
1328
1471
  }
1329
1472
  startAddRow(originalEvent) {
1330
1473
  const activeSession = this.#editSession();
@@ -1501,17 +1644,31 @@ class GridService {
1501
1644
  const segment = `${field}:${String(value ?? "")}`;
1502
1645
  return parentKey != null ? `${parentKey}/${segment}` : segment;
1503
1646
  }
1504
- compareComparableValues(left, right) {
1505
- if (right == null) {
1506
- return 1;
1647
+ clearEditSession() {
1648
+ this.#editContext.set(null);
1649
+ this.#editSession.set(null);
1650
+ }
1651
+ cloneFilter(filter) {
1652
+ return {
1653
+ ...filter,
1654
+ filters: filter.filters.map(descriptor => "filters" in descriptor
1655
+ ? this.cloneFilter(descriptor)
1656
+ : "value" in descriptor
1657
+ ? { ...descriptor, value: this.cloneFilterValue(descriptor.value) }
1658
+ : { ...descriptor })
1659
+ };
1660
+ }
1661
+ cloneFilterValue(value) {
1662
+ if (value instanceof Date) {
1663
+ return new Date(value.getTime());
1507
1664
  }
1508
- if (left < right) {
1509
- return -1;
1665
+ if (Array.isArray(value)) {
1666
+ return value.map(item => this.cloneFilterValue(item));
1510
1667
  }
1511
- if (left > right) {
1512
- return 1;
1668
+ if (value != null && typeof value === "object") {
1669
+ return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, this.cloneFilterValue(item)]));
1513
1670
  }
1514
- return 0;
1671
+ return value;
1515
1672
  }
1516
1673
  createAggregateBucket(rows, column) {
1517
1674
  const field = column.field;
@@ -1533,14 +1690,14 @@ class GridService {
1533
1690
  if (value == null) {
1534
1691
  continue;
1535
1692
  }
1536
- const comparableValue = this.toComparableValue(value);
1693
+ const comparableValue = toGridComparableValue(value);
1537
1694
  if (comparableValue == null) {
1538
1695
  continue;
1539
1696
  }
1540
- if (min == null || this.compareComparableValues(comparableValue, this.toComparableValue(min)) < 0) {
1697
+ if (min == null || compareGridComparableValues(comparableValue, toGridComparableValue(min)) < 0) {
1541
1698
  min = value;
1542
1699
  }
1543
- if (max == null || this.compareComparableValues(comparableValue, this.toComparableValue(max)) > 0) {
1700
+ if (max == null || compareGridComparableValues(comparableValue, toGridComparableValue(max)) > 0) {
1544
1701
  max = value;
1545
1702
  }
1546
1703
  }
@@ -1555,6 +1712,35 @@ class GridService {
1555
1712
  }
1556
1713
  return aggregates.toImmutableDictionary(e => e.key, e => e.value);
1557
1714
  }
1715
+ createEditSession(options) {
1716
+ const model = signal({ ...options.rowData }, /* @ts-ignore */
1717
+ ...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
1718
+ const context = {
1719
+ column: options.column,
1720
+ field: options.field,
1721
+ isNew: options.isNew,
1722
+ mode: options.mode,
1723
+ operation: options.operation,
1724
+ originalRowData: options.originalRowData,
1725
+ rowData: options.rowData
1726
+ };
1727
+ const schema = this.editableOptions().schema?.(context) ?? null;
1728
+ const editForm = schema == null
1729
+ ? form(model, { injector: this.#injector })
1730
+ : form(model, schema, { injector: this.#injector });
1731
+ return {
1732
+ column: options.column,
1733
+ field: options.field,
1734
+ form: editForm,
1735
+ isNew: options.isNew,
1736
+ mode: options.mode,
1737
+ model,
1738
+ operation: options.operation,
1739
+ originalRowData: options.originalRowData,
1740
+ row: options.row,
1741
+ rowUid: options.rowUid
1742
+ };
1743
+ }
1558
1744
  deserializeCompositeFilter(filter) {
1559
1745
  const filters = filter.filters
1560
1746
  .map(child => "filters" in child ? this.deserializeCompositeFilter(child) : this.deserializeFilterDescriptor(child))
@@ -1700,6 +1886,9 @@ class GridService {
1700
1886
  const rightLockedColumns = columns.filter(column => this.getColumnLockBucket(column) === "right");
1701
1887
  return [...leftLockedColumns, ...unlockedColumns, ...rightLockedColumns];
1702
1888
  }
1889
+ patchSessionField(session, field, value) {
1890
+ session.model.update(rowData => ({ ...rowData, [field]: value }));
1891
+ }
1703
1892
  reconcileColumn(config, previous) {
1704
1893
  const hidden = previous != null && previous.configuredHidden === config.hidden ? previous.hidden : config.hidden;
1705
1894
  return {
@@ -1715,6 +1904,17 @@ class GridService {
1715
1904
  sortIndex: previous?.sortIndex ?? null
1716
1905
  };
1717
1906
  }
1907
+ resolveEditedRowData(rowUid, fallbackRowData) {
1908
+ const editedRowData = this.editViewDict().get(rowUid);
1909
+ if (editedRowData == null) {
1910
+ return fallbackRowData;
1911
+ }
1912
+ const { $rowId: _rowId, ...rowData } = editedRowData;
1913
+ return rowData;
1914
+ }
1915
+ resolveSessionRowData(session) {
1916
+ return { ...session.form().value() };
1917
+ }
1718
1918
  // Range selection is scoped to bulkSelectionRows() (current page, or full view when virtualized/
1719
1919
  // view-scoped) since that's the same click-reachable ordering used for the select-all checkbox.
1720
1920
  selectRowRange(row) {
@@ -1739,66 +1939,6 @@ class GridService {
1739
1939
  const rangeKeys = rows.slice(start, end + 1).map(r => this.getRowSelectionKey(r));
1740
1940
  this.selectedKeys.set(ImmutableSet.create(rangeKeys));
1741
1941
  }
1742
- clearEditSession() {
1743
- this.#editContext.set(null);
1744
- this.#editSession.set(null);
1745
- }
1746
- createEditSession(options) {
1747
- const model = signal({ ...options.rowData }, /* @ts-ignore */
1748
- ...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
1749
- const context = {
1750
- column: options.column,
1751
- field: options.field,
1752
- isNew: options.isNew,
1753
- mode: options.mode,
1754
- operation: options.operation,
1755
- originalRowData: options.originalRowData,
1756
- rowData: options.rowData
1757
- };
1758
- const schema = this.editableOptions().schema?.(context) ?? null;
1759
- const editForm = schema == null
1760
- ? form(model, { injector: this.#injector })
1761
- : form(model, schema, { injector: this.#injector });
1762
- return {
1763
- column: options.column,
1764
- field: options.field,
1765
- form: editForm,
1766
- isNew: options.isNew,
1767
- mode: options.mode,
1768
- model,
1769
- operation: options.operation,
1770
- originalRowData: options.originalRowData,
1771
- row: options.row,
1772
- rowUid: options.rowUid
1773
- };
1774
- }
1775
- patchSessionField(session, field, value) {
1776
- session.model.update(rowData => ({ ...rowData, [field]: value }));
1777
- }
1778
- resolveEditedRowData(rowUid, fallbackRowData) {
1779
- const editedRowData = this.editViewDict().get(rowUid);
1780
- if (editedRowData == null) {
1781
- return fallbackRowData;
1782
- }
1783
- const { $rowId, ...rowData } = editedRowData;
1784
- return rowData;
1785
- }
1786
- resolveSessionRowData(session) {
1787
- return { ...session.form().value() };
1788
- }
1789
- validateSessionForSave(session) {
1790
- const rootField = session.form();
1791
- const editedField = session.mode === "cell" && session.field != null ? session.form[session.field] : null;
1792
- if (editedField == null) {
1793
- rootField.markAsTouched();
1794
- return !rootField.invalid() && !rootField.pending();
1795
- }
1796
- // A cell edit can only fix its own field. Row-level errors still block the save, but an invalid
1797
- // sibling field must not trap the user in a cell whose own value is valid.
1798
- const field = editedField();
1799
- field.markAsTouched();
1800
- return !field.invalid() && !field.pending() && rootField.errors().length === 0;
1801
- }
1802
1942
  serializeFilter(filter) {
1803
1943
  if (filter == null) {
1804
1944
  return null;
@@ -1901,23 +2041,27 @@ class GridService {
1901
2041
  onCleanup(() => resizeObserver.disconnect());
1902
2042
  });
1903
2043
  }
1904
- toComparableValue(value) {
1905
- if (value instanceof Date) {
1906
- return value.getTime();
1907
- }
1908
- switch (typeof value) {
1909
- case "bigint":
1910
- case "boolean":
1911
- case "number":
1912
- case "string":
1913
- return value;
1914
- default:
1915
- return null;
1916
- }
1917
- }
1918
2044
  updateColumns(updater) {
1919
2045
  this.columns.update(columns => ImmutableList.create(this.applyColumnIndexes(columns.select(updater).toArray())));
1920
2046
  }
2047
+ validateServerInteger(value, name) {
2048
+ if (!Number.isSafeInteger(value) || value < 0) {
2049
+ throw new Error(`monaGridServerBinding: ${name} must be a finite non-negative integer.`);
2050
+ }
2051
+ }
2052
+ validateSessionForSave(session) {
2053
+ const rootField = session.form();
2054
+ const editedField = session.mode === "cell" && session.field != null ? session.form[session.field] : null;
2055
+ if (editedField == null) {
2056
+ rootField.markAsTouched();
2057
+ return !rootField.invalid() && !rootField.pending();
2058
+ }
2059
+ // A cell edit can only fix its own field. Row-level errors still block the save, but an invalid
2060
+ // sibling field must not trap the user in a cell whose own value is valid.
2061
+ const field = editedField();
2062
+ field.markAsTouched();
2063
+ return !field.invalid() && !field.pending() && rootField.errors().length === 0;
2064
+ }
1921
2065
  withColumnIndices(columns) {
1922
2066
  return columns.map((column, index) => ({ ...column, index }));
1923
2067
  }
@@ -2617,30 +2761,24 @@ class GridSortableDirective {
2617
2761
  });
2618
2762
  }
2619
2763
  applyColumnSort(column, sortDirection) {
2620
- let appliedSorts = this.#gridService.appliedSorts();
2621
- if (this.#gridService.sortableOptions().mode === "single") {
2622
- this.#gridService
2623
- .columns()
2624
- .where(c => c.field !== column.field)
2625
- .forEach(c => {
2626
- appliedSorts = appliedSorts.remove(c.field);
2627
- });
2628
- }
2764
+ const sorts = this.#gridService.sortableOptions().mode === "single" ? [] : this.#gridService.getSortDescriptors();
2765
+ const index = sorts.findIndex(sort => sort.field === column.field);
2629
2766
  if (sortDirection != null) {
2630
2767
  const sortDescriptor = {
2631
2768
  field: column.field,
2632
2769
  dir: sortDirection
2633
2770
  };
2634
- appliedSorts = appliedSorts.put(column.field, { sort: sortDescriptor });
2771
+ if (index < 0) {
2772
+ sorts.push(sortDescriptor);
2773
+ }
2774
+ else {
2775
+ sorts[index] = sortDescriptor;
2776
+ }
2635
2777
  }
2636
- else {
2637
- appliedSorts = appliedSorts.remove(column.field);
2778
+ else if (index >= 0) {
2779
+ sorts.splice(index, 1);
2638
2780
  }
2639
- this.#gridService.appliedSorts.set(appliedSorts);
2640
- this.#gridService.loadSorts(appliedSorts
2641
- .values()
2642
- .select(s => s.sort)
2643
- .toArray());
2781
+ this.#gridService.loadSorts(sorts);
2644
2782
  }
2645
2783
  #setSubscriptions() {
2646
2784
  this.#gridService.columnSort$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(event => {
@@ -2663,12 +2801,9 @@ class GridSortableDirective {
2663
2801
  nextSortDirection = "asc";
2664
2802
  }
2665
2803
  this.applyColumnSort(column, nextSortDirection);
2666
- const sortDescriptors = this.#gridService
2667
- .appliedSorts()
2668
- .values()
2669
- .select(s => s.sort)
2670
- .toArray();
2804
+ const sortDescriptors = this.#gridService.getSortDescriptors();
2671
2805
  this.sort.set(sortDescriptors);
2806
+ this.#gridService.requestDataStateChange({ resetPage: true });
2672
2807
  });
2673
2808
  }
2674
2809
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridSortableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
@@ -2681,6 +2816,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
2681
2816
  }]
2682
2817
  }], ctorParameters: () => [], propDecorators: { columnSort: [{ type: i0.Output, args: ["columnSort"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaGridSortable", required: false }] }], sort: [{ type: i0.Input, args: [{ isSignal: true, alias: "sort", required: false }] }, { type: i0.Output, args: ["sortChange"] }] } });
2683
2818
 
2819
+ class GridServerBindingDirective {
2820
+ #destroyRef;
2821
+ #gridService;
2822
+ constructor() {
2823
+ this.#destroyRef = inject(DestroyRef);
2824
+ this.#gridService = inject(GridService);
2825
+ /** @description Emitted once per user paging, sorting, or filtering action with the requested server state. */
2826
+ this.dataStateChange = output();
2827
+ /** @description Shows a loading overlay while the application requests server data. */
2828
+ this.loading = input(false, /* @ts-ignore */
2829
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
2830
+ /** @description Zero-based offset of the supplied server page. External changes do not request data. */
2831
+ this.skip = input(0, /* @ts-ignore */
2832
+ ...(ngDevMode ? [{ debugName: "skip" }] : /* istanbul ignore next */ []));
2833
+ /** @description Total matching server records before paging. Must be a non-negative integer. */
2834
+ this.total = input.required(/* @ts-ignore */
2835
+ ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
2836
+ this.#gridService.setServerBindingEnabled(true);
2837
+ effect(() => {
2838
+ const total = this.total();
2839
+ untracked(() => this.#gridService.setServerTotal(total));
2840
+ });
2841
+ effect(() => {
2842
+ const skip = this.skip();
2843
+ untracked(() => this.#gridService.setServerSkip(skip));
2844
+ });
2845
+ effect(() => {
2846
+ const loading = this.loading();
2847
+ untracked(() => this.#gridService.setServerLoading(loading));
2848
+ });
2849
+ this.#gridService.dataStateChange$
2850
+ .pipe(takeUntilDestroyed(this.#destroyRef))
2851
+ .subscribe(state => this.dataStateChange.emit(state));
2852
+ this.#destroyRef.onDestroy(() => this.#gridService.setServerBindingEnabled(false));
2853
+ }
2854
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridServerBindingDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2855
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridServerBindingDirective, isStandalone: true, selector: "mona-grid[monaGridServerBinding]", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skip: { classPropertyName: "skip", publicName: "skip", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { dataStateChange: "dataStateChange" }, ngImport: i0 }); }
2856
+ }
2857
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridServerBindingDirective, decorators: [{
2858
+ type: Directive,
2859
+ args: [{ selector: "mona-grid[monaGridServerBinding]" }]
2860
+ }], ctorParameters: () => [], propDecorators: { dataStateChange: [{ type: i0.Output, args: ["dataStateChange"] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], skip: [{ type: i0.Input, args: [{ isSignal: true, alias: "skip", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: true }] }] } });
2861
+
2684
2862
  class GridStatePersistenceDirective {
2685
2863
  #gridService;
2686
2864
  #initialized;
@@ -2704,7 +2882,10 @@ class GridStatePersistenceDirective {
2704
2882
  afterNextRender({
2705
2883
  read: () => {
2706
2884
  if (this.#isEnabled()) {
2707
- this.loadState(this.state());
2885
+ const result = this.loadState(this.state());
2886
+ if (result.status === "applied") {
2887
+ this.#gridService.requestDataStateChange({ resetPage: true });
2888
+ }
2708
2889
  }
2709
2890
  this.#initialized.set(true);
2710
2891
  }
@@ -2715,7 +2896,11 @@ class GridStatePersistenceDirective {
2715
2896
  if (!this.#initialized() || this.#emittingState || !this.#isEnabled()) {
2716
2897
  return;
2717
2898
  }
2718
- untracked(() => this.loadState(state, options));
2899
+ untracked(() => {
2900
+ if (!deepEquals(state, this.#gridService.captureState(options))) {
2901
+ this.loadState(state, options);
2902
+ }
2903
+ });
2719
2904
  });
2720
2905
  effect(() => {
2721
2906
  if (!this.#initialized() || this.#loadingState || !this.#isEnabled()) {
@@ -2861,7 +3046,7 @@ class GridVirtualScrollDirective {
2861
3046
  constructor() {
2862
3047
  this.#defaultOptions = {
2863
3048
  enabled: true,
2864
- height: 32
3049
+ height: GRID_DEFAULT_VIRTUAL_ROW_HEIGHT
2865
3050
  };
2866
3051
  this.#destroyRef = inject(DestroyRef);
2867
3052
  this.#gridService = inject(GridService);
@@ -3451,8 +3636,12 @@ class GridNavigationService {
3451
3636
  this.#setFocusedCell(key, data);
3452
3637
  }
3453
3638
  }
3454
- unregisterCell(cellKey) {
3639
+ unregisterCell(cellKey, element) {
3455
3640
  const data = this.#cellElementDict().get(cellKey);
3641
+ // A cached view may be destroyed after another view has taken over this logical identity.
3642
+ if (!data || (element != null && data.element !== element)) {
3643
+ return;
3644
+ }
3456
3645
  this.#cellElementDict.update(dict => dict.remove(cellKey));
3457
3646
  if (this.#lastFocusedCellKey() !== cellKey) {
3458
3647
  return;
@@ -3699,7 +3888,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
3699
3888
  type: Injectable
3700
3889
  }] });
3701
3890
 
3702
- const gridRowHeightClass = "h-9";
3891
+ const gridRowMinHeightClass = "min-h-9";
3892
+ const gridVirtualRowHeightClass = "h-(--mona-grid-row-height) min-h-(--mona-grid-row-height) max-h-(--mona-grid-row-height)";
3703
3893
  const gridBaseThemeVariants = cva(`
3704
3894
  relative flex flex-col
3705
3895
  h-full overflow-hidden
@@ -3715,24 +3905,34 @@ const gridBaseThemeVariants = cva(`
3715
3905
  }
3716
3906
  }
3717
3907
  });
3718
- const gridCellBaseThemeVariants = cva(`
3719
- absolute inset-0
3720
- flex w-full
3721
- `);
3908
+ const gridCellBaseThemeVariants = cva("flex w-full min-w-0", {
3909
+ variants: {
3910
+ virtual: {
3911
+ true: "absolute inset-0 overflow-hidden",
3912
+ false: `relative ${gridRowMinHeightClass}`
3913
+ }
3914
+ },
3915
+ defaultVariants: { virtual: false }
3916
+ });
3722
3917
  const gridCellContainerThemeVariants = cva(`
3723
- flex h-full w-full items-center
3918
+ flex w-full min-w-0 items-center
3724
3919
  flex-1 outline-none
3725
- overflow-hidden
3726
3920
  `, {
3727
3921
  variants: {
3922
+ virtual: {
3923
+ true: "h-full overflow-hidden",
3924
+ false: gridRowMinHeightClass
3925
+ },
3728
3926
  editing: {
3729
3927
  true: "px-0",
3730
3928
  false: "px-2"
3731
3929
  }
3732
3930
  },
3733
3931
  defaultVariants: {
3734
- editing: false
3735
- }
3932
+ editing: false,
3933
+ virtual: false
3934
+ },
3935
+ compoundVariants: [{ virtual: false, editing: false, class: "py-1" }]
3736
3936
  });
3737
3937
  const gridCellDirtyIndicatorThemeVariants = cva(`
3738
3938
  absolute top-0 end-0 w-0 h-0
@@ -3741,23 +3941,30 @@ const gridCellDirtyIndicatorThemeVariants = cva(`
3741
3941
  pointer-events-none
3742
3942
  `);
3743
3943
  const gridCellEditorBaseThemeVariants = cva(`
3744
- flex h-full w-full items-center
3944
+ flex w-full min-w-0 items-center
3745
3945
  bg-input-background border border-focus-indicator/40
3746
- `);
3946
+ `, {
3947
+ variants: { virtual: { true: "h-full overflow-hidden", false: gridRowMinHeightClass } },
3948
+ defaultVariants: { virtual: false }
3949
+ });
3747
3950
  const gridCellEditorInputThemeVariants = cva(`
3748
- h-full w-full border-transparent
3951
+ w-full border-transparent
3749
3952
  data-[expanded='true']:border-focus-indicator
3750
3953
  data-[expanded='true']:focus-within:border-focus-indicator/40
3751
- `);
3954
+ `, {
3955
+ variants: { virtual: { true: "h-full", false: "min-h-8" } },
3956
+ defaultVariants: { virtual: false }
3957
+ });
3752
3958
  const gridCellTextThemeVariants = cva(`
3753
3959
  truncate cursor-default select-none
3754
3960
  `);
3755
3961
  const gridSelectAllCellThemeVariants = cva(`
3756
3962
  absolute inset-0 flex h-full w-full items-center justify-center
3757
3963
  `);
3758
- const gridSelectionCellThemeVariants = cva(`
3759
- absolute inset-0 flex h-full w-full items-center justify-center
3760
- `);
3964
+ const gridSelectionCellThemeVariants = cva("flex w-full items-center justify-center", {
3965
+ variants: { virtual: { true: "absolute inset-0 h-full", false: gridRowMinHeightClass } },
3966
+ defaultVariants: { virtual: false }
3967
+ });
3761
3968
  const gridColumnActionsThemeVariants = cva(`
3762
3969
  flex items-center justify-center
3763
3970
  text-xs [&_i]:text-xs
@@ -3794,7 +4001,7 @@ const gridDetailIndentCellThemeVariants = cva(`
3794
4001
  });
3795
4002
  const gridDetailRowThemeVariants = cva(``);
3796
4003
  const gridRowReorderHandleThemeVariants = cva(`
3797
- flex h-full w-full items-center justify-center
4004
+ flex min-h-9 w-full items-center justify-center
3798
4005
  cursor-grab select-none touch-none
3799
4006
  text-muted-foreground
3800
4007
  hover:text-foreground
@@ -3827,7 +4034,10 @@ const gridFooterThemeVariants = cva(`
3827
4034
  const gridFooterTableThemeVariants = cva(`
3828
4035
  border-separate border-spacing-0 table-fixed
3829
4036
  `);
3830
- const gridFooterTableRowThemeVariants = cva(`relative inline-flex [&>td:last-child]:border-e-0`);
4037
+ const gridFooterTableRowThemeVariants = cva(`relative inline-flex [&>td:last-child]:border-e-0`, {
4038
+ variants: { virtual: { true: `${gridVirtualRowHeightClass} overflow-hidden`, false: "" } },
4039
+ defaultVariants: { virtual: false }
4040
+ });
3831
4041
  const gridFooterTableCellThemeVariants = cva(`
3832
4042
  relative overflow-hidden
3833
4043
  text-start align-middle px-2 py-2
@@ -3847,7 +4057,7 @@ const gridGroupRowThemeVariants = cva(`
3847
4057
  relative z-10
3848
4058
  w-full
3849
4059
  bg-surface-muted border-e border-e-border-subtle
3850
- `);
4060
+ `, { variants: { virtual: { true: gridVirtualRowHeightClass, false: "" } }, defaultVariants: { virtual: false } });
3851
4061
  const gridHeaderThemeVariants = cva(`
3852
4062
  flex flex-row grow-0 shrink-0 basis-auto
3853
4063
  overflow-hidden
@@ -3882,7 +4092,7 @@ const gridListBaseThemeVariants = cva(`
3882
4092
  variants: {
3883
4093
  virtual: {
3884
4094
  true: "overflow-x-hidden overflow-y-hidden flex flex-col min-h-0",
3885
- false: "overflow-x-auto overflow-y-scroll"
4095
+ false: "block overflow-x-auto overflow-y-scroll"
3886
4096
  }
3887
4097
  }
3888
4098
  });
@@ -3895,24 +4105,25 @@ const gridListTableRowThemeVariants = cva(``, {
3895
4105
  variants: {
3896
4106
  selected: {
3897
4107
  true: `
3898
- ${gridRowHeightClass}
3899
4108
  bg-(--color-selected) text-(--color-selected-foreground) hover:bg-(--color-selected-active)
3900
4109
  `,
3901
- false: `${gridRowHeightClass} bg-surface hover:bg-hover`
3902
- }
3903
- }
4110
+ false: "bg-surface hover:bg-hover"
4111
+ },
4112
+ virtual: { true: gridVirtualRowHeightClass, false: "" }
4113
+ },
4114
+ defaultVariants: { virtual: false }
3904
4115
  });
3905
4116
  const gridListTableCellThemeVariants = cva(`
3906
4117
  relative
3907
- ${gridRowHeightClass}
3908
4118
  outline-none z-1
3909
- align-top
4119
+ align-middle
3910
4120
  border-b border-b-border-subtle
3911
4121
  after:content-[''] after:block
3912
4122
  after:absolute after:inset-0 after:pointer-events-none
3913
4123
  focus:after:ring-1 focus:after:ring-inset focus:after:ring-focus-indicator/35
3914
4124
  `, {
3915
4125
  variants: {
4126
+ virtual: { true: gridVirtualRowHeightClass, false: "" },
3916
4127
  groupHeader: {
3917
4128
  true: "",
3918
4129
  false: ""
@@ -3946,6 +4157,7 @@ const gridListTableCellThemeVariants = cva(`
3946
4157
  false: ""
3947
4158
  }
3948
4159
  },
4160
+ defaultVariants: { virtual: false },
3949
4161
  compoundVariants: [
3950
4162
  {
3951
4163
  grouped: false,
@@ -4056,6 +4268,7 @@ class GridLogicalCellDirective {
4056
4268
  return "";
4057
4269
  }
4058
4270
  return gridListTableCellThemeVariants({
4271
+ virtual: this.#gridService.virtualScrollOptions().enabled,
4059
4272
  groupHeader: this.groupHeader(),
4060
4273
  lastInRow: this.lastInRow() || this.groupHeader()
4061
4274
  });
@@ -4117,18 +4330,24 @@ class GridLogicalCellDirective {
4117
4330
  ...(ngDevMode ? [undefined, { debugName: "rowUid" }] : /* istanbul ignore next */ []));
4118
4331
  this.section = input(null, /* @ts-ignore */
4119
4332
  ...(ngDevMode ? [{ debugName: "section" }] : /* istanbul ignore next */ []));
4120
- this.toggle = output();
4333
+ this.toggleExpand = output();
4121
4334
  afterRenderEffect({
4122
4335
  read: () => {
4123
- const previousCellKey = this.#cellKey();
4124
- const nextCellKey = this.#gridNavigationService.registerCell(this.#cellData());
4125
- if (previousCellKey && previousCellKey !== nextCellKey) {
4126
- this.#gridNavigationService.unregisterCell(previousCellKey);
4127
- }
4128
- this.#cellKey.set(nextCellKey);
4129
- this.#syncInnerFocusableTabIndexes();
4336
+ const data = this.#cellData();
4337
+ // Cached virtual views must not re-register in response to another view's registry writes.
4338
+ untracked(() => {
4339
+ const previousCellKey = this.#cellKey();
4340
+ const nextCellKey = this.#gridNavigationService.registerCell(data);
4341
+ if (previousCellKey && previousCellKey !== nextCellKey) {
4342
+ this.#gridNavigationService.unregisterCell(previousCellKey, data.element);
4343
+ }
4344
+ this.#cellKey.set(nextCellKey);
4345
+ });
4130
4346
  }
4131
4347
  });
4348
+ afterEveryRender({
4349
+ mixedReadWrite: () => this.#syncInnerFocusableTabIndexes()
4350
+ });
4132
4351
  afterNextRender({
4133
4352
  read: () => {
4134
4353
  this.#setCellCopySubscription();
@@ -4140,7 +4359,7 @@ class GridLogicalCellDirective {
4140
4359
  if (!cellKey) {
4141
4360
  return;
4142
4361
  }
4143
- this.#gridNavigationService.unregisterCell(cellKey);
4362
+ this.#gridNavigationService.unregisterCell(cellKey, this.#hostElementRef.nativeElement);
4144
4363
  });
4145
4364
  }
4146
4365
  focusNextPageTabTarget(backwards) {
@@ -4184,6 +4403,7 @@ class GridLogicalCellDirective {
4184
4403
  const host = this.#hostElementRef.nativeElement;
4185
4404
  const targets = Array.from(host.ownerDocument.querySelectorAll(FOCUSABLE_TARGET_SELECTOR$1));
4186
4405
  return targets.filter(target => target !== host &&
4406
+ !target.matches("mona-grid tbody[role='rowgroup']") &&
4187
4407
  target.getAttribute("tabindex") !== "-1" &&
4188
4408
  !this.#isElementDisabled(target) &&
4189
4409
  !this.#isElementHidden(target));
@@ -4230,8 +4450,8 @@ class GridLogicalCellDirective {
4230
4450
  return this.#gridNavigationService.navigate(cellKey, navigationKey);
4231
4451
  }
4232
4452
  #onEnterKey() {
4233
- if (this.groupHeader() || this.resolvedSection() === "header") {
4234
- this.toggle.emit();
4453
+ if (this.groupHeader() || this.resolvedSection() === "header" || this.resolvedCellKind() === "detail") {
4454
+ this.toggleExpand.emit();
4235
4455
  return;
4236
4456
  }
4237
4457
  if (this.resolvedCellKind() === "command") {
@@ -4280,7 +4500,7 @@ class GridLogicalCellDirective {
4280
4500
  }
4281
4501
  if (event.key === "ArrowDown") {
4282
4502
  if (event.altKey) {
4283
- this.toggle.emit();
4503
+ this.toggleExpand.emit();
4284
4504
  event.preventDefault();
4285
4505
  return;
4286
4506
  }
@@ -4343,11 +4563,13 @@ class GridLogicalCellDirective {
4343
4563
  }
4344
4564
  #syncInnerFocusableTabIndexes() {
4345
4565
  for (const target of this.#getInnerFocusableTargets()) {
4346
- target.setAttribute("tabindex", "-1");
4566
+ if (target.getAttribute("tabindex") !== "-1") {
4567
+ target.setAttribute("tabindex", "-1");
4568
+ }
4347
4569
  }
4348
4570
  }
4349
4571
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridLogicalCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4350
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridLogicalCellDirective, isStandalone: true, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: { cellKind: { classPropertyName: "cellKind", publicName: "cellKind", isSignal: true, isRequired: false, transformFunction: null }, colIndex: { classPropertyName: "colIndex", publicName: "colIndex", isSignal: true, isRequired: true, transformFunction: null }, columnId: { classPropertyName: "columnId", publicName: "columnId", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, firstInRow: { classPropertyName: "firstInRow", publicName: "firstInRow", isSignal: true, isRequired: true, transformFunction: null }, groupHeader: { classPropertyName: "groupHeader", publicName: "groupHeader", isSignal: true, isRequired: false, transformFunction: null }, groupKey: { classPropertyName: "groupKey", publicName: "groupKey", isSignal: true, isRequired: false, transformFunction: null }, lastInRow: { classPropertyName: "lastInRow", publicName: "lastInRow", isSignal: true, isRequired: true, transformFunction: null }, rowIndex: { classPropertyName: "rowIndex", publicName: "rowIndex", isSignal: true, isRequired: true, transformFunction: null }, rowUid: { classPropertyName: "rowUid", publicName: "rowUid", isSignal: true, isRequired: false, transformFunction: null }, section: { classPropertyName: "section", publicName: "section", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { edit: "edit", toggle: "toggle" }, host: { properties: { "class": "baseClass()", "attr.tabindex": "focused() ? 0 : -1", "attr.aria-colindex": "ariaColIndex()" } }, ngImport: i0 }); }
4572
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridLogicalCellDirective, isStandalone: true, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: { cellKind: { classPropertyName: "cellKind", publicName: "cellKind", isSignal: true, isRequired: false, transformFunction: null }, colIndex: { classPropertyName: "colIndex", publicName: "colIndex", isSignal: true, isRequired: true, transformFunction: null }, columnId: { classPropertyName: "columnId", publicName: "columnId", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, firstInRow: { classPropertyName: "firstInRow", publicName: "firstInRow", isSignal: true, isRequired: true, transformFunction: null }, groupHeader: { classPropertyName: "groupHeader", publicName: "groupHeader", isSignal: true, isRequired: false, transformFunction: null }, groupKey: { classPropertyName: "groupKey", publicName: "groupKey", isSignal: true, isRequired: false, transformFunction: null }, lastInRow: { classPropertyName: "lastInRow", publicName: "lastInRow", isSignal: true, isRequired: true, transformFunction: null }, rowIndex: { classPropertyName: "rowIndex", publicName: "rowIndex", isSignal: true, isRequired: true, transformFunction: null }, rowUid: { classPropertyName: "rowUid", publicName: "rowUid", isSignal: true, isRequired: false, transformFunction: null }, section: { classPropertyName: "section", publicName: "section", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { edit: "edit", toggleExpand: "toggleExpand" }, host: { properties: { "class": "baseClass()", "attr.tabindex": "focused() ? 0 : -1", "attr.aria-colindex": "ariaColIndex()", "attr.aria-readonly": "resolvedCellKind() === 'data' ? !editable() : null" } }, ngImport: i0 }); }
4351
4573
  }
4352
4574
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridLogicalCellDirective, decorators: [{
4353
4575
  type: Directive,
@@ -4356,10 +4578,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
4356
4578
  host: {
4357
4579
  "[class]": "baseClass()",
4358
4580
  "[attr.tabindex]": "focused() ? 0 : -1",
4359
- "[attr.aria-colindex]": "ariaColIndex()"
4581
+ "[attr.aria-colindex]": "ariaColIndex()",
4582
+ "[attr.aria-readonly]": "resolvedCellKind() === 'data' ? !editable() : null"
4360
4583
  }
4361
4584
  }]
4362
- }], ctorParameters: () => [], propDecorators: { cellKind: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellKind", required: false }] }], colIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "colIndex", required: true }] }], columnId: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnId", required: false }] }], edit: [{ type: i0.Output, args: ["edit"] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], firstInRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstInRow", required: true }] }], groupHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupHeader", required: false }] }], groupKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupKey", required: false }] }], lastInRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "lastInRow", required: true }] }], rowIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowIndex", required: true }] }], rowUid: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowUid", required: false }] }], section: [{ type: i0.Input, args: [{ isSignal: true, alias: "section", required: false }] }], toggle: [{ type: i0.Output, args: ["toggle"] }] } });
4585
+ }], ctorParameters: () => [], propDecorators: { cellKind: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellKind", required: false }] }], colIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "colIndex", required: true }] }], columnId: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnId", required: false }] }], edit: [{ type: i0.Output, args: ["edit"] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], firstInRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstInRow", required: true }] }], groupHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupHeader", required: false }] }], groupKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupKey", required: false }] }], lastInRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "lastInRow", required: true }] }], rowIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowIndex", required: true }] }], rowUid: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowUid", required: false }] }], section: [{ type: i0.Input, args: [{ isSignal: true, alias: "section", required: false }] }], toggleExpand: [{ type: i0.Output, args: ["toggleExpand"] }] } });
4363
4586
 
4364
4587
  class ColumnReorderEvent extends PreventableEvent {
4365
4588
  #column;
@@ -4418,6 +4641,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
4418
4641
  * suitable for rendering by both paginated and virtual-scrolled grid list components.
4419
4642
  */
4420
4643
  class GridRowFlattenerService {
4644
+ /**
4645
+ * Builds a deterministic, hierarchical group key.
4646
+ *
4647
+ * @example
4648
+ * buildGroupKey(null, "Country", "USA") // => "Country:USA"
4649
+ * buildGroupKey("Country:USA", "City", "NYC") // => "Country:USA/City:NYC"
4650
+ */
4651
+ buildGroupKey(parentKey, field, value) {
4652
+ const segment = `${field}:${String(value ?? "")}`;
4653
+ return parentKey != null ? `${parentKey}/${segment}` : segment;
4654
+ }
4421
4655
  /**
4422
4656
  * Groups rows by the given columns and flattens them into a linear `GridViewRow[]`.
4423
4657
  *
@@ -4425,29 +4659,19 @@ class GridRowFlattenerService {
4425
4659
  * @param groupColumns - The ordered list of columns to group by.
4426
4660
  * @param collapsedKeys - The set of group keys that are currently collapsed.
4427
4661
  * @param groupAggregates - The dictionary of group aggregates.
4662
+ * @param orderGroups - Orders buckets by direction. Disable for client rows already ordered by Query.
4428
4663
  * @returns A flat array of `GridViewRow` items.
4429
4664
  */
4430
- flatten(rows, groupColumns, collapsedKeys, showFooter, groupAggregates = new Dictionary()) {
4665
+ flatten(rows, groupColumns, collapsedKeys, showFooter, groupAggregates = new Dictionary(), orderGroups = true) {
4431
4666
  const columnArray = [...groupColumns];
4432
4667
  if (columnArray.length === 0) {
4433
4668
  return [];
4434
4669
  }
4435
4670
  const result = [];
4436
- this.#flattenRecursive([...rows], columnArray, groupAggregates, 0, null, collapsedKeys, showFooter, result);
4671
+ this.#flattenRecursive([...rows], columnArray, groupAggregates, 0, null, collapsedKeys, showFooter, orderGroups, result);
4437
4672
  return result;
4438
4673
  }
4439
- /**
4440
- * Builds a deterministic, hierarchical group key.
4441
- *
4442
- * @example
4443
- * buildGroupKey(null, "Country", "USA") // => "Country:USA"
4444
- * buildGroupKey("Country:USA", "City", "NYC") // => "Country:USA/City:NYC"
4445
- */
4446
- buildGroupKey(parentKey, field, value) {
4447
- const segment = `${field}:${String(value ?? "")}`;
4448
- return parentKey != null ? `${parentKey}/${segment}` : segment;
4449
- }
4450
- #flattenRecursive(rows, groupColumns, groupAggregates, depth, parentKey, collapsedKeys, showFooter, result) {
4674
+ #flattenRecursive(rows, groupColumns, groupAggregates, depth, parentKey, collapsedKeys, showFooter, orderGroups, result) {
4451
4675
  const column = groupColumns[depth];
4452
4676
  if (column == null) {
4453
4677
  return;
@@ -4465,7 +4689,15 @@ class GridRowFlattenerService {
4465
4689
  }
4466
4690
  groupMap.get(mapKey).push(row);
4467
4691
  }
4468
- for (const mapKey of keyOrder) {
4692
+ const entries = keyOrder.map((mapKey, index) => ({ mapKey, index, rows: groupMap.get(mapKey) }));
4693
+ const direction = column.groupSortDirection;
4694
+ if (orderGroups && direction != null) {
4695
+ entries.sort((left, right) => {
4696
+ const comparison = compareGridComparableValues(toGridComparableValue(left.rows[0].data[field]), toGridComparableValue(right.rows[0].data[field]));
4697
+ return (direction === "asc" ? comparison : -comparison) || left.index - right.index;
4698
+ });
4699
+ }
4700
+ for (const { mapKey } of entries) {
4469
4701
  const groupRows = groupMap.get(mapKey);
4470
4702
  const groupValue = groupRows[0].data[field];
4471
4703
  const groupKey = this.buildGroupKey(parentKey, field, groupValue);
@@ -4482,7 +4714,7 @@ class GridRowFlattenerService {
4482
4714
  const isCollapsed = collapsedKeys.has(groupKey);
4483
4715
  if (!isCollapsed) {
4484
4716
  if (depth < groupColumns.length - 1) {
4485
- this.#flattenRecursive(groupRows, groupColumns, groupAggregates, depth + 1, groupKey, collapsedKeys, showFooter, result);
4717
+ this.#flattenRecursive(groupRows, groupColumns, groupAggregates, depth + 1, groupKey, collapsedKeys, showFooter, orderGroups, result);
4486
4718
  }
4487
4719
  else {
4488
4720
  for (const row of groupRows) {
@@ -4688,7 +4920,13 @@ class GridFilterRowCellComponent {
4688
4920
  return gridFilterRowCellThemeVariants();
4689
4921
  }, /* @ts-ignore */
4690
4922
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
4691
- this.messages = this.#gridService.messages;
4923
+ this.booleanFilterMenuItems = this.#filterService.booleanFilterMenuItems;
4924
+ this.booleanValue = signal(null, /* @ts-ignore */
4925
+ ...(ngDevMode ? [{ debugName: "booleanValue" }] : /* istanbul ignore next */ []));
4926
+ this.dateFilterMenuItems = this.#filterService.dateFilterMenuItems;
4927
+ this.dateValue = signal(null, /* @ts-ignore */
4928
+ ...(ngDevMode ? [{ debugName: "dateValue" }] : /* istanbul ignore next */ []));
4929
+ this.filterMessages = inject(MonaI18nService).componentMessages("filter", FILTER_DEFAULT_MESSAGES);
4692
4930
  this.isFilterActive = computed(() => {
4693
4931
  const op = this.selectedOperator();
4694
4932
  if (op === "isnull" || op === "isnotnull") {
@@ -4712,12 +4950,7 @@ class GridFilterRowCellComponent {
4712
4950
  }
4713
4951
  }, /* @ts-ignore */
4714
4952
  ...(ngDevMode ? [{ debugName: "isFilterActive" }] : /* istanbul ignore next */ []));
4715
- this.booleanFilterMenuItems = this.#filterService.booleanFilterMenuItems;
4716
- this.booleanValue = signal(null, /* @ts-ignore */
4717
- ...(ngDevMode ? [{ debugName: "booleanValue" }] : /* istanbul ignore next */ []));
4718
- this.dateFilterMenuItems = this.#filterService.dateFilterMenuItems;
4719
- this.dateValue = signal(null, /* @ts-ignore */
4720
- ...(ngDevMode ? [{ debugName: "dateValue" }] : /* istanbul ignore next */ []));
4953
+ this.messages = this.#gridService.messages;
4721
4954
  this.numberValue = signal(null, /* @ts-ignore */
4722
4955
  ...(ngDevMode ? [{ debugName: "numberValue" }] : /* istanbul ignore next */ []));
4723
4956
  this.numericFilterMenuItems = this.#filterService.numericFilterMenuItems;
@@ -4802,7 +5035,7 @@ class GridFilterRowCellComponent {
4802
5035
  const operator = this.selectedOperator();
4803
5036
  const field = this.column().field;
4804
5037
  let filter;
4805
- let filterOperator = operator;
5038
+ const filterOperator = operator;
4806
5039
  switch (this.column().dataType) {
4807
5040
  case "string":
4808
5041
  filter = this.#filterService.buildStringFilterDescriptor({
@@ -4878,11 +5111,12 @@ class GridFilterRowCellComponent {
4878
5111
  this.selectedOperator.set(v.operator1);
4879
5112
  this.dateValue.set(v.value1 ?? null);
4880
5113
  break;
4881
- case "boolean":
5114
+ case "boolean": {
4882
5115
  this.selectedOperator.set(v.operator1);
4883
5116
  const item = this.booleanFilterMenuItems.find(i => i.value === v.operator1) ?? null;
4884
5117
  this.booleanValue.set(item);
4885
5118
  break;
5119
+ }
4886
5120
  }
4887
5121
  }
4888
5122
  #setValueChangeSubscriptions() {
@@ -4904,7 +5138,7 @@ class GridFilterRowCellComponent {
4904
5138
  });
4905
5139
  }
4906
5140
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFilterRowCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4907
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridFilterRowCellComponent, isStandalone: true, selector: "mona-grid-filter-row-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { apply: "apply" }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, template: "@let dataType = column().dataType;\n\n@switch (dataType) {\n @case (\"string\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-text-box\n size=\"small\"\n [ngModel]=\"stringValue()\"\n (ngModelChange)=\"onStringChange($event)\"\n [placeholder]=\"messages().filterPlaceholder\" />\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" #filterButton>\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of stringFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n }\n @case (\"number\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-numeric-text-box\n size=\"small\"\n [ngModel]=\"numberValue()\"\n (ngModelChange)=\"onNumberChange($event)\"\n [style.width.%]=\"100\" />\n\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" #filterButton>\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of numericFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n }\n @case (\"date\") {\n <div class=\"flex gap-0.5 w-full\">\n @if (dataType === \"date\") {\n <mona-date-picker\n size=\"small\"\n [ngModel]=\"dateValue()\"\n (ngModelChange)=\"onDateChange($event)\"\n [style.width.%]=\"100\" />\n }\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" #filterButton>\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of dateFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n }\n @case (\"boolean\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-dropdown-list\n size=\"small\"\n [data]=\"booleanFilterMenuItems\"\n textField=\"text\"\n valueField=\"value\"\n [placeholder]=\"messages().all\"\n [ngModel]=\"booleanValue()\"\n (ngModelChange)=\"onBooleanChange($event)\"\n [style.width.%]=\"100\" />\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n }\n}\n\n<ng-template #clearFilterButtonTemplate let-hasValue>\n @if (selectedOperator() != null && hasValue) {\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" (click)=\"onClear()\">\n <svg lucideFunnelX [size]=\"14\" class=\"text-error\"></svg>\n </button>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: 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: 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: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-label", "aria-labelledby", "data", "disabled", "invalid", "itemDisabled", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "value", "valueField", "valuePrimitive"], outputs: ["close", "closed", "disabledChange", "open", "opened", "touch", "valueChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width", "class"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "component", type: PopupMenuCheckboxItemComponent, selector: "mona-popup-menu-checkbox-item", inputs: ["checked", "disabled", "label"], outputs: ["checkedChange", "menuClick"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideFunnelX, selector: "svg[lucideFunnelX], svg[lucideFilterX]" }, { kind: "component", type: LucideFunnel, selector: "svg[lucideFunnel], svg[lucideFilter]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5141
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridFilterRowCellComponent, isStandalone: true, selector: "mona-grid-filter-row-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { apply: "apply" }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, template: "@let dataType = column().dataType;\n\n@switch (dataType) {\n @case (\"string\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-text-box\n size=\"small\"\n [inputAttributes]=\"{ 'aria-label': messages().filterByColumn(column().title) }\"\n [ngModel]=\"stringValue()\"\n (ngModelChange)=\"onStringChange($event)\"\n [placeholder]=\"messages().filterPlaceholder\" />\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n #filterButton\n [attr.aria-label]=\"messages().filterByColumn(column().title)\">\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of stringFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n }\n @case (\"number\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-numeric-text-box\n size=\"small\"\n [aria-label]=\"messages().filterByColumn(column().title)\"\n [ngModel]=\"numberValue()\"\n (ngModelChange)=\"onNumberChange($event)\"\n [style.width.%]=\"100\" />\n\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n #filterButton\n [attr.aria-label]=\"messages().filterByColumn(column().title)\">\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of numericFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n }\n @case (\"date\") {\n <div class=\"flex gap-0.5 w-full\">\n @if (dataType === \"date\") {\n <mona-date-picker\n size=\"small\"\n [ngModel]=\"dateValue()\"\n (ngModelChange)=\"onDateChange($event)\"\n [style.width.%]=\"100\" />\n }\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n #filterButton\n [attr.aria-label]=\"messages().filterByColumn(column().title)\">\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of dateFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n }\n @case (\"boolean\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-dropdown-list\n size=\"small\"\n [data]=\"booleanFilterMenuItems\"\n textField=\"text\"\n valueField=\"value\"\n [placeholder]=\"messages().all\"\n [aria-label]=\"messages().filterByColumn(column().title)\"\n [ngModel]=\"booleanValue()\"\n (ngModelChange)=\"onBooleanChange($event)\"\n [style.width.%]=\"100\" />\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n }\n}\n\n<ng-template #clearFilterButtonTemplate let-hasValue>\n @if (selectedOperator() != null && hasValue) {\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n (click)=\"onClear()\"\n [attr.aria-label]=\"filterMessages().clear\">\n <svg lucideFunnelX [size]=\"14\" class=\"text-error\"></svg>\n </button>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: 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: 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: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-label", "aria-labelledby", "data", "disabled", "invalid", "itemDisabled", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "value", "valueField", "valuePrimitive"], outputs: ["close", "closed", "disabledChange", "open", "opened", "touch", "valueChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width", "class"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "component", type: PopupMenuCheckboxItemComponent, selector: "mona-popup-menu-checkbox-item", inputs: ["checked", "disabled", "label"], outputs: ["checkedChange", "menuClick"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideFunnelX, selector: "svg[lucideFunnelX], svg[lucideFilterX]" }, { kind: "component", type: LucideFunnel, selector: "svg[lucideFunnel], svg[lucideFilter]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4908
5142
  }
4909
5143
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFilterRowCellComponent, decorators: [{
4910
5144
  type: Component,
@@ -4922,7 +5156,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
4922
5156
  LucideFunnel
4923
5157
  ], host: {
4924
5158
  "[class]": "baseClass()"
4925
- }, template: "@let dataType = column().dataType;\n\n@switch (dataType) {\n @case (\"string\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-text-box\n size=\"small\"\n [ngModel]=\"stringValue()\"\n (ngModelChange)=\"onStringChange($event)\"\n [placeholder]=\"messages().filterPlaceholder\" />\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" #filterButton>\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of stringFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n }\n @case (\"number\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-numeric-text-box\n size=\"small\"\n [ngModel]=\"numberValue()\"\n (ngModelChange)=\"onNumberChange($event)\"\n [style.width.%]=\"100\" />\n\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" #filterButton>\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of numericFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n }\n @case (\"date\") {\n <div class=\"flex gap-0.5 w-full\">\n @if (dataType === \"date\") {\n <mona-date-picker\n size=\"small\"\n [ngModel]=\"dateValue()\"\n (ngModelChange)=\"onDateChange($event)\"\n [style.width.%]=\"100\" />\n }\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" #filterButton>\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of dateFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n }\n @case (\"boolean\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-dropdown-list\n size=\"small\"\n [data]=\"booleanFilterMenuItems\"\n textField=\"text\"\n valueField=\"value\"\n [placeholder]=\"messages().all\"\n [ngModel]=\"booleanValue()\"\n (ngModelChange)=\"onBooleanChange($event)\"\n [style.width.%]=\"100\" />\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n }\n}\n\n<ng-template #clearFilterButtonTemplate let-hasValue>\n @if (selectedOperator() != null && hasValue) {\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" (click)=\"onClear()\">\n <svg lucideFunnelX [size]=\"14\" class=\"text-error\"></svg>\n </button>\n }\n</ng-template>\n" }]
5159
+ }, template: "@let dataType = column().dataType;\n\n@switch (dataType) {\n @case (\"string\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-text-box\n size=\"small\"\n [inputAttributes]=\"{ 'aria-label': messages().filterByColumn(column().title) }\"\n [ngModel]=\"stringValue()\"\n (ngModelChange)=\"onStringChange($event)\"\n [placeholder]=\"messages().filterPlaceholder\" />\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n #filterButton\n [attr.aria-label]=\"messages().filterByColumn(column().title)\">\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of stringFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n }\n @case (\"number\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-numeric-text-box\n size=\"small\"\n [aria-label]=\"messages().filterByColumn(column().title)\"\n [ngModel]=\"numberValue()\"\n (ngModelChange)=\"onNumberChange($event)\"\n [style.width.%]=\"100\" />\n\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n #filterButton\n [attr.aria-label]=\"messages().filterByColumn(column().title)\">\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of numericFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n }\n @case (\"date\") {\n <div class=\"flex gap-0.5 w-full\">\n @if (dataType === \"date\") {\n <mona-date-picker\n size=\"small\"\n [ngModel]=\"dateValue()\"\n (ngModelChange)=\"onDateChange($event)\"\n [style.width.%]=\"100\" />\n }\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n #filterButton\n [attr.aria-label]=\"messages().filterByColumn(column().title)\">\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of dateFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n }\n @case (\"boolean\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-dropdown-list\n size=\"small\"\n [data]=\"booleanFilterMenuItems\"\n textField=\"text\"\n valueField=\"value\"\n [placeholder]=\"messages().all\"\n [aria-label]=\"messages().filterByColumn(column().title)\"\n [ngModel]=\"booleanValue()\"\n (ngModelChange)=\"onBooleanChange($event)\"\n [style.width.%]=\"100\" />\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n }\n}\n\n<ng-template #clearFilterButtonTemplate let-hasValue>\n @if (selectedOperator() != null && hasValue) {\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n (click)=\"onClear()\"\n [attr.aria-label]=\"filterMessages().clear\">\n <svg lucideFunnelX [size]=\"14\" class=\"text-error\"></svg>\n </button>\n }\n</ng-template>\n" }]
4926
5160
  }], ctorParameters: () => [], propDecorators: { apply: [{ type: i0.Output, args: ["apply"] }], column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }] } });
4927
5161
 
4928
5162
  class GridSelectAllCheckboxComponent {
@@ -5044,19 +5278,18 @@ class GridComponent {
5044
5278
  this.gridHeaderTableElement = viewChild.required("headerTable", /* @ts-ignore */
5045
5279
  ...(ngDevMode ? [{ debugName: "gridHeaderTableElement" }] : /* istanbul ignore next */ []));
5046
5280
  this.gridService = inject(GridService);
5047
- this.messages = this.gridService.messages;
5048
5281
  this.gridWidthSet = signal(false, /* @ts-ignore */
5049
5282
  ...(ngDevMode ? [{ debugName: "gridWidthSet" }] : /* istanbul ignore next */ []));
5050
5283
  this.groupColumnList = viewChild("groupColumnList", /* @ts-ignore */
5051
5284
  ...(ngDevMode ? [{ debugName: "groupColumnList" }] : /* istanbul ignore next */ []));
5052
- this.groupPanelPlaceholderClass = computed(() => {
5053
- return gridGroupPanelPlaceholderThemeVariants();
5054
- }, /* @ts-ignore */
5055
- ...(ngDevMode ? [{ debugName: "groupPanelPlaceholderClass" }] : /* istanbul ignore next */ []));
5056
5285
  this.groupPanelClass = computed(() => {
5057
5286
  return gridGroupPanelThemeVariants();
5058
5287
  }, /* @ts-ignore */
5059
5288
  ...(ngDevMode ? [{ debugName: "groupPanelClass" }] : /* istanbul ignore next */ []));
5289
+ this.groupPanelPlaceholderClass = computed(() => {
5290
+ return gridGroupPanelPlaceholderThemeVariants();
5291
+ }, /* @ts-ignore */
5292
+ ...(ngDevMode ? [{ debugName: "groupPanelPlaceholderClass" }] : /* istanbul ignore next */ []));
5060
5293
  this.groupPanelPlaceholderVisible = signal(true, /* @ts-ignore */
5061
5294
  ...(ngDevMode ? [{ debugName: "groupPanelPlaceholderVisible" }] : /* istanbul ignore next */ []));
5062
5295
  this.groupable = computed(() => this.gridService.groupableOptions().enabled, /* @ts-ignore */
@@ -5067,16 +5300,16 @@ class GridComponent {
5067
5300
  return gridHeaderThemeVariants();
5068
5301
  }, /* @ts-ignore */
5069
5302
  ...(ngDevMode ? [{ debugName: "headerClass" }] : /* istanbul ignore next */ []));
5070
- this.headerMarginRight = computed(() => this.gridService.scrollbarGutterWidth(), /* @ts-ignore */
5071
- ...(ngDevMode ? [{ debugName: "headerMarginRight" }] : /* istanbul ignore next */ []));
5072
- this.headerTableClass = computed(() => {
5073
- return gridHeaderTableThemeVariants();
5074
- }, /* @ts-ignore */
5075
- ...(ngDevMode ? [{ debugName: "headerTableClass" }] : /* istanbul ignore next */ []));
5303
+ this.headerMarginInlineEnd = computed(() => this.gridService.scrollbarGutterWidth(), /* @ts-ignore */
5304
+ ...(ngDevMode ? [{ debugName: "headerMarginInlineEnd" }] : /* istanbul ignore next */ []));
5076
5305
  this.headerTableCellClass = computed(() => {
5077
5306
  return gridHeaderTableCellThemeVariants();
5078
5307
  }, /* @ts-ignore */
5079
5308
  ...(ngDevMode ? [{ debugName: "headerTableCellClass" }] : /* istanbul ignore next */ []));
5309
+ this.headerTableClass = computed(() => {
5310
+ return gridHeaderTableThemeVariants();
5311
+ }, /* @ts-ignore */
5312
+ ...(ngDevMode ? [{ debugName: "headerTableClass" }] : /* istanbul ignore next */ []));
5080
5313
  this.headerTableColumnTitleClass = computed(() => {
5081
5314
  return gridHeaderTableColumnTitleThemeVariants();
5082
5315
  }, /* @ts-ignore */
@@ -5089,6 +5322,7 @@ class GridComponent {
5089
5322
  return gridHeaderTableRowThemeVariants();
5090
5323
  }, /* @ts-ignore */
5091
5324
  ...(ngDevMode ? [{ debugName: "headerTableRowClass" }] : /* istanbul ignore next */ []));
5325
+ this.messages = this.gridService.messages;
5092
5326
  this.noDataClass = computed(() => {
5093
5327
  return gridNoDataThemeVariants();
5094
5328
  }, /* @ts-ignore */
@@ -5138,13 +5372,6 @@ class GridComponent {
5138
5372
  */
5139
5373
  this.resizeMethod = input("fitView", /* @ts-ignore */
5140
5374
  ...(ngDevMode ? [{ debugName: "resizeMethod" }] : /* istanbul ignore next */ []));
5141
- /**
5142
- * @description Field name or selector used to derive a stable identity for each row.
5143
- * The resolved value must be unique within the grid data.
5144
- * @default null
5145
- */
5146
- this.rowKey = input(null, /* @ts-ignore */
5147
- ...(ngDevMode ? [{ debugName: "rowKey" }] : /* istanbul ignore next */ []));
5148
5375
  /**
5149
5376
  * @description Whether the pager is responsive.
5150
5377
  * If set to `true`, the pager will be displayed as a dropdown when the grid width gets smaller.
@@ -5158,6 +5385,13 @@ class GridComponent {
5158
5385
  */
5159
5386
  this.rounded = input("medium", /* @ts-ignore */
5160
5387
  ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
5388
+ /**
5389
+ * @description Field name or selector used to derive a stable identity for each row.
5390
+ * The resolved value must be unique within the grid data.
5391
+ * @default null
5392
+ */
5393
+ this.rowKey = input(null, /* @ts-ignore */
5394
+ ...(ngDevMode ? [{ debugName: "rowKey" }] : /* istanbul ignore next */ []));
5161
5395
  /**
5162
5396
  * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
5163
5397
  * @default ""
@@ -5273,7 +5507,9 @@ class GridComponent {
5273
5507
  this.gridService.appliedFilters.update(dict => dict.remove(column.field));
5274
5508
  this.gridService.setColumnFiltered(column.id, false);
5275
5509
  }
5276
- this.adjustPageAfterFilter();
5510
+ if (!this.gridService.serverBindingEnabled()) {
5511
+ this.adjustPageAfterFilter();
5512
+ }
5277
5513
  const allFilters = this.gridService
5278
5514
  .appliedFilters()
5279
5515
  .values()
@@ -5281,6 +5517,7 @@ class GridComponent {
5281
5517
  .where(f => f != null)
5282
5518
  .toArray();
5283
5519
  this.gridService.filterChange$.next(allFilters);
5520
+ this.gridService.requestDataStateChange({ resetPage: true });
5284
5521
  }
5285
5522
  onColumnMouseEnter(column) {
5286
5523
  if (!this.columnDragging() || this.resizing()) {
@@ -5308,14 +5545,14 @@ class GridComponent {
5308
5545
  }
5309
5546
  this.gridService.columnSort$.next(new ColumnSortEvent(column));
5310
5547
  }
5548
+ onGroupColumnReorder(column, moveAs) {
5549
+ this.gridService.moveGroupColumn(column, moveAs);
5550
+ }
5311
5551
  onGroupingColumnRemove(event, column) {
5312
5552
  event.stopPropagation();
5313
5553
  this.gridService.clearColumnGrouping(column);
5314
5554
  this.groupPanelPlaceholderVisible.set(this.gridService.groupColumns().length === 0);
5315
5555
  }
5316
- onGroupColumnReorder(column, moveAs) {
5317
- this.gridService.moveGroupColumn(column, moveAs);
5318
- }
5319
5556
  onGroupingColumnSort(column) {
5320
5557
  let nextGroupSortDirection = "asc";
5321
5558
  if (column.groupSortDirection === "asc") {
@@ -5328,7 +5565,11 @@ class GridComponent {
5328
5565
  this.gridService.appliedGroupSorts.update(dict => dict.remove(column.field).put(column.field, { sort: { field: column.field, dir: nextGroupSortDirection } }));
5329
5566
  }
5330
5567
  onPageChange(event) {
5568
+ const previous = this.gridService.paginationState();
5331
5569
  this.gridService.setPageState({ page: event.page, skip: event.skip, take: event.take });
5570
+ if (previous.skip !== event.skip || previous.take !== event.take) {
5571
+ this.gridService.requestDataStateChange();
5572
+ }
5332
5573
  if (isPlatformBrowser(this.#platformId)) {
5333
5574
  const scrollableElement = this.#hostElementRef.nativeElement.querySelector("div.mona-grid-list");
5334
5575
  if (scrollableElement) {
@@ -5337,7 +5578,11 @@ class GridComponent {
5337
5578
  }
5338
5579
  }
5339
5580
  onPageSizeChange(data) {
5340
- this.gridService.setPageState({ take: data.newPageSize });
5581
+ const previous = this.gridService.paginationState();
5582
+ this.gridService.setPageState({ skip: 0, take: data.newPageSize });
5583
+ if (previous.skip !== 0 || previous.take !== data.newPageSize) {
5584
+ this.gridService.requestDataStateChange();
5585
+ }
5341
5586
  }
5342
5587
  onToolbarKeydown(event) {
5343
5588
  const targets = this.getToolbarFocusTargets();
@@ -5405,6 +5650,9 @@ class GridComponent {
5405
5650
  }
5406
5651
  return widthByColumnId;
5407
5652
  }
5653
+ getColumnLockBucket(column) {
5654
+ return column.locked ? column.lockedPosition : "unlocked";
5655
+ }
5408
5656
  getTableColumnHeaderCellList() {
5409
5657
  const headerElement = this.gridHeaderElement();
5410
5658
  if (!headerElement) {
@@ -5426,9 +5674,6 @@ class GridComponent {
5426
5674
  }
5427
5675
  return headerCells;
5428
5676
  }
5429
- getColumnLockBucket(column) {
5430
- return column.locked ? column.lockedPosition : "unlocked";
5431
- }
5432
5677
  getToolbarFocusTargets() {
5433
5678
  const toolbarElement = this.toolbarElement()?.nativeElement;
5434
5679
  if (toolbarElement == null) {
@@ -5600,17 +5845,19 @@ class GridComponent {
5600
5845
  }
5601
5846
  }
5602
5847
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5603
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridComponent, isStandalone: true, selector: "mona-grid", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeValues: { classPropertyName: "pageSizeValues", publicName: "pageSizeValues", isSignal: true, isRequired: false, transformFunction: null }, resizeMethod: { classPropertyName: "resizeMethod", publicName: "resizeMethod", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, responsivePager: { classPropertyName: "responsivePager", publicName: "responsivePager", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "grid" }, properties: { "class": "baseClass()", "attr.data-uid": "uid" } }, providers: [GridService, GridNavigationService, GridRowFlattenerService, FilterService], queries: [{ propertyName: "columnDefinitions", predicate: GRID_COLUMN_DEFINITION, isSignal: true }, { propertyName: "gridDetailTemplate", first: true, predicate: GridDetailTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "noDataTemplate", first: true, predicate: GridNoDataTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "toolbarTemplate", first: true, predicate: GridToolbarTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "footerScrollElement", first: true, predicate: ["footerScrollElement"], descendants: true, isSignal: true }, { propertyName: "gridHeaderElement", first: true, predicate: ["gridHeaderElement"], descendants: true, isSignal: true }, { propertyName: "gridHeaderTableElement", first: true, predicate: ["headerTable"], descendants: true, isSignal: true }, { propertyName: "groupColumnList", first: true, predicate: ["groupColumnList"], descendants: true, isSignal: true }, { propertyName: "toolbarElement", first: true, predicate: ["toolbarElement"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (toolbarTemplate()) {\n <div\n class=\"flex min-h-10 items-center gap-2 border-b border-border p-2\"\n #toolbarElement\n (keydown)=\"onToolbarKeydown($event)\">\n <ng-container\n [ngTemplateOutlet]=\"toolbarTemplate() ?? null\"\n [ngTemplateOutletContext]=\"toolbarContext()\"></ng-container>\n <button monaButton size=\"small\" #columnsButton>{{ messages().columns }}</button>\n <mona-popup\n [anchor]=\"columnsButton\"\n [animation]=\"{ leave: [] }\"\n [width]=\"'max-content'\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n #popup>\n <mona-grid-column-chooser\n (apply)=\"popup.closePopup()\"\n (cancel)=\"popup.closePopup()\"></mona-grid-column-chooser>\n </mona-popup>\n </div>\n}\n\n@if (groupable()) {\n <div\n [class]=\"groupPanelClass()\"\n cdkDropList\n #groupColumnList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListEntered)=\"onColumnDragEnterForGrouping()\"\n (cdkDropListExited)=\"onColumnDragExitForGrouping()\"\n (cdkDropListDropped)=\"onColumnDropForGrouping($event)\">\n @if (gridService.groupColumns().length !== 0) {\n @for (groupColumn of gridService.groupColumns(); track $index) {\n <mona-chip\n [removable]=\"true\"\n size=\"small\"\n [rounded]=\"rounded()\"\n (click)=\"onGroupingColumnSort(groupColumn)\"\n (remove)=\"onGroupingColumnRemove($event, groupColumn)\">\n @if (groupColumn.groupSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (groupColumn.groupSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n <span>{{ groupColumn.title }}</span>\n <span class=\"ms-2\" (click)=\"$event.stopPropagation()\" #groupReorder>\n <i class=\"ri-more-2-fill\"></i>\n </span>\n <mona-popup-menu size=\"small\" [target]=\"groupReorder\">\n <mona-popup-menu-item\n [disabled]=\"$first\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'prev')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-left-fill rtl:rotate-180\"></i> {{ messages().moveAsPrevious }}\n </ng-template>\n </mona-popup-menu-item>\n <mona-popup-menu-item\n [disabled]=\"$last\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'next')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-right-fill rtl:rotate-180\"></i> {{ messages().moveAsNext }}\n </ng-template>\n </mona-popup-menu-item>\n </mona-popup-menu>\n </mona-chip>\n }\n } @else if (groupPanelPlaceholderVisible()) {\n <span [class]=\"groupPanelPlaceholderClass()\">{{ messages().dragColumnHeaderToGroup }}</span>\n }\n </div>\n}\n<div [class]=\"headerClass()\" [style.margin-right.px]=\"headerMarginRight()\" #gridHeaderElement>\n <div>\n <table #headerTable [class]=\"headerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <thead role=\"rowgroup\" [style.visibility]=\"!gridWidthSet() ? 'hidden' : undefined\">\n <tr\n cdkDropList\n [cdkDropListConnectedTo]=\"groupable() ? [groupColumnList()!] : []\"\n (cdkDropListDropped)=\"onColumnDrop()\"\n [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"0\"\n [section]=\"'header'\"\n [firstInRow]=\"gridService.groupColumns().length === 0\"\n [lastInRow]=\"\n !gridService.masterDetailTemplate() &&\n !gridService.selectionColumnVisible() &&\n gridService.visibleColumns().length === 0\n \"\n scope=\"col\"\n [attr.aria-label]=\"gridService.messages().rowReorder\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"\n (gridService.rowReorderColumnVisible() ? 1 : 0) +\n (gridService.masterDetailTemplate() ? 1 : 0)\n \"\n [section]=\"'header'\"\n [firstInRow]=\"\n !gridService.rowReorderColumnVisible() &&\n !gridService.masterDetailTemplate() &&\n gridService.groupColumns().length === 0\n \"\n [lastInRow]=\"gridService.visibleColumns().length === 0\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.selectionColumnWidth\">\n @if (\n gridService.selectableOptions().mode === \"multiple\" &&\n gridService.selectableOptions().showSelectAll !== false\n ) {\n <mona-grid-select-all-checkbox />\n }\n </th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <th\n scope=\"col\"\n role=\"columnheader\"\n cdkDrag\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'header'\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [colIndex]=\"colIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"\n colIndex ===\n gridService.leadingLogicalColumnCount() +\n gridService.visibleColumns().length -\n 1\n \"\n (toggle)=\"onColumnSort(column)\"\n [cdkDragData]=\"column\"\n [cdkDragDisabled]=\"isColumnDragDisabled(column)\"\n [class]=\"headerTableCellClass()\"\n (mouseenter)=\"onColumnMouseEnter(column)\"\n (cdkDragEntered)=\"onColumnDragEnter($event)\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n [style.min-width.px]=\"column.minWidth\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.colspan]=\"1\"\n [attr.aria-sort]=\"\n gridService.sortableOptions().enabled\n ? (column.columnSortDirection | columnAriaSort)\n : null\n \">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n\n <div [class]=\"columnActionsClass()\" [attr.data-column-actions]=\"true\">\n @if (gridService.sortableOptions().showIndices && column.sortIndex !== null) {\n <span>{{ column.sortIndex }}</span>\n }\n @if (column.columnSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (column.columnSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n @if (filterMenuEnabled()) {\n @if (column.kind === \"data\" && column.filterable) {\n <mona-grid-filter-menu\n [column]=\"column\"\n [type]=\"column.dataType\"\n (apply)=\"onColumnFilter(column, $event)\"></mona-grid-filter-menu>\n }\n }\n </div>\n </div>\n @if (\n dropColumn() === column &&\n dragColumn() &&\n gridService.reorderableOptions().enabled &&\n !groupingInProgress()\n ) {\n <span [class]=\"columnDropHintClass()\"> </span>\n }\n @if (gridService.resizableOptions().enabled && !columnDragging()) {\n <div\n monaGridColumnResizeHandler\n [column]=\"column\"\n [class]=\"columnResizerClass()\"\n (resizeStart)=\"onColumnResizeStart()\"\n (resizeEnd)=\"onColumnResizeEnd($event)\"></div>\n }\n <ng-template cdkDragPreview>\n <div [class]=\"columnDragPreviewClass()\">\n <span>{{ column.title }}</span>\n </div>\n </ng-template>\n <ng-template cdkDragPlaceholder>\n @if (groupingInProgress()) {\n <mona-chip\n style=\"z-index: 10; pointer-events: none\"\n [removable]=\"true\"\n [rounded]=\"rounded()\"\n >{{ column.title }}</mona-chip\n >\n }\n </ng-template>\n </th>\n @if (columnDragging() && dragColumn() === column) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [class]=\"headerTableCellClass()\"\n [style.min-width.px]=\"column.minWidth\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n </div>\n </th>\n }\n }\n </tr>\n @if (filterRowEnabled()) {\n <tr role=\"row\" [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-e border-border overflow-hidden\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.aria-label]=\"messages().filterByColumn(column.title)\">\n @if (column.kind === \"data\" && column.field && column.filterable) {\n <mona-grid-filter-row-cell\n [column]=\"column\"\n (apply)=\"onColumnFilter(column, $event)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n </table>\n </div>\n</div>\n\n@defer (when gridWidthSet()) {\n @if (gridService.virtualScrollOptions().enabled) {\n @if (gridService.viewRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-virtual-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewRows()\"></mona-grid-virtual-list>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n } @else {\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewPageRows()\"></mona-grid-list>\n @if (footerVisible()) {\n <div\n [class]=\"footerClass()\"\n [style.margin-right.px]=\"gridService.scrollbarGutterWidth()\"\n #footerScrollElement\n data-grid-footer-scroll>\n <div>\n <table [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tfoot role=\"rowgroup\">\n <tr [class]=\"footerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n [footerCellWidth]=\"gridService.rowReorderColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n [footerCellWidth]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [footerColumn]=\"column\">\n <mona-grid-footer-cell\n [column]=\"column\"\n [columnIndex]=\"$index\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n }\n <mona-pager\n class=\"border-0 border-t border-t-border rounded-ss-none rounded-se-none\"\n [skip]=\"gridService.paginationState().skip\"\n [pageSize]=\"gridService.paginationState().take\"\n [total]=\"gridService.viewRowCount()\"\n [size]=\"'small'\"\n [rounded]=\"rounded()\"\n [pageInput]=\"true\"\n [pageSizeValues]=\"pageSizeValues()\"\n [responsive]=\"responsivePager()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n (pageChange)=\"onPageChange($event)\"></mona-pager>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n }\n} @placeholder {\n <mona-placeholder text=\"Loading...\"></mona-placeholder>\n}\n\n<ng-template #emptyGridTemplate>\n <div [class]=\"noDataClass()\">\n @if (noDataTemplate()) {\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n } @else {\n <mona-placeholder [text]=\"gridService.messages().noData\"></mona-placeholder>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: ChipComponent, selector: "mona-chip", inputs: ["aria-label", "disabled", "label", "look", "removable", "removeLabel", "removeTabIndex", "rounded", "selected", "size", "tabindex", "toggleable", "class", "value"], outputs: ["contentClick", "remove", "selectedChange"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: GridFilterMenuComponent, selector: "mona-grid-filter-menu", inputs: ["column", "type"], outputs: ["apply"] }, { kind: "component", type: GridFilterRowCellComponent, selector: "mona-grid-filter-row-cell", inputs: ["column"], outputs: ["apply"] }, { kind: "directive", type: GridColumnResizeHandlerDirective, selector: "[monaGridColumnResizeHandler]", inputs: ["column"], outputs: ["resizeEnd", "resizeStart"] }, { kind: "directive", type: CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "directive", type: CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: PlaceholderComponent, selector: "mona-placeholder", inputs: ["text", "class"] }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width", "class"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "component", type: PopupMenuItemComponent, selector: "mona-popup-menu-item", inputs: ["disabled", "label"], outputs: ["menuClick"] }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "directive", type: GridLogicalCellDirective, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: ["cellKind", "colIndex", "columnId", "editable", "firstInRow", "groupHeader", "groupKey", "lastInRow", "rowIndex", "rowUid", "section"], outputs: ["edit", "toggle"] }, { kind: "directive", type: GridLockedCellDirective, selector: "td[monaGridLockedCell], th[monaGridLockedCell]", inputs: ["column", "groupPrefixWidth", "lockedCellHeader", "lockedStructuralOffset", "structuralColumn"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: PopupComponent, selector: "mona-popup", inputs: ["anchor", "anchorConnectionPoint", "animation", "backdropClass", "closeOnBackdropClick", "closeOnEscape", "closeOnMouseLeave", "closeOnOutsideClick", "data", "hasBackdrop", "height", "maxHeight", "maxWidth", "minHeight", "minWidth", "offset", "popupClass", "popupConnectionPoint", "popupWrapperClass", "positionStrategy", "positions", "preventClose", "providers", "trigger", "width", "withPush", "closeOnScroll", "restoreFocus", "withScrollTracking"], outputs: ["close", "open"] }, { kind: "component", type: GridColumnChooserComponent, selector: "mona-grid-column-chooser", outputs: ["apply", "cancel"] }, { kind: "component", type: GridSelectAllCheckboxComponent, selector: "mona-grid-select-all-checkbox" }, { kind: "pipe", type: ColumnAriaSortPipe, name: "columnAriaSort" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [NgTemplateOutlet, /* @ts-ignore */
5604
- import('./nanahoshi-mona-ui-grid-grid-footer-cell.component-DLqCAee3.mjs').then(m => m.GridFooterCellComponent), /* @ts-ignore */
5605
- import('./nanahoshi-mona-ui-grid-grid-list.component-hakVMhqu.mjs').then(m => m.GridListComponent), PagerComponent, /* @ts-ignore */
5606
- import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-DoAGYLzr.mjs').then(m => m.GridVirtualListComponent), /* @ts-ignore */
5607
- import('./nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Bd2twji1.mjs').then(m => m.GridFooterTableCellDirective), GridLockedCellDirective]] }); }
5848
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridComponent, isStandalone: true, selector: "mona-grid", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeValues: { classPropertyName: "pageSizeValues", publicName: "pageSizeValues", isSignal: true, isRequired: false, transformFunction: null }, resizeMethod: { classPropertyName: "resizeMethod", publicName: "resizeMethod", isSignal: true, isRequired: false, transformFunction: null }, responsivePager: { classPropertyName: "responsivePager", publicName: "responsivePager", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class": "baseClass()", "attr.data-uid": "uid", "attr.aria-busy": "gridService.serverLoading() || null" } }, providers: [GridService, GridNavigationService, GridRowFlattenerService, FilterService], queries: [{ propertyName: "columnDefinitions", predicate: GRID_COLUMN_DEFINITION, isSignal: true }, { propertyName: "gridDetailTemplate", first: true, predicate: GridDetailTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "noDataTemplate", first: true, predicate: GridNoDataTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "toolbarTemplate", first: true, predicate: GridToolbarTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "footerScrollElement", first: true, predicate: ["footerScrollElement"], descendants: true, isSignal: true }, { propertyName: "gridHeaderElement", first: true, predicate: ["gridHeaderElement"], descendants: true, isSignal: true }, { propertyName: "gridHeaderTableElement", first: true, predicate: ["headerTable"], descendants: true, isSignal: true }, { propertyName: "groupColumnList", first: true, predicate: ["groupColumnList"], descendants: true, isSignal: true }, { propertyName: "toolbarElement", first: true, predicate: ["toolbarElement"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (toolbarTemplate()) {\n <div\n class=\"flex min-h-10 items-center gap-2 border-b border-border p-2\"\n #toolbarElement\n (keydown)=\"onToolbarKeydown($event)\">\n <ng-container\n [ngTemplateOutlet]=\"toolbarTemplate() ?? null\"\n [ngTemplateOutletContext]=\"toolbarContext()\"></ng-container>\n <button monaButton size=\"small\" #columnsButton>{{ messages().columns }}</button>\n <mona-popup\n [anchor]=\"columnsButton\"\n [animation]=\"{ leave: [] }\"\n [width]=\"'max-content'\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n #popup>\n <mona-grid-column-chooser\n (apply)=\"popup.closePopup()\"\n (cancel)=\"popup.closePopup()\"></mona-grid-column-chooser>\n </mona-popup>\n </div>\n}\n\n@if (groupable()) {\n <div\n [class]=\"groupPanelClass()\"\n cdkDropList\n #groupColumnList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListEntered)=\"onColumnDragEnterForGrouping()\"\n (cdkDropListExited)=\"onColumnDragExitForGrouping()\"\n (cdkDropListDropped)=\"onColumnDropForGrouping($event)\">\n @if (gridService.groupColumns().length !== 0) {\n @for (groupColumn of gridService.groupColumns(); track $index) {\n <mona-chip\n [removable]=\"true\"\n size=\"small\"\n [rounded]=\"rounded()\"\n (click)=\"onGroupingColumnSort(groupColumn)\"\n (remove)=\"onGroupingColumnRemove($event, groupColumn)\">\n @if (groupColumn.groupSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (groupColumn.groupSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n <span>{{ groupColumn.title }}</span>\n <span class=\"ms-2\" (click)=\"$event.stopPropagation()\" #groupReorder>\n <i class=\"ri-more-2-fill\"></i>\n </span>\n <mona-popup-menu size=\"small\" [target]=\"groupReorder\">\n <mona-popup-menu-item\n [disabled]=\"$first\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'prev')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-left-fill rtl:rotate-180\"></i> {{ messages().moveAsPrevious }}\n </ng-template>\n </mona-popup-menu-item>\n <mona-popup-menu-item\n [disabled]=\"$last\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'next')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-right-fill rtl:rotate-180\"></i> {{ messages().moveAsNext }}\n </ng-template>\n </mona-popup-menu-item>\n </mona-popup-menu>\n </mona-chip>\n }\n } @else if (groupPanelPlaceholderVisible()) {\n <span [class]=\"groupPanelPlaceholderClass()\">{{ messages().dragColumnHeaderToGroup }}</span>\n }\n </div>\n}\n<div class=\"flex flex-col flex-1 min-h-0\" [attr.role]=\"groupable() ? 'treegrid' : 'grid'\">\n <div [class]=\"headerClass()\" [style.margin-inline-end.px]=\"headerMarginInlineEnd()\" #gridHeaderElement>\n <div>\n <table\n role=\"presentation\"\n #headerTable\n [class]=\"headerTableClass()\"\n [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <thead role=\"rowgroup\" [style.visibility]=\"!gridWidthSet() ? 'hidden' : undefined\">\n <tr\n role=\"row\"\n cdkDropList\n [cdkDropListConnectedTo]=\"groupable() ? [groupColumnList()!] : []\"\n (cdkDropListDropped)=\"onColumnDrop()\"\n [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"0\"\n [section]=\"'header'\"\n [firstInRow]=\"gridService.groupColumns().length === 0\"\n [lastInRow]=\"\n !gridService.masterDetailTemplate() &&\n !gridService.selectionColumnVisible() &&\n gridService.visibleColumns().length === 0\n \"\n scope=\"col\"\n [attr.aria-label]=\"gridService.messages().rowReorder\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"\n (gridService.rowReorderColumnVisible() ? 1 : 0) +\n (gridService.masterDetailTemplate() ? 1 : 0)\n \"\n [section]=\"'header'\"\n [firstInRow]=\"\n !gridService.rowReorderColumnVisible() &&\n !gridService.masterDetailTemplate() &&\n gridService.groupColumns().length === 0\n \"\n [lastInRow]=\"gridService.visibleColumns().length === 0\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.selectionColumnWidth\">\n @if (\n gridService.selectableOptions().mode === \"multiple\" &&\n gridService.selectableOptions().showSelectAll !== false\n ) {\n <mona-grid-select-all-checkbox />\n }\n </th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <th\n scope=\"col\"\n role=\"columnheader\"\n cdkDrag\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'header'\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [colIndex]=\"colIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"\n colIndex ===\n gridService.leadingLogicalColumnCount() + gridService.visibleColumns().length - 1\n \"\n (toggle)=\"onColumnSort(column)\"\n [cdkDragData]=\"column\"\n [cdkDragDisabled]=\"isColumnDragDisabled(column)\"\n [class]=\"headerTableCellClass()\"\n (mouseenter)=\"onColumnMouseEnter(column)\"\n (cdkDragEntered)=\"onColumnDragEnter($event)\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n [style.min-width.px]=\"column.minWidth\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.colspan]=\"1\"\n [attr.aria-sort]=\"\n gridService.sortableOptions().enabled\n ? (column.columnSortDirection | columnAriaSort)\n : null\n \">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n\n <div [class]=\"columnActionsClass()\" [attr.data-column-actions]=\"true\">\n @if (gridService.sortableOptions().showIndices && column.sortIndex !== null) {\n <span>{{ column.sortIndex }}</span>\n }\n @if (column.columnSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (column.columnSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n @if (filterMenuEnabled()) {\n @if (column.kind === \"data\" && column.filterable) {\n <mona-grid-filter-menu\n [column]=\"column\"\n [type]=\"column.dataType\"\n (apply)=\"onColumnFilter(column, $event)\"></mona-grid-filter-menu>\n }\n }\n </div>\n </div>\n @if (\n dropColumn() === column &&\n dragColumn() &&\n gridService.reorderableOptions().enabled &&\n !groupingInProgress()\n ) {\n <span [class]=\"columnDropHintClass()\"> </span>\n }\n @if (gridService.resizableOptions().enabled && !columnDragging()) {\n <div\n monaGridColumnResizeHandler\n [column]=\"column\"\n [class]=\"columnResizerClass()\"\n (resizeStart)=\"onColumnResizeStart()\"\n (resizeEnd)=\"onColumnResizeEnd($event)\"></div>\n }\n <ng-template cdkDragPreview>\n <div [class]=\"columnDragPreviewClass()\">\n <span>{{ column.title }}</span>\n </div>\n </ng-template>\n <ng-template cdkDragPlaceholder>\n @if (groupingInProgress()) {\n <mona-chip\n style=\"z-index: 10; pointer-events: none\"\n [removable]=\"true\"\n [rounded]=\"rounded()\"\n >{{ column.title }}</mona-chip\n >\n }\n </ng-template>\n </th>\n @if (columnDragging() && dragColumn() === column) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [class]=\"headerTableCellClass()\"\n [style.min-width.px]=\"column.minWidth\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: column,\n column\n }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n </div>\n </th>\n }\n }\n </tr>\n @if (filterRowEnabled()) {\n <tr role=\"row\" [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-e border-border overflow-hidden\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.aria-label]=\"messages().filterByColumn(column.title)\">\n @if (column.kind === \"data\" && column.field && column.filterable) {\n <mona-grid-filter-row-cell\n [column]=\"column\"\n (apply)=\"onColumnFilter(column, $event)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n </table>\n </div>\n </div>\n\n @defer (when gridWidthSet()) {\n @if (gridService.virtualScrollOptions().enabled) {\n @if (gridService.viewRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-virtual-list [columns]=\"gridService.visibleColumns()\" [data]=\"gridService.viewRows()\" />\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\" />\n }\n } @else {\n <div class=\"relative flex-1 min-h-0\" data-grid-body-region>\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-list [columns]=\"gridService.visibleColumns()\" [data]=\"gridService.viewPageRows()\" />\n } @else if (!gridService.serverLoading()) {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\" />\n }\n @if (gridService.serverLoading()) {\n <div class=\"absolute inset-0 z-20 flex items-center justify-center bg-surface/60\" data-grid-loading>\n <mona-spinner size=\"large\" />\n </div>\n }\n </div>\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n @if (footerVisible()) {\n <div\n [class]=\"footerClass()\"\n [style.margin-inline-end.px]=\"gridService.scrollbarGutterWidth()\"\n #footerScrollElement\n data-grid-footer-scroll>\n <div>\n <table\n role=\"presentation\"\n [class]=\"footerTableClass()\"\n [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tfoot role=\"rowgroup\">\n <tr role=\"row\" [class]=\"footerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n [footerCellWidth]=\"gridService.rowReorderColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n [footerCellWidth]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [footerColumn]=\"column\">\n <mona-grid-footer-cell\n [column]=\"column\"\n [columnIndex]=\"$index\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n }\n }\n }\n } @placeholder {\n <mona-placeholder text=\"Loading...\" />\n }\n</div>\n@if (!gridService.virtualScrollOptions().enabled) {\n @if (gridService.serverBindingEnabled() || gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-pager\n class=\"border-0 border-t border-t-border rounded-ss-none rounded-se-none\"\n [skip]=\"gridService.paginationState().skip\"\n [pageSize]=\"gridService.paginationState().take\"\n [total]=\"gridService.pagerTotal()\"\n [size]=\"'small'\"\n [rounded]=\"rounded()\"\n [pageInput]=\"true\"\n [pageSizeValues]=\"pageSizeValues()\"\n [responsive]=\"responsivePager()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n (pageChange)=\"onPageChange($event)\"></mona-pager>\n }\n}\n\n<ng-template #emptyGridTemplate>\n <div [class]=\"noDataClass()\">\n @if (noDataTemplate()) {\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n } @else {\n <mona-placeholder [text]=\"gridService.messages().noData\"></mona-placeholder>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: ChipComponent, selector: "mona-chip", inputs: ["aria-label", "disabled", "label", "look", "removable", "removeLabel", "removeTabIndex", "rounded", "selected", "size", "tabindex", "toggleable", "class", "value"], outputs: ["contentClick", "remove", "selectedChange"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: GridFilterMenuComponent, selector: "mona-grid-filter-menu", inputs: ["column", "type"], outputs: ["apply"] }, { kind: "component", type: GridFilterRowCellComponent, selector: "mona-grid-filter-row-cell", inputs: ["column"], outputs: ["apply"] }, { kind: "directive", type: GridColumnResizeHandlerDirective, selector: "[monaGridColumnResizeHandler]", inputs: ["column"], outputs: ["resizeEnd", "resizeStart"] }, { kind: "directive", type: CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "component", type: PagerComponent, selector: "mona-pager", inputs: ["firstLast", "navigable", "pageInput", "pageSize", "pageSizeValues", "previousNext", "responsive", "rounded", "showInfo", "size", "skip", "total", "type", "class", "visiblePages"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "directive", type: CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: PlaceholderComponent, selector: "mona-placeholder", inputs: ["text", "class"] }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width", "class"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "component", type: PopupMenuItemComponent, selector: "mona-popup-menu-item", inputs: ["disabled", "label"], outputs: ["menuClick"] }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "directive", type: GridLogicalCellDirective, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: ["cellKind", "colIndex", "columnId", "editable", "firstInRow", "groupHeader", "groupKey", "lastInRow", "rowIndex", "rowUid", "section"], outputs: ["edit", "toggleExpand"] }, { kind: "directive", type: GridLockedCellDirective, selector: "td[monaGridLockedCell], th[monaGridLockedCell]", inputs: ["column", "groupPrefixWidth", "lockedCellHeader", "lockedStructuralOffset", "structuralColumn"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: PopupComponent, selector: "mona-popup", inputs: ["anchor", "anchorConnectionPoint", "animation", "backdropClass", "closeOnBackdropClick", "closeOnEscape", "closeOnMouseLeave", "closeOnOutsideClick", "data", "hasBackdrop", "height", "maxHeight", "maxWidth", "minHeight", "minWidth", "offset", "popupClass", "popupConnectionPoint", "popupWrapperClass", "positionStrategy", "positions", "preventClose", "providers", "trigger", "width", "withPush", "closeOnScroll", "restoreFocus", "withScrollTracking"], outputs: ["close", "open"] }, { kind: "component", type: GridColumnChooserComponent, selector: "mona-grid-column-chooser", outputs: ["apply", "cancel"] }, { kind: "component", type: GridSelectAllCheckboxComponent, selector: "mona-grid-select-all-checkbox" }, { kind: "pipe", type: ColumnAriaSortPipe, name: "columnAriaSort" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [NgTemplateOutlet, /* @ts-ignore */
5849
+ import('./nanahoshi-mona-ui-grid-grid-footer-cell.component-ZdcR20RJ.mjs').then(m => m.GridFooterCellComponent), /* @ts-ignore */
5850
+ import('./nanahoshi-mona-ui-grid-grid-list.component-Dtze5qye.mjs').then(m => m.GridListComponent), /* @ts-ignore */
5851
+ import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-xc8ybFkY.mjs').then(m => m.GridVirtualListComponent), /* @ts-ignore */
5852
+ import('./nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Bu093U9J.mjs').then(m => m.GridFooterTableCellDirective), GridLockedCellDirective, /* @ts-ignore */
5853
+ import('@nanahoshi/mona-ui/spinner').then(m => m.SpinnerComponent)]] }); }
5608
5854
  }
5609
5855
  i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.6", ngImport: i0, type: GridComponent, resolveDeferredDeps: () => [/* @ts-ignore */
5610
- import('./nanahoshi-mona-ui-grid-grid-footer-cell.component-DLqCAee3.mjs').then(m => m.GridFooterCellComponent), /* @ts-ignore */
5611
- import('./nanahoshi-mona-ui-grid-grid-list.component-hakVMhqu.mjs').then(m => m.GridListComponent), /* @ts-ignore */
5612
- import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-DoAGYLzr.mjs').then(m => m.GridVirtualListComponent), /* @ts-ignore */
5613
- import('./nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Bd2twji1.mjs').then(m => m.GridFooterTableCellDirective)], resolveMetadata: (GridFooterCellComponent, GridListComponent, GridVirtualListComponent, GridFooterTableCellDirective) => ({ decorators: [{
5856
+ import('./nanahoshi-mona-ui-grid-grid-footer-cell.component-ZdcR20RJ.mjs').then(m => m.GridFooterCellComponent), /* @ts-ignore */
5857
+ import('./nanahoshi-mona-ui-grid-grid-list.component-Dtze5qye.mjs').then(m => m.GridListComponent), /* @ts-ignore */
5858
+ import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-xc8ybFkY.mjs').then(m => m.GridVirtualListComponent), /* @ts-ignore */
5859
+ import('./nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Bu093U9J.mjs').then(m => m.GridFooterTableCellDirective), /* @ts-ignore */
5860
+ import('@nanahoshi/mona-ui/spinner').then(m => m.SpinnerComponent)], resolveMetadata: (GridFooterCellComponent, GridListComponent, GridVirtualListComponent, GridFooterTableCellDirective, SpinnerComponent) => ({ decorators: [{
5614
5861
  type: Component,
5615
5862
  args: [{ selector: "mona-grid", changeDetection: ChangeDetectionStrategy.OnPush, providers: [GridService, GridNavigationService, GridRowFlattenerService, FilterService], imports: [
5616
5863
  CdkDropList,
@@ -5637,13 +5884,15 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.6", ng
5637
5884
  ButtonDirective,
5638
5885
  PopupComponent,
5639
5886
  GridColumnChooserComponent,
5640
- GridSelectAllCheckboxComponent
5887
+ GridSelectAllCheckboxComponent,
5888
+ SpinnerComponent
5641
5889
  ], host: {
5642
5890
  "[class]": "baseClass()",
5643
5891
  "[attr.data-uid]": "uid",
5644
- role: "grid"
5645
- }, template: "@if (toolbarTemplate()) {\n <div\n class=\"flex min-h-10 items-center gap-2 border-b border-border p-2\"\n #toolbarElement\n (keydown)=\"onToolbarKeydown($event)\">\n <ng-container\n [ngTemplateOutlet]=\"toolbarTemplate() ?? null\"\n [ngTemplateOutletContext]=\"toolbarContext()\"></ng-container>\n <button monaButton size=\"small\" #columnsButton>{{ messages().columns }}</button>\n <mona-popup\n [anchor]=\"columnsButton\"\n [animation]=\"{ leave: [] }\"\n [width]=\"'max-content'\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n #popup>\n <mona-grid-column-chooser\n (apply)=\"popup.closePopup()\"\n (cancel)=\"popup.closePopup()\"></mona-grid-column-chooser>\n </mona-popup>\n </div>\n}\n\n@if (groupable()) {\n <div\n [class]=\"groupPanelClass()\"\n cdkDropList\n #groupColumnList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListEntered)=\"onColumnDragEnterForGrouping()\"\n (cdkDropListExited)=\"onColumnDragExitForGrouping()\"\n (cdkDropListDropped)=\"onColumnDropForGrouping($event)\">\n @if (gridService.groupColumns().length !== 0) {\n @for (groupColumn of gridService.groupColumns(); track $index) {\n <mona-chip\n [removable]=\"true\"\n size=\"small\"\n [rounded]=\"rounded()\"\n (click)=\"onGroupingColumnSort(groupColumn)\"\n (remove)=\"onGroupingColumnRemove($event, groupColumn)\">\n @if (groupColumn.groupSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (groupColumn.groupSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n <span>{{ groupColumn.title }}</span>\n <span class=\"ms-2\" (click)=\"$event.stopPropagation()\" #groupReorder>\n <i class=\"ri-more-2-fill\"></i>\n </span>\n <mona-popup-menu size=\"small\" [target]=\"groupReorder\">\n <mona-popup-menu-item\n [disabled]=\"$first\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'prev')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-left-fill rtl:rotate-180\"></i> {{ messages().moveAsPrevious }}\n </ng-template>\n </mona-popup-menu-item>\n <mona-popup-menu-item\n [disabled]=\"$last\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'next')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-right-fill rtl:rotate-180\"></i> {{ messages().moveAsNext }}\n </ng-template>\n </mona-popup-menu-item>\n </mona-popup-menu>\n </mona-chip>\n }\n } @else if (groupPanelPlaceholderVisible()) {\n <span [class]=\"groupPanelPlaceholderClass()\">{{ messages().dragColumnHeaderToGroup }}</span>\n }\n </div>\n}\n<div [class]=\"headerClass()\" [style.margin-right.px]=\"headerMarginRight()\" #gridHeaderElement>\n <div>\n <table #headerTable [class]=\"headerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <thead role=\"rowgroup\" [style.visibility]=\"!gridWidthSet() ? 'hidden' : undefined\">\n <tr\n cdkDropList\n [cdkDropListConnectedTo]=\"groupable() ? [groupColumnList()!] : []\"\n (cdkDropListDropped)=\"onColumnDrop()\"\n [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"0\"\n [section]=\"'header'\"\n [firstInRow]=\"gridService.groupColumns().length === 0\"\n [lastInRow]=\"\n !gridService.masterDetailTemplate() &&\n !gridService.selectionColumnVisible() &&\n gridService.visibleColumns().length === 0\n \"\n scope=\"col\"\n [attr.aria-label]=\"gridService.messages().rowReorder\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"\n (gridService.rowReorderColumnVisible() ? 1 : 0) +\n (gridService.masterDetailTemplate() ? 1 : 0)\n \"\n [section]=\"'header'\"\n [firstInRow]=\"\n !gridService.rowReorderColumnVisible() &&\n !gridService.masterDetailTemplate() &&\n gridService.groupColumns().length === 0\n \"\n [lastInRow]=\"gridService.visibleColumns().length === 0\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.selectionColumnWidth\">\n @if (\n gridService.selectableOptions().mode === \"multiple\" &&\n gridService.selectableOptions().showSelectAll !== false\n ) {\n <mona-grid-select-all-checkbox />\n }\n </th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <th\n scope=\"col\"\n role=\"columnheader\"\n cdkDrag\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'header'\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [colIndex]=\"colIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"\n colIndex ===\n gridService.leadingLogicalColumnCount() +\n gridService.visibleColumns().length -\n 1\n \"\n (toggle)=\"onColumnSort(column)\"\n [cdkDragData]=\"column\"\n [cdkDragDisabled]=\"isColumnDragDisabled(column)\"\n [class]=\"headerTableCellClass()\"\n (mouseenter)=\"onColumnMouseEnter(column)\"\n (cdkDragEntered)=\"onColumnDragEnter($event)\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n [style.min-width.px]=\"column.minWidth\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.colspan]=\"1\"\n [attr.aria-sort]=\"\n gridService.sortableOptions().enabled\n ? (column.columnSortDirection | columnAriaSort)\n : null\n \">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n\n <div [class]=\"columnActionsClass()\" [attr.data-column-actions]=\"true\">\n @if (gridService.sortableOptions().showIndices && column.sortIndex !== null) {\n <span>{{ column.sortIndex }}</span>\n }\n @if (column.columnSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (column.columnSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n @if (filterMenuEnabled()) {\n @if (column.kind === \"data\" && column.filterable) {\n <mona-grid-filter-menu\n [column]=\"column\"\n [type]=\"column.dataType\"\n (apply)=\"onColumnFilter(column, $event)\"></mona-grid-filter-menu>\n }\n }\n </div>\n </div>\n @if (\n dropColumn() === column &&\n dragColumn() &&\n gridService.reorderableOptions().enabled &&\n !groupingInProgress()\n ) {\n <span [class]=\"columnDropHintClass()\"> </span>\n }\n @if (gridService.resizableOptions().enabled && !columnDragging()) {\n <div\n monaGridColumnResizeHandler\n [column]=\"column\"\n [class]=\"columnResizerClass()\"\n (resizeStart)=\"onColumnResizeStart()\"\n (resizeEnd)=\"onColumnResizeEnd($event)\"></div>\n }\n <ng-template cdkDragPreview>\n <div [class]=\"columnDragPreviewClass()\">\n <span>{{ column.title }}</span>\n </div>\n </ng-template>\n <ng-template cdkDragPlaceholder>\n @if (groupingInProgress()) {\n <mona-chip\n style=\"z-index: 10; pointer-events: none\"\n [removable]=\"true\"\n [rounded]=\"rounded()\"\n >{{ column.title }}</mona-chip\n >\n }\n </ng-template>\n </th>\n @if (columnDragging() && dragColumn() === column) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [class]=\"headerTableCellClass()\"\n [style.min-width.px]=\"column.minWidth\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n </div>\n </th>\n }\n }\n </tr>\n @if (filterRowEnabled()) {\n <tr role=\"row\" [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-e border-border overflow-hidden\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.aria-label]=\"messages().filterByColumn(column.title)\">\n @if (column.kind === \"data\" && column.field && column.filterable) {\n <mona-grid-filter-row-cell\n [column]=\"column\"\n (apply)=\"onColumnFilter(column, $event)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n </table>\n </div>\n</div>\n\n@defer (when gridWidthSet()) {\n @if (gridService.virtualScrollOptions().enabled) {\n @if (gridService.viewRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-virtual-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewRows()\"></mona-grid-virtual-list>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n } @else {\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewPageRows()\"></mona-grid-list>\n @if (footerVisible()) {\n <div\n [class]=\"footerClass()\"\n [style.margin-right.px]=\"gridService.scrollbarGutterWidth()\"\n #footerScrollElement\n data-grid-footer-scroll>\n <div>\n <table [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tfoot role=\"rowgroup\">\n <tr [class]=\"footerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n [footerCellWidth]=\"gridService.rowReorderColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n [footerCellWidth]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [footerColumn]=\"column\">\n <mona-grid-footer-cell\n [column]=\"column\"\n [columnIndex]=\"$index\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n }\n <mona-pager\n class=\"border-0 border-t border-t-border rounded-ss-none rounded-se-none\"\n [skip]=\"gridService.paginationState().skip\"\n [pageSize]=\"gridService.paginationState().take\"\n [total]=\"gridService.viewRowCount()\"\n [size]=\"'small'\"\n [rounded]=\"rounded()\"\n [pageInput]=\"true\"\n [pageSizeValues]=\"pageSizeValues()\"\n [responsive]=\"responsivePager()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n (pageChange)=\"onPageChange($event)\"></mona-pager>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n }\n} @placeholder {\n <mona-placeholder text=\"Loading...\"></mona-placeholder>\n}\n\n<ng-template #emptyGridTemplate>\n <div [class]=\"noDataClass()\">\n @if (noDataTemplate()) {\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n } @else {\n <mona-placeholder [text]=\"gridService.messages().noData\"></mona-placeholder>\n }\n </div>\n</ng-template>\n" }]
5646
- }], ctorParameters: () => [], propDecorators: { columnDefinitions: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GRID_COLUMN_DEFINITION), { isSignal: true }] }], footerScrollElement: [{ type: i0.ViewChild, args: ["footerScrollElement", { isSignal: true }] }], gridDetailTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridDetailTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], gridHeaderElement: [{ type: i0.ViewChild, args: ["gridHeaderElement", { isSignal: true }] }], gridHeaderTableElement: [{ type: i0.ViewChild, args: ["headerTable", { isSignal: true }] }], groupColumnList: [{ type: i0.ViewChild, args: ["groupColumnList", { isSignal: true }] }], noDataTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridNoDataTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], toolbarElement: [{ type: i0.ViewChild, args: ["toolbarElement", { isSignal: true }] }], toolbarTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridToolbarTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], pageSizeValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeValues", required: false }] }], resizeMethod: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeMethod", required: false }] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: false }] }], responsivePager: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsivePager", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } }) });
5892
+ "[attr.aria-busy]": "gridService.serverLoading() || null",
5893
+ role: "group"
5894
+ }, template: "@if (toolbarTemplate()) {\n <div\n class=\"flex min-h-10 items-center gap-2 border-b border-border p-2\"\n #toolbarElement\n (keydown)=\"onToolbarKeydown($event)\">\n <ng-container\n [ngTemplateOutlet]=\"toolbarTemplate() ?? null\"\n [ngTemplateOutletContext]=\"toolbarContext()\"></ng-container>\n <button monaButton size=\"small\" #columnsButton>{{ messages().columns }}</button>\n <mona-popup\n [anchor]=\"columnsButton\"\n [animation]=\"{ leave: [] }\"\n [width]=\"'max-content'\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n #popup>\n <mona-grid-column-chooser\n (apply)=\"popup.closePopup()\"\n (cancel)=\"popup.closePopup()\"></mona-grid-column-chooser>\n </mona-popup>\n </div>\n}\n\n@if (groupable()) {\n <div\n [class]=\"groupPanelClass()\"\n cdkDropList\n #groupColumnList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListEntered)=\"onColumnDragEnterForGrouping()\"\n (cdkDropListExited)=\"onColumnDragExitForGrouping()\"\n (cdkDropListDropped)=\"onColumnDropForGrouping($event)\">\n @if (gridService.groupColumns().length !== 0) {\n @for (groupColumn of gridService.groupColumns(); track $index) {\n <mona-chip\n [removable]=\"true\"\n size=\"small\"\n [rounded]=\"rounded()\"\n (click)=\"onGroupingColumnSort(groupColumn)\"\n (remove)=\"onGroupingColumnRemove($event, groupColumn)\">\n @if (groupColumn.groupSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (groupColumn.groupSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n <span>{{ groupColumn.title }}</span>\n <span class=\"ms-2\" (click)=\"$event.stopPropagation()\" #groupReorder>\n <i class=\"ri-more-2-fill\"></i>\n </span>\n <mona-popup-menu size=\"small\" [target]=\"groupReorder\">\n <mona-popup-menu-item\n [disabled]=\"$first\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'prev')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-left-fill rtl:rotate-180\"></i> {{ messages().moveAsPrevious }}\n </ng-template>\n </mona-popup-menu-item>\n <mona-popup-menu-item\n [disabled]=\"$last\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'next')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-right-fill rtl:rotate-180\"></i> {{ messages().moveAsNext }}\n </ng-template>\n </mona-popup-menu-item>\n </mona-popup-menu>\n </mona-chip>\n }\n } @else if (groupPanelPlaceholderVisible()) {\n <span [class]=\"groupPanelPlaceholderClass()\">{{ messages().dragColumnHeaderToGroup }}</span>\n }\n </div>\n}\n<div class=\"flex flex-col flex-1 min-h-0\" [attr.role]=\"groupable() ? 'treegrid' : 'grid'\">\n <div [class]=\"headerClass()\" [style.margin-inline-end.px]=\"headerMarginInlineEnd()\" #gridHeaderElement>\n <div>\n <table\n role=\"presentation\"\n #headerTable\n [class]=\"headerTableClass()\"\n [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <thead role=\"rowgroup\" [style.visibility]=\"!gridWidthSet() ? 'hidden' : undefined\">\n <tr\n role=\"row\"\n cdkDropList\n [cdkDropListConnectedTo]=\"groupable() ? [groupColumnList()!] : []\"\n (cdkDropListDropped)=\"onColumnDrop()\"\n [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"0\"\n [section]=\"'header'\"\n [firstInRow]=\"gridService.groupColumns().length === 0\"\n [lastInRow]=\"\n !gridService.masterDetailTemplate() &&\n !gridService.selectionColumnVisible() &&\n gridService.visibleColumns().length === 0\n \"\n scope=\"col\"\n [attr.aria-label]=\"gridService.messages().rowReorder\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"\n (gridService.rowReorderColumnVisible() ? 1 : 0) +\n (gridService.masterDetailTemplate() ? 1 : 0)\n \"\n [section]=\"'header'\"\n [firstInRow]=\"\n !gridService.rowReorderColumnVisible() &&\n !gridService.masterDetailTemplate() &&\n gridService.groupColumns().length === 0\n \"\n [lastInRow]=\"gridService.visibleColumns().length === 0\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.selectionColumnWidth\">\n @if (\n gridService.selectableOptions().mode === \"multiple\" &&\n gridService.selectableOptions().showSelectAll !== false\n ) {\n <mona-grid-select-all-checkbox />\n }\n </th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <th\n scope=\"col\"\n role=\"columnheader\"\n cdkDrag\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'header'\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [colIndex]=\"colIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"\n colIndex ===\n gridService.leadingLogicalColumnCount() + gridService.visibleColumns().length - 1\n \"\n (toggle)=\"onColumnSort(column)\"\n [cdkDragData]=\"column\"\n [cdkDragDisabled]=\"isColumnDragDisabled(column)\"\n [class]=\"headerTableCellClass()\"\n (mouseenter)=\"onColumnMouseEnter(column)\"\n (cdkDragEntered)=\"onColumnDragEnter($event)\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n [style.min-width.px]=\"column.minWidth\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.colspan]=\"1\"\n [attr.aria-sort]=\"\n gridService.sortableOptions().enabled\n ? (column.columnSortDirection | columnAriaSort)\n : null\n \">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n\n <div [class]=\"columnActionsClass()\" [attr.data-column-actions]=\"true\">\n @if (gridService.sortableOptions().showIndices && column.sortIndex !== null) {\n <span>{{ column.sortIndex }}</span>\n }\n @if (column.columnSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (column.columnSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n @if (filterMenuEnabled()) {\n @if (column.kind === \"data\" && column.filterable) {\n <mona-grid-filter-menu\n [column]=\"column\"\n [type]=\"column.dataType\"\n (apply)=\"onColumnFilter(column, $event)\"></mona-grid-filter-menu>\n }\n }\n </div>\n </div>\n @if (\n dropColumn() === column &&\n dragColumn() &&\n gridService.reorderableOptions().enabled &&\n !groupingInProgress()\n ) {\n <span [class]=\"columnDropHintClass()\"> </span>\n }\n @if (gridService.resizableOptions().enabled && !columnDragging()) {\n <div\n monaGridColumnResizeHandler\n [column]=\"column\"\n [class]=\"columnResizerClass()\"\n (resizeStart)=\"onColumnResizeStart()\"\n (resizeEnd)=\"onColumnResizeEnd($event)\"></div>\n }\n <ng-template cdkDragPreview>\n <div [class]=\"columnDragPreviewClass()\">\n <span>{{ column.title }}</span>\n </div>\n </ng-template>\n <ng-template cdkDragPlaceholder>\n @if (groupingInProgress()) {\n <mona-chip\n style=\"z-index: 10; pointer-events: none\"\n [removable]=\"true\"\n [rounded]=\"rounded()\"\n >{{ column.title }}</mona-chip\n >\n }\n </ng-template>\n </th>\n @if (columnDragging() && dragColumn() === column) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [class]=\"headerTableCellClass()\"\n [style.min-width.px]=\"column.minWidth\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: column,\n column\n }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n </div>\n </th>\n }\n }\n </tr>\n @if (filterRowEnabled()) {\n <tr role=\"row\" [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-e border-border overflow-hidden\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.aria-label]=\"messages().filterByColumn(column.title)\">\n @if (column.kind === \"data\" && column.field && column.filterable) {\n <mona-grid-filter-row-cell\n [column]=\"column\"\n (apply)=\"onColumnFilter(column, $event)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n </table>\n </div>\n </div>\n\n @defer (when gridWidthSet()) {\n @if (gridService.virtualScrollOptions().enabled) {\n @if (gridService.viewRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-virtual-list [columns]=\"gridService.visibleColumns()\" [data]=\"gridService.viewRows()\" />\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\" />\n }\n } @else {\n <div class=\"relative flex-1 min-h-0\" data-grid-body-region>\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-list [columns]=\"gridService.visibleColumns()\" [data]=\"gridService.viewPageRows()\" />\n } @else if (!gridService.serverLoading()) {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\" />\n }\n @if (gridService.serverLoading()) {\n <div class=\"absolute inset-0 z-20 flex items-center justify-center bg-surface/60\" data-grid-loading>\n <mona-spinner size=\"large\" />\n </div>\n }\n </div>\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n @if (footerVisible()) {\n <div\n [class]=\"footerClass()\"\n [style.margin-inline-end.px]=\"gridService.scrollbarGutterWidth()\"\n #footerScrollElement\n data-grid-footer-scroll>\n <div>\n <table\n role=\"presentation\"\n [class]=\"footerTableClass()\"\n [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tfoot role=\"rowgroup\">\n <tr role=\"row\" [class]=\"footerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n [footerCellWidth]=\"gridService.rowReorderColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n [footerCellWidth]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [footerColumn]=\"column\">\n <mona-grid-footer-cell\n [column]=\"column\"\n [columnIndex]=\"$index\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n }\n }\n }\n } @placeholder {\n <mona-placeholder text=\"Loading...\" />\n }\n</div>\n@if (!gridService.virtualScrollOptions().enabled) {\n @if (gridService.serverBindingEnabled() || gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-pager\n class=\"border-0 border-t border-t-border rounded-ss-none rounded-se-none\"\n [skip]=\"gridService.paginationState().skip\"\n [pageSize]=\"gridService.paginationState().take\"\n [total]=\"gridService.pagerTotal()\"\n [size]=\"'small'\"\n [rounded]=\"rounded()\"\n [pageInput]=\"true\"\n [pageSizeValues]=\"pageSizeValues()\"\n [responsive]=\"responsivePager()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n (pageChange)=\"onPageChange($event)\"></mona-pager>\n }\n}\n\n<ng-template #emptyGridTemplate>\n <div [class]=\"noDataClass()\">\n @if (noDataTemplate()) {\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n } @else {\n <mona-placeholder [text]=\"gridService.messages().noData\"></mona-placeholder>\n }\n </div>\n</ng-template>\n" }]
5895
+ }], ctorParameters: () => [], propDecorators: { columnDefinitions: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GRID_COLUMN_DEFINITION), { isSignal: true }] }], footerScrollElement: [{ type: i0.ViewChild, args: ["footerScrollElement", { isSignal: true }] }], gridDetailTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridDetailTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], gridHeaderElement: [{ type: i0.ViewChild, args: ["gridHeaderElement", { isSignal: true }] }], gridHeaderTableElement: [{ type: i0.ViewChild, args: ["headerTable", { isSignal: true }] }], groupColumnList: [{ type: i0.ViewChild, args: ["groupColumnList", { isSignal: true }] }], noDataTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridNoDataTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], toolbarElement: [{ type: i0.ViewChild, args: ["toolbarElement", { isSignal: true }] }], toolbarTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridToolbarTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], pageSizeValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeValues", required: false }] }], resizeMethod: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeMethod", required: false }] }], responsivePager: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsivePager", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } }) });
5647
5896
 
5648
5897
  /*
5649
5898
  * Public API Surface of @nanahoshi/mona-ui/grid
@@ -5653,5 +5902,5 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.6", ng
5653
5902
  * Generated bundle index. Do not edit.
5654
5903
  */
5655
5904
 
5656
- export { GridReorderableDirective as $, GRID_DEFAULT_MESSAGES as A, GridAddCommandDirective as B, CellEditEvent as C, GridAddEvent as D, GridCancelCommandDirective as E, GridCancelEvent as F, GridNavigationService as G, GridCellTemplateDirective as H, GridColumnComponent as I, GridColumnTitleTemplateDirective as J, GridCommandColumnComponent as K, GridComponent as L, GridContextMenuDirective as M, GridDetailTemplateDirective as N, GridEditCommandDirective as O, GridEditEvent as P, GridEditTemplateDirective as Q, GridEditableDirective as R, GridExportDirective as S, GridFilterableDirective as T, GridFooterTemplateDirective as U, GridGroupFooterTemplateDirective as V, GridGroupableDirective as W, GridHeaderTemplateDirective as X, GridNoDataTemplateDirective as Y, GridRemoveCommandDirective as Z, GridRemoveEvent as _, GridRowFlattenerService as a, GridResizableDirective as a0, GridRowReorderableDirective as a1, GridSaveCommandDirective as a2, GridSaveEvent as a3, GridSelectableDirective as a4, GridSortableDirective as a5, GridStatePersistenceDirective as a6, GridToolbarTemplateDirective as a7, GridVirtualScrollDirective as a8, RowEditEvent as a9, RowReorderEvent as aa, gridFooterTableRowThemeVariants as b, GridService as c, gridGroupRowThemeVariants as d, gridRowDragPlaceholderThemeVariants as e, gridRowDragPreviewThemeVariants as f, gridListBaseThemeVariants as g, gridListTableThemeVariants as h, GridLogicalCellDirective as i, GridLockedCellDirective as j, gridFooterThemeVariants as k, gridFooterTableThemeVariants as l, gridListTableCellThemeVariants as m, gridDetailContentCellThemeVariants as n, gridDetailIndentCellThemeVariants as o, gridDetailRowThemeVariants as p, gridListTableRowThemeVariants as q, gridCellEditorBaseThemeVariants as r, gridCellEditorInputThemeVariants as s, gridCellBaseThemeVariants as t, gridCellContainerThemeVariants as u, gridCellDirtyIndicatorThemeVariants as v, gridCellTextThemeVariants as w, gridRowReorderHandleThemeVariants as x, gridSelectionCellThemeVariants as y, gridFooterTableCellThemeVariants as z };
5657
- //# sourceMappingURL=nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BIK61ieq.mjs.map
5905
+ export { GridRemoveEvent as $, gridFooterTableCellThemeVariants as A, GRID_DEFAULT_MESSAGES as B, CellEditEvent as C, GridAddCommandDirective as D, GridAddEvent as E, GridCancelCommandDirective as F, GridNavigationService as G, GridCancelEvent as H, GridCellTemplateDirective as I, GridColumnComponent as J, GridColumnTitleTemplateDirective as K, GridCommandColumnComponent as L, GridComponent as M, GridContextMenuDirective as N, GridDetailTemplateDirective as O, GridEditCommandDirective as P, GridEditEvent as Q, GridEditTemplateDirective as R, GridEditableDirective as S, GridExportDirective as T, GridFilterableDirective as U, GridFooterTemplateDirective as V, GridGroupFooterTemplateDirective as W, GridGroupableDirective as X, GridHeaderTemplateDirective as Y, GridNoDataTemplateDirective as Z, GridRemoveCommandDirective as _, GridRowFlattenerService as a, GridReorderableDirective as a0, GridResizableDirective as a1, GridRowReorderableDirective as a2, GridSaveCommandDirective as a3, GridSaveEvent as a4, GridSelectableDirective as a5, GridServerBindingDirective as a6, GridSortableDirective as a7, GridStatePersistenceDirective as a8, GridToolbarTemplateDirective as a9, GridVirtualScrollDirective as aa, RowEditEvent as ab, RowReorderEvent as ac, gridFooterTableRowThemeVariants as b, GridService as c, gridGroupRowThemeVariants as d, gridRowDragPlaceholderThemeVariants as e, gridRowDragPreviewThemeVariants as f, gridListBaseThemeVariants as g, gridListTableThemeVariants as h, GridLogicalCellDirective as i, GridLockedCellDirective as j, gridFooterThemeVariants as k, gridFooterTableThemeVariants as l, GRID_DEFAULT_VIRTUAL_ROW_HEIGHT as m, gridListTableCellThemeVariants as n, gridDetailContentCellThemeVariants as o, gridDetailIndentCellThemeVariants as p, gridDetailRowThemeVariants as q, gridListTableRowThemeVariants as r, gridCellEditorBaseThemeVariants as s, gridCellEditorInputThemeVariants as t, gridCellBaseThemeVariants as u, gridCellContainerThemeVariants as v, gridCellDirtyIndicatorThemeVariants as w, gridCellTextThemeVariants as x, gridRowReorderHandleThemeVariants as y, gridSelectionCellThemeVariants as z };
5906
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BGfDw6_5.mjs.map