@masterteam/data-table 0.0.0-stage → 0.0.2

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.
@@ -0,0 +1,271 @@
1
+ import { MtTableText } from '@masterteam/data-table';
2
+ export * from '@masterteam/data-table';
3
+ import { MtSortModel, MtFilterModel, MtColDef, MtCreateRangeChartParams, MtChartModel, MtGridApi, MtGridViewState, MtColumnDef, MtCellRenderer, MtDetailCellRendererParams, MtDataGridComponent, MtSideBar, MtContextMenuItem } from '@masterteam/data-grid';
4
+ import { TableAction } from '@masterteam/components/table';
5
+ import * as _angular_core from '@angular/core';
6
+ import { InjectionToken, EnvironmentProviders } from '@angular/core';
7
+ import { MTMenuItem } from '@masterteam/components/menu';
8
+
9
+ /** Actions are supplied after business permission checks; the wrapper rechecks availability on execution. */
10
+ interface MtTableRowAction<T> extends Omit<TableAction, 'action' | 'hidden' | 'loading'> {
11
+ readonly action: (row: T) => void;
12
+ readonly hidden?: (row: T) => boolean;
13
+ readonly disabled?: boolean | ((row: T) => boolean);
14
+ readonly loading?: boolean | ((row: T) => boolean);
15
+ }
16
+ type MtDataTableProfile = 'compact' | 'studio' | 'embedded';
17
+ interface MtTableScopeIdentity {
18
+ readonly application: string;
19
+ readonly tenant: string;
20
+ readonly user: string;
21
+ readonly actor: string;
22
+ readonly template?: string | number | null;
23
+ }
24
+ interface MtDataTableConfiguration {
25
+ readonly identity: () => MtTableScopeIdentity | null;
26
+ readonly direction?: () => 'ltr' | 'rtl';
27
+ }
28
+ interface MtTableQuery {
29
+ readonly offset: number;
30
+ readonly limit: number;
31
+ readonly sort: readonly MtSortModel[];
32
+ readonly filters: MtFilterModel;
33
+ readonly search: string;
34
+ readonly groupColumns: readonly string[];
35
+ readonly groupKeys: readonly string[];
36
+ readonly valueColumns: readonly {
37
+ colId: string;
38
+ aggFunc: string;
39
+ }[];
40
+ readonly pivotColumns: readonly string[];
41
+ }
42
+ interface MtTablePage<T> {
43
+ readonly rows: readonly T[];
44
+ readonly totalCount: number;
45
+ readonly columns?: readonly MtColDef<T>[];
46
+ readonly complete: boolean;
47
+ }
48
+ interface MtTableCapabilities {
49
+ readonly sort: boolean;
50
+ readonly filter: boolean;
51
+ readonly group: boolean;
52
+ readonly pivot: boolean;
53
+ readonly charts: boolean;
54
+ readonly exportAll: boolean;
55
+ }
56
+ interface MtTableDataSource<T> {
57
+ readonly processing: 'client' | 'server';
58
+ /** Scope identity excludes selected fields; changing it clears previous rows immediately. */
59
+ readonly scopeKey: string;
60
+ /** Stable analysis scope when a locale-only refresh changes scopeKey. Contains configuration, never row data. */
61
+ readonly viewScopeKey?: string;
62
+ readonly key: string;
63
+ readonly capabilities: MtTableCapabilities;
64
+ readonly load: (query: MtTableQuery, signal: AbortSignal) => Promise<MtTablePage<T>>;
65
+ }
66
+ type MtTableExportFormat = 'csv' | 'excel' | 'pdf' | 'print';
67
+ interface MtTableExportRequest<T> {
68
+ readonly format: MtTableExportFormat;
69
+ readonly title: string;
70
+ readonly query: MtTableQuery;
71
+ readonly rows: readonly T[];
72
+ readonly complete: boolean;
73
+ readonly visibleColumns: readonly string[];
74
+ }
75
+ interface MtTableExporter<T> {
76
+ readonly export: (request: MtTableExportRequest<T>, signal: AbortSignal) => Promise<void>;
77
+ }
78
+
79
+ declare const MT_DATA_TABLE_CONFIGURATION: InjectionToken<MtDataTableConfiguration>;
80
+
81
+ /** Root installation of the data-table configuration and preferences (portal and Studio). */
82
+ declare function provideMTDataTables(configuration: MtDataTableConfiguration | (() => MtDataTableConfiguration)): EnvironmentProviders;
83
+
84
+ /** A shared, cancellable FIFO scheduler. Collapsing one record never cancels another. */
85
+ declare class MtDatasetScheduler {
86
+ private readonly concurrency;
87
+ private active;
88
+ private readonly queue;
89
+ constructor(concurrency?: number);
90
+ run<T>(work: () => Promise<T>, signal: AbortSignal): Promise<T>;
91
+ private drain;
92
+ }
93
+ /** Values are scoped by the caller's complete authenticated query identity. */
94
+ declare class MtDatasetCache<T> {
95
+ private readonly capacity;
96
+ private readonly entries;
97
+ constructor(capacity?: number);
98
+ get(key: string): T | undefined;
99
+ set(key: string, value: T): void;
100
+ clear(): void;
101
+ get size(): number;
102
+ }
103
+
104
+ declare class MtIncompleteTableError extends Error {
105
+ constructor();
106
+ }
107
+ /** Load every page of a small result before permitting client aggregation. A threshold is never a truncation limit. */
108
+ declare function loadMtTableResult<T>(source: MtTableDataSource<T>, query: MtTableQuery, signal: AbortSignal, getRowId: (row: T) => string, clientAnalysisThreshold?: number): Promise<MtTablePage<T>>;
109
+ declare function mtClientTableSource<T>(key: string, rows: readonly T[]): MtTableDataSource<T>;
110
+
111
+ /** Configuration only: selection references stable row identities, never row positions or chart data. */
112
+ interface MtSavedTableChart {
113
+ readonly options: Omit<MtCreateRangeChartParams, 'chartContainer' | 'cellRange' | 'cellRanges'>;
114
+ readonly ranges: readonly {
115
+ readonly columns: readonly string[];
116
+ readonly rowIds: readonly string[] | null;
117
+ }[];
118
+ }
119
+ declare function captureMtTableChart<T>(model: MtChartModel, api: MtGridApi<T>, wholeTable?: boolean): MtSavedTableChart;
120
+ declare function restoreMtTableChart<T>(saved: MtSavedTableChart, api: MtGridApi<T>): MtCreateRangeChartParams | null;
121
+ declare function parseMtTableCharts(value: unknown): readonly MtSavedTableChart[];
122
+
123
+ interface MtTableViewIdentity {
124
+ readonly level: number | string;
125
+ readonly module?: string | null;
126
+ readonly role: string;
127
+ }
128
+ declare function mtTablePreferenceKey(identity: MtTableScopeIdentity, view: MtTableViewIdentity): string;
129
+ /** Local storage is optional (private browsing/quota/security errors must not break a table). */
130
+ declare class MtTablePreferences {
131
+ private readonly configuration;
132
+ key(view: MtTableViewIdentity): string | null;
133
+ read(view: MtTableViewIdentity): MtGridViewState | null;
134
+ write(view: MtTableViewIdentity, state: MtGridViewState): void;
135
+ clear(view: MtTableViewIdentity): void;
136
+ readCharts(view: MtTableViewIdentity, scope: string): readonly MtSavedTableChart[];
137
+ writeCharts(view: MtTableViewIdentity, scope: string, charts: readonly MtSavedTableChart[]): void;
138
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtTablePreferences, never>;
139
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MtTablePreferences>;
140
+ }
141
+
142
+ /** Saved roles are configuration, never authority to enable a now-unavailable operation. */
143
+ declare function reconcileMtTableView<T>(state: MtGridViewState, columns: readonly MtColumnDef<T>[], policy: {
144
+ grouping: boolean;
145
+ values: boolean;
146
+ pivot: boolean;
147
+ }): MtGridViewState;
148
+
149
+ /** Masterteam chrome around the independent engine. Business operations remain in the owning feature. */
150
+ declare class MtDataTableComponent<T extends object> {
151
+ readonly rows: _angular_core.InputSignal<readonly T[]>;
152
+ readonly columns: _angular_core.InputSignal<readonly MtColDef<T>[]>;
153
+ readonly getRowId: _angular_core.InputSignal<(row: T) => string>;
154
+ readonly source: _angular_core.InputSignal<MtTableDataSource<T> | null>;
155
+ readonly profile: _angular_core.InputSignal<MtDataTableProfile>;
156
+ readonly title: _angular_core.InputSignal<string>;
157
+ readonly showHeading: _angular_core.InputSignal<boolean>;
158
+ readonly height: _angular_core.InputSignal<number>;
159
+ readonly rowHeight: _angular_core.InputSignal<number>;
160
+ readonly fitColumns: _angular_core.InputSignal<boolean>;
161
+ readonly rowActions: _angular_core.InputSignal<readonly MtTableRowAction<T>[]>;
162
+ readonly loading: _angular_core.InputSignal<boolean>;
163
+ readonly masterDetail: _angular_core.InputSignal<boolean>;
164
+ readonly detailRenderer: _angular_core.InputSignal<MtCellRenderer<T> | undefined>;
165
+ readonly detailRendererParams: _angular_core.InputSignal<MtDetailCellRendererParams<T, unknown>>;
166
+ readonly isRowMaster: _angular_core.InputSignal<((row: T) => boolean) | undefined>;
167
+ readonly detailAutoHeight: _angular_core.InputSignal<boolean>;
168
+ readonly detailHeight: _angular_core.InputSignal<number>;
169
+ readonly selectable: _angular_core.InputSignal<boolean>;
170
+ readonly groupable: _angular_core.InputSignal<boolean>;
171
+ readonly readOnly: _angular_core.InputSignal<boolean>;
172
+ readonly viewIdentity: _angular_core.InputSignal<MtTableViewIdentity | null>;
173
+ readonly exporter: _angular_core.InputSignal<MtTableExporter<T> | null>;
174
+ readonly exportFormats: _angular_core.InputSignal<readonly MtTableExportFormat[]>;
175
+ readonly columnLoadRequested: _angular_core.OutputEmitterRef<string>;
176
+ readonly rowClick: _angular_core.OutputEmitterRef<T>;
177
+ readonly selectionChange: _angular_core.OutputEmitterRef<readonly T[]>;
178
+ readonly focusChange: _angular_core.OutputEmitterRef<boolean>;
179
+ readonly viewStateChange: _angular_core.OutputEmitterRef<MtGridViewState>;
180
+ protected readonly text: MtTableText;
181
+ private readonly configuration;
182
+ private readonly injector;
183
+ private readonly preferences;
184
+ private readonly printService;
185
+ private readonly host;
186
+ private readonly destroyRef;
187
+ readonly grid: _angular_core.Signal<MtDataGridComponent<T> | undefined>;
188
+ private readonly chartDock;
189
+ protected readonly query: _angular_core.WritableSignal<MtTableQuery>;
190
+ private readonly loadedRows;
191
+ protected readonly complete: _angular_core.WritableSignal<boolean>;
192
+ private readonly total;
193
+ protected readonly fetching: _angular_core.WritableSignal<boolean>;
194
+ protected readonly error: _angular_core.WritableSignal<boolean>;
195
+ protected readonly focused: _angular_core.WritableSignal<boolean>;
196
+ protected readonly exporting: _angular_core.WritableSignal<boolean>;
197
+ protected readonly exportFailed: _angular_core.WritableSignal<boolean>;
198
+ protected readonly chartOpen: _angular_core.Signal<boolean>;
199
+ protected readonly search: _angular_core.WritableSignal<string>;
200
+ private readonly reload;
201
+ private readonly hydrated;
202
+ protected readonly focusHeight: _angular_core.WritableSignal<number>;
203
+ protected readonly normalHeight: _angular_core.WritableSignal<number>;
204
+ private focusOrigin;
205
+ private exportController;
206
+ private activeScope;
207
+ private preferenceKey;
208
+ private chartsHydrated;
209
+ protected readonly direction: _angular_core.Signal<"ltr" | "rtl">;
210
+ protected readonly displayedRows: _angular_core.Signal<readonly T[]>;
211
+ protected readonly busy: _angular_core.Signal<boolean>;
212
+ protected readonly analysisEnabled: _angular_core.Signal<boolean>;
213
+ protected readonly chartsEnabled: _angular_core.Signal<boolean>;
214
+ protected readonly exportAllowed: _angular_core.Signal<boolean>;
215
+ protected readonly sideBar: _angular_core.Signal<MtSideBar>;
216
+ protected readonly count: _angular_core.Signal<number>;
217
+ protected readonly clientPaging: _angular_core.Signal<boolean>;
218
+ protected readonly pagingInfo: _angular_core.Signal<{
219
+ size: number;
220
+ page: number;
221
+ total: number;
222
+ pages: number;
223
+ first: number;
224
+ last: number;
225
+ } | null>;
226
+ protected readonly selection: _angular_core.Signal<{
227
+ mode: "multiRow";
228
+ enableClickSelection: boolean;
229
+ } | undefined>;
230
+ protected readonly resolvedColumns: _angular_core.Signal<readonly MtColDef<T>[]>;
231
+ private readonly policyColumns;
232
+ private readonly viewStamp;
233
+ protected readonly columnChoices: _angular_core.Signal<{
234
+ id: string;
235
+ label: string;
236
+ visible: boolean;
237
+ locked: boolean | undefined;
238
+ }[]>;
239
+ protected readonly groupingItems: _angular_core.Signal<MTMenuItem[]>;
240
+ protected readonly exportItems: _angular_core.Signal<MTMenuItem[]>;
241
+ private fitWidth;
242
+ constructor();
243
+ protected setSearch(value: string): void;
244
+ /** Complete query scope for record/level exports and cross-record analysis. Never derived from loaded rows. */
245
+ getQuery(): MtTableQuery;
246
+ protected sorted(sort: readonly MtSortModel[]): void;
247
+ protected filtered(): void;
248
+ protected selected(): void;
249
+ protected changeColumn(id: string, visible: boolean): void;
250
+ protected columnsVisible(ids: readonly string[]): void;
251
+ protected analysisFieldsChanged(): void;
252
+ protected retry(): void;
253
+ protected page(direction: number): void;
254
+ protected pageSize(size: number): void;
255
+ protected pageNumber(page: number): void;
256
+ protected number(value: number): string;
257
+ protected openAnalysis(): void;
258
+ protected focus(event: Event): void;
259
+ protected closeFocus(): void;
260
+ protected escape(event: Event): void;
261
+ protected chartTable(): void;
262
+ protected chartSelection(): void;
263
+ protected readonly contextMenu: () => readonly MtContextMenuItem<T>[];
264
+ protected resetView(): void;
265
+ protected export(format: MtTableExportFormat): Promise<void>;
266
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtDataTableComponent<any>, never>;
267
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MtDataTableComponent<any>, "mt-data-table", never, { "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "getRowId": { "alias": "getRowId"; "required": true; "isSignal": true; }; "source": { "alias": "source"; "required": false; "isSignal": true; }; "profile": { "alias": "profile"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "showHeading": { "alias": "showHeading"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "fitColumns": { "alias": "fitColumns"; "required": false; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "masterDetail": { "alias": "masterDetail"; "required": false; "isSignal": true; }; "detailRenderer": { "alias": "detailRenderer"; "required": false; "isSignal": true; }; "detailRendererParams": { "alias": "detailRendererParams"; "required": false; "isSignal": true; }; "isRowMaster": { "alias": "isRowMaster"; "required": false; "isSignal": true; }; "detailAutoHeight": { "alias": "detailAutoHeight"; "required": false; "isSignal": true; }; "detailHeight": { "alias": "detailHeight"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "groupable": { "alias": "groupable"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "viewIdentity": { "alias": "viewIdentity"; "required": false; "isSignal": true; }; "exporter": { "alias": "exporter"; "required": false; "isSignal": true; }; "exportFormats": { "alias": "exportFormats"; "required": false; "isSignal": true; }; }, { "columnLoadRequested": "columnLoadRequested"; "rowClick": "rowClick"; "selectionChange": "selectionChange"; "focusChange": "focusChange"; "viewStateChange": "viewStateChange"; }, never, ["[tableActions]"], true, never>;
268
+ }
269
+
270
+ export { MT_DATA_TABLE_CONFIGURATION, MtDataTableComponent, MtDatasetCache, MtDatasetScheduler, MtIncompleteTableError, MtTablePreferences, captureMtTableChart, loadMtTableResult, mtClientTableSource, mtTablePreferenceKey, parseMtTableCharts, provideMTDataTables, reconcileMtTableView, restoreMtTableChart };
271
+ export type { MtDataTableConfiguration, MtDataTableProfile, MtSavedTableChart, MtTableCapabilities, MtTableDataSource, MtTableExportFormat, MtTableExportRequest, MtTableExporter, MtTablePage, MtTableQuery, MtTableRowAction, MtTableScopeIdentity, MtTableViewIdentity };
@@ -0,0 +1,315 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal, TemplateRef } from '@angular/core';
3
+ import { EntityData, EntityViewType } from '@masterteam/components/entities';
4
+ import * as _masterteam_data_grid from '@masterteam/data-grid';
5
+ import { MtChartCategoryValue, MtCellRendererParams, MtColumnDef, MtExportCellParams, MtGridApi, MtColDef, MtCellRenderer, MtDetailCellRendererParams, MtContextMenuItem, MtGridViewState, MtGridReadyEvent, MtSortModel, MtFilterChangedEvent, MtPaginationChangedEvent, MtRowGroupOpenedEvent, MtSideBarDef, MtRowSelectionOptions, MtStatusBarOptions, MtRowClickedEvent, MtSelectionChangedEvent, MtGetContextMenuItemsParams } from '@masterteam/data-grid';
6
+ import { TablePrintConfig, TableAction, TableActionShape, ColumnDef } from '@masterteam/components/table';
7
+ import { Popover } from 'primeng/popover';
8
+
9
+ type MtCellScalar = string | number | boolean | Date | null;
10
+ interface MtEntityCellValues {
11
+ readonly display: string;
12
+ readonly identity: string | number | boolean | null;
13
+ readonly sort: MtCellScalar;
14
+ readonly filter: MtCellScalar;
15
+ readonly aggregate: number | null;
16
+ readonly export: string | number | boolean | Date | null;
17
+ }
18
+ /**
19
+ * Typed category identities of an entity value for charts: option keys, user ids
20
+ * and authored colours from the actual contracts, never parsed cell text.
21
+ * Missing values resolve to an empty list; multi-value properties list each member once.
22
+ */
23
+ declare function mtEntityCategoryValues(entity: EntityData): readonly MtChartCategoryValue[];
24
+ /** One registry separates mathematical values from labels. Formatted currencies never enter sums. */
25
+ declare function mtEntityCellValues(entity: EntityData): MtEntityCellValues;
26
+ declare class MtDataTableEntityCell<T> {
27
+ readonly params: _angular_core.InputSignal<MtCellRendererParams<T>>;
28
+ protected readonly entity: _angular_core.Signal<EntityData | null>;
29
+ protected readonly simpleText: _angular_core.Signal<boolean>;
30
+ private cellEntity;
31
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtDataTableEntityCell<any>, never>;
32
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MtDataTableEntityCell<any>, "mt-data-table-entity-cell", never, { "params": { "alias": "params"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
33
+ }
34
+ /** Every native column option is accepted; explicit options override entity defaults. */
35
+ interface MtEntityColumnOptions<T> extends MtColumnDef<T> {
36
+ /** Optional catalog identity. Native colId/field work without this shorthand. */
37
+ readonly key?: string;
38
+ readonly label?: string;
39
+ readonly viewType: EntityViewType;
40
+ readonly entity: (row: T) => EntityData | null;
41
+ readonly hidden?: boolean;
42
+ readonly capabilities?: {
43
+ readonly sort: boolean;
44
+ readonly filter: boolean;
45
+ readonly group: boolean;
46
+ readonly aggregate: boolean;
47
+ readonly pivot: boolean;
48
+ readonly chart: boolean;
49
+ };
50
+ }
51
+ /** Optional native export callback: preserves typed numbers/dates and exports entity labels. */
52
+ declare function mtEntityExportValue<T>(params: MtExportCellParams<T>): unknown;
53
+ declare function mtEntityColumn<T>(options: MtEntityColumnOptions<T>): MtColumnDef<T>;
54
+
55
+ declare const TEXT: {
56
+ readonly selectRow: readonly ["Select row", "تحديد الصف"];
57
+ readonly selectAll: readonly ["Select all rows on this page", "تحديد كل الصفوف في هذه الصفحة"];
58
+ readonly search: readonly ["Search", "بحث"];
59
+ readonly columns: readonly ["Columns", "الأعمدة"];
60
+ readonly rowActions: readonly ["Row actions", "إجراءات السجل"];
61
+ readonly actions: readonly ["Actions", "الإجراءات"];
62
+ readonly groupBy: readonly ["Group by", "تجميع حسب"];
63
+ readonly noGrouping: readonly ["No grouping", "بدون تجميع"];
64
+ readonly analysis: readonly ["Analysis", "التحليل"];
65
+ readonly export: readonly ["Export", "تصدير"];
66
+ readonly csv: readonly ["CSV", "CSV"];
67
+ readonly excel: readonly ["Excel", "Excel"];
68
+ readonly pdf: readonly ["PDF", "PDF"];
69
+ readonly print: readonly ["Print", "طباعة"];
70
+ readonly focus: readonly ["Focus table", "توسيع الجدول"];
71
+ readonly closeFocus: readonly ["Close focus view", "إغلاق العرض الموسع"];
72
+ readonly retry: readonly ["Try again", "إعادة المحاولة"];
73
+ readonly failed: readonly ["Unable to load this table.", "تعذر تحميل هذا الجدول."];
74
+ readonly exportFailed: readonly ["Export failed. Try again.", "تعذر التصدير. حاول مرة أخرى."];
75
+ readonly noRows: readonly ["No records", "لا توجد سجلات"];
76
+ readonly loading: readonly ["Loading…", "جارٍ التحميل…"];
77
+ readonly reset: readonly ["Reset view", "إعادة ضبط العرض"];
78
+ readonly rows: readonly ["records", "سجل"];
79
+ readonly previous: readonly ["Previous page", "الصفحة السابقة"];
80
+ readonly next: readonly ["Next page", "الصفحة التالية"];
81
+ readonly pageSize: readonly ["Rows per page", "عدد الصفوف في الصفحة"];
82
+ readonly page: readonly ["Page", "الصفحة"];
83
+ readonly compare: readonly ["Compare selected records", "مقارنة السجلات المحددة"];
84
+ readonly close: readonly ["Close", "إغلاق"];
85
+ readonly incomplete: readonly ["Whole-table analysis is unavailable until the complete result is loaded.", "يتاح تحليل الجدول بعد تحميل جميع النتائج."];
86
+ readonly chart: readonly ["Chart table", "رسم بياني للجدول"];
87
+ readonly chartSelection: readonly ["Chart selection", "رسم بياني للتحديد"];
88
+ };
89
+ type MtTableTextKey = keyof typeof TEXT;
90
+ /** Product translations override package defaults. Language changes remain reactive. */
91
+ declare class MtTableText {
92
+ private readonly transloco;
93
+ readonly language: Signal<string>;
94
+ private readonly translationEvents;
95
+ readonly gridLocale: Signal<Readonly<Record<string, string>>>;
96
+ text(key: MtTableTextKey): string;
97
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtTableText, never>;
98
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MtTableText>;
99
+ }
100
+
101
+ /** Reuse the existing Arabic-safe product print path with the entire matching result. */
102
+ declare function mtTablePrintConfiguration<T extends object>(api: MtGridApi<T>, definitions: readonly MtColumnDef<T>[], title: string): TablePrintConfig;
103
+
104
+ /**
105
+ * A column without a data source (no `field`, no `valueGetter`) is a control column, such as
106
+ * the row actions. Like the reference grid, its header keeps the menu button only: there is
107
+ * nothing to sort or filter.
108
+ */
109
+ declare function mtIsControlColumn<T>(column: MtColumnDef<T>): boolean;
110
+ /**
111
+ * The one standard header (user decision 2026-11-03). Every data column shows the sort
112
+ * indicator, the menu button and the filter button, and it resizes and moves. No page may
113
+ * replace the header: custom header renderers are dropped and floating filters stay off,
114
+ * because filtering lives in the header's filter button.
115
+ *
116
+ * Backend limits are the only page choices kept: `sortable: false` marks a column the server
117
+ * cannot sort (its sort indicator is hidden), and with `server` set, `filter: false` marks a
118
+ * column the server cannot filter (its filter button is hidden). Control columns keep their
119
+ * own width, pinning and lock settings.
120
+ */
121
+ declare function mtStandardColumns<T>(columns: readonly MtColDef<T>[], options?: {
122
+ readonly server?: boolean;
123
+ }): readonly MtColDef<T>[];
124
+
125
+ /** One externally loaded page: the rows input holds this page only. */
126
+ interface MtStandardGridServerPage {
127
+ /** Rows on the server for the current query. */
128
+ readonly total: number;
129
+ /** Zero-based page index. */
130
+ readonly page: number;
131
+ readonly pageSize: number;
132
+ }
133
+ /** The formats of the standard Export menu. */
134
+ type MtStandardGridExportFormat = 'csv' | 'excel' | 'pdf';
135
+ /** A detail row under expandable rows (master/detail). */
136
+ interface MtStandardGridDetail<T> {
137
+ readonly renderer: MtCellRenderer<T>;
138
+ readonly params?: MtDetailCellRendererParams<T, any>;
139
+ /** Rows that can open a detail row; every row when omitted. */
140
+ readonly isRowMaster?: (row: T) => boolean;
141
+ }
142
+ /**
143
+ * The one standard grid for product pages (user decision 2026-11-03). Every page that shows
144
+ * the new grid renders this component, so every grid has the same header (sort, menu and
145
+ * filter on every data column; the menu only on control columns), the same geometry, the same
146
+ * top strip (group panel, quick filter, pivot zone while pivoting), the same Columns and
147
+ * Filters side bar, status bar, pager, context menu, CSV/Excel export and charts.
148
+ *
149
+ * A page supplies data, entity columns, the row id, permissions and behaviour hooks only;
150
+ * there is deliberately no input for header templates, heights or feature toggles.
151
+ */
152
+ declare class MtStandardGridComponent<T extends object> {
153
+ protected readonly text: MtTableText;
154
+ private readonly printService;
155
+ readonly rows: _angular_core.InputSignal<readonly T[]>;
156
+ readonly columns: _angular_core.InputSignal<readonly MtColDef<T>[]>;
157
+ /** Row id; local tables without ids get a stable id per row object. */
158
+ readonly rowId: _angular_core.InputSignal<(row: T) => string>;
159
+ /** Accessible name of the grid. */
160
+ readonly label: _angular_core.InputSignal<string>;
161
+ readonly loading: _angular_core.InputSignal<boolean>;
162
+ /** Grid height in px, or `'auto'` to grow with its rows (the page layout decides). */
163
+ readonly height: _angular_core.InputSignal<number | "auto">;
164
+ /** Row checkboxes with the header select-all. */
165
+ readonly selection: _angular_core.InputSignal<boolean>;
166
+ /** Export permission: the CSV, Excel and PDF items of the context menu. */
167
+ readonly exportable: _angular_core.InputSignal<boolean>;
168
+ readonly exportName: _angular_core.InputSignal<string>;
169
+ /** The formats the Export menu offers (a narrower export permission). */
170
+ readonly exportFormats: _angular_core.InputSignal<readonly MtStandardGridExportFormat[]>;
171
+ /**
172
+ * An owner-run export that replaces the grid's own, e.g. a server export of rows the grid
173
+ * has not loaded. The menu stays the standard one.
174
+ */
175
+ readonly exporter: _angular_core.InputSignal<((format: MtStandardGridExportFormat) => void) | null>;
176
+ /** Page-specific row actions, appended to the standard context menu of a data row. */
177
+ readonly rowMenuItems: _angular_core.InputSignal<((row: T) => readonly MtContextMenuItem<T>[]) | null>;
178
+ /** Server paging; sorting, filtering and paging then belong to the owner (external data). */
179
+ readonly server: _angular_core.InputSignal<MtStandardGridServerPage | null>;
180
+ /** The pager. A page whose grid scrolls every row inside its own viewport turns it off. */
181
+ readonly paged: _angular_core.InputSignal<boolean>;
182
+ /** A detail row under expandable rows. */
183
+ readonly detail: _angular_core.InputSignal<MtStandardGridDetail<T> | null>;
184
+ /** Where the grid sits (e.g. a record path), shown in chart titles; defaults to the label. */
185
+ readonly chartContext: _angular_core.InputSignal<string | null>;
186
+ /** Quick-filter text shown in the top strip (a restored search term). */
187
+ readonly search: _angular_core.InputSignal<string>;
188
+ /** The standard empty state's text; without a title the grid's own no-rows line shows. */
189
+ readonly emptyTitle: _angular_core.InputSignal<string | null>;
190
+ readonly emptyDescription: _angular_core.InputSignal<string | null>;
191
+ /** A saved view applied once when the grid is ready. */
192
+ readonly view: _angular_core.InputSignal<MtGridViewState | null>;
193
+ readonly gridReady: _angular_core.OutputEmitterRef<MtGridReadyEvent<T>>;
194
+ readonly rowClicked: _angular_core.OutputEmitterRef<T>;
195
+ readonly selectionChanged: _angular_core.OutputEmitterRef<readonly T[]>;
196
+ readonly sortChanged: _angular_core.OutputEmitterRef<readonly MtSortModel[]>;
197
+ readonly filterChanged: _angular_core.OutputEmitterRef<MtFilterChangedEvent>;
198
+ readonly paginationChanged: _angular_core.OutputEmitterRef<MtPaginationChangedEvent>;
199
+ readonly rowGroupOpened: _angular_core.OutputEmitterRef<MtRowGroupOpenedEvent<T>>;
200
+ /** The captured view after any column, sort, filter or grouping change (persist it per user). */
201
+ readonly viewChanged: _angular_core.OutputEmitterRef<MtGridViewState>;
202
+ /** A chart was opened, changed or closed (persist the chart session). */
203
+ readonly chartsChanged: _angular_core.OutputEmitterRef<void>;
204
+ /** Fixed height in px; in `'auto'` mode the grid sizes itself and this is its fallback. */
205
+ protected readonly gridHeight: _angular_core.Signal<number>;
206
+ protected readonly standardColumns: _angular_core.Signal<readonly MtColDef<T>[]>;
207
+ /** A server page keeps the server's group order; the server supplies the group counts. */
208
+ protected readonly serverGroups: _angular_core.Signal<boolean>;
209
+ protected readonly autoGroupColumnDef: _angular_core.Signal<{
210
+ cellRendererParams: {
211
+ suppressCount: boolean;
212
+ };
213
+ } | undefined>;
214
+ protected readonly direction: _angular_core.Signal<"ltr" | "rtl">;
215
+ protected readonly sideBar: _angular_core.Signal<MtSideBarDef>;
216
+ protected readonly selectionOptions: _angular_core.Signal<MtRowSelectionOptions<T> | undefined>;
217
+ protected readonly exportParams: _angular_core.Signal<{
218
+ fileName: string;
219
+ processCellCallback: (params: _masterteam_data_grid.MtExportCellParams<T>) => unknown;
220
+ }>;
221
+ protected readonly pageSize: _angular_core.Signal<number>;
222
+ protected readonly serverTotal: _angular_core.Signal<number | undefined>;
223
+ protected readonly serverPage: _angular_core.Signal<number | undefined>;
224
+ protected readonly pagedTotal: _angular_core.Signal<number | undefined>;
225
+ protected readonly pagedPage: _angular_core.Signal<number | undefined>;
226
+ protected readonly detailRenderer: _angular_core.Signal<MtCellRenderer<T> | undefined>;
227
+ protected readonly detailParams: _angular_core.Signal<MtDetailCellRendererParams<T, any> | undefined>;
228
+ protected readonly isRowMaster: _angular_core.Signal<((row: T) => boolean) | undefined>;
229
+ protected readonly chartTitle: _angular_core.Signal<string>;
230
+ protected readonly csvAllowed: _angular_core.Signal<boolean>;
231
+ protected readonly excelAllowed: _angular_core.Signal<boolean>;
232
+ protected readonly statusBar: MtStatusBarOptions;
233
+ protected readonly pageSizes: readonly number[];
234
+ protected readonly fit: {
235
+ readonly type: "fitGridWidth";
236
+ };
237
+ private api;
238
+ private readonly identities;
239
+ private nextIdentity;
240
+ private identity;
241
+ private applyingView;
242
+ protected onReady(event: MtGridReadyEvent<T>): void;
243
+ protected onViewChange(): void;
244
+ protected onRowClicked(event: MtRowClickedEvent<T>): void;
245
+ protected onSelectionChanged(event: MtSelectionChangedEvent<T>): void;
246
+ private readonly leafColumns;
247
+ /** The standard context menu: default items, an Export submenu, then the page's row items. */
248
+ protected readonly contextMenu: (params: MtGetContextMenuItemsParams<T>) => readonly MtContextMenuItem<T>[];
249
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtStandardGridComponent<any>, never>;
250
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MtStandardGridComponent<any>, "mt-standard-grid", never, { "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "rowId": { "alias": "rowId"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "exportable": { "alias": "exportable"; "required": false; "isSignal": true; }; "exportName": { "alias": "exportName"; "required": false; "isSignal": true; }; "exportFormats": { "alias": "exportFormats"; "required": false; "isSignal": true; }; "exporter": { "alias": "exporter"; "required": false; "isSignal": true; }; "rowMenuItems": { "alias": "rowMenuItems"; "required": false; "isSignal": true; }; "server": { "alias": "server"; "required": false; "isSignal": true; }; "paged": { "alias": "paged"; "required": false; "isSignal": true; }; "detail": { "alias": "detail"; "required": false; "isSignal": true; }; "chartContext": { "alias": "chartContext"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; "emptyTitle": { "alias": "emptyTitle"; "required": false; "isSignal": true; }; "emptyDescription": { "alias": "emptyDescription"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; }, { "gridReady": "gridReady"; "rowClicked": "rowClicked"; "selectionChanged": "selectionChanged"; "sortChanged": "sortChanged"; "filterChanged": "filterChanged"; "paginationChanged": "paginationChanged"; "rowGroupOpened": "rowGroupOpened"; "viewChanged": "viewChanged"; "chartsChanged": "chartsChanged"; }, never, ["[mtGridToolbar]"], true, never>;
251
+ }
252
+
253
+ /** The standard row-actions column id. */
254
+ declare const MT_ACTIONS_COLUMN_ID = "$actions";
255
+ /**
256
+ * The standard row-actions cell: inline buttons, or a ⋮ menu for `shape: 'popover'`, with the
257
+ * action's confirmation popup. The page owns the operations; the grid only hosts the cell.
258
+ */
259
+ declare class MtActionsCell<T> {
260
+ readonly params: _angular_core.InputSignal<MtCellRendererParams<T>>;
261
+ private readonly confirmation;
262
+ protected readonly label: _angular_core.Signal<string>;
263
+ private readonly actions;
264
+ protected readonly inline: _angular_core.Signal<TableAction[]>;
265
+ protected readonly menu: _angular_core.Signal<TableAction[]>;
266
+ protected readonly hasMenu: _angular_core.Signal<boolean>;
267
+ protected loading(): boolean;
268
+ protected busy(action: TableAction): boolean;
269
+ protected open(event: Event, popover: Popover): void;
270
+ protected run(action: TableAction, event: Event): void;
271
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtActionsCell<any>, never>;
272
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MtActionsCell<any>, "mt-actions-cell", never, { "params": { "alias": "params"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
273
+ }
274
+ interface MtActionsColumnOptions<T> {
275
+ readonly actions: readonly TableAction[];
276
+ /** Header text and the accessible name of the ⋮ menu. */
277
+ readonly label: string;
278
+ /** Right-to-left pages pin the column at the left edge. */
279
+ readonly rtl: boolean;
280
+ readonly shape?: TableActionShape;
281
+ /** Row actions still loading (the ⋮ menu shows `loadingLabel`). */
282
+ readonly loading?: ((row: T) => boolean) | null;
283
+ readonly loadingLabel?: string;
284
+ /** Called when the ⋮ menu opens, to load the row's actions lazily. */
285
+ readonly requestActions?: (row: T) => void;
286
+ }
287
+ /** The standard row-actions control column, pinned at the end edge (menu-only header). */
288
+ declare function mtActionsColumn<T>(options: MtActionsColumnOptions<T>): MtColumnDef<T>;
289
+
290
+ /**
291
+ * Renders a page's cell template (`cellRendererParams.template`) with the row as `$implicit`,
292
+ * the same context mt-table gives `customCellTpl`. Group and total rows show the value text.
293
+ */
294
+ declare class MtTemplateCell<T> {
295
+ readonly params: _angular_core.InputSignal<MtCellRendererParams<T>>;
296
+ protected readonly template: _angular_core.Signal<TemplateRef<unknown> | undefined>;
297
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtTemplateCell<any>, never>;
298
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MtTemplateCell<any>, "mt-template-cell", never, { "params": { "alias": "params"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
299
+ }
300
+
301
+ /**
302
+ * Maps mt-table column definitions onto standard-grid columns, for pages moving from
303
+ * mt-table to the standard grid. Entity values (or `type: 'entity'`) become entity columns,
304
+ * `customCellTpl` renders through the page's template, and `exportValue` feeds sort, filter
305
+ * and export. Sorting follows the standard header; pass `sortable: false` on the mt-table
306
+ * column only where the backend cannot sort it. Keys in `controls` (row actions rendered by
307
+ * a template) become control columns: no value, a menu-only header, pinned at the end.
308
+ */
309
+ declare function mtTableColumns<T extends object>(columns: readonly ColumnDef[], rows: readonly T[], options?: {
310
+ readonly controls?: readonly string[];
311
+ readonly rtl?: boolean;
312
+ }): MtColumnDef<T>[];
313
+
314
+ export { MT_ACTIONS_COLUMN_ID, MtActionsCell, MtDataTableEntityCell, MtStandardGridComponent, MtTableText, MtTemplateCell, mtActionsColumn, mtEntityCategoryValues, mtEntityCellValues, mtEntityColumn, mtEntityExportValue, mtIsControlColumn, mtStandardColumns, mtTableColumns, mtTablePrintConfiguration };
315
+ export type { MtActionsColumnOptions, MtCellScalar, MtEntityCellValues, MtEntityColumnOptions, MtStandardGridDetail, MtStandardGridExportFormat, MtStandardGridServerPage, MtTableTextKey };