dendelion-ui 0.0.4 → 0.0.6
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/dist/dendelion-ui.cjs.js +2 -2
- package/dist/dendelion-ui.es.js +385 -176
- package/dist/dendelion-ui.umd.js +2 -2
- package/dist/types/components/button/SimpleButton.vue.d.ts +2 -0
- package/dist/types/components/button/index.d.ts +3 -2
- package/dist/types/components/search/SearchBar.vue.d.ts +8 -4
- package/dist/types/components/table/Table.vue.d.ts +12 -9
- package/dist/types/components/table/index.d.ts +1 -1
- package/dist/types/components/table/interface.d.ts +10 -7
- package/package.json +6 -3
- package/src/components/button/Button.vue +3 -11
- package/src/components/button/SimpleButton.vue +8 -0
- package/src/components/button/index.ts +3 -2
- package/src/components/search/SearchBar.vue +4 -2
- package/src/components/table/Table.vue +81 -4
- package/src/components/table/index.ts +1 -1
- package/src/components/table/interface.ts +10 -7
package/dist/dendelion-ui.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
var
|
|
3
|
-
class
|
|
1
|
+
import { defineComponent as N, computed as se, createElementBlock as m, openBlock as f, normalizeClass as C, createElementVNode as x, renderSlot as T, ref as B, createBlock as U, resolveDynamicComponent as ue, withCtx as oe, createTextVNode as ce, toDisplayString as G, onMounted as Z, watch as V, Fragment as R, renderList as X, createCommentVNode as O, provide as be, inject as j, Transition as me, unref as Q, onUnmounted as _e } from "vue";
|
|
2
|
+
var J = /* @__PURE__ */ ((e) => (e[e.Primary = 0] = "Primary", e[e.PrimaryContent = 1] = "PrimaryContent", e[e.Secondary = 2] = "Secondary", e[e.SecondaryContent = 3] = "SecondaryContent", e[e.Accent = 4] = "Accent", e[e.AccentContent = 5] = "AccentContent", e[e.Neutral = 6] = "Neutral", e[e.NeutralContent = 7] = "NeutralContent", e[e.Base100 = 8] = "Base100", e[e.Base200 = 9] = "Base200", e[e.Base300 = 10] = "Base300", e[e.BaseContent = 11] = "BaseContent", e[e.Info = 12] = "Info", e[e.InfoContent = 13] = "InfoContent", e[e.Success = 14] = "Success", e[e.SuccessContent = 15] = "SuccessContent", e[e.Warning = 16] = "Warning", e[e.WarningContent = 17] = "WarningContent", e[e.Error = 18] = "Error", e[e.ErrorContent = 19] = "ErrorContent", e))(J || {});
|
|
3
|
+
class ge {
|
|
4
4
|
static toClassName(t) {
|
|
5
5
|
switch (t) {
|
|
6
6
|
case 0:
|
|
@@ -48,86 +48,87 @@ class B {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function le(e) {
|
|
52
52
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
53
53
|
}
|
|
54
|
-
var
|
|
54
|
+
var I = { exports: {} };
|
|
55
55
|
/*!
|
|
56
56
|
Copyright (c) 2018 Jed Watson.
|
|
57
57
|
Licensed under the MIT License (MIT), see
|
|
58
58
|
http://jedwatson.github.io/classnames
|
|
59
59
|
*/
|
|
60
|
-
var
|
|
61
|
-
function
|
|
62
|
-
return
|
|
60
|
+
var ee;
|
|
61
|
+
function ye() {
|
|
62
|
+
return ee || (ee = 1, function(e) {
|
|
63
63
|
(function() {
|
|
64
64
|
var t = {}.hasOwnProperty;
|
|
65
|
-
function
|
|
66
|
-
for (var n = "",
|
|
67
|
-
var
|
|
68
|
-
|
|
65
|
+
function a() {
|
|
66
|
+
for (var n = "", u = 0; u < arguments.length; u++) {
|
|
67
|
+
var d = arguments[u];
|
|
68
|
+
d && (n = r(n, s(d)));
|
|
69
69
|
}
|
|
70
70
|
return n;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function s(n) {
|
|
73
73
|
if (typeof n == "string" || typeof n == "number")
|
|
74
74
|
return n;
|
|
75
75
|
if (typeof n != "object")
|
|
76
76
|
return "";
|
|
77
77
|
if (Array.isArray(n))
|
|
78
|
-
return
|
|
78
|
+
return a.apply(null, n);
|
|
79
79
|
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
|
|
80
80
|
return n.toString();
|
|
81
|
-
var
|
|
82
|
-
for (var
|
|
83
|
-
t.call(n,
|
|
84
|
-
return
|
|
81
|
+
var u = "";
|
|
82
|
+
for (var d in n)
|
|
83
|
+
t.call(n, d) && n[d] && (u = r(u, d));
|
|
84
|
+
return u;
|
|
85
85
|
}
|
|
86
|
-
function r(n,
|
|
87
|
-
return
|
|
86
|
+
function r(n, u) {
|
|
87
|
+
return u ? n ? n + " " + u : n + u : n;
|
|
88
88
|
}
|
|
89
|
-
e.exports ? (
|
|
89
|
+
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
90
90
|
})();
|
|
91
|
-
}(
|
|
91
|
+
}(I)), I.exports;
|
|
92
92
|
}
|
|
93
|
-
var
|
|
94
|
-
const
|
|
93
|
+
var xe = ye();
|
|
94
|
+
const D = /* @__PURE__ */ le(xe), Se = ["type"], ke = { class: "group-[.is-loading]:text-transparent" }, Ue = /* @__PURE__ */ N({
|
|
95
95
|
__name: "Button",
|
|
96
96
|
props: {
|
|
97
97
|
type: { default: "button" },
|
|
98
98
|
loading: { type: Boolean },
|
|
99
|
-
color: { default:
|
|
99
|
+
color: { default: J.Neutral },
|
|
100
100
|
click: {}
|
|
101
101
|
},
|
|
102
102
|
setup(e) {
|
|
103
|
-
const t = e,
|
|
103
|
+
const t = e, a = se(() => D(
|
|
104
104
|
"btn",
|
|
105
105
|
"group",
|
|
106
|
-
`btn-${
|
|
106
|
+
`btn-${ge.toClassName(t.color)}`,
|
|
107
107
|
t.loading ? "is-loading" : ""
|
|
108
108
|
));
|
|
109
|
-
return
|
|
110
|
-
s.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
`btn-${B.toClassName(t.color)}`,
|
|
114
|
-
a ? "is-loading" : ""
|
|
115
|
-
);
|
|
116
|
-
}), (a, r) => (u(), d("button", {
|
|
117
|
-
onClick: r[0] || (r[0] = //@ts-ignore
|
|
118
|
-
(...n) => a.click && a.click(...n)),
|
|
119
|
-
class: m(s.value),
|
|
120
|
-
type: a.type
|
|
109
|
+
return (s, r) => (f(), m("button", {
|
|
110
|
+
onClick: r[0] || (r[0] = (n) => s.click ? s.click : void 0),
|
|
111
|
+
class: C(a.value),
|
|
112
|
+
type: s.type
|
|
121
113
|
}, [
|
|
122
|
-
r[1] || (r[1] =
|
|
123
|
-
|
|
124
|
-
|
|
114
|
+
r[1] || (r[1] = x("span", { class: "loading loading-spinner loading-md absolute hidden group-[.is-loading]:block" }, null, -1)),
|
|
115
|
+
x("span", ke, [
|
|
116
|
+
T(s.$slots, "default")
|
|
125
117
|
])
|
|
126
|
-
], 10,
|
|
118
|
+
], 10, Se));
|
|
127
119
|
}
|
|
128
|
-
})
|
|
129
|
-
|
|
130
|
-
|
|
120
|
+
}), Y = (e, t) => {
|
|
121
|
+
const a = e.__vccOpts || e;
|
|
122
|
+
for (const [s, r] of t)
|
|
123
|
+
a[s] = r;
|
|
124
|
+
return a;
|
|
125
|
+
}, we = {};
|
|
126
|
+
function $e(e, t) {
|
|
127
|
+
return f(), m("button");
|
|
128
|
+
}
|
|
129
|
+
const Ze = /* @__PURE__ */ Y(we, [["render", $e]]);
|
|
130
|
+
var ie = /* @__PURE__ */ ((e) => (e[e.XS = 0] = "XS", e[e.SM = 1] = "SM", e[e.MD = 2] = "MD", e[e.LG = 3] = "LG", e[e.XL = 4] = "XL", e[e.TWOXL = 5] = "TWOXL", e[e.THREEXL = 6] = "THREEXL", e))(ie || {});
|
|
131
|
+
class Me {
|
|
131
132
|
static toClassName(t) {
|
|
132
133
|
switch (t) {
|
|
133
134
|
case 0:
|
|
@@ -149,227 +150,433 @@ class U {
|
|
|
149
150
|
}
|
|
150
151
|
}
|
|
151
152
|
}
|
|
152
|
-
const
|
|
153
|
+
const je = /* @__PURE__ */ N({
|
|
153
154
|
__name: "Card",
|
|
154
155
|
props: {
|
|
155
|
-
backgroundColor: { default:
|
|
156
|
+
backgroundColor: { default: J.Primary },
|
|
156
157
|
shadow: { type: Boolean, default: !1 },
|
|
157
158
|
fullWidth: { type: Boolean, default: !1 },
|
|
158
159
|
rounded: { type: Boolean },
|
|
159
160
|
roundedSize: {}
|
|
160
161
|
},
|
|
161
162
|
setup(e) {
|
|
162
|
-
const t = e,
|
|
163
|
+
const t = e, a = B(D(
|
|
163
164
|
"card",
|
|
164
165
|
`bg-${t.backgroundColor}`,
|
|
165
166
|
t.shadow ? "shadow-lg" : "",
|
|
166
167
|
t.fullWidth ? "w-full" : "",
|
|
167
168
|
t.rounded && !t.roundedSize ? "rounded" : t.roundedSize ? `rounded-${t.roundedSize}` : ""
|
|
168
169
|
));
|
|
169
|
-
return (
|
|
170
|
-
class:
|
|
170
|
+
return (s, r) => (f(), m("div", {
|
|
171
|
+
class: C(a.value)
|
|
171
172
|
}, [
|
|
172
|
-
|
|
173
|
+
T(s.$slots, "default")
|
|
173
174
|
], 2));
|
|
174
175
|
}
|
|
175
|
-
}),
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
return s;
|
|
180
|
-
}, q = {}, z = { class: "card-body" };
|
|
181
|
-
function G(e, t) {
|
|
182
|
-
return u(), d("div", z, [
|
|
183
|
-
f(e.$slots, "default")
|
|
176
|
+
}), Be = {}, Ne = { class: "card-body" };
|
|
177
|
+
function Le(e, t) {
|
|
178
|
+
return f(), m("div", Ne, [
|
|
179
|
+
T(e.$slots, "default")
|
|
184
180
|
]);
|
|
185
181
|
}
|
|
186
|
-
const
|
|
182
|
+
const Je = /* @__PURE__ */ Y(Be, [["render", Le]]), Ye = /* @__PURE__ */ N({
|
|
187
183
|
__name: "CardTitle",
|
|
188
184
|
props: {
|
|
189
185
|
is: { default: "h1" },
|
|
190
186
|
text: { default: "" }
|
|
191
187
|
},
|
|
192
188
|
setup(e) {
|
|
193
|
-
return (t,
|
|
194
|
-
default:
|
|
195
|
-
|
|
189
|
+
return (t, a) => (f(), U(ue(t.is), { class: "card-title" }, {
|
|
190
|
+
default: oe(() => [
|
|
191
|
+
ce(G(t.text), 1)
|
|
196
192
|
]),
|
|
197
193
|
_: 1
|
|
198
194
|
}));
|
|
199
195
|
}
|
|
200
|
-
}),
|
|
196
|
+
}), Qe = /* @__PURE__ */ N({
|
|
201
197
|
__name: "Container",
|
|
202
198
|
props: {
|
|
203
199
|
container: { type: Boolean, default: !0 },
|
|
204
200
|
padding: { type: Boolean, default: !0 }
|
|
205
201
|
},
|
|
206
202
|
setup(e) {
|
|
207
|
-
const t = e,
|
|
203
|
+
const t = e, a = B([
|
|
208
204
|
t.container ? "container" : "",
|
|
209
205
|
//To disable the max width in some cases
|
|
210
206
|
t.padding ? "p-6" : ""
|
|
211
207
|
]);
|
|
212
|
-
return (
|
|
213
|
-
class:
|
|
208
|
+
return (s, r) => (f(), m("div", {
|
|
209
|
+
class: C(a.value)
|
|
214
210
|
}, [
|
|
215
|
-
|
|
211
|
+
T(s.$slots, "default")
|
|
216
212
|
], 2));
|
|
217
213
|
}
|
|
218
|
-
})
|
|
214
|
+
});
|
|
215
|
+
var K = {}, H = {}, te;
|
|
216
|
+
function de() {
|
|
217
|
+
return te || (te = 1, function(e) {
|
|
218
|
+
e.__esModule = !0, e.default = r;
|
|
219
|
+
var t = /[\u0300-\u036f]/g, a = /ł/g, s = /ñ/g;
|
|
220
|
+
function r(n) {
|
|
221
|
+
return n.toLowerCase().normalize("NFD").replace(t, "").replace(a, "l").replace(s, "n").trim();
|
|
222
|
+
}
|
|
223
|
+
}(H)), H;
|
|
224
|
+
}
|
|
225
|
+
var F = {}, ne;
|
|
226
|
+
function re() {
|
|
227
|
+
if (ne) return F;
|
|
228
|
+
ne = 1, F.__esModule = !0, F.aggressiveFuzzyMatch = _, F.createFuzzySearchImpl = q, F.experimentalSmartFuzzyMatch = S, F.fuzzyMatchImpl = g;
|
|
229
|
+
var e = t(de());
|
|
230
|
+
function t(c) {
|
|
231
|
+
return c && c.__esModule ? c : { default: c };
|
|
232
|
+
}
|
|
233
|
+
var a = Number.MAX_SAFE_INTEGER, s = function(o, v) {
|
|
234
|
+
return (
|
|
235
|
+
/*: number*/
|
|
236
|
+
o.score - v.score
|
|
237
|
+
);
|
|
238
|
+
}, r = function(o, v) {
|
|
239
|
+
return (
|
|
240
|
+
/*: number*/
|
|
241
|
+
o[0] - v[0]
|
|
242
|
+
);
|
|
243
|
+
}, n = new Set(` []()-–—'"“”`.split(""));
|
|
244
|
+
function u(c) {
|
|
245
|
+
return n.has(c);
|
|
246
|
+
}
|
|
247
|
+
function d(c, o, v, k, l, y, h) {
|
|
248
|
+
if (c === k)
|
|
249
|
+
return [0, [[0, c.length - 1]]];
|
|
250
|
+
var i = k.length, b = o.length, w = l.length;
|
|
251
|
+
if (o === l)
|
|
252
|
+
return [0.1, [[0, b - 1]]];
|
|
253
|
+
if (o.startsWith(l))
|
|
254
|
+
return [0.5, [[0, w - 1]]];
|
|
255
|
+
var M = c.indexOf(k);
|
|
256
|
+
if (M > -1 && u(c[M - 1]))
|
|
257
|
+
return [0.9, [[M, M + i - 1]]];
|
|
258
|
+
var $ = o.indexOf(l);
|
|
259
|
+
if ($ > -1 && u(o[$ - 1]))
|
|
260
|
+
return [1, [[$, $ + i - 1]]];
|
|
261
|
+
var L = y.length;
|
|
262
|
+
if (L > 1 && y.every(function(E) {
|
|
263
|
+
return v.has(E);
|
|
264
|
+
})) {
|
|
265
|
+
var z = 1.5 + L * 0.2;
|
|
266
|
+
return [z, y.map(function(E) {
|
|
267
|
+
var W = o.indexOf(E);
|
|
268
|
+
return [W, W + E.length - 1];
|
|
269
|
+
}).sort(r)];
|
|
270
|
+
}
|
|
271
|
+
return $ > -1 ? [2, [[$, $ + i - 1]]] : h === "aggressive" ? _(o, l) : h === "smart" ? S(o, l) : null;
|
|
272
|
+
}
|
|
273
|
+
function _(c, o) {
|
|
274
|
+
for (var v = c.length, k = o.length, l = 0, y = o[l], h = [], i = -1, b = -2, w = 0; w < v; w += 1)
|
|
275
|
+
if (c[w] === y) {
|
|
276
|
+
if (w !== b + 1 && (i >= 0 && h.push([i, b]), i = w), b = w, l += 1, l === k)
|
|
277
|
+
return h.push([i, b]), p(h, c);
|
|
278
|
+
y = o[l];
|
|
279
|
+
}
|
|
280
|
+
return null;
|
|
281
|
+
}
|
|
282
|
+
function S(c, o) {
|
|
283
|
+
for (var v = c.length, k = [], l = 0, y = o[l], h = -1, i = -2; ; ) {
|
|
284
|
+
var b = c.indexOf(y, i + 1);
|
|
285
|
+
if (b === -1)
|
|
286
|
+
break;
|
|
287
|
+
if (b === 0 || u(c[b - 1]))
|
|
288
|
+
h = b;
|
|
289
|
+
else {
|
|
290
|
+
var w = o.length - l, M = c.length - b, $ = Math.min(3, w, M), L = o.slice(l, l + $);
|
|
291
|
+
if (c.slice(b, b + $) === L)
|
|
292
|
+
h = b;
|
|
293
|
+
else {
|
|
294
|
+
i += 1;
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
for (i = h; i < v && c[i] === y; i += 1)
|
|
299
|
+
l += 1, y = o[l];
|
|
300
|
+
if (i -= 1, k.push([h, i]), l === o.length)
|
|
301
|
+
return p(k, c);
|
|
302
|
+
}
|
|
303
|
+
return null;
|
|
304
|
+
}
|
|
305
|
+
function p(c, o) {
|
|
306
|
+
var v = 2;
|
|
307
|
+
return c.forEach(function(k) {
|
|
308
|
+
var l = k[0], y = k[1], h = y - l + 1, i = l === 0 || o[l] === " " || o[l - 1] === " ", b = y === o.length - 1 || o[y] === " " || o[y + 1] === " ", w = i && b;
|
|
309
|
+
w ? v += 0.2 : i ? v += 0.4 : h >= 3 ? v += 0.8 : v += 1.6;
|
|
310
|
+
}), [v, c];
|
|
311
|
+
}
|
|
312
|
+
function g(c, o) {
|
|
313
|
+
var v = (0, e.default)(o), k = v.split(" "), l = (0, e.default)(c), y = new Set(l.split(" ")), h = d(c, l, y, o, v, k, "smart");
|
|
314
|
+
return h ? {
|
|
315
|
+
item: c,
|
|
316
|
+
score: h[0],
|
|
317
|
+
matches: [h[1]]
|
|
318
|
+
} : null;
|
|
319
|
+
}
|
|
320
|
+
function q(c, o) {
|
|
321
|
+
var v = o.strategy, k = v === void 0 ? "aggressive" : v, l = o.getText, y = c.map(function(h) {
|
|
322
|
+
var i;
|
|
323
|
+
if (l)
|
|
324
|
+
i = l(h);
|
|
325
|
+
else {
|
|
326
|
+
var b = o.key ? h[o.key] : h;
|
|
327
|
+
i = [b];
|
|
328
|
+
}
|
|
329
|
+
var w = i.map(function(M) {
|
|
330
|
+
var $ = M || "", L = (0, e.default)($), z = new Set(L.split(" "));
|
|
331
|
+
return [$, L, z];
|
|
332
|
+
});
|
|
333
|
+
return [h, w];
|
|
334
|
+
});
|
|
335
|
+
return function(h) {
|
|
336
|
+
var i = [], b = (0, e.default)(h), w = b.split(" ");
|
|
337
|
+
return b.length ? (y.forEach(function(M) {
|
|
338
|
+
for (var $ = M[0], L = M[1], z = a, E = [], W = 0, fe = L.length; W < fe; W += 1) {
|
|
339
|
+
var P = L[W], pe = P[0], ve = P[1], he = P[2], A = d(pe, ve, he, h, b, w, k);
|
|
340
|
+
A ? (z = Math.min(z, A[0]), E.push(A[1])) : E.push(null);
|
|
341
|
+
}
|
|
342
|
+
z < a && i.push({
|
|
343
|
+
item: $,
|
|
344
|
+
score: z,
|
|
345
|
+
matches: E
|
|
346
|
+
});
|
|
347
|
+
}), i.sort(s), i) : [];
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
return F;
|
|
351
|
+
}
|
|
352
|
+
var ae;
|
|
353
|
+
function Te() {
|
|
354
|
+
return ae || (ae = 1, function(e) {
|
|
355
|
+
e.__esModule = !0, e.default = s, e.fuzzyMatch = r;
|
|
356
|
+
var t = a(de());
|
|
357
|
+
e.normalizeText = t.default;
|
|
358
|
+
function a(n) {
|
|
359
|
+
return n && n.__esModule ? n : { default: n };
|
|
360
|
+
}
|
|
361
|
+
function s(n, u) {
|
|
362
|
+
return u === void 0 && (u = {}), re().createFuzzySearchImpl(n, u);
|
|
363
|
+
}
|
|
364
|
+
function r(n, u) {
|
|
365
|
+
return re().fuzzyMatchImpl(n, u);
|
|
366
|
+
}
|
|
367
|
+
}(K)), K;
|
|
368
|
+
}
|
|
369
|
+
var ze = Te();
|
|
370
|
+
const Ee = /* @__PURE__ */ le(ze), Fe = { key: 0 }, We = ["colspan"], Ce = ["innerHTML"], et = /* @__PURE__ */ N({
|
|
219
371
|
__name: "Table",
|
|
220
372
|
props: {
|
|
221
373
|
zebra: { type: Boolean, default: !1 },
|
|
222
374
|
pinRows: { type: Boolean, default: !1 },
|
|
223
375
|
pinCols: { type: Boolean, default: !1 },
|
|
224
|
-
size: { default:
|
|
376
|
+
size: { default: ie.MD },
|
|
225
377
|
columns: {},
|
|
226
378
|
dataSource: {},
|
|
227
|
-
ajax: {}
|
|
379
|
+
ajax: {},
|
|
380
|
+
searchValue: {},
|
|
381
|
+
searchFunction: {}
|
|
228
382
|
},
|
|
229
383
|
setup(e) {
|
|
230
|
-
const t =
|
|
231
|
-
"table-zebra":
|
|
232
|
-
"table-pin-rows":
|
|
233
|
-
"table-pin-cols ":
|
|
234
|
-
}));
|
|
235
|
-
|
|
384
|
+
const t = B([]), a = B([]), s = B(null), r = e, n = B(D("table", `table-${Me.toClassName(r.size)}`, {
|
|
385
|
+
"table-zebra": r.zebra,
|
|
386
|
+
"table-pin-rows": r.pinRows,
|
|
387
|
+
"table-pin-cols ": r.pinCols
|
|
388
|
+
})), u = (_, S) => String(!_ || typeof _ != "object" ? _ : S.split(".").reduce((p, g) => p && (typeof p == "object" ? p[g] : p), _));
|
|
389
|
+
Z(() => {
|
|
390
|
+
t.value = r.dataSource, a.value = r.dataSource;
|
|
391
|
+
}), V(() => r.dataSource, (_) => {
|
|
392
|
+
t.value = _, a.value = _;
|
|
393
|
+
}, { immediate: !0 }), V(() => r.searchValue, (_) => {
|
|
394
|
+
if (r.searchFunction) {
|
|
395
|
+
a.value = r.searchFunction(_ ?? "");
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
a.value = _ ? d(_) : t.value;
|
|
399
|
+
}, { immediate: !0 });
|
|
400
|
+
const d = (_) => {
|
|
401
|
+
const S = [];
|
|
402
|
+
return t.value.length > 0 ? (Object.keys(t.value[0]).forEach((g) => {
|
|
403
|
+
const q = t.value.map((v) => u(v, g)), o = Ee(q)(_);
|
|
404
|
+
for (const v of o) {
|
|
405
|
+
const k = t.value.filter((l) => u(l, g) === v.item);
|
|
406
|
+
S.push(...k);
|
|
407
|
+
}
|
|
408
|
+
}), S) : [];
|
|
409
|
+
};
|
|
410
|
+
return (_, S) => (f(), m("table", {
|
|
236
411
|
ref_key: "table",
|
|
237
|
-
ref:
|
|
238
|
-
class:
|
|
239
|
-
},
|
|
412
|
+
ref: s,
|
|
413
|
+
class: C(n.value)
|
|
414
|
+
}, [
|
|
415
|
+
x("thead", null, [
|
|
416
|
+
x("tr", null, [
|
|
417
|
+
(f(!0), m(R, null, X(r.columns, (p) => (f(), m("th", {
|
|
418
|
+
key: p.title
|
|
419
|
+
}, G(p.title), 1))), 128))
|
|
420
|
+
])
|
|
421
|
+
]),
|
|
422
|
+
x("tbody", null, [
|
|
423
|
+
a.value.length === 0 ? (f(), m("tr", Fe, [
|
|
424
|
+
x("td", {
|
|
425
|
+
colspan: r.columns.length
|
|
426
|
+
}, " No data found ", 8, We)
|
|
427
|
+
])) : (f(!0), m(R, { key: 1 }, X(a.value, (p) => (f(), m("tr", {
|
|
428
|
+
key: String(p)
|
|
429
|
+
}, [
|
|
430
|
+
(f(!0), m(R, null, X(r.columns, (g) => (f(), m("td", {
|
|
431
|
+
key: g.title
|
|
432
|
+
}, [
|
|
433
|
+
g.render ? O("", !0) : (f(), m(R, { key: 0 }, [
|
|
434
|
+
ce(G(u(p, g.data)), 1)
|
|
435
|
+
], 64)),
|
|
436
|
+
typeof g.render == "function" ? (f(), m(R, { key: 1 }, [
|
|
437
|
+
typeof g.render(u(p, g.data), p) == "string" ? (f(), m("div", {
|
|
438
|
+
key: 0,
|
|
439
|
+
innerHTML: g.render(u(p, g.data), p)
|
|
440
|
+
}, null, 8, Ce)) : (f(), U(ue(g.render(u(p, g.data), p)), { key: 1 }))
|
|
441
|
+
], 64)) : O("", !0)
|
|
442
|
+
]))), 128))
|
|
443
|
+
]))), 128))
|
|
444
|
+
])
|
|
445
|
+
], 2));
|
|
240
446
|
}
|
|
241
|
-
}),
|
|
447
|
+
}), tt = /* @__PURE__ */ N({
|
|
242
448
|
__name: "Stepper",
|
|
243
449
|
props: {
|
|
244
450
|
value: {}
|
|
245
451
|
},
|
|
246
452
|
emits: ["update:value"],
|
|
247
|
-
setup(e, { expose: t, emit:
|
|
248
|
-
const
|
|
249
|
-
r.value =
|
|
453
|
+
setup(e, { expose: t, emit: a }) {
|
|
454
|
+
const s = e, r = B(s.value), n = a, u = (d) => {
|
|
455
|
+
r.value = d, n("update:value", d);
|
|
250
456
|
};
|
|
251
|
-
return
|
|
457
|
+
return be("stepper", {
|
|
252
458
|
value: r,
|
|
253
|
-
updateValue:
|
|
254
|
-
}),
|
|
255
|
-
r.value =
|
|
459
|
+
updateValue: u
|
|
460
|
+
}), V(() => s.value, (d) => {
|
|
461
|
+
r.value = d;
|
|
256
462
|
}), t({
|
|
257
|
-
updateValue:
|
|
258
|
-
}), (
|
|
463
|
+
updateValue: u
|
|
464
|
+
}), (d, _) => T(d.$slots, "default", { updateValue: u });
|
|
259
465
|
}
|
|
260
|
-
}),
|
|
466
|
+
}), nt = /* @__PURE__ */ N({
|
|
261
467
|
__name: "Step",
|
|
262
468
|
props: {
|
|
263
469
|
value: {}
|
|
264
470
|
},
|
|
265
471
|
setup(e) {
|
|
266
|
-
const t = e,
|
|
267
|
-
return
|
|
268
|
-
r && t.value && (
|
|
269
|
-
}),
|
|
270
|
-
|
|
271
|
-
}), (r, n) => (
|
|
272
|
-
class:
|
|
472
|
+
const t = e, a = j("stepper"), s = B("");
|
|
473
|
+
return V(() => a == null ? void 0 : a.value.value, (r) => {
|
|
474
|
+
r && t.value && (s.value = Number(r) >= Number(t.value) ? "step-primary" : "");
|
|
475
|
+
}), Z(() => {
|
|
476
|
+
a && (s.value = a.value.value === t.value ? "step-primary" : "", Number(a.value.value) >= Number(t.value) && (s.value = "step-primary"));
|
|
477
|
+
}), (r, n) => (f(), m("li", {
|
|
478
|
+
class: C(["step", s.value])
|
|
273
479
|
}, [
|
|
274
|
-
|
|
480
|
+
T(r.$slots, "default")
|
|
275
481
|
], 2));
|
|
276
482
|
}
|
|
277
|
-
}),
|
|
278
|
-
function
|
|
279
|
-
return
|
|
280
|
-
|
|
483
|
+
}), Re = {}, Oe = { class: "steps" };
|
|
484
|
+
function Ve(e, t) {
|
|
485
|
+
return f(), m("ul", Oe, [
|
|
486
|
+
T(e.$slots, "default")
|
|
281
487
|
]);
|
|
282
488
|
}
|
|
283
|
-
const
|
|
489
|
+
const rt = /* @__PURE__ */ Y(Re, [["render", Ve]]), De = { key: 0 }, at = /* @__PURE__ */ N({
|
|
284
490
|
__name: "StepPanels",
|
|
285
491
|
setup(e) {
|
|
286
|
-
const t =
|
|
287
|
-
return (
|
|
492
|
+
const t = j("stepper");
|
|
493
|
+
return (a, s) => (f(), U(me, {
|
|
288
494
|
name: "fade",
|
|
289
495
|
mode: "out-in"
|
|
290
496
|
}, {
|
|
291
|
-
default:
|
|
497
|
+
default: oe(() => {
|
|
292
498
|
var r, n;
|
|
293
499
|
return [
|
|
294
|
-
(r =
|
|
295
|
-
|
|
296
|
-
currentStep: (n =
|
|
500
|
+
(r = Q(t)) != null && r.value ? (f(), m("div", De, [
|
|
501
|
+
T(a.$slots, "default", {
|
|
502
|
+
currentStep: (n = Q(t)) == null ? void 0 : n.value
|
|
297
503
|
})
|
|
298
|
-
])) :
|
|
504
|
+
])) : O("", !0)
|
|
299
505
|
];
|
|
300
506
|
}),
|
|
301
507
|
_: 3
|
|
302
508
|
}));
|
|
303
509
|
}
|
|
304
|
-
}),
|
|
510
|
+
}), qe = { key: 0 }, st = /* @__PURE__ */ N({
|
|
305
511
|
__name: "StepPanel",
|
|
306
512
|
props: {
|
|
307
513
|
value: {}
|
|
308
514
|
},
|
|
309
515
|
setup(e, { expose: t }) {
|
|
310
|
-
const
|
|
311
|
-
|
|
516
|
+
const a = se(() => s == null ? void 0 : s.value.value), s = j("stepper"), r = (n) => {
|
|
517
|
+
s && s.updateValue(n.toString());
|
|
312
518
|
};
|
|
313
519
|
return t({
|
|
314
520
|
activateCallback: r
|
|
315
|
-
}), (n,
|
|
316
|
-
|
|
317
|
-
])) :
|
|
521
|
+
}), (n, u) => n.value === a.value ? (f(), m("div", qe, [
|
|
522
|
+
T(n.$slots, "default", { activateCallback: r })
|
|
523
|
+
])) : O("", !0);
|
|
318
524
|
}
|
|
319
|
-
}),
|
|
525
|
+
}), Pe = { className: "modal-box" }, Ae = {
|
|
320
526
|
key: 0,
|
|
321
527
|
method: "dialog"
|
|
322
|
-
},
|
|
528
|
+
}, ut = /* @__PURE__ */ N({
|
|
323
529
|
__name: "Modal",
|
|
324
530
|
props: {
|
|
325
531
|
closeButton: { type: Boolean, default: !0 },
|
|
326
532
|
overflow: { type: Boolean, default: !1 }
|
|
327
533
|
},
|
|
328
534
|
emits: ["close"],
|
|
329
|
-
setup(e, { expose: t, emit:
|
|
330
|
-
const
|
|
535
|
+
setup(e, { expose: t, emit: a }) {
|
|
536
|
+
const s = B(null), r = a, u = B(D("modal", {
|
|
331
537
|
"overflow-visible": e.overflow
|
|
332
538
|
}));
|
|
333
539
|
return t({
|
|
334
540
|
showModal: () => {
|
|
335
|
-
var
|
|
336
|
-
(
|
|
541
|
+
var S;
|
|
542
|
+
(S = s.value) == null || S.showModal();
|
|
337
543
|
},
|
|
338
544
|
closeModal: () => {
|
|
339
|
-
var
|
|
340
|
-
(
|
|
545
|
+
var S;
|
|
546
|
+
(S = s.value) == null || S.close();
|
|
341
547
|
}
|
|
342
|
-
}), (
|
|
548
|
+
}), (S, p) => (f(), m("dialog", {
|
|
343
549
|
ref_key: "modal",
|
|
344
|
-
ref:
|
|
345
|
-
class:
|
|
550
|
+
ref: s,
|
|
551
|
+
class: C(u.value),
|
|
346
552
|
"aria-modal": "true",
|
|
347
553
|
"aria-hidden": "true",
|
|
348
554
|
role: "dialog",
|
|
349
|
-
onClose:
|
|
555
|
+
onClose: p[0] || (p[0] = (g) => r("close", g))
|
|
350
556
|
}, [
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
]))) :
|
|
355
|
-
|
|
557
|
+
x("div", Pe, [
|
|
558
|
+
S.closeButton ? (f(), m("form", Ae, p[1] || (p[1] = [
|
|
559
|
+
x("button", { className: "btn btn-sm btn-circle btn-ghost absolute right-2 top-2" }, "✕", -1)
|
|
560
|
+
]))) : O("", !0),
|
|
561
|
+
T(S.$slots, "default")
|
|
356
562
|
])
|
|
357
563
|
], 34));
|
|
358
564
|
}
|
|
359
|
-
}),
|
|
565
|
+
}), Xe = { class: "hidden w-full max-w-sm lg:flex" }, Ie = { class: "relative mx-3 w-full" }, Ke = { class: "w-full max-w-full relative" }, He = ["value"], ot = /* @__PURE__ */ N({
|
|
360
566
|
__name: "SearchBar",
|
|
361
|
-
|
|
567
|
+
props: ["modelValue"],
|
|
568
|
+
emits: ["update:modelValue"],
|
|
362
569
|
setup(e, { emit: t }) {
|
|
363
|
-
const s =
|
|
364
|
-
(
|
|
570
|
+
const a = e, s = B(null), r = t, n = (u) => {
|
|
571
|
+
(u.ctrlKey || u.metaKey) && u.key.toLowerCase() === "k" && (u.preventDefault(), s.value && s.value.focus());
|
|
365
572
|
};
|
|
366
|
-
return
|
|
367
|
-
document.addEventListener("keydown",
|
|
368
|
-
}),
|
|
369
|
-
document.removeEventListener("keydown",
|
|
370
|
-
}), (
|
|
371
|
-
|
|
372
|
-
|
|
573
|
+
return Z(() => {
|
|
574
|
+
document.addEventListener("keydown", n);
|
|
575
|
+
}), _e(() => {
|
|
576
|
+
document.removeEventListener("keydown", n);
|
|
577
|
+
}), (u, d) => (f(), m("div", Xe, [
|
|
578
|
+
x("label", Ie, [
|
|
579
|
+
d[1] || (d[1] = x("svg", {
|
|
373
580
|
class: "pointer-events-none absolute z-10 my-3.5 ms-4 opacity-60 text-base-content",
|
|
374
581
|
"aria-hidden": "true",
|
|
375
582
|
width: "16",
|
|
@@ -377,32 +584,33 @@ const be = /* @__PURE__ */ L(F, [["render", J]]), Q = { key: 0 }, me = /* @__PUR
|
|
|
377
584
|
viewBox: "0.48 0.48 23.04 23.04",
|
|
378
585
|
fill: "currentColor"
|
|
379
586
|
}, [
|
|
380
|
-
|
|
587
|
+
x("path", {
|
|
381
588
|
fill: "none",
|
|
382
589
|
d: "M0 0h24v24H0z"
|
|
383
590
|
}),
|
|
384
|
-
|
|
591
|
+
x("path", { d: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })
|
|
385
592
|
], -1)),
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
593
|
+
x("div", Ke, [
|
|
594
|
+
x("form", null, [
|
|
595
|
+
x("input", {
|
|
389
596
|
ref_key: "searchInput",
|
|
390
597
|
ref: s,
|
|
391
598
|
type: "search",
|
|
392
599
|
placeholder: "Zoeken...",
|
|
393
|
-
|
|
600
|
+
value: a.modelValue,
|
|
601
|
+
onInput: d[0] || (d[0] = (_) => r("update:modelValue", _.target.value)),
|
|
394
602
|
class: "bg-transparent color-[inherit] border-[2px] border-solid border-transparent focus:border-[2px] focus:border-base-200 focus:outline-none rounded-xl w-full px-3 py-2 ps-10"
|
|
395
|
-
}, null,
|
|
603
|
+
}, null, 40, He)
|
|
396
604
|
])
|
|
397
605
|
]),
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
606
|
+
d[2] || (d[2] = x("div", { class: "pointer-events-none absolute end-10 top-2.5 gap-1 opacity-50 rtl:flex-row-reverse hidden lg:flex" }, [
|
|
607
|
+
x("kbd", { class: "kbd kbd-sm" }, "ctrl"),
|
|
608
|
+
x("kbd", { class: "kbd kbd-sm" }, "K")
|
|
401
609
|
], -1))
|
|
402
610
|
])
|
|
403
611
|
]));
|
|
404
612
|
}
|
|
405
|
-
}),
|
|
613
|
+
}), ct = [
|
|
406
614
|
"bg-primary",
|
|
407
615
|
"bg-primary-content",
|
|
408
616
|
"bg-secondary",
|
|
@@ -488,22 +696,23 @@ const be = /* @__PURE__ */ L(F, [["render", J]]), Q = { key: 0 }, me = /* @__PUR
|
|
|
488
696
|
"block"
|
|
489
697
|
];
|
|
490
698
|
export {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
699
|
+
Ue as Button,
|
|
700
|
+
je as Card,
|
|
701
|
+
Je as CardBody,
|
|
702
|
+
Ye as CardTitle,
|
|
703
|
+
J as Color,
|
|
704
|
+
ge as ColorUtils,
|
|
705
|
+
Qe as Container,
|
|
706
|
+
ut as Modal,
|
|
707
|
+
ot as SearchBar,
|
|
708
|
+
Ze as SimpleButton,
|
|
709
|
+
ie as Size,
|
|
710
|
+
Me as SizeUtils,
|
|
711
|
+
nt as Step,
|
|
712
|
+
rt as StepList,
|
|
713
|
+
st as StepPanel,
|
|
714
|
+
at as StepPanels,
|
|
715
|
+
tt as Stepper,
|
|
716
|
+
et as Table,
|
|
717
|
+
ct as dendelionSafeList
|
|
509
718
|
};
|