@toolbox-web/grid-react 0.0.3 → 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/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,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACtC,wCAA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M,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,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolbox-web/grid-react",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "React adapter for @toolbox-web/grid data grid component",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",