@toolbox-web/grid-react 1.6.1 → 1.8.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 +12 -10
- package/chunks/{grid-detail-panel-CR7YUhdN.js → grid-detail-panel-BZFcujsZ.js} +10 -10
- package/chunks/grid-responsive-card-CSZhDCoN.js +45 -0
- package/chunks/portal-bridge-CvxNt40O.js +68 -0
- package/chunks/post-mount-refresh-hooks-Dt7mPoZC.js +12 -0
- package/chunks/{react-column-config-Dz234dN8.js → react-column-config-BOe_PgL1.js} +28 -28
- package/chunks/{react-grid-adapter-KD5roD6F.js → react-grid-adapter-LBf2Mqhn.js} +108 -69
- package/features/editing.js +1 -1
- package/features/filtering.js +3 -3
- package/features/grouping-columns.js +1 -1
- package/features/grouping-rows.js +1 -1
- package/features/index.d.ts.map +1 -1
- package/features/index.js +1 -0
- package/features/master-detail.js +17 -13
- package/features/pinned-rows.d.ts +46 -0
- package/features/pinned-rows.d.ts.map +1 -1
- package/features/pinned-rows.js +49 -20
- package/features/reorder-rows.d.ts.map +1 -1
- package/features/responsive.js +22 -14
- package/features/row-drag-drop.js +1 -0
- package/features/sticky-rows.d.ts +1 -0
- package/features/sticky-rows.d.ts.map +1 -0
- package/features/sticky-rows.js +1 -0
- package/index.d.ts +5 -1
- package/index.d.ts.map +1 -1
- package/index.js +467 -408
- package/lib/child-feature-detector.d.ts +33 -0
- package/lib/child-feature-detector.d.ts.map +1 -0
- package/lib/data-grid.d.ts.map +1 -1
- package/lib/event-props.d.ts +22 -1
- package/lib/event-props.d.ts.map +1 -1
- package/lib/feature-prop-keys.d.ts +27 -0
- package/lib/feature-prop-keys.d.ts.map +1 -0
- package/lib/feature-props.d.ts +52 -3
- package/lib/feature-props.d.ts.map +1 -1
- package/lib/feature-registry.d.ts +3 -3
- package/lib/feature-registry.d.ts.map +1 -1
- package/lib/grid-header-content.d.ts +41 -0
- package/lib/grid-header-content.d.ts.map +1 -0
- package/lib/grid-toolbar-content.d.ts +44 -0
- package/lib/grid-toolbar-content.d.ts.map +1 -0
- package/lib/post-mount-refresh-hooks.d.ts +49 -0
- package/lib/post-mount-refresh-hooks.d.ts.map +1 -0
- package/lib/react-grid-adapter.d.ts +6 -0
- package/lib/react-grid-adapter.d.ts.map +1 -1
- package/lib/use-grid-overlay.d.ts +1 -1
- package/package.json +1 -1
- package/chunks/grid-responsive-card-BB28Zl2O.js +0 -45
- package/chunks/portal-bridge-BydpO5wl.js +0 -68
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Detector callback: given the React element whose `displayName` matched the
|
|
4
|
+
* registry key, return the partial feature-prop record to auto-enable the
|
|
5
|
+
* corresponding plugin. Return `undefined` to skip.
|
|
6
|
+
*
|
|
7
|
+
* @typeParam TFeatures - Adapter `FeatureProps` shape.
|
|
8
|
+
*/
|
|
9
|
+
export type ChildFeatureDetector<TFeatures = Record<string, unknown>> = (element: ReactElement) => Partial<TFeatures> | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Install a child-feature detector keyed by React `displayName`. Re-registering
|
|
12
|
+
* the same displayName replaces the previous detector (HMR-friendly). Called
|
|
13
|
+
* by feature secondary entries on import.
|
|
14
|
+
*
|
|
15
|
+
* @internal Plugin API
|
|
16
|
+
*/
|
|
17
|
+
export declare function registerChildFeatureDetector<TFeatures = Record<string, unknown>>(displayName: string, detector: ChildFeatureDetector<TFeatures>): void;
|
|
18
|
+
/**
|
|
19
|
+
* Scan `children` and merge every matching detector's output into a single
|
|
20
|
+
* partial feature-prop record. Later children override earlier ones for the
|
|
21
|
+
* same feature key — same precedence the inline `detectChildComponentFeatures`
|
|
22
|
+
* had before extraction.
|
|
23
|
+
*
|
|
24
|
+
* @internal `<DataGrid>` `featureProps` memo use only.
|
|
25
|
+
*/
|
|
26
|
+
export declare function detectChildFeatures<TFeatures = Record<string, unknown>>(children: ReactNode): Partial<TFeatures>;
|
|
27
|
+
/**
|
|
28
|
+
* Test-only: clear all registered detectors so specs assert in isolation.
|
|
29
|
+
*
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare function clearChildFeatureDetectors(): void;
|
|
33
|
+
//# sourceMappingURL=child-feature-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child-feature-detector.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/child-feature-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAA4B,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpF;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CACtE,OAAO,EAAE,YAAY,KAClB,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAIpC;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9E,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,oBAAoB,CAAC,SAAS,CAAC,GACxC,IAAI,CAEN;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAehH;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD"}
|
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,
|
|
1
|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AE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,4CAA4C;IAC5C,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,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,EA8df,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"}
|
package/lib/event-props.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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';
|
|
1
|
+
import { CellActivateDetail, CellChangeDetail, CellClickDetail, CellCommitDetail, ChangedRowsResetDetail, ColumnMoveDetail, ColumnResizeDetail, ColumnVisibilityDetail, CopyDetail, DataGridEventMap, DetailExpandDetail, ExportCompleteDetail, FilterChangeDetail, GridColumnState, GroupToggleDetail, PasteDetail, PrintCompleteDetail, PrintStartDetail, RenderDetail, 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`
|
|
@@ -427,6 +427,26 @@ export interface EventProps<TRow = unknown> {
|
|
|
427
427
|
* ```
|
|
428
428
|
*/
|
|
429
429
|
onTbwScroll?: EventHandler<TbwScrollDetail>;
|
|
430
|
+
/**
|
|
431
|
+
* Fired once at the end of every render-scheduler flush, after all
|
|
432
|
+
* plugin `afterRender` hooks have run and `ready()` has resolved.
|
|
433
|
+
*
|
|
434
|
+
* Use this to act on the rendered DOM after a programmatic mutation
|
|
435
|
+
* (e.g. focus the first input of a freshly added row in full-grid
|
|
436
|
+
* edit mode) without `setTimeout` or double-`requestAnimationFrame`
|
|
437
|
+
* hacks. Fires on every flush — including scroll-driven virtual-window
|
|
438
|
+
* updates — so prefer subscribing once and unsubscribing (or gating on
|
|
439
|
+
* `detail.phase >= RenderPhase.ROWS`) when you only care about a
|
|
440
|
+
* specific mutation.
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* ```tsx
|
|
444
|
+
* onRender={(detail) => {
|
|
445
|
+
* if (detail.initial) console.log('first render complete');
|
|
446
|
+
* }}
|
|
447
|
+
* ```
|
|
448
|
+
*/
|
|
449
|
+
onRender?: EventHandler<RenderDetail>;
|
|
430
450
|
}
|
|
431
451
|
/**
|
|
432
452
|
* Map of event handler prop names to their corresponding event names.
|
|
@@ -479,6 +499,7 @@ export declare const EVENT_PROP_MAP: {
|
|
|
479
499
|
readonly onPrintStart: "print-start";
|
|
480
500
|
readonly onPrintComplete: "print-complete";
|
|
481
501
|
readonly onTbwScroll: "tbw-scroll";
|
|
502
|
+
readonly onRender: "render";
|
|
482
503
|
};
|
|
483
504
|
/**
|
|
484
505
|
* Gets all event prop names.
|
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,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;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAE1E;;;;;;;GAOG;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,IAA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AAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;IAMlD;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,EAAE,YAAY,CAAC,sBAAsB,CAAC,CAAC;IAM1D;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAElC;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAMpC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;IAEtC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;IAMtC;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IAMtD;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAE9C;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,YAAY,CAAC,mBAAmB,CAAC,CAAC;IAMpD;;;;;;;;;;;;;;;OAeG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;IAM5C;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C6D,CAAC;AAEzF;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,CAAC,MAAM,UAAU,CAAC,EAAE,CAExD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FeatureName } from './feature-registry';
|
|
2
|
+
/**
|
|
3
|
+
* Register a feature prop name as a recognised `FeatureProps` key. Called by
|
|
4
|
+
* built-in pre-registration (this module's bottom) and by third-party feature
|
|
5
|
+
* secondary entries that augment `FeatureConfig`.
|
|
6
|
+
*
|
|
7
|
+
* @internal Plugin API
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerFeaturePropKey(name: FeatureName): void;
|
|
10
|
+
/**
|
|
11
|
+
* Snapshot of all currently-registered feature prop keys, in registration
|
|
12
|
+
* order. Returned as a frozen array so callers cannot mutate the registry by
|
|
13
|
+
* reference. The snapshot is cached and only rebuilt when the registry
|
|
14
|
+
* changes — `<DataGrid>` calls this during render, so per-call allocation
|
|
15
|
+
* is avoided.
|
|
16
|
+
*
|
|
17
|
+
* @internal `<DataGrid>` extract/sync use only.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getFeaturePropKeys(): readonly FeatureName[];
|
|
20
|
+
/**
|
|
21
|
+
* Test-only: clear all registered keys. Lets specs assert pre-registration
|
|
22
|
+
* behaviour in isolation. Production code never calls this.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function clearFeaturePropKeys(): void;
|
|
27
|
+
//# sourceMappingURL=feature-prop-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-prop-keys.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/feature-prop-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAiBtD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAI9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,SAAS,WAAW,EAAE,CAK3D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C"}
|
package/lib/feature-props.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ClipboardConfig, ColumnVirtualizationConfig, ContextMenuConfig, ExportConfig, FilterConfig, GroupingColumnsConfig, GroupingRowsConfig, MasterDetailConfig, MultiSortConfig, PinnedRowsConfig, PivotConfig, PrintConfig, ReorderConfig, ResponsivePluginConfig, RowDragDropConfig, RowReorderConfig, SelectionConfig, ServerSideConfig, TooltipConfig, TreeConfig, UndoRedoConfig, VisibilityConfig } from '@toolbox-web/grid/all';
|
|
1
|
+
import { ClipboardConfig, ColumnVirtualizationConfig, ContextMenuConfig, ExportConfig, FilterConfig, GroupingColumnsConfig, GroupingRowsConfig, MasterDetailConfig, MultiSortConfig, PinnedRowsConfig, PivotConfig, PrintConfig, ReorderConfig, ResponsivePluginConfig, RowDragDropConfig, RowReorderConfig, SelectionConfig, ServerSideConfig, StickyRowsConfig, TooltipConfig, TreeConfig, UndoRedoConfig, VisibilityConfig } from '@toolbox-web/grid/all';
|
|
2
2
|
import { EditingConfig } from '@toolbox-web/grid/plugins/editing';
|
|
3
3
|
import { FilterPanelParams } from '@toolbox-web/grid/plugins/filtering';
|
|
4
4
|
import { ColumnGroupDefinition } from '@toolbox-web/grid/plugins/grouping-columns';
|
|
5
|
+
import { GroupRowRenderParams } from '@toolbox-web/grid/plugins/grouping-rows';
|
|
5
6
|
import { ReactNode } from 'react';
|
|
6
7
|
/**
|
|
7
8
|
* React-specific filter config that allows React components as `filterPanelRenderer`.
|
|
@@ -30,6 +31,18 @@ export type ReactGroupingColumnsConfig = Omit<GroupingColumnsConfig, 'groupHeade
|
|
|
30
31
|
columnGroups?: ReactColumnGroupDefinition[];
|
|
31
32
|
groupHeaderRenderer?: GroupingColumnsConfig['groupHeaderRenderer'] | ((...args: Parameters<NonNullable<GroupingColumnsConfig['groupHeaderRenderer']>>) => ReactNode);
|
|
32
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* React-specific grouping rows config that allows React components as `groupRowRenderer`.
|
|
36
|
+
*
|
|
37
|
+
* Extends the base GroupingRowsConfig to accept a React render function
|
|
38
|
+
* `(params: GroupRowRenderParams) => ReactNode` in addition to the vanilla
|
|
39
|
+
* `(params) => HTMLElement | string | void` signature.
|
|
40
|
+
*
|
|
41
|
+
* @since 1.8.0
|
|
42
|
+
*/
|
|
43
|
+
export type ReactGroupingRowsConfig = Omit<GroupingRowsConfig, 'groupRowRenderer'> & {
|
|
44
|
+
groupRowRenderer?: GroupingRowsConfig['groupRowRenderer'] | ((params: GroupRowRenderParams) => ReactNode);
|
|
45
|
+
};
|
|
33
46
|
/**
|
|
34
47
|
* Feature props for declarative plugin configuration.
|
|
35
48
|
* Each prop lazily loads its corresponding plugin when used.
|
|
@@ -232,12 +245,29 @@ export interface FeatureProps<TRow = unknown> {
|
|
|
232
245
|
* @example
|
|
233
246
|
* ```tsx
|
|
234
247
|
* <DataGrid groupingRows={{
|
|
235
|
-
*
|
|
248
|
+
* groupOn: (row) => [row.department, row.team],
|
|
236
249
|
* defaultExpanded: true,
|
|
237
250
|
* }} />
|
|
238
251
|
* ```
|
|
252
|
+
*
|
|
253
|
+
* @example Custom group row renderer (React JSX)
|
|
254
|
+
*
|
|
255
|
+
* To keep mouse-toggle behavior, either add the `group-toggle` class to a
|
|
256
|
+
* clickable element (the plugin delegates clicks via `closest('.group-toggle')`)
|
|
257
|
+
* or call `params.toggleExpand()` from your own handler.
|
|
258
|
+
*
|
|
259
|
+
* ```tsx
|
|
260
|
+
* <DataGrid groupingRows={{
|
|
261
|
+
* groupOn: (row) => row.department,
|
|
262
|
+
* groupRowRenderer: (params) => (
|
|
263
|
+
* <button type="button" className="group-toggle">
|
|
264
|
+
* {params.expanded ? '▾' : '▸'} {params.value} ({params.rows.length})
|
|
265
|
+
* </button>
|
|
266
|
+
* ),
|
|
267
|
+
* }} />
|
|
268
|
+
* ```
|
|
239
269
|
*/
|
|
240
|
-
groupingRows?:
|
|
270
|
+
groupingRows?: ReactGroupingRowsConfig;
|
|
241
271
|
/**
|
|
242
272
|
* Enable pinned rows (aggregation/status bar).
|
|
243
273
|
*
|
|
@@ -251,6 +281,25 @@ export interface FeatureProps<TRow = unknown> {
|
|
|
251
281
|
* ```
|
|
252
282
|
*/
|
|
253
283
|
pinnedRows?: boolean | PinnedRowsConfig;
|
|
284
|
+
/**
|
|
285
|
+
* Pin selected data rows below the header as the user scrolls past them.
|
|
286
|
+
*
|
|
287
|
+
* @requires `import '@toolbox-web/grid-react/features/sticky-rows';`
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* ```tsx
|
|
291
|
+
* // Field-name shorthand
|
|
292
|
+
* <DataGrid stickyRows={{ isSticky: 'isSection' }} />
|
|
293
|
+
*
|
|
294
|
+
* // Predicate + stack mode
|
|
295
|
+
* <DataGrid stickyRows={{
|
|
296
|
+
* isSticky: (row) => row.kind === 'section',
|
|
297
|
+
* mode: 'stack',
|
|
298
|
+
* maxStacked: 3,
|
|
299
|
+
* }} />
|
|
300
|
+
* ```
|
|
301
|
+
*/
|
|
302
|
+
stickyRows?: StickyRowsConfig;
|
|
254
303
|
/**
|
|
255
304
|
* Enable hierarchical tree view.
|
|
256
305
|
*
|
|
@@ -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,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,EAA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Aa,CAAC;IAEpE;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IAEtC;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC;IAM1C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,eAAe,CAAC;IAE3D;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAM9C;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC;IAEzC;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IAExC;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,0BAA0B,CAAC;IAEvD;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,OAAO,GAAG,0BAA0B,CAAC;IAM5D;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IAEzC;;;;;;;;;;;;;;OAcG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEhD
|
|
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,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G;AACH,MAAM,MAAM,eAAe,CAAC,IAAI,GAAG,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FeatureConfig } from '@toolbox-web/grid/all';
|
|
2
2
|
/**
|
|
3
3
|
* Feature Registry for @toolbox-web/grid-react
|
|
4
4
|
*
|
|
@@ -16,7 +16,7 @@ import { FeatureProps } from './feature-props';
|
|
|
16
16
|
* <DataGrid selection="range" filtering={{ debounceMs: 200 }} />
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
export { clearFeatureRegistry, createPluginFromFeature, getFeatureFactory, getRegisteredFeatures, isFeatureRegistered, registerFeature } from '@toolbox-web/grid/features/registry';
|
|
19
|
+
export { clearFeatureRegistry, createPluginFromFeature, getFeatureFactory, getRegisteredFeatures, isFeatureRegistered, registerFeature, } from '@toolbox-web/grid/features/registry';
|
|
20
20
|
export type { PluginFactory } from '@toolbox-web/grid/features/registry';
|
|
21
|
-
export type FeatureName = keyof
|
|
21
|
+
export type FeatureName = Exclude<keyof FeatureConfig, '__brand'>;
|
|
22
22
|
//# sourceMappingURL=feature-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-registry.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/feature-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EACL,oBAAoB,
|
|
1
|
+
{"version":3,"file":"feature-registry.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/feature-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAE7C,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEzE;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,aAAa,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link GridHeaderContent}.
|
|
4
|
+
* @since 1.8.0
|
|
5
|
+
*/
|
|
6
|
+
export interface GridHeaderContentProps {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier for this header content entry.
|
|
9
|
+
* Defaults to a stable React-generated id (`tbw-header-content-:rN:`).
|
|
10
|
+
*/
|
|
11
|
+
id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Render order priority. Lower values appear first.
|
|
14
|
+
* @default 100
|
|
15
|
+
*/
|
|
16
|
+
order?: number;
|
|
17
|
+
/** React content to project into the grid shell header content area. */
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Declarative wrapper around the grid's imperative
|
|
22
|
+
* {@link DataGridElement.registerHeaderContent} API.
|
|
23
|
+
*
|
|
24
|
+
* Mounts its children into the slot the grid provides for header content while
|
|
25
|
+
* keeping them inside the React tree (so context, Suspense, error boundaries,
|
|
26
|
+
* portals, etc. all work). Must be a descendant of `<DataGrid>`.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <DataGrid gridConfig={config}>
|
|
31
|
+
* <GridHeaderContent id="calendar-nav" order={0}>
|
|
32
|
+
* <HeaderNav year={year} onYearChange={setYear} />
|
|
33
|
+
* </GridHeaderContent>
|
|
34
|
+
* </DataGrid>
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @category Component
|
|
38
|
+
* @since 1.8.0
|
|
39
|
+
*/
|
|
40
|
+
export declare function GridHeaderContent({ id: idProp, order, children }: GridHeaderContentProps): null;
|
|
41
|
+
//# sourceMappingURL=grid-header-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-header-content.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/grid-header-content.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvF;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAW,EAAE,QAAQ,EAAE,EAAE,sBAAsB,GAAG,IAAI,CAiErG"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link GridToolbarContent}.
|
|
4
|
+
* @since 1.8.0
|
|
5
|
+
*/
|
|
6
|
+
export interface GridToolbarContentProps {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier for this toolbar content entry.
|
|
9
|
+
* Defaults to a stable React-generated id (`tbw-toolbar-content-:rN:`).
|
|
10
|
+
*/
|
|
11
|
+
id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Render order priority. Lower values appear first.
|
|
14
|
+
* @default 100
|
|
15
|
+
*/
|
|
16
|
+
order?: number;
|
|
17
|
+
/** React content to project into the grid shell toolbar. */
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Declarative wrapper around the grid's imperative
|
|
22
|
+
* {@link DataGridElement.registerToolbarContent} API.
|
|
23
|
+
*
|
|
24
|
+
* Mounts its children into the slot the grid provides for toolbar content while
|
|
25
|
+
* keeping them inside the React tree. Must be a descendant of `<DataGrid>`.
|
|
26
|
+
*
|
|
27
|
+
* Prefer this over `<tbw-grid-tool-buttons>` (light DOM) when you need
|
|
28
|
+
* reactive props or callbacks bound to React state. Use the light-DOM form
|
|
29
|
+
* for static markup that should be moved verbatim into the toolbar.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <DataGrid gridConfig={config}>
|
|
34
|
+
* <GridToolbarContent id="calendar-nav" order={0}>
|
|
35
|
+
* <ToolbarNav onPrev={prev} onToday={today} onNext={next} />
|
|
36
|
+
* </GridToolbarContent>
|
|
37
|
+
* </DataGrid>
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @category Component
|
|
41
|
+
* @since 1.8.0
|
|
42
|
+
*/
|
|
43
|
+
export declare function GridToolbarContent({ id: idProp, order, children }: GridToolbarContentProps): null;
|
|
44
|
+
//# sourceMappingURL=grid-toolbar-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-toolbar-content.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/grid-toolbar-content.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvF;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAW,EAAE,QAAQ,EAAE,EAAE,uBAAuB,GAAG,IAAI,CAwDvG"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Post-mount refresh hook registry — keyed callbacks invoked once after the
|
|
3
|
+
* React `<DataGrid>` has finished its initial mount, before the column /
|
|
4
|
+
* shell-header `requestAnimationFrame` refresh.
|
|
5
|
+
*
|
|
6
|
+
* Each feature secondary entry (e.g. `@toolbox-web/grid-react/features/master-detail`
|
|
7
|
+
* or `.../features/responsive`) registers under its feature name (matching
|
|
8
|
+
* `keyof FeatureConfig`) so the `DataGrid` core no longer hard-codes which
|
|
9
|
+
* plugins need a post-mount kick or what their refresh method is called.
|
|
10
|
+
* Mirrors the existing `registerEditorMountHook` + bridge registries.
|
|
11
|
+
*
|
|
12
|
+
* Used to bridge the gap where a feature plugin is instantiated **before**
|
|
13
|
+
* React commits its children (so the plugin can't see the render callbacks
|
|
14
|
+
* registered by `<GridDetailPanel>` / `<GridResponsiveCard>`). The hook fires
|
|
15
|
+
* once children are in the DOM and the registry has been populated.
|
|
16
|
+
*
|
|
17
|
+
* @packageDocumentation
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Hook called after the React `<DataGrid>` has mounted its children.
|
|
22
|
+
*
|
|
23
|
+
* @param ctx.gridEl - The grid custom element. The framework adapter is
|
|
24
|
+
* available on `gridEl.__frameworkAdapter` if the hook needs it.
|
|
25
|
+
*/
|
|
26
|
+
export type PostMountRefreshHook = (ctx: {
|
|
27
|
+
gridEl: HTMLElement;
|
|
28
|
+
}) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Install a post-mount refresh hook keyed by feature name. Re-registering
|
|
31
|
+
* with the same name replaces the previous hook (HMR-friendly). Called by
|
|
32
|
+
* feature secondary entries on import.
|
|
33
|
+
*
|
|
34
|
+
* @internal Plugin API
|
|
35
|
+
*/
|
|
36
|
+
export declare function registerPostMountRefresh(name: string, hook: PostMountRefreshHook): void;
|
|
37
|
+
/**
|
|
38
|
+
* Invoke every registered post-mount refresh hook in insertion order.
|
|
39
|
+
*
|
|
40
|
+
* @internal `<DataGrid>` mount-effect use only.
|
|
41
|
+
*/
|
|
42
|
+
export declare function notifyPostMount(gridEl: HTMLElement): void;
|
|
43
|
+
/**
|
|
44
|
+
* Test-only: clear all registered hooks. Lets specs assert in isolation.
|
|
45
|
+
*
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
export declare function clearPostMountRefreshHooks(): void;
|
|
49
|
+
//# sourceMappingURL=post-mount-refresh-hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-mount-refresh-hooks.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/post-mount-refresh-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,KAAK,IAAI,CAAC;AAI1E;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAEvF;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAIzD;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { CellRenderContext, ColumnEditorContext, ColumnEditorSpec, ColumnViewRenderer, GridConfig as CoreGridConfig, FrameworkAdapter, TypeDefault } from '@toolbox-web/grid';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { registerChildFeatureDetector, ChildFeatureDetector } from './child-feature-detector';
|
|
3
4
|
import { registerEditorMountHook, EditorMountHook } from './editor-mount-hooks';
|
|
5
|
+
import { registerFeaturePropKey } from './feature-prop-keys';
|
|
4
6
|
import { TypeDefaultsMap } from './grid-type-registry';
|
|
7
|
+
import { registerPostMountRefresh, PostMountRefreshHook } from './post-mount-refresh-hooks';
|
|
5
8
|
export { registerEditorMountHook, type EditorMountHook };
|
|
9
|
+
export { registerPostMountRefresh, type PostMountRefreshHook };
|
|
10
|
+
export { registerChildFeatureDetector, type ChildFeatureDetector };
|
|
11
|
+
export { registerFeaturePropKey };
|
|
6
12
|
/**
|
|
7
13
|
* Context handed to feature bridge installers so they can hook the adapter's
|
|
8
14
|
* portal lifecycle without depending on its private fields.
|
|
@@ -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;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAuB,uBAAuB,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,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,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACnG,OAAO,EAAuB,uBAAuB,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EAAmC,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE7F,OAAO,EAAE,wBAAwB,EAAE,KAAK,oBAAoB,EAAE,MAAM,4BAA4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AAC,EAAE,WAAW,GAAG,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;IAQrC;;;;;;;OAOG;IACH,UAAU,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI;IAItC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI;CAGrC"}
|
|
@@ -19,7 +19,7 @@ export interface UseGridOverlayOptions {
|
|
|
19
19
|
* Optional explicit grid element. When omitted, the hook resolves the
|
|
20
20
|
* grid by:
|
|
21
21
|
*
|
|
22
|
-
* 1. Walking up the DOM from `panelRef.current` via `closest('tbw-grid')`
|
|
22
|
+
* 1. Walking up the DOM from `panelRef.current` via `closest('tbw-grid, [data-tbw-grid]')`
|
|
23
23
|
* (works for inline overlays).
|
|
24
24
|
* 2. Falling back to the `GridElementContext` populated by
|
|
25
25
|
* `<DataGrid>` / `<GridProvider>` (works for portal-rendered overlays
|
package/package.json
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as f, useCallback as l, useEffect as p } from "react";
|
|
3
|
-
const o = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new Map();
|
|
4
|
-
function w(i) {
|
|
5
|
-
const r = i.querySelector("tbw-grid-responsive-card");
|
|
6
|
-
if (r) {
|
|
7
|
-
const d = o.get(r);
|
|
8
|
-
if (d) return d;
|
|
9
|
-
}
|
|
10
|
-
const s = i.id || i.getAttribute("data-grid-id");
|
|
11
|
-
if (s)
|
|
12
|
-
return a.get(s);
|
|
13
|
-
}
|
|
14
|
-
function R(i) {
|
|
15
|
-
const { children: r, cardRowHeight: s = "auto" } = i, d = f(null), c = l(
|
|
16
|
-
(e) => {
|
|
17
|
-
if (d.current = e, !e) return;
|
|
18
|
-
o.set(e, r);
|
|
19
|
-
const t = e.closest("tbw-grid");
|
|
20
|
-
if (t) {
|
|
21
|
-
const n = t.id || t.getAttribute("data-grid-id");
|
|
22
|
-
n && a.set(n, r);
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
[r]
|
|
26
|
-
);
|
|
27
|
-
p(() => () => {
|
|
28
|
-
const e = d.current;
|
|
29
|
-
if (e) {
|
|
30
|
-
o.delete(e);
|
|
31
|
-
const t = e.closest("tbw-grid");
|
|
32
|
-
if (t) {
|
|
33
|
-
const n = t.id || t.getAttribute("data-grid-id");
|
|
34
|
-
n && a.delete(n);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}, []);
|
|
38
|
-
const g = s === "auto" ? "auto" : String(s);
|
|
39
|
-
return /* @__PURE__ */ u("tbw-grid-responsive-card", { ref: c, cardRowHeight: g });
|
|
40
|
-
}
|
|
41
|
-
R.displayName = "GridResponsiveCard";
|
|
42
|
-
export {
|
|
43
|
-
R as G,
|
|
44
|
-
w as g
|
|
45
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { flushSync as d } from "react-dom";
|
|
2
|
-
import { createRoot as p } from "react-dom/client";
|
|
3
|
-
const o = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
4
|
-
let m = 0;
|
|
5
|
-
function B(e, t) {
|
|
6
|
-
t ? o.set(e, t) : o.delete(e);
|
|
7
|
-
}
|
|
8
|
-
function g(e, t) {
|
|
9
|
-
if (t) return t;
|
|
10
|
-
const n = e.closest("tbw-grid");
|
|
11
|
-
if (n) return n;
|
|
12
|
-
if (o.size === 1) return o.keys().next().value;
|
|
13
|
-
}
|
|
14
|
-
function u(e) {
|
|
15
|
-
const t = i.get(e);
|
|
16
|
-
if (t) {
|
|
17
|
-
try {
|
|
18
|
-
t.unmount();
|
|
19
|
-
} catch {
|
|
20
|
-
}
|
|
21
|
-
i.delete(e);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function v(e, t, n, r) {
|
|
25
|
-
const s = n ?? `p-${m++}`, a = g(e, r), l = a ? o.get(a) : void 0;
|
|
26
|
-
if (l)
|
|
27
|
-
u(s), a && f.set(s, a), l.renderPortal(s, e, t);
|
|
28
|
-
else {
|
|
29
|
-
let c = i.get(s);
|
|
30
|
-
c || (c = p(e), i.set(s, c)), d(() => c.render(t));
|
|
31
|
-
}
|
|
32
|
-
return s;
|
|
33
|
-
}
|
|
34
|
-
function M(e, t) {
|
|
35
|
-
const n = f.get(e);
|
|
36
|
-
(n ? o.get(n) : void 0)?.removePortal(e, t?.sync), f.delete(e), u(e);
|
|
37
|
-
}
|
|
38
|
-
function w(e) {
|
|
39
|
-
if (e) {
|
|
40
|
-
o.get(e)?.beginBatch();
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
for (const t of o.values()) t.beginBatch();
|
|
44
|
-
}
|
|
45
|
-
function y(e) {
|
|
46
|
-
if (e) {
|
|
47
|
-
o.get(e)?.endBatch();
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
for (const t of o.values()) t.endBatch();
|
|
51
|
-
}
|
|
52
|
-
function P(e) {
|
|
53
|
-
return (t) => {
|
|
54
|
-
const n = e(t);
|
|
55
|
-
if (n == null || n === !1) return null;
|
|
56
|
-
if (n instanceof HTMLElement) return n;
|
|
57
|
-
const r = document.createElement("div");
|
|
58
|
-
return r.style.display = "contents", v(r, n), r;
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
export {
|
|
62
|
-
v as a,
|
|
63
|
-
w as b,
|
|
64
|
-
P as c,
|
|
65
|
-
y as e,
|
|
66
|
-
M as r,
|
|
67
|
-
B as s
|
|
68
|
-
};
|