@masterteam/data-table 0.0.1 → 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.
@@ -1,8 +1,9 @@
1
+ import { MtTableText } from '@masterteam/data-table';
1
2
  export * from '@masterteam/data-table';
2
- import { MtSortModel, MtFilterModel, MtColDef, MtCellRendererParams, MtHeaderRendererParams, MtExportCellParams, MtColumnDef, MtGetContextMenuItemsParams, MtContextMenuItem, MtPaginationChangedEvent, MtRowClickedEvent, MtRowDragEvent, MtColumnMovedEvent, MtCreateRangeChartParams, MtChartModel, MtGridApi, MtGridViewState, MtCellRenderer, MtDetailCellRendererParams, MtDataGridComponent, MtSideBar } from '@masterteam/data-grid';
3
- import { TableAction, TableRenderContext, TablePrintConfig } from '@masterteam/components/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';
4
5
  import * as _angular_core from '@angular/core';
5
- import { InjectionToken, EnvironmentProviders, Provider, Signal, TemplateRef } from '@angular/core';
6
+ import { InjectionToken, EnvironmentProviders } from '@angular/core';
6
7
  import { MTMenuItem } from '@masterteam/components/menu';
7
8
 
8
9
  /** Actions are supplied after business permission checks; the wrapper rechecks availability on execution. */
