@masterteam/client-components 0.0.105 → 0.0.106

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,16 +1,22 @@
1
+ import { MT_TABLE_RENDERER, TableExportService, TableValueResolver, Table, TableGroupingController, TableCaption } from '@masterteam/components/table';
1
2
  import * as i0 from '@angular/core';
2
- import { inject, Injectable, signal, computed, untracked, input, output, Component, viewChild, effect, ChangeDetectionStrategy } from '@angular/core';
3
+ import { inject, Injectable, signal, computed, untracked, input, ChangeDetectionStrategy, Component, output, effect, viewChild } from '@angular/core';
3
4
  import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
+ import { NgTemplateOutlet, CommonModule } from '@angular/common';
5
6
  import * as i4 from '@jsverse/transloco';
6
7
  import { TranslocoService, TranslocoModule, TranslocoPipe } from '@jsverse/transloco';
7
8
  import { Button } from '@masterteam/components/button';
8
9
  import { provideEntityListTablePreview } from '@masterteam/components/business-fields';
9
10
  import { RuntimeActionRunner, resolveActionLabel } from '@masterteam/components/runtime-action';
10
11
  import { HttpClient } from '@angular/common/http';
11
- import { switchMap, map, forkJoin, catchError, of, shareReplay, Observable, share, take } from 'rxjs';
12
+ import { switchMap, of, range, concatMap, reduce, map, forkJoin, catchError, shareReplay, Observable, share, take } from 'rxjs';
12
13
  import { isSectionKey, mergeStakeholderNameEntities, resolveLocalizedLabel, readEntityValueColor, serializeEntityRawValue, EntitiesPreview } from '@masterteam/components/entities';
13
- import { Table, TableExportService, TableGroupingController, TableValueResolver, TableCaption } from '@masterteam/components/table';
14
+ import { applyGridViewState, captureGridViewState, AUTO_GROUP_COLUMN_ID, MtDataGridComponent } from '@masterteam/data-grid';
15
+ import { mtEntityExportValue, mtEntityColumn } from '@masterteam/data-table';
16
+ import { MtTableText, MtTablePreferences, mtTablePrintConfiguration } from '@masterteam/data-table/legacy';
17
+ import { ConfirmationService } from '@masterteam/components/confirmation';
18
+ import * as i3 from 'primeng/popover';
19
+ import { Popover, PopoverModule } from 'primeng/popover';
14
20
  import * as i2 from 'primeng/skeleton';
15
21
  import { SkeletonModule } from 'primeng/skeleton';
16
22
  import { toSignal } from '@angular/core/rxjs-interop';
@@ -18,10 +24,7 @@ import { Card } from '@masterteam/components/card';
18
24
  import { EmptyState } from '@masterteam/components/empty-state';
19
25
  import { Tooltip } from '@masterteam/components/tooltip';
20
26
  import { Icon } from '@masterteam/icons';
21
- import { ConfirmationService } from '@masterteam/components/confirmation';
22
27
  import { MTDateFormatPipe, readableTextOn } from '@masterteam/components';
23
- import * as i3 from 'primeng/popover';
24
- import { PopoverModule } from 'primeng/popover';
25
28
  import { DashboardViewer } from '@masterteam/dashboard-builder';
26
29
 
27
30
  const CLIENT_LIST_RECORD_STATE_KEY = '__clientListRecordState';
