vlite3 1.5.4 → 1.5.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/README.md +105 -0
- package/VLiteIconsVite.d.ts +36 -0
- package/components/AppShell/AppShell.vue.d.ts +1 -1
- package/components/AppShell/AppShellLayoutDashboard.vue.js +3 -2
- package/components/AppShell/AppShellLayoutDock.vue.js +3 -2
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +28 -27
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +3 -2
- package/components/AsyncSelect/createAsyncSelect.d.ts +4 -4
- package/components/AsyncSelect/createAsyncSelect.js +3 -2
- package/components/BackButton.vue.d.ts +1 -1
- package/components/Calendar/Calendar.vue.js +1 -1
- package/components/Calendar/Calendar.vue2.js +29 -29
- package/components/CategoryManager/CategoryManager.vue2.js +14 -14
- package/components/CategoryManager/CategoryNode.vue.js +16 -16
- package/components/CategoryMenu/CategoryMenu.vue.js +9 -8
- package/components/Chart/BarChart.vue.d.ts +1 -1
- package/components/Chart/GanttChart.vue.d.ts +3 -1
- package/components/Chart/GanttChart.vue.js +2 -2
- package/components/Chart/GanttChart.vue2.js +591 -656
- package/components/Chart/LineChart.vue.d.ts +1 -1
- package/components/Chart/TimelineChart.vue.d.ts +1 -1
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/ConfirmationModal.vue.d.ts +4 -0
- package/components/ConfirmationModal.vue.js +47 -39
- package/components/DataTable/DataTable.vue.js +319 -294
- package/components/DataTable/DataTableRow.vue.d.ts +2 -0
- package/components/DataTable/DataTableRow.vue.js +2 -2
- package/components/DataTable/DataTableRow.vue2.js +57 -54
- package/components/DataTable/types.d.ts +2 -0
- package/components/DatePicker.vue.js +5 -4
- package/components/Empty/Empty.vue.js +3 -2
- package/components/ExportData/ExportData.vue.d.ts +1 -1
- package/components/Form/Form.vue2.js +44 -43
- package/components/Form/FormField.vue.js +24 -24
- package/components/Heatmap/Heatmap.vue2.js +3 -2
- package/components/Icon.vue.d.ts +3 -2
- package/components/Icon.vue.js +22 -12
- package/components/IconPicker.vue.js +5 -133
- package/components/IconPicker.vue2.js +218 -2
- package/components/ImportData/ImportData.vue.js +3 -2
- package/components/ImportData/ImportStep2.vue.js +3 -2
- package/components/Kanban/KanbanBoard.vue2.js +4 -2
- package/components/List/utils.js +5 -4
- package/components/Masonry/Masonry.vue2.js +14 -13
- package/components/Navbar/Navbar.vue.d.ts +1 -1
- package/components/Price/Price.vue.js +13 -12
- package/components/QRCode/QRCode.vue.d.ts +1 -1
- package/components/Rating/Rating.vue.js +2 -2
- package/components/Rating/Rating.vue2.js +41 -41
- package/components/Rating/ReviewSummary.vue.js +20 -20
- package/components/ScaleGenerator/ScaleGenerator.vue.d.ts +1 -1
- package/components/Screen/ScreenFilter.vue.js +5 -3
- package/components/Screen/components/ScreenExportModal.vue.d.ts +2 -2
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +18 -18
- package/components/Stats/StatItem.vue.js +3 -2
- package/components/StatusChip/StatusChip.vue.js +6 -5
- package/components/Workbook/Sheet.vue.js +11 -11
- package/core/CoreScale.d.ts +18 -0
- package/core/CoreScale.js +44 -0
- package/core/config.d.ts +66 -32
- package/core/config.js +24 -12
- package/core/index.d.ts +3 -2
- package/core/index.js +44 -32
- package/icons/IconRegistry.d.ts +38 -0
- package/icons/IconRegistry.js +166 -0
- package/icons/IconTypes.d.ts +37 -0
- package/index.d.ts +3 -1
- package/index.js +478 -452
- package/package.json +15 -3
- package/style.css +45 -15
- package/types/config.type.d.ts +23 -0
- package/utils/functions.js +44 -43
- package/utils/index.d.ts +1 -0
- package/vite.d.ts +6 -0
- package/vite.js +223 -0
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Ge, computed as o, inject as He, getCurrentInstance as $e, onMounted as Me, onUnmounted as _, shallowRef as ee, watch as te, nextTick as Oe, openBlock as n, createElementBlock as c, withKeys as ye, withModifiers as ae, normalizeClass as
|
|
1
|
+
import { defineComponent as Ge, computed as o, inject as He, getCurrentInstance as $e, onMounted as Me, onUnmounted as _, shallowRef as ee, watch as te, nextTick as Oe, openBlock as n, createElementBlock as c, withKeys as ye, withModifiers as ae, normalizeClass as m, createElementVNode as p, createVNode as k, mergeProps as O, toDisplayString as j, renderSlot as he, unref as l, createCommentVNode as d, createBlock as C, withCtx as be, Fragment as je, renderList as Ke, isMemoSame as Ye } from "vue";
|
|
2
2
|
import { useForm as Je } from "./composables/useForm.js";
|
|
3
3
|
import X from "./FormFields.vue.js";
|
|
4
4
|
import Qe from "./FormField.vue.js";
|
|
@@ -8,6 +8,7 @@ import S from "../Button.vue.js";
|
|
|
8
8
|
import Ze from "../BackButton.vue.js";
|
|
9
9
|
import _e from "../Timeline/Timeline.vue.js";
|
|
10
10
|
import "@iconify/vue";
|
|
11
|
+
import "../../icons/IconRegistry.js";
|
|
11
12
|
import { resolveI18nText as et } from "../../utils/i18n.js";
|
|
12
13
|
/* empty css */
|
|
13
14
|
import { useVLiteConfig as tt } from "../../core/config.js";
|
|
@@ -25,13 +26,13 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
25
26
|
}, ct = {
|
|
26
27
|
key: 3,
|
|
27
28
|
class: "form-step"
|
|
28
|
-
},
|
|
29
|
+
}, mt = { class: "text-lg font-semibold text-foreground" }, vt = {
|
|
29
30
|
key: 0,
|
|
30
31
|
class: "text-sm text-muted-foreground mt-1"
|
|
31
32
|
}, ft = {
|
|
32
33
|
key: 0,
|
|
33
34
|
class: "flex gap-3 items-center"
|
|
34
|
-
},
|
|
35
|
+
}, It = /* @__PURE__ */ Ge({
|
|
35
36
|
__name: "Form",
|
|
36
37
|
props: {
|
|
37
38
|
schema: {},
|
|
@@ -139,8 +140,8 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
139
140
|
if (Array.isArray(t)) return t;
|
|
140
141
|
try {
|
|
141
142
|
const a = t({
|
|
142
|
-
values:
|
|
143
|
-
globalValues:
|
|
143
|
+
values: v.value,
|
|
144
|
+
globalValues: v.value,
|
|
144
145
|
isUpdate: i.isUpdate
|
|
145
146
|
});
|
|
146
147
|
return Array.isArray(a) ? a : [];
|
|
@@ -153,7 +154,7 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
153
154
|
const t = G.value, a = [];
|
|
154
155
|
for (let s = 0; s < t.length; s++) {
|
|
155
156
|
const x = t[s];
|
|
156
|
-
!Array.isArray(x) || x.length === 0 || x.some((
|
|
157
|
+
!Array.isArray(x) || x.length === 0 || x.some((ve) => R(ve)) && a.push({ schema: x, originalIndex: s });
|
|
157
158
|
}
|
|
158
159
|
return a;
|
|
159
160
|
}), Ae = o(
|
|
@@ -168,11 +169,11 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
168
169
|
t.set(`form-group-${a.originalIndex}`, a.schema);
|
|
169
170
|
return t;
|
|
170
171
|
}), h = o(() => u.value ? null : (T.value ? i.schema.flat() : i.schema).find((a) => at(a, {
|
|
171
|
-
values:
|
|
172
|
-
globalValues:
|
|
172
|
+
values: v.value,
|
|
173
|
+
globalValues: v.value,
|
|
173
174
|
isUpdate: i.isUpdate
|
|
174
175
|
}) === "thumbnailSelector") ?? null), P = o(() => !!h.value), {
|
|
175
|
-
formValues:
|
|
176
|
+
formValues: v,
|
|
176
177
|
errors: b,
|
|
177
178
|
isSubmitting: y,
|
|
178
179
|
fieldLoading: V,
|
|
@@ -213,7 +214,7 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
213
214
|
}
|
|
214
215
|
);
|
|
215
216
|
const M = (t, a) => {
|
|
216
|
-
re(t, a.value, a.data), f("onChange",
|
|
217
|
+
re(t, a.value, a.data), f("onChange", v.value);
|
|
217
218
|
}, Ve = async () => {
|
|
218
219
|
if (!u.value) return !0;
|
|
219
220
|
const t = ne.value;
|
|
@@ -253,11 +254,11 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
253
254
|
if (!a) return;
|
|
254
255
|
const s = a.tagName.toLowerCase();
|
|
255
256
|
s !== "textarea" && s !== "button" && (a.isContentEditable || (t.preventDefault(), w()));
|
|
256
|
-
},
|
|
257
|
+
}, me = (t) => {
|
|
257
258
|
(t.metaKey || t.ctrlKey) && t.key === "s" && (t.preventDefault(), w());
|
|
258
259
|
};
|
|
259
260
|
xe({
|
|
260
|
-
formValues:
|
|
261
|
+
formValues: v,
|
|
261
262
|
errors: b,
|
|
262
263
|
isSubmitting: y,
|
|
263
264
|
handleSubmit: w,
|
|
@@ -271,17 +272,17 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
271
272
|
f("onCancel"), g && g?.close?.();
|
|
272
273
|
};
|
|
273
274
|
return (t, a) => (n(), c("form", {
|
|
274
|
-
class:
|
|
275
|
+
class: m(["form-container", i.class, e.isPage && "pb-10"]),
|
|
275
276
|
onSubmit: ae(w, ["prevent"]),
|
|
276
277
|
onKeydown: [
|
|
277
278
|
Ee,
|
|
278
|
-
ye(ae(
|
|
279
|
-
ye(ae(
|
|
279
|
+
ye(ae(me, ["meta", "prevent"]), ["s"]),
|
|
280
|
+
ye(ae(me, ["ctrl", "prevent"]), ["s"])
|
|
280
281
|
]
|
|
281
282
|
}, [
|
|
282
283
|
e.isPage ? (n(), c("div", {
|
|
283
284
|
key: 0,
|
|
284
|
-
class:
|
|
285
|
+
class: m([
|
|
285
286
|
"form-page-header sticky top-0 z-30 bg-background flex items-center justify-between pb-3.5 pt-4 -mt-3.5 mb-4.5",
|
|
286
287
|
e.pageHeaderClass
|
|
287
288
|
])
|
|
@@ -292,12 +293,12 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
292
293
|
class: "max-sm:w-8 max-sm:h-8 max-sm:min-w-8 max-sm:min-h-8 max-sm:px-0 shrink-0"
|
|
293
294
|
}), null, 16, ["fallback"]),
|
|
294
295
|
p("h1", {
|
|
295
|
-
class:
|
|
296
|
+
class: m(["text-foreground max-sm:text-lg text-fs-5 truncate", e.pageTitleClass])
|
|
296
297
|
}, j(ke.value), 3)
|
|
297
298
|
]),
|
|
298
299
|
p("div", st, [
|
|
299
300
|
he(t.$slots, "header-actions", {
|
|
300
|
-
values: l(
|
|
301
|
+
values: l(v),
|
|
301
302
|
isSubmitting: l(y),
|
|
302
303
|
handleSubmit: w
|
|
303
304
|
}, void 0, !0),
|
|
@@ -315,7 +316,7 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
315
316
|
], 2)) : d("", !0),
|
|
316
317
|
!e.schemaLoading && u.value && se.value.length > 0 ? (n(), c("div", {
|
|
317
318
|
key: 1,
|
|
318
|
-
class:
|
|
319
|
+
class: m(["form-timeline", e.timelineTextPosition == "right" ? "mb-2" : "mb-8"])
|
|
319
320
|
}, [
|
|
320
321
|
k(l(_e), {
|
|
321
322
|
steps: se.value,
|
|
@@ -327,21 +328,21 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
327
328
|
}, null, 8, ["steps", "activeStep", "textPosition"])
|
|
328
329
|
], 2)) : d("", !0),
|
|
329
330
|
p("div", {
|
|
330
|
-
class:
|
|
331
|
+
class: m(e.footer && L.value ? "pb-2" : "")
|
|
331
332
|
}, [
|
|
332
333
|
e.schemaLoading ? (n(), C(We, {
|
|
333
334
|
key: 0,
|
|
334
335
|
isGrouped: T.value
|
|
335
336
|
}, null, 8, ["isGrouped"])) : (n(), c("div", {
|
|
336
337
|
key: 1,
|
|
337
|
-
class:
|
|
338
|
+
class: m(P.value ? "flex flex-col lg:flex-row gap-10 lg:gap-16" : "")
|
|
338
339
|
}, [
|
|
339
340
|
P.value ? (n(), c("div", nt, [
|
|
340
341
|
h.value && l(R)(h.value) ? (n(), C(Qe, {
|
|
341
342
|
key: 0,
|
|
342
343
|
field: h.value,
|
|
343
|
-
value: l(
|
|
344
|
-
values: l(
|
|
344
|
+
value: l(v)[h.value.name],
|
|
345
|
+
values: l(v),
|
|
345
346
|
errors: l(b),
|
|
346
347
|
variant: U.value,
|
|
347
348
|
size: I.value,
|
|
@@ -355,17 +356,17 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
355
356
|
}, null, 8, ["field", "value", "values", "errors", "variant", "size", "rounded", "disabled", "readonly", "error", "isUpdate", "loading"])) : d("", !0)
|
|
356
357
|
])) : d("", !0),
|
|
357
358
|
p("div", {
|
|
358
|
-
class:
|
|
359
|
+
class: m(P.value ? "flex-1 min-w-0 order-last lg:order-first" : "w-full")
|
|
359
360
|
}, [
|
|
360
361
|
T.value ? T.value && !u.value && e.groupLayout === "basic" ? (n(), c("div", {
|
|
361
362
|
key: 1,
|
|
362
|
-
class:
|
|
363
|
+
class: m(["form-groups space-y-6", e.groupContainerClass])
|
|
363
364
|
}, [
|
|
364
|
-
(n(!0), c(je, null, Ke(H.value, (s, x,
|
|
365
|
+
(n(!0), c(je, null, Ke(H.value, (s, x, ve, W) => {
|
|
365
366
|
const fe = [
|
|
366
367
|
s.schema,
|
|
367
368
|
s.originalIndex,
|
|
368
|
-
l(
|
|
369
|
+
l(v),
|
|
369
370
|
l(b),
|
|
370
371
|
l(V),
|
|
371
372
|
U.value,
|
|
@@ -383,7 +384,7 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
383
384
|
if (W && W.key === s.originalIndex && Ye(W, fe)) return W;
|
|
384
385
|
const ge = (n(), c("div", {
|
|
385
386
|
key: s.originalIndex,
|
|
386
|
-
class:
|
|
387
|
+
class: m([
|
|
387
388
|
"form-group overflow-hidden bg-body",
|
|
388
389
|
e.groupClass,
|
|
389
390
|
H.value.length > 1 ? "border rounded" : ""
|
|
@@ -391,17 +392,17 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
391
392
|
}, [
|
|
392
393
|
J.value?.[s.originalIndex] ? (n(), c("div", {
|
|
393
394
|
key: 0,
|
|
394
|
-
class:
|
|
395
|
+
class: m(["form-group-header bg-muted/50 px-4 py-2.5 border-b", e.headerClass])
|
|
395
396
|
}, [
|
|
396
397
|
p("h3", ut, j(J.value[s.originalIndex]), 1),
|
|
397
398
|
Q.value?.[s.originalIndex] ? (n(), c("p", dt, j(Q.value[s.originalIndex]), 1)) : d("", !0)
|
|
398
399
|
], 2)) : d("", !0),
|
|
399
400
|
p("div", {
|
|
400
|
-
class:
|
|
401
|
+
class: m(["form-group-body", [e.groupBodyClass, H.value.length > 1 ? "p-4.5" : ""]])
|
|
401
402
|
}, [
|
|
402
403
|
k(X, {
|
|
403
404
|
schema: s.schema,
|
|
404
|
-
values: l(
|
|
405
|
+
values: l(v),
|
|
405
406
|
errors: l(b),
|
|
406
407
|
fieldLoading: l(V),
|
|
407
408
|
variant: U.value,
|
|
@@ -423,18 +424,18 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
423
424
|
}, a, 3), 128))
|
|
424
425
|
], 2)) : T.value && !u.value && e.groupLayout === "accordion" ? (n(), c("div", {
|
|
425
426
|
key: 2,
|
|
426
|
-
class:
|
|
427
|
+
class: m(e.groupContainerClass)
|
|
427
428
|
}, [
|
|
428
429
|
k(Xe, {
|
|
429
430
|
variant: "solid",
|
|
430
431
|
items: Ae.value,
|
|
431
432
|
"allow-multiple": "",
|
|
432
|
-
class:
|
|
433
|
+
class: m(e.groupClass)
|
|
433
434
|
}, {
|
|
434
435
|
content: be(({ item: s }) => [
|
|
435
436
|
k(X, {
|
|
436
437
|
schema: Te.value.get(s.id) || [],
|
|
437
|
-
values: l(
|
|
438
|
+
values: l(v),
|
|
438
439
|
errors: l(b),
|
|
439
440
|
fieldLoading: l(V),
|
|
440
441
|
variant: U.value,
|
|
@@ -456,14 +457,14 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
456
457
|
], 2)) : u.value ? (n(), c("div", ct, [
|
|
457
458
|
e.tabs?.[r.value] ? (n(), c("div", {
|
|
458
459
|
key: 0,
|
|
459
|
-
class:
|
|
460
|
+
class: m(["form-step-header mb-6", e.headerClass])
|
|
460
461
|
}, [
|
|
461
|
-
p("h2",
|
|
462
|
-
e.tabs[r.value].description ? (n(), c("p",
|
|
462
|
+
p("h2", mt, j(e.tabs[r.value].title), 1),
|
|
463
|
+
e.tabs[r.value].description ? (n(), c("p", vt, j(e.tabs[r.value].description), 1)) : d("", !0)
|
|
463
464
|
], 2)) : d("", !0),
|
|
464
465
|
k(X, {
|
|
465
466
|
schema: ne.value,
|
|
466
|
-
values: l(
|
|
467
|
+
values: l(v),
|
|
467
468
|
errors: l(b),
|
|
468
469
|
fieldLoading: l(V),
|
|
469
470
|
variant: U.value,
|
|
@@ -482,7 +483,7 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
482
483
|
])) : d("", !0) : (n(), c("div", ot, [
|
|
483
484
|
k(X, {
|
|
484
485
|
schema: e.schema,
|
|
485
|
-
values: l(
|
|
486
|
+
values: l(v),
|
|
486
487
|
errors: l(b),
|
|
487
488
|
fieldLoading: l(V),
|
|
488
489
|
variant: U.value,
|
|
@@ -522,7 +523,7 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
522
523
|
}, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes", "layout"])
|
|
523
524
|
])),
|
|
524
525
|
he(t.$slots, "default", {
|
|
525
|
-
values: l(
|
|
526
|
+
values: l(v),
|
|
526
527
|
errors: l(b),
|
|
527
528
|
isSubmitting: l(y),
|
|
528
529
|
handleSubmit: w
|
|
@@ -534,7 +535,7 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
534
535
|
key: 2,
|
|
535
536
|
ref_key: "footerRef",
|
|
536
537
|
ref: F,
|
|
537
|
-
class:
|
|
538
|
+
class: m([
|
|
538
539
|
"form-footer items-center gap-3 z-20 rounded-b-md!",
|
|
539
540
|
e.isPage ? "flex sm:hidden" : "flex",
|
|
540
541
|
e.footerClass,
|
|
@@ -572,7 +573,7 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
572
573
|
}), null, 16, ["text", "loading"])) : d("", !0)
|
|
573
574
|
])) : d("", !0),
|
|
574
575
|
p("div", {
|
|
575
|
-
class:
|
|
576
|
+
class: m(["flex gap-3 items-center", [
|
|
576
577
|
u.value && "ml-auto",
|
|
577
578
|
!u.value || N.value ? "w-full justify-end" : ""
|
|
578
579
|
]])
|
|
@@ -615,5 +616,5 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
|
|
|
615
616
|
}
|
|
616
617
|
});
|
|
617
618
|
export {
|
|
618
|
-
|
|
619
|
+
It as default
|
|
619
620
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as q, markRaw as t, computed as c, openBlock as p, createBlock as v, mergeProps as g, toHandlers as
|
|
2
|
-
import { resolveFieldType as K, isComponent as
|
|
1
|
+
import { defineComponent as q, markRaw as t, computed as c, openBlock as p, createBlock as v, mergeProps as g, toHandlers as $, createSlots as G, unref as B, withCtx as m, createVNode as U, createTextVNode as z, toDisplayString as V, createCommentVNode as E, resolveDynamicComponent as J } from "vue";
|
|
2
|
+
import { resolveFieldType as K, isComponent as P, isAddonObject as D } from "./utils/form.utils.js";
|
|
3
3
|
import Q from "../NumberInput.vue.js";
|
|
4
|
-
import
|
|
4
|
+
import I from "../Button.vue.js";
|
|
5
5
|
import { resolveI18nText as X } from "../../utils/i18n.js";
|
|
6
6
|
import s from "../Input.vue.js";
|
|
7
7
|
/* empty css */
|
|
@@ -11,7 +11,7 @@ import O from "../FilePicker/index.vue.js";
|
|
|
11
11
|
import ee from "../AvatarUploader/AvatarUploader.vue.js";
|
|
12
12
|
import ae from "../ThumbnailSelector/ThumbnailSelector.vue.js";
|
|
13
13
|
import le from "../TagInput/TagInput.vue.js";
|
|
14
|
-
import
|
|
14
|
+
import A from "../Dropdown/Dropdown.vue.js";
|
|
15
15
|
import ie from "../MultiSelect/MultiSelect.vue.js";
|
|
16
16
|
import H from "../DatePicker.vue.js";
|
|
17
17
|
import te from "../DateRangePicker.vue.js";
|
|
@@ -41,7 +41,7 @@ const Be = /* @__PURE__ */ q({
|
|
|
41
41
|
},
|
|
42
42
|
emits: ["change", "addonChange", "addonAction"],
|
|
43
43
|
setup(d, { emit: j }) {
|
|
44
|
-
const
|
|
44
|
+
const S = {
|
|
45
45
|
text: t(s),
|
|
46
46
|
email: t(s),
|
|
47
47
|
password: t(s),
|
|
@@ -52,7 +52,7 @@ const Be = /* @__PURE__ */ q({
|
|
|
52
52
|
number: t(Q),
|
|
53
53
|
switch: t(Z),
|
|
54
54
|
check: t(_),
|
|
55
|
-
select: t(
|
|
55
|
+
select: t(A),
|
|
56
56
|
multiSelect: t(ie),
|
|
57
57
|
choiceBox: t(oe),
|
|
58
58
|
date: t(H),
|
|
@@ -67,7 +67,7 @@ const Be = /* @__PURE__ */ q({
|
|
|
67
67
|
thumbnailSelector: t(ae),
|
|
68
68
|
tags: t(le),
|
|
69
69
|
richTextEditor: t(se)
|
|
70
|
-
},
|
|
70
|
+
}, F = t(s), e = d, h = j, o = (a, l) => {
|
|
71
71
|
h("change", { value: a, data: l });
|
|
72
72
|
}, R = (a) => {
|
|
73
73
|
h("change", { value: a });
|
|
@@ -79,7 +79,7 @@ const Be = /* @__PURE__ */ q({
|
|
|
79
79
|
() => u.value === "number" && e.field.isSensitiveField === !0
|
|
80
80
|
), M = c(() => {
|
|
81
81
|
const a = u.value;
|
|
82
|
-
return
|
|
82
|
+
return P(a) ? t(a) : a === "number" ? x.value ? F : S.number : typeof a == "string" && a in S ? S[a] : F;
|
|
83
83
|
}), C = c(() => {
|
|
84
84
|
const a = u.value, { disabled: l, readonly: n, ...b } = e.field, i = {
|
|
85
85
|
...b,
|
|
@@ -335,7 +335,7 @@ const Be = /* @__PURE__ */ q({
|
|
|
335
335
|
label: e.field.label
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
|
-
return
|
|
338
|
+
return P(a) ? {
|
|
339
339
|
...i,
|
|
340
340
|
value: e.field.props?.multiple && (e.value === null || e.value === void 0) ? [] : e.value,
|
|
341
341
|
values: e.values
|
|
@@ -404,7 +404,7 @@ const Be = /* @__PURE__ */ q({
|
|
|
404
404
|
const n = e.value && typeof e.value == "object" ? e.value : { images: [], thumbnail: null };
|
|
405
405
|
o({ ...n, thumbnail: l });
|
|
406
406
|
}
|
|
407
|
-
} :
|
|
407
|
+
} : P(a) ? {
|
|
408
408
|
onChange: (l) => {
|
|
409
409
|
o(l.value, l.data);
|
|
410
410
|
}
|
|
@@ -412,24 +412,24 @@ const Be = /* @__PURE__ */ q({
|
|
|
412
412
|
}), Y = c(() => {
|
|
413
413
|
const a = u.value;
|
|
414
414
|
return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || !a;
|
|
415
|
-
}), W = c(() => Y.value || u.value === "textarea" || x.value),
|
|
415
|
+
}), W = c(() => Y.value || u.value === "textarea" || x.value), L = (a, l) => {
|
|
416
416
|
h("addonChange", a.name, { value: l.value });
|
|
417
|
-
},
|
|
417
|
+
}, T = (a) => {
|
|
418
418
|
a.action && h("addonAction", a.action);
|
|
419
419
|
};
|
|
420
|
-
return (a, l) => W.value ? (p(), v(s, g({ key: 0 }, C.value,
|
|
420
|
+
return (a, l) => W.value ? (p(), v(s, g({ key: 0 }, C.value, $(N.value)), G({ _: 2 }, [
|
|
421
421
|
B(D)(d.field.addonLeft) ? {
|
|
422
422
|
name: "addon-left",
|
|
423
423
|
fn: m(() => [
|
|
424
|
-
d.field.addonLeft.type === "select" ? (p(), v(
|
|
424
|
+
d.field.addonLeft.type === "select" ? (p(), v(A, g({
|
|
425
425
|
key: 0,
|
|
426
426
|
modelValue: d.field.addonLeft.name ? d.values[d.field.addonLeft.name] : void 0,
|
|
427
427
|
options: d.field.addonLeft.options || []
|
|
428
428
|
}, d.field.addonLeft.props || {}, {
|
|
429
|
-
onOnSelect: l[0] || (l[0] = (n) =>
|
|
429
|
+
onOnSelect: l[0] || (l[0] = (n) => L(d.field.addonLeft, n))
|
|
430
430
|
}), {
|
|
431
431
|
trigger: m(({ selectedLabel: n }) => [
|
|
432
|
-
U(
|
|
432
|
+
U(I, { variant: "outline" }, {
|
|
433
433
|
default: m(() => [
|
|
434
434
|
z(V(n), 1)
|
|
435
435
|
]),
|
|
@@ -437,11 +437,11 @@ const Be = /* @__PURE__ */ q({
|
|
|
437
437
|
}, 1024)
|
|
438
438
|
]),
|
|
439
439
|
_: 1
|
|
440
|
-
}, 16, ["modelValue", "options"])) : d.field.addonLeft.type === "button" ? (p(), v(
|
|
440
|
+
}, 16, ["modelValue", "options"])) : d.field.addonLeft.type === "button" ? (p(), v(I, g({
|
|
441
441
|
key: 1,
|
|
442
442
|
variant: "outline"
|
|
443
443
|
}, d.field.addonLeft.props || {}, {
|
|
444
|
-
onClick: l[1] || (l[1] = (n) =>
|
|
444
|
+
onClick: l[1] || (l[1] = (n) => T(d.field.addonLeft))
|
|
445
445
|
}), {
|
|
446
446
|
default: m(() => [
|
|
447
447
|
z(V(d.field.addonLeft.text), 1)
|
|
@@ -454,15 +454,15 @@ const Be = /* @__PURE__ */ q({
|
|
|
454
454
|
B(D)(d.field.addonRight) ? {
|
|
455
455
|
name: "addon-right",
|
|
456
456
|
fn: m(() => [
|
|
457
|
-
d.field.addonRight.type === "select" ? (p(), v(
|
|
457
|
+
d.field.addonRight.type === "select" ? (p(), v(A, g({
|
|
458
458
|
key: 0,
|
|
459
459
|
modelValue: d.field.addonRight.name ? d.values[d.field.addonRight.name] : void 0,
|
|
460
460
|
options: d.field.addonRight.options || []
|
|
461
461
|
}, d.field.addonRight.props || {}, {
|
|
462
|
-
onOnSelect: l[2] || (l[2] = (n) =>
|
|
462
|
+
onOnSelect: l[2] || (l[2] = (n) => L(d.field.addonRight, n))
|
|
463
463
|
}), {
|
|
464
464
|
trigger: m(({ selectedLabel: n }) => [
|
|
465
|
-
U(
|
|
465
|
+
U(I, { variant: "outline" }, {
|
|
466
466
|
default: m(() => [
|
|
467
467
|
z(V(n), 1)
|
|
468
468
|
]),
|
|
@@ -470,11 +470,11 @@ const Be = /* @__PURE__ */ q({
|
|
|
470
470
|
}, 1024)
|
|
471
471
|
]),
|
|
472
472
|
_: 1
|
|
473
|
-
}, 16, ["modelValue", "options"])) : d.field.addonRight.type === "button" ? (p(), v(
|
|
473
|
+
}, 16, ["modelValue", "options"])) : d.field.addonRight.type === "button" ? (p(), v(I, g({
|
|
474
474
|
key: 1,
|
|
475
475
|
variant: "outline"
|
|
476
476
|
}, d.field.addonRight.props || {}, {
|
|
477
|
-
onClick: l[3] || (l[3] = (n) =>
|
|
477
|
+
onClick: l[3] || (l[3] = (n) => T(d.field.addonRight))
|
|
478
478
|
}), {
|
|
479
479
|
default: m(() => [
|
|
480
480
|
z(V(d.field.addonRight.text), 1)
|
|
@@ -487,7 +487,7 @@ const Be = /* @__PURE__ */ q({
|
|
|
487
487
|
]), 1040)) : (p(), v(J(M.value), g({
|
|
488
488
|
key: 1,
|
|
489
489
|
class: u.value === "check" || u.value === "switch" && d.field.props?.switchVariant === "basic" ? "" : "w-full"
|
|
490
|
-
}, C.value,
|
|
490
|
+
}, C.value, $(N.value)), null, 16, ["class"]));
|
|
491
491
|
}
|
|
492
492
|
});
|
|
493
493
|
export {
|
|
@@ -2,6 +2,7 @@ import { defineComponent as te, ref as p, computed as c, onMounted as ae, nextTi
|
|
|
2
2
|
import ie from "../Tooltip.vue.js";
|
|
3
3
|
import { debounce as re } from "../../utils/functions.js";
|
|
4
4
|
import "../../core/config.js";
|
|
5
|
+
import "@vueuse/core";
|
|
5
6
|
const ue = ["onClick", "onMouseenter"], ce = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "heatmap-cell-label"
|
|
@@ -11,7 +12,7 @@ const ue = ["onClick", "onMouseenter"], ce = {
|
|
|
11
12
|
}, ve = {
|
|
12
13
|
key: 0,
|
|
13
14
|
class: "heatmap-legend"
|
|
14
|
-
}, me = { class: "heatmap-legend-colors" }, ge = ["title"],
|
|
15
|
+
}, me = { class: "heatmap-legend-colors" }, ge = ["title"], be = /* @__PURE__ */ te({
|
|
15
16
|
__name: "Heatmap",
|
|
16
17
|
props: {
|
|
17
18
|
data: {},
|
|
@@ -323,5 +324,5 @@ const ue = ["onClick", "onMouseenter"], ce = {
|
|
|
323
324
|
}
|
|
324
325
|
});
|
|
325
326
|
export {
|
|
326
|
-
|
|
327
|
+
be as default
|
|
327
328
|
};
|
package/components/Icon.vue.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { VLiteIconData } from '../icons/IconTypes';
|
|
1
2
|
type __VLS_Props = {
|
|
2
|
-
icon?: string;
|
|
3
|
+
icon?: string | VLiteIconData;
|
|
3
4
|
emoji?: string;
|
|
4
5
|
};
|
|
5
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
-
icon: string;
|
|
7
|
+
icon: string | VLiteIconData;
|
|
7
8
|
emoji: string;
|
|
8
9
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
9
10
|
export default _default;
|
package/components/Icon.vue.js
CHANGED
|
@@ -1,26 +1,36 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Icon as
|
|
3
|
-
|
|
1
|
+
import { defineComponent as p, computed as r, openBlock as i, createElementBlock as l, mergeProps as s, toDisplayString as d, createBlock as g, unref as v, createCommentVNode as h } from "vue";
|
|
2
|
+
import { Icon as k } from "@iconify/vue";
|
|
3
|
+
import { resolveVLiteIconForRendering as y } from "../icons/IconRegistry.js";
|
|
4
|
+
const j = ["src"], C = /* @__PURE__ */ p({
|
|
4
5
|
inheritAttrs: !1,
|
|
5
6
|
__name: "Icon",
|
|
6
7
|
props: {
|
|
7
8
|
icon: { default: "" },
|
|
8
9
|
emoji: { default: "" }
|
|
9
10
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const t =
|
|
12
|
-
|
|
11
|
+
setup(n) {
|
|
12
|
+
const t = n, o = r(() => {
|
|
13
|
+
const e = t.icon;
|
|
14
|
+
if (!e || typeof e != "string") return !1;
|
|
15
|
+
if (e.startsWith("http://") || e.startsWith("https://") || e.startsWith("data:image/"))
|
|
16
|
+
return !0;
|
|
17
|
+
const a = [".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".ico", ".avif"], m = e.toLowerCase();
|
|
18
|
+
return a.some((f) => m.endsWith(f));
|
|
19
|
+
}), c = r(() => !t.icon || o.value ? null : y(t.icon)), u = r(
|
|
20
|
+
() => o.value && typeof t.icon == "string" ? t.icon : ""
|
|
21
|
+
);
|
|
22
|
+
return (e, a) => n.emoji ? (i(), l("span", s({ key: 0 }, e.$attrs, { class: "inline-flex items-center justify-center font-normal" }), d(n.emoji), 17)) : n.icon && o.value ? (i(), l("img", s({
|
|
13
23
|
key: 1,
|
|
14
|
-
src:
|
|
15
|
-
},
|
|
24
|
+
src: u.value
|
|
25
|
+
}, e.$attrs, {
|
|
16
26
|
alt: "icon",
|
|
17
27
|
class: "rounded-full scale-105"
|
|
18
|
-
}), null, 16,
|
|
28
|
+
}), null, 16, j)) : c.value ? (i(), g(v(k), s({
|
|
19
29
|
key: 2,
|
|
20
|
-
icon:
|
|
21
|
-
},
|
|
30
|
+
icon: c.value
|
|
31
|
+
}, e.$attrs), null, 16, ["icon"])) : h("", !0);
|
|
22
32
|
}
|
|
23
33
|
});
|
|
24
34
|
export {
|
|
25
|
-
|
|
35
|
+
C as default
|
|
26
36
|
};
|