@toolbox-web/grid-vue 0.2.0 → 0.3.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/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 +175 -187
- package/index.js.map +1 -1
- 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 +10 -5
- 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,10 +1,12 @@
|
|
|
1
|
-
import { defineComponent as p, provide as
|
|
1
|
+
import { defineComponent as p, provide as j, inject as D, createApp as g, ref as h, computed as Y, onMounted as b, onBeforeUnmount as W, watch as B, createElementBlock as w, openBlock as E, renderSlot as $, useSlots as G, h as y } from "vue";
|
|
2
2
|
import { DataGridElement as K } from "@toolbox-web/grid";
|
|
3
3
|
import { c as J } from "./chunks/feature-registry-BgEOysSJ.js";
|
|
4
|
-
import { a as
|
|
4
|
+
import { a as Be, g as Ge, b as Oe, i as _e, r as je } from "./chunks/feature-registry-BgEOysSJ.js";
|
|
5
|
+
import { G as I } from "./chunks/use-grid-DwjXrO19.js";
|
|
6
|
+
import { u as ke } from "./chunks/use-grid-DwjXrO19.js";
|
|
5
7
|
const z = /* @__PURE__ */ Symbol("grid-icons");
|
|
6
8
|
function Q() {
|
|
7
|
-
return
|
|
9
|
+
return D(z, void 0);
|
|
8
10
|
}
|
|
9
11
|
const X = p({
|
|
10
12
|
name: "GridIconProvider",
|
|
@@ -17,15 +19,15 @@ const X = p({
|
|
|
17
19
|
required: !0
|
|
18
20
|
}
|
|
19
21
|
},
|
|
20
|
-
setup(
|
|
21
|
-
return
|
|
22
|
+
setup(o, { slots: t }) {
|
|
23
|
+
return j(z, o.icons), () => t.default?.();
|
|
22
24
|
}
|
|
23
25
|
}), N = /* @__PURE__ */ Symbol("grid-type-defaults");
|
|
24
26
|
function q() {
|
|
25
|
-
return
|
|
27
|
+
return D(N, void 0);
|
|
26
28
|
}
|
|
27
|
-
function
|
|
28
|
-
return q()?.[
|
|
29
|
+
function me(o) {
|
|
30
|
+
return q()?.[o];
|
|
29
31
|
}
|
|
30
32
|
const Z = p({
|
|
31
33
|
name: "GridTypeProvider",
|
|
@@ -38,51 +40,36 @@ const Z = p({
|
|
|
38
40
|
required: !0
|
|
39
41
|
}
|
|
40
42
|
},
|
|
41
|
-
setup(
|
|
42
|
-
return
|
|
43
|
+
setup(o, { slots: t }) {
|
|
44
|
+
return j(N, o.defaults), () => t.default?.();
|
|
43
45
|
}
|
|
44
|
-
}),
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
gridElement: n,
|
|
49
|
-
forceLayout: async () => {
|
|
50
|
-
await n.value?.forceLayout();
|
|
51
|
-
},
|
|
52
|
-
getConfig: () => n.value?.getConfig(),
|
|
53
|
-
ready: async () => {
|
|
54
|
-
await n.value?.ready();
|
|
55
|
-
},
|
|
56
|
-
getPlugin: (t) => n.value?.getPlugin(t)
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
const U = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new Map();
|
|
60
|
-
function ee(n, t) {
|
|
61
|
-
const e = n.getAttribute("field"), r = m.get(n) ?? {};
|
|
62
|
-
if (r.renderer = t, m.set(n, r), e) {
|
|
46
|
+
}), U = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new Map();
|
|
47
|
+
function ee(o, t) {
|
|
48
|
+
const e = o.getAttribute("field"), n = m.get(o) ?? {};
|
|
49
|
+
if (n.renderer = t, m.set(o, n), e) {
|
|
63
50
|
const i = v.get(e) ?? {};
|
|
64
51
|
i.renderer = t, v.set(e, i);
|
|
65
52
|
}
|
|
66
53
|
}
|
|
67
|
-
function te(
|
|
68
|
-
const e =
|
|
69
|
-
if (
|
|
54
|
+
function te(o, t) {
|
|
55
|
+
const e = o.getAttribute("field"), n = m.get(o) ?? {};
|
|
56
|
+
if (n.editor = t, m.set(o, n), e) {
|
|
70
57
|
const i = v.get(e) ?? {};
|
|
71
58
|
i.editor = t, v.set(e, i);
|
|
72
59
|
}
|
|
73
60
|
}
|
|
74
|
-
function ne(
|
|
75
|
-
let t = m.get(
|
|
61
|
+
function ne(o) {
|
|
62
|
+
let t = m.get(o)?.renderer;
|
|
76
63
|
if (!t) {
|
|
77
|
-
const e =
|
|
64
|
+
const e = o.getAttribute("field");
|
|
78
65
|
e && (t = v.get(e)?.renderer);
|
|
79
66
|
}
|
|
80
67
|
return t;
|
|
81
68
|
}
|
|
82
|
-
function re(
|
|
83
|
-
let t = m.get(
|
|
69
|
+
function re(o) {
|
|
70
|
+
let t = m.get(o)?.editor;
|
|
84
71
|
if (!t) {
|
|
85
|
-
const e =
|
|
72
|
+
const e = o.getAttribute("field");
|
|
86
73
|
e && (t = v.get(e)?.editor);
|
|
87
74
|
}
|
|
88
75
|
return t;
|
|
@@ -105,13 +92,13 @@ class oe {
|
|
|
105
92
|
*/
|
|
106
93
|
canHandle(t) {
|
|
107
94
|
const e = t.getAttribute("field");
|
|
108
|
-
let
|
|
109
|
-
if (!
|
|
95
|
+
let n = m.get(t);
|
|
96
|
+
if (!n && e) {
|
|
110
97
|
const l = v.get(e);
|
|
111
|
-
l && (l.renderer || l.editor) && (
|
|
98
|
+
l && (l.renderer || l.editor) && (n = l, m.set(t, n));
|
|
112
99
|
}
|
|
113
|
-
const i =
|
|
114
|
-
return
|
|
100
|
+
const i = n?.renderer !== void 0, a = n?.editor !== void 0;
|
|
101
|
+
return n !== void 0 && (i || a);
|
|
115
102
|
}
|
|
116
103
|
/**
|
|
117
104
|
* Creates a view renderer function that renders a Vue component
|
|
@@ -121,11 +108,11 @@ class oe {
|
|
|
121
108
|
const e = ne(t);
|
|
122
109
|
if (!e)
|
|
123
110
|
return;
|
|
124
|
-
const
|
|
111
|
+
const n = /* @__PURE__ */ new WeakMap();
|
|
125
112
|
return (i) => {
|
|
126
113
|
const a = i.cellEl;
|
|
127
114
|
if (a) {
|
|
128
|
-
const s =
|
|
115
|
+
const s = n.get(a);
|
|
129
116
|
if (s)
|
|
130
117
|
return s.update(i), s.container;
|
|
131
118
|
const c = document.createElement("div");
|
|
@@ -136,11 +123,11 @@ class oe {
|
|
|
136
123
|
return e(u);
|
|
137
124
|
}
|
|
138
125
|
});
|
|
139
|
-
return R.mount(c),
|
|
126
|
+
return R.mount(c), n.set(a, {
|
|
140
127
|
app: R,
|
|
141
128
|
container: c,
|
|
142
|
-
update: (
|
|
143
|
-
u =
|
|
129
|
+
update: (O) => {
|
|
130
|
+
u = O, R._instance?.update();
|
|
144
131
|
}
|
|
145
132
|
}), c;
|
|
146
133
|
}
|
|
@@ -161,12 +148,12 @@ class oe {
|
|
|
161
148
|
createEditor(t) {
|
|
162
149
|
const e = re(t);
|
|
163
150
|
if (e)
|
|
164
|
-
return (
|
|
151
|
+
return (n) => {
|
|
165
152
|
const i = document.createElement("div");
|
|
166
153
|
i.className = "vue-cell-editor", i.style.display = "contents";
|
|
167
154
|
const a = g({
|
|
168
155
|
render() {
|
|
169
|
-
return e(
|
|
156
|
+
return e(n);
|
|
170
157
|
}
|
|
171
158
|
});
|
|
172
159
|
return a.mount(i), this.mountedViews.push({ app: a, container: i }), i;
|
|
@@ -179,9 +166,9 @@ class oe {
|
|
|
179
166
|
parseDetailElement(t) {
|
|
180
167
|
const e = t.closest("tbw-grid");
|
|
181
168
|
if (!e) return;
|
|
182
|
-
const
|
|
183
|
-
if (!
|
|
184
|
-
const i = U.get(
|
|
169
|
+
const n = e.querySelector("tbw-grid-detail");
|
|
170
|
+
if (!n) return;
|
|
171
|
+
const i = U.get(n);
|
|
185
172
|
if (i)
|
|
186
173
|
return (a, l) => {
|
|
187
174
|
const d = document.createElement("div");
|
|
@@ -205,9 +192,9 @@ class oe {
|
|
|
205
192
|
parseResponsiveCardElement(t) {
|
|
206
193
|
const e = t.closest("tbw-grid");
|
|
207
194
|
if (!e) return;
|
|
208
|
-
const
|
|
209
|
-
if (!
|
|
210
|
-
const i = H.get(
|
|
195
|
+
const n = e.querySelector("tbw-grid-responsive-card");
|
|
196
|
+
if (!n) return;
|
|
197
|
+
const i = H.get(n);
|
|
211
198
|
if (i)
|
|
212
199
|
return (a, l) => {
|
|
213
200
|
const d = document.createElement("div");
|
|
@@ -259,10 +246,10 @@ class oe {
|
|
|
259
246
|
const e = this.typeDefaults[t];
|
|
260
247
|
if (!e)
|
|
261
248
|
return;
|
|
262
|
-
const
|
|
249
|
+
const n = {
|
|
263
250
|
editorParams: e.editorParams
|
|
264
251
|
};
|
|
265
|
-
return e.renderer && (
|
|
252
|
+
return e.renderer && (n.renderer = this.createTypeRenderer(e.renderer)), e.editor && (n.editor = this.createTypeEditor(e.editor)), n;
|
|
266
253
|
}
|
|
267
254
|
/**
|
|
268
255
|
* Creates a renderer function from a Vue render function for type defaults.
|
|
@@ -270,14 +257,14 @@ class oe {
|
|
|
270
257
|
*/
|
|
271
258
|
createTypeRenderer(t) {
|
|
272
259
|
return (e) => {
|
|
273
|
-
const
|
|
274
|
-
|
|
260
|
+
const n = document.createElement("span");
|
|
261
|
+
n.style.display = "contents";
|
|
275
262
|
const i = g({
|
|
276
263
|
render() {
|
|
277
264
|
return t(e);
|
|
278
265
|
}
|
|
279
266
|
});
|
|
280
|
-
return i.mount(
|
|
267
|
+
return i.mount(n), this.mountedViews.push({ app: i, container: n }), n;
|
|
281
268
|
};
|
|
282
269
|
}
|
|
283
270
|
/**
|
|
@@ -286,14 +273,14 @@ class oe {
|
|
|
286
273
|
*/
|
|
287
274
|
createTypeEditor(t) {
|
|
288
275
|
return (e) => {
|
|
289
|
-
const
|
|
290
|
-
|
|
276
|
+
const n = document.createElement("span");
|
|
277
|
+
n.style.display = "contents";
|
|
291
278
|
const i = g({
|
|
292
279
|
render() {
|
|
293
280
|
return t(e);
|
|
294
281
|
}
|
|
295
282
|
});
|
|
296
|
-
return i.mount(
|
|
283
|
+
return i.mount(n), this.mountedViews.push({ app: i, container: n }), n;
|
|
297
284
|
};
|
|
298
285
|
}
|
|
299
286
|
// #endregion
|
|
@@ -309,7 +296,7 @@ class oe {
|
|
|
309
296
|
this.mountedViews = [];
|
|
310
297
|
}
|
|
311
298
|
}
|
|
312
|
-
const
|
|
299
|
+
const ie = oe, ge = /* @__PURE__ */ p({
|
|
313
300
|
__name: "TbwGrid",
|
|
314
301
|
props: {
|
|
315
302
|
/** Row data to display */
|
|
@@ -452,14 +439,14 @@ const me = /* @__PURE__ */ p({
|
|
|
452
439
|
}
|
|
453
440
|
},
|
|
454
441
|
emits: ["cell-commit", "row-commit", "cell-click", "cell-dblclick", "selection-change", "row-toggle", "sort-change", "ready"],
|
|
455
|
-
setup(
|
|
456
|
-
let
|
|
442
|
+
setup(o, { expose: t, emit: e }) {
|
|
443
|
+
let n = !1, i = null;
|
|
457
444
|
function a() {
|
|
458
|
-
return
|
|
445
|
+
return n || (i = new ie(), K.registerAdapter(i), n = !0), i;
|
|
459
446
|
}
|
|
460
447
|
a();
|
|
461
|
-
const l =
|
|
462
|
-
|
|
448
|
+
const l = o, d = e, s = h(null);
|
|
449
|
+
j(I, s);
|
|
463
450
|
const c = q(), u = Q(), R = [
|
|
464
451
|
"selection",
|
|
465
452
|
"editing",
|
|
@@ -485,79 +472,79 @@ const me = /* @__PURE__ */ p({
|
|
|
485
472
|
"pivot",
|
|
486
473
|
"serverSide"
|
|
487
474
|
];
|
|
488
|
-
function
|
|
489
|
-
const
|
|
475
|
+
function O() {
|
|
476
|
+
const r = [];
|
|
490
477
|
for (const f of R) {
|
|
491
478
|
const T = l[f];
|
|
492
479
|
if (T !== void 0) {
|
|
493
480
|
const C = J(f, T);
|
|
494
|
-
C &&
|
|
481
|
+
C && r.push(C);
|
|
495
482
|
}
|
|
496
483
|
}
|
|
497
|
-
return
|
|
484
|
+
return r;
|
|
498
485
|
}
|
|
499
|
-
const
|
|
500
|
-
const
|
|
486
|
+
const _ = Y(() => {
|
|
487
|
+
const r = l.gridConfig ?? {}, f = O(), T = r.plugins ?? [], C = [...f, ...T], V = u ? { ...r.icons, ...u } : r.icons;
|
|
501
488
|
return {
|
|
502
|
-
...
|
|
489
|
+
...r,
|
|
503
490
|
...l.columns ? { columns: l.columns } : {},
|
|
504
491
|
...C.length > 0 ? { plugins: C } : {},
|
|
505
|
-
...
|
|
492
|
+
...V ? { icons: V } : {}
|
|
506
493
|
};
|
|
507
494
|
});
|
|
508
|
-
function
|
|
509
|
-
d("cell-commit",
|
|
495
|
+
function k(r) {
|
|
496
|
+
d("cell-commit", r);
|
|
510
497
|
}
|
|
511
|
-
function
|
|
512
|
-
d("row-commit",
|
|
498
|
+
function S(r) {
|
|
499
|
+
d("row-commit", r);
|
|
513
500
|
}
|
|
514
|
-
function
|
|
515
|
-
d("cell-click",
|
|
501
|
+
function L(r) {
|
|
502
|
+
d("cell-click", r);
|
|
516
503
|
}
|
|
517
|
-
function
|
|
518
|
-
d("cell-dblclick",
|
|
504
|
+
function P(r) {
|
|
505
|
+
d("cell-dblclick", r);
|
|
519
506
|
}
|
|
520
|
-
function
|
|
521
|
-
d("selection-change",
|
|
507
|
+
function x(r) {
|
|
508
|
+
d("selection-change", r);
|
|
522
509
|
}
|
|
523
|
-
function A(
|
|
524
|
-
d("row-toggle",
|
|
510
|
+
function A(r) {
|
|
511
|
+
d("row-toggle", r);
|
|
525
512
|
}
|
|
526
|
-
function
|
|
527
|
-
d("sort-change",
|
|
513
|
+
function F(r) {
|
|
514
|
+
d("sort-change", r);
|
|
528
515
|
}
|
|
529
|
-
function
|
|
530
|
-
d("ready",
|
|
516
|
+
function M(r) {
|
|
517
|
+
d("ready", r);
|
|
531
518
|
}
|
|
532
519
|
return b(() => {
|
|
533
|
-
const
|
|
534
|
-
if (!
|
|
520
|
+
const r = s.value;
|
|
521
|
+
if (!r) return;
|
|
535
522
|
const f = a();
|
|
536
|
-
|
|
537
|
-
}),
|
|
538
|
-
const
|
|
539
|
-
|
|
523
|
+
r.__frameworkAdapter = f, f.setTypeDefaults(c ?? null), r.addEventListener("cell-commit", k), r.addEventListener("row-commit", S), r.addEventListener("cell-click", L), r.addEventListener("cell-dblclick", P), r.addEventListener("selection-change", x), r.addEventListener("row-toggle", A), r.addEventListener("sort-change", F), r.addEventListener("ready", M), l.rows.length > 0 && (r.rows = l.rows), _.value && (r.gridConfig = _.value), l.fitMode && (r.fitMode = l.fitMode);
|
|
524
|
+
}), W(() => {
|
|
525
|
+
const r = s.value;
|
|
526
|
+
r && (r.removeEventListener("cell-commit", k), r.removeEventListener("row-commit", S), r.removeEventListener("cell-click", L), r.removeEventListener("cell-dblclick", P), r.removeEventListener("selection-change", x), r.removeEventListener("row-toggle", A), r.removeEventListener("sort-change", F), r.removeEventListener("ready", M));
|
|
540
527
|
}), B(
|
|
541
528
|
() => l.rows,
|
|
542
|
-
(
|
|
543
|
-
s.value && (s.value.rows =
|
|
529
|
+
(r) => {
|
|
530
|
+
s.value && (s.value.rows = r);
|
|
544
531
|
},
|
|
545
532
|
{ deep: !0 }
|
|
546
533
|
), B(
|
|
547
|
-
|
|
548
|
-
(
|
|
549
|
-
s.value &&
|
|
534
|
+
_,
|
|
535
|
+
(r) => {
|
|
536
|
+
s.value && r && (s.value.gridConfig = r);
|
|
550
537
|
},
|
|
551
538
|
{ deep: !0 }
|
|
552
539
|
), B(
|
|
553
540
|
() => l.fitMode,
|
|
554
|
-
(
|
|
555
|
-
s.value &&
|
|
541
|
+
(r) => {
|
|
542
|
+
s.value && r && (s.value.fitMode = r);
|
|
556
543
|
}
|
|
557
544
|
), B(
|
|
558
545
|
() => c,
|
|
559
|
-
(
|
|
560
|
-
a().setTypeDefaults(
|
|
546
|
+
(r) => {
|
|
547
|
+
a().setTypeDefaults(r ?? null);
|
|
561
548
|
},
|
|
562
549
|
{ deep: !0 }
|
|
563
550
|
), t({
|
|
@@ -569,14 +556,14 @@ const me = /* @__PURE__ */ p({
|
|
|
569
556
|
getConfig: () => s.value?.getConfig(),
|
|
570
557
|
/** Wait for grid to be ready */
|
|
571
558
|
ready: () => s.value?.ready()
|
|
572
|
-
}), (
|
|
559
|
+
}), (r, f) => (E(), w("tbw-grid", {
|
|
573
560
|
ref_key: "gridRef",
|
|
574
561
|
ref: s
|
|
575
562
|
}, [
|
|
576
|
-
|
|
563
|
+
$(r.$slots, "default")
|
|
577
564
|
], 512));
|
|
578
565
|
}
|
|
579
|
-
}),
|
|
566
|
+
}), le = ["field", "header", "width", "min-width", "max-width", "sortable", "resizable", "editable", "type", "align", "hidden"], ve = /* @__PURE__ */ p({
|
|
580
567
|
__name: "TbwGridColumn",
|
|
581
568
|
props: {
|
|
582
569
|
field: {},
|
|
@@ -591,24 +578,24 @@ const me = /* @__PURE__ */ p({
|
|
|
591
578
|
align: {},
|
|
592
579
|
hidden: { type: Boolean }
|
|
593
580
|
},
|
|
594
|
-
setup(
|
|
595
|
-
const t =
|
|
581
|
+
setup(o) {
|
|
582
|
+
const t = G(), e = h(null);
|
|
596
583
|
return b(() => {
|
|
597
|
-
const
|
|
598
|
-
if (!
|
|
584
|
+
const n = e.value;
|
|
585
|
+
if (!n) return;
|
|
599
586
|
const i = !!t.cell, a = !!t.editor;
|
|
600
|
-
i && ee(
|
|
587
|
+
i && ee(n, (l) => {
|
|
601
588
|
const d = t.cell;
|
|
602
|
-
if (!d) return
|
|
589
|
+
if (!d) return y("span");
|
|
603
590
|
const s = d({
|
|
604
591
|
value: l.value,
|
|
605
592
|
row: l.row,
|
|
606
593
|
column: l.column
|
|
607
594
|
});
|
|
608
|
-
return
|
|
609
|
-
}), a && te(
|
|
595
|
+
return y("div", { style: "display: contents" }, s);
|
|
596
|
+
}), a && te(n, (l) => {
|
|
610
597
|
const d = t.editor;
|
|
611
|
-
if (!d) return
|
|
598
|
+
if (!d) return y("span");
|
|
612
599
|
const s = d({
|
|
613
600
|
value: l.value,
|
|
614
601
|
row: l.row,
|
|
@@ -616,62 +603,62 @@ const me = /* @__PURE__ */ p({
|
|
|
616
603
|
commit: l.commit,
|
|
617
604
|
cancel: l.cancel
|
|
618
605
|
});
|
|
619
|
-
return
|
|
606
|
+
return y("div", { style: "display: contents" }, s);
|
|
620
607
|
});
|
|
621
|
-
}), (
|
|
608
|
+
}), (n, i) => (E(), w("tbw-grid-column", {
|
|
622
609
|
ref_key: "columnRef",
|
|
623
610
|
ref: e,
|
|
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,
|
|
611
|
+
field: o.field,
|
|
612
|
+
header: o.header,
|
|
613
|
+
width: o.width,
|
|
614
|
+
"min-width": o.minWidth,
|
|
615
|
+
"max-width": o.maxWidth,
|
|
616
|
+
sortable: o.sortable,
|
|
617
|
+
resizable: o.resizable,
|
|
618
|
+
editable: o.editable,
|
|
619
|
+
type: o.type,
|
|
620
|
+
align: o.align,
|
|
621
|
+
hidden: o.hidden
|
|
622
|
+
}, null, 8, le));
|
|
636
623
|
}
|
|
637
|
-
}),
|
|
624
|
+
}), de = ["show-expand-column", "animation"], ye = /* @__PURE__ */ p({
|
|
638
625
|
__name: "TbwGridDetailPanel",
|
|
639
626
|
props: {
|
|
640
627
|
showExpandColumn: { type: Boolean, default: !0 },
|
|
641
628
|
animation: { type: [String, Boolean], default: "slide" }
|
|
642
629
|
},
|
|
643
|
-
setup(
|
|
644
|
-
const t =
|
|
630
|
+
setup(o) {
|
|
631
|
+
const t = h(null), e = G();
|
|
645
632
|
return b(() => {
|
|
646
|
-
const
|
|
647
|
-
!
|
|
648
|
-
}), (
|
|
633
|
+
const n = t.value;
|
|
634
|
+
!n || !e.default || U.set(n, (i) => e.default?.(i));
|
|
635
|
+
}), (n, i) => (E(), w("tbw-grid-detail", {
|
|
649
636
|
ref_key: "detailRef",
|
|
650
637
|
ref: t,
|
|
651
|
-
"show-expand-column":
|
|
652
|
-
animation:
|
|
653
|
-
}, null, 8,
|
|
638
|
+
"show-expand-column": o.showExpandColumn,
|
|
639
|
+
animation: o.animation
|
|
640
|
+
}, null, 8, de));
|
|
654
641
|
}
|
|
655
|
-
}),
|
|
642
|
+
}), he = /* @__PURE__ */ p({
|
|
656
643
|
__name: "TbwGridResponsiveCard",
|
|
657
|
-
setup(
|
|
658
|
-
const t =
|
|
644
|
+
setup(o) {
|
|
645
|
+
const t = h(null), e = G();
|
|
659
646
|
return b(() => {
|
|
660
|
-
const
|
|
661
|
-
!
|
|
662
|
-
}), (
|
|
647
|
+
const n = t.value;
|
|
648
|
+
!n || !e.default || H.set(n, (i) => e.default?.(i));
|
|
649
|
+
}), (n, i) => (E(), w("tbw-grid-responsive-card", {
|
|
663
650
|
ref_key: "cardRef",
|
|
664
651
|
ref: t
|
|
665
652
|
}, null, 512));
|
|
666
653
|
}
|
|
667
|
-
}),
|
|
654
|
+
}), be = /* @__PURE__ */ p({
|
|
668
655
|
__name: "TbwGridToolButtons",
|
|
669
|
-
setup(
|
|
656
|
+
setup(o) {
|
|
670
657
|
return (t, e) => (E(), w("tbw-grid-tool-buttons", null, [
|
|
671
|
-
|
|
658
|
+
$(t.$slots, "default")
|
|
672
659
|
]));
|
|
673
660
|
}
|
|
674
|
-
}),
|
|
661
|
+
}), se = /* @__PURE__ */ new WeakMap(), ae = ["id", "label", "icon", "position", "width"], we = /* @__PURE__ */ p({
|
|
675
662
|
__name: "TbwGridToolPanel",
|
|
676
663
|
props: {
|
|
677
664
|
id: {},
|
|
@@ -680,35 +667,35 @@ const me = /* @__PURE__ */ p({
|
|
|
680
667
|
position: { default: "right" },
|
|
681
668
|
width: { default: "250px" }
|
|
682
669
|
},
|
|
683
|
-
setup(
|
|
684
|
-
const t =
|
|
670
|
+
setup(o) {
|
|
671
|
+
const t = h(null), e = G();
|
|
685
672
|
return b(() => {
|
|
686
|
-
const
|
|
687
|
-
!
|
|
688
|
-
}), (
|
|
673
|
+
const n = t.value;
|
|
674
|
+
!n || !e.default || se.set(n, (i) => e.default?.(i));
|
|
675
|
+
}), (n, i) => (E(), w("tbw-grid-tool-panel", {
|
|
689
676
|
ref_key: "panelRef",
|
|
690
677
|
ref: t,
|
|
691
|
-
id:
|
|
692
|
-
label:
|
|
693
|
-
icon:
|
|
694
|
-
position:
|
|
695
|
-
width:
|
|
696
|
-
}, null, 8,
|
|
678
|
+
id: o.id,
|
|
679
|
+
label: o.label,
|
|
680
|
+
icon: o.icon,
|
|
681
|
+
position: o.position,
|
|
682
|
+
width: o.width
|
|
683
|
+
}, null, 8, ae));
|
|
697
684
|
}
|
|
698
685
|
});
|
|
699
|
-
function
|
|
700
|
-
const
|
|
686
|
+
function Ee(o, t, e) {
|
|
687
|
+
const n = e ?? D(I, h(null));
|
|
701
688
|
let i = null;
|
|
702
689
|
b(() => {
|
|
703
|
-
const a =
|
|
690
|
+
const a = n.value;
|
|
704
691
|
if (!a) return;
|
|
705
692
|
const l = t;
|
|
706
|
-
a.addEventListener(
|
|
707
|
-
}),
|
|
693
|
+
a.addEventListener(o, l), i = () => a.removeEventListener(o, l);
|
|
694
|
+
}), W(() => {
|
|
708
695
|
i?.();
|
|
709
696
|
});
|
|
710
697
|
}
|
|
711
|
-
const
|
|
698
|
+
const Re = p({
|
|
712
699
|
name: "GridProvider",
|
|
713
700
|
props: {
|
|
714
701
|
/**
|
|
@@ -726,37 +713,38 @@ const Ee = p({
|
|
|
726
713
|
default: void 0
|
|
727
714
|
}
|
|
728
715
|
},
|
|
729
|
-
setup(
|
|
716
|
+
setup(o, { slots: t }) {
|
|
730
717
|
return () => {
|
|
731
718
|
let e = t.default?.();
|
|
732
|
-
return
|
|
719
|
+
return o.typeDefaults && (e = y(Z, { defaults: o.typeDefaults }, () => e)), o.icons && (e = y(X, { icons: o.icons }, () => e)), e;
|
|
733
720
|
};
|
|
734
721
|
}
|
|
735
722
|
});
|
|
736
723
|
export {
|
|
737
|
-
|
|
724
|
+
I as GRID_ELEMENT_KEY,
|
|
738
725
|
z as GRID_ICONS,
|
|
739
726
|
N as GRID_TYPE_DEFAULTS,
|
|
727
|
+
oe as GridAdapter,
|
|
740
728
|
X as GridIconProvider,
|
|
741
|
-
|
|
729
|
+
Re as GridProvider,
|
|
742
730
|
Z as GridTypeProvider,
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
731
|
+
ge as TbwGrid,
|
|
732
|
+
ve as TbwGridColumn,
|
|
733
|
+
ye as TbwGridDetailPanel,
|
|
734
|
+
he as TbwGridResponsiveCard,
|
|
735
|
+
be as TbwGridToolButtons,
|
|
736
|
+
we as TbwGridToolPanel,
|
|
737
|
+
ie as VueGridAdapter,
|
|
738
|
+
Be as clearFeatureRegistry,
|
|
751
739
|
J as createPluginFromFeature,
|
|
752
|
-
|
|
740
|
+
Ge as getFeatureFactory,
|
|
753
741
|
Oe as getRegisteredFeatures,
|
|
754
742
|
_e as isFeatureRegistered,
|
|
755
743
|
je as registerFeature,
|
|
756
|
-
|
|
757
|
-
|
|
744
|
+
ke as useGrid,
|
|
745
|
+
Ee as useGridEvent,
|
|
758
746
|
Q as useGridIcons,
|
|
759
747
|
q as useGridTypeDefaults,
|
|
760
|
-
|
|
748
|
+
me as useTypeDefault
|
|
761
749
|
};
|
|
762
750
|
//# sourceMappingURL=index.js.map
|