@toolbox-web/grid-react 0.0.2 → 0.0.4

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 CHANGED
@@ -1,17 +1,54 @@
1
1
  # @toolbox-web/grid-react
2
2
 
3
- React adapter library for [@toolbox-web/grid](https://www.npmjs.com/package/@toolbox-web/grid) - a high-performance, framework-agnostic data grid web component.
3
+ [![npm](https://img.shields.io/npm/v/@toolbox-web/grid-react.svg)](https://www.npmjs.com/package/@toolbox-web/grid-react)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](../../LICENSE)
5
+ [![GitHub Sponsors](https://img.shields.io/badge/Sponsor-❤-ea4aaa?logo=github)](https://github.com/sponsors/OysteinAmundsen)
6
+
7
+ React adapter for `@toolbox-web/grid` data grid component. Provides components and hooks for declarative React integration with custom cell renderers and editors.
8
+
9
+ ## Features
10
+
11
+ - ✅ **Full React integration** - Use JSX for cell renderers and editors
12
+ - ✅ **Declarative columns** - Define columns via props or `GridColumn` components
13
+ - ✅ **Render props** - Clean `children` syntax for custom cells
14
+ - ✅ **Hooks API** - `useGrid` and `useGridEvent` for programmatic access
15
+ - ✅ **Ref forwarding** - Access grid instance via `DataGridRef`
16
+ - ✅ **Master-detail** - `GridDetailPanel` for expandable rows
17
+ - ✅ **Tool panels** - `GridToolPanel` for custom sidebar content
18
+ - ✅ **Full type safety** - TypeScript generics support
19
+ - ✅ **React 18+** - Concurrent features and Suspense compatible
4
20
 
5
21
  ## Installation
6
22
 
7
23
  ```bash
24
+ # npm
8
25
  npm install @toolbox-web/grid @toolbox-web/grid-react
26
+
27
+ # yarn
28
+ yarn add @toolbox-web/grid @toolbox-web/grid-react
29
+
30
+ # pnpm
31
+ pnpm add @toolbox-web/grid @toolbox-web/grid-react
32
+
33
+ # bun
34
+ bun add @toolbox-web/grid @toolbox-web/grid-react
35
+ ```
36
+
37
+ ## Quick Start
38
+
39
+ ### 1. Register the Grid Component
40
+
41
+ In your application entry point, import the grid registration:
42
+
43
+ ```typescript
44
+ // main.tsx or index.tsx
45
+ import '@toolbox-web/grid';
9
46
  ```
10
47
 
11
- ## Basic Usage
48
+ ### 2. Use in Components
12
49
 
13
50
  ```tsx
14
- import { DataGrid, GridColumn } from '@toolbox-web/grid-react';
51
+ import { DataGrid } from '@toolbox-web/grid-react';
15
52
 
16
53
  interface Employee {
17
54
  id: number;
@@ -60,11 +97,7 @@ const config: ReactGridConfig<Employee> = {
60
97
  field: 'status',
61
98
  header: 'Status',
62
99
  // Custom React renderer - same property name as vanilla!
63
- renderer: (ctx) => (
64
- <span className={`badge badge-${ctx.value.toLowerCase()}`}>
65
- {ctx.value}
66
- </span>
67
- ),
100
+ renderer: (ctx) => <span className={`badge badge-${ctx.value.toLowerCase()}`}>{ctx.value}</span>,
68
101
  },
69
102
  ],
70
103
  };
@@ -74,6 +107,14 @@ function EmployeeGrid() {
74
107
  }
75
108
  ```
76
109
 
110
+ **Renderer Context:**
111
+
112
+ | Property | Type | Description |
113
+ | -------- | --------- | ------------------------ |
114
+ | `value` | `TValue` | The cell value |
115
+ | `row` | `TRow` | The full row data object |
116
+ | `column` | `unknown` | The column configuration |
117
+
77
118
  ### Using GridColumn Components
78
119
 
79
120
  Use the `GridColumn` component with a render prop:
@@ -125,6 +166,16 @@ const config: ReactGridConfig<Employee> = {
125
166
  };
126
167
  ```
127
168
 
169
+ **Editor Context:**
170
+
171
+ | Property | Type | Description |
172
+ | -------- | ------------- | ---------------------------- |
173
+ | `value` | `TValue` | The current cell value |
174
+ | `row` | `TRow` | The full row data object |
175
+ | `column` | `unknown` | The column configuration |
176
+ | `commit` | `(v) => void` | Callback to commit new value |
177
+ | `cancel` | `() => void` | Callback to cancel editing |
178
+
128
179
  ### Using GridColumn
129
180
 
130
181
  ```tsx
@@ -179,11 +230,11 @@ function EmployeeGrid() {
179
230
 
180
231
  **GridDetailPanel Props:**
181
232
 
182
- | Prop | Type | Default | Description |
183
- | ------------------ | ----------------------------------------- | --------- | ------------------------------------ |
184
- | `children` | `(ctx: DetailPanelContext) => ReactNode` | Required | Render function for panel content |
185
- | `showExpandColumn` | `boolean` | `true` | Show expand/collapse chevron column |
186
- | `animation` | `'slide' \| 'fade' \| false` | `'slide'` | Animation style for expand/collapse |
233
+ | Prop | Type | Default | Description |
234
+ | ------------------ | ---------------------------------------- | --------- | ----------------------------------- |
235
+ | `children` | `(ctx: DetailPanelContext) => ReactNode` | Required | Render function for panel content |
236
+ | `showExpandColumn` | `boolean` | `true` | Show expand/collapse chevron column |
237
+ | `animation` | `'slide' \| 'fade' \| false` | `'slide'` | Animation style for expand/collapse |
187
238
 
188
239
  ## Custom Tool Panels with GridToolPanel
189
240
 
@@ -229,56 +280,58 @@ function EmployeeGrid() {
229
280
 
230
281
  **GridToolPanel Props:**
231
282
 
232
- | Prop | Type | Default | Description |
233
- | ---------- | --------------------------------------- | ---------- | ------------------------------------ |
234
- | `id` | `string` | Required | Unique panel identifier |
235
- | `title` | `string` | Required | Panel title in accordion header |
236
- | `children` | `(ctx: ToolPanelContext) => ReactNode` | Required | Render function for panel content |
237
- | `icon` | `string` | - | Icon for the accordion header |
238
- | `tooltip` | `string` | - | Tooltip text for header |
239
- | `order` | `number` | `100` | Panel sort order (lower = higher) |
283
+ | Prop | Type | Default | Description |
284
+ | ---------- | -------------------------------------- | -------- | --------------------------------- |
285
+ | `id` | `string` | Required | Unique panel identifier |
286
+ | `title` | `string` | Required | Panel title in accordion header |
287
+ | `children` | `(ctx: ToolPanelContext) => ReactNode` | Required | Render function for panel content |
288
+ | `icon` | `string` | - | Icon for the accordion header |
289
+ | `tooltip` | `string` | - | Tooltip text for header |
290
+ | `order` | `number` | `100` | Panel sort order (lower = higher) |
240
291
 
241
- ## Using Refs
292
+ ## Hooks
293
+
294
+ ### useGrid
242
295
 
243
296
  Access the grid instance for programmatic control:
244
297
 
245
298
  ```tsx
246
- import { DataGrid, DataGridRef } from '@toolbox-web/grid-react';
247
- import { useRef } from 'react';
299
+ import { DataGrid, useGrid } from '@toolbox-web/grid-react';
248
300
 
249
301
  function MyComponent() {
250
- const gridRef = useRef<DataGridRef>(null);
302
+ const { ref, isReady, forceLayout, getConfig } = useGrid<Employee>();
251
303
 
252
304
  const handleExport = async () => {
253
- const config = await gridRef.current?.getConfig();
305
+ const config = await getConfig();
254
306
  console.log('Columns:', config?.columns);
255
307
  };
256
308
 
257
309
  return (
258
310
  <>
259
311
  <button onClick={handleExport}>Export</button>
260
- <DataGrid ref={gridRef} rows={employees} />
312
+ <button onClick={() => forceLayout()}>Refresh Layout</button>
313
+ <DataGrid ref={ref} rows={employees} />
261
314
  </>
262
315
  );
263
316
  }
264
317
  ```
265
318
 
266
- ## useGrid Hook
319
+ ### useGridEvent
267
320
 
268
- For more complex scenarios, use the `useGrid` hook:
321
+ Type-safe event subscription with automatic cleanup:
269
322
 
270
323
  ```tsx
271
- import { DataGrid, useGrid } from '@toolbox-web/grid-react';
324
+ import { DataGrid, useGridEvent, DataGridRef } from '@toolbox-web/grid-react';
325
+ import { useRef } from 'react';
272
326
 
273
327
  function MyComponent() {
274
- const { ref, isReady, forceLayout } = useGrid<Employee>();
328
+ const gridRef = useRef<DataGridRef>(null);
275
329
 
276
- return (
277
- <>
278
- <button onClick={() => forceLayout()}>Refresh Layout</button>
279
- <DataGrid ref={ref} rows={employees} />
280
- </>
281
- );
330
+ useGridEvent(gridRef, 'selection-change', (event) => {
331
+ console.log('Selected:', event.detail.selectedRows);
332
+ });
333
+
334
+ return <DataGrid ref={gridRef} rows={employees} />;
282
335
  }
283
336
  ```
284
337
 
@@ -297,27 +350,16 @@ function MyComponent() {
297
350
 
298
351
  ### Via useGridEvent Hook
299
352
 
300
- ```tsx
301
- import { DataGrid, useGridEvent, DataGridRef } from '@toolbox-web/grid-react';
302
-
303
- function MyComponent() {
304
- const gridRef = useRef<DataGridRef>(null);
305
-
306
- useGridEvent(gridRef, 'selection-change', (event) => {
307
- console.log('Selected:', event.detail.selectedRows);
308
- });
309
-
310
- return <DataGrid ref={gridRef} rows={employees} />;
311
- }
312
- ```
353
+ See [useGridEvent](#usegridevent) above.
313
354
 
314
- ## Plugins
355
+ ## Using Plugins
315
356
 
316
- Use plugins from `@toolbox-web/grid/all`:
357
+ Import plugins individually for smaller bundles:
317
358
 
318
359
  ```tsx
319
360
  import { DataGrid } from '@toolbox-web/grid-react';
320
- import { SelectionPlugin, FilteringPlugin } from '@toolbox-web/grid/all';
361
+ import { SelectionPlugin } from '@toolbox-web/grid/plugins/selection';
362
+ import { FilteringPlugin } from '@toolbox-web/grid/plugins/filtering';
321
363
 
322
364
  function MyComponent() {
323
365
  return (
@@ -335,6 +377,12 @@ function MyComponent() {
335
377
  }
336
378
  ```
337
379
 
380
+ Or import all plugins at once (larger bundle, but convenient):
381
+
382
+ ```tsx
383
+ import { SelectionPlugin, FilteringPlugin } from '@toolbox-web/grid/all';
384
+ ```
385
+
338
386
  ## Custom Styles
339
387
 
340
388
  Inject custom CSS into the grid's shadow DOM:
@@ -353,6 +401,38 @@ Inject custom CSS into the grid's shadow DOM:
353
401
 
354
402
  ## API Reference
355
403
 
404
+ ### Exported Components
405
+
406
+ | Component | Description |
407
+ | ----------------- | ------------------------------------ |
408
+ | `DataGrid` | Main grid component wrapper |
409
+ | `GridColumn` | Declarative column with render props |
410
+ | `GridDetailPanel` | Master-detail expandable panel |
411
+ | `GridToolPanel` | Custom sidebar panel |
412
+ | `GridToolButtons` | Toolbar button container |
413
+
414
+ ### Exported Hooks
415
+
416
+ | Hook | Description |
417
+ | -------------- | ----------------------------------------- |
418
+ | `useGrid` | Grid ref with ready state and methods |
419
+ | `useGridEvent` | Type-safe event subscription with cleanup |
420
+
421
+ ### Exported Types
422
+
423
+ ```typescript
424
+ import type {
425
+ ReactGridConfig,
426
+ ReactColumnConfig,
427
+ CellRenderContext,
428
+ ColumnEditorContext,
429
+ DetailPanelContext,
430
+ ToolPanelContext,
431
+ DataGridRef,
432
+ DataGridProps,
433
+ } from '@toolbox-web/grid-react';
434
+ ```
435
+
356
436
  ### DataGrid Props
357
437
 
358
438
  | Prop | Type | Description |
@@ -384,18 +464,63 @@ Inject custom CSS into the grid's shadow DOM:
384
464
  ### DataGridRef Methods
385
465
 
386
466
  | Method | Description |
387
- | ------------------------- | --------------------------- |
467
+ | ------------------------- | --------------------------- | -------------------- |
388
468
  | `getConfig()` | Get effective configuration |
389
469
  | `ready()` | Wait for grid ready |
390
470
  | `forceLayout()` | Force layout recalculation |
391
471
  | `toggleGroup(key)` | Toggle group expansion |
392
472
  | `registerStyles(id, css)` | Register custom styles |
393
- | `unregisterStyles(id)` | Remove custom styles |
473
+ | `unregisterStyles(id)` | `void` | Remove custom styles |
474
+
475
+ ### ReactGridAdapter
476
+
477
+ The adapter class is exported for advanced use cases:
478
+
479
+ ```typescript
480
+ import { ReactGridAdapter } from '@toolbox-web/grid-react';
481
+ ```
482
+
483
+ In most cases, the `DataGrid` component handles adapter registration automatically.
484
+
485
+ ## Demo
486
+
487
+ See the full React demo at [`demos/employee-management/react/`](../../demos/employee-management/react/) which demonstrates:
488
+
489
+ - 15+ plugins with full configuration
490
+ - Custom editors (star rating, date picker, status select, bonus slider)
491
+ - Custom renderers (status badges, rating colors, top performer stars)
492
+ - Hooks for programmatic control
493
+ - Shell integration (header, tool panels)
494
+ - Master-detail expandable rows
394
495
 
395
496
  ## Requirements
396
497
 
397
498
  - React 18.0.0 or higher
398
- - @toolbox-web/grid 0.2.0 or higher
499
+ - `@toolbox-web/grid` >= 0.2.0
500
+
501
+ ## Development
502
+
503
+ ```bash
504
+ # Build the library
505
+ bun nx build grid-react
506
+
507
+ # Run tests
508
+ bun nx test grid-react
509
+
510
+ # Lint
511
+ bun nx lint grid-react
512
+ ```
513
+
514
+ ---
515
+
516
+ ## Support This Project
517
+
518
+ This grid is built and maintained by a single developer in spare time. If it saves you time or money, consider sponsoring to keep development going:
519
+
520
+ [![GitHub Sponsors](https://img.shields.io/badge/Sponsor_on_GitHub-ea4aaa?style=for-the-badge&logo=github)](https://github.com/sponsors/OysteinAmundsen)
521
+ [![Patreon](https://img.shields.io/badge/Support_on_Patreon-f96854?style=for-the-badge&logo=patreon)](https://www.patreon.com/c/OysteinAmundsen)
522
+
523
+ ---
399
524
 
400
525
  ## License
401
526
 
package/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsx as L } from "react/jsx-runtime";
2
- import { DataGridElement as O } from "@toolbox-web/grid";
3
- import { useRef as G, useCallback as C, forwardRef as _, useMemo as j, useEffect as R, useImperativeHandle as B, useState as M } from "react";
2
+ import { DataGridElement as z } from "@toolbox-web/grid";
3
+ import { useRef as G, useCallback as C, forwardRef as B, useMemo as O, useEffect as R, useImperativeHandle as _, useState as x } from "react";
4
4
  import { flushSync as b } from "react-dom";
5
5
  import { createRoot as V } from "react-dom/client";
6
- const F = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new Map();
7
- function H(n) {
6
+ const F = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new Map();
7
+ function W(n) {
8
8
  const t = n.querySelector("tbw-grid-detail");
9
9
  if (t) {
10
10
  const r = F.get(t);
@@ -12,17 +12,17 @@ function H(n) {
12
12
  }
13
13
  const e = n.id || n.getAttribute("data-grid-id");
14
14
  if (e)
15
- return W.get(e);
15
+ return N.get(e);
16
16
  }
17
- function ce(n) {
18
- const { children: t, showExpandColumn: e = !0, animation: r = "slide" } = n, i = G(null), o = C(
17
+ function se(n) {
18
+ const { children: t, showExpandColumn: e = !0, animation: r = "slide" } = n, i = G(null), s = C(
19
19
  (d) => {
20
20
  if (i.current = d, !d) return;
21
21
  F.set(d, t);
22
22
  const u = d.closest("tbw-grid");
23
23
  if (u) {
24
24
  const l = u.id || u.getAttribute("data-grid-id");
25
- l && W.set(l, t);
25
+ l && N.set(l, t);
26
26
  }
27
27
  },
28
28
  [t]
@@ -30,32 +30,32 @@ function ce(n) {
30
30
  return /* @__PURE__ */ L(
31
31
  "tbw-grid-detail",
32
32
  {
33
- ref: o,
33
+ ref: s,
34
34
  showExpandColumn: e ? void 0 : "false",
35
35
  animation: r === !1 ? "false" : r
36
36
  }
37
37
  );
38
38
  }
39
- function $(n) {
39
+ function j(n) {
40
40
  const t = /* @__PURE__ */ new WeakMap();
41
41
  return (e) => {
42
42
  const r = e.cellEl;
43
43
  if (r) {
44
- const s = t.get(r);
45
- if (s)
44
+ const o = t.get(r);
45
+ if (o)
46
46
  return b(() => {
47
- s.root.render(n(e));
48
- }), s.container;
47
+ o.root.render(n(e));
48
+ }), o.container;
49
49
  }
50
50
  const i = document.createElement("div");
51
51
  i.className = "react-cell-renderer", i.style.display = "contents";
52
- const o = V(i);
52
+ const s = V(i);
53
53
  return b(() => {
54
- o.render(n(e));
55
- }), r && t.set(r, { root: o, container: i }), i;
54
+ s.render(n(e));
55
+ }), r && t.set(r, { root: s, container: i }), i;
56
56
  };
57
57
  }
58
- function J(n) {
58
+ function $(n) {
59
59
  return (t) => {
60
60
  const e = document.createElement("div");
61
61
  e.className = "react-cell-editor", e.style.display = "contents";
@@ -65,32 +65,32 @@ function J(n) {
65
65
  }), e;
66
66
  };
67
67
  }
68
- function K(n) {
68
+ function J(n) {
69
69
  if (!n) return;
70
70
  if (!n.columns) return n;
71
71
  const t = n.columns.map((e) => {
72
- const { renderer: r, editor: i, ...o } = e, s = { ...o };
73
- return r && (s.renderer = $(r)), i && (s.editor = J(i)), s;
72
+ const { renderer: r, editor: i, ...s } = e, o = { ...s };
73
+ return r && (o.renderer = j(r)), i && (o.editor = $(i)), o;
74
74
  });
75
75
  return {
76
76
  ...n,
77
77
  columns: t
78
78
  };
79
79
  }
80
- const N = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new Map();
81
- function Q(n) {
82
- const t = N.get(n);
80
+ const H = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new Map();
81
+ function K(n) {
82
+ const t = H.get(n);
83
83
  if (t) return t;
84
84
  const e = n.id;
85
85
  if (e)
86
86
  return T.get(e);
87
87
  }
88
- function de(n) {
89
- const { id: t, title: e, icon: r, tooltip: i, order: o = 100, children: s } = n, d = G(null), u = C(
88
+ function ce(n) {
89
+ const { id: t, title: e, icon: r, tooltip: i, order: s = 100, children: o } = n, d = G(null), u = C(
90
90
  (l) => {
91
- d.current = l, l && (N.set(l, s), t && T.set(t, s));
91
+ d.current = l, l && (H.set(l, o), t && T.set(t, o));
92
92
  },
93
- [s, t]
93
+ [o, t]
94
94
  );
95
95
  return /* @__PURE__ */ L(
96
96
  "tbw-grid-tool-panel",
@@ -100,26 +100,26 @@ function de(n) {
100
100
  title: e,
101
101
  icon: r,
102
102
  tooltip: i,
103
- order: o?.toString()
103
+ order: s?.toString()
104
104
  }
105
105
  );
106
106
  }
107
107
  const S = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new Map();
108
- function U(n, t) {
108
+ function Q(n, t) {
109
109
  const e = n.getAttribute("field"), r = S.get(n) ?? {};
110
110
  if (r.renderer = t, S.set(n, r), e) {
111
111
  const i = A.get(e) ?? {};
112
112
  i.renderer = t, A.set(e, i);
113
113
  }
114
114
  }
115
- function X(n, t) {
115
+ function U(n, t) {
116
116
  const e = n.getAttribute("field"), r = S.get(n) ?? {};
117
117
  if (r.editor = t, S.set(n, r), e) {
118
118
  const i = A.get(e) ?? {};
119
119
  i.editor = t, A.set(e, i);
120
120
  }
121
121
  }
122
- function Y(n) {
122
+ function X(n) {
123
123
  let t = S.get(n)?.renderer;
124
124
  if (!t) {
125
125
  const e = n.getAttribute("field");
@@ -127,7 +127,7 @@ function Y(n) {
127
127
  }
128
128
  return t;
129
129
  }
130
- function Z(n) {
130
+ function Y(n) {
131
131
  let t = S.get(n)?.editor;
132
132
  if (!t) {
133
133
  const e = n.getAttribute("field");
@@ -135,10 +135,10 @@ function Z(n) {
135
135
  }
136
136
  return t;
137
137
  }
138
- function ue() {
138
+ function de() {
139
139
  return Array.from(A.keys());
140
140
  }
141
- class ee {
141
+ class Z {
142
142
  mountedViews = [];
143
143
  /**
144
144
  * Determines if this adapter can handle the given element.
@@ -148,11 +148,11 @@ class ee {
148
148
  const e = t.getAttribute("field");
149
149
  let r = S.get(t);
150
150
  if (!r && e) {
151
- const s = A.get(e);
152
- s && (s.renderer || s.editor) && (r = s, S.set(t, r));
151
+ const o = A.get(e);
152
+ o && (o.renderer || o.editor) && (r = o, S.set(t, r));
153
153
  }
154
- const i = r?.renderer !== void 0, o = r?.editor !== void 0;
155
- return r !== void 0 && (i || o);
154
+ const i = r?.renderer !== void 0, s = r?.editor !== void 0;
155
+ return r !== void 0 && (i || s);
156
156
  }
157
157
  /**
158
158
  * Creates a view renderer function that renders a React component
@@ -166,14 +166,14 @@ class ee {
166
166
  * allowing the grid to use its default rendering.
167
167
  */
168
168
  createRenderer(t) {
169
- const e = Y(t);
169
+ const e = X(t);
170
170
  if (!e)
171
171
  return;
172
172
  const r = /* @__PURE__ */ new WeakMap();
173
173
  return (i) => {
174
- const o = i.cellEl;
175
- if (o) {
176
- const u = r.get(o);
174
+ const s = i.cellEl;
175
+ if (s) {
176
+ const u = r.get(s);
177
177
  if (u)
178
178
  return b(() => {
179
179
  u.root.render(e(i));
@@ -183,14 +183,14 @@ class ee {
183
183
  const w = V(l);
184
184
  return b(() => {
185
185
  w.render(e(i));
186
- }), r.set(o, { root: w, container: l, lastRowIndex: i.rowIndex ?? -1 }), this.mountedViews.push({ root: w, container: l }), l;
186
+ }), r.set(s, { root: w, container: l, lastRowIndex: i.rowIndex ?? -1 }), this.mountedViews.push({ root: w, container: l }), l;
187
187
  }
188
- const s = document.createElement("div");
189
- s.className = "react-cell-renderer", s.style.display = "contents";
190
- const d = V(s);
188
+ const o = document.createElement("div");
189
+ o.className = "react-cell-renderer", o.style.display = "contents";
190
+ const d = V(o);
191
191
  return b(() => {
192
192
  d.render(e(i));
193
- }), this.mountedViews.push({ root: d, container: s }), s;
193
+ }), this.mountedViews.push({ root: d, container: o }), o;
194
194
  };
195
195
  }
196
196
  /**
@@ -198,14 +198,14 @@ class ee {
198
198
  * with commit/cancel callbacks passed as props.
199
199
  */
200
200
  createEditor(t) {
201
- const e = Z(t);
201
+ const e = Y(t);
202
202
  return e ? (r) => {
203
203
  const i = document.createElement("div");
204
204
  i.className = "react-cell-editor", i.style.display = "contents";
205
- const o = V(i);
205
+ const s = V(i);
206
206
  return b(() => {
207
- o.render(e(r));
208
- }), this.mountedViews.push({ root: o, container: i }), i;
207
+ s.render(e(r));
208
+ }), this.mountedViews.push({ root: s, container: i }), i;
209
209
  } : () => document.createElement("div");
210
210
  }
211
211
  /**
@@ -213,15 +213,15 @@ class ee {
213
213
  * Renders React components for expandable detail rows.
214
214
  */
215
215
  createDetailRenderer(t) {
216
- const e = H(t);
216
+ const e = W(t);
217
217
  if (e)
218
218
  return (r, i) => {
219
- const o = document.createElement("div");
220
- o.className = "react-detail-panel";
221
- const s = { row: r, rowIndex: i }, d = V(o);
219
+ const s = document.createElement("div");
220
+ s.className = "react-detail-panel";
221
+ const o = { row: r, rowIndex: i }, d = V(s);
222
222
  return b(() => {
223
- d.render(e(s));
224
- }), this.mountedViews.push({ root: d, container: o }), o;
223
+ d.render(e(o));
224
+ }), this.mountedViews.push({ root: d, container: s }), s;
225
225
  };
226
226
  }
227
227
  /**
@@ -238,17 +238,17 @@ class ee {
238
238
  * Renders React components into tool panel containers.
239
239
  */
240
240
  createToolPanelRenderer(t) {
241
- const e = Q(t);
241
+ const e = K(t);
242
242
  if (!e)
243
243
  return;
244
244
  const r = t.closest("tbw-grid");
245
245
  return (i) => {
246
- const o = {
246
+ const s = {
247
247
  grid: r ?? i
248
- }, s = V(i);
248
+ }, o = V(i);
249
249
  return b(() => {
250
- s.render(e(o));
251
- }), this.mountedViews.push({ root: s, container: i }), () => {
250
+ o.render(e(s));
251
+ }), this.mountedViews.push({ root: o, container: i }), () => {
252
252
  const d = this.mountedViews.findIndex((u) => u.container === i);
253
253
  if (d !== -1) {
254
254
  const { root: u } = this.mountedViews[d];
@@ -288,40 +288,42 @@ class ee {
288
288
  }
289
289
  }
290
290
  }
291
- let P = !1, x = null;
291
+ let P = !1, M = null;
292
292
  function q() {
293
- return P || (x = new ee(), O.registerAdapter(x), P = !0), x;
293
+ return P || (M = new Z(), z.registerAdapter(M), P = !0), M;
294
294
  }
295
295
  q();
296
- function te(n, t, e) {
297
- const r = n, i = r.getPlugin?.(t);
298
- if (i && typeof i.refreshDetailRenderer == "function") {
299
- i.refreshDetailRenderer();
296
+ function ee(n, t) {
297
+ const e = n, r = e.getPluginByName?.("masterDetail");
298
+ if (r && typeof r.refreshDetailRenderer == "function") {
299
+ r.refreshDetailRenderer();
300
300
  return;
301
301
  }
302
- const o = n.querySelector("tbw-grid-detail");
303
- if (!o || !H(n)) return;
304
- const d = e.createDetailRenderer(n);
305
- if (!d) return;
306
- const u = o.getAttribute("animation");
307
- let l = "slide";
308
- u === "false" ? l = !1 : u === "fade" && (l = "fade");
309
- const w = o.getAttribute("showExpandColumn") !== "false", a = new t({
310
- detailRenderer: d,
311
- showExpandColumn: w,
312
- animation: l
313
- }), m = r.gridConfig || {}, E = m.plugins || [];
314
- r.gridConfig = {
315
- ...m,
316
- plugins: [...E, a]
317
- };
302
+ const i = n.querySelector("tbw-grid-detail");
303
+ !i || !W(n) || import("@toolbox-web/grid/all").then(({ MasterDetailPlugin: o }) => {
304
+ const d = t.createDetailRenderer(n);
305
+ if (!d) return;
306
+ const u = i.getAttribute("animation");
307
+ let l = "slide";
308
+ u === "false" ? l = !1 : u === "fade" && (l = "fade");
309
+ const w = i.getAttribute("showExpandColumn") !== "false", a = new o({
310
+ detailRenderer: d,
311
+ showExpandColumn: w,
312
+ animation: l
313
+ }), m = e.gridConfig || {}, E = m.plugins || [];
314
+ e.gridConfig = {
315
+ ...m,
316
+ plugins: [...E, a]
317
+ };
318
+ }).catch(() => {
319
+ });
318
320
  }
319
- const ae = _(function(t, e) {
321
+ const ue = B(function(t, e) {
320
322
  const {
321
323
  rows: r,
322
324
  gridConfig: i,
323
- columns: o,
324
- fitMode: s,
325
+ columns: s,
326
+ fitMode: o,
325
327
  editOn: d,
326
328
  customStyles: u,
327
329
  className: l,
@@ -332,71 +334,68 @@ const ae = _(function(t, e) {
332
334
  onRowClick: v,
333
335
  onColumnStateChange: D,
334
336
  onSortChange: I
335
- } = t, f = G(null), k = G(null), p = j(() => K(i), [i]);
337
+ } = t, f = G(null), k = G(null), h = O(() => J(i), [i]);
336
338
  return R(() => {
337
339
  f.current && (f.current.rows = r);
338
340
  }, [r]), R(() => {
339
- f.current && p && (f.current.gridConfig = p);
340
- }, [p]), R(() => {
341
- f.current && o && (f.current.columns = o);
342
- }, [o]), R(() => {
343
- f.current && s !== void 0 && (f.current.fitMode = s);
341
+ f.current && h && (f.current.gridConfig = h);
342
+ }, [h]), R(() => {
343
+ f.current && s && (f.current.columns = s);
344
344
  }, [s]), R(() => {
345
+ f.current && o !== void 0 && (f.current.fitMode = o);
346
+ }, [o]), R(() => {
345
347
  f.current && d !== void 0 && (f.current.editOn = d);
346
348
  }, [d]), R(() => {
347
349
  const c = f.current;
348
350
  if (!c) return;
349
- const h = q();
350
- c.__frameworkAdapter = h;
351
+ const p = q();
352
+ c.__frameworkAdapter = p, ee(c, p);
351
353
  let g = !1;
352
354
  const y = requestAnimationFrame(() => {
353
- g || (typeof c.refreshColumns == "function" && c.refreshColumns(), import("@toolbox-web/grid/all").then(({ MasterDetailPlugin: z }) => {
354
- g || te(c, z, h);
355
- }).catch(() => {
356
- }), typeof c.refreshShellHeader == "function" && c.refreshShellHeader());
355
+ g || (typeof c.refreshColumns == "function" && c.refreshColumns(), typeof c.refreshShellHeader == "function" && c.refreshShellHeader());
357
356
  });
358
357
  return () => {
359
358
  g = !0, cancelAnimationFrame(y);
360
359
  };
361
360
  }, []), R(() => {
362
361
  if (!f.current || !u) return;
363
- const c = f.current, h = "react-custom-styles";
362
+ const c = f.current, p = "react-custom-styles";
364
363
  let g = !0;
365
364
  return c.ready?.().then(() => {
366
- g && u && (c.registerStyles?.(h, u), k.current = h);
365
+ g && u && (c.registerStyles?.(p, u), k.current = p);
367
366
  }), () => {
368
367
  g = !1, k.current && (c.unregisterStyles?.(k.current), k.current = null);
369
368
  };
370
369
  }, [u]), R(() => {
371
370
  const c = f.current;
372
371
  if (!c) return;
373
- const h = [];
372
+ const p = [];
374
373
  if (m) {
375
374
  const g = ((y) => m(y.detail.rows));
376
- c.addEventListener("rows-change", g), h.push(["rows-change", g]);
375
+ c.addEventListener("rows-change", g), p.push(["rows-change", g]);
377
376
  }
378
377
  if (E) {
379
378
  const g = ((y) => E(y));
380
- c.addEventListener("cell-edit", g), h.push(["cell-edit", g]);
379
+ c.addEventListener("cell-edit", g), p.push(["cell-edit", g]);
381
380
  }
382
381
  if (v) {
383
382
  const g = ((y) => v(y));
384
- c.addEventListener("row-click", g), h.push(["row-click", g]);
383
+ c.addEventListener("row-click", g), p.push(["row-click", g]);
385
384
  }
386
385
  if (D) {
387
386
  const g = ((y) => D(y));
388
- c.addEventListener("column-state-change", g), h.push(["column-state-change", g]);
387
+ c.addEventListener("column-state-change", g), p.push(["column-state-change", g]);
389
388
  }
390
389
  if (I) {
391
390
  const g = ((y) => I(y));
392
- c.addEventListener("sort-change", g), h.push(["sort-change", g]);
391
+ c.addEventListener("sort-change", g), p.push(["sort-change", g]);
393
392
  }
394
393
  return () => {
395
- h.forEach(([g, y]) => {
394
+ p.forEach(([g, y]) => {
396
395
  c.removeEventListener(g, y);
397
396
  });
398
397
  };
399
- }, [m, E, v, D, I]), B(
398
+ }, [m, E, v, D, I]), _(
400
399
  e,
401
400
  () => ({
402
401
  get element() {
@@ -414,8 +413,8 @@ const ae = _(function(t, e) {
414
413
  async toggleGroup(c) {
415
414
  return f.current?.toggleGroup?.(c);
416
415
  },
417
- registerStyles(c, h) {
418
- f.current?.registerStyles?.(c, h);
416
+ registerStyles(c, p) {
417
+ f.current?.registerStyles?.(c, p);
419
418
  },
420
419
  unregisterStyles(c) {
421
420
  f.current?.unregisterStyles?.(c);
@@ -427,8 +426,8 @@ const ae = _(function(t, e) {
427
426
  {
428
427
  ref: (c) => {
429
428
  if (f.current = c, c) {
430
- const h = c;
431
- i && (h.gridConfig = i), r && (h.rows = r), o && (h.columns = o);
429
+ const p = c;
430
+ h && (p.gridConfig = h), r && (p.rows = r), s && (p.columns = s);
432
431
  }
433
432
  },
434
433
  class: l,
@@ -437,14 +436,14 @@ const ae = _(function(t, e) {
437
436
  }
438
437
  );
439
438
  });
440
- function le(n) {
439
+ function ae(n) {
441
440
  const {
442
441
  field: t,
443
442
  header: e,
444
443
  type: r,
445
444
  editable: i,
446
- sortable: o,
447
- resizable: s,
445
+ sortable: s,
446
+ resizable: o,
448
447
  width: d,
449
448
  minWidth: u,
450
449
  hidden: l,
@@ -456,20 +455,20 @@ function le(n) {
456
455
  format: D
457
456
  } = n, I = G(null), f = C(
458
457
  (c) => {
459
- I.current = c, c && (a && U(c, a), m && X(c, m));
458
+ I.current = c, c && (a && Q(c, a), m && U(c, m));
460
459
  },
461
460
  [a, m, t]
462
- ), k = typeof d == "number" ? `${d}px` : d, p = {
461
+ ), k = typeof d == "number" ? `${d}px` : d, h = {
463
462
  field: t,
464
463
  ref: f
465
464
  };
466
- return e !== void 0 && (p.header = e), r !== void 0 && (p.type = r), i !== void 0 && (p.editable = i), o !== void 0 && (p.sortable = o), s !== void 0 && (p.resizable = s), k !== void 0 && (p.width = k), u !== void 0 && (p["min-width"] = u), l !== void 0 && (p.hidden = l), w !== void 0 && (p["lock-visible"] = w), v !== void 0 && (p.multi = v), D && (p["data-has-format"] = "true"), E && (p["data-has-options"] = "true"), /* @__PURE__ */ L("tbw-grid-column", { ...p });
465
+ return e !== void 0 && (h.header = e), r !== void 0 && (h.type = r), i !== void 0 && (h.editable = i), s !== void 0 && (h.sortable = s), o !== void 0 && (h.resizable = o), k !== void 0 && (h.width = k), u !== void 0 && (h["min-width"] = u), l !== void 0 && (h.hidden = l), w !== void 0 && (h["lock-visible"] = w), v !== void 0 && (h.multi = v), D && (h["data-has-format"] = "true"), E && (h["data-has-options"] = "true"), /* @__PURE__ */ L("tbw-grid-column", { ...h });
467
466
  }
468
- function fe({ children: n }) {
467
+ function le({ children: n }) {
469
468
  return /* @__PURE__ */ L("tbw-grid-tool-buttons", { children: n });
470
469
  }
471
- function ge() {
472
- const n = G(null), [t, e] = M(!1), [r, i] = M(null);
470
+ function fe() {
471
+ const n = G(null), [t, e] = x(!1), [r, i] = x(null);
473
472
  R(() => {
474
473
  const a = n.current;
475
474
  if (!a) return;
@@ -487,10 +486,10 @@ function ge() {
487
486
  m = !1;
488
487
  };
489
488
  }, []);
490
- const o = C(async () => {
489
+ const s = C(async () => {
491
490
  const a = n.current;
492
491
  return a ? await a.getConfig?.() ?? null : null;
493
- }, []), s = C(async () => {
492
+ }, []), o = C(async () => {
494
493
  const a = n.current;
495
494
  a && await a.forceLayout?.();
496
495
  }, []), d = C(async (a) => {
@@ -505,37 +504,37 @@ function ge() {
505
504
  ref: n,
506
505
  isReady: t,
507
506
  config: r,
508
- getConfig: o,
509
- forceLayout: s,
507
+ getConfig: s,
508
+ forceLayout: o,
510
509
  toggleGroup: d,
511
510
  registerStyles: u,
512
511
  unregisterStyles: l,
513
512
  getVisibleColumns: w
514
513
  };
515
514
  }
516
- function me(n, t, e, r = []) {
515
+ function ge(n, t, e, r = []) {
517
516
  const i = G(e);
518
517
  R(() => {
519
518
  i.current = e;
520
519
  }, [e, ...r]), R(() => {
521
- const o = n.current, s = o && "element" in o ? o.element : o;
522
- if (!s) return;
520
+ const s = n.current, o = s && "element" in s ? s.element : s;
521
+ if (!o) return;
523
522
  const d = ((u) => {
524
523
  i.current(u);
525
524
  });
526
- return s.addEventListener(t, d), () => {
527
- s.removeEventListener(t, d);
525
+ return o.addEventListener(t, d), () => {
526
+ o.removeEventListener(t, d);
528
527
  };
529
528
  }, [n, t]);
530
529
  }
531
530
  export {
532
- ae as DataGrid,
533
- le as GridColumn,
534
- ce as GridDetailPanel,
535
- fe as GridToolButtons,
536
- de as GridToolPanel,
537
- ee as ReactGridAdapter,
538
- ue as getRegisteredFields,
539
- ge as useGrid,
540
- me as useGridEvent
531
+ ue as DataGrid,
532
+ ae as GridColumn,
533
+ se as GridDetailPanel,
534
+ le as GridToolButtons,
535
+ ce as GridToolPanel,
536
+ Z as ReactGridAdapter,
537
+ de as getRegisteredFields,
538
+ fe as useGrid,
539
+ ge as useGridEvent
541
540
  };
@@ -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,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,EAA+D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACpG,OAAO,aAAa,CAAC;AAErB,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAwFrF;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,IAAI,GAAG,OAAO;IAC3C,0BAA0B;IAC1B,IAAI,EAAE,IAAI,EAAE,CAAC;IACb;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IACnC,6DAA6D;IAC7D,OAAO,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAC/B,iCAAiC;IACjC,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;IACjD,wBAAwB;IACxB,MAAM,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IACvC,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,oEAAoE;IACpE,QAAQ,CAAC,EAAE,SAAS,CAAC;IAGrB,sDAAsD;IACtD,YAAY,CAAC,EAAE,CAAC,IAAI,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AAC,CAAC;IACrD,oCAAoC;IACpC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,mCAAmC;IACnC,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,yBAAyB;IACzB,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,6BAA6B;IAC7B,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,+BAA+B;IAC/B,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,eAAO,MAAM,QAAQ,EAuOf,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/package.json CHANGED
@@ -1,50 +1,50 @@
1
- {
2
- "name": "@toolbox-web/grid-react",
3
- "version": "0.0.2",
4
- "description": "React adapter for @toolbox-web/grid data grid component",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- "./package.json": "./package.json",
11
- ".": {
12
- "types": "./dist/index.d.ts",
13
- "import": "./dist/index.js",
14
- "default": "./dist/index.js"
15
- }
16
- },
17
- "keywords": [
18
- "react",
19
- "data-grid",
20
- "web-component",
21
- "toolbox-web"
22
- ],
23
- "license": "MIT",
24
- "author": "Oystein Amundsen",
25
- "repository": {
26
- "type": "git",
27
- "url": "https://github.com/OysteinAmundsen/toolbox.git",
28
- "directory": "libs/grid-react"
29
- },
30
- "homepage": "https://github.com/OysteinAmundsen/toolbox/tree/main/libs/grid-react#readme",
31
- "bugs": {
32
- "url": "https://github.com/OysteinAmundsen/toolbox/issues"
33
- },
34
- "publishConfig": {
35
- "access": "public"
36
- },
37
- "dependencies": {},
38
- "devDependencies": {
39
- "react": "^19.0.0",
40
- "react-dom": "^19.0.0",
41
- "@types/react": "^19.0.0",
42
- "@types/react-dom": "^19.0.0",
43
- "@toolbox-web/grid": ">=0.2.0"
44
- },
45
- "peerDependencies": {
46
- "react": ">=18.0.0",
47
- "react-dom": ">=18.0.0",
48
- "@toolbox-web/grid": ">=0.2.0"
49
- }
50
- }
1
+ {
2
+ "name": "@toolbox-web/grid-react",
3
+ "version": "0.0.4",
4
+ "description": "React adapter for @toolbox-web/grid data grid component",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ "./package.json": "./package.json",
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
17
+ "keywords": [
18
+ "react",
19
+ "data-grid",
20
+ "web-component",
21
+ "toolbox-web"
22
+ ],
23
+ "license": "MIT",
24
+ "author": "Oystein Amundsen",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/OysteinAmundsen/toolbox.git",
28
+ "directory": "libs/grid-react"
29
+ },
30
+ "homepage": "https://github.com/OysteinAmundsen/toolbox/tree/main/libs/grid-react#readme",
31
+ "bugs": {
32
+ "url": "https://github.com/OysteinAmundsen/toolbox/issues"
33
+ },
34
+ "publishConfig": {
35
+ "access": "public"
36
+ },
37
+ "dependencies": {},
38
+ "devDependencies": {
39
+ "react": "^19.0.0",
40
+ "react-dom": "^19.0.0",
41
+ "@types/react": "^19.0.0",
42
+ "@types/react-dom": "^19.0.0",
43
+ "@toolbox-web/grid": ">=0.2.0"
44
+ },
45
+ "peerDependencies": {
46
+ "react": ">=18.0.0",
47
+ "react-dom": ">=18.0.0",
48
+ "@toolbox-web/grid": ">=0.2.0"
49
+ }
50
+ }