@@ -23,8 +24,6 @@ interface MtTableScopeIdentity {
23
24
  interface MtDataTableConfiguration {
24
25
  readonly identity: () => MtTableScopeIdentity | null;
25
26
  readonly direction?: () => 'ltr' | 'rtl';
26
- /** Bootstrap rollback for the compatibility host. Direct mt-data-table instances are unaffected. */
27
- readonly renderer?: 'grid' | 'legacy';
28
27
  }
29
28
  interface MtTableQuery {
30
29
  readonly offset: number;
@@ -79,10 +78,8 @@ interface MtTableExporter<T> {
79
78
 
80
79
  declare const MT_DATA_TABLE_CONFIGURATION: InjectionToken<MtDataTableConfiguration>;
81
80
 
82
- /** Root installation includes root-created dialogs. Omit the provider to retain the legacy renderer. */
81
+ /** Root installation of the data-table configuration and preferences (portal and Studio). */
83
82
  declare function provideMTDataTables(configuration: MtDataTableConfiguration | (() => MtDataTableConfiguration)): EnvironmentProviders;
84
- /** Component-scoped opt-in, for example control-panel audit logs. */
85
- declare function provideMTTableRenderer(): Provider[];
86
83
 
87
84
  /** A shared, cancellable FIFO scheduler. Collapsing one record never cancels another. */
88
85
  declare class MtDatasetScheduler {
@@ -104,115 +101,6 @@ declare class MtDatasetCache<T> {
104
101
  get size(): number;
105
102
  }
106
103
 
107
- declare const TEXT: {
108
- readonly selectRow: readonly ["Select row", "تحديد الصف"];
109
- readonly selectAll: readonly ["Select all rows on this page", "تحديد كل الصفوف في هذه الصفحة"];
110
- readonly search: readonly ["Search", "بحث"];
111
- readonly columns: readonly ["Columns", "الأعمدة"];
112
- readonly rowActions: readonly ["Row actions", "إجراءات السجل"];
113
- readonly actions: readonly ["Actions", "الإجراءات"];
114
- readonly groupBy: readonly ["Group by", "تجميع حسب"];
115
- readonly noGrouping: readonly ["No grouping", "بدون تجميع"];
116
- readonly analysis: readonly ["Analysis", "التحليل"];
117
- readonly export: readonly ["Export", "تصدير"];
118
- readonly csv: readonly ["CSV", "CSV"];
119
- readonly excel: readonly ["Excel", "Excel"];
120
- readonly pdf: readonly ["PDF", "PDF"];
121
- readonly print: readonly ["Print", "طباعة"];
122
- readonly focus: readonly ["Focus table", "توسيع الجدول"];
123
- readonly closeFocus: readonly ["Close focus view", "إغلاق العرض الموسع"];
124
- readonly retry: readonly ["Try again", "إعادة المحاولة"];
125
- readonly failed: readonly ["Unable to load this table.", "تعذر تحميل هذا الجدول."];
126
- readonly exportFailed: readonly ["Export failed. Try again.", "تعذر التصدير. حاول مرة أخرى."];
127
- readonly noRows: readonly ["No records", "لا توجد سجلات"];
128
- readonly loading: readonly ["Loading…", "جارٍ التحميل…"];
129
- readonly reset: readonly ["Reset view", "إعادة ضبط العرض"];
130
- readonly rows: readonly ["records", "سجل"];
131
- readonly previous: readonly ["Previous page", "الصفحة السابقة"];
132
- readonly next: readonly ["Next page", "الصفحة التالية"];
133
- readonly pageSize: readonly ["Rows per page", "عدد الصفوف في الصفحة"];
134
- readonly page: readonly ["Page", "الصفحة"];
135
- readonly compare: readonly ["Compare selected records", "مقارنة السجلات المحددة"];
136
- readonly close: readonly ["Close", "إغلاق"];
137
- readonly incomplete: readonly ["Whole-table analysis is unavailable until the complete result is loaded.", "يتاح تحليل الجدول بعد تحميل جميع النتائج."];
138
- readonly chart: readonly ["Chart table", "رسم بياني للجدول"];
139
- readonly chartSelection: readonly ["Chart selection", "رسم بياني للتحديد"];
140
- };
141
- type MtTableTextKey = keyof typeof TEXT;
142
- /** Product translations override package defaults. Language changes remain reactive. */
143
- declare class MtTableText {
144
- private readonly transloco;
145
- readonly language: Signal<string>;
146
- private readonly translationEvents;
147
- readonly gridLocale: Signal<Readonly<Record<string, string>>>;
148
- text(key: MtTableTextKey): string;
149
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtTableText, never>;
150
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<MtTableText>;
151
- }
152
-
153
- type Row = Record<string, unknown>;
154
- /** Project the owning table's templates: entity drawers, actions and form controls keep their context. */
155
- declare class MtTableTemplateCell {
156
- readonly params: _angular_core.InputSignal<MtCellRendererParams<Row>>;
157
- protected readonly text: MtTableText;
158
- protected readonly table: _angular_core.Signal<TableRenderContext>;
159
- protected readonly checked: _angular_core.Signal<boolean>;
160
- protected readonly template: _angular_core.Signal<TemplateRef<unknown> | null>;
161
- protected readonly row: _angular_core.Signal<Row | undefined>;
162
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtTableTemplateCell, never>;
163
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MtTableTemplateCell, "mt-table-template-cell", never, { "params": { "alias": "params"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
164
- }
165
- declare class MtTableTemplateHeader {
166
- readonly params: _angular_core.InputSignal<MtHeaderRendererParams<Row>>;
167
- protected readonly text: MtTableText;
168
- protected readonly table: _angular_core.Signal<TableRenderContext>;
169
- protected readonly extras: _angular_core.Signal<Record<string, unknown>>;
170
- protected readonly template: _angular_core.Signal<TemplateRef<unknown> | null>;
171
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtTableTemplateHeader, never>;
172
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MtTableTemplateHeader, "mt-table-template-header", never, { "params": { "alias": "params"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
173
- }
174
- /** Passive renderer: mt-table still owns the complete dataset/query and all consumer events. */
175
- declare class MtTableCompatibilityRenderer {
176
- readonly fitStrategy: {
177
- readonly type: "fitGridWidth";
178
- };
179
- readonly context: _angular_core.InputSignal<TableRenderContext>;
180
- private readonly grid;
181
- protected readonly templateCell: typeof MtTableTemplateCell;
182
- protected readonly canReorder: _angular_core.Signal<boolean>;
183
- private readonly identities;
184
- private nextIdentity;
185
- private readonly configuration;
186
- protected readonly text: MtTableText;
187
- private readonly preferences;
188
- private restored;
189
- private reset;
190
- private synchronizing;
191
- private groupInput;
192
- private groupGrid;
193
- protected readonly clientPage: _angular_core.Signal<number | undefined>;
194
- protected readonly exportParams: _angular_core.Signal<{
195
- fileName: string | undefined;
196
- columnKeys: string[];
197
- processCellCallback: (params: MtExportCellParams<Row>) => unknown;
198
- }>;
199
- constructor();
200
- readonly rowId: (row: Row) => string;
201
- protected readonly direction: _angular_core.Signal<"ltr" | "rtl">;
202
- protected readonly columns: _angular_core.Signal<readonly MtColumnDef<Row>[]>;
203
- private nativeColumn;
204
- protected changed(): void;
205
- protected readonly menu: (params: MtGetContextMenuItemsParams<Row>) => readonly MtContextMenuItem<Row>[];
206
- protected sorted(): void;
207
- protected grouped(): void;
208
- protected page(event: MtPaginationChangedEvent): void;
209
- protected clicked(event: MtRowClickedEvent<Row>): void;
210
- protected reordered(event: MtRowDragEvent<Row>): void;
211
- protected columnsMoved(event: MtColumnMovedEvent): void;
212
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtTableCompatibilityRenderer, never>;
213
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MtTableCompatibilityRenderer, "mt-table-grid-renderer", never, { "context": { "alias": "context"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
214
- }
215
-
216
104
  declare class MtIncompleteTableError extends Error {
217
105
  constructor();
218
106
  }
@@ -379,8 +267,5 @@ declare class MtDataTableComponent<T extends object> {
379
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>;
380
268
  }
381
269
 
382
- /** Reuse the existing Arabic-safe product print path with the entire matching result. */
383
- declare function mtTablePrintConfiguration<T extends object>(api: MtGridApi<T>, definitions: readonly MtColumnDef<T>[], title: string): TablePrintConfig;
384
-
385
- export { MT_DATA_TABLE_CONFIGURATION, MtDataTableComponent, MtDatasetCache, MtDatasetScheduler, MtIncompleteTableError, MtTableCompatibilityRenderer, MtTablePreferences, MtTableTemplateCell, MtTableTemplateHeader, MtTableText, captureMtTableChart, loadMtTableResult, mtClientTableSource, mtTablePreferenceKey, mtTablePrintConfiguration, parseMtTableCharts, provideMTDataTables, provideMTTableRenderer, reconcileMtTableView, restoreMtTableChart };
386
- export type { MtDataTableConfiguration, MtDataTableProfile, MtSavedTableChart, MtTableCapabilities, MtTableDataSource, MtTableExportFormat, MtTableExportRequest, MtTableExporter, MtTablePage, MtTableQuery, MtTableRowAction, MtTableScopeIdentity, MtTableTextKey, MtTableViewIdentity };
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 };
@@ -1,6 +1,10 @@
1
1
  import * as _angular_core from '@angular/core';
2
+ import { Signal, TemplateRef } from '@angular/core';
2
3
  import { EntityData, EntityViewType } from '@masterteam/components/entities';
3
- import { MtChartCategoryValue, MtCellRendererParams, MtColumnDef, MtExportCellParams } from '@masterteam/data-grid';
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';
4
8
 
5
9
  type MtCellScalar = string | number | boolean | Date | null;
6
10
  interface MtEntityCellValues {
@@ -48,5 +52,264 @@ interface MtEntityColumnOptions<T> extends MtColumnDef<T> {
48
52
  declare function mtEntityExportValue<T>(params: MtExportCellParams<T>): unknown;
49
53
  declare function mtEntityColumn<T>(options: MtEntityColumnOptions<T>): MtColumnDef<T>;
50
54
 
51
- export { MtDataTableEntityCell, mtEntityCategoryValues, mtEntityCellValues, mtEntityColumn, mtEntityExportValue };
52
- export type { MtCellScalar, MtEntityCellValues, MtEntityColumnOptions };
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 };