@toolbox-web/grid-react 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/chunks/grid-detail-panel-CR7YUhdN.js +52 -0
- package/chunks/grid-responsive-card-BB28Zl2O.js +45 -0
- package/chunks/portal-bridge-DLA6Zs11.js +51 -0
- package/chunks/react-column-config-Sb-U7Bq3.js +109 -0
- package/chunks/react-grid-adapter-CzByOnua.js +416 -0
- package/features/editing.js +5 -0
- package/features/filtering.d.ts.map +1 -1
- package/features/filtering.js +55 -45
- package/features/grouping-columns.js +18 -23
- package/features/grouping-rows.js +11 -16
- package/features/index.js +3 -3
- package/features/master-detail.js +18 -0
- package/features/pinned-rows.d.ts.map +1 -1
- package/features/pinned-rows.js +24 -17
- package/features/responsive.js +18 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +422 -1000
- package/lib/column-shorthand.d.ts +22 -1
- package/lib/column-shorthand.d.ts.map +1 -1
- package/lib/data-grid.d.ts.map +1 -1
- package/lib/editor-mount-hooks.d.ts +39 -0
- package/lib/editor-mount-hooks.d.ts.map +1 -0
- package/lib/event-props.d.ts +132 -6
- package/lib/event-props.d.ts.map +1 -1
- package/lib/feature-props.d.ts +17 -2
- package/lib/feature-props.d.ts.map +1 -1
- package/lib/portal-bridge.d.ts +11 -0
- package/lib/portal-bridge.d.ts.map +1 -1
- package/lib/react-column-config.d.ts +10 -0
- package/lib/react-column-config.d.ts.map +1 -1
- package/lib/react-grid-adapter.d.ts +60 -11
- package/lib/react-grid-adapter.d.ts.map +1 -1
- package/package.json +1 -1
- package/chunks/portal-bridge-DZ4yQkmm.js +0 -42
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColumnConfig } from '
|
|
1
|
+
import { ColumnConfig } from './react-column-config';
|
|
2
2
|
/**
|
|
3
3
|
* Type for column shorthand notation.
|
|
4
4
|
*
|
|
@@ -49,6 +49,27 @@ export declare function parseColumnShorthand<TRow = unknown>(shorthand: string):
|
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
51
|
export declare function normalizeColumns<TRow = unknown>(columns: ColumnShorthand<TRow>[]): ColumnConfig<TRow>[];
|
|
52
|
+
/**
|
|
53
|
+
* Apply column defaults to a list of columns. Individual column properties
|
|
54
|
+
* override defaults — the per-column value always wins over the default.
|
|
55
|
+
*
|
|
56
|
+
* @param columns - Normalized columns to merge defaults into
|
|
57
|
+
* @param defaults - Partial column config applied as a baseline; pass `undefined` to no-op
|
|
58
|
+
* @returns A new array with the defaults merged in (input is not mutated)
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```tsx
|
|
62
|
+
* applyColumnDefaults(
|
|
63
|
+
* [{ field: 'id' }, { field: 'name', sortable: false }],
|
|
64
|
+
* { sortable: true, resizable: true },
|
|
65
|
+
* );
|
|
66
|
+
* // [
|
|
67
|
+
* // { field: 'id', sortable: true, resizable: true },
|
|
68
|
+
* // { field: 'name', sortable: false, resizable: true },
|
|
69
|
+
* // ]
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare function applyColumnDefaults<TRow = unknown>(columns: ColumnConfig<TRow>[], defaults: Partial<ColumnConfig<TRow>> | undefined): ColumnConfig<TRow>[];
|
|
52
73
|
/**
|
|
53
74
|
* Check if an array of columns contains any shorthand strings.
|
|
54
75
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-shorthand.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/column-shorthand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"column-shorthand.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/column-shorthand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,eAAe,CAAC,IAAI,GAAG,OAAO,IAAI,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;AA2C1E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,GAAG,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,CAsB1F;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,EAAE,GAAG,YAAY,CAAC,IAAI,CAAC,EAAE,CAOvG;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,GAAG,OAAO,EAChD,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,EAC7B,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,GAChD,YAAY,CAAC,IAAI,CAAC,EAAE,CAGtB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,EAAE,GAAG,OAAO,CAEnF"}
|
package/lib/data-grid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-grid.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/data-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,aAAa,CAAC;AACrB,OAAO,
|
|
1
|
+
{"version":3,"file":"data-grid.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/data-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAA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EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,yCAAyC;IACzC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACzC,0CAA0C;IAC1C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACzD,uDAAuD;IACvD,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AACH,eAAO,MAAM,QAAQ,EAmbf,CAAC,IAAI,GAAG,OAAO,EAAE,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAA;CAAE,KAAK,KAAK,CAAC,YAAY,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editor mount hook registry — append-only hooks called when a React-managed
|
|
3
|
+
* editor container is mounted into the DOM with a known owner grid.
|
|
4
|
+
*
|
|
5
|
+
* This is the augmentation point that lets feature secondary entries
|
|
6
|
+
* (e.g. `@toolbox-web/grid-react/features/editing`) install per-editor
|
|
7
|
+
* lifecycle behaviour (such as the `before-edit-close` blur bridge)
|
|
8
|
+
* without coupling the central adapter / column-config files to the
|
|
9
|
+
* editing feature. Mirrors how core grid plugins augment the grid via
|
|
10
|
+
* `registerPlugin()`.
|
|
11
|
+
*
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Hook called when an editor container is mounted. Returning a function
|
|
17
|
+
* registers a teardown that runs when the editor is released.
|
|
18
|
+
*/
|
|
19
|
+
export type EditorMountHook = (ctx: {
|
|
20
|
+
container: HTMLElement;
|
|
21
|
+
gridEl: HTMLElement;
|
|
22
|
+
}) => (() => void) | void;
|
|
23
|
+
/**
|
|
24
|
+
* Install an editor-mount hook. Called by feature secondary entries
|
|
25
|
+
* (e.g. `features/editing`) on import. Idempotent across hot-reload
|
|
26
|
+
* boundaries is NOT guaranteed; consumers should import once.
|
|
27
|
+
*
|
|
28
|
+
* @internal Plugin API
|
|
29
|
+
*/
|
|
30
|
+
export declare function registerEditorMountHook(hook: EditorMountHook): void;
|
|
31
|
+
/**
|
|
32
|
+
* Run all registered editor-mount hooks for a freshly mounted editor.
|
|
33
|
+
* Returns a combined teardown that invokes each hook's teardown in
|
|
34
|
+
* registration order.
|
|
35
|
+
*
|
|
36
|
+
* @internal Adapter / column-config use only.
|
|
37
|
+
*/
|
|
38
|
+
export declare function notifyEditorMounted(container: HTMLElement, gridEl: HTMLElement): () => void;
|
|
39
|
+
//# sourceMappingURL=editor-mount-hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-mount-hooks.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/editor-mount-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE;IAAE,SAAS,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;AAI5G;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,CAEnE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,IAAI,CAS3F"}
|
package/lib/event-props.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CellActivateDetail, CellChangeDetail, CellClickDetail, CellCommitDetail, ChangedRowsResetDetail, ColumnMoveDetail, ColumnResizeDetail, ColumnVisibilityDetail, CopyDetail, DetailExpandDetail, ExportCompleteDetail, FilterChangeDetail, GridColumnState, GroupToggleDetail, PasteDetail, PrintCompleteDetail, PrintStartDetail, ResponsiveChangeDetail, RowClickDetail, RowCommitDetail, RowDragEndDetail, RowDragStartDetail, RowDropDetail, RowMoveDetail, RowTransferDetail, SelectionChangeDetail, SortChangeDetail, TbwScrollDetail, TreeExpandDetail, UndoRedoDetail } from '@toolbox-web/grid/all';
|
|
1
|
+
import { CellActivateDetail, CellChangeDetail, CellClickDetail, CellCommitDetail, ChangedRowsResetDetail, ColumnMoveDetail, ColumnResizeDetail, ColumnVisibilityDetail, CopyDetail, DataGridEventMap, DetailExpandDetail, ExportCompleteDetail, FilterChangeDetail, GridColumnState, GroupToggleDetail, PasteDetail, PrintCompleteDetail, PrintStartDetail, ResponsiveChangeDetail, RowClickDetail, RowCommitDetail, RowDragEndDetail, RowDragStartDetail, RowDropDetail, RowMoveDetail, RowTransferDetail, SelectionChangeDetail, SortChangeDetail, TbwScrollDetail, TreeExpandDetail, UndoRedoDetail } from '@toolbox-web/grid/all';
|
|
2
2
|
/**
|
|
3
3
|
* Event handler type with unwrapped detail.
|
|
4
4
|
* Pattern: `(detail: T, event?: CustomEvent) => void`
|
|
@@ -87,6 +87,40 @@ export interface EventProps<TRow = unknown> {
|
|
|
87
87
|
* ```
|
|
88
88
|
*/
|
|
89
89
|
onChangedRowsReset?: EventHandler<ChangedRowsResetDetail<TRow>>;
|
|
90
|
+
/**
|
|
91
|
+
* Fired when an editor opens for a cell.
|
|
92
|
+
*
|
|
93
|
+
* @requires `import '@toolbox-web/grid-react/features/editing';`
|
|
94
|
+
*/
|
|
95
|
+
onEditOpen?: EventHandler<DataGridEventMap<TRow>['edit-open']>;
|
|
96
|
+
/**
|
|
97
|
+
* Fired before an editor closes (commit or cancel). Cancelable.
|
|
98
|
+
*
|
|
99
|
+
* @requires `import '@toolbox-web/grid-react/features/editing';`
|
|
100
|
+
*/
|
|
101
|
+
onBeforeEditClose?: EventHandler<DataGridEventMap<TRow>['before-edit-close']>;
|
|
102
|
+
/**
|
|
103
|
+
* Fired after an editor closes (commit or cancel).
|
|
104
|
+
*
|
|
105
|
+
* @requires `import '@toolbox-web/grid-react/features/editing';`
|
|
106
|
+
*/
|
|
107
|
+
onEditClose?: EventHandler<DataGridEventMap<TRow>['edit-close']>;
|
|
108
|
+
/**
|
|
109
|
+
* Fired when a cell edit is canceled (e.g. Escape key).
|
|
110
|
+
*
|
|
111
|
+
* @requires `import '@toolbox-web/grid-react/features/editing';`
|
|
112
|
+
*/
|
|
113
|
+
onCellCancel?: EventHandler<DataGridEventMap<TRow>['cell-cancel']>;
|
|
114
|
+
/**
|
|
115
|
+
* Fired when the dirty/changed-rows state transitions.
|
|
116
|
+
*
|
|
117
|
+
* @requires `import '@toolbox-web/grid-react/features/editing';`
|
|
118
|
+
*/
|
|
119
|
+
onDirtyChange?: EventHandler<DataGridEventMap<TRow>['dirty-change']>;
|
|
120
|
+
/**
|
|
121
|
+
* Fired when the row data is replaced (e.g. via the `data` property setter).
|
|
122
|
+
*/
|
|
123
|
+
onDataChange?: EventHandler<DataGridEventMap<TRow>['data-change']>;
|
|
90
124
|
/**
|
|
91
125
|
* Fired when sort state changes.
|
|
92
126
|
*
|
|
@@ -135,7 +169,22 @@ export interface EventProps<TRow = unknown> {
|
|
|
135
169
|
*/
|
|
136
170
|
onColumnMove?: EventHandler<ColumnMoveDetail>;
|
|
137
171
|
/**
|
|
138
|
-
* Fired when column
|
|
172
|
+
* Fired when a column resize is reset (e.g. via double-click on the resize handle).
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```tsx
|
|
176
|
+
* onColumnResizeReset={(detail) => console.log('Reset width for:', detail.field)}
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
onColumnResizeReset?: EventHandler<DataGridEventMap<TRow>['column-resize-reset']>;
|
|
180
|
+
/**
|
|
181
|
+
* Fired when a column is shown or hidden — either via the visibility
|
|
182
|
+
* sidebar, `grid.toggleColumnVisibility(field)`, `grid.setColumnVisible(field, visible)`,
|
|
183
|
+
* or `grid.showAllColumns()`.
|
|
184
|
+
*
|
|
185
|
+
* `field` and `visible` are present for single-column toggles and
|
|
186
|
+
* `undefined` for bulk operations (`showAllColumns`). `visibleColumns`
|
|
187
|
+
* always lists the current set.
|
|
139
188
|
*
|
|
140
189
|
* @requires `import '@toolbox-web/grid-react/features/visibility';`
|
|
141
190
|
*
|
|
@@ -143,6 +192,7 @@ export interface EventProps<TRow = unknown> {
|
|
|
143
192
|
* ```tsx
|
|
144
193
|
* onColumnVisibility={(detail) => {
|
|
145
194
|
* console.log(detail.hidden ? 'Hidden:' : 'Shown:', detail.field);
|
|
195
|
+
* localStorage.setItem('visibleColumns', JSON.stringify(detail.visibleColumns));
|
|
146
196
|
* }}
|
|
147
197
|
* ```
|
|
148
198
|
*/
|
|
@@ -226,6 +276,24 @@ export interface EventProps<TRow = unknown> {
|
|
|
226
276
|
* ```
|
|
227
277
|
*/
|
|
228
278
|
onGroupToggle?: EventHandler<GroupToggleDetail>;
|
|
279
|
+
/**
|
|
280
|
+
* Fired when a group is expanded.
|
|
281
|
+
*
|
|
282
|
+
* @requires `import '@toolbox-web/grid-react/features/grouping-rows';`
|
|
283
|
+
*/
|
|
284
|
+
onGroupExpand?: EventHandler<DataGridEventMap<TRow>['group-expand']>;
|
|
285
|
+
/**
|
|
286
|
+
* Fired when a group is collapsed.
|
|
287
|
+
*
|
|
288
|
+
* @requires `import '@toolbox-web/grid-react/features/grouping-rows';`
|
|
289
|
+
*/
|
|
290
|
+
onGroupCollapse?: EventHandler<DataGridEventMap<TRow>['group-collapse']>;
|
|
291
|
+
/**
|
|
292
|
+
* Fired when the context menu opens.
|
|
293
|
+
*
|
|
294
|
+
* @requires `import '@toolbox-web/grid-react/features/context-menu';`
|
|
295
|
+
*/
|
|
296
|
+
onContextMenuOpen?: EventHandler<DataGridEventMap<TRow>['context-menu-open']>;
|
|
229
297
|
/**
|
|
230
298
|
* Fired when a tree node is expanded.
|
|
231
299
|
*
|
|
@@ -286,16 +354,27 @@ export interface EventProps<TRow = unknown> {
|
|
|
286
354
|
*/
|
|
287
355
|
onPaste?: EventHandler<PasteDetail>;
|
|
288
356
|
/**
|
|
289
|
-
* Fired when undo
|
|
357
|
+
* Fired when an undo action is performed.
|
|
358
|
+
*
|
|
359
|
+
* @requires `import '@toolbox-web/grid-react/features/undo-redo';`
|
|
360
|
+
*
|
|
361
|
+
* @example
|
|
362
|
+
* ```tsx
|
|
363
|
+
* onUndo={(detail) => console.log('Undid:', detail.action.type, '- Can undo:', detail.canUndo)}
|
|
364
|
+
* ```
|
|
365
|
+
*/
|
|
366
|
+
onUndo?: EventHandler<UndoRedoDetail>;
|
|
367
|
+
/**
|
|
368
|
+
* Fired when a redo action is performed.
|
|
290
369
|
*
|
|
291
370
|
* @requires `import '@toolbox-web/grid-react/features/undo-redo';`
|
|
292
371
|
*
|
|
293
372
|
* @example
|
|
294
373
|
* ```tsx
|
|
295
|
-
*
|
|
374
|
+
* onRedo={(detail) => console.log('Redid:', detail.action.type, '- Can redo:', detail.canRedo)}
|
|
296
375
|
* ```
|
|
297
376
|
*/
|
|
298
|
-
|
|
377
|
+
onRedo?: EventHandler<UndoRedoDetail>;
|
|
299
378
|
/**
|
|
300
379
|
* Fired when export completes.
|
|
301
380
|
*
|
|
@@ -350,8 +429,55 @@ export interface EventProps<TRow = unknown> {
|
|
|
350
429
|
/**
|
|
351
430
|
* Map of event handler prop names to their corresponding event names.
|
|
352
431
|
* Used internally to wire up event listeners.
|
|
432
|
+
*
|
|
433
|
+
* The `satisfies` clause enforces bidirectional sync:
|
|
434
|
+
* - Every key must be a valid `keyof EventProps` (interface drift fails)
|
|
435
|
+
* - Every value must be a valid `keyof DataGridEventMap` (event-name typos
|
|
436
|
+
* and stale entries pointing at non-existent events fail at compile time)
|
|
353
437
|
*/
|
|
354
|
-
export declare const EVENT_PROP_MAP:
|
|
438
|
+
export declare const EVENT_PROP_MAP: {
|
|
439
|
+
readonly onCellClick: "cell-click";
|
|
440
|
+
readonly onRowClick: "row-click";
|
|
441
|
+
readonly onCellActivate: "cell-activate";
|
|
442
|
+
readonly onCellChange: "cell-change";
|
|
443
|
+
readonly onCellCommit: "cell-commit";
|
|
444
|
+
readonly onCellCancel: "cell-cancel";
|
|
445
|
+
readonly onRowCommit: "row-commit";
|
|
446
|
+
readonly onChangedRowsReset: "changed-rows-reset";
|
|
447
|
+
readonly onEditOpen: "edit-open";
|
|
448
|
+
readonly onBeforeEditClose: "before-edit-close";
|
|
449
|
+
readonly onEditClose: "edit-close";
|
|
450
|
+
readonly onDirtyChange: "dirty-change";
|
|
451
|
+
readonly onDataChange: "data-change";
|
|
452
|
+
readonly onSortChange: "sort-change";
|
|
453
|
+
readonly onFilterChange: "filter-change";
|
|
454
|
+
readonly onColumnResize: "column-resize";
|
|
455
|
+
readonly onColumnResizeReset: "column-resize-reset";
|
|
456
|
+
readonly onColumnMove: "column-move";
|
|
457
|
+
readonly onColumnVisibility: "column-visibility";
|
|
458
|
+
readonly onColumnStateChange: "column-state-change";
|
|
459
|
+
readonly onSelectionChange: "selection-change";
|
|
460
|
+
readonly onRowMove: "row-move";
|
|
461
|
+
readonly onRowDragStart: "row-drag-start";
|
|
462
|
+
readonly onRowDragEnd: "row-drag-end";
|
|
463
|
+
readonly onRowDrop: "row-drop";
|
|
464
|
+
readonly onRowTransfer: "row-transfer";
|
|
465
|
+
readonly onGroupToggle: "group-toggle";
|
|
466
|
+
readonly onGroupExpand: "group-expand";
|
|
467
|
+
readonly onGroupCollapse: "group-collapse";
|
|
468
|
+
readonly onTreeExpand: "tree-expand";
|
|
469
|
+
readonly onDetailExpand: "detail-expand";
|
|
470
|
+
readonly onResponsiveChange: "responsive-change";
|
|
471
|
+
readonly onContextMenuOpen: "context-menu-open";
|
|
472
|
+
readonly onCopy: "copy";
|
|
473
|
+
readonly onPaste: "paste";
|
|
474
|
+
readonly onUndo: "undo";
|
|
475
|
+
readonly onRedo: "redo";
|
|
476
|
+
readonly onExportComplete: "export-complete";
|
|
477
|
+
readonly onPrintStart: "print-start";
|
|
478
|
+
readonly onPrintComplete: "print-complete";
|
|
479
|
+
readonly onTbwScroll: "tbw-scroll";
|
|
480
|
+
};
|
|
355
481
|
/**
|
|
356
482
|
* Gets all event prop names.
|
|
357
483
|
*/
|
package/lib/event-props.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-props.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/event-props.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,WAAW,UAAU,CAAC,IAAI,GAAG,OAAO;IAKxC;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;IAElD;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;IAEhD;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAExD;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;IAMpD;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;IAEpD;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;IAElD;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,YAAY,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"event-props.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/event-props.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAE1E;;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mB,CAAC,CAAC;IAMpD;;;;;;;;;;;;;;;OAeG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;CAC7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0C6D,CAAC;AAEzF;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,CAAC,MAAM,UAAU,CAAC,EAAE,CAExD"}
|
package/lib/feature-props.d.ts
CHANGED
|
@@ -369,11 +369,26 @@ export interface FeatureProps<TRow = unknown> {
|
|
|
369
369
|
}
|
|
370
370
|
/**
|
|
371
371
|
* Props for controlling SSR behavior.
|
|
372
|
+
*
|
|
373
|
+
* @deprecated This prop is a no-op in any meaningful sense and will be removed
|
|
374
|
+
* in a future major release. The original RFC introduced `ssr` to disable
|
|
375
|
+
* dynamic feature imports during server-side rendering, but the React adapter
|
|
376
|
+
* no longer uses dynamic imports — features are registered via synchronous
|
|
377
|
+
* side-effect imports (`import '@toolbox-web/grid-react/features/...'`), which
|
|
378
|
+
* are SSR-safe by construction. Setting `ssr={true}` today only skips plugin
|
|
379
|
+
* instantiation on the React side; `<tbw-grid>` itself is a custom element
|
|
380
|
+
* that requires a custom-elements polyfill to render anything server-side, and
|
|
381
|
+
* upon client hydration the grid mounts and renders normally regardless of
|
|
382
|
+
* this flag. If you need real SSR support (Next.js / Remix / Astro), open an
|
|
383
|
+
* issue describing your hydration requirements so we can design a proper
|
|
384
|
+
* cross-adapter story rather than relying on this flag.
|
|
372
385
|
*/
|
|
373
386
|
export interface SSRProps {
|
|
374
387
|
/**
|
|
375
|
-
* Enable SSR mode -
|
|
376
|
-
*
|
|
388
|
+
* Enable SSR mode - skips React-side plugin instantiation.
|
|
389
|
+
*
|
|
390
|
+
* @deprecated No-op in practice — see {@link SSRProps} for details. Will be
|
|
391
|
+
* removed in a future major release.
|
|
377
392
|
* @default false
|
|
378
393
|
*/
|
|
379
394
|
ssr?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-props.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/feature-props.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,iBAAiB,EACjB,YAAY,
|
|
1
|
+
{"version":3,"file":"feature-props.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/feature-props.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,iBAAiB,EACjB,YAAY,EAEZ,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;;GAMG;AACH,KAAK,iBAAiB,CAAC,IAAI,GAAG,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,qBAAqB,CAAC,GAAG;IACzF,mBAAmB,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,iBAAiB,KAAK,SAAS,CAAC,CAAC;CAC9G,CAAC;AAEF;;GAEG;AACH,KAAK,0BAA0B,GAAG,IAAI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AAE,OAAO,GAAG,aAAa,CAAC;CACnC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,IAAI,GAAG,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC"}
|
package/lib/portal-bridge.d.ts
CHANGED
|
@@ -48,6 +48,17 @@ export declare function clearContainersForGrid(gridEl: HTMLElement): void;
|
|
|
48
48
|
* Use `clearContainersForGrid()` in multi-grid scenarios instead.
|
|
49
49
|
*/
|
|
50
50
|
export declare function clearAllContainers(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Wrap a React-returning render function as a vanilla `(ctx) => HTMLElement | null`
|
|
53
|
+
* suitable for any grid renderer slot (cell renderer, group header, pinned-row
|
|
54
|
+
* panel, etc.). Returns `null` when the React function returns `null` /
|
|
55
|
+
* `undefined` / `false`, so built-in conditional renderers can opt out.
|
|
56
|
+
*
|
|
57
|
+
* The wrapper is a `<div style="display:contents">` so it imposes no layout.
|
|
58
|
+
* Each call mounts a fresh portal — call sites that need to update the same
|
|
59
|
+
* container instead should use `renderToContainer` directly with `existingKey`.
|
|
60
|
+
*/
|
|
61
|
+
export declare function createNodeBridge<TCtx>(reactFn: (ctx: TCtx) => ReactNode): (ctx: TCtx) => HTMLElement | null;
|
|
51
62
|
/**
|
|
52
63
|
* Reset the key counter. Only use in tests.
|
|
53
64
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal-bridge.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/portal-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAmB5D;;;;;;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CAIjF;AAuCD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,SAAS,EAClB,WAAW,CAAC,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAoBR;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAQnF;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAWhE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAczC;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK,WAAW,GAAG,IAAI,CAS3G;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAKlC"}
|
|
@@ -97,6 +97,16 @@ export type GridConfig<TRow = unknown> = Omit<BaseGridConfig<TRow>, 'columns' |
|
|
|
97
97
|
* @internal
|
|
98
98
|
*/
|
|
99
99
|
export declare function cleanupConfigRootsIn(parentEl: HTMLElement): void;
|
|
100
|
+
/**
|
|
101
|
+
* Returns a function that, when invoked, blurs the focused input/textarea/select
|
|
102
|
+
* inside `container` (if any). Used by the `before-edit-close` bridge so editors
|
|
103
|
+
* with `onBlur={commit}` flush their pending value before the cell DOM is torn
|
|
104
|
+
* down by Tab / programmatic row exit. The native `.blur()` method fires both
|
|
105
|
+
* `blur` (non-bubbling) and `focusout` (bubbling) — React's event delegation
|
|
106
|
+
* listens to `focusout` and maps it to `onBlur`.
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
export declare function makeFlushFocusedInput(container: HTMLElement): () => void;
|
|
100
110
|
/**
|
|
101
111
|
* Wraps a React renderer function into a DOM-returning viewRenderer.
|
|
102
112
|
* Used internally by DataGrid to process reactRenderer properties.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-column-config.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/react-column-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,gBAAgB,EAChC,UAAU,IAAI,cAAc,EAC5B,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"react-column-config.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/react-column-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,gBAAgB,EAChC,UAAU,IAAI,cAAc,EAC5B,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,YAAY,CAAC,IAAI,GAAG,OAAO,CAAE,SAAQ,IAAI,CACxD,gBAAgB,CAAC,IAAI,CAAC,EACtB,UAAU,GAAG,cAAc,GAAG,QAAQ,GAAG,gBAAgB,GAAG,qBAAqB,CAClF;IACC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IAEvD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IAEvD;;;OAG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,CAAC,GAAG,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,SAAS,GACpD,CAAC,GAAG,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,WAAW,CAS/C;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAC/C,QAAQ,EAAE,CAAC,GAAG,EAAE,kBAAkB,CAAC,IAAI,CAAC,KAAK,SAAS,GACrD,CAAC,GAAG,EAAE,kBAAkB,CAAC,IAAI,CAAC,KAAK,WAAW,CAShD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,SAAS,GAC3C,CAAC,GAAG,EAAE,cAAc,KAAK,WAAW,GAAG,MAAM,CAkB/C;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,SAAS,CA0D9G"}
|
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
import { CellRenderContext, ColumnEditorContext, ColumnEditorSpec, ColumnViewRenderer, GridConfig as CoreGridConfig, FrameworkAdapter, TypeDefault } from '@toolbox-web/grid';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { registerEditorMountHook, EditorMountHook } from './editor-mount-hooks';
|
|
3
4
|
import { TypeDefaultsMap } from './grid-type-registry';
|
|
5
|
+
export { registerEditorMountHook, type EditorMountHook };
|
|
6
|
+
/**
|
|
7
|
+
* Context handed to feature bridge installers so they can hook the adapter's
|
|
8
|
+
* portal lifecycle without depending on its private fields.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export interface FeatureBridgeContext {
|
|
12
|
+
/** Track a portal key + container for cleanup on releaseCell / destroy. */
|
|
13
|
+
trackPortal(key: string, container: HTMLElement, isEditor: boolean): void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Installer signature: given a grid element + bridge context, returns the
|
|
17
|
+
* row-renderer the adapter should expose, or undefined if no React template
|
|
18
|
+
* is registered for that grid.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export type RowRendererBridge = <TRow = unknown>(gridEl: HTMLElement, ctx: FeatureBridgeContext) => ((row: TRow, rowIndex: number) => HTMLElement) | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Installer signature for the type-default `filterPanelRenderer` wrapper.
|
|
24
|
+
* Receives the user's React render function (typed loosely as `unknown` so
|
|
25
|
+
* the adapter does not depend on filtering types) and returns the imperative
|
|
26
|
+
* `(container, params) => void` form required by the core grid.
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export type FilterPanelTypeDefaultBridge = (renderFn: unknown, gridEl: HTMLElement | undefined, ctx: FeatureBridgeContext) => NonNullable<TypeDefault['filterPanelRenderer']>;
|
|
30
|
+
/**
|
|
31
|
+
* Install the master-detail row-renderer bridge. Called once on import by
|
|
32
|
+
* `@toolbox-web/grid-react/features/master-detail`. Mirrors how core grid
|
|
33
|
+
* plugins augment the grid via `registerPlugin()`.
|
|
34
|
+
* @internal Plugin API
|
|
35
|
+
*/
|
|
36
|
+
export declare function registerDetailRendererBridge(bridge: RowRendererBridge): void;
|
|
37
|
+
/**
|
|
38
|
+
* Install the responsive card row-renderer bridge. Called once on import by
|
|
39
|
+
* `@toolbox-web/grid-react/features/responsive`.
|
|
40
|
+
* @internal Plugin API
|
|
41
|
+
*/
|
|
42
|
+
export declare function registerResponsiveCardRendererBridge(bridge: RowRendererBridge): void;
|
|
43
|
+
/**
|
|
44
|
+
* Install the type-default `filterPanelRenderer` wrapper. Called once on
|
|
45
|
+
* import by `@toolbox-web/grid-react/features/filtering`. Without this
|
|
46
|
+
* bridge, type-default filterPanelRenderer entries are dropped silently —
|
|
47
|
+
* filter panels only work if the filtering feature is also imported, which
|
|
48
|
+
* is the same precondition as the FilteringPlugin itself (TBW031).
|
|
49
|
+
* @internal Plugin API
|
|
50
|
+
*/
|
|
51
|
+
export declare function registerFilterPanelTypeDefaultBridge(bridge: FilterPanelTypeDefaultBridge): void;
|
|
4
52
|
/**
|
|
5
53
|
* Register a React cell renderer for a column element.
|
|
6
54
|
* Called by GridColumn when it has a children render prop.
|
|
@@ -26,12 +74,6 @@ export declare function getColumnEditor(element: HTMLElement): ((ctx: ColumnEdit
|
|
|
26
74
|
* @internal
|
|
27
75
|
*/
|
|
28
76
|
export declare function getRegisteredFields(): string[];
|
|
29
|
-
/**
|
|
30
|
-
* Clear the field registries.
|
|
31
|
-
* Called during adapter cleanup and in tests.
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
export declare function clearFieldRegistries(): void;
|
|
35
77
|
/**
|
|
36
78
|
* Framework adapter that enables React component integration
|
|
37
79
|
* with the grid's light DOM configuration API.
|
|
@@ -139,7 +181,10 @@ export declare class GridAdapter implements FrameworkAdapter {
|
|
|
139
181
|
createEditor<TRow = unknown, TValue = unknown>(element: HTMLElement): ColumnEditorSpec<TRow, TValue>;
|
|
140
182
|
/**
|
|
141
183
|
* Creates a detail renderer function for MasterDetailPlugin.
|
|
142
|
-
*
|
|
184
|
+
* Implementation is installed by `@toolbox-web/grid-react/features/master-detail`
|
|
185
|
+
* via {@link registerDetailRendererBridge}. Returns undefined if the
|
|
186
|
+
* master-detail feature has not been imported, or if no GridDetailPanel
|
|
187
|
+
* was registered for this grid.
|
|
143
188
|
*/
|
|
144
189
|
createDetailRenderer<TRow = unknown>(gridElement: HTMLElement): ((row: TRow, rowIndex: number) => HTMLElement) | undefined;
|
|
145
190
|
/**
|
|
@@ -149,7 +194,10 @@ export declare class GridAdapter implements FrameworkAdapter {
|
|
|
149
194
|
parseDetailElement<TRow = unknown>(detailElement: Element): ((row: TRow, rowIndex: number) => HTMLElement | string) | undefined;
|
|
150
195
|
/**
|
|
151
196
|
* Creates a responsive card renderer function for ResponsivePlugin.
|
|
152
|
-
*
|
|
197
|
+
* Implementation is installed by `@toolbox-web/grid-react/features/responsive`
|
|
198
|
+
* via {@link registerResponsiveCardRendererBridge}. Returns undefined if
|
|
199
|
+
* the responsive feature has not been imported, or if no GridResponsiveCard
|
|
200
|
+
* was registered for this grid.
|
|
153
201
|
*/
|
|
154
202
|
createResponsiveCardRenderer<TRow = unknown>(gridElement: HTMLElement): ((row: TRow, rowIndex: number) => HTMLElement) | undefined;
|
|
155
203
|
/**
|
|
@@ -202,10 +250,11 @@ export declare class GridAdapter implements FrameworkAdapter {
|
|
|
202
250
|
*/
|
|
203
251
|
private createTypeEditor;
|
|
204
252
|
/**
|
|
205
|
-
*
|
|
206
|
-
*
|
|
253
|
+
* Stable bridge context handed to feature installers. Bound once per adapter
|
|
254
|
+
* so feature bridges can call `trackPortal` without each invocation creating
|
|
255
|
+
* a fresh closure.
|
|
207
256
|
*/
|
|
208
|
-
private
|
|
257
|
+
private readonly bridgeContext;
|
|
209
258
|
/** Register a portal key for lifecycle tracking. */
|
|
210
259
|
private trackPortal;
|
|
211
260
|
/** Unregister a portal key from all tracking sets. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-grid-adapter.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/react-grid-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,IAAI,cAAc,EAE5B,gBAAgB,EAChB,WAAW,EACZ,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"react-grid-adapter.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/react-grid-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,IAAI,cAAc,EAE5B,gBAAgB,EAChB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,MA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WAAW,CAAC,IAAI,CAAC,GAAG,SAAS;IA2CjG;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAiB1B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAmBxB;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa,CAE5B;IAEF,oDAAoD;IACpD,OAAO,CAAC,WAAW;IASnB,sDAAsD;IACtD,OAAO,CAAC,aAAa;IAerB;;;OAGG;IACH,OAAO,IAAI,IAAI;IAaf;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAiBtC;;OAEG;IACH,OAAO,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI;CAOtC"}
|
package/package.json
CHANGED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { flushSync as d } from "react-dom";
|
|
2
|
-
import { createRoot as p } from "react-dom/client";
|
|
3
|
-
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
4
|
-
let m = 0;
|
|
5
|
-
function w(t, e) {
|
|
6
|
-
e ? r.set(t, e) : r.delete(t);
|
|
7
|
-
}
|
|
8
|
-
function g(t, e) {
|
|
9
|
-
if (e) return e;
|
|
10
|
-
const o = t.closest("tbw-grid");
|
|
11
|
-
if (o) return o;
|
|
12
|
-
if (r.size === 1) return r.keys().next().value;
|
|
13
|
-
}
|
|
14
|
-
function u(t) {
|
|
15
|
-
const e = c.get(t);
|
|
16
|
-
if (e) {
|
|
17
|
-
try {
|
|
18
|
-
e.unmount();
|
|
19
|
-
} catch {
|
|
20
|
-
}
|
|
21
|
-
c.delete(t);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function b(t, e, o, l) {
|
|
25
|
-
const n = o ?? `p-${m++}`, s = g(t, l), f = s ? r.get(s) : void 0;
|
|
26
|
-
if (f)
|
|
27
|
-
u(n), s && i.set(n, s), f.renderPortal(n, t, e);
|
|
28
|
-
else {
|
|
29
|
-
let a = c.get(n);
|
|
30
|
-
a || (a = p(t), c.set(n, a)), d(() => a.render(e));
|
|
31
|
-
}
|
|
32
|
-
return n;
|
|
33
|
-
}
|
|
34
|
-
function x(t, e) {
|
|
35
|
-
const o = i.get(t);
|
|
36
|
-
(o ? r.get(o) : void 0)?.removePortal(t, e?.sync), i.delete(t), u(t);
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
b as a,
|
|
40
|
-
x as r,
|
|
41
|
-
w as s
|
|
42
|
-
};
|