@@ -48,6 +51,78 @@ class ClientListApiService {
48
51
  informativeBaseUrl = 'LevelData';
49
52
  /** Card layouts already read back, keyed by context. See {@link getCardLayout}. */
50
53
  cardLayouts = new Map();
54
+ /** Native grids analyse a complete matching array; page boundaries must never change the result. */
55
+ getAllRows(contextKey, query, filters = [], hierarchy) {
56
+ return this.getRows(contextKey, { ...query, skip: 0, take: 500 }, filters, hierarchy).pipe(switchMap((first) => {
57
+ const page = first.response.data;
58
+ if (!page)
59
+ return of(first);
60
+ const total = page.pagination?.totalCount;
61
+ const size = page.pagination?.pageSize;
62
+ if (total == null || !size || size < 1)
63
+ throw new Error('The table response is missing its pagination contract.');
64
+ const records = [...(page.records ?? [])];
65
+ const seen = new Set(records.map((record) => record.id));
66
+ if (seen.size !== records.length)
67
+ throw new Error('The table response contains duplicate records.');
68
+ const groups = new Map((page.projectionMeta?.sourceGroups ?? []).map((group) => [
69
+ group.source.contextKey + ':' + group.source.levelDataId,
70
+ { ...group, recordIds: [...group.recordIds] },
71
+ ]));
72
+ const pages = Math.ceil(total / size);
73
+ return range(1, Math.max(0, pages - 1)).pipe(concatMap((index) => this.getRows(contextKey, { ...query, skip: index * size, take: size }, filters, hierarchy)), reduce((result, next) => {
74
+ const data = next.response.data;
75
+ if (!data ||
76
+ data.pagination?.totalCount !== total ||
77
+ data.pagination.pageSize !== size)
78
+ throw new Error('The table changed while loading. Refresh to try again.');
79
+ for (const group of data.projectionMeta?.sourceGroups ?? []) {
80
+ const key = group.source.contextKey + ':' + group.source.levelDataId;
81
+ const existing = groups.get(key);
82
+ groups.set(key, {
83
+ ...group,
84
+ recordIds: [
85
+ ...new Set([
86
+ ...(existing?.recordIds ?? []),
87
+ ...group.recordIds,
88
+ ]),
89
+ ],
90
+ });
91
+ }
92
+ for (const record of data.records ?? []) {
93
+ if (seen.has(record.id))
94
+ throw new Error('The table response contains overlapping pages.');
95
+ seen.add(record.id);
96
+ records.push(record);
97
+ }
98
+ return result;
99
+ }, first), map((result) => {
100
+ if (records.length !== total)
101
+ throw new Error('The table result is incomplete. Refresh to try again.');
102
+ return {
103
+ ...result,
104
+ response: {
105
+ ...result.response,
106
+ data: {
107
+ ...page,
108
+ records,
109
+ projectionMeta: page.projectionMeta
110
+ ? {
111
+ ...page.projectionMeta,
112
+ sourceGroups: [...groups.values()],
113
+ }
114
+ : undefined,
115
+ pagination: {
116
+ page: 1,
117
+ pageSize: records.length || size,
118
+ totalCount: total,
119
+ },
120
+ },
121
+ },
122
+ };
123
+ }));
124
+ }));
125
+ }
51
126
  /**
52
127
  * Fetches a table page. Resolves to the response **and** the `propertyKeys`
53
128
  * the request carried, because a write that wants its record projected the
@@ -268,12 +343,9 @@ class ClientListApiService {
268
343
  }
269
344
  toEffectiveColumnKeys(columns) {
270
345
  const keys = (columns ?? [])
271
- .filter((column) => typeof column === 'string' ? true : column.visible !== false)
272
- .sort((a, b) => (typeof a === 'string' ? 0 : (a.order ?? 0)) -
273
- (typeof b === 'string' ? 0 : (b.order ?? 0)))
274
- .map((column) => typeof column === 'string'
275
- ? column
276
- : (column.key ?? column.propertyKey ?? ''))
346
+ .filter((column) => column.isVisible)
347
+ .sort((a, b) => a.order - b.order)
348
+ .map((column) => column.columnKey)
277
349
  .filter((key) => key.length > 0);
278
350
  return keys.length ? keys : undefined;
279
351
  }
@@ -578,7 +650,7 @@ class ClientListStateService {
578
650
  },
579
651
  });
580
652
  }
581
- setRowsResult(key, response, config, skip, take) {
653
+ setRowsResult(key, response, config, skip, take, complete = false) {
582
654
  const target = this.itemsByKey()[key];
583
655
  if (!target ||
584
656
  target.type === 'informative' ||
@@ -654,6 +726,7 @@ class ClientListStateService {
654
726
  skip,
655
727
  take,
656
728
  totalCount,
729
+ complete,
657
730
  error: null,
658
731
  rawData: response,
659
732
  },
@@ -812,6 +885,7 @@ class ClientListStateService {
812
885
  // Keep the page the size the paginator promises — the row pushed off
813
886
  // the end now lives on the next page.
814
887
  if (config.isPaginated &&
888
+ !target.complete &&
815
889
  target.take > 0 &&
816
890
  records.length > target.take) {
817
891
  records.length = target.take;
@@ -1495,9 +1569,367 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1495
1569
  args: [{ providedIn: 'root' }]
1496
1570
  }] });
1497
1571
 
1572
+ /** Operations remain owned by ClientList; the grid only hosts this ordinary cell renderer. */
1573
+ class ClientListActionsCell {
1574
+ params = input.required(...(ngDevMode ? [{ debugName: "params" }] : /* istanbul ignore next */ []));
1575
+ confirmation = inject(ConfirmationService);
1576
+ label = computed(() => String(this.params()['label']), ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
1577
+ actions = computed(() => {
1578
+ const { data, node } = this.params();
1579
+ return data && !node.group && !node.footer
1580
+ ? this.params()['actions'].filter((action) => !action.hidden?.(data))
1581
+ : [];
1582
+ }, ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
1583
+ inline = computed(() => this.actions().filter((action) => this.params()['shape'] !== 'popover' || action.placement === 'inline'), ...(ngDevMode ? [{ debugName: "inline" }] : /* istanbul ignore next */ []));
1584
+ menu = computed(() => this.actions().filter((action) => this.params()['shape'] === 'popover' && action.placement !== 'inline'), ...(ngDevMode ? [{ debugName: "menu" }] : /* istanbul ignore next */ []));
1585
+ hasMenu = computed(() => !this.params().node.group &&
1586
+ !this.params().node.footer &&
1587
+ this.params()['shape'] === 'popover' &&
1588
+ (!!this.params()['requestActions'] || this.menu().length > 0), ...(ngDevMode ? [{ debugName: "hasMenu" }] : /* istanbul ignore next */ []));
1589
+ loading() {
1590
+ return (this.params()['loading']?.(this.params().data) ?? false);
1591
+ }
1592
+ busy(action) {
1593
+ return typeof action.loading === 'function'
1594
+ ? action.loading(this.params().data)
1595
+ : !!action.loading;
1596
+ }
1597
+ open(event, popover) {
1598
+ this.params()['requestActions']?.(this.params().data);
1599
+ popover.toggle(event);
1600
+ }
1601
+ run(action, event) {
1602
+ const row = this.params().data;
1603
+ if (action.hidden?.(row) || this.busy(action) || this.loading())
1604
+ return;
1605
+ const accept = () => {
1606
+ if (!action.hidden?.(row) && !this.busy(action) && !this.loading())
1607
+ action.action(row);
1608
+ };
1609
+ if (!action.confirmation) {
1610
+ accept();
1611
+ return;
1612
+ }
1613
+ const config = { ...action.confirmation, event, accept };
1614
+ if (action.confirmation.confirmationType === 'delete')
1615
+ this.confirmation.confirmDelete(config);
1616
+ else
1617
+ this.confirmation.confirm(config);
1618
+ }
1619
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListActionsCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
1620
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ClientListActionsCell, isStandalone: true, selector: "mt-client-list-actions-cell", inputs: { params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "$event.stopPropagation()", "pointerdown": "$event.stopPropagation()" } }, ngImport: i0, template: `
1621
+ @for (action of inline(); track $index) {
1622
+ <mt-button
1623
+ [icon]="action.icon"
1624
+ [label]="action.label"
1625
+ [ariaLabel]="action.tooltip || action.label || label()"
1626
+ [tooltip]="action.tooltip"
1627
+ [severity]="action.color || 'secondary'"
1628
+ [variant]="action.variant || 'text'"
1629
+ size="small"
1630
+ [loading]="busy(action)"
1631
+ (click)="run(action, $event)"
1632
+ />
1633
+ }
1634
+ @if (hasMenu()) {
1635
+ <mt-button
1636
+ icon="general.dots-vertical"
1637
+ severity="secondary"
1638
+ variant="text"
1639
+ size="small"
1640
+ [ariaLabel]="label()"
1641
+ (click)="open($event, popover)"
1642
+ />
1643
+ <p-popover #popover appendTo="body">
1644
+ <div class="flex min-w-40 flex-col gap-1" [attr.aria-label]="label()">
1645
+ @if (loading()) {
1646
+ <span role="status" class="p-2">{{
1647
+ params()['loadingLabel']
1648
+ }}</span>
1649
+ } @else {
1650
+ @for (action of menu(); track $index) {
1651
+ <mt-button
1652
+ [icon]="action.icon"
1653
+ [label]="action.label || action.tooltip"
1654
+ [severity]="action.color || 'secondary'"
1655
+ variant="text"
1656
+ size="small"
1657
+ [loading]="busy(action)"
1658
+ (click)="run(action, $event); popover.hide()"
1659
+ />
1660
+ }
1661
+ }
1662
+ </div>
1663
+ </p-popover>
1664
+ }
1665
+ `, isInline: true, styles: [":host{display:flex;align-items:center;justify-content:center;gap:4px;height:100%}\n"], dependencies: [{ kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions", "motionOptions"], outputs: ["onShow", "onHide"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1666
+ }
1667
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListActionsCell, decorators: [{
1668
+ type: Component,
1669
+ args: [{ selector: 'mt-client-list-actions-cell', imports: [Button, Popover], changeDetection: ChangeDetectionStrategy.OnPush, host: {
1670
+ '(click)': '$event.stopPropagation()',
1671
+ '(pointerdown)': '$event.stopPropagation()',
1672
+ }, template: `
1673
+ @for (action of inline(); track $index) {
1674
+ <mt-button
1675
+ [icon]="action.icon"
1676
+ [label]="action.label"
1677
+ [ariaLabel]="action.tooltip || action.label || label()"
1678
+ [tooltip]="action.tooltip"
1679
+ [severity]="action.color || 'secondary'"
1680
+ [variant]="action.variant || 'text'"
1681
+ size="small"
1682
+ [loading]="busy(action)"
1683
+ (click)="run(action, $event)"
1684
+ />
1685
+ }
1686
+ @if (hasMenu()) {
1687
+ <mt-button
1688
+ icon="general.dots-vertical"
1689
+ severity="secondary"
1690
+ variant="text"
1691
+ size="small"
1692
+ [ariaLabel]="label()"
1693
+ (click)="open($event, popover)"
1694
+ />
1695
+ <p-popover #popover appendTo="body">
1696
+ <div class="flex min-w-40 flex-col gap-1" [attr.aria-label]="label()">
1697
+ @if (loading()) {
1698
+ <span role="status" class="p-2">{{
1699
+ params()['loadingLabel']
1700
+ }}</span>
1701
+ } @else {
1702
+ @for (action of menu(); track $index) {
1703
+ <mt-button
1704
+ [icon]="action.icon"
1705
+ [label]="action.label || action.tooltip"
1706
+ [severity]="action.color || 'secondary'"
1707
+ variant="text"
1708
+ size="small"
1709
+ [loading]="busy(action)"
1710
+ (click)="run(action, $event); popover.hide()"
1711
+ />
1712
+ }
1713
+ }
1714
+ </div>
1715
+ </p-popover>
1716
+ }
1717
+ `, styles: [":host{display:flex;align-items:center;justify-content:center;gap:4px;height:100%}\n"] }]
1718
+ }], propDecorators: { params: [{ type: i0.Input, args: [{ isSignal: true, alias: "params", required: true }] }] } });
1719
+
1720
+ class ClientListTemplateCell {
1721
+ params = input.required(...(ngDevMode ? [{ debugName: "params" }] : /* istanbul ignore next */ []));
1722
+ template() {
1723
+ return this.params()['template'];
1724
+ }
1725
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListTemplateCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
1726
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ClientListTemplateCell, isStandalone: true, selector: "mt-client-list-template-cell", inputs: { params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `@if (!params().node.group && !params().node.footer) {
1727
+ <ng-container
1728
+ [ngTemplateOutlet]="template()"
1729
+ [ngTemplateOutletContext]="{ $implicit: params().data }"
1730
+ />
1731
+ } @else {
1732
+ {{ params().valueFormatted }}
1733
+ }`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1734
+ }
1735
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListTemplateCell, decorators: [{
1736
+ type: Component,
1737
+ args: [{
1738
+ selector: 'mt-client-list-template-cell',
1739
+ imports: [NgTemplateOutlet],
1740
+ changeDetection: ChangeDetectionStrategy.OnPush,
1741
+ template: `@if (!params().node.group && !params().node.footer) {
1742
+ <ng-container
1743
+ [ngTemplateOutlet]="template()"
1744
+ [ngTemplateOutletContext]="{ $implicit: params().data }"
1745
+ />
1746
+ } @else {
1747
+ {{ params().valueFormatted }}
1748
+ }`,
1749
+ }]
1750
+ }], propDecorators: { params: [{ type: i0.Input, args: [{ isSignal: true, alias: "params", required: true }] }] } });
1751
+
1498
1752
  const DEFAULT_GRID_COLUMNS$2 = 12;
1499
1753
  class ClientListTableView {
1500
1754
  toolbar = inject(ClientListToolbarService);
1755
+ nativeGrid = inject(MT_TABLE_RENDERER, { optional: true }) !== null;
1756
+ text = inject(MtTableText);
1757
+ preferences = inject(MtTablePreferences);
1758
+ printService = inject(TableExportService);
1759
+ nativeGridReady = output();
1760
+ ready = signal(null, ...(ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []));
1761
+ hydrated;
1762
+ restoring = false;
1763
+ rowId = (row) => String(row['Id']);
1764
+ exportParams = {
1765
+ processCellCallback: (mtEntityExportValue),
1766
+ };
1767
+ statusBar = {
1768
+ panels: ['selectedRowCount', 'aggregation'],
1769
+ };
1770
+ columns = computed(() => {
1771
+ const rows = this.table().rows;
1772
+ const columns = this.table().columns.map((column) => {
1773
+ const base = {
1774
+ colId: column.key,
1775
+ headerName: column.label,
1776
+ width: column.width ? parseFloat(column.width) : 220,
1777
+ minWidth: 100,
1778
+ sortable: column.sortable !== false,
1779
+ };
1780
+ if (column.customCellTpl)
1781
+ return {
1782
+ ...base,
1783
+ cellRenderer: ClientListTemplateCell,
1784
+ cellRendererParams: { template: column.customCellTpl },
1785
+ valueGetter: ({ data }) => column.exportValue
1786
+ ? column.exportValue(data)
1787
+ : TableValueResolver.getProperty(data, column.key),
1788
+ filter: 'text',
1789
+ enableRowGroup: true,
1790
+ };
1791
+ return mtEntityColumn({
1792
+ ...base,
1793
+ viewType: (column.viewType ??
1794
+ rows[0]?.[column.key]?.viewType ??
1795
+ 'Text'),
1796
+ entity: (row) => row[column.key],
1797
+ });
1798
+ });
1799
+ if (this.rowActions().length || this.rowActionsLoadingFn())
1800
+ columns.push({
1801
+ colId: '$actions',
1802
+ headerName: this.text.text('actions'),
1803
+ width: 100,
1804
+ minWidth: 100,
1805
+ maxWidth: 100,
1806
+ suppressSizeToFit: true,
1807
+ resizable: false,
1808
+ pinned: this.text.language().startsWith('ar') ? 'left' : 'right',
1809
+ lockPinned: true,
1810
+ lockVisible: true,
1811
+ sortable: false,
1812
+ suppressHeaderMenuButton: true,
1813
+ excludeFromQuickFilter: true,
1814
+ cellRenderer: ClientListActionsCell,
1815
+ cellRendererParams: {
1816
+ actions: this.rowActions(),
1817
+ shape: this.actionShape(),
1818
+ loading: this.rowActionsLoadingFn(),
1819
+ label: this.text.text('actions'),
1820
+ loadingLabel: this.text.text('loading'),
1821
+ requestActions: this.rowActionsLoadingFn()
1822
+ ? (row) => this.rowActionsRequested.emit(row)
1823
+ : undefined,
1824
+ },
1825
+ });
1826
+ return columns;
1827
+ }, ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
1828
+ view() {
1829
+ return {
1830
+ level: this.tableStorageKey() ?? this.state().key,
1831
+ role: 'client-list-native',
1832
+ };
1833
+ }
1834
+ constructor() {
1835
+ effect(() => {
1836
+ const api = this.ready(), view = this.view(), key = this.preferences.key(view);
1837
+ const stamp = JSON.stringify([
1838
+ key,
1839
+ this.table().columns.map((column) => column.key),
1840
+ ]);
1841
+ if (!api || !this.table().columns.length || stamp === this.hydrated)
1842
+ return;
1843
+ untracked(() => {
1844
+ this.restoring = true;
1845
+ try {
1846
+ const saved = this.preferences.read(view);
1847
+ if (saved)
1848
+ applyGridViewState(api, saved);
1849
+ else {
1850
+ const group = this.bucket().groupBy();
1851
+ if (group)
1852
+ api.setRowGroupColumns([group]);
1853
+ const field = this.bucket().sortField(), sort = this.bucket().sortDirection();
1854
+ if (field && sort)
1855
+ api.setSortModel([{ colId: field, sort }]);
1856
+ }
1857
+ this.hydrated = stamp;
1858
+ }
1859
+ finally {
1860
+ this.restoring = false;
1861
+ }
1862
+ });
1863
+ });
1864
+ }
1865
+ onReady(event) {
1866
+ this.ready.set(event.api);
1867
+ this.nativeGridReady.emit(event);
1868
+ }
1869
+ changed() {
1870
+ const api = this.ready();
1871
+ if (!api || this.restoring)
1872
+ return;
1873
+ this.bucket().filterTerm.set(api.getQuickFilter() ?? '');
1874
+ this.bucket().groupBy.set(api.getRowGroupColumns()[0] ?? null);
1875
+ const sort = api.getSortModel()[0];
1876
+ this.bucket().sortField.set(sort?.colId ?? null);
1877
+ this.bucket().sortDirection.set(sort?.sort ?? null);
1878
+ if (this.hydrated) {
1879
+ const state = captureGridViewState(api), exclude = this.table().config.table.persistStateExclude;
1880
+ this.preferences.write(this.view(), {
1881
+ ...state,
1882
+ sort: exclude.includes('sort') ? [] : state.sort,
1883
+ rowGroups: exclude.includes('groupBy') ? [] : state.rowGroups,
1884
+ });
1885
+ }
1886
+ }
1887
+ contextMenu = (params) => {
1888
+ const columns = [
1889
+ ...(params.api.getRowGroupColumns().length ? [AUTO_GROUP_COLUMN_ID] : []),
1890
+ ...(params.api.getPivotResultColumns().length
1891
+ ? params.api.getPivotResultColumns()
1892
+ : params.api
1893
+ .getColumnState()
1894
+ .filter((column) => !column.hide && column.colId !== '$actions')
1895
+ .map((column) => column.colId)),
1896
+ ];
1897
+ return params.defaultItems.flatMap((item) => item !== 'export'
1898
+ ? [item]
1899
+ : this.table().config.table.exportable
1900
+ ? [
1901
+ {
1902
+ name: this.text.text('export'),
1903
+ icon: 'export',
1904
+ subMenu: [
1905
+ {
1906
+ name: this.text.text('csv'),
1907
+ icon: 'csv',
1908
+ action: () => params.api.exportDataAsCsv({
1909
+ ...this.exportParams,
1910
+ columnKeys: columns,
1911
+ }),
1912
+ },
1913
+ {
1914
+ name: this.text.text('excel'),
1915
+ icon: 'excel',
1916
+ action: () => {
1917
+ void params.api.exportDataAsExcel({
1918
+ ...this.exportParams,
1919
+ columnKeys: columns,
1920
+ });
1921
+ },
1922
+ },
1923
+ {
1924
+ name: this.text.text('pdf'),
1925
+ icon: 'pdf',
1926
+ action: () => this.printService.printPdf(mtTablePrintConfiguration(params.api, this.columns().filter((column) => column.colId !== '$actions'), this.table().title)),
1927
+ },
1928
+ ],
1929
+ },
1930
+ ]
1931
+ : []);
1932
+ };
1501
1933
  state = input.required(...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
1502
1934
  rowActions = input([], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
1503
1935
  actionShape = input(undefined, ...(ngDevMode ? [{ debugName: "actionShape" }] : /* istanbul ignore next */ []));
@@ -1557,12 +1989,12 @@ class ClientListTableView {
1557
1989
  };
1558
1990
  }
1559
1991
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListTableView, deps: [], target: i0.ɵɵFactoryTarget.Component });
1560
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ClientListTableView, isStandalone: true, selector: "mt-client-list-table-view", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, actionShape: { classPropertyName: "actionShape", publicName: "actionShape", isSignal: true, isRequired: false, transformFunction: null }, rowActionsLoadingFn: { classPropertyName: "rowActionsLoadingFn", publicName: "rowActionsLoadingFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { lazyLoad: "lazyLoad", rowClick: "rowClick", rowActionsRequested: "rowActionsRequested" }, ngImport: i0, template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (table().config.contentStart) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentStart\"\r\n [ngTemplateOutletContext]=\"templateContext(table())\"\r\n />\r\n </div>\r\n }\r\n\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.tableSpan)\">\r\n @if (table().loading && table().rows.length === 0) {\r\n <div class=\"flex flex-col gap-3 py-3\">\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n </div>\r\n } @else if (table().error) {\r\n <div\r\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n >\r\n {{ table().error }}\r\n </div>\r\n } @else {\r\n <mt-table\r\n [noCard]=\"true\"\r\n [data]=\"table().rows\"\r\n [columns]=\"table().columns\"\r\n dataKey=\"Id\"\r\n [storageKey]=\"tableStorageKey()\"\r\n [persistStateExclude]=\"table().config.table.persistStateExclude\"\r\n [captionStartTemplate]=\"table().config.toolbarStart ?? null\"\r\n [captionEndTemplate]=\"table().config.toolbarEnd ?? null\"\r\n [rowActions]=\"rowActions()\"\r\n [actionShape]=\"actionShape()\"\r\n [rowActionsLoadingFn]=\"rowActionsLoadingFn()\"\r\n (rowActionsRequested)=\"rowActionsRequested.emit($event)\"\r\n [generalSearch]=\"table().config.table.searchable\"\r\n [showFilters]=\"true\"\r\n filterMode=\"column\"\r\n [printable]=\"true\"\r\n [groupable]=\"true\"\r\n [cellClickFilter]=\"true\"\r\n [freezeActions]=\"true\"\r\n [exportable]=\"table().config.table.exportable\"\r\n [loading]=\"table().loading\"\r\n [clickableRows]=\"true\"\r\n [lazy]=\"table().config.isPaginated\"\r\n [lazyTotalRecords]=\"table().totalCount\"\r\n [virtualScroll]=\"!table().config.isPaginated\"\r\n [virtualScrollItemSize]=\"56\"\r\n scrollHeight=\"520px\"\r\n [pageSize]=\"pageSize()\"\r\n [filters]=\"bucket().filters()\"\r\n (filtersChange)=\"bucket().filters.set($event)\"\r\n [filterTerm]=\"bucket().filterTerm()\"\r\n (filterTermChange)=\"bucket().filterTerm.set($event)\"\r\n [groupBy]=\"bucket().groupBy()\"\r\n (groupByChange)=\"bucket().groupBy.set($event)\"\r\n [sortField]=\"bucket().sortField()\"\r\n (sortFieldChange)=\"bucket().sortField.set($event)\"\r\n [sortDirection]=\"bucket().sortDirection()\"\r\n (sortDirectionChange)=\"bucket().sortDirection.set($event)\"\r\n [activeTab]=\"bucket().activeTab()\"\r\n (activeTabChange)=\"bucket().activeTab.set($event)\"\r\n (lazyLoad)=\"lazyLoad.emit($event)\"\r\n (rowClick)=\"rowClick.emit($event)\"\r\n />\r\n }\r\n </div>\r\n\r\n @if (table().config.contentEnd) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.endSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(table())\"\r\n />\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "filterCloseOnOutsideClick", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "externalFiltersActive", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "filtersCleared", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
1992
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ClientListTableView, isStandalone: true, selector: "mt-client-list-table-view", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, actionShape: { classPropertyName: "actionShape", publicName: "actionShape", isSignal: true, isRequired: false, transformFunction: null }, rowActionsLoadingFn: { classPropertyName: "rowActionsLoadingFn", publicName: "rowActionsLoadingFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nativeGridReady: "nativeGridReady", lazyLoad: "lazyLoad", rowClick: "rowClick", rowActionsRequested: "rowActionsRequested" }, ngImport: i0, template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (table().config.contentStart) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentStart\"\r\n [ngTemplateOutletContext]=\"templateContext(table())\"\r\n />\r\n </div>\r\n }\r\n\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.tableSpan)\">\r\n @if (!nativeGrid && table().loading && table().rows.length === 0) {\r\n <div class=\"flex flex-col gap-3 py-3\">\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n </div>\r\n } @else if (table().error) {\r\n <div\r\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n >\r\n {{ table().error }}\r\n </div>\r\n } @else {\r\n @if (nativeGrid) {\r\n @if (table().config.toolbarStart || table().config.toolbarEnd) {\r\n <div class=\"mb-3 flex flex-wrap items-center justify-between gap-3\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.toolbarStart ?? null\"\r\n [ngTemplateOutletContext]=\"templateContext(table())\"\r\n />\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.toolbarEnd ?? null\"\r\n [ngTemplateOutletContext]=\"templateContext(table())\"\r\n />\r\n </div>\r\n }\r\n <mt-data-grid\r\n [rowData]=\"table().rows\"\r\n [columnDefs]=\"columns()\"\r\n [autoSizeStrategy]=\"{ type: 'fitGridWidth' }\"\r\n groupDisplayType=\"groupRows\"\r\n paginationPanelShow=\"whenNeeded\"\r\n [getRowId]=\"rowId\"\r\n [height]=\"520\"\r\n [rowHeight]=\"52\"\r\n [ariaLabel]=\"table().title\"\r\n [loading]=\"table().loading\"\r\n [direction]=\"text.language().startsWith('ar') ? 'rtl' : 'ltr'\"\r\n [localeText]=\"text.gridLocale()\"\r\n [quickFilterText]=\"bucket().filterTerm()\"\r\n [showQuickFilter]=\"table().config.table.searchable\"\r\n rowGroupPanelShow=\"always\"\r\n pivotPanelShow=\"never\"\r\n [sideBar]=\"{\r\n toolPanels: ['columns', 'filters'],\r\n position: text.language().startsWith('ar') ? 'left' : 'right',\r\n }\"\r\n [cellSelection]=\"true\"\r\n [enableCharts]=\"true\"\r\n [suppressCutToClipboard]=\"true\"\r\n [pagination]=\"table().config.isPaginated\"\r\n [paginationPageSize]=\"pageSize()\"\r\n [statusBar]=\"statusBar\"\r\n [suppressPdfExport]=\"true\"\r\n [getContextMenuItems]=\"contextMenu\"\r\n [defaultCsvExportParams]=\"exportParams\"\r\n [defaultExcelExportParams]=\"exportParams\"\r\n (gridReady)=\"onReady($event)\"\r\n (filterChanged)=\"changed()\"\r\n (sortChanged)=\"changed()\"\r\n (columnVisible)=\"changed()\"\r\n (columnMoved)=\"changed()\"\r\n (columnPinned)=\"changed()\"\r\n (columnResized)=\"$event.finished && changed()\"\r\n (columnRowGroupChanged)=\"changed()\"\r\n (columnValueChanged)=\"changed()\"\r\n (columnPivotChanged)=\"changed()\"\r\n (rowClicked)=\"\r\n !$event.node.group &&\r\n !$event.node.footer &&\r\n $event.node.data &&\r\n rowClick.emit($event.node.data)\r\n \"\r\n />\r\n } @else {\r\n <mt-table\r\n [noCard]=\"true\"\r\n [data]=\"table().rows\"\r\n [columns]=\"table().columns\"\r\n dataKey=\"Id\"\r\n [storageKey]=\"tableStorageKey()\"\r\n [persistStateExclude]=\"table().config.table.persistStateExclude\"\r\n [captionStartTemplate]=\"table().config.toolbarStart ?? null\"\r\n [captionEndTemplate]=\"table().config.toolbarEnd ?? null\"\r\n [rowActions]=\"rowActions()\"\r\n [actionShape]=\"actionShape() ?? 'flat'\"\r\n [rowActionsLoadingFn]=\"rowActionsLoadingFn()\"\r\n (rowActionsRequested)=\"rowActionsRequested.emit($event)\"\r\n [generalSearch]=\"table().config.table.searchable\"\r\n [showFilters]=\"true\"\r\n filterMode=\"column\"\r\n [printable]=\"true\"\r\n [groupable]=\"true\"\r\n [cellClickFilter]=\"true\"\r\n [freezeActions]=\"true\"\r\n [exportable]=\"table().config.table.exportable\"\r\n [loading]=\"table().loading\"\r\n [clickableRows]=\"true\"\r\n [lazy]=\"table().config.isPaginated\"\r\n [lazyTotalRecords]=\"table().totalCount\"\r\n [virtualScroll]=\"!table().config.isPaginated\"\r\n [virtualScrollItemSize]=\"56\"\r\n scrollHeight=\"520px\"\r\n [pageSize]=\"pageSize()\"\r\n [filters]=\"bucket().filters()\"\r\n (filtersChange)=\"bucket().filters.set($event)\"\r\n [filterTerm]=\"bucket().filterTerm()\"\r\n (filterTermChange)=\"bucket().filterTerm.set($event)\"\r\n [groupBy]=\"bucket().groupBy()\"\r\n (groupByChange)=\"bucket().groupBy.set($event)\"\r\n [sortField]=\"bucket().sortField()\"\r\n (sortFieldChange)=\"bucket().sortField.set($event)\"\r\n [sortDirection]=\"bucket().sortDirection()\"\r\n (sortDirectionChange)=\"bucket().sortDirection.set($event)\"\r\n [activeTab]=\"bucket().activeTab()\"\r\n (activeTabChange)=\"bucket().activeTab.set($event)\"\r\n (lazyLoad)=\"lazyLoad.emit($event)\"\r\n (rowClick)=\"rowClick.emit($event)\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n @if (table().config.contentEnd) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.endSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(table())\"\r\n />\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showHeader", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "filterCloseOnOutsideClick", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "groupHeaderTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "externalFiltersActive", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "filtersCleared", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { kind: "component", type: MtDataGridComponent, selector: "mt-data-grid", inputs: ["rowData", "dataProcessing", "columnDefs", "getRowId", "height", "autoHeight", "autoHeightMaxRows", "autoHeightMinRows", "rowHeight", "animateRows", "headerHeight", "groupHeaderHeight", "direction", "localeText", "localeTextResolver", "ariaLabel", "loading", "noRowsText", "loadingText", "noRowsTemplate", "autoSizeStrategy", "columnMenu", "mainMenuItems", "autoSizePadding", "quickFilterText", "showQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "cacheQuickFilter", "applyQuickFilterBeforePivotOrAgg", "filtersToolPanelDef", "isExternalFilterPresent", "doesExternalFilterPass", "floatingFiltersHeight", "rowSelection", "selectionColumnDef", "rowNumbers", "rowDragManaged", "rowDragEntireRow", "rowDragMultiRow", "suppressMoveWhenRowDragging", "cellSelection", "statusBar", "suppressContextMenu", "allowContextMenuWithControlKey", "preventDefaultOnContextMenu", "getContextMenuItems", "suppressCsvExport", "suppressExcelExport", "suppressPdfExport", "defaultPdfExportParams", "excelStyles", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "copySelectedRows", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressCutToClipboard", "defaultCsvExportParams", "defaultExcelExportParams", "groupDisplayType", "groupRowRenderer", "groupRowRendererParams", "suppressGroupRowsSticky", "groupHideOpenParents", "groupHideParentOfSingleChild", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "showOpenedGroup", "groupAggFiltering", "suppressAggFilteredOnly", "aggregateOnlyChangedColumns", "suppressColumnMoveAnimation", "pivotRowTotals", "pivotColumnGroupTotals", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "processPivotResultColDef", "processPivotResultColGroupDef", "processUnpinnedColumns", "rowGroupPanelShow", "pivotPanelShow", "pivotPanelHint", "groupDefaultExpanded", "autoGroupColumnDef", "groupTotalRow", "grandTotalRow", "aggFuncs", "suppressRowGroupHidesColumns", "suppressMakeColumnVisibleAfterUnGroup", "sideBar", "pivotMode", "suppressAggFuncInHeader", "enableCharts", "chartThemes", "customChartThemes", "chartToolPanelsDef", "chartThemeOverrides", "chartContext", "chartRecordsLabel", "getChartToolbarItems", "groupMaintainOrder", "treeData", "getDataPath", "masterDetail", "isRowMaster", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "singleClickEdit", "suppressClickEdit", "stopEditingWhenCellsLoseFocus", "undoRedoCellEditing", "undoRedoCellEditingLimit", "pagination", "paginationPanelShow", "paginationPageSize", "paginationTotalRows", "paginationCurrentPage", "paginationPageSizeSelector", "rowGroupPanelSuppressSort"], outputs: ["displayedColumnsChanged", "columnEverythingChanged", "pivotMaxColumnsExceeded", "gridReady", "sortChanged", "cellFocused", "columnResized", "columnMoved", "columnPinned", "columnVisible", "columnGroupOpened", "filterChanged", "filterModified", "filterOpened", "rowSelected", "selectionChanged", "rowClicked", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "cellSelectionChanged", "contextMenuVisibleChanged", "rowGroupOpened", "columnRowGroupChanged", "expandOrCollapseAll", "cellEditingStarted", "cellEditingStopped", "cellValueChanged", "pasteStart", "pasteEnd", "fillStart", "fillEnd", "paginationChanged", "toolPanelVisibleChanged", "toolPanelSizeChanged", "columnValueChanged", "columnPivotChanged", "columnPivotModeChanged", "chartCreated", "chartDestroyed", "chartRangeSelectionChanged", "chartOptionsChanged"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
1561
1993
  }
1562
1994
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListTableView, decorators: [{
1563
1995
  type: Component,
1564
- args: [{ selector: 'mt-client-list-table-view', standalone: true, imports: [CommonModule, Table, SkeletonModule], template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (table().config.contentStart) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentStart\"\r\n [ngTemplateOutletContext]=\"templateContext(table())\"\r\n />\r\n </div>\r\n }\r\n\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.tableSpan)\">\r\n @if (table().loading && table().rows.length === 0) {\r\n <div class=\"flex flex-col gap-3 py-3\">\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n </div>\r\n } @else if (table().error) {\r\n <div\r\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n >\r\n {{ table().error }}\r\n </div>\r\n } @else {\r\n <mt-table\r\n [noCard]=\"true\"\r\n [data]=\"table().rows\"\r\n [columns]=\"table().columns\"\r\n dataKey=\"Id\"\r\n [storageKey]=\"tableStorageKey()\"\r\n [persistStateExclude]=\"table().config.table.persistStateExclude\"\r\n [captionStartTemplate]=\"table().config.toolbarStart ?? null\"\r\n [captionEndTemplate]=\"table().config.toolbarEnd ?? null\"\r\n [rowActions]=\"rowActions()\"\r\n [actionShape]=\"actionShape()\"\r\n [rowActionsLoadingFn]=\"rowActionsLoadingFn()\"\r\n (rowActionsRequested)=\"rowActionsRequested.emit($event)\"\r\n [generalSearch]=\"table().config.table.searchable\"\r\n [showFilters]=\"true\"\r\n filterMode=\"column\"\r\n [printable]=\"true\"\r\n [groupable]=\"true\"\r\n [cellClickFilter]=\"true\"\r\n [freezeActions]=\"true\"\r\n [exportable]=\"table().config.table.exportable\"\r\n [loading]=\"table().loading\"\r\n [clickableRows]=\"true\"\r\n [lazy]=\"table().config.isPaginated\"\r\n [lazyTotalRecords]=\"table().totalCount\"\r\n [virtualScroll]=\"!table().config.isPaginated\"\r\n [virtualScrollItemSize]=\"56\"\r\n scrollHeight=\"520px\"\r\n [pageSize]=\"pageSize()\"\r\n [filters]=\"bucket().filters()\"\r\n (filtersChange)=\"bucket().filters.set($event)\"\r\n [filterTerm]=\"bucket().filterTerm()\"\r\n (filterTermChange)=\"bucket().filterTerm.set($event)\"\r\n [groupBy]=\"bucket().groupBy()\"\r\n (groupByChange)=\"bucket().groupBy.set($event)\"\r\n [sortField]=\"bucket().sortField()\"\r\n (sortFieldChange)=\"bucket().sortField.set($event)\"\r\n [sortDirection]=\"bucket().sortDirection()\"\r\n (sortDirectionChange)=\"bucket().sortDirection.set($event)\"\r\n [activeTab]=\"bucket().activeTab()\"\r\n (activeTabChange)=\"bucket().activeTab.set($event)\"\r\n (lazyLoad)=\"lazyLoad.emit($event)\"\r\n (rowClick)=\"rowClick.emit($event)\"\r\n />\r\n }\r\n </div>\r\n\r\n @if (table().config.contentEnd) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.endSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(table())\"\r\n />\r\n </div>\r\n }\r\n</div>\r\n" }]
1565
- }], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: true }] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], actionShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionShape", required: false }] }], rowActionsLoadingFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActionsLoadingFn", required: false }] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], rowActionsRequested: [{ type: i0.Output, args: ["rowActionsRequested"] }] } });
1996
+ args: [{ selector: 'mt-client-list-table-view', standalone: true, imports: [CommonModule, Table, MtDataGridComponent, SkeletonModule], template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (table().config.contentStart) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentStart\"\r\n [ngTemplateOutletContext]=\"templateContext(table())\"\r\n />\r\n </div>\r\n }\r\n\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.tableSpan)\">\r\n @if (!nativeGrid && table().loading && table().rows.length === 0) {\r\n <div class=\"flex flex-col gap-3 py-3\">\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n </div>\r\n } @else if (table().error) {\r\n <div\r\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n >\r\n {{ table().error }}\r\n </div>\r\n } @else {\r\n @if (nativeGrid) {\r\n @if (table().config.toolbarStart || table().config.toolbarEnd) {\r\n <div class=\"mb-3 flex flex-wrap items-center justify-between gap-3\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.toolbarStart ?? null\"\r\n [ngTemplateOutletContext]=\"templateContext(table())\"\r\n />\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.toolbarEnd ?? null\"\r\n [ngTemplateOutletContext]=\"templateContext(table())\"\r\n />\r\n </div>\r\n }\r\n <mt-data-grid\r\n [rowData]=\"table().rows\"\r\n [columnDefs]=\"columns()\"\r\n [autoSizeStrategy]=\"{ type: 'fitGridWidth' }\"\r\n groupDisplayType=\"groupRows\"\r\n paginationPanelShow=\"whenNeeded\"\r\n [getRowId]=\"rowId\"\r\n [height]=\"520\"\r\n [rowHeight]=\"52\"\r\n [ariaLabel]=\"table().title\"\r\n [loading]=\"table().loading\"\r\n [direction]=\"text.language().startsWith('ar') ? 'rtl' : 'ltr'\"\r\n [localeText]=\"text.gridLocale()\"\r\n [quickFilterText]=\"bucket().filterTerm()\"\r\n [showQuickFilter]=\"table().config.table.searchable\"\r\n rowGroupPanelShow=\"always\"\r\n pivotPanelShow=\"never\"\r\n [sideBar]=\"{\r\n toolPanels: ['columns', 'filters'],\r\n position: text.language().startsWith('ar') ? 'left' : 'right',\r\n }\"\r\n [cellSelection]=\"true\"\r\n [enableCharts]=\"true\"\r\n [suppressCutToClipboard]=\"true\"\r\n [pagination]=\"table().config.isPaginated\"\r\n [paginationPageSize]=\"pageSize()\"\r\n [statusBar]=\"statusBar\"\r\n [suppressPdfExport]=\"true\"\r\n [getContextMenuItems]=\"contextMenu\"\r\n [defaultCsvExportParams]=\"exportParams\"\r\n [defaultExcelExportParams]=\"exportParams\"\r\n (gridReady)=\"onReady($event)\"\r\n (filterChanged)=\"changed()\"\r\n (sortChanged)=\"changed()\"\r\n (columnVisible)=\"changed()\"\r\n (columnMoved)=\"changed()\"\r\n (columnPinned)=\"changed()\"\r\n (columnResized)=\"$event.finished && changed()\"\r\n (columnRowGroupChanged)=\"changed()\"\r\n (columnValueChanged)=\"changed()\"\r\n (columnPivotChanged)=\"changed()\"\r\n (rowClicked)=\"\r\n !$event.node.group &&\r\n !$event.node.footer &&\r\n $event.node.data &&\r\n rowClick.emit($event.node.data)\r\n \"\r\n />\r\n } @else {\r\n <mt-table\r\n [noCard]=\"true\"\r\n [data]=\"table().rows\"\r\n [columns]=\"table().columns\"\r\n dataKey=\"Id\"\r\n [storageKey]=\"tableStorageKey()\"\r\n [persistStateExclude]=\"table().config.table.persistStateExclude\"\r\n [captionStartTemplate]=\"table().config.toolbarStart ?? null\"\r\n [captionEndTemplate]=\"table().config.toolbarEnd ?? null\"\r\n [rowActions]=\"rowActions()\"\r\n [actionShape]=\"actionShape() ?? 'flat'\"\r\n [rowActionsLoadingFn]=\"rowActionsLoadingFn()\"\r\n (rowActionsRequested)=\"rowActionsRequested.emit($event)\"\r\n [generalSearch]=\"table().config.table.searchable\"\r\n [showFilters]=\"true\"\r\n filterMode=\"column\"\r\n [printable]=\"true\"\r\n [groupable]=\"true\"\r\n [cellClickFilter]=\"true\"\r\n [freezeActions]=\"true\"\r\n [exportable]=\"table().config.table.exportable\"\r\n [loading]=\"table().loading\"\r\n [clickableRows]=\"true\"\r\n [lazy]=\"table().config.isPaginated\"\r\n [lazyTotalRecords]=\"table().totalCount\"\r\n [virtualScroll]=\"!table().config.isPaginated\"\r\n [virtualScrollItemSize]=\"56\"\r\n scrollHeight=\"520px\"\r\n [pageSize]=\"pageSize()\"\r\n [filters]=\"bucket().filters()\"\r\n (filtersChange)=\"bucket().filters.set($event)\"\r\n [filterTerm]=\"bucket().filterTerm()\"\r\n (filterTermChange)=\"bucket().filterTerm.set($event)\"\r\n [groupBy]=\"bucket().groupBy()\"\r\n (groupByChange)=\"bucket().groupBy.set($event)\"\r\n [sortField]=\"bucket().sortField()\"\r\n (sortFieldChange)=\"bucket().sortField.set($event)\"\r\n [sortDirection]=\"bucket().sortDirection()\"\r\n (sortDirectionChange)=\"bucket().sortDirection.set($event)\"\r\n [activeTab]=\"bucket().activeTab()\"\r\n (activeTabChange)=\"bucket().activeTab.set($event)\"\r\n (lazyLoad)=\"lazyLoad.emit($event)\"\r\n (rowClick)=\"rowClick.emit($event)\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n @if (table().config.contentEnd) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.endSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(table())\"\r\n />\r\n </div>\r\n }\r\n</div>\r\n" }]
1997
+ }], ctorParameters: () => [], propDecorators: { nativeGridReady: [{ type: i0.Output, args: ["nativeGridReady"] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: true }] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], actionShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionShape", required: false }] }], rowActionsLoadingFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActionsLoadingFn", required: false }] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], rowActionsRequested: [{ type: i0.Output, args: ["rowActionsRequested"] }] } });
1566
1998
 
