@masterteam/data-table 0.0.0-stage → 0.0.1
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.
- package/README.md +74 -3
- package/fesm2022/masterteam-data-table-icons.mjs +113 -0
- package/fesm2022/masterteam-data-table-icons.mjs.map +1 -0
- package/fesm2022/masterteam-data-table-legacy.mjs +2578 -0
- package/fesm2022/masterteam-data-table-legacy.mjs.map +1 -0
- package/fesm2022/masterteam-data-table.mjs +453 -0
- package/fesm2022/masterteam-data-table.mjs.map +1 -0
- package/legacy/README.md +145 -0
- package/package.json +44 -3
- package/types/masterteam-data-table-icons.d.ts +11 -0
- package/types/masterteam-data-table-legacy.d.ts +386 -0
- package/types/masterteam-data-table.d.ts +52 -0
package/legacy/README.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
> Transitional orchestration for existing consumers. New grids use the entity-only primary entry point and MtDataGridComponent directly.
|
|
2
|
+
|
|
3
|
+
# @masterteam/data-table/legacy
|
|
4
|
+
|
|
5
|
+
Masterteam tables around the independent `@masterteam/data-grid` engine. Angular 21,
|
|
6
|
+
inherited `provideMTComponents` tokens/fonts, reactive Transloco and LTR/RTL. Load
|
|
7
|
+
`@masterteam/data-grid/assets/data-grid.css` once in the host stylesheet.
|
|
8
|
+
|
|
9
|
+
## Install and profiles
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
provideMTDataTables(() => ({
|
|
13
|
+
identity: () => ({ application, tenant, user, actor, template }),
|
|
14
|
+
direction: () => (language.rtl() ? "rtl" : "ltr"),
|
|
15
|
+
}));
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The factory runs in an injection context. Read live identity signals inside the
|
|
19
|
+
callbacks. Return `null` before authentication; preferences then remain memory-only.
|
|
20
|
+
Install at portal root so root-created drawers inherit the renderer. For audit,
|
|
21
|
+
install in its route environment only. PPlus always installs the native renderer;
|
|
22
|
+
its old bootstrap rollback switch has been removed. Other consumers may still
|
|
23
|
+
select `renderer: 'legacy'` before bootstrap.
|
|
24
|
+
Omitting the provider keeps existing `mt-table` consumers on their legacy renderer.
|
|
25
|
+
|
|
26
|
+
| Profile | Behaviour |
|
|
27
|
+
| ---------- | ---------------------------------------------------------------------------------------- |
|
|
28
|
+
| `compact` | Search, columns menu, sorting/filtering, pagination, export; closed Columns/Filters rail; no open pivot strip |
|
|
29
|
+
| `studio` | Read-only, selection/ranges, grouping/values/pivot, on-demand analysis, charts and focus |
|
|
30
|
+
| `embedded` | Minimal chrome; explicit `readOnly=false` preserves a form's cell editing contract |
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<mt-data-table profile="studio" title="Risks" [columns]="columns" [source]="source" [getRowId]="rowId" [viewIdentity]="{ level: levelId, module: 'risk', role: 'studio-module' }" />
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Runnable examples: showcase `/data-table`, `apps/showcase/src/app/data-table/`.
|
|
37
|
+
Its English/Arabic toggle demonstrates the wrapper's live grid translations.
|
|
38
|
+
|
|
39
|
+
The wrapper supplies English/Arabic grid controls through Transloco. Product
|
|
40
|
+
overrides live under `components.dataGrid`, keyed by the engine's English source
|
|
41
|
+
messages. Flattened translation keys and asynchronously loaded translations are
|
|
42
|
+
supported. Labels update inside analysis panels, filters, menus and external chart
|
|
43
|
+
editors; record values and catalog column names keep their own entity semantics.
|
|
44
|
+
|
|
45
|
+
## Public component contract
|
|
46
|
+
|
|
47
|
+
Required: `columns: readonly MtColDef<T>[]`, `getRowId: (row:T)=>string`.
|
|
48
|
+
Data: `rows=[]`, optional `source: MtTableDataSource<T>`, `loading=false`.
|
|
49
|
+
Presentation: `profile='compact'`, `title=''`, `height=420`, `selectable=false`,
|
|
50
|
+
`groupable=false`, `readOnly=true`. Studio always disables writes.
|
|
51
|
+
State/export: `viewIdentity`, `exporter`, `exportFormats=['csv','excel']`.
|
|
52
|
+
Detail: `masterDetail=false`, `detailRenderer`, `detailRendererParams`, `isRowMaster`,
|
|
53
|
+
`detailAutoHeight=true`, `detailHeight=500`. Renderers use the owned grid renderer contract.
|
|
54
|
+
Outputs: `rowClick`, `selectionChange`, `viewStateChange`, `columnLoadRequested`,
|
|
55
|
+
`focusChange`. Project existing actions with `[tableActions]`.
|
|
56
|
+
Methods: `getQuery()` returns the complete current query scope; `grid()` exposes the
|
|
57
|
+
owned engine API. Query-based exports must use the query, never infer scope from rows.
|
|
58
|
+
|
|
59
|
+
## Data and entities
|
|
60
|
+
|
|
61
|
+
`mtClientTableSource(key, rows)` declares a complete client array. Server sources
|
|
62
|
+
declare `processing`, `scopeKey`, `key`, capabilities and `load(query, AbortSignal)`.
|
|
63
|
+
Changing scope clears old rows/cancels requests. Changing requested fields within
|
|
64
|
+
one scope retains rows/layout while loading; failures are recoverable.
|
|
65
|
+
Optional `viewScopeKey` identifies the stable analysis scope when a locale refresh
|
|
66
|
+
changes `scopeKey`. The wrapper owns localized pagination for flat complete arrays;
|
|
67
|
+
master/detail tables use virtual scrolling without detail rows affecting counts.
|
|
68
|
+
|
|
69
|
+
`loadMtTableResult` verifies counts and unique identities, loads every page for
|
|
70
|
+
results up to 1,000 rows, and rejects inconsistent/overlapping/incomplete results.
|
|
71
|
+
Larger server pages remain external: local filtering/grouping/aggregation cannot
|
|
72
|
+
silently process only a loaded page. The threshold never truncates client arrays.
|
|
73
|
+
Server grouped/pivot result rendering remains an engine integration gate; the
|
|
74
|
+
current wrapper deliberately disables whole-table analysis on partial results.
|
|
75
|
+
|
|
76
|
+
`mtEntityCellValues` separates display, stable identity, sort/filter, aggregation
|
|
77
|
+
and export values. `mtEntityColumn` uses existing compact entity previews/drawers,
|
|
78
|
+
raw numeric measures and stable categorical identities. Collections do not become
|
|
79
|
+
object-string groups or measures. Currency aggregation requires catalog capability.
|
|
80
|
+
Product-owned export adapters must resolve typed cells through the same registry.
|
|
81
|
+
|
|
82
|
+
## Personal state and charts
|
|
83
|
+
|
|
84
|
+
Browser keys include version, application, tenant, user, effective actor, template,
|
|
85
|
+
level, module and role. Only configuration is stored, never result rows, selections,
|
|
86
|
+
expanded records or credentials. Invalid/unavailable fields are reconciled against
|
|
87
|
+
current columns. Compact compatibility hosts persist column layout when their
|
|
88
|
+
existing `storageKey` is supplied. Browser storage failures do not block the table.
|
|
89
|
+
|
|
90
|
+
Chart definitions use stable fields and selected row identities, excluding derived
|
|
91
|
+
chart data and row positions. Whole-table charts are linked; range charts are
|
|
92
|
+
explicitly named as selection charts. Saved selection identity reconciliation is
|
|
93
|
+
owned by `chart-state.ts`; the engine now preserves the same stable identities
|
|
94
|
+
through live sort/filter/query refreshes, including temporarily hidden selections.
|
|
95
|
+
Whole-table charts follow the full matching scope; empty selections never broaden
|
|
96
|
+
into all rows. Group expansion does not change their scope or double-count totals.
|
|
97
|
+
Pivot charts use the generated result fields and restore only fields still available.
|
|
98
|
+
In focus mode the chart dock shares the available height with the grid and pager;
|
|
99
|
+
on narrow embedded charts the on-demand editor overlays the full-width plot.
|
|
100
|
+
Query-based PDF/print/combined exports
|
|
101
|
+
require a product adapter; the wrapper never substitutes the engine's Latin-only PDF.
|
|
102
|
+
|
|
103
|
+
## Compatibility and verification
|
|
104
|
+
|
|
105
|
+
`provideMTTableRenderer()` opts a component into the compatibility renderer.
|
|
106
|
+
`MT_TABLE_RENDERER`/`TableRenderContext` live in `@masterteam/components/table`;
|
|
107
|
+
that entry point never imports this package. Existing host actions, loading,
|
|
108
|
+
confirmation, selection, lazy requests, custom templates and form writes remain
|
|
109
|
+
owned by `mt-table`. `ColumnDef.customHeaderTpl` accepts `{ $implicit: column }`.
|
|
110
|
+
`Table.groupHeaderTemplate` receives `{ $implicit: firstRow, count }`.
|
|
111
|
+
`Table.showHeader=true` retains dashboard subheader visibility in both renderers.
|
|
112
|
+
|
|
113
|
+
`pnpm --filter @masterteam/data-table test:ci` runs the package's focused contracts.
|
|
114
|
+
The root ratchet includes it with zero tolerated failures. See
|
|
115
|
+
`.github/instructions/data-table/README.md` for inventory and release gates.
|
|
116
|
+
|
|
117
|
+
## Compatibility host scopes
|
|
118
|
+
|
|
119
|
+
Complete ordinary local tables now render the native grid's own menus, filters,
|
|
120
|
+
group strip and pagination using `TableRenderContext.client`. Host actions/custom
|
|
121
|
+
templates and matching-row export/print methods remain compatible. Embedded
|
|
122
|
+
selection/reorder and server-paged tables keep their owning controls; the renderer
|
|
123
|
+
never treats one server page as a complete analysis dataset. This transitional
|
|
124
|
+
entry point does not change the primary entity-only integration contract.
|
|
125
|
+
|
|
126
|
+
For complete client arrays, quick search runs only in the grid. The compatibility
|
|
127
|
+
host does not prefilter with its earlier whole-string search. Screen grouping
|
|
128
|
+
defaults seed the grid on initialization/host changes; routine page updates keep
|
|
129
|
+
the user's native grouping state.
|
|
130
|
+
|
|
131
|
+
The compatibility renderer uses native viewport fitting, full-width group headings
|
|
132
|
+
and conditional pagination. The owning table's original empty-state template stays
|
|
133
|
+
inside the grid overlay, including its Clear filters/custom action contract. Empty
|
|
134
|
+
ordinary tables keep a 400px minimum; embedded form surfaces retain their sizing.
|
|
135
|
+
|
|
136
|
+
## Existing mt-table presentation
|
|
137
|
+
|
|
138
|
+
The compatibility renderer uses the grid's native search/group strip, closed end
|
|
139
|
+
column rail, header menus and pager, without duplicate old caption tools or a second
|
|
140
|
+
Columns dropdown. `TableRenderContext.client` supplies complete ordinary arrays.
|
|
141
|
+
`TableRenderContext.owned` supplies controlled paging/search/group/sort/print/export
|
|
142
|
+
callbacks for form and server-owned pages. Exact legacy column-filter editors keep
|
|
143
|
+
remote option sources and supported operators; the owner retains actions, selection,
|
|
144
|
+
validation and reorder contracts. External processing preserves server row order
|
|
145
|
+
and totals. Only layout is restored for external queries, never stale sort/group state.
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/data-table",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Masterteam entity-aware tables and portal renderer for the independent data grid.",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"directory": "../../../dist/masterteam/data-table",
|
|
7
|
+
"linkDirectory": false,
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"peerDependencies": {
|
|
11
|
+
"@angular/cdk": "^21.2.6",
|
|
12
|
+
"@angular/common": "^21.2.8",
|
|
13
|
+
"@angular/core": "^21.2.8",
|
|
14
|
+
"@angular/forms": "^21.2.8",
|
|
15
|
+
"@jsverse/transloco": "^8.3.0",
|
|
16
|
+
"primeng": "21.1.5",
|
|
17
|
+
"@masterteam/data-grid": "^0.0.1",
|
|
18
|
+
"@masterteam/components": "^0.0.329",
|
|
19
|
+
"@masterteam/icons": "^0.0.17"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"tslib": "^2.8.1"
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": [
|
|
25
|
+
"**/*.css"
|
|
26
|
+
],
|
|
27
|
+
"module": "fesm2022/masterteam-data-table.mjs",
|
|
28
|
+
"typings": "types/masterteam-data-table.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
"./package.json": {
|
|
31
|
+
"default": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./types/masterteam-data-table.d.ts",
|
|
35
|
+
"default": "./fesm2022/masterteam-data-table.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./icons": {
|
|
38
|
+
"types": "./types/masterteam-data-table-icons.d.ts",
|
|
39
|
+
"default": "./fesm2022/masterteam-data-table-icons.mjs"
|
|
40
|
+
},
|
|
41
|
+
"./legacy": {
|
|
42
|
+
"types": "./types/masterteam-data-table-legacy.d.ts",
|
|
43
|
+
"default": "./fesm2022/masterteam-data-table-legacy.mjs"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"type": "module"
|
|
6
47
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { GridIconName } from '@masterteam/data-grid';
|
|
4
|
+
|
|
5
|
+
/** Populated before bootstrap from the same packaged asset map used by mt-icon. */
|
|
6
|
+
declare const gridDsIcons: Partial<Record<GridIconName, string>>;
|
|
7
|
+
declare function loadGridDsIcons(http: HttpClient): Promise<void>;
|
|
8
|
+
/** The same Masterteam icon bridge for showcase and products. No grid UI or feature policy. */
|
|
9
|
+
declare function provideMTGridIcons(): _angular_core.EnvironmentProviders;
|
|
10
|
+
|
|
11
|
+
export { gridDsIcons, loadGridDsIcons, provideMTGridIcons };
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
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';
|
|
4
|
+
import * as _angular_core from '@angular/core';
|
|
5
|
+
import { InjectionToken, EnvironmentProviders, Provider, Signal, TemplateRef } from '@angular/core';
|
|
6
|
+
import { MTMenuItem } from '@masterteam/components/menu';
|
|
7
|
+
|
|
8
|
+
/** Actions are supplied after business permission checks; the wrapper rechecks availability on execution. */
|
|
9
|
+
interface MtTableRowAction<T> extends Omit<TableAction, 'action' | 'hidden' | 'loading'> {
|
|
10
|
+
readonly action: (row: T) => void;
|
|
11
|
+
readonly hidden?: (row: T) => boolean;
|
|
12
|
+
readonly disabled?: boolean | ((row: T) => boolean);
|
|
13
|
+
readonly loading?: boolean | ((row: T) => boolean);
|
|
14
|
+
}
|
|
15
|
+
type MtDataTableProfile = 'compact' | 'studio' | 'embedded';
|
|
16
|
+
interface MtTableScopeIdentity {
|
|
17
|
+
readonly application: string;
|
|
18
|
+
readonly tenant: string;
|
|
19
|
+
readonly user: string;
|
|
20
|
+
readonly actor: string;
|
|
21
|
+
readonly template?: string | number | null;
|
|
22
|
+
}
|
|
23
|
+
interface MtDataTableConfiguration {
|
|
24
|
+
readonly identity: () => MtTableScopeIdentity | null;
|
|
25
|
+
readonly direction?: () => 'ltr' | 'rtl';
|
|
26
|
+
/** Bootstrap rollback for the compatibility host. Direct mt-data-table instances are unaffected. */
|
|
27
|
+
readonly renderer?: 'grid' | 'legacy';
|
|
28
|
+
}
|
|
29
|
+
interface MtTableQuery {
|
|
30
|
+
readonly offset: number;
|
|
31
|
+
readonly limit: number;
|
|
32
|
+
readonly sort: readonly MtSortModel[];
|
|
33
|
+
readonly filters: MtFilterModel;
|
|
34
|
+
readonly search: string;
|
|
35
|
+
readonly groupColumns: readonly string[];
|
|
36
|
+
readonly groupKeys: readonly string[];
|
|
37
|
+
readonly valueColumns: readonly {
|
|
38
|
+
colId: string;
|
|
39
|
+
aggFunc: string;
|
|
40
|
+
}[];
|
|
41
|
+
readonly pivotColumns: readonly string[];
|
|
42
|
+
}
|
|
43
|
+
interface MtTablePage<T> {
|
|
44
|
+
readonly rows: readonly T[];
|
|
45
|
+
readonly totalCount: number;
|
|
46
|
+
readonly columns?: readonly MtColDef<T>[];
|
|
47
|
+
readonly complete: boolean;
|
|
48
|
+
}
|
|
49
|
+
interface MtTableCapabilities {
|
|
50
|
+
readonly sort: boolean;
|
|
51
|
+
readonly filter: boolean;
|
|
52
|
+
readonly group: boolean;
|
|
53
|
+
readonly pivot: boolean;
|
|
54
|
+
readonly charts: boolean;
|
|
55
|
+
readonly exportAll: boolean;
|
|
56
|
+
}
|
|
57
|
+
interface MtTableDataSource<T> {
|
|
58
|
+
readonly processing: 'client' | 'server';
|
|
59
|
+
/** Scope identity excludes selected fields; changing it clears previous rows immediately. */
|
|
60
|
+
readonly scopeKey: string;
|
|
61
|
+
/** Stable analysis scope when a locale-only refresh changes scopeKey. Contains configuration, never row data. */
|
|
62
|
+
readonly viewScopeKey?: string;
|
|
63
|
+
readonly key: string;
|
|
64
|
+
readonly capabilities: MtTableCapabilities;
|
|
65
|
+
readonly load: (query: MtTableQuery, signal: AbortSignal) => Promise<MtTablePage<T>>;
|
|
66
|
+
}
|
|
67
|
+
type MtTableExportFormat = 'csv' | 'excel' | 'pdf' | 'print';
|
|
68
|
+
interface MtTableExportRequest<T> {
|
|
69
|
+
readonly format: MtTableExportFormat;
|
|
70
|
+
readonly title: string;
|
|
71
|
+
readonly query: MtTableQuery;
|
|
72
|
+
readonly rows: readonly T[];
|
|
73
|
+
readonly complete: boolean;
|
|
74
|
+
readonly visibleColumns: readonly string[];
|
|
75
|
+
}
|
|
76
|
+
interface MtTableExporter<T> {
|
|
77
|
+
readonly export: (request: MtTableExportRequest<T>, signal: AbortSignal) => Promise<void>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare const MT_DATA_TABLE_CONFIGURATION: InjectionToken<MtDataTableConfiguration>;
|
|
81
|
+
|
|
82
|
+
/** Root installation includes root-created dialogs. Omit the provider to retain the legacy renderer. */
|
|
83
|
+
declare function provideMTDataTables(configuration: MtDataTableConfiguration | (() => MtDataTableConfiguration)): EnvironmentProviders;
|
|
84
|
+
/** Component-scoped opt-in, for example control-panel audit logs. */
|
|
85
|
+
declare function provideMTTableRenderer(): Provider[];
|
|
86
|
+
|
|
87
|
+
/** A shared, cancellable FIFO scheduler. Collapsing one record never cancels another. */
|
|
88
|
+
declare class MtDatasetScheduler {
|
|
89
|
+
private readonly concurrency;
|
|
90
|
+
private active;
|
|
91
|
+
private readonly queue;
|
|
92
|
+
constructor(concurrency?: number);
|
|
93
|
+
run<T>(work: () => Promise<T>, signal: AbortSignal): Promise<T>;
|
|
94
|
+
private drain;
|
|
95
|
+
}
|
|
96
|
+
/** Values are scoped by the caller's complete authenticated query identity. */
|
|
97
|
+
declare class MtDatasetCache<T> {
|
|
98
|
+
private readonly capacity;
|
|
99
|
+
private readonly entries;
|
|
100
|
+
constructor(capacity?: number);
|
|
101
|
+
get(key: string): T | undefined;
|
|
102
|
+
set(key: string, value: T): void;
|
|
103
|
+
clear(): void;
|
|
104
|
+
get size(): number;
|
|
105
|
+
}
|
|
106
|
+
|
|
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
|
+
declare class MtIncompleteTableError extends Error {
|
|
217
|
+
constructor();
|
|
218
|
+
}
|
|
219
|
+
/** Load every page of a small result before permitting client aggregation. A threshold is never a truncation limit. */
|
|
220
|
+
declare function loadMtTableResult<T>(source: MtTableDataSource<T>, query: MtTableQuery, signal: AbortSignal, getRowId: (row: T) => string, clientAnalysisThreshold?: number): Promise<MtTablePage<T>>;
|
|
221
|
+
declare function mtClientTableSource<T>(key: string, rows: readonly T[]): MtTableDataSource<T>;
|
|
222
|
+
|
|
223
|
+
/** Configuration only: selection references stable row identities, never row positions or chart data. */
|
|
224
|
+
interface MtSavedTableChart {
|
|
225
|
+
readonly options: Omit<MtCreateRangeChartParams, 'chartContainer' | 'cellRange' | 'cellRanges'>;
|
|
226
|
+
readonly ranges: readonly {
|
|
227
|
+
readonly columns: readonly string[];
|
|
228
|
+
readonly rowIds: readonly string[] | null;
|
|
229
|
+
}[];
|
|
230
|
+
}
|
|
231
|
+
declare function captureMtTableChart<T>(model: MtChartModel, api: MtGridApi<T>, wholeTable?: boolean): MtSavedTableChart;
|
|
232
|
+
declare function restoreMtTableChart<T>(saved: MtSavedTableChart, api: MtGridApi<T>): MtCreateRangeChartParams | null;
|
|
233
|
+
declare function parseMtTableCharts(value: unknown): readonly MtSavedTableChart[];
|
|
234
|
+
|
|
235
|
+
interface MtTableViewIdentity {
|
|
236
|
+
readonly level: number | string;
|
|
237
|
+
readonly module?: string | null;
|
|
238
|
+
readonly role: string;
|
|
239
|
+
}
|
|
240
|
+
declare function mtTablePreferenceKey(identity: MtTableScopeIdentity, view: MtTableViewIdentity): string;
|
|
241
|
+
/** Local storage is optional (private browsing/quota/security errors must not break a table). */
|
|
242
|
+
declare class MtTablePreferences {
|
|
243
|
+
private readonly configuration;
|
|
244
|
+
key(view: MtTableViewIdentity): string | null;
|
|
245
|
+
read(view: MtTableViewIdentity): MtGridViewState | null;
|
|
246
|
+
write(view: MtTableViewIdentity, state: MtGridViewState): void;
|
|
247
|
+
clear(view: MtTableViewIdentity): void;
|
|
248
|
+
readCharts(view: MtTableViewIdentity, scope: string): readonly MtSavedTableChart[];
|
|
249
|
+
writeCharts(view: MtTableViewIdentity, scope: string, charts: readonly MtSavedTableChart[]): void;
|
|
250
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtTablePreferences, never>;
|
|
251
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MtTablePreferences>;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** Saved roles are configuration, never authority to enable a now-unavailable operation. */
|
|
255
|
+
declare function reconcileMtTableView<T>(state: MtGridViewState, columns: readonly MtColumnDef<T>[], policy: {
|
|
256
|
+
grouping: boolean;
|
|
257
|
+
values: boolean;
|
|
258
|
+
pivot: boolean;
|
|
259
|
+
}): MtGridViewState;
|
|
260
|
+
|
|
261
|
+
/** Masterteam chrome around the independent engine. Business operations remain in the owning feature. */
|
|
262
|
+
declare class MtDataTableComponent<T extends object> {
|
|
263
|
+
readonly rows: _angular_core.InputSignal<readonly T[]>;
|
|
264
|
+
readonly columns: _angular_core.InputSignal<readonly MtColDef<T>[]>;
|
|
265
|
+
readonly getRowId: _angular_core.InputSignal<(row: T) => string>;
|
|
266
|
+
readonly source: _angular_core.InputSignal<MtTableDataSource<T> | null>;
|
|
267
|
+
readonly profile: _angular_core.InputSignal<MtDataTableProfile>;
|
|
268
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
269
|
+
readonly showHeading: _angular_core.InputSignal<boolean>;
|
|
270
|
+
readonly height: _angular_core.InputSignal<number>;
|
|
271
|
+
readonly rowHeight: _angular_core.InputSignal<number>;
|
|
272
|
+
readonly fitColumns: _angular_core.InputSignal<boolean>;
|
|
273
|
+
readonly rowActions: _angular_core.InputSignal<readonly MtTableRowAction<T>[]>;
|
|
274
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
275
|
+
readonly masterDetail: _angular_core.InputSignal<boolean>;
|
|
276
|
+
readonly detailRenderer: _angular_core.InputSignal<MtCellRenderer<T> | undefined>;
|
|
277
|
+
readonly detailRendererParams: _angular_core.InputSignal<MtDetailCellRendererParams<T, unknown>>;
|
|
278
|
+
readonly isRowMaster: _angular_core.InputSignal<((row: T) => boolean) | undefined>;
|
|
279
|
+
readonly detailAutoHeight: _angular_core.InputSignal<boolean>;
|
|
280
|
+
readonly detailHeight: _angular_core.InputSignal<number>;
|
|
281
|
+
readonly selectable: _angular_core.InputSignal<boolean>;
|
|
282
|
+
readonly groupable: _angular_core.InputSignal<boolean>;
|
|
283
|
+
readonly readOnly: _angular_core.InputSignal<boolean>;
|
|
284
|
+
readonly viewIdentity: _angular_core.InputSignal<MtTableViewIdentity | null>;
|
|
285
|
+
readonly exporter: _angular_core.InputSignal<MtTableExporter<T> | null>;
|
|
286
|
+
readonly exportFormats: _angular_core.InputSignal<readonly MtTableExportFormat[]>;
|
|
287
|
+
readonly columnLoadRequested: _angular_core.OutputEmitterRef<string>;
|
|
288
|
+
readonly rowClick: _angular_core.OutputEmitterRef<T>;
|
|
289
|
+
readonly selectionChange: _angular_core.OutputEmitterRef<readonly T[]>;
|
|
290
|
+
readonly focusChange: _angular_core.OutputEmitterRef<boolean>;
|
|
291
|
+
readonly viewStateChange: _angular_core.OutputEmitterRef<MtGridViewState>;
|
|
292
|
+
protected readonly text: MtTableText;
|
|
293
|
+
private readonly configuration;
|
|
294
|
+
private readonly injector;
|
|
295
|
+
private readonly preferences;
|
|
296
|
+
private readonly printService;
|
|
297
|
+
private readonly host;
|
|
298
|
+
private readonly destroyRef;
|
|
299
|
+
readonly grid: _angular_core.Signal<MtDataGridComponent<T> | undefined>;
|
|
300
|
+
private readonly chartDock;
|
|
301
|
+
protected readonly query: _angular_core.WritableSignal<MtTableQuery>;
|
|
302
|
+
private readonly loadedRows;
|
|
303
|
+
protected readonly complete: _angular_core.WritableSignal<boolean>;
|
|
304
|
+
private readonly total;
|
|
305
|
+
protected readonly fetching: _angular_core.WritableSignal<boolean>;
|
|
306
|
+
protected readonly error: _angular_core.WritableSignal<boolean>;
|
|
307
|
+
protected readonly focused: _angular_core.WritableSignal<boolean>;
|
|
308
|
+
protected readonly exporting: _angular_core.WritableSignal<boolean>;
|
|
309
|
+
protected readonly exportFailed: _angular_core.WritableSignal<boolean>;
|
|
310
|
+
protected readonly chartOpen: _angular_core.Signal<boolean>;
|
|
311
|
+
protected readonly search: _angular_core.WritableSignal<string>;
|
|
312
|
+
private readonly reload;
|
|
313
|
+
private readonly hydrated;
|
|
314
|
+
protected readonly focusHeight: _angular_core.WritableSignal<number>;
|
|
315
|
+
protected readonly normalHeight: _angular_core.WritableSignal<number>;
|
|
316
|
+
private focusOrigin;
|
|
317
|
+
private exportController;
|
|
318
|
+
private activeScope;
|
|
319
|
+
private preferenceKey;
|
|
320
|
+
private chartsHydrated;
|
|
321
|
+
protected readonly direction: _angular_core.Signal<"ltr" | "rtl">;
|
|
322
|
+
protected readonly displayedRows: _angular_core.Signal<readonly T[]>;
|
|
323
|
+
protected readonly busy: _angular_core.Signal<boolean>;
|
|
324
|
+
protected readonly analysisEnabled: _angular_core.Signal<boolean>;
|
|
325
|
+
protected readonly chartsEnabled: _angular_core.Signal<boolean>;
|
|
326
|
+
protected readonly exportAllowed: _angular_core.Signal<boolean>;
|
|
327
|
+
protected readonly sideBar: _angular_core.Signal<MtSideBar>;
|
|
328
|
+
protected readonly count: _angular_core.Signal<number>;
|
|
329
|
+
protected readonly clientPaging: _angular_core.Signal<boolean>;
|
|
330
|
+
protected readonly pagingInfo: _angular_core.Signal<{
|
|
331
|
+
size: number;
|
|
332
|
+
page: number;
|
|
333
|
+
total: number;
|
|
334
|
+
pages: number;
|
|
335
|
+
first: number;
|
|
336
|
+
last: number;
|
|
337
|
+
} | null>;
|
|
338
|
+
protected readonly selection: _angular_core.Signal<{
|
|
339
|
+
mode: "multiRow";
|
|
340
|
+
enableClickSelection: boolean;
|
|
341
|
+
} | undefined>;
|
|
342
|
+
protected readonly resolvedColumns: _angular_core.Signal<readonly MtColDef<T>[]>;
|
|
343
|
+
private readonly policyColumns;
|
|
344
|
+
private readonly viewStamp;
|
|
345
|
+
protected readonly columnChoices: _angular_core.Signal<{
|
|
346
|
+
id: string;
|
|
347
|
+
label: string;
|
|
348
|
+
visible: boolean;
|
|
349
|
+
locked: boolean | undefined;
|
|
350
|
+
}[]>;
|
|
351
|
+
protected readonly groupingItems: _angular_core.Signal<MTMenuItem[]>;
|
|
352
|
+
protected readonly exportItems: _angular_core.Signal<MTMenuItem[]>;
|
|
353
|
+
private fitWidth;
|
|
354
|
+
constructor();
|
|
355
|
+
protected setSearch(value: string): void;
|
|
356
|
+
/** Complete query scope for record/level exports and cross-record analysis. Never derived from loaded rows. */
|
|
357
|
+
getQuery(): MtTableQuery;
|
|
358
|
+
protected sorted(sort: readonly MtSortModel[]): void;
|
|
359
|
+
protected filtered(): void;
|
|
360
|
+
protected selected(): void;
|
|
361
|
+
protected changeColumn(id: string, visible: boolean): void;
|
|
362
|
+
protected columnsVisible(ids: readonly string[]): void;
|
|
363
|
+
protected analysisFieldsChanged(): void;
|
|
364
|
+
protected retry(): void;
|
|
365
|
+
protected page(direction: number): void;
|
|
366
|
+
protected pageSize(size: number): void;
|
|
367
|
+
protected pageNumber(page: number): void;
|
|
368
|
+
protected number(value: number): string;
|
|
369
|
+
protected openAnalysis(): void;
|
|
370
|
+
protected focus(event: Event): void;
|
|
371
|
+
protected closeFocus(): void;
|
|
372
|
+
protected escape(event: Event): void;
|
|
373
|
+
protected chartTable(): void;
|
|
374
|
+
protected chartSelection(): void;
|
|
375
|
+
protected readonly contextMenu: () => readonly MtContextMenuItem<T>[];
|
|
376
|
+
protected resetView(): void;
|
|
377
|
+
protected export(format: MtTableExportFormat): Promise<void>;
|
|
378
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtDataTableComponent<any>, never>;
|
|
379
|
+
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
|
+
}
|
|
381
|
+
|
|
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 };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { EntityData, EntityViewType } from '@masterteam/components/entities';
|
|
3
|
+
import { MtChartCategoryValue, MtCellRendererParams, MtColumnDef, MtExportCellParams } from '@masterteam/data-grid';
|
|
4
|
+
|
|
5
|
+
type MtCellScalar = string | number | boolean | Date | null;
|
|
6
|
+
interface MtEntityCellValues {
|
|
7
|
+
readonly display: string;
|
|
8
|
+
readonly identity: string | number | boolean | null;
|
|
9
|
+
readonly sort: MtCellScalar;
|
|
10
|
+
readonly filter: MtCellScalar;
|
|
11
|
+
readonly aggregate: number | null;
|
|
12
|
+
readonly export: string | number | boolean | Date | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Typed category identities of an entity value for charts: option keys, user ids
|
|
16
|
+
* and authored colours from the actual contracts, never parsed cell text.
|
|
17
|
+
* Missing values resolve to an empty list; multi-value properties list each member once.
|
|
18
|
+
*/
|
|
19
|
+
declare function mtEntityCategoryValues(entity: EntityData): readonly MtChartCategoryValue[];
|
|
20
|
+
/** One registry separates mathematical values from labels. Formatted currencies never enter sums. */
|
|
21
|
+
declare function mtEntityCellValues(entity: EntityData): MtEntityCellValues;
|
|
22
|
+
declare class MtDataTableEntityCell<T> {
|
|
23
|
+
readonly params: _angular_core.InputSignal<MtCellRendererParams<T>>;
|
|
24
|
+
protected readonly entity: _angular_core.Signal<EntityData | null>;
|
|
25
|
+
protected readonly simpleText: _angular_core.Signal<boolean>;
|
|
26
|
+
private cellEntity;
|
|
27
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MtDataTableEntityCell<any>, never>;
|
|
28
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MtDataTableEntityCell<any>, "mt-data-table-entity-cell", never, { "params": { "alias": "params"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
29
|
+
}
|
|
30
|
+
/** Every native column option is accepted; explicit options override entity defaults. */
|
|
31
|
+
interface MtEntityColumnOptions<T> extends MtColumnDef<T> {
|
|
32
|
+
/** Optional catalog identity. Native colId/field work without this shorthand. */
|
|
33
|
+
readonly key?: string;
|
|
34
|
+
readonly label?: string;
|
|
35
|
+
readonly viewType: EntityViewType;
|
|
36
|
+
readonly entity: (row: T) => EntityData | null;
|
|
37
|
+
readonly hidden?: boolean;
|
|
38
|
+
readonly capabilities?: {
|
|
39
|
+
readonly sort: boolean;
|
|
40
|
+
readonly filter: boolean;
|
|
41
|
+
readonly group: boolean;
|
|
42
|
+
readonly aggregate: boolean;
|
|
43
|
+
readonly pivot: boolean;
|
|
44
|
+
readonly chart: boolean;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/** Optional native export callback: preserves typed numbers/dates and exports entity labels. */
|
|
48
|
+
declare function mtEntityExportValue<T>(params: MtExportCellParams<T>): unknown;
|
|
49
|
+
declare function mtEntityColumn<T>(options: MtEntityColumnOptions<T>): MtColumnDef<T>;
|
|
50
|
+
|
|
51
|
+
export { MtDataTableEntityCell, mtEntityCategoryValues, mtEntityCellValues, mtEntityColumn, mtEntityExportValue };
|
|
52
|
+
export type { MtCellScalar, MtEntityCellValues, MtEntityColumnOptions };
|