@toolbox-web/grid-react 0.13.0 → 0.13.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/chunks/{data-grid-CGvHh_mp.js → data-grid-O97pdLCY.js} +192 -177
- package/features/export.js +1 -1
- package/features/filtering.js +1 -1
- package/features/print.js +1 -1
- package/features/selection.js +1 -1
- package/features/undo-redo.js +1 -1
- package/index.js +2 -2
- package/lib/react-column-config.d.ts +11 -0
- package/lib/react-column-config.d.ts.map +1 -1
- package/lib/react-grid-adapter.d.ts +2 -0
- package/lib/react-grid-adapter.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { DataGridElement as
|
|
3
|
-
import { createContext as
|
|
1
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { DataGridElement as me } from "@toolbox-web/grid";
|
|
3
|
+
import { createContext as Z, useContext as V, useRef as S, useCallback as Q, useEffect as p, forwardRef as he, useMemo as v, useImperativeHandle as ye, Children as we, isValidElement as ve } from "react";
|
|
4
4
|
import { flushSync as m } from "react-dom";
|
|
5
|
-
import { createRoot as
|
|
6
|
-
import { c as
|
|
7
|
-
function
|
|
5
|
+
import { createRoot as y } from "react-dom/client";
|
|
6
|
+
import { c as Ce } from "./feature-registry-Y3KvnN54.js";
|
|
7
|
+
function Re(n) {
|
|
8
8
|
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return n.toLowerCase() === "id" ? "ID" : n.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").split(" ").filter(Boolean).map(
|
|
10
|
+
function ae(n) {
|
|
11
|
+
return n.toLowerCase() === "id" ? "ID" : n.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").split(" ").filter(Boolean).map(Re).join(" ");
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const be = /* @__PURE__ */ new Set(["string", "number", "boolean", "date", "datetime", "currency"]);
|
|
14
14
|
function Ee(n) {
|
|
15
15
|
const t = n.lastIndexOf(":");
|
|
16
16
|
if (t > 0) {
|
|
17
17
|
const e = n.slice(t + 1).toLowerCase();
|
|
18
|
-
if (
|
|
18
|
+
if (be.has(e)) {
|
|
19
19
|
const r = n.slice(0, t);
|
|
20
20
|
return {
|
|
21
21
|
field: r,
|
|
22
|
-
header:
|
|
22
|
+
header: ae(r),
|
|
23
23
|
type: e
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
return {
|
|
28
28
|
field: n,
|
|
29
|
-
header:
|
|
29
|
+
header: ae(n)
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Pe(n) {
|
|
33
33
|
return n.map((t) => typeof t == "string" ? Ee(t) : t);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const _ = {
|
|
36
36
|
onCellClick: "cell-click",
|
|
37
37
|
onRowClick: "row-click",
|
|
38
38
|
onCellActivate: "cell-activate",
|
|
@@ -57,30 +57,30 @@ const z = {
|
|
|
57
57
|
onExportComplete: "export-complete",
|
|
58
58
|
onPrintStart: "print-start",
|
|
59
59
|
onPrintComplete: "print-complete"
|
|
60
|
-
},
|
|
61
|
-
function
|
|
62
|
-
return V(
|
|
60
|
+
}, X = Z(null), Ye = ({ icons: n, children: t }) => /* @__PURE__ */ b(X.Provider, { value: n, children: t });
|
|
61
|
+
function Ze() {
|
|
62
|
+
return V(X);
|
|
63
63
|
}
|
|
64
|
-
const
|
|
65
|
-
function
|
|
64
|
+
const De = X, W = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new Map();
|
|
65
|
+
function le(n) {
|
|
66
66
|
const t = n.querySelector("tbw-grid-responsive-card");
|
|
67
67
|
if (t) {
|
|
68
|
-
const r =
|
|
68
|
+
const r = W.get(t);
|
|
69
69
|
if (r) return r;
|
|
70
70
|
}
|
|
71
71
|
const e = n.id || n.getAttribute("data-grid-id");
|
|
72
72
|
if (e)
|
|
73
|
-
return
|
|
73
|
+
return q.get(e);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
const { children: t, cardRowHeight: e = "auto" } = n, r = S(null), o =
|
|
75
|
+
function Se(n) {
|
|
76
|
+
const { children: t, cardRowHeight: e = "auto" } = n, r = S(null), o = Q(
|
|
77
77
|
(s) => {
|
|
78
78
|
if (r.current = s, !s) return;
|
|
79
|
-
|
|
79
|
+
W.set(s, t);
|
|
80
80
|
const a = s.closest("tbw-grid");
|
|
81
81
|
if (a) {
|
|
82
82
|
const l = a.id || a.getAttribute("data-grid-id");
|
|
83
|
-
l &&
|
|
83
|
+
l && q.set(l, t);
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
[t]
|
|
@@ -88,27 +88,39 @@ function De(n) {
|
|
|
88
88
|
p(() => () => {
|
|
89
89
|
const s = r.current;
|
|
90
90
|
if (s) {
|
|
91
|
-
|
|
91
|
+
W.delete(s);
|
|
92
92
|
const a = s.closest("tbw-grid");
|
|
93
93
|
if (a) {
|
|
94
94
|
const l = a.id || a.getAttribute("data-grid-id");
|
|
95
|
-
l &&
|
|
95
|
+
l && q.delete(l);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}, []);
|
|
99
99
|
const c = e === "auto" ? "auto" : String(e);
|
|
100
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ b("tbw-grid-responsive-card", { ref: o, cardRowHeight: c });
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
function
|
|
105
|
-
return V(
|
|
102
|
+
Se.displayName = "GridResponsiveCard";
|
|
103
|
+
const T = Z(null), Qe = ({ defaults: n, children: t }) => /* @__PURE__ */ b(T.Provider, { value: n, children: t });
|
|
104
|
+
function Xe() {
|
|
105
|
+
return V(T);
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
return V(
|
|
107
|
+
function et(n) {
|
|
108
|
+
return V(T)?.[n];
|
|
109
|
+
}
|
|
110
|
+
const xe = T, I = [];
|
|
111
|
+
function Ae(n) {
|
|
112
|
+
for (let t = I.length - 1; t >= 0; t--) {
|
|
113
|
+
const e = I[t];
|
|
114
|
+
if (n.contains(e.container) && e.container.classList.contains("react-cell-editor")) {
|
|
115
|
+
try {
|
|
116
|
+
e.root.unmount();
|
|
117
|
+
} catch {
|
|
118
|
+
}
|
|
119
|
+
I.splice(t, 1);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
109
122
|
}
|
|
110
|
-
|
|
111
|
-
function xe(n) {
|
|
123
|
+
function Ge(n) {
|
|
112
124
|
const t = /* @__PURE__ */ new WeakMap();
|
|
113
125
|
return (e) => {
|
|
114
126
|
const r = e.cellEl;
|
|
@@ -121,54 +133,54 @@ function xe(n) {
|
|
|
121
133
|
}
|
|
122
134
|
const o = document.createElement("div");
|
|
123
135
|
o.className = "react-cell-renderer", o.style.display = "contents";
|
|
124
|
-
const c =
|
|
136
|
+
const c = y(o);
|
|
125
137
|
return m(() => {
|
|
126
138
|
c.render(n(e));
|
|
127
|
-
}), r && t.set(r, { root: c, container: o }), o;
|
|
139
|
+
}), r && t.set(r, { root: c, container: o }), I.push({ root: c, container: o }), o;
|
|
128
140
|
};
|
|
129
141
|
}
|
|
130
|
-
function
|
|
142
|
+
function Ie(n) {
|
|
131
143
|
return (t) => {
|
|
132
144
|
const e = document.createElement("div");
|
|
133
145
|
e.className = "react-cell-editor", e.style.display = "contents";
|
|
134
|
-
const r =
|
|
146
|
+
const r = y(e);
|
|
135
147
|
return m(() => {
|
|
136
148
|
r.render(n(t));
|
|
137
|
-
}), e;
|
|
149
|
+
}), I.push({ root: r, container: e }), e;
|
|
138
150
|
};
|
|
139
151
|
}
|
|
140
|
-
function
|
|
152
|
+
function Ve(n) {
|
|
141
153
|
if (!n) return;
|
|
142
154
|
if (!n.columns) return n;
|
|
143
155
|
const t = n.columns.map((e) => {
|
|
144
156
|
const { renderer: r, editor: o, ...c } = e, s = { ...c };
|
|
145
|
-
return r && (s.renderer =
|
|
157
|
+
return r && (s.renderer = Ge(r)), o && (s.editor = Ie(o)), s;
|
|
146
158
|
});
|
|
147
159
|
return {
|
|
148
160
|
...n,
|
|
149
161
|
columns: t
|
|
150
162
|
};
|
|
151
163
|
}
|
|
152
|
-
const
|
|
153
|
-
function
|
|
164
|
+
const B = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new Map();
|
|
165
|
+
function Ne(n) {
|
|
154
166
|
const t = n.querySelector("tbw-grid-detail");
|
|
155
167
|
if (t) {
|
|
156
|
-
const r =
|
|
168
|
+
const r = B.get(t);
|
|
157
169
|
if (r) return r;
|
|
158
170
|
}
|
|
159
171
|
const e = n.id || n.getAttribute("data-grid-id");
|
|
160
172
|
if (e)
|
|
161
|
-
return
|
|
173
|
+
return K.get(e);
|
|
162
174
|
}
|
|
163
|
-
function
|
|
164
|
-
const { children: t, showExpandColumn: e = !0, animation: r = "slide" } = n, o = S(null), c =
|
|
175
|
+
function Le(n) {
|
|
176
|
+
const { children: t, showExpandColumn: e = !0, animation: r = "slide" } = n, o = S(null), c = Q(
|
|
165
177
|
(a) => {
|
|
166
178
|
if (o.current = a, !a) return;
|
|
167
|
-
|
|
179
|
+
B.set(a, t);
|
|
168
180
|
const l = a.closest("tbw-grid");
|
|
169
181
|
if (l) {
|
|
170
182
|
const g = l.id || l.getAttribute("data-grid-id");
|
|
171
|
-
g &&
|
|
183
|
+
g && K.set(g, t);
|
|
172
184
|
}
|
|
173
185
|
},
|
|
174
186
|
[t]
|
|
@@ -176,16 +188,16 @@ function Ie(n) {
|
|
|
176
188
|
return p(() => () => {
|
|
177
189
|
const a = o.current;
|
|
178
190
|
if (a) {
|
|
179
|
-
|
|
191
|
+
B.delete(a);
|
|
180
192
|
const l = a.closest("tbw-grid");
|
|
181
193
|
if (l) {
|
|
182
194
|
const w = l.id || l.getAttribute("data-grid-id");
|
|
183
|
-
w &&
|
|
195
|
+
w && K.delete(w);
|
|
184
196
|
}
|
|
185
197
|
const g = a.parentNode;
|
|
186
198
|
g && g.contains(a);
|
|
187
199
|
}
|
|
188
|
-
}, []), /* @__PURE__ */
|
|
200
|
+
}, []), /* @__PURE__ */ b(
|
|
189
201
|
"tbw-grid-detail",
|
|
190
202
|
{
|
|
191
203
|
ref: c,
|
|
@@ -194,26 +206,26 @@ function Ie(n) {
|
|
|
194
206
|
}
|
|
195
207
|
);
|
|
196
208
|
}
|
|
197
|
-
|
|
198
|
-
const
|
|
199
|
-
function
|
|
200
|
-
const t =
|
|
209
|
+
Le.displayName = "GridDetailPanel";
|
|
210
|
+
const U = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new Map();
|
|
211
|
+
function Fe(n) {
|
|
212
|
+
const t = U.get(n);
|
|
201
213
|
if (t) return t;
|
|
202
214
|
const e = n.id;
|
|
203
215
|
if (e)
|
|
204
|
-
return
|
|
216
|
+
return J.get(e);
|
|
205
217
|
}
|
|
206
|
-
function
|
|
207
|
-
const { id: t, title: e, icon: r, tooltip: o, order: c = 100, children: s } = n, a = S(null), l =
|
|
218
|
+
function tt(n) {
|
|
219
|
+
const { id: t, title: e, icon: r, tooltip: o, order: c = 100, children: s } = n, a = S(null), l = Q(
|
|
208
220
|
(g) => {
|
|
209
|
-
a.current = g, g && (
|
|
221
|
+
a.current = g, g && (U.set(g, s), t && J.set(t, s));
|
|
210
222
|
},
|
|
211
223
|
[s, t]
|
|
212
224
|
);
|
|
213
225
|
return p(() => () => {
|
|
214
226
|
const g = a.current;
|
|
215
|
-
g && (
|
|
216
|
-
}, [t]), /* @__PURE__ */
|
|
227
|
+
g && (U.delete(g), t && J.delete(t));
|
|
228
|
+
}, [t]), /* @__PURE__ */ b(
|
|
217
229
|
"tbw-grid-tool-panel",
|
|
218
230
|
{
|
|
219
231
|
ref: l,
|
|
@@ -225,38 +237,38 @@ function Xe(n) {
|
|
|
225
237
|
}
|
|
226
238
|
);
|
|
227
239
|
}
|
|
228
|
-
const R = /* @__PURE__ */ new WeakMap(),
|
|
229
|
-
function
|
|
240
|
+
const R = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new Map();
|
|
241
|
+
function rt(n, t) {
|
|
230
242
|
const e = n.getAttribute("field"), r = R.get(n) ?? {};
|
|
231
243
|
if (r.renderer = t, R.set(n, r), e) {
|
|
232
|
-
const o =
|
|
233
|
-
o.renderer = t,
|
|
244
|
+
const o = E.get(e) ?? {};
|
|
245
|
+
o.renderer = t, E.set(e, o);
|
|
234
246
|
}
|
|
235
247
|
}
|
|
236
|
-
function
|
|
248
|
+
function nt(n, t) {
|
|
237
249
|
const e = n.getAttribute("field"), r = R.get(n) ?? {};
|
|
238
250
|
if (r.editor = t, R.set(n, r), e) {
|
|
239
|
-
const o =
|
|
240
|
-
o.editor = t,
|
|
251
|
+
const o = E.get(e) ?? {};
|
|
252
|
+
o.editor = t, E.set(e, o);
|
|
241
253
|
}
|
|
242
254
|
}
|
|
243
|
-
function
|
|
255
|
+
function Te(n) {
|
|
244
256
|
let t = R.get(n)?.renderer;
|
|
245
257
|
if (!t) {
|
|
246
258
|
const e = n.getAttribute("field");
|
|
247
|
-
e && (t =
|
|
259
|
+
e && (t = E.get(e)?.renderer);
|
|
248
260
|
}
|
|
249
261
|
return t;
|
|
250
262
|
}
|
|
251
|
-
function
|
|
263
|
+
function ke(n) {
|
|
252
264
|
let t = R.get(n)?.editor;
|
|
253
265
|
if (!t) {
|
|
254
266
|
const e = n.getAttribute("field");
|
|
255
|
-
e && (t =
|
|
267
|
+
e && (t = E.get(e)?.editor);
|
|
256
268
|
}
|
|
257
269
|
return t;
|
|
258
270
|
}
|
|
259
|
-
class
|
|
271
|
+
class ue {
|
|
260
272
|
mountedViews = [];
|
|
261
273
|
/** Editor-specific views tracked separately for per-cell cleanup via releaseCell. */
|
|
262
274
|
editorViews = [];
|
|
@@ -278,7 +290,7 @@ class le {
|
|
|
278
290
|
const e = t.getAttribute("field");
|
|
279
291
|
let r = R.get(t);
|
|
280
292
|
if (!r && e) {
|
|
281
|
-
const s =
|
|
293
|
+
const s = E.get(e);
|
|
282
294
|
s && (s.renderer || s.editor) && (r = s, R.set(t, r));
|
|
283
295
|
}
|
|
284
296
|
const o = r?.renderer !== void 0, c = r?.editor !== void 0;
|
|
@@ -296,7 +308,7 @@ class le {
|
|
|
296
308
|
* allowing the grid to use its default rendering.
|
|
297
309
|
*/
|
|
298
310
|
createRenderer(t) {
|
|
299
|
-
const e =
|
|
311
|
+
const e = Te(t);
|
|
300
312
|
if (!e)
|
|
301
313
|
return;
|
|
302
314
|
const r = /* @__PURE__ */ new WeakMap();
|
|
@@ -310,14 +322,14 @@ class le {
|
|
|
310
322
|
}), l.container;
|
|
311
323
|
const g = document.createElement("div");
|
|
312
324
|
g.className = "react-cell-renderer", g.style.display = "contents";
|
|
313
|
-
const w =
|
|
325
|
+
const w = y(g);
|
|
314
326
|
return m(() => {
|
|
315
327
|
w.render(e(o));
|
|
316
328
|
}), r.set(c, { root: w, container: g, lastRowIndex: o.rowIndex ?? -1 }), this.mountedViews.push({ root: w, container: g }), g;
|
|
317
329
|
}
|
|
318
330
|
const s = document.createElement("div");
|
|
319
331
|
s.className = "react-cell-renderer", s.style.display = "contents";
|
|
320
|
-
const a =
|
|
332
|
+
const a = y(s);
|
|
321
333
|
return m(() => {
|
|
322
334
|
a.render(e(o));
|
|
323
335
|
}), this.mountedViews.push({ root: a, container: s }), s;
|
|
@@ -328,11 +340,11 @@ class le {
|
|
|
328
340
|
* with commit/cancel callbacks passed as props.
|
|
329
341
|
*/
|
|
330
342
|
createEditor(t) {
|
|
331
|
-
const e =
|
|
343
|
+
const e = ke(t);
|
|
332
344
|
return e ? (r) => {
|
|
333
345
|
const o = document.createElement("div");
|
|
334
346
|
o.className = "react-cell-editor", o.style.display = "contents";
|
|
335
|
-
const c =
|
|
347
|
+
const c = y(o);
|
|
336
348
|
return m(() => {
|
|
337
349
|
c.render(e(r));
|
|
338
350
|
}), this.editorViews.push({ root: c, container: o }), o;
|
|
@@ -343,12 +355,12 @@ class le {
|
|
|
343
355
|
* Renders React components for expandable detail rows.
|
|
344
356
|
*/
|
|
345
357
|
createDetailRenderer(t) {
|
|
346
|
-
const e =
|
|
358
|
+
const e = Ne(t);
|
|
347
359
|
if (e)
|
|
348
360
|
return (r, o) => {
|
|
349
361
|
const c = document.createElement("div");
|
|
350
362
|
c.className = "react-detail-panel";
|
|
351
|
-
const s = { row: r, rowIndex: o }, a =
|
|
363
|
+
const s = { row: r, rowIndex: o }, a = y(c);
|
|
352
364
|
return m(() => {
|
|
353
365
|
a.render(e(s));
|
|
354
366
|
}), this.mountedViews.push({ root: a, container: c }), c;
|
|
@@ -368,12 +380,12 @@ class le {
|
|
|
368
380
|
* Renders React components for card layout in responsive mode.
|
|
369
381
|
*/
|
|
370
382
|
createResponsiveCardRenderer(t) {
|
|
371
|
-
const e =
|
|
383
|
+
const e = le(t);
|
|
372
384
|
if (e)
|
|
373
385
|
return (r, o) => {
|
|
374
386
|
const c = document.createElement("div");
|
|
375
387
|
c.className = "react-responsive-card";
|
|
376
|
-
const s = { row: r, index: o }, a =
|
|
388
|
+
const s = { row: r, index: o }, a = y(c);
|
|
377
389
|
return m(() => {
|
|
378
390
|
a.render(e(s));
|
|
379
391
|
}), this.mountedViews.push({ root: a, container: c }), c;
|
|
@@ -384,14 +396,14 @@ class le {
|
|
|
384
396
|
* Renders React components into tool panel containers.
|
|
385
397
|
*/
|
|
386
398
|
createToolPanelRenderer(t) {
|
|
387
|
-
const e =
|
|
399
|
+
const e = Fe(t);
|
|
388
400
|
if (!e)
|
|
389
401
|
return;
|
|
390
402
|
const r = t.closest("tbw-grid");
|
|
391
403
|
return (o) => {
|
|
392
404
|
const c = {
|
|
393
405
|
grid: r ?? o
|
|
394
|
-
}, s =
|
|
406
|
+
}, s = y(o);
|
|
395
407
|
return m(() => {
|
|
396
408
|
s.render(e(c));
|
|
397
409
|
}), this.mountedViews.push({ root: s, container: o }), () => {
|
|
@@ -450,7 +462,7 @@ class le {
|
|
|
450
462
|
return (e) => {
|
|
451
463
|
const r = document.createElement("span");
|
|
452
464
|
r.style.display = "contents";
|
|
453
|
-
const o =
|
|
465
|
+
const o = y(r);
|
|
454
466
|
return this.mountedViews.push({ root: o, container: r }), m(() => {
|
|
455
467
|
o.render(t(e));
|
|
456
468
|
}), r;
|
|
@@ -464,7 +476,7 @@ class le {
|
|
|
464
476
|
return (e) => {
|
|
465
477
|
const r = document.createElement("span");
|
|
466
478
|
r.style.display = "contents";
|
|
467
|
-
const o =
|
|
479
|
+
const o = y(r);
|
|
468
480
|
return this.editorViews.push({ root: o, container: r }), m(() => {
|
|
469
481
|
o.render(t(e));
|
|
470
482
|
}), r;
|
|
@@ -478,7 +490,7 @@ class le {
|
|
|
478
490
|
return (e, r) => {
|
|
479
491
|
const o = document.createElement("div");
|
|
480
492
|
o.style.display = "contents";
|
|
481
|
-
const c =
|
|
493
|
+
const c = y(o);
|
|
482
494
|
this.mountedViews.push({ root: c, container: o }), m(() => {
|
|
483
495
|
c.render(t(r));
|
|
484
496
|
}), e.appendChild(o);
|
|
@@ -504,6 +516,8 @@ class le {
|
|
|
504
516
|
/**
|
|
505
517
|
* Called when a cell's content is about to be wiped.
|
|
506
518
|
* Destroys editor React roots whose container is inside the cell.
|
|
519
|
+
* Also cleans up config-based editor roots (from processGridConfig/wrapReactEditor)
|
|
520
|
+
* that bypass the adapter's tracking arrays.
|
|
507
521
|
*/
|
|
508
522
|
releaseCell(t) {
|
|
509
523
|
for (let e = this.editorViews.length - 1; e >= 0; e--) {
|
|
@@ -516,6 +530,7 @@ class le {
|
|
|
516
530
|
this.editorViews.splice(e, 1);
|
|
517
531
|
}
|
|
518
532
|
}
|
|
533
|
+
Ae(t);
|
|
519
534
|
}
|
|
520
535
|
/**
|
|
521
536
|
* Unmount a specific container (called when cell is recycled).
|
|
@@ -532,14 +547,14 @@ class le {
|
|
|
532
547
|
}
|
|
533
548
|
}
|
|
534
549
|
}
|
|
535
|
-
const
|
|
550
|
+
const ot = ue, Me = {
|
|
536
551
|
undoRedo: ["editing"],
|
|
537
552
|
clipboard: ["selection"]
|
|
538
553
|
};
|
|
539
|
-
function
|
|
554
|
+
function Oe(n) {
|
|
540
555
|
const t = new Set(n);
|
|
541
556
|
for (const e of n) {
|
|
542
|
-
const r =
|
|
557
|
+
const r = Me[e];
|
|
543
558
|
if (r)
|
|
544
559
|
for (const o of r)
|
|
545
560
|
t.has(o) || console.warn(
|
|
@@ -547,7 +562,7 @@ function ke(n) {
|
|
|
547
562
|
);
|
|
548
563
|
}
|
|
549
564
|
}
|
|
550
|
-
function
|
|
565
|
+
function je(n) {
|
|
551
566
|
const t = [], e = [], r = { ...n };
|
|
552
567
|
r.multiSort !== void 0 ? delete r.sorting : r.sorting !== void 0 && (r.multiSort = r.sorting, delete r.sorting);
|
|
553
568
|
for (const [s, a] of Object.entries(r)) {
|
|
@@ -555,7 +570,7 @@ function Me(n) {
|
|
|
555
570
|
const l = s;
|
|
556
571
|
e.push(l);
|
|
557
572
|
}
|
|
558
|
-
|
|
573
|
+
Oe(e);
|
|
559
574
|
const o = [
|
|
560
575
|
"selection",
|
|
561
576
|
"editing",
|
|
@@ -565,34 +580,34 @@ function Me(n) {
|
|
|
565
580
|
for (const s of c) {
|
|
566
581
|
const a = n[s];
|
|
567
582
|
if (a === void 0 || a === !1) continue;
|
|
568
|
-
const l =
|
|
583
|
+
const l = Ce(s, a);
|
|
569
584
|
l && t.push(l);
|
|
570
585
|
}
|
|
571
586
|
return t;
|
|
572
587
|
}
|
|
573
|
-
let
|
|
574
|
-
function
|
|
575
|
-
return
|
|
588
|
+
let de = !1, $ = null;
|
|
589
|
+
function Y() {
|
|
590
|
+
return de || ($ = new ue(), me.registerAdapter($), de = !0), $;
|
|
576
591
|
}
|
|
577
|
-
|
|
578
|
-
const
|
|
579
|
-
function
|
|
592
|
+
Y();
|
|
593
|
+
const He = Z(null);
|
|
594
|
+
function ze(n) {
|
|
580
595
|
const e = n.getPluginByName?.("masterDetail");
|
|
581
596
|
e && typeof e.refreshDetailRenderer == "function" && e.refreshDetailRenderer();
|
|
582
597
|
}
|
|
583
|
-
function
|
|
598
|
+
function _e(n, t) {
|
|
584
599
|
const e = n;
|
|
585
|
-
if (!n.querySelector("tbw-grid-responsive-card") || !
|
|
600
|
+
if (!n.querySelector("tbw-grid-responsive-card") || !le(n)) return;
|
|
586
601
|
const c = e.getPluginByName?.("responsive");
|
|
587
602
|
if (c && typeof c.setCardRenderer == "function") {
|
|
588
603
|
const s = t.createResponsiveCardRenderer(n);
|
|
589
604
|
s && c.setCardRenderer(s);
|
|
590
605
|
}
|
|
591
606
|
}
|
|
592
|
-
function
|
|
607
|
+
function $e(n) {
|
|
593
608
|
const t = {};
|
|
594
|
-
return
|
|
595
|
-
if (
|
|
609
|
+
return we.forEach(n, (e) => {
|
|
610
|
+
if (ve(e)) {
|
|
596
611
|
if (e.type && e.type.displayName === "GridDetailPanel") {
|
|
597
612
|
const r = e.props;
|
|
598
613
|
t.masterDetail = {
|
|
@@ -606,7 +621,7 @@ function ze(n) {
|
|
|
606
621
|
}
|
|
607
622
|
}), t;
|
|
608
623
|
}
|
|
609
|
-
const
|
|
624
|
+
const it = he(function(t, e) {
|
|
610
625
|
const {
|
|
611
626
|
// Core props
|
|
612
627
|
rows: r,
|
|
@@ -617,21 +632,21 @@ const nt = me(function(t, e) {
|
|
|
617
632
|
sortable: l,
|
|
618
633
|
filterable: g,
|
|
619
634
|
selectable: w,
|
|
620
|
-
loading:
|
|
621
|
-
editOn:
|
|
622
|
-
customStyles:
|
|
623
|
-
className:
|
|
624
|
-
style:
|
|
625
|
-
children:
|
|
635
|
+
loading: k,
|
|
636
|
+
editOn: M,
|
|
637
|
+
customStyles: N,
|
|
638
|
+
className: fe,
|
|
639
|
+
style: ge,
|
|
640
|
+
children: O,
|
|
626
641
|
// Plugin props
|
|
627
642
|
plugins: P,
|
|
628
643
|
// SSR mode
|
|
629
|
-
ssr:
|
|
644
|
+
ssr: ee,
|
|
630
645
|
// Legacy event handlers
|
|
631
|
-
onRowsChange:
|
|
646
|
+
onRowsChange: j,
|
|
632
647
|
// Feature props and event props are in ...rest
|
|
633
648
|
...C
|
|
634
|
-
} = t, u = S(null),
|
|
649
|
+
} = t, u = S(null), L = S(null), te = V(xe), H = V(De), re = [
|
|
635
650
|
"selection",
|
|
636
651
|
"editing",
|
|
637
652
|
"filtering",
|
|
@@ -656,36 +671,36 @@ const nt = me(function(t, e) {
|
|
|
656
671
|
"print",
|
|
657
672
|
"pivot",
|
|
658
673
|
"serverSide"
|
|
659
|
-
],
|
|
674
|
+
], pe = v(() => re.map((i) => {
|
|
660
675
|
const d = C[i];
|
|
661
676
|
return d !== void 0 ? `${i}:${JSON.stringify(d)}` : "";
|
|
662
|
-
}).filter(Boolean).join("|"), [C]),
|
|
677
|
+
}).filter(Boolean).join("|"), [C]), ne = v(() => {
|
|
663
678
|
const i = {};
|
|
664
|
-
for (const d of
|
|
679
|
+
for (const d of re)
|
|
665
680
|
d in C && C[d] !== void 0 && (i[d] = C[d]);
|
|
666
681
|
return i;
|
|
667
|
-
}, [
|
|
682
|
+
}, [pe]), oe = v(() => $e(O), [O]), ie = v(() => ({ ...oe, ...ne }), [ne, oe]), z = v(() => P || ee ? [] : je(ie), [ie, P, ee]), x = v(() => {
|
|
668
683
|
if (P) {
|
|
669
|
-
const i = new Set(P.map((f) => f.name)), d =
|
|
684
|
+
const i = new Set(P.map((f) => f.name)), d = z.filter((f) => !i.has(f.name));
|
|
670
685
|
return [...P, ...d];
|
|
671
686
|
}
|
|
672
|
-
return
|
|
673
|
-
}, [P,
|
|
687
|
+
return z;
|
|
688
|
+
}, [P, z]), A = v(() => {
|
|
674
689
|
if (!c) return c;
|
|
675
|
-
const i =
|
|
690
|
+
const i = Pe(c);
|
|
676
691
|
return s ? i.map((d) => ({
|
|
677
692
|
...s,
|
|
678
693
|
...d
|
|
679
694
|
// Individual column props override defaults
|
|
680
695
|
})) : i;
|
|
681
696
|
}, [c, s]), G = v(() => {
|
|
682
|
-
const i =
|
|
683
|
-
if (l !== void 0 && (d.sortable = l), g !== void 0 && (d.filterable = g), w !== void 0 && (d.selectable = w),
|
|
697
|
+
const i = Ve(o), d = {};
|
|
698
|
+
if (l !== void 0 && (d.sortable = l), g !== void 0 && (d.filterable = g), w !== void 0 && (d.selectable = w), H) {
|
|
684
699
|
const f = i?.icons || o?.icons || {};
|
|
685
|
-
d.icons = { ...
|
|
700
|
+
d.icons = { ...H, ...f };
|
|
686
701
|
}
|
|
687
702
|
if (x.length > 0 && i) {
|
|
688
|
-
const f = i.plugins || [],
|
|
703
|
+
const f = i.plugins || [], h = new Set(f.map((D) => D.name)), F = x.filter((D) => !h.has(D.name));
|
|
689
704
|
return {
|
|
690
705
|
...i,
|
|
691
706
|
...d,
|
|
@@ -693,10 +708,10 @@ const nt = me(function(t, e) {
|
|
|
693
708
|
};
|
|
694
709
|
}
|
|
695
710
|
return x.length > 0 && !i ? { ...d, plugins: x } : Object.keys(d).length > 0 ? { ...i, ...d } : i;
|
|
696
|
-
}, [o, x, l, g, w,
|
|
711
|
+
}, [o, x, l, g, w, H]);
|
|
697
712
|
p(() => {
|
|
698
|
-
|
|
699
|
-
}, [
|
|
713
|
+
Y().setTypeDefaults(te);
|
|
714
|
+
}, [te]), p(() => {
|
|
700
715
|
u.current && (u.current.rows = r);
|
|
701
716
|
}, [r]), p(() => {
|
|
702
717
|
u.current && G && (u.current.gridConfig = G);
|
|
@@ -705,64 +720,64 @@ const nt = me(function(t, e) {
|
|
|
705
720
|
}, [A]), p(() => {
|
|
706
721
|
u.current && a !== void 0 && (u.current.fitMode = a);
|
|
707
722
|
}, [a]), p(() => {
|
|
708
|
-
u.current &&
|
|
723
|
+
u.current && M !== void 0 && (u.current.editOn = M);
|
|
724
|
+
}, [M]), p(() => {
|
|
725
|
+
u.current && k !== void 0 && (u.current.loading = k);
|
|
709
726
|
}, [k]), p(() => {
|
|
710
|
-
u.current && T !== void 0 && (u.current.loading = T);
|
|
711
|
-
}, [T]), p(() => {
|
|
712
727
|
const i = u.current;
|
|
713
728
|
if (!i) return;
|
|
714
|
-
const d =
|
|
715
|
-
i.__frameworkAdapter = d,
|
|
729
|
+
const d = Y();
|
|
730
|
+
i.__frameworkAdapter = d, ze(i), _e(i, d);
|
|
716
731
|
let f = !1;
|
|
717
|
-
const
|
|
732
|
+
const h = requestAnimationFrame(() => {
|
|
718
733
|
f || (typeof i.refreshColumns == "function" && i.refreshColumns(), typeof i.refreshShellHeader == "function" && i.refreshShellHeader());
|
|
719
734
|
});
|
|
720
735
|
return () => {
|
|
721
|
-
f = !0, cancelAnimationFrame(
|
|
736
|
+
f = !0, cancelAnimationFrame(h);
|
|
722
737
|
};
|
|
723
738
|
}, []), p(() => {
|
|
724
|
-
if (!u.current || !
|
|
739
|
+
if (!u.current || !N) return;
|
|
725
740
|
const i = u.current, d = "react-custom-styles";
|
|
726
741
|
let f = !0;
|
|
727
742
|
return i.ready?.().then(() => {
|
|
728
|
-
f &&
|
|
743
|
+
f && N && (i.registerStyles?.(d, N), L.current = d);
|
|
729
744
|
}), () => {
|
|
730
|
-
f = !1,
|
|
745
|
+
f = !1, L.current && (i.unregisterStyles?.(L.current), L.current = null);
|
|
731
746
|
};
|
|
732
|
-
}, [
|
|
747
|
+
}, [N]), p(() => {
|
|
733
748
|
const i = u.current;
|
|
734
749
|
if (!i) return;
|
|
735
750
|
const d = [];
|
|
736
|
-
if (
|
|
737
|
-
const f = ((
|
|
751
|
+
if (j) {
|
|
752
|
+
const f = ((h) => j(h.detail.rows));
|
|
738
753
|
i.addEventListener("rows-change", f), d.push(["rows-change", f]);
|
|
739
754
|
}
|
|
740
755
|
return () => {
|
|
741
|
-
d.forEach(([f,
|
|
742
|
-
i.removeEventListener(f,
|
|
756
|
+
d.forEach(([f, h]) => {
|
|
757
|
+
i.removeEventListener(f, h);
|
|
743
758
|
});
|
|
744
759
|
};
|
|
745
|
-
}, [
|
|
746
|
-
const
|
|
747
|
-
for (const i of Object.keys(
|
|
748
|
-
|
|
760
|
+
}, [j]);
|
|
761
|
+
const se = v(() => Object.keys(_).filter((i) => typeof C[i] == "function").sort().join("|"), [C]), ce = S({});
|
|
762
|
+
for (const i of Object.keys(_))
|
|
763
|
+
ce.current[i] = C[i];
|
|
749
764
|
return p(() => {
|
|
750
765
|
const i = u.current;
|
|
751
766
|
if (!i) return;
|
|
752
767
|
const d = [];
|
|
753
|
-
for (const [f,
|
|
754
|
-
if (
|
|
768
|
+
for (const [f, h] of Object.entries(_))
|
|
769
|
+
if (se.includes(f)) {
|
|
755
770
|
const F = ((D) => {
|
|
756
|
-
|
|
771
|
+
ce.current[f]?.(D.detail, D);
|
|
757
772
|
});
|
|
758
|
-
i.addEventListener(
|
|
773
|
+
i.addEventListener(h, F), d.push([h, F]);
|
|
759
774
|
}
|
|
760
775
|
return () => {
|
|
761
|
-
d.forEach(([f,
|
|
762
|
-
i.removeEventListener(f,
|
|
776
|
+
d.forEach(([f, h]) => {
|
|
777
|
+
i.removeEventListener(f, h);
|
|
763
778
|
});
|
|
764
779
|
};
|
|
765
|
-
}, [
|
|
780
|
+
}, [se]), ye(
|
|
766
781
|
e,
|
|
767
782
|
() => ({
|
|
768
783
|
get element() {
|
|
@@ -803,7 +818,7 @@ const nt = me(function(t, e) {
|
|
|
803
818
|
}
|
|
804
819
|
}),
|
|
805
820
|
[]
|
|
806
|
-
), /* @__PURE__ */
|
|
821
|
+
), /* @__PURE__ */ b(
|
|
807
822
|
"tbw-grid",
|
|
808
823
|
{
|
|
809
824
|
ref: (i) => {
|
|
@@ -812,25 +827,25 @@ const nt = me(function(t, e) {
|
|
|
812
827
|
G && (d.gridConfig = G), r && (d.rows = r), A && (d.columns = A);
|
|
813
828
|
}
|
|
814
829
|
},
|
|
815
|
-
class:
|
|
816
|
-
style:
|
|
817
|
-
children: /* @__PURE__ */
|
|
830
|
+
class: fe,
|
|
831
|
+
style: ge,
|
|
832
|
+
children: /* @__PURE__ */ b(He.Provider, { value: u, children: O })
|
|
818
833
|
}
|
|
819
834
|
);
|
|
820
835
|
});
|
|
821
836
|
export {
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
837
|
+
it as D,
|
|
838
|
+
He as G,
|
|
839
|
+
ot as R,
|
|
840
|
+
nt as a,
|
|
841
|
+
Qe as b,
|
|
842
|
+
Ye as c,
|
|
843
|
+
Le as d,
|
|
844
|
+
Se as e,
|
|
845
|
+
tt as f,
|
|
846
|
+
et as g,
|
|
847
|
+
Ze as h,
|
|
848
|
+
ue as i,
|
|
849
|
+
rt as r,
|
|
850
|
+
Xe as u
|
|
836
851
|
};
|
package/features/export.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExportPlugin as p } from "@toolbox-web/grid/plugins/export";
|
|
2
2
|
import { useContext as a, useCallback as n } from "react";
|
|
3
|
-
import { G as c } from "../chunks/data-grid-
|
|
3
|
+
import { G as c } from "../chunks/data-grid-O97pdLCY.js";
|
|
4
4
|
import { r as f } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
5
5
|
f("export", (i) => {
|
|
6
6
|
const t = typeof i == "boolean" ? {} : i ?? {};
|
package/features/filtering.js
CHANGED
|
@@ -2,7 +2,7 @@ import { FilteringPlugin as g } from "@toolbox-web/grid/plugins/filtering";
|
|
|
2
2
|
import { useContext as m, useCallback as n } from "react";
|
|
3
3
|
import { flushSync as w } from "react-dom";
|
|
4
4
|
import { createRoot as P } from "react-dom/client";
|
|
5
|
-
import { G as b } from "../chunks/data-grid-
|
|
5
|
+
import { G as b } from "../chunks/data-grid-O97pdLCY.js";
|
|
6
6
|
import { r as R } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
7
7
|
R("filtering", (i) => {
|
|
8
8
|
if (typeof i == "boolean") return new g();
|
package/features/print.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PrintPlugin as i } from "@toolbox-web/grid/plugins/print";
|
|
2
2
|
import { useContext as g, useCallback as n } from "react";
|
|
3
|
-
import { G as a } from "../chunks/data-grid-
|
|
3
|
+
import { G as a } from "../chunks/data-grid-O97pdLCY.js";
|
|
4
4
|
import { r as p } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
5
5
|
p("print", (r) => r === !0 ? new i() : new i(r ?? void 0));
|
|
6
6
|
function m() {
|
package/features/selection.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SelectionPlugin as i } from "@toolbox-web/grid/plugins/selection";
|
|
2
2
|
import { useContext as S, useCallback as o } from "react";
|
|
3
|
-
import { G as C } from "../chunks/data-grid-
|
|
3
|
+
import { G as C } from "../chunks/data-grid-O97pdLCY.js";
|
|
4
4
|
import { r as R } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
5
5
|
R("selection", (t) => t === "cell" || t === "row" || t === "range" ? new i({ mode: t }) : new i(t ?? void 0));
|
|
6
6
|
function b() {
|
package/features/undo-redo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UndoRedoPlugin as t } from "@toolbox-web/grid/plugins/undo-redo";
|
|
2
2
|
import { useContext as g, useCallback as e } from "react";
|
|
3
|
-
import { G as R } from "../chunks/data-grid-
|
|
3
|
+
import { G as R } from "../chunks/data-grid-O97pdLCY.js";
|
|
4
4
|
import { r as f } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
5
5
|
f("undoRedo", (d) => {
|
|
6
6
|
const o = typeof d == "boolean" ? {} : d ?? {};
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as T, a as B, b as k, c as A } from "./chunks/data-grid-
|
|
2
|
-
import { D as H, i as U, d as $, e as K, f as M, R as O, h as Q, u as X, g as Y } from "./chunks/data-grid-
|
|
1
|
+
import { r as T, a as B, b as k, c as A } from "./chunks/data-grid-O97pdLCY.js";
|
|
2
|
+
import { D as H, i as U, d as $, e as K, f as M, R as O, h as Q, u as X, g as Y } from "./chunks/data-grid-O97pdLCY.js";
|
|
3
3
|
import { jsx as w, Fragment as I } from "react/jsx-runtime";
|
|
4
4
|
import { useRef as R, useCallback as i, useState as P, useEffect as S } from "react";
|
|
5
5
|
function J(n) {
|
|
@@ -76,6 +76,17 @@ export type GridConfig<TRow = unknown> = Omit<BaseGridConfig<TRow>, 'columns'> &
|
|
|
76
76
|
* @see {@link GridConfig}
|
|
77
77
|
*/
|
|
78
78
|
export type ReactGridConfig<TRow = unknown> = GridConfig<TRow>;
|
|
79
|
+
/**
|
|
80
|
+
* Clean up config-based editor React roots whose containers are inside the given element.
|
|
81
|
+
* Called by the React GridAdapter's releaseCell to properly unmount editor roots
|
|
82
|
+
* that were created by `wrapReactEditor` (which bypasses the adapter's tracking).
|
|
83
|
+
*
|
|
84
|
+
* Only targets editor containers (`.react-cell-editor`), not renderer containers,
|
|
85
|
+
* since renderers use a WeakMap cache and must survive cell recycling.
|
|
86
|
+
*
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
export declare function cleanupConfigRootsIn(parentEl: HTMLElement): void;
|
|
79
90
|
/**
|
|
80
91
|
* Wraps a React renderer function into a DOM-returning viewRenderer.
|
|
81
92
|
* Used internally by DataGrid to process reactRenderer properties.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-column-config.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/react-column-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,gBAAgB,EAChC,UAAU,IAAI,cAAc,EAC5B,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,Y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AAG,SAAS,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,SAAS,CAyB9G;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,0BAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"react-column-config.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/react-column-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,gBAAgB,EAChC,UAAU,IAAI,cAAc,EAC5B,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,YAAY,CAAC,IAAI,GAAG,OAAO,CAAE,SAAQ,IAAI,CACxD,gBAAgB,CAAC,IAAI,CAAC,EACtB,UAAU,GAAG,cAAc,GAAG,QAAQ,CACvC;IACC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IAEvD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;CACxD;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,CAAC,IAAI,GAAG,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;AAInE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,UAAU,CAAC,IAAI,GAAG,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,GAAG;IAC/E,OAAO,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,IAAI,GAAG,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAM/D;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI,CAYhE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EACpC,QAAQ,EAAE,CAAC,GAAG,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,SAAS,GACpD,CAAC,GAAG,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,WAAW,CAiC/C;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAClC,QAAQ,EAAE,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,KAAK,SAAS,GACtD,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,KAAK,WAAW,CAcjD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,SAAS,CAyB9G;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,0BAAoB,CAAC"}
|
|
@@ -158,6 +158,8 @@ export declare class GridAdapter implements FrameworkAdapter {
|
|
|
158
158
|
/**
|
|
159
159
|
* Called when a cell's content is about to be wiped.
|
|
160
160
|
* Destroys editor React roots whose container is inside the cell.
|
|
161
|
+
* Also cleans up config-based editor roots (from processGridConfig/wrapReactEditor)
|
|
162
|
+
* that bypass the adapter's tracking arrays.
|
|
161
163
|
*/
|
|
162
164
|
releaseCell(cellEl: HTMLElement): void;
|
|
163
165
|
/**
|
|
@@ -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,gBAAgB,EAChB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAA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