@toolbox-web/grid-react 1.4.0 → 1.5.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 +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 +27 -1
- package/lib/column-shorthand.d.ts.map +1 -1
- package/lib/context-types.d.ts +17 -2
- package/lib/context-types.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 +134 -6
- package/lib/event-props.d.ts.map +1 -1
- package/lib/feature-props.d.ts +20 -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 +12 -0
- package/lib/react-column-config.d.ts.map +1 -1
- package/lib/react-grid-adapter.d.ts +61 -11
- package/lib/react-grid-adapter.d.ts.map +1 -1
- package/lib/use-grid-overlay.d.ts +2 -0
- package/lib/use-grid-overlay.d.ts.map +1 -1
- package/lib/use-grid.d.ts +2 -0
- package/lib/use-grid.d.ts.map +1 -1
- package/package.json +1 -1
- package/chunks/portal-bridge-DZ4yQkmm.js +0 -42
|
@@ -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.
|
|
@@ -61,6 +103,7 @@ export declare function clearFieldRegistries(): void;
|
|
|
61
103
|
* )} />
|
|
62
104
|
* </DataGrid>
|
|
63
105
|
* ```
|
|
106
|
+
* @since 0.0.1
|
|
64
107
|
*/
|
|
65
108
|
export declare class GridAdapter implements FrameworkAdapter {
|
|
66
109
|
/** Portal keys for all managed portals (for cleanup on destroy). */
|
|
@@ -139,7 +182,10 @@ export declare class GridAdapter implements FrameworkAdapter {
|
|
|
139
182
|
createEditor<TRow = unknown, TValue = unknown>(element: HTMLElement): ColumnEditorSpec<TRow, TValue>;
|
|
140
183
|
/**
|
|
141
184
|
* Creates a detail renderer function for MasterDetailPlugin.
|
|
142
|
-
*
|
|
185
|
+
* Implementation is installed by `@toolbox-web/grid-react/features/master-detail`
|
|
186
|
+
* via {@link registerDetailRendererBridge}. Returns undefined if the
|
|
187
|
+
* master-detail feature has not been imported, or if no GridDetailPanel
|
|
188
|
+
* was registered for this grid.
|
|
143
189
|
*/
|
|
144
190
|
createDetailRenderer<TRow = unknown>(gridElement: HTMLElement): ((row: TRow, rowIndex: number) => HTMLElement) | undefined;
|
|
145
191
|
/**
|
|
@@ -149,7 +195,10 @@ export declare class GridAdapter implements FrameworkAdapter {
|
|
|
149
195
|
parseDetailElement<TRow = unknown>(detailElement: Element): ((row: TRow, rowIndex: number) => HTMLElement | string) | undefined;
|
|
150
196
|
/**
|
|
151
197
|
* Creates a responsive card renderer function for ResponsivePlugin.
|
|
152
|
-
*
|
|
198
|
+
* Implementation is installed by `@toolbox-web/grid-react/features/responsive`
|
|
199
|
+
* via {@link registerResponsiveCardRendererBridge}. Returns undefined if
|
|
200
|
+
* the responsive feature has not been imported, or if no GridResponsiveCard
|
|
201
|
+
* was registered for this grid.
|
|
153
202
|
*/
|
|
154
203
|
createResponsiveCardRenderer<TRow = unknown>(gridElement: HTMLElement): ((row: TRow, rowIndex: number) => HTMLElement) | undefined;
|
|
155
204
|
/**
|
|
@@ -202,10 +251,11 @@ export declare class GridAdapter implements FrameworkAdapter {
|
|
|
202
251
|
*/
|
|
203
252
|
private createTypeEditor;
|
|
204
253
|
/**
|
|
205
|
-
*
|
|
206
|
-
*
|
|
254
|
+
* Stable bridge context handed to feature installers. Bound once per adapter
|
|
255
|
+
* so feature bridges can call `trackPortal` without each invocation creating
|
|
256
|
+
* a fresh closure.
|
|
207
257
|
*/
|
|
208
|
-
private
|
|
258
|
+
private readonly bridgeContext;
|
|
209
259
|
/** Register a portal key for lifecycle tracking. */
|
|
210
260
|
private trackPortal;
|
|
211
261
|
/** 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,MAAM,OAAO,CAAC;AACvC,OAAO,EAAuB,uBAAuB,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE1G,OAAO,KAAK,EAAmC,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAM7F,OAAO,EAAE,uBAAuB,EAAE,KAAK,eAAe,EAAE,CAAC;AAIzD;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,2EAA2E;IAC3E,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;CAC3E;AAED;;;;;GAKG;AACH,MAAM,MAA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AAO,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI;CAOtC"}
|
|
@@ -4,6 +4,7 @@ import { RefObject } from 'react';
|
|
|
4
4
|
* Options for {@link useGridOverlay}.
|
|
5
5
|
*
|
|
6
6
|
* @public
|
|
7
|
+
* @since 1.4.0
|
|
7
8
|
*/
|
|
8
9
|
export interface UseGridOverlayOptions {
|
|
9
10
|
/**
|
|
@@ -69,6 +70,7 @@ export interface UseGridOverlayOptions {
|
|
|
69
70
|
* @param options - {@link UseGridOverlayOptions}.
|
|
70
71
|
*
|
|
71
72
|
* @public
|
|
73
|
+
* @since 1.4.0
|
|
72
74
|
*/
|
|
73
75
|
export declare function useGridOverlay(panelRef: RefObject<HTMLElement | null>, options?: UseGridOverlayOptions): void;
|
|
74
76
|
//# sourceMappingURL=use-grid-overlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-grid-overlay.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/use-grid-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9D
|
|
1
|
+
{"version":3,"file":"use-grid-overlay.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/use-grid-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9D;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,OAAO,GAAE,qBAA0B,GAAG,IAAI,CAiBjH"}
|
package/lib/use-grid.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ColumnConfig, DataGridElement, GridConfig } from '@toolbox-web/grid';
|
|
|
2
2
|
import { DataGridRef } from './data-grid';
|
|
3
3
|
/**
|
|
4
4
|
* Return type for useGrid hook.
|
|
5
|
+
* @since 0.0.1
|
|
5
6
|
*/
|
|
6
7
|
export interface UseGridReturn<TRow = unknown> {
|
|
7
8
|
/** Ref to attach to the DataGrid component (returns DataGridRef handle) */
|
|
@@ -65,6 +66,7 @@ export interface UseGridReturn<TRow = unknown> {
|
|
|
65
66
|
* @param selector - Optional CSS selector to target a specific grid element via
|
|
66
67
|
* DOM query instead of using `ref`. Use when the component contains multiple
|
|
67
68
|
* grids, e.g. `'tbw-grid.primary'` or `'#my-grid'`.
|
|
69
|
+
* @since 0.0.1
|
|
68
70
|
*/
|
|
69
71
|
export declare function useGrid<TRow = unknown>(selector?: string): UseGridReturn<TRow>;
|
|
70
72
|
//# sourceMappingURL=use-grid.d.ts.map
|
package/lib/use-grid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-grid.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/use-grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"use-grid.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/use-grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM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,GAAG,aAAa,CAAC,IAAI,CAAC,CA8J9E"}
|
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
|
-
};
|