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