vlite3 0.9.2 → 0.9.4
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/components/Alert.vue.js +40 -38
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/Carousel/Carousel.vue.js +2 -2
- package/components/Carousel/Carousel.vue2.js +1 -1
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/DataTable/DataTable.vue.js +20 -20
- package/components/DataTable/DataTableRow.vue.js +1 -1
- package/components/DateTime/DateTime.vue.js +31 -0
- package/components/DateTime/DateTime.vue2.js +4 -0
- package/components/DateTime/index.d.ts +1 -0
- package/components/Dropdown/Dropdown.vue.js +37 -37
- package/components/Form/CustomFields.vue.d.ts +2 -0
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +125 -97
- package/components/Form/FormField.vue.js +128 -127
- package/components/Form/types.d.ts +1 -0
- package/components/List/ListFieldRow.vue.js +1 -1
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +1 -1
- package/components/NumberInput.vue2.js +45 -45
- package/components/Screen/Screen.vue.js +70 -70
- package/components/Screen/ScreenFilter.vue.js +3 -2
- package/components/Screen/components/ScreenEmptyState.vue.js +11 -10
- package/components/Screen/components/ScreenQuickFilters.vue.js +3 -3
- package/components/Screen/components/ScreenViewToggle.vue.js +5 -5
- package/components/Workbook/Sheet.vue.d.ts +1 -1
- package/components/Workbook/Workbook.vue.d.ts +1 -1
- package/core/config.d.ts +2 -2
- package/core/config.js +7 -7
- package/core/index.js +3 -3
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/package.json +1 -1
- package/style.css +9 -9
- package/types/config.type.d.ts +1 -1
- package/components/Date/Date.vue.js +0 -21
- package/components/Date/Date.vue2.js +0 -4
- package/components/Date/index.d.ts +0 -1
- /package/components/{Date/Date.vue.d.ts → DateTime/DateTime.vue.d.ts} +0 -0
package/components/Alert.vue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as V, ref as B, computed as t, useSlots as N, openBlock as
|
|
2
|
-
import
|
|
3
|
-
import { $t as
|
|
1
|
+
import { defineComponent as V, ref as B, computed as t, useSlots as N, openBlock as r, createElementBlock as i, normalizeClass as l, renderSlot as p, createBlock as S, createCommentVNode as a, createElementVNode as v, toDisplayString as f, createTextVNode as T, createVNode as j } from "vue";
|
|
2
|
+
import b from "./Icon.vue.js";
|
|
3
|
+
import { $t as m } from "../utils/i18n.js";
|
|
4
4
|
const D = ["role"], E = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "text-sm opacity-90 [&_p]:leading-relaxed"
|
|
@@ -18,67 +18,69 @@ const D = ["role"], E = {
|
|
|
18
18
|
class: { default: "" }
|
|
19
19
|
},
|
|
20
20
|
emits: ["close"],
|
|
21
|
-
setup(s, { emit:
|
|
22
|
-
const e = s,
|
|
23
|
-
u.value = !1,
|
|
24
|
-
}, d = t(() => e.titleI18n ?
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
setup(s, { emit: y }) {
|
|
22
|
+
const e = s, x = y, u = B(!0), h = () => {
|
|
23
|
+
u.value = !1, x("close");
|
|
24
|
+
}, d = t(() => e.titleI18n ? m(e.titleI18n) : e.title), c = t(
|
|
25
|
+
() => e.descriptionI18n ? m(e.descriptionI18n) : e.description
|
|
26
|
+
), k = t(() => ({
|
|
27
|
+
danger: "bg-danger-subtle text-danger-subtle-fg border-danger-subtle-border/20",
|
|
28
|
+
primary: "bg-primary-light text-primary-light-fg border-primary/10",
|
|
29
|
+
success: "bg-success-subtle text-success-subtle-fg border-success-subtle-border/20",
|
|
30
|
+
warning: "bg-warning-subtle text-warning-subtle-fg border-warning-subtle-border/20"
|
|
29
31
|
})[e.variant]), w = t(() => ({
|
|
30
|
-
primary: "text-primary!",
|
|
31
|
-
success: "text-success-
|
|
32
|
-
warning: "text-warning-
|
|
33
|
-
danger: "text-danger-
|
|
34
|
-
})[e.variant]),
|
|
32
|
+
primary: "text-primary-light-fg!",
|
|
33
|
+
success: "text-success-subtle-fg!",
|
|
34
|
+
warning: "text-warning-subtle-fg!",
|
|
35
|
+
danger: "text-danger-subtle-fg!"
|
|
36
|
+
})[e.variant]), o = t(() => !c.value && !N().default), C = t(() => [
|
|
35
37
|
"relative w-full rounded-lg border px-4 [&>svg]:absolute [&>svg]:left-4 [&>svg]:text-foreground",
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
o.value ? "py-3" : "pt-4 pb-2",
|
|
39
|
+
o.value ? "[&>svg]:top-1/2 [&>svg]:-translate-y-1/2" : "[&>svg]:top-4 top-4 [&>svg+div]:translate-y-[-3px]",
|
|
40
|
+
k.value,
|
|
39
41
|
e.class
|
|
40
42
|
].join(" ")), I = t(() => [
|
|
41
43
|
"font-medium leading-none tracking-tight text-inherit!",
|
|
42
|
-
|
|
44
|
+
o.value ? "" : "mb-1"
|
|
43
45
|
].join(" ")), $ = t(() => e.role ? e.role : ["danger", "warning"].includes(e.variant) ? "alert" : "status");
|
|
44
|
-
return (n, g) => u.value ? (
|
|
46
|
+
return (n, g) => u.value ? (r(), i("div", {
|
|
45
47
|
key: 0,
|
|
46
|
-
class:
|
|
48
|
+
class: l(C.value),
|
|
47
49
|
role: $.value
|
|
48
50
|
}, [
|
|
49
51
|
p(n.$slots, "icon", {}, () => [
|
|
50
|
-
s.icon ? (
|
|
52
|
+
s.icon ? (r(), S(b, {
|
|
51
53
|
key: 0,
|
|
52
54
|
icon: s.icon,
|
|
53
|
-
class:
|
|
54
|
-
}, null, 8, ["icon", "class"])) :
|
|
55
|
+
class: l(["h-4 w-4", w.value])
|
|
56
|
+
}, null, 8, ["icon", "class"])) : a("", !0)
|
|
55
57
|
]),
|
|
56
58
|
v("div", {
|
|
57
|
-
class:
|
|
59
|
+
class: l({ "pl-7": s.icon || n.$slots.icon, "pr-6": s.closable })
|
|
58
60
|
}, [
|
|
59
|
-
d.value ? (
|
|
61
|
+
d.value ? (r(), i("h5", {
|
|
60
62
|
key: 0,
|
|
61
|
-
class:
|
|
62
|
-
},
|
|
63
|
-
c.value || n.$slots.default ? (
|
|
63
|
+
class: l(I.value)
|
|
64
|
+
}, f(d.value), 3)) : a("", !0),
|
|
65
|
+
c.value || n.$slots.default ? (r(), i("div", E, [
|
|
64
66
|
p(n.$slots, "default", {}, () => [
|
|
65
|
-
T(
|
|
67
|
+
T(f(c.value), 1)
|
|
66
68
|
])
|
|
67
|
-
])) :
|
|
69
|
+
])) : a("", !0)
|
|
68
70
|
], 2),
|
|
69
|
-
s.closable ? (
|
|
71
|
+
s.closable ? (r(), i("button", {
|
|
70
72
|
key: 0,
|
|
71
73
|
type: "button",
|
|
72
|
-
onClick:
|
|
73
|
-
class:
|
|
74
|
+
onClick: h,
|
|
75
|
+
class: l(["absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", [o.value ? "top-1/2 -translate-y-1/2" : "top-4"]])
|
|
74
76
|
}, [
|
|
75
|
-
j(
|
|
77
|
+
j(b, {
|
|
76
78
|
icon: "lucide:x",
|
|
77
79
|
class: "h-4 w-4"
|
|
78
80
|
}),
|
|
79
81
|
g[0] || (g[0] = v("span", { class: "sr-only" }, "Close", -1))
|
|
80
|
-
], 2)) :
|
|
81
|
-
], 10, D)) :
|
|
82
|
+
], 2)) : a("", !0)
|
|
83
|
+
], 10, D)) : a("", !0);
|
|
82
84
|
}
|
|
83
85
|
});
|
|
84
86
|
export {
|
|
@@ -352,7 +352,7 @@ declare function __VLS_template(): {
|
|
|
352
352
|
};
|
|
353
353
|
}>> & Readonly<{
|
|
354
354
|
"onSlide-change"?: ((index: number) => any) | undefined;
|
|
355
|
-
}>, "focus" | "state" | "direction" | "
|
|
355
|
+
}>, "focus" | "state" | "direction" | "draggable" | "easing" | "goNext" | "gap" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "autoPlayInterval" | "itemsToShow" | "speed" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "goToSlide" | "goPrev" | "autoFocus" | "wheelOptions" | "canGoNext" | "canGoPrev"> & import('vue').ShallowUnwrapRef<{
|
|
356
356
|
goToSlide: (index: number, smooth?: boolean) => void;
|
|
357
357
|
goNext: (smooth?: boolean) => void;
|
|
358
358
|
goPrev: (smooth?: boolean) => void;
|
|
@@ -778,7 +778,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
778
778
|
};
|
|
779
779
|
}>> & Readonly<{
|
|
780
780
|
"onSlide-change"?: ((index: number) => any) | undefined;
|
|
781
|
-
}>, "focus" | "state" | "direction" | "
|
|
781
|
+
}>, "focus" | "state" | "direction" | "draggable" | "easing" | "goNext" | "gap" | "pagination" | "paginationSize" | "paginationVisibility" | "paginationHoverInitialTimeout" | "paginationHoverEdgeThreshold" | "autoPlay" | "autoPlayInterval" | "itemsToShow" | "speed" | "mousewheel" | "loop" | "currentItem" | "bufferSize" | "maxDomElements" | "goToSlide" | "goPrev" | "autoFocus" | "wheelOptions" | "canGoNext" | "canGoPrev"> & import('vue').ShallowUnwrapRef<{
|
|
782
782
|
goToSlide: (index: number, smooth?: boolean) => void;
|
|
783
783
|
goNext: (smooth?: boolean) => void;
|
|
784
784
|
goPrev: (smooth?: boolean) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Carousel.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e8fba320"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -6,7 +6,7 @@ const w = { class: "carousel-wrapper" }, V = /* @__PURE__ */ g({
|
|
|
6
6
|
props: {
|
|
7
7
|
data: { default: () => [] },
|
|
8
8
|
pagination: { type: [String, Array, Boolean], default: "dots" },
|
|
9
|
-
paginationSize: { default: "
|
|
9
|
+
paginationSize: { default: "sm" },
|
|
10
10
|
paginationPosition: { default: "bottom-center" },
|
|
11
11
|
paginationVisibility: {},
|
|
12
12
|
paginationHoverInitialTimeout: {},
|
|
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
|
|
|
4
4
|
import { $t as E } from "../../utils/i18n.js";
|
|
5
5
|
import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
|
|
6
6
|
import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
|
|
7
|
-
import ee from "./CommandPaletteItem.
|
|
7
|
+
import ee from "./CommandPaletteItem.vue2.js";
|
|
8
8
|
const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/60 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as pe, inject as ye, computed as r, ref as y, watch as g, openBlock as i, createElementBlock as m, createBlock as F, normalizeClass as T, createSlots as K, withCtx as D, renderSlot as x, createVNode as $, createCommentVNode as
|
|
1
|
+
import { defineComponent as pe, inject as ye, computed as r, ref as y, watch as g, openBlock as i, createElementBlock as m, createBlock as F, normalizeClass as T, createSlots as K, withCtx as D, renderSlot as x, createVNode as $, createCommentVNode as A, createElementVNode as f, Fragment as N, renderList as B, normalizeStyle as Y, isMemoSame as W, mergeProps as X, unref as q } from "vue";
|
|
2
2
|
import we from "../CheckBox.vue.js";
|
|
3
3
|
import Pe from "../Button.vue.js";
|
|
4
4
|
import Se from "../ConfirmationModal.vue.js";
|
|
@@ -69,7 +69,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
|
|
|
69
69
|
if (n in e[0]) return n;
|
|
70
70
|
}
|
|
71
71
|
return "_id";
|
|
72
|
-
}, Q = (e) => e.sortKey || e.field, a = o, b = G,
|
|
72
|
+
}, Q = (e) => e.sortKey || e.field, a = o, b = G, E = ye(xe, null), j = r(() => E?.disableSearch ? !1 : a.showSearch), R = r(() => E ? E.forceSelectable : !a.hideSelectable), d = r(() => J(a.rows, a.keyField)), u = y({ field: "", order: "" }), P = y(
|
|
73
73
|
a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10
|
|
74
74
|
), h = y(a.pageInfo?.currentPage || 1), p = y(a.search || ""), S = y(!1), Z = r(() => a.loading);
|
|
75
75
|
g(
|
|
@@ -81,7 +81,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
|
|
|
81
81
|
let V = null;
|
|
82
82
|
g(p, () => {
|
|
83
83
|
V && clearTimeout(V), V = setTimeout(() => {
|
|
84
|
-
h.value = 1,
|
|
84
|
+
h.value = 1, z();
|
|
85
85
|
}, 300);
|
|
86
86
|
}), g(
|
|
87
87
|
() => a.pageInfo?.itemsPerPage,
|
|
@@ -134,16 +134,16 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
|
|
|
134
134
|
}), b("update:selectedRows", t);
|
|
135
135
|
}, le = (e) => {
|
|
136
136
|
const t = a.headers.find((n) => n.field === e), l = t ? Q(t) : e;
|
|
137
|
-
u.value.field === l ? u.value.order === "asc" ? u.value.order = "desc" : u.value.order === "desc" ? (u.value.order = "", u.value.field = "") : u.value.order = "asc" : (u.value.field = l, u.value.order = "asc"), h.value = 1,
|
|
137
|
+
u.value.field === l ? u.value.order === "asc" ? u.value.order = "desc" : u.value.order === "desc" ? (u.value.order = "", u.value.field = "") : u.value.order = "asc" : (u.value.field = l, u.value.order = "asc"), h.value = 1, z();
|
|
138
138
|
}, ae = (e) => {
|
|
139
|
-
h.value = e,
|
|
139
|
+
h.value = e, z();
|
|
140
140
|
}, oe = (e) => {
|
|
141
|
-
P.value = e, h.value = 1, b("update:itemsPerPage", e),
|
|
141
|
+
P.value = e, h.value = 1, b("update:itemsPerPage", e), z();
|
|
142
142
|
}, se = (e) => b("rowClick", e), ne = () => {
|
|
143
143
|
b("delete", _.value), S.value = !1;
|
|
144
144
|
};
|
|
145
145
|
let U = null;
|
|
146
|
-
const
|
|
146
|
+
const z = () => {
|
|
147
147
|
U && clearTimeout(U), U = setTimeout(() => {
|
|
148
148
|
const e = {
|
|
149
149
|
pagination: { page: h.value, limit: P.value },
|
|
@@ -151,7 +151,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
|
|
|
151
151
|
search: p.value,
|
|
152
152
|
filter: {}
|
|
153
153
|
};
|
|
154
|
-
b("change", e),
|
|
154
|
+
b("change", e), E?.onTableChange?.(e);
|
|
155
155
|
}, 10);
|
|
156
156
|
};
|
|
157
157
|
g(
|
|
@@ -222,7 +222,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
|
|
|
222
222
|
]),
|
|
223
223
|
key: "2"
|
|
224
224
|
} : void 0
|
|
225
|
-
]), 1032, ["modelValue", "show-search", "placeholder", "placeholderI18n", "class", "search-class"])) :
|
|
225
|
+
]), 1032, ["modelValue", "show-search", "placeholder", "placeholderI18n", "class", "search-class"])) : A("", !0),
|
|
226
226
|
f("div", {
|
|
227
227
|
class: T(re.value)
|
|
228
228
|
}, [
|
|
@@ -237,7 +237,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
|
|
|
237
237
|
])
|
|
238
238
|
}, [
|
|
239
239
|
f("tr", Ee, [
|
|
240
|
-
|
|
240
|
+
R.value ? (i(), m("th", Re, [
|
|
241
241
|
f("div", ze, [
|
|
242
242
|
$(we, {
|
|
243
243
|
"model-value": M.value,
|
|
@@ -246,8 +246,8 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
|
|
|
246
246
|
"onUpdate:modelValue": ee
|
|
247
247
|
}, null, 8, ["model-value", "indeterminate"])
|
|
248
248
|
])
|
|
249
|
-
])) :
|
|
250
|
-
(i(!0), m(
|
|
249
|
+
])) : A("", !0),
|
|
250
|
+
(i(!0), m(N, null, B(o.headers, (l) => (i(), F(Ie, {
|
|
251
251
|
key: l.field,
|
|
252
252
|
header: l,
|
|
253
253
|
"sort-config": u.value,
|
|
@@ -260,19 +260,19 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
|
|
|
260
260
|
])
|
|
261
261
|
], 2),
|
|
262
262
|
f("tbody", Ae, [
|
|
263
|
-
Z.value ? (i(!0), m(
|
|
263
|
+
Z.value ? (i(!0), m(N, { key: 0 }, B(Math.min(P.value, 15), (l, n, ge, v) => {
|
|
264
264
|
const k = [];
|
|
265
265
|
if (v && v.key === "skeleton-" + l && W(v, k)) return v;
|
|
266
266
|
const C = (i(), m("tr", {
|
|
267
267
|
key: "skeleton-" + l,
|
|
268
268
|
class: "border-b border-border/70 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
|
|
269
269
|
}, [
|
|
270
|
-
|
|
270
|
+
R.value ? (i(), m("td", Ne, [...t[8] || (t[8] = [
|
|
271
271
|
f("div", { class: "flex items-center justify-center" }, [
|
|
272
272
|
f("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
|
|
273
273
|
], -1)
|
|
274
|
-
])])) :
|
|
275
|
-
(i(!0), m(
|
|
274
|
+
])])) : A("", !0),
|
|
275
|
+
(i(!0), m(N, null, B(o.headers, (I) => (i(), m("td", {
|
|
276
276
|
key: I.field,
|
|
277
277
|
class: T(["p-5! align-middle last:pr-6!", [I.hideOnMobile ? "hidden md:table-cell" : ""]])
|
|
278
278
|
}, [
|
|
@@ -283,7 +283,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
|
|
|
283
283
|
], 2))), 128))
|
|
284
284
|
]));
|
|
285
285
|
return C.memo = k, C;
|
|
286
|
-
}, t, 2), 128)) : o.rows.length > 0 ? (i(!0), m(
|
|
286
|
+
}, t, 2), 128)) : o.rows.length > 0 ? (i(!0), m(N, { key: 1 }, B(o.rows, (l, n, ge, v) => {
|
|
287
287
|
const k = [
|
|
288
288
|
l,
|
|
289
289
|
s.value.has(c(l, d.value)),
|
|
@@ -298,7 +298,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
|
|
|
298
298
|
headers: o.headers,
|
|
299
299
|
index: n,
|
|
300
300
|
"key-field": d.value,
|
|
301
|
-
selectable:
|
|
301
|
+
selectable: R.value,
|
|
302
302
|
"is-selected": s.value.has(c(l, d.value)),
|
|
303
303
|
hoverable: o.hoverable,
|
|
304
304
|
striped: o.striped,
|
|
@@ -317,7 +317,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
|
|
|
317
317
|
return C.memo = k, C;
|
|
318
318
|
}, t, 4), 128)) : (i(), m("tr", Ve, [
|
|
319
319
|
f("td", {
|
|
320
|
-
colspan:
|
|
320
|
+
colspan: R.value ? o.headers.length + 1 : o.headers.length,
|
|
321
321
|
class: "align-middle hover:bg-transparent"
|
|
322
322
|
}, [
|
|
323
323
|
x(e.$slots, "empty", {}, () => [
|
|
@@ -351,7 +351,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
|
|
|
351
351
|
onChange: ae,
|
|
352
352
|
"onUpdate:itemsPerPage": oe
|
|
353
353
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
354
|
-
])) :
|
|
354
|
+
])) : A("", !0),
|
|
355
355
|
$(Se, {
|
|
356
356
|
show: S.value,
|
|
357
357
|
"onUpdate:show": t[6] || (t[6] = (l) => S.value = l),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as C, computed as S, openBlock as s, createElementBlock as d, normalizeClass as u, withModifiers as B, createElementVNode as M, createVNode as p, createCommentVNode as N, Fragment as V, renderList as z, renderSlot as F, createBlock as m } from "vue";
|
|
2
2
|
import L from "../CheckBox.vue.js";
|
|
3
3
|
import $ from "../Price/Price.vue.js";
|
|
4
|
-
import T from "../
|
|
4
|
+
import T from "../DateTime/DateTime.vue.js";
|
|
5
5
|
const E = ["data-state"], H = { class: "flex items-center justify-center" }, I = ["title", "innerHTML"], j = /* @__PURE__ */ C({
|
|
6
6
|
__name: "DataTableRow",
|
|
7
7
|
props: {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponent as D, computed as n, openBlock as _, createElementBlock as g, toDisplayString as h } from "vue";
|
|
2
|
+
import s from "dayjs";
|
|
3
|
+
import { useVLiteConfig as y } from "../../core/config.js";
|
|
4
|
+
const V = /* @__PURE__ */ D({
|
|
5
|
+
__name: "DateTime",
|
|
6
|
+
props: {
|
|
7
|
+
value: {},
|
|
8
|
+
format: {}
|
|
9
|
+
},
|
|
10
|
+
setup(m) {
|
|
11
|
+
const t = m, i = y(), c = n(() => t.format || i?.components?.datetime?.format || "MM/DD/YYYY"), f = n(() => {
|
|
12
|
+
if (!t.value) return "--";
|
|
13
|
+
if (typeof t.value == "string") {
|
|
14
|
+
const e = t.value.trim();
|
|
15
|
+
if (/^([01]?\d|2[0-3]):([0-5]\d)(:([0-5]\d))?$/.test(e)) {
|
|
16
|
+
const r = e.split(":"), u = r[0].padStart(2, "0"), l = r[1], p = r[2] || "00", d = `1970-01-01T${u}:${l}:${p}`, a = s(d);
|
|
17
|
+
if (a.isValid()) {
|
|
18
|
+
const v = t.format || "h:mm A";
|
|
19
|
+
return a.format(v);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const o = s(t.value);
|
|
24
|
+
return o.isValid() ? o.format(c.value) : String(t.value);
|
|
25
|
+
});
|
|
26
|
+
return (o, e) => (_(), g("span", null, h(f.value), 1));
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
V as default
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DateTime } from './DateTime.vue';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ne, ref as i, computed as c, inject as oe, onMounted as ae, onUnmounted as ie, watch as P, provide as V, reactive as se, toRefs as re, openBlock as x, createElementBlock as R, normalizeStyle as de, createVNode as M, unref as g, withCtx as f, renderSlot as m, createCommentVNode as z, createBlock as ue, normalizeClass as ce, createSlots as fe, normalizeProps as E, guardReactiveProps as j } from "vue";
|
|
2
2
|
import me from "v-tooltip-lite";
|
|
3
3
|
import "v-tooltip-lite/style.css";
|
|
4
4
|
import ve from "./DropdownMenu.vue.js";
|
|
@@ -10,7 +10,7 @@ import { useDropdownHydration as be } from "./composables/useDropdownHydration.j
|
|
|
10
10
|
const Ce = {
|
|
11
11
|
key: 0,
|
|
12
12
|
tabindex: "0"
|
|
13
|
-
}, Me = /* @__PURE__ */
|
|
13
|
+
}, Me = /* @__PURE__ */ ne({
|
|
14
14
|
__name: "Dropdown",
|
|
15
15
|
props: {
|
|
16
16
|
selected: {},
|
|
@@ -50,21 +50,21 @@ const Ce = {
|
|
|
50
50
|
disabled: { type: Boolean, default: !1 }
|
|
51
51
|
},
|
|
52
52
|
emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
|
|
53
|
-
setup(l, { emit:
|
|
54
|
-
const o = l, v =
|
|
53
|
+
setup(l, { emit: U }) {
|
|
54
|
+
const o = l, v = U, y = i(!1), h = i(null), r = i({
|
|
55
55
|
title: "Confirm Selection",
|
|
56
56
|
description: "Are you sure you want to select this option?",
|
|
57
57
|
confirmText: "Confirm",
|
|
58
58
|
cancelText: "Cancel",
|
|
59
59
|
variant: "primary"
|
|
60
|
-
}),
|
|
60
|
+
}), q = c(() => o.position ? o.position : o.direction === "rtl" ? "bottom-end" : "bottom-start"), F = c(() => o.nestedPosition ? o.nestedPosition : o.direction === "rtl" ? "left-start" : "right-start"), b = i(o.isOpen || !1), C = i(0), G = `dropdown-${Math.random().toString(36).substring(2, 9)}`, $ = c(() => o.menuId || G), p = i([]), s = oe("dropdown-context", null), J = (e) => {
|
|
61
61
|
p.value.includes(e) || p.value.push(e), s?.registerChildId?.(e);
|
|
62
|
-
},
|
|
62
|
+
}, K = (e) => {
|
|
63
63
|
p.value = p.value.filter((n) => n !== e), s?.unregisterChildId?.(e);
|
|
64
64
|
};
|
|
65
|
-
|
|
65
|
+
ae(() => {
|
|
66
66
|
s?.registerChildId && s.registerChildId(`#${$.value}`);
|
|
67
|
-
}),
|
|
67
|
+
}), ie(() => {
|
|
68
68
|
s?.unregisterChildId && s.unregisterChildId(`#${$.value}`);
|
|
69
69
|
}), P(
|
|
70
70
|
() => o.isOpen,
|
|
@@ -83,17 +83,17 @@ const Ce = {
|
|
|
83
83
|
b.value = e, v("update:isOpen", e), v(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
|
|
84
84
|
}, O = () => {
|
|
85
85
|
N(!1);
|
|
86
|
-
},
|
|
86
|
+
}, Q = (e) => {
|
|
87
87
|
e ? C.value++ : C.value = Math.max(0, C.value - 1);
|
|
88
88
|
};
|
|
89
|
-
|
|
89
|
+
V("dropdown-context", {
|
|
90
90
|
close: O,
|
|
91
91
|
onChildToggle: (e) => {
|
|
92
|
-
|
|
92
|
+
Q(e), s?.onChildToggle?.(e);
|
|
93
93
|
},
|
|
94
|
-
registerChildId:
|
|
95
|
-
unregisterChildId:
|
|
96
|
-
});
|
|
94
|
+
registerChildId: J,
|
|
95
|
+
unregisterChildId: K
|
|
96
|
+
}), V("modal-context", null);
|
|
97
97
|
const w = c(() => o.options ? o.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), S = i([]), A = i(!1), k = i(!1);
|
|
98
98
|
P(
|
|
99
99
|
w,
|
|
@@ -118,18 +118,18 @@ const Ce = {
|
|
|
118
118
|
return I.value.forEach((t, d) => {
|
|
119
119
|
n.has(d) || (e.unshift(t), n.add(d));
|
|
120
120
|
}), e;
|
|
121
|
-
}), { selectedBuffer: I, isHydrating:
|
|
121
|
+
}), { selectedBuffer: I, isHydrating: W, hydrateSelected: H } = be({
|
|
122
122
|
fetchSelected: o.fetchSelected,
|
|
123
123
|
getAvailableOptions: () => u.value,
|
|
124
124
|
isReady: () => k.value
|
|
125
|
-
}), { getAllRecursiveIds:
|
|
125
|
+
}), { getAllRecursiveIds: X } = ge(), Y = se({
|
|
126
126
|
...re(o),
|
|
127
127
|
options: u
|
|
128
|
-
}), { currentValue: T, selectedLabel: D, selectOption:
|
|
129
|
-
|
|
128
|
+
}), { currentValue: T, selectedLabel: D, selectOption: Z } = ye(
|
|
129
|
+
Y,
|
|
130
130
|
v
|
|
131
|
-
),
|
|
132
|
-
const e = o.ignoreClickOutside || [], n =
|
|
131
|
+
), _ = c(() => {
|
|
132
|
+
const e = o.ignoreClickOutside || [], n = X(u.value);
|
|
133
133
|
return [.../* @__PURE__ */ new Set([...e, ...n, ...p.value])];
|
|
134
134
|
});
|
|
135
135
|
P(
|
|
@@ -139,7 +139,7 @@ const Ce = {
|
|
|
139
139
|
},
|
|
140
140
|
{ deep: !0 }
|
|
141
141
|
);
|
|
142
|
-
const
|
|
142
|
+
const ee = (e) => {
|
|
143
143
|
if (o.disabled || e.disabled) return;
|
|
144
144
|
o.doubleConfirmation || !!e.confirmation ? (h.value = e, typeof e.confirmation == "object" ? r.value = {
|
|
145
145
|
title: e.confirmation.title || "Confirm Selection",
|
|
@@ -158,7 +158,7 @@ const Ce = {
|
|
|
158
158
|
if (o.disabled || e.disabled) return;
|
|
159
159
|
const n = e.value ?? e.label;
|
|
160
160
|
I.value.has(n) || I.value.set(n, e);
|
|
161
|
-
const t =
|
|
161
|
+
const t = Z(e);
|
|
162
162
|
if (!o.isNested) {
|
|
163
163
|
const d = e._originalOption || e, a = d.value ?? d.label;
|
|
164
164
|
(e._path || [d]).forEach((B) => {
|
|
@@ -170,12 +170,12 @@ const Ce = {
|
|
|
170
170
|
});
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
}, ee = () => {
|
|
174
|
-
h.value && (L(h.value), h.value = null, y.value = !1);
|
|
175
173
|
}, te = () => {
|
|
174
|
+
h.value && (L(h.value), h.value = null, y.value = !1);
|
|
175
|
+
}, le = () => {
|
|
176
176
|
h.value = null, y.value = !1;
|
|
177
177
|
};
|
|
178
|
-
return (e, n) => (x(),
|
|
178
|
+
return (e, n) => (x(), R("div", {
|
|
179
179
|
class: "relative inline-block text-left",
|
|
180
180
|
style: de({ direction: l.direction })
|
|
181
181
|
}, [
|
|
@@ -185,11 +185,11 @@ const Ce = {
|
|
|
185
185
|
arrow: !1,
|
|
186
186
|
teleport: l.teleport,
|
|
187
187
|
offset: l.offset,
|
|
188
|
-
placement:
|
|
188
|
+
placement: q.value,
|
|
189
189
|
isOpen: b.value,
|
|
190
190
|
keepAlive: C.value > 0,
|
|
191
191
|
menuId: $.value,
|
|
192
|
-
ignoreClickOutside:
|
|
192
|
+
ignoreClickOutside: _.value,
|
|
193
193
|
class: "w-full",
|
|
194
194
|
className: "dropdown " + (l.className || ""),
|
|
195
195
|
onOnShow: n[2] || (n[2] = (t) => e.$emit("onOpen")),
|
|
@@ -199,7 +199,7 @@ const Ce = {
|
|
|
199
199
|
styles: { padding: "0" }
|
|
200
200
|
}, {
|
|
201
201
|
trigger: f(({ isOpen: t }) => [
|
|
202
|
-
m(e.$slots, "trigger",
|
|
202
|
+
m(e.$slots, "trigger", E(j({ selectedLabel: g(D), isOpen: t })), () => [
|
|
203
203
|
M(he, {
|
|
204
204
|
"selected-label": g(D),
|
|
205
205
|
"is-open": t,
|
|
@@ -211,9 +211,9 @@ const Ce = {
|
|
|
211
211
|
])
|
|
212
212
|
]),
|
|
213
213
|
default: f(() => [
|
|
214
|
-
e.$slots?.default ? (x(),
|
|
214
|
+
e.$slots?.default ? (x(), R("span", Ce, [
|
|
215
215
|
m(e.$slots, "default")
|
|
216
|
-
])) :
|
|
216
|
+
])) : z("", !0),
|
|
217
217
|
!l.disabled && (w.value.length || u.value.length || e.$slots.menu || e.$slots.item || l.remote || l.searchable) ? (x(), ue(ve, {
|
|
218
218
|
key: 1,
|
|
219
219
|
options: w.value,
|
|
@@ -222,18 +222,18 @@ const Ce = {
|
|
|
222
222
|
selected: g(T),
|
|
223
223
|
selectedIndex: l.selectedIndex,
|
|
224
224
|
maxHeight: l.maxHeight,
|
|
225
|
-
nestedPosition:
|
|
225
|
+
nestedPosition: F.value,
|
|
226
226
|
nestedOffset: l.nestedOffset,
|
|
227
227
|
selectable: l.selectable,
|
|
228
228
|
direction: l.direction,
|
|
229
229
|
layout: l.layout,
|
|
230
230
|
columns: l.columns,
|
|
231
|
-
loading: l.loading || g(
|
|
231
|
+
loading: l.loading || g(W),
|
|
232
232
|
hasMore: l.hasMore,
|
|
233
233
|
searchable: l.searchable,
|
|
234
234
|
remote: l.remote,
|
|
235
235
|
debounceTime: l.debounceTime,
|
|
236
|
-
onSelect:
|
|
236
|
+
onSelect: ee,
|
|
237
237
|
onClose: O,
|
|
238
238
|
onLoadMore: n[0] || (n[0] = (t) => e.$emit("load-more")),
|
|
239
239
|
onSearch: n[1] || (n[1] = (t) => e.$emit("search", t))
|
|
@@ -248,7 +248,7 @@ const Ce = {
|
|
|
248
248
|
e.$slots.item ? {
|
|
249
249
|
name: "item",
|
|
250
250
|
fn: f((t) => [
|
|
251
|
-
m(e.$slots, "item",
|
|
251
|
+
m(e.$slots, "item", E(j(t)))
|
|
252
252
|
]),
|
|
253
253
|
key: "1"
|
|
254
254
|
} : void 0,
|
|
@@ -266,7 +266,7 @@ const Ce = {
|
|
|
266
266
|
]),
|
|
267
267
|
key: "3"
|
|
268
268
|
} : void 0
|
|
269
|
-
]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) :
|
|
269
|
+
]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : z("", !0)
|
|
270
270
|
]),
|
|
271
271
|
_: 3
|
|
272
272
|
}, 8, ["teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className"]),
|
|
@@ -277,8 +277,8 @@ const Ce = {
|
|
|
277
277
|
"confirm-text": r.value.confirmText,
|
|
278
278
|
"cancel-text": r.value.cancelText,
|
|
279
279
|
variant: r.value.variant,
|
|
280
|
-
onConfirm:
|
|
281
|
-
onCancel:
|
|
280
|
+
onConfirm: te,
|
|
281
|
+
onCancel: le
|
|
282
282
|
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])
|
|
283
283
|
], 4));
|
|
284
284
|
}
|
|
@@ -8,6 +8,7 @@ interface Props {
|
|
|
8
8
|
size?: InputSize;
|
|
9
9
|
rounded?: InputRounded;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
+
draggable?: boolean;
|
|
11
12
|
minRows?: number;
|
|
12
13
|
maxRows?: number;
|
|
13
14
|
addButtonText?: string;
|
|
@@ -33,6 +34,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
33
34
|
isUpdate: boolean;
|
|
34
35
|
modelValue: Record<string, any>[];
|
|
35
36
|
headers: string[];
|
|
37
|
+
draggable: boolean;
|
|
36
38
|
minRows: number;
|
|
37
39
|
addButtonText: string;
|
|
38
40
|
showRowNumbers: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./CustomFields.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-90c3a6e8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|