@toolbox-web/grid-vue 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/features/filtering.d.ts.map +1 -1
- package/features/filtering.js +42 -24
- package/features/filtering.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +572 -318
- package/index.js.map +1 -1
- package/lib/TbwGrid.vue.d.ts +10 -10
- package/lib/TbwGrid.vue.d.ts.map +1 -1
- package/lib/TbwGridColumn.vue.d.ts.map +1 -1
- package/lib/feature-props.d.ts +19 -1
- package/lib/feature-props.d.ts.map +1 -1
- package/lib/grid-type-registry.d.ts +23 -0
- package/lib/grid-type-registry.d.ts.map +1 -1
- package/lib/slot-types.d.ts +14 -0
- package/lib/slot-types.d.ts.map +1 -1
- package/lib/vue-grid-adapter.d.ts +91 -3
- package/lib/vue-grid-adapter.d.ts.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DataGridElement as
|
|
3
|
-
import { c as
|
|
4
|
-
import { a as
|
|
5
|
-
import { G as
|
|
6
|
-
import { u as
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
return
|
|
1
|
+
import { defineComponent as y, provide as L, inject as F, createApp as f, createVNode as k, ref as R, computed as ne, onMounted as T, onBeforeUnmount as q, watch as j, createElementBlock as O, openBlock as P, renderSlot as U, useSlots as S, h as C } from "vue";
|
|
2
|
+
import { DataGridElement as re } from "@toolbox-web/grid";
|
|
3
|
+
import { c as oe } from "./chunks/feature-registry-BgEOysSJ.js";
|
|
4
|
+
import { a as Ve, g as ke, b as Le, i as Fe, r as Me } from "./chunks/feature-registry-BgEOysSJ.js";
|
|
5
|
+
import { G as H } from "./chunks/use-grid-DwjXrO19.js";
|
|
6
|
+
import { u as Ae } from "./chunks/use-grid-DwjXrO19.js";
|
|
7
|
+
const K = /* @__PURE__ */ Symbol("grid-icons");
|
|
8
|
+
function ie() {
|
|
9
|
+
return F(K, void 0);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const se = y({
|
|
12
12
|
name: "GridIconProvider",
|
|
13
13
|
props: {
|
|
14
14
|
/**
|
|
@@ -19,17 +19,17 @@ const X = p({
|
|
|
19
19
|
required: !0
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
setup(
|
|
23
|
-
return
|
|
22
|
+
setup(i, { slots: e }) {
|
|
23
|
+
return L(K, i.icons), () => e.default?.();
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
26
|
-
function
|
|
27
|
-
return
|
|
25
|
+
}), Y = /* @__PURE__ */ Symbol("grid-type-defaults");
|
|
26
|
+
function J() {
|
|
27
|
+
return F(Y, void 0);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
29
|
+
function Ce(i) {
|
|
30
|
+
return J()?.[i];
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const de = y({
|
|
33
33
|
name: "GridTypeProvider",
|
|
34
34
|
props: {
|
|
35
35
|
/**
|
|
@@ -40,175 +40,388 @@ const Z = p({
|
|
|
40
40
|
required: !0
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
setup(
|
|
44
|
-
return
|
|
43
|
+
setup(i, { slots: e }) {
|
|
44
|
+
return L(Y, i.defaults), () => e.default?.();
|
|
45
45
|
}
|
|
46
|
-
}),
|
|
47
|
-
function
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
const
|
|
51
|
-
|
|
46
|
+
}), Q = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new Map();
|
|
47
|
+
function le(i, e) {
|
|
48
|
+
const n = i.getAttribute("field"), t = v.get(i) ?? {};
|
|
49
|
+
if (t.renderer = e, v.set(i, t), n) {
|
|
50
|
+
const r = w.get(n) ?? {};
|
|
51
|
+
r.renderer = e, w.set(n, r);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
const
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
58
|
-
|
|
54
|
+
function ae(i, e) {
|
|
55
|
+
const n = i.getAttribute("field"), t = v.get(i) ?? {};
|
|
56
|
+
if (t.editor = e, v.set(i, t), n) {
|
|
57
|
+
const r = w.get(n) ?? {};
|
|
58
|
+
r.editor = e, w.set(n, r);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
let
|
|
63
|
-
if (!
|
|
64
|
-
const
|
|
65
|
-
|
|
61
|
+
function ce(i) {
|
|
62
|
+
let e = v.get(i)?.renderer;
|
|
63
|
+
if (!e) {
|
|
64
|
+
const n = i.getAttribute("field");
|
|
65
|
+
n && (e = w.get(n)?.renderer);
|
|
66
66
|
}
|
|
67
|
-
return
|
|
67
|
+
return e;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
let
|
|
71
|
-
if (!
|
|
72
|
-
const
|
|
73
|
-
|
|
69
|
+
function ue(i) {
|
|
70
|
+
let e = v.get(i)?.editor;
|
|
71
|
+
if (!e) {
|
|
72
|
+
const n = i.getAttribute("field");
|
|
73
|
+
n && (e = w.get(n)?.editor);
|
|
74
74
|
}
|
|
75
|
-
return
|
|
75
|
+
return e;
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
function G(i) {
|
|
78
|
+
if (i == null || typeof i == "function" && i.prototype === void 0)
|
|
79
|
+
return !1;
|
|
80
|
+
if (typeof i == "object") {
|
|
81
|
+
const e = i;
|
|
82
|
+
if ("__name" in e || typeof e.setup == "function" || typeof e.render == "function") return !0;
|
|
83
|
+
}
|
|
84
|
+
if (typeof i == "function") {
|
|
85
|
+
const e = Function.prototype.toString.call(i);
|
|
86
|
+
if (e.startsWith("class ") || e.startsWith("class{")) return !0;
|
|
87
|
+
const n = i;
|
|
88
|
+
if ("__name" in n || typeof n.setup == "function") return !0;
|
|
89
|
+
}
|
|
90
|
+
return !1;
|
|
91
|
+
}
|
|
92
|
+
function B(i) {
|
|
93
|
+
return typeof i == "function" && !G(i);
|
|
94
|
+
}
|
|
95
|
+
const E = /* @__PURE__ */ Symbol.for("tbw:vue-processed");
|
|
96
|
+
class fe {
|
|
78
97
|
mountedViews = [];
|
|
79
98
|
typeDefaults = null;
|
|
99
|
+
// #region Config Processing
|
|
100
|
+
/**
|
|
101
|
+
* Processes a Vue grid configuration, converting Vue component references
|
|
102
|
+
* and VNode-returning render functions to DOM-returning functions.
|
|
103
|
+
*
|
|
104
|
+
* This is idempotent — already-processed configs pass through safely.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```ts
|
|
108
|
+
* import { GridAdapter, type GridConfig } from '@toolbox-web/grid-vue';
|
|
109
|
+
* import StatusBadge from './StatusBadge.vue';
|
|
110
|
+
*
|
|
111
|
+
* const config: GridConfig<Employee> = {
|
|
112
|
+
* columns: [
|
|
113
|
+
* { field: 'status', renderer: StatusBadge },
|
|
114
|
+
* ],
|
|
115
|
+
* };
|
|
116
|
+
*
|
|
117
|
+
* const adapter = new GridAdapter();
|
|
118
|
+
* const processedConfig = adapter.processGridConfig(config);
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* @param config - Vue grid config with possible component/VNode references
|
|
122
|
+
* @returns Processed config with DOM-returning functions
|
|
123
|
+
*/
|
|
124
|
+
processGridConfig(e) {
|
|
125
|
+
const n = { ...e };
|
|
126
|
+
return e.columns && (n.columns = e.columns.map((t) => this.processColumn(t))), e.typeDefaults && (n.typeDefaults = this.processTypeDefaults(e.typeDefaults)), n;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Processes typeDefaults, converting Vue component/VNode references
|
|
130
|
+
* to DOM-returning functions.
|
|
131
|
+
*
|
|
132
|
+
* @param typeDefaults - Vue type defaults with possible component references
|
|
133
|
+
* @returns Processed TypeDefault record
|
|
134
|
+
*/
|
|
135
|
+
processTypeDefaults(e) {
|
|
136
|
+
const n = {};
|
|
137
|
+
for (const [t, r] of Object.entries(e)) {
|
|
138
|
+
const s = {
|
|
139
|
+
editorParams: r.editorParams
|
|
140
|
+
};
|
|
141
|
+
r.renderer && (G(r.renderer) ? s.renderer = this.createConfigComponentRenderer(r.renderer) : B(r.renderer) && (s.renderer = this.createTypeRenderer(
|
|
142
|
+
r.renderer
|
|
143
|
+
))), r.editor && (G(r.editor) ? s.editor = this.createConfigComponentEditor(
|
|
144
|
+
r.editor
|
|
145
|
+
) : B(r.editor) && (s.editor = this.createTypeEditor(
|
|
146
|
+
r.editor
|
|
147
|
+
))), r.filterPanelRenderer && (s.filterPanelRenderer = this.createFilterPanelRenderer(r.filterPanelRenderer)), n[t] = s;
|
|
148
|
+
}
|
|
149
|
+
return n;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Processes a single column configuration, converting Vue component references
|
|
153
|
+
* and VNode-returning render functions to DOM-returning functions.
|
|
154
|
+
*
|
|
155
|
+
* @param column - Vue column config
|
|
156
|
+
* @returns Processed ColumnConfig with DOM-returning functions
|
|
157
|
+
*/
|
|
158
|
+
processColumn(e) {
|
|
159
|
+
const n = { ...e };
|
|
160
|
+
if (e.renderer && !e.renderer[E]) {
|
|
161
|
+
if (G(e.renderer)) {
|
|
162
|
+
const t = this.createConfigComponentRenderer(e.renderer);
|
|
163
|
+
t[E] = !0, n.renderer = t;
|
|
164
|
+
} else if (B(e.renderer)) {
|
|
165
|
+
const t = this.createConfigVNodeRenderer(e.renderer);
|
|
166
|
+
t[E] = !0, n.renderer = t;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (e.editor && !e.editor[E]) {
|
|
170
|
+
if (G(e.editor)) {
|
|
171
|
+
const t = this.createConfigComponentEditor(e.editor);
|
|
172
|
+
t[E] = !0, n.editor = t;
|
|
173
|
+
} else if (B(e.editor)) {
|
|
174
|
+
const t = this.createConfigVNodeEditor(e.editor);
|
|
175
|
+
t[E] = !0, n.editor = t;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return n;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Creates a DOM-returning renderer from a Vue component class.
|
|
182
|
+
* Used for config-based renderers (not slot-based).
|
|
183
|
+
* @internal
|
|
184
|
+
*/
|
|
185
|
+
createConfigComponentRenderer(e) {
|
|
186
|
+
const n = /* @__PURE__ */ new WeakMap();
|
|
187
|
+
return (t) => {
|
|
188
|
+
const r = t.cellEl;
|
|
189
|
+
if (r) {
|
|
190
|
+
const a = n.get(r);
|
|
191
|
+
if (a)
|
|
192
|
+
return a.update(t), a.container;
|
|
193
|
+
const c = document.createElement("div");
|
|
194
|
+
c.className = "vue-cell-renderer", c.style.display = "contents";
|
|
195
|
+
let u = t;
|
|
196
|
+
const g = e, h = f({
|
|
197
|
+
render() {
|
|
198
|
+
return k(g, { ...u });
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
return h.mount(c), n.set(r, {
|
|
202
|
+
app: h,
|
|
203
|
+
container: c,
|
|
204
|
+
update: (_) => {
|
|
205
|
+
u = _, h._instance?.update();
|
|
206
|
+
}
|
|
207
|
+
}), c;
|
|
208
|
+
}
|
|
209
|
+
const s = document.createElement("div");
|
|
210
|
+
s.className = "vue-cell-renderer", s.style.display = "contents";
|
|
211
|
+
const d = e, l = f({
|
|
212
|
+
render() {
|
|
213
|
+
return k(d, { ...t });
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
return l.mount(s), this.mountedViews.push({ app: l, container: s }), s;
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Creates a DOM-returning renderer from a VNode-returning render function.
|
|
221
|
+
* Used for config-based renderers (not slot-based).
|
|
222
|
+
* @internal
|
|
223
|
+
*/
|
|
224
|
+
createConfigVNodeRenderer(e) {
|
|
225
|
+
const n = /* @__PURE__ */ new WeakMap();
|
|
226
|
+
return (t) => {
|
|
227
|
+
const r = t.cellEl;
|
|
228
|
+
if (r) {
|
|
229
|
+
const l = n.get(r);
|
|
230
|
+
if (l)
|
|
231
|
+
return l.update(t), l.container;
|
|
232
|
+
const a = document.createElement("div");
|
|
233
|
+
a.className = "vue-cell-renderer", a.style.display = "contents";
|
|
234
|
+
let c = t;
|
|
235
|
+
const u = f({
|
|
236
|
+
render() {
|
|
237
|
+
return e(c);
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
return u.mount(a), n.set(r, {
|
|
241
|
+
app: u,
|
|
242
|
+
container: a,
|
|
243
|
+
update: (g) => {
|
|
244
|
+
c = g, u._instance?.update();
|
|
245
|
+
}
|
|
246
|
+
}), a;
|
|
247
|
+
}
|
|
248
|
+
const s = document.createElement("div");
|
|
249
|
+
s.className = "vue-cell-renderer", s.style.display = "contents";
|
|
250
|
+
const d = f({
|
|
251
|
+
render() {
|
|
252
|
+
return e(t);
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
return d.mount(s), this.mountedViews.push({ app: d, container: s }), s;
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Creates a DOM-returning editor from a Vue component class.
|
|
260
|
+
* Used for config-based editors (not slot-based).
|
|
261
|
+
* @internal
|
|
262
|
+
*/
|
|
263
|
+
createConfigComponentEditor(e) {
|
|
264
|
+
return (n) => {
|
|
265
|
+
const t = document.createElement("div");
|
|
266
|
+
t.className = "vue-cell-editor", t.style.display = "contents";
|
|
267
|
+
const r = e, s = f({
|
|
268
|
+
render() {
|
|
269
|
+
return k(r, { ...n });
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
return s.mount(t), this.mountedViews.push({ app: s, container: t }), t;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Creates a DOM-returning editor from a VNode-returning render function.
|
|
277
|
+
* Used for config-based editors (not slot-based).
|
|
278
|
+
* @internal
|
|
279
|
+
*/
|
|
280
|
+
createConfigVNodeEditor(e) {
|
|
281
|
+
return (n) => {
|
|
282
|
+
const t = document.createElement("div");
|
|
283
|
+
t.className = "vue-cell-editor", t.style.display = "contents";
|
|
284
|
+
const r = f({
|
|
285
|
+
render() {
|
|
286
|
+
return e(n);
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
return r.mount(t), this.mountedViews.push({ app: r, container: t }), t;
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
// #endregion
|
|
80
293
|
/**
|
|
81
294
|
* Sets the type defaults map for this adapter.
|
|
82
295
|
* Called by TbwGrid when it receives type defaults from context.
|
|
83
296
|
*
|
|
84
297
|
* @internal
|
|
85
298
|
*/
|
|
86
|
-
setTypeDefaults(
|
|
87
|
-
this.typeDefaults =
|
|
299
|
+
setTypeDefaults(e) {
|
|
300
|
+
this.typeDefaults = e;
|
|
88
301
|
}
|
|
89
302
|
/**
|
|
90
303
|
* Determines if this adapter can handle the given element.
|
|
91
304
|
* Checks if a renderer or editor is registered for this element.
|
|
92
305
|
*/
|
|
93
|
-
canHandle(
|
|
94
|
-
const
|
|
95
|
-
let
|
|
96
|
-
if (!
|
|
97
|
-
const
|
|
98
|
-
|
|
306
|
+
canHandle(e) {
|
|
307
|
+
const n = e.getAttribute("field");
|
|
308
|
+
let t = v.get(e);
|
|
309
|
+
if (!t && n) {
|
|
310
|
+
const d = w.get(n);
|
|
311
|
+
d && (d.renderer || d.editor) && (t = d, v.set(e, t));
|
|
99
312
|
}
|
|
100
|
-
const
|
|
101
|
-
return
|
|
313
|
+
const r = t?.renderer !== void 0, s = t?.editor !== void 0;
|
|
314
|
+
return t !== void 0 && (r || s);
|
|
102
315
|
}
|
|
103
316
|
/**
|
|
104
317
|
* Creates a view renderer function that renders a Vue component
|
|
105
318
|
* and returns its container DOM element.
|
|
106
319
|
*/
|
|
107
|
-
createRenderer(
|
|
108
|
-
const
|
|
109
|
-
if (!
|
|
320
|
+
createRenderer(e) {
|
|
321
|
+
const n = ce(e);
|
|
322
|
+
if (!n)
|
|
110
323
|
return;
|
|
111
|
-
const
|
|
112
|
-
return (
|
|
113
|
-
const
|
|
114
|
-
if (
|
|
115
|
-
const
|
|
116
|
-
if (
|
|
117
|
-
return
|
|
324
|
+
const t = /* @__PURE__ */ new WeakMap();
|
|
325
|
+
return (r) => {
|
|
326
|
+
const s = r.cellEl;
|
|
327
|
+
if (s) {
|
|
328
|
+
const a = t.get(s);
|
|
329
|
+
if (a)
|
|
330
|
+
return a.update(r), a.container;
|
|
118
331
|
const c = document.createElement("div");
|
|
119
332
|
c.className = "vue-cell-renderer", c.style.display = "contents";
|
|
120
|
-
let u =
|
|
121
|
-
const
|
|
333
|
+
let u = r;
|
|
334
|
+
const g = f({
|
|
122
335
|
render() {
|
|
123
|
-
return
|
|
336
|
+
return n(u);
|
|
124
337
|
}
|
|
125
338
|
});
|
|
126
|
-
return
|
|
127
|
-
app:
|
|
339
|
+
return g.mount(c), t.set(s, {
|
|
340
|
+
app: g,
|
|
128
341
|
container: c,
|
|
129
|
-
update: (
|
|
130
|
-
u =
|
|
342
|
+
update: (h) => {
|
|
343
|
+
u = h, g._instance?.update();
|
|
131
344
|
}
|
|
132
345
|
}), c;
|
|
133
346
|
}
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
const
|
|
347
|
+
const d = document.createElement("div");
|
|
348
|
+
d.className = "vue-cell-renderer", d.style.display = "contents";
|
|
349
|
+
const l = f({
|
|
137
350
|
render() {
|
|
138
|
-
return
|
|
351
|
+
return n(r);
|
|
139
352
|
}
|
|
140
353
|
});
|
|
141
|
-
return
|
|
354
|
+
return l.mount(d), this.mountedViews.push({ app: l, container: d }), d;
|
|
142
355
|
};
|
|
143
356
|
}
|
|
144
357
|
/**
|
|
145
358
|
* Creates an editor spec that renders a Vue component for cell editing.
|
|
146
359
|
* Returns a function that creates the editor DOM element.
|
|
147
360
|
*/
|
|
148
|
-
createEditor(
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
return (
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
const
|
|
361
|
+
createEditor(e) {
|
|
362
|
+
const n = ue(e);
|
|
363
|
+
if (n)
|
|
364
|
+
return (t) => {
|
|
365
|
+
const r = document.createElement("div");
|
|
366
|
+
r.className = "vue-cell-editor", r.style.display = "contents";
|
|
367
|
+
const s = f({
|
|
155
368
|
render() {
|
|
156
|
-
return
|
|
369
|
+
return n(t);
|
|
157
370
|
}
|
|
158
371
|
});
|
|
159
|
-
return
|
|
372
|
+
return s.mount(r), this.mountedViews.push({ app: s, container: r }), r;
|
|
160
373
|
};
|
|
161
374
|
}
|
|
162
375
|
/**
|
|
163
376
|
* Framework adapter hook called by MasterDetailPlugin during attach().
|
|
164
377
|
* Parses the <tbw-grid-detail> element and returns a Vue-based renderer.
|
|
165
378
|
*/
|
|
166
|
-
parseDetailElement(
|
|
167
|
-
const
|
|
168
|
-
if (!e) return;
|
|
169
|
-
const n = e.querySelector("tbw-grid-detail");
|
|
379
|
+
parseDetailElement(e) {
|
|
380
|
+
const n = e.closest("tbw-grid");
|
|
170
381
|
if (!n) return;
|
|
171
|
-
const
|
|
172
|
-
if (
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
const
|
|
382
|
+
const t = n.querySelector("tbw-grid-detail");
|
|
383
|
+
if (!t) return;
|
|
384
|
+
const r = Q.get(t);
|
|
385
|
+
if (r)
|
|
386
|
+
return (s, d) => {
|
|
387
|
+
const l = document.createElement("div");
|
|
388
|
+
l.className = "vue-detail-panel";
|
|
389
|
+
const c = r({ row: s, rowIndex: d });
|
|
177
390
|
if (c && c.length > 0) {
|
|
178
|
-
const u =
|
|
391
|
+
const u = f({
|
|
179
392
|
render() {
|
|
180
393
|
return c;
|
|
181
394
|
}
|
|
182
395
|
});
|
|
183
|
-
u.mount(
|
|
396
|
+
u.mount(l), this.mountedViews.push({ app: u, container: l });
|
|
184
397
|
}
|
|
185
|
-
return
|
|
398
|
+
return l;
|
|
186
399
|
};
|
|
187
400
|
}
|
|
188
401
|
/**
|
|
189
402
|
* Framework adapter hook called by ResponsivePlugin during attach().
|
|
190
403
|
* Parses the <tbw-grid-responsive-card> element and returns a Vue-based renderer.
|
|
191
404
|
*/
|
|
192
|
-
parseResponsiveCardElement(
|
|
193
|
-
const
|
|
194
|
-
if (!e) return;
|
|
195
|
-
const n = e.querySelector("tbw-grid-responsive-card");
|
|
405
|
+
parseResponsiveCardElement(e) {
|
|
406
|
+
const n = e.closest("tbw-grid");
|
|
196
407
|
if (!n) return;
|
|
197
|
-
const
|
|
198
|
-
if (
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
const
|
|
408
|
+
const t = n.querySelector("tbw-grid-responsive-card");
|
|
409
|
+
if (!t) return;
|
|
410
|
+
const r = X.get(t);
|
|
411
|
+
if (r)
|
|
412
|
+
return (s, d) => {
|
|
413
|
+
const l = document.createElement("div");
|
|
414
|
+
l.className = "vue-responsive-card";
|
|
415
|
+
const c = r({ row: s, rowIndex: d });
|
|
203
416
|
if (c && c.length > 0) {
|
|
204
|
-
const u =
|
|
417
|
+
const u = f({
|
|
205
418
|
render() {
|
|
206
419
|
return c;
|
|
207
420
|
}
|
|
208
421
|
});
|
|
209
|
-
u.mount(
|
|
422
|
+
u.mount(l), this.mountedViews.push({ app: u, container: l });
|
|
210
423
|
}
|
|
211
|
-
return
|
|
424
|
+
return l;
|
|
212
425
|
};
|
|
213
426
|
}
|
|
214
427
|
// #region Type Defaults Support
|
|
@@ -240,47 +453,66 @@ class oe {
|
|
|
240
453
|
* </template>
|
|
241
454
|
* ```
|
|
242
455
|
*/
|
|
243
|
-
getTypeDefault(
|
|
456
|
+
getTypeDefault(e) {
|
|
244
457
|
if (!this.typeDefaults)
|
|
245
458
|
return;
|
|
246
|
-
const
|
|
247
|
-
if (!
|
|
459
|
+
const n = this.typeDefaults[e];
|
|
460
|
+
if (!n)
|
|
248
461
|
return;
|
|
249
|
-
const
|
|
250
|
-
editorParams:
|
|
462
|
+
const t = {
|
|
463
|
+
editorParams: n.editorParams
|
|
251
464
|
};
|
|
252
|
-
return
|
|
465
|
+
return n.renderer && (t.renderer = this.createTypeRenderer(n.renderer)), n.editor && (t.editor = this.createTypeEditor(n.editor)), n.filterPanelRenderer && (t.filterPanelRenderer = this.createFilterPanelRenderer(n.filterPanelRenderer)), t;
|
|
253
466
|
}
|
|
254
467
|
/**
|
|
255
468
|
* Creates a renderer function from a Vue render function for type defaults.
|
|
256
469
|
* @internal
|
|
257
470
|
*/
|
|
258
|
-
createTypeRenderer(
|
|
259
|
-
return (
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
const
|
|
471
|
+
createTypeRenderer(e) {
|
|
472
|
+
return (n) => {
|
|
473
|
+
const t = document.createElement("span");
|
|
474
|
+
t.style.display = "contents";
|
|
475
|
+
const r = f({
|
|
263
476
|
render() {
|
|
264
|
-
return
|
|
477
|
+
return e(n);
|
|
265
478
|
}
|
|
266
479
|
});
|
|
267
|
-
return
|
|
480
|
+
return r.mount(t), this.mountedViews.push({ app: r, container: t }), t;
|
|
268
481
|
};
|
|
269
482
|
}
|
|
270
483
|
/**
|
|
271
484
|
* Creates an editor function from a Vue render function for type defaults.
|
|
272
485
|
* @internal
|
|
273
486
|
*/
|
|
274
|
-
createTypeEditor(
|
|
275
|
-
return (
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
const
|
|
487
|
+
createTypeEditor(e) {
|
|
488
|
+
return (n) => {
|
|
489
|
+
const t = document.createElement("span");
|
|
490
|
+
t.style.display = "contents";
|
|
491
|
+
const r = f({
|
|
279
492
|
render() {
|
|
280
|
-
return
|
|
493
|
+
return e(n);
|
|
281
494
|
}
|
|
282
495
|
});
|
|
283
|
-
return
|
|
496
|
+
return r.mount(t), this.mountedViews.push({ app: r, container: t }), t;
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Creates a filter panel renderer function from a Vue render function.
|
|
501
|
+
*
|
|
502
|
+
* Wraps a Vue `(params: FilterPanelParams) => VNode` function into the
|
|
503
|
+
* imperative `(container, params) => void` signature expected by the core grid.
|
|
504
|
+
* @internal
|
|
505
|
+
*/
|
|
506
|
+
createFilterPanelRenderer(e) {
|
|
507
|
+
return (n, t) => {
|
|
508
|
+
const r = document.createElement("div");
|
|
509
|
+
r.style.display = "contents";
|
|
510
|
+
const s = f({
|
|
511
|
+
render() {
|
|
512
|
+
return e(t);
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
s.mount(r), this.mountedViews.push({ app: s, container: r }), n.appendChild(r);
|
|
284
516
|
};
|
|
285
517
|
}
|
|
286
518
|
// #endregion
|
|
@@ -288,15 +520,15 @@ class oe {
|
|
|
288
520
|
* Cleanup all mounted Vue apps.
|
|
289
521
|
*/
|
|
290
522
|
cleanup() {
|
|
291
|
-
for (const { app:
|
|
523
|
+
for (const { app: e, container: n } of this.mountedViews)
|
|
292
524
|
try {
|
|
293
|
-
|
|
525
|
+
e.unmount(), n.remove();
|
|
294
526
|
} catch {
|
|
295
527
|
}
|
|
296
528
|
this.mountedViews = [];
|
|
297
529
|
}
|
|
298
530
|
}
|
|
299
|
-
const
|
|
531
|
+
const pe = fe, Re = /* @__PURE__ */ y({
|
|
300
532
|
__name: "TbwGrid",
|
|
301
533
|
props: {
|
|
302
534
|
/** Row data to display */
|
|
@@ -439,15 +671,15 @@ const ie = oe, ge = /* @__PURE__ */ p({
|
|
|
439
671
|
}
|
|
440
672
|
},
|
|
441
673
|
emits: ["cell-commit", "row-commit", "cell-click", "cell-dblclick", "selection-change", "row-toggle", "sort-change", "ready"],
|
|
442
|
-
setup(
|
|
443
|
-
let
|
|
444
|
-
function
|
|
445
|
-
return
|
|
674
|
+
setup(i, { expose: e, emit: n }) {
|
|
675
|
+
let t = !1, r = null;
|
|
676
|
+
function s() {
|
|
677
|
+
return t || (r = new pe(), re.registerAdapter(r), t = !0), r;
|
|
446
678
|
}
|
|
447
|
-
|
|
448
|
-
const
|
|
449
|
-
|
|
450
|
-
const c =
|
|
679
|
+
s();
|
|
680
|
+
const d = i, l = n, a = R(null);
|
|
681
|
+
L(H, a);
|
|
682
|
+
const c = J(), u = ie(), g = [
|
|
451
683
|
"selection",
|
|
452
684
|
"editing",
|
|
453
685
|
"clipboard",
|
|
@@ -472,98 +704,115 @@ const ie = oe, ge = /* @__PURE__ */ p({
|
|
|
472
704
|
"pivot",
|
|
473
705
|
"serverSide"
|
|
474
706
|
];
|
|
475
|
-
function
|
|
476
|
-
const
|
|
477
|
-
for (const
|
|
478
|
-
const
|
|
479
|
-
if (
|
|
480
|
-
const
|
|
481
|
-
|
|
707
|
+
function h() {
|
|
708
|
+
const o = [];
|
|
709
|
+
for (const p of g) {
|
|
710
|
+
const b = d[p];
|
|
711
|
+
if (b !== void 0) {
|
|
712
|
+
const m = oe(p, b);
|
|
713
|
+
m && o.push(m);
|
|
482
714
|
}
|
|
483
715
|
}
|
|
484
|
-
return
|
|
716
|
+
return o;
|
|
485
717
|
}
|
|
486
|
-
const _ =
|
|
487
|
-
const
|
|
718
|
+
const _ = ne(() => {
|
|
719
|
+
const o = d.gridConfig ?? {}, p = h(), b = o.plugins ?? [], m = [...p, ...b], D = u ? { ...o.icons, ...u } : o.icons;
|
|
488
720
|
return {
|
|
489
|
-
...
|
|
490
|
-
...
|
|
491
|
-
...
|
|
492
|
-
...
|
|
721
|
+
...o,
|
|
722
|
+
...d.columns ? { columns: d.columns } : {},
|
|
723
|
+
...m.length > 0 ? { plugins: m } : {},
|
|
724
|
+
...D ? { icons: D } : {}
|
|
493
725
|
};
|
|
494
726
|
});
|
|
495
|
-
function
|
|
496
|
-
|
|
727
|
+
function M(o) {
|
|
728
|
+
l("cell-commit", o);
|
|
729
|
+
}
|
|
730
|
+
function N(o) {
|
|
731
|
+
l("row-commit", o);
|
|
497
732
|
}
|
|
498
|
-
function
|
|
499
|
-
|
|
733
|
+
function A(o) {
|
|
734
|
+
l("cell-click", o);
|
|
500
735
|
}
|
|
501
|
-
function
|
|
502
|
-
|
|
736
|
+
function W(o) {
|
|
737
|
+
l("cell-dblclick", o);
|
|
503
738
|
}
|
|
504
|
-
function
|
|
505
|
-
|
|
739
|
+
function I(o) {
|
|
740
|
+
l("selection-change", o);
|
|
506
741
|
}
|
|
507
|
-
function x(
|
|
508
|
-
|
|
742
|
+
function x(o) {
|
|
743
|
+
l("row-toggle", o);
|
|
509
744
|
}
|
|
510
|
-
function
|
|
511
|
-
|
|
745
|
+
function $(o) {
|
|
746
|
+
l("sort-change", o);
|
|
512
747
|
}
|
|
513
|
-
function
|
|
514
|
-
|
|
748
|
+
function z(o) {
|
|
749
|
+
l("ready", o);
|
|
515
750
|
}
|
|
516
|
-
function
|
|
517
|
-
|
|
751
|
+
function Z(o, p) {
|
|
752
|
+
const b = Object.getPrototypeOf(o), m = Object.getOwnPropertyDescriptor(b, "gridConfig");
|
|
753
|
+
if (!m?.set || !m?.get) return;
|
|
754
|
+
const D = m.set, te = m.get;
|
|
755
|
+
Object.defineProperty(o, "gridConfig", {
|
|
756
|
+
get() {
|
|
757
|
+
return te.call(this);
|
|
758
|
+
},
|
|
759
|
+
set(V) {
|
|
760
|
+
V && p ? D.call(this, p.processGridConfig(V)) : D.call(this, V);
|
|
761
|
+
},
|
|
762
|
+
configurable: !0
|
|
763
|
+
});
|
|
518
764
|
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
const
|
|
526
|
-
|
|
527
|
-
}),
|
|
528
|
-
|
|
529
|
-
(
|
|
530
|
-
|
|
765
|
+
function ee(o) {
|
|
766
|
+
delete o.gridConfig;
|
|
767
|
+
}
|
|
768
|
+
return T(() => {
|
|
769
|
+
const o = a.value;
|
|
770
|
+
if (!o) return;
|
|
771
|
+
const p = s();
|
|
772
|
+
o.__frameworkAdapter = p, p.setTypeDefaults(c ?? null), Z(o, p), o.addEventListener("cell-commit", M), o.addEventListener("row-commit", N), o.addEventListener("cell-click", A), o.addEventListener("cell-dblclick", W), o.addEventListener("selection-change", I), o.addEventListener("row-toggle", x), o.addEventListener("sort-change", $), o.addEventListener("ready", z), d.rows.length > 0 && (o.rows = d.rows), _.value && (o.gridConfig = _.value), d.fitMode && (o.fitMode = d.fitMode);
|
|
773
|
+
}), q(() => {
|
|
774
|
+
const o = a.value;
|
|
775
|
+
o && (ee(o), o.removeEventListener("cell-commit", M), o.removeEventListener("row-commit", N), o.removeEventListener("cell-click", A), o.removeEventListener("cell-dblclick", W), o.removeEventListener("selection-change", I), o.removeEventListener("row-toggle", x), o.removeEventListener("sort-change", $), o.removeEventListener("ready", z));
|
|
776
|
+
}), j(
|
|
777
|
+
() => d.rows,
|
|
778
|
+
(o) => {
|
|
779
|
+
a.value && (a.value.rows = o);
|
|
531
780
|
},
|
|
532
781
|
{ deep: !0 }
|
|
533
|
-
),
|
|
782
|
+
), j(
|
|
534
783
|
_,
|
|
535
|
-
(
|
|
536
|
-
|
|
784
|
+
(o) => {
|
|
785
|
+
a.value && o && (a.value.gridConfig = o);
|
|
537
786
|
},
|
|
538
787
|
{ deep: !0 }
|
|
539
|
-
),
|
|
540
|
-
() =>
|
|
541
|
-
(
|
|
542
|
-
|
|
788
|
+
), j(
|
|
789
|
+
() => d.fitMode,
|
|
790
|
+
(o) => {
|
|
791
|
+
a.value && o && (a.value.fitMode = o);
|
|
543
792
|
}
|
|
544
|
-
),
|
|
793
|
+
), j(
|
|
545
794
|
() => c,
|
|
546
|
-
(
|
|
547
|
-
|
|
795
|
+
(o) => {
|
|
796
|
+
s().setTypeDefaults(o ?? null);
|
|
548
797
|
},
|
|
549
798
|
{ deep: !0 }
|
|
550
|
-
),
|
|
799
|
+
), e({
|
|
551
800
|
/** The underlying grid element */
|
|
552
|
-
gridElement:
|
|
801
|
+
gridElement: a,
|
|
553
802
|
/** Force a layout recalculation */
|
|
554
|
-
forceLayout: () =>
|
|
803
|
+
forceLayout: () => a.value?.forceLayout(),
|
|
555
804
|
/** Get current grid configuration */
|
|
556
|
-
getConfig: () =>
|
|
805
|
+
getConfig: () => a.value?.getConfig(),
|
|
557
806
|
/** Wait for grid to be ready */
|
|
558
|
-
ready: () =>
|
|
559
|
-
}), (
|
|
807
|
+
ready: () => a.value?.ready()
|
|
808
|
+
}), (o, p) => (P(), O("tbw-grid", {
|
|
560
809
|
ref_key: "gridRef",
|
|
561
|
-
ref:
|
|
810
|
+
ref: a
|
|
562
811
|
}, [
|
|
563
|
-
|
|
812
|
+
U(o.$slots, "default")
|
|
564
813
|
], 512));
|
|
565
814
|
}
|
|
566
|
-
}),
|
|
815
|
+
}), me = ["field", "header", "width", "min-width", "max-width", "sortable", "resizable", "editable", "type", "align", "hidden"], Te = /* @__PURE__ */ y({
|
|
567
816
|
__name: "TbwGridColumn",
|
|
568
817
|
props: {
|
|
569
818
|
field: {},
|
|
@@ -578,87 +827,91 @@ const ie = oe, ge = /* @__PURE__ */ p({
|
|
|
578
827
|
align: {},
|
|
579
828
|
hidden: { type: Boolean }
|
|
580
829
|
},
|
|
581
|
-
setup(
|
|
582
|
-
const
|
|
583
|
-
return
|
|
584
|
-
const
|
|
585
|
-
if (!
|
|
586
|
-
const
|
|
587
|
-
|
|
588
|
-
const
|
|
589
|
-
if (!
|
|
590
|
-
const
|
|
591
|
-
value:
|
|
592
|
-
row:
|
|
593
|
-
column:
|
|
830
|
+
setup(i) {
|
|
831
|
+
const e = S(), n = R(null);
|
|
832
|
+
return T(() => {
|
|
833
|
+
const t = n.value;
|
|
834
|
+
if (!t) return;
|
|
835
|
+
const r = !!e.cell, s = !!e.editor;
|
|
836
|
+
r && le(t, (d) => {
|
|
837
|
+
const l = e.cell;
|
|
838
|
+
if (!l) return C("span");
|
|
839
|
+
const a = l({
|
|
840
|
+
value: d.value,
|
|
841
|
+
row: d.row,
|
|
842
|
+
column: d.column
|
|
594
843
|
});
|
|
595
|
-
return
|
|
596
|
-
}),
|
|
597
|
-
const
|
|
598
|
-
if (!
|
|
599
|
-
const
|
|
600
|
-
value:
|
|
601
|
-
row:
|
|
602
|
-
column:
|
|
603
|
-
|
|
604
|
-
|
|
844
|
+
return C("div", { style: "display: contents" }, a);
|
|
845
|
+
}), s && ae(t, (d) => {
|
|
846
|
+
const l = e.editor;
|
|
847
|
+
if (!l) return C("span");
|
|
848
|
+
const a = l({
|
|
849
|
+
value: d.value,
|
|
850
|
+
row: d.row,
|
|
851
|
+
column: d.column,
|
|
852
|
+
field: d.field,
|
|
853
|
+
rowId: d.rowId ?? "",
|
|
854
|
+
commit: d.commit,
|
|
855
|
+
cancel: d.cancel,
|
|
856
|
+
updateRow: d.updateRow,
|
|
857
|
+
onValueChange: d.onValueChange
|
|
605
858
|
});
|
|
606
|
-
return
|
|
859
|
+
return C("div", { style: "display: contents" }, a);
|
|
607
860
|
});
|
|
608
|
-
}), (
|
|
861
|
+
}), (t, r) => (P(), O("tbw-grid-column", {
|
|
609
862
|
ref_key: "columnRef",
|
|
610
|
-
ref:
|
|
611
|
-
field:
|
|
612
|
-
header:
|
|
613
|
-
width:
|
|
614
|
-
"min-width":
|
|
615
|
-
"max-width":
|
|
616
|
-
sortable:
|
|
617
|
-
resizable:
|
|
618
|
-
editable:
|
|
619
|
-
type:
|
|
620
|
-
align:
|
|
621
|
-
hidden:
|
|
622
|
-
}, null, 8,
|
|
623
|
-
}
|
|
624
|
-
}),
|
|
863
|
+
ref: n,
|
|
864
|
+
field: i.field,
|
|
865
|
+
header: i.header,
|
|
866
|
+
width: i.width,
|
|
867
|
+
"min-width": i.minWidth,
|
|
868
|
+
"max-width": i.maxWidth,
|
|
869
|
+
sortable: i.sortable,
|
|
870
|
+
resizable: i.resizable,
|
|
871
|
+
editable: i.editable,
|
|
872
|
+
type: i.type,
|
|
873
|
+
align: i.align,
|
|
874
|
+
hidden: i.hidden
|
|
875
|
+
}, null, 8, me));
|
|
876
|
+
}
|
|
877
|
+
}), ge = ["show-expand-column", "animation"], Oe = /* @__PURE__ */ y({
|
|
625
878
|
__name: "TbwGridDetailPanel",
|
|
626
879
|
props: {
|
|
627
880
|
showExpandColumn: { type: Boolean, default: !0 },
|
|
628
881
|
animation: { type: [String, Boolean], default: "slide" }
|
|
629
882
|
},
|
|
630
|
-
setup(
|
|
631
|
-
const
|
|
632
|
-
return
|
|
633
|
-
const
|
|
634
|
-
!
|
|
635
|
-
}), (
|
|
883
|
+
setup(i) {
|
|
884
|
+
const e = R(null), n = S();
|
|
885
|
+
return T(() => {
|
|
886
|
+
const t = e.value;
|
|
887
|
+
!t || !n.default || Q.set(t, (r) => n.default?.(r));
|
|
888
|
+
}), (t, r) => (P(), O("tbw-grid-detail", {
|
|
636
889
|
ref_key: "detailRef",
|
|
637
|
-
ref:
|
|
638
|
-
"show-expand-column":
|
|
639
|
-
animation:
|
|
640
|
-
}, null, 8,
|
|
890
|
+
ref: e,
|
|
891
|
+
"show-expand-column": i.showExpandColumn,
|
|
892
|
+
animation: i.animation
|
|
893
|
+
}, null, 8, ge));
|
|
641
894
|
}
|
|
642
|
-
}),
|
|
895
|
+
}), Pe = /* @__PURE__ */ y({
|
|
643
896
|
__name: "TbwGridResponsiveCard",
|
|
644
|
-
setup(
|
|
645
|
-
const
|
|
646
|
-
return
|
|
647
|
-
const
|
|
648
|
-
!
|
|
649
|
-
}), (
|
|
897
|
+
setup(i) {
|
|
898
|
+
const e = R(null), n = S();
|
|
899
|
+
return T(() => {
|
|
900
|
+
const t = e.value;
|
|
901
|
+
!t || !n.default || X.set(t, (r) => n.default?.(r));
|
|
902
|
+
}), (t, r) => (P(), O("tbw-grid-responsive-card", {
|
|
650
903
|
ref_key: "cardRef",
|
|
651
|
-
ref:
|
|
904
|
+
ref: e
|
|
652
905
|
}, null, 512));
|
|
653
906
|
}
|
|
654
|
-
}),
|
|
907
|
+
}), _e = /* @__PURE__ */ y({
|
|
655
908
|
__name: "TbwGridToolButtons",
|
|
656
|
-
setup(
|
|
657
|
-
return (
|
|
658
|
-
|
|
909
|
+
setup(i) {
|
|
910
|
+
return (e, n) => (P(), O("tbw-grid-tool-buttons", null, [
|
|
911
|
+
U(e.$slots, "default")
|
|
659
912
|
]));
|
|
660
913
|
}
|
|
661
|
-
}),
|
|
914
|
+
}), ye = /* @__PURE__ */ new WeakMap(), ve = ["id", "label", "icon", "position", "width"], De = /* @__PURE__ */ y({
|
|
662
915
|
__name: "TbwGridToolPanel",
|
|
663
916
|
props: {
|
|
664
917
|
id: {},
|
|
@@ -667,35 +920,35 @@ const ie = oe, ge = /* @__PURE__ */ p({
|
|
|
667
920
|
position: { default: "right" },
|
|
668
921
|
width: { default: "250px" }
|
|
669
922
|
},
|
|
670
|
-
setup(
|
|
671
|
-
const
|
|
672
|
-
return
|
|
673
|
-
const
|
|
674
|
-
!
|
|
675
|
-
}), (
|
|
923
|
+
setup(i) {
|
|
924
|
+
const e = R(null), n = S();
|
|
925
|
+
return T(() => {
|
|
926
|
+
const t = e.value;
|
|
927
|
+
!t || !n.default || ye.set(t, (r) => n.default?.(r));
|
|
928
|
+
}), (t, r) => (P(), O("tbw-grid-tool-panel", {
|
|
676
929
|
ref_key: "panelRef",
|
|
677
|
-
ref:
|
|
678
|
-
id:
|
|
679
|
-
label:
|
|
680
|
-
icon:
|
|
681
|
-
position:
|
|
682
|
-
width:
|
|
683
|
-
}, null, 8,
|
|
930
|
+
ref: e,
|
|
931
|
+
id: i.id,
|
|
932
|
+
label: i.label,
|
|
933
|
+
icon: i.icon,
|
|
934
|
+
position: i.position,
|
|
935
|
+
width: i.width
|
|
936
|
+
}, null, 8, ve));
|
|
684
937
|
}
|
|
685
938
|
});
|
|
686
|
-
function
|
|
687
|
-
const
|
|
688
|
-
let
|
|
689
|
-
|
|
690
|
-
const
|
|
691
|
-
if (!
|
|
692
|
-
const
|
|
693
|
-
|
|
694
|
-
}),
|
|
695
|
-
|
|
939
|
+
function Ge(i, e, n) {
|
|
940
|
+
const t = n ?? F(H, R(null));
|
|
941
|
+
let r = null;
|
|
942
|
+
T(() => {
|
|
943
|
+
const s = t.value;
|
|
944
|
+
if (!s) return;
|
|
945
|
+
const d = e;
|
|
946
|
+
s.addEventListener(i, d), r = () => s.removeEventListener(i, d);
|
|
947
|
+
}), q(() => {
|
|
948
|
+
r?.();
|
|
696
949
|
});
|
|
697
950
|
}
|
|
698
|
-
const
|
|
951
|
+
const je = y({
|
|
699
952
|
name: "GridProvider",
|
|
700
953
|
props: {
|
|
701
954
|
/**
|
|
@@ -713,38 +966,39 @@ const Re = p({
|
|
|
713
966
|
default: void 0
|
|
714
967
|
}
|
|
715
968
|
},
|
|
716
|
-
setup(
|
|
969
|
+
setup(i, { slots: e }) {
|
|
717
970
|
return () => {
|
|
718
|
-
let
|
|
719
|
-
return
|
|
971
|
+
let n = e.default?.();
|
|
972
|
+
return i.typeDefaults && (n = C(de, { defaults: i.typeDefaults }, () => n)), i.icons && (n = C(se, { icons: i.icons }, () => n)), n;
|
|
720
973
|
};
|
|
721
974
|
}
|
|
722
975
|
});
|
|
723
976
|
export {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
977
|
+
H as GRID_ELEMENT_KEY,
|
|
978
|
+
K as GRID_ICONS,
|
|
979
|
+
Y as GRID_TYPE_DEFAULTS,
|
|
980
|
+
fe as GridAdapter,
|
|
981
|
+
se as GridIconProvider,
|
|
982
|
+
je as GridProvider,
|
|
983
|
+
de as GridTypeProvider,
|
|
984
|
+
Re as TbwGrid,
|
|
985
|
+
Te as TbwGridColumn,
|
|
986
|
+
Oe as TbwGridDetailPanel,
|
|
987
|
+
Pe as TbwGridResponsiveCard,
|
|
988
|
+
_e as TbwGridToolButtons,
|
|
989
|
+
De as TbwGridToolPanel,
|
|
990
|
+
pe as VueGridAdapter,
|
|
991
|
+
Ve as clearFeatureRegistry,
|
|
992
|
+
oe as createPluginFromFeature,
|
|
993
|
+
ke as getFeatureFactory,
|
|
994
|
+
Le as getRegisteredFeatures,
|
|
995
|
+
Fe as isFeatureRegistered,
|
|
996
|
+
G as isVueComponent,
|
|
997
|
+
Me as registerFeature,
|
|
998
|
+
Ae as useGrid,
|
|
999
|
+
Ge as useGridEvent,
|
|
1000
|
+
ie as useGridIcons,
|
|
1001
|
+
J as useGridTypeDefaults,
|
|
1002
|
+
Ce as useTypeDefault
|
|
749
1003
|
};
|
|
750
1004
|
//# sourceMappingURL=index.js.map
|