1567
1999
  const EMPTY_KEY_SET = new Set();
1568
2000
  /** Shared fallback so cards without an entry keep a stable identity. */
@@ -2315,11 +2747,11 @@ class ClientListInformativeView {
2315
2747
  };
2316
2748
  }
2317
2749
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListInformativeView, deps: [], target: i0.ɵɵFactoryTarget.Component });
2318
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ClientListInformativeView, isStandalone: true, selector: "mt-client-list-informative-view", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\n @if (informativeState().config.contentStart) {\n <div\n [style.gridColumn]=\"\n slotGridSpan(informativeState().config.layout.startSpan)\n \"\n >\n <ng-container\n [ngTemplateOutlet]=\"informativeState().config.contentStart\"\n [ngTemplateOutletContext]=\"templateContext(informativeState())\"\n />\n </div>\n }\n\n <div\n [style.gridColumn]=\"\n slotGridSpan(informativeState().config.layout.tableSpan)\n \"\n >\n <mt-card>\n @if (\n informativeState().loading &&\n !informativeState().dashboardData?.charts?.length\n ) {\n <div class=\"flex flex-col gap-3 py-3\">\n <p-skeleton height=\"6rem\" />\n <p-skeleton height=\"12rem\" />\n <p-skeleton height=\"12rem\" />\n </div>\n } @else if (informativeState().error) {\n <div\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\n >\n {{ informativeState().error }}\n </div>\n } @else if (!informativeState().dashboardData?.charts?.length) {\n <div class=\"p-6 text-center text-gray-400\">\n {{\n \"components.clientComponents.list.noInformativeDashboard\"\n | transloco\n }}\n </div>\n } @else {\n <div class=\"min-h-[420px]\">\n <mt-dashboard-viewer\n [isPage]=\"false\"\n [showFilters]=\"false\"\n [dashboardData]=\"informativeState().dashboardData\"\n [extraFilters]=\"dashboardExtraFilters()\"\n />\n </div>\n }\n </mt-card>\n </div>\n\n @if (informativeState().config.contentEnd) {\n <div\n [style.gridColumn]=\"\n slotGridSpan(informativeState().config.layout.endSpan)\n \"\n >\n <ng-container\n [ngTemplateOutlet]=\"informativeState().config.contentEnd\"\n [ngTemplateOutletContext]=\"templateContext(informativeState())\"\n />\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: DashboardViewer, selector: "mt-dashboard-viewer", inputs: ["isPage", "pageTitle", "backButton", "pageId", "dashboardData", "chartsData", "dialogsData", "filtersData", "extraFilters", "lookups", "statuses", "levelsSchema", "levelLogsResolver", "showFilters", "showFilterTrigger", "ignoreQueryFilter"], outputs: ["pageLoaded", "onBack", "chartClick"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
2750
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ClientListInformativeView, isStandalone: true, selector: "mt-client-list-informative-view", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (informativeState().config.contentStart) {\r\n <div\r\n [style.gridColumn]=\"\r\n slotGridSpan(informativeState().config.layout.startSpan)\r\n \"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"informativeState().config.contentStart\"\r\n [ngTemplateOutletContext]=\"templateContext(informativeState())\"\r\n />\r\n </div>\r\n }\r\n\r\n <div\r\n [style.gridColumn]=\"\r\n slotGridSpan(informativeState().config.layout.tableSpan)\r\n \"\r\n >\r\n <mt-card>\r\n @if (\r\n informativeState().loading &&\r\n !informativeState().dashboardData?.charts?.length\r\n ) {\r\n <div class=\"flex flex-col gap-3 py-3\">\r\n <p-skeleton height=\"6rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n </div>\r\n } @else if (informativeState().error) {\r\n <div\r\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n >\r\n {{ informativeState().error }}\r\n </div>\r\n } @else if (!informativeState().dashboardData?.charts?.length) {\r\n <div class=\"p-6 text-center text-gray-400\">\r\n {{\r\n \"components.clientComponents.list.noInformativeDashboard\"\r\n | transloco\r\n }}\r\n </div>\r\n } @else {\r\n <div class=\"min-h-[420px]\">\r\n <mt-dashboard-viewer\r\n [isPage]=\"false\"\r\n [showFilters]=\"false\"\r\n [dashboardData]=\"informativeState().dashboardData\"\r\n [extraFilters]=\"dashboardExtraFilters()\"\r\n />\r\n </div>\r\n }\r\n </mt-card>\r\n </div>\r\n\r\n @if (informativeState().config.contentEnd) {\r\n <div\r\n [style.gridColumn]=\"\r\n slotGridSpan(informativeState().config.layout.endSpan)\r\n \"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"informativeState().config.contentEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(informativeState())\"\r\n />\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: DashboardViewer, selector: "mt-dashboard-viewer", inputs: ["isPage", "pageTitle", "backButton", "pageId", "dashboardData", "chartsData", "dialogsData", "filtersData", "extraFilters", "lookups", "statuses", "levelsSchema", "levelLogsResolver", "showFilters", "showFilterTrigger", "ignoreQueryFilter"], outputs: ["pageLoaded", "onBack", "chartClick"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
2319
2751
  }
2320
2752
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListInformativeView, decorators: [{
2321
2753
  type: Component,
2322
- args: [{ selector: 'mt-client-list-informative-view', standalone: true, imports: [CommonModule, Card, DashboardViewer, SkeletonModule, TranslocoPipe], template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\n @if (informativeState().config.contentStart) {\n <div\n [style.gridColumn]=\"\n slotGridSpan(informativeState().config.layout.startSpan)\n \"\n >\n <ng-container\n [ngTemplateOutlet]=\"informativeState().config.contentStart\"\n [ngTemplateOutletContext]=\"templateContext(informativeState())\"\n />\n </div>\n }\n\n <div\n [style.gridColumn]=\"\n slotGridSpan(informativeState().config.layout.tableSpan)\n \"\n >\n <mt-card>\n @if (\n informativeState().loading &&\n !informativeState().dashboardData?.charts?.length\n ) {\n <div class=\"flex flex-col gap-3 py-3\">\n <p-skeleton height=\"6rem\" />\n <p-skeleton height=\"12rem\" />\n <p-skeleton height=\"12rem\" />\n </div>\n } @else if (informativeState().error) {\n <div\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\n >\n {{ informativeState().error }}\n </div>\n } @else if (!informativeState().dashboardData?.charts?.length) {\n <div class=\"p-6 text-center text-gray-400\">\n {{\n \"components.clientComponents.list.noInformativeDashboard\"\n | transloco\n }}\n </div>\n } @else {\n <div class=\"min-h-[420px]\">\n <mt-dashboard-viewer\n [isPage]=\"false\"\n [showFilters]=\"false\"\n [dashboardData]=\"informativeState().dashboardData\"\n [extraFilters]=\"dashboardExtraFilters()\"\n />\n </div>\n }\n </mt-card>\n </div>\n\n @if (informativeState().config.contentEnd) {\n <div\n [style.gridColumn]=\"\n slotGridSpan(informativeState().config.layout.endSpan)\n \"\n >\n <ng-container\n [ngTemplateOutlet]=\"informativeState().config.contentEnd\"\n [ngTemplateOutletContext]=\"templateContext(informativeState())\"\n />\n </div>\n }\n</div>\n" }]
2754
+ args: [{ selector: 'mt-client-list-informative-view', standalone: true, imports: [CommonModule, Card, DashboardViewer, SkeletonModule, TranslocoPipe], template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (informativeState().config.contentStart) {\r\n <div\r\n [style.gridColumn]=\"\r\n slotGridSpan(informativeState().config.layout.startSpan)\r\n \"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"informativeState().config.contentStart\"\r\n [ngTemplateOutletContext]=\"templateContext(informativeState())\"\r\n />\r\n </div>\r\n }\r\n\r\n <div\r\n [style.gridColumn]=\"\r\n slotGridSpan(informativeState().config.layout.tableSpan)\r\n \"\r\n >\r\n <mt-card>\r\n @if (\r\n informativeState().loading &&\r\n !informativeState().dashboardData?.charts?.length\r\n ) {\r\n <div class=\"flex flex-col gap-3 py-3\">\r\n <p-skeleton height=\"6rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n </div>\r\n } @else if (informativeState().error) {\r\n <div\r\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n >\r\n {{ informativeState().error }}\r\n </div>\r\n } @else if (!informativeState().dashboardData?.charts?.length) {\r\n <div class=\"p-6 text-center text-gray-400\">\r\n {{\r\n \"components.clientComponents.list.noInformativeDashboard\"\r\n | transloco\r\n }}\r\n </div>\r\n } @else {\r\n <div class=\"min-h-[420px]\">\r\n <mt-dashboard-viewer\r\n [isPage]=\"false\"\r\n [showFilters]=\"false\"\r\n [dashboardData]=\"informativeState().dashboardData\"\r\n [extraFilters]=\"dashboardExtraFilters()\"\r\n />\r\n </div>\r\n }\r\n </mt-card>\r\n </div>\r\n\r\n @if (informativeState().config.contentEnd) {\r\n <div\r\n [style.gridColumn]=\"\r\n slotGridSpan(informativeState().config.layout.endSpan)\r\n \"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"informativeState().config.contentEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(informativeState())\"\r\n />\r\n </div>\r\n }\r\n</div>\r\n" }]
2323
2755
  }], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: true }] }] } });
2324
2756
 
2325
2757
  function mergeRuntimeFilters(configured = [], runtime = {}, columns = []) {
@@ -2502,6 +2934,7 @@ const ESCALATION_STATE_KEY = 'escalation';
2502
2934
  const VIEW_ESCALATION_ACTION_KEY = 'viewEscalation';
2503
2935
  const VIEW_ESCALATION_OPERATION_KEY = 'ViewEscalation';
2504
2936
  class ClientList {
2937
+ nativeGrid = inject(MT_TABLE_RENDERER, { optional: true }) !== null;
2505
2938
  api = inject(ClientListApiService);
2506
2939
  state = inject(ClientListStateService);
2507
2940
  runtimeActions = inject(ClientListRuntimeActionsService);
@@ -2509,6 +2942,8 @@ class ClientList {
2509
2942
  transloco = inject(TranslocoService);
2510
2943
  configurations = input.required(...(ngDevMode ? [{ debugName: "configurations" }] : /* istanbul ignore next */ []));
2511
2944
  defaultTake = input(DEFAULT_SERVER_PAGE_SIZE, ...(ngDevMode ? [{ debugName: "defaultTake" }] : /* istanbul ignore next */ []));
2945
+ /** Native API access for product-specific features; no grid options are hidden behind ClientList. */
2946
+ gridReady = output();
2512
2947
  loaded = output();
2513
2948
  errored = output();
2514
2949
  itemClicked = output();
@@ -3213,14 +3648,15 @@ class ClientList {
3213
3648
  this.inFlightRequestSignatures.set(key, requestSignature);
3214
3649
  this.state.setLoading(key, true);
3215
3650
  this.state.setError(key, null);
3216
- const sub = this.api
3217
- .getRows(config.contextKey, query, filters, config.hierarchy)
3218
- .subscribe({
3651
+ const request = this.nativeGrid
3652
+ ? this.api.getAllRows(config.contextKey, query, filters, config.hierarchy)
3653
+ : this.api.getRows(config.contextKey, query, filters, config.hierarchy);
3654
+ const sub = request.subscribe({
3219
3655
  next: ({ response, propertyKeys }) => {
3220
3656
  let hasLoadedData = false;
3221
3657
  if (response.data) {
3222
3658
  this.requestPropertyKeys.set(key, propertyKeys);
3223
- this.state.setRowsResult(key, response.data, config, query.skip, query.take);
3659
+ this.state.setRowsResult(key, response.data, config, query.skip, query.take, this.nativeGrid);
3224
3660
  this.fulfilledRequestSignatures.set(key, requestSignature);
3225
3661
  hasLoadedData = true;
3226
3662
  }
@@ -3658,7 +4094,7 @@ class ClientList {
3658
4094
  return mergeRuntimeFilters(config.filters, this.runtimeFilters.get(key), this.state.itemsByKey()[key]?.columns);
3659
4095
  }
3660
4096
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientList, deps: [], target: i0.ɵɵFactoryTarget.Component });
3661
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ClientList, isStandalone: true, selector: "mt-client-list", inputs: { configurations: { classPropertyName: "configurations", publicName: "configurations", isSignal: true, isRequired: true, transformFunction: null }, defaultTake: { classPropertyName: "defaultTake", publicName: "defaultTake", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loaded: "loaded", errored: "errored", itemClicked: "itemClicked" }, providers: [
4097
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ClientList, isStandalone: true, selector: "mt-client-list", inputs: { configurations: { classPropertyName: "configurations", publicName: "configurations", isSignal: true, isRequired: true, transformFunction: null }, defaultTake: { classPropertyName: "defaultTake", publicName: "defaultTake", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { gridReady: "gridReady", loaded: "loaded", errored: "errored", itemClicked: "itemClicked" }, providers: [
3662
4098
  ClientListStateService,
3663
4099
  ClientListRuntimeActionsService,
3664
4100
  ClientListToolbarService,
@@ -3668,7 +4104,7 @@ class ClientList {
3668
4104
  // value instead (`EntityData.runtimeContext`), and the table opens only
3669
4105
  // in the drawer.
3670
4106
  provideEntityListTablePreview(),
3671
- ], ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\n @for (item of items(); track item.key) {\n <section class=\"flex flex-col gap-4\">\n @if (item.config.showHeader) {\n <div class=\"flex w-full items-center gap-2\">\n <div class=\"flex min-w-0 flex-1 items-center gap-2\">\n @if (item.config.collapse.enabled) {\n <mt-button\n variant=\"text\"\n severity=\"secondary\"\n [icon]=\"\n item.expanded\n ? item.config.collapse.collapseIcon\n : item.config.collapse.expandIcon\n \"\n (onClick)=\"toggleExpanded(item.key)\"\n />\n }\n <h3 class=\"m-0 text-lg font-semibold\">\n {{ item.title || item.moduleKey || defaultTitle(item) }}\n </h3>\n @if (item.config.headerStart) {\n <div class=\"flex items-center gap-2\">\n <ng-container\n [ngTemplateOutlet]=\"item.config.headerStart\"\n [ngTemplateOutletContext]=\"templateContext(item)\"\n />\n </div>\n }\n </div>\n @if (item.config.headerEnd) {\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\n <ng-container\n [ngTemplateOutlet]=\"item.config.headerEnd\"\n [ngTemplateOutletContext]=\"templateContext(item)\"\n />\n </div>\n }\n </div>\n }\n\n @if (item.expanded || !item.config.collapse.enabled) {\n @if (item.config.templateContent) {\n <ng-container\n [ngTemplateOutlet]=\"item.config.templateContent\"\n [ngTemplateOutletContext]=\"templateContext(item)\"\n />\n } @else if (item.type === \"informative\") {\n <mt-client-list-informative-view [state]=\"item\" />\n } @else if (item.areaType === \"table\") {\n <mt-client-list-table-view\n [state]=\"item\"\n [rowActions]=\"rowActionsFor(item)\"\n [actionShape]=\"item.config.actionShape\"\n [rowActionsLoadingFn]=\"rowActionsLoadingFnFor(item)\"\n (rowActionsRequested)=\"onRowActionsRequested(item, $event)\"\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\n (rowClick)=\"onTableRowClick(item, $event)\"\n />\n } @else {\n <mt-client-list-cards-view\n [state]=\"item\"\n [rowActions]=\"rowActionsFor(item)\"\n [rowActionsLoadingFn]=\"rowActionsLoadingFnFor(item)\"\n (rowActionsRequested)=\"onRowActionsRequested(item, $event)\"\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\n (loadMore)=\"loadMoreCards(item.key)\"\n (cardClick)=\"onCardClick(item, $event)\"\n />\n }\n }\n </section>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ClientListTableView, selector: "mt-client-list-table-view", inputs: ["state", "rowActions", "actionShape", "rowActionsLoadingFn"], outputs: ["lazyLoad", "rowClick", "rowActionsRequested"] }, { kind: "component", type: ClientListCardsView, selector: "mt-client-list-cards-view", inputs: ["state", "rowActions", "rowActionsLoadingFn"], outputs: ["lazyLoad", "loadMore", "cardClick", "rowActionsRequested"] }, { kind: "component", type: ClientListInformativeView, selector: "mt-client-list-informative-view", inputs: ["state"] }] });
4107
+ ], ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\r\n @for (item of items(); track item.key) {\r\n <section class=\"flex flex-col gap-4\">\r\n @if (item.config.showHeader) {\r\n <div class=\"flex w-full items-center gap-2\">\r\n <div class=\"flex min-w-0 flex-1 items-center gap-2\">\r\n @if (item.config.collapse.enabled) {\r\n <mt-button\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n [icon]=\"\r\n item.expanded\r\n ? item.config.collapse.collapseIcon\r\n : item.config.collapse.expandIcon\r\n \"\r\n (onClick)=\"toggleExpanded(item.key)\"\r\n />\r\n }\r\n <h3 class=\"m-0 text-lg font-semibold\">\r\n {{ item.title || item.moduleKey || defaultTitle(item) }}\r\n </h3>\r\n @if (item.config.headerStart) {\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerStart\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n @if (item.config.headerEnd) {\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (item.expanded || !item.config.collapse.enabled) {\r\n @if (item.config.templateContent) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.templateContent\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n } @else if (item.type === \"informative\") {\r\n <mt-client-list-informative-view [state]=\"item\" />\r\n } @else if (item.areaType === \"table\") {\r\n <mt-client-list-table-view\r\n [state]=\"item\"\r\n [rowActions]=\"rowActionsFor(item)\"\r\n [actionShape]=\"item.config.actionShape\"\r\n [rowActionsLoadingFn]=\"rowActionsLoadingFnFor(item)\"\r\n (rowActionsRequested)=\"onRowActionsRequested(item, $event)\"\r\n (nativeGridReady)=\"gridReady.emit({ key: item.key, event: $event })\"\r\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\r\n (rowClick)=\"onTableRowClick(item, $event)\"\r\n />\r\n } @else {\r\n <mt-client-list-cards-view\r\n [state]=\"item\"\r\n [rowActions]=\"rowActionsFor(item)\"\r\n [rowActionsLoadingFn]=\"rowActionsLoadingFnFor(item)\"\r\n (rowActionsRequested)=\"onRowActionsRequested(item, $event)\"\r\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\r\n (loadMore)=\"loadMoreCards(item.key)\"\r\n (cardClick)=\"onCardClick(item, $event)\"\r\n />\r\n }\r\n }\r\n </section>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ClientListTableView, selector: "mt-client-list-table-view", inputs: ["state", "rowActions", "actionShape", "rowActionsLoadingFn"], outputs: ["nativeGridReady", "lazyLoad", "rowClick", "rowActionsRequested"] }, { kind: "component", type: ClientListCardsView, selector: "mt-client-list-cards-view", inputs: ["state", "rowActions", "rowActionsLoadingFn"], outputs: ["lazyLoad", "loadMore", "cardClick", "rowActionsRequested"] }, { kind: "component", type: ClientListInformativeView, selector: "mt-client-list-informative-view", inputs: ["state"] }] });
3672
4108
  }
3673
4109
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientList, decorators: [{
3674
4110
  type: Component,
@@ -3688,8 +4124,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
3688
4124
  // value instead (`EntityData.runtimeContext`), and the table opens only
3689
4125
  // in the drawer.
3690
4126
  provideEntityListTablePreview(),
3691
- ], template: "<div class=\"flex flex-col gap-4\">\n @for (item of items(); track item.key) {\n <section class=\"flex flex-col gap-4\">\n @if (item.config.showHeader) {\n <div class=\"flex w-full items-center gap-2\">\n <div class=\"flex min-w-0 flex-1 items-center gap-2\">\n @if (item.config.collapse.enabled) {\n <mt-button\n variant=\"text\"\n severity=\"secondary\"\n [icon]=\"\n item.expanded\n ? item.config.collapse.collapseIcon\n : item.config.collapse.expandIcon\n \"\n (onClick)=\"toggleExpanded(item.key)\"\n />\n }\n <h3 class=\"m-0 text-lg font-semibold\">\n {{ item.title || item.moduleKey || defaultTitle(item) }}\n </h3>\n @if (item.config.headerStart) {\n <div class=\"flex items-center gap-2\">\n <ng-container\n [ngTemplateOutlet]=\"item.config.headerStart\"\n [ngTemplateOutletContext]=\"templateContext(item)\"\n />\n </div>\n }\n </div>\n @if (item.config.headerEnd) {\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\n <ng-container\n [ngTemplateOutlet]=\"item.config.headerEnd\"\n [ngTemplateOutletContext]=\"templateContext(item)\"\n />\n </div>\n }\n </div>\n }\n\n @if (item.expanded || !item.config.collapse.enabled) {\n @if (item.config.templateContent) {\n <ng-container\n [ngTemplateOutlet]=\"item.config.templateContent\"\n [ngTemplateOutletContext]=\"templateContext(item)\"\n />\n } @else if (item.type === \"informative\") {\n <mt-client-list-informative-view [state]=\"item\" />\n } @else if (item.areaType === \"table\") {\n <mt-client-list-table-view\n [state]=\"item\"\n [rowActions]=\"rowActionsFor(item)\"\n [actionShape]=\"item.config.actionShape\"\n [rowActionsLoadingFn]=\"rowActionsLoadingFnFor(item)\"\n (rowActionsRequested)=\"onRowActionsRequested(item, $event)\"\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\n (rowClick)=\"onTableRowClick(item, $event)\"\n />\n } @else {\n <mt-client-list-cards-view\n [state]=\"item\"\n [rowActions]=\"rowActionsFor(item)\"\n [rowActionsLoadingFn]=\"rowActionsLoadingFnFor(item)\"\n (rowActionsRequested)=\"onRowActionsRequested(item, $event)\"\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\n (loadMore)=\"loadMoreCards(item.key)\"\n (cardClick)=\"onCardClick(item, $event)\"\n />\n }\n }\n </section>\n }\n</div>\n" }]
3692
- }], ctorParameters: () => [], propDecorators: { configurations: [{ type: i0.Input, args: [{ isSignal: true, alias: "configurations", required: true }] }], defaultTake: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultTake", required: false }] }], loaded: [{ type: i0.Output, args: ["loaded"] }], errored: [{ type: i0.Output, args: ["errored"] }], itemClicked: [{ type: i0.Output, args: ["itemClicked"] }] } });
4127
+ ], template: "<div class=\"flex flex-col gap-4\">\r\n @for (item of items(); track item.key) {\r\n <section class=\"flex flex-col gap-4\">\r\n @if (item.config.showHeader) {\r\n <div class=\"flex w-full items-center gap-2\">\r\n <div class=\"flex min-w-0 flex-1 items-center gap-2\">\r\n @if (item.config.collapse.enabled) {\r\n <mt-button\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n [icon]=\"\r\n item.expanded\r\n ? item.config.collapse.collapseIcon\r\n : item.config.collapse.expandIcon\r\n \"\r\n (onClick)=\"toggleExpanded(item.key)\"\r\n />\r\n }\r\n <h3 class=\"m-0 text-lg font-semibold\">\r\n {{ item.title || item.moduleKey || defaultTitle(item) }}\r\n </h3>\r\n @if (item.config.headerStart) {\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerStart\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n @if (item.config.headerEnd) {\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (item.expanded || !item.config.collapse.enabled) {\r\n @if (item.config.templateContent) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.templateContent\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n } @else if (item.type === \"informative\") {\r\n <mt-client-list-informative-view [state]=\"item\" />\r\n } @else if (item.areaType === \"table\") {\r\n <mt-client-list-table-view\r\n [state]=\"item\"\r\n [rowActions]=\"rowActionsFor(item)\"\r\n [actionShape]=\"item.config.actionShape\"\r\n [rowActionsLoadingFn]=\"rowActionsLoadingFnFor(item)\"\r\n (rowActionsRequested)=\"onRowActionsRequested(item, $event)\"\r\n (nativeGridReady)=\"gridReady.emit({ key: item.key, event: $event })\"\r\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\r\n (rowClick)=\"onTableRowClick(item, $event)\"\r\n />\r\n } @else {\r\n <mt-client-list-cards-view\r\n [state]=\"item\"\r\n [rowActions]=\"rowActionsFor(item)\"\r\n [rowActionsLoadingFn]=\"rowActionsLoadingFnFor(item)\"\r\n (rowActionsRequested)=\"onRowActionsRequested(item, $event)\"\r\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\r\n (loadMore)=\"loadMoreCards(item.key)\"\r\n (cardClick)=\"onCardClick(item, $event)\"\r\n />\r\n }\r\n }\r\n </section>\r\n }\r\n</div>\r\n" }]
4128
+ }], ctorParameters: () => [], propDecorators: { configurations: [{ type: i0.Input, args: [{ isSignal: true, alias: "configurations", required: true }] }], defaultTake: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultTake", required: false }] }], gridReady: [{ type: i0.Output, args: ["gridReady"] }], loaded: [{ type: i0.Output, args: ["loaded"] }], errored: [{ type: i0.Output, args: ["errored"] }], itemClicked: [{ type: i0.Output, args: ["itemClicked"] }] } });
3693
4129
 
3694
4130
  /**
3695
4131
  * Generated bundle index. Do not edit.