vlite3 0.7.15 → 0.8.2
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/Accordion/Accordion.vue.js +35 -22
- package/components/Accordion/AccordionContent.vue.js +2 -2
- package/components/Accordion/AccordionContent.vue2.js +1 -1
- package/components/Breadcrumb/Breadcrumb.vue.js +2 -2
- package/components/Breadcrumb/Breadcrumb.vue2.js +44 -44
- package/components/Carousel/Carousel.vue.js +1 -1
- package/components/Carousel/Carousel.vue2.js +3 -3
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/CommandPalette/CommandPaletteContent.vue.js +1 -1
- package/components/CommandPalette/CommandPaletteContent.vue2.js +2 -2
- package/components/Dropdown/DropdownTrigger.vue.js +1 -1
- package/components/FilePicker/FilePicker.vue.js +16 -16
- package/components/FileTree/FileTree.vue.js +5 -147
- package/components/FileTree/FileTree.vue2.js +164 -2
- package/components/FileTree/FileTreeNode.vue.js +89 -84
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +1 -1
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +133 -129
- package/components/Form/FormField.vue.d.ts +3 -0
- package/components/Form/FormField.vue.js +85 -82
- package/components/Form/FormFields.vue.d.ts +2 -0
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +55 -52
- package/components/Form/composables/useForm.d.ts +2 -0
- package/components/Form/composables/useForm.js +113 -107
- package/components/ImportData/ImportData.vue.js +157 -142
- package/components/ImportData/ImportStep1.vue.d.ts +6 -0
- package/components/ImportData/ImportStep1.vue.js +69 -61
- package/components/ImportData/ImportStep2.vue.js +5 -98
- package/components/ImportData/ImportStep2.vue2.js +105 -2
- package/components/Kanban/Kanban.vue.js +1 -1
- package/components/Kanban/Kanban.vue2.js +1 -1
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +92 -83
- package/components/Kanban/useKanbanBoard.d.ts +1 -1
- package/components/Kanban/useKanbanBoard.js +17 -17
- package/components/List/ListFieldRow.vue.js +4 -6
- package/components/MultiSelect/MultiSelect.vue.js +10 -4
- package/components/NavbarCommandPalette.vue.js +2 -2
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +1 -1
- package/components/PermissionMatrix/PermissionEditor.vue.d.ts +2 -0
- package/components/PermissionMatrix/PermissionEditor.vue.js +25 -23
- package/components/PermissionMatrix/PermissionEditorMatrix.vue.d.ts +4 -1
- package/components/PermissionMatrix/PermissionEditorMatrix.vue.js +2 -2
- package/components/PermissionMatrix/PermissionEditorMatrix.vue2.js +48 -45
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/Timeline/Timeline.vue.js +62 -57
- package/components/ToastNotification.vue.js +2 -2
- package/components/ToastNotification.vue2.js +103 -88
- package/components/Workbook/Workbook.vue.js +5 -152
- package/components/Workbook/Workbook.vue2.js +166 -2
- package/package.json +1 -1
- package/style.css +3 -3
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./NumberInput.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a8237529"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -163,7 +163,7 @@ const E = ["disabled"], q = ["value", "min", "max", "step", "placeholder", "disa
|
|
|
163
163
|
e.variant === "stacked" ? (c(), m("div", M, [
|
|
164
164
|
y("button", {
|
|
165
165
|
type: "button",
|
|
166
|
-
class: "flex-1 flex items-center justify-center hover:bg-muted/50 w-8 border-b border-input
|
|
166
|
+
class: "flex-1 flex items-center justify-center hover:bg-muted/50 w-8 border-b border-input",
|
|
167
167
|
disabled: e.disabled || e.max !== void 0 && Number(d.value) >= e.max,
|
|
168
168
|
onClick: f
|
|
169
169
|
}, [
|
|
@@ -11,6 +11,7 @@ export interface PermissionEditorProps {
|
|
|
11
11
|
defaultExpanded?: string[];
|
|
12
12
|
layout?: PermissionEditorLayout;
|
|
13
13
|
matrixGroups?: PermissionMatrixGroup[];
|
|
14
|
+
stickyHeader?: boolean;
|
|
14
15
|
}
|
|
15
16
|
declare const _default: import('vue').DefineComponent<PermissionEditorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
16
17
|
"update:modelValue": (value: string[]) => any;
|
|
@@ -26,6 +27,7 @@ declare const _default: import('vue').DefineComponent<PermissionEditorProps, {},
|
|
|
26
27
|
groups: PermissionGroup[];
|
|
27
28
|
toggleMode: PermissionToggleMode;
|
|
28
29
|
collapsible: boolean;
|
|
30
|
+
stickyHeader: boolean;
|
|
29
31
|
matrixGroups: PermissionMatrixGroup[];
|
|
30
32
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
31
33
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, computed as n, openBlock as m, createElementBlock as E, normalizeClass as P, createVNode as K, isRef as g, unref as r, createBlock as f } from "vue";
|
|
2
2
|
import Q from "./PermissionTopBar.vue.js";
|
|
3
3
|
import U from "./PermissionEditorList.vue.js";
|
|
4
4
|
import L from "./PermissionEditorMatrix.vue.js";
|
|
5
5
|
import { usePermissionSearch as S } from "./usePermissionSearch.js";
|
|
6
6
|
import { usePermissionState as T } from "./usePermissionState.js";
|
|
7
7
|
import { getAllMatrixKeys as $ } from "./utils.js";
|
|
8
|
-
const
|
|
8
|
+
const D = /* @__PURE__ */ C({
|
|
9
9
|
__name: "PermissionEditor",
|
|
10
10
|
props: {
|
|
11
11
|
groups: { default: () => [] },
|
|
@@ -18,11 +18,12 @@ const F = /* @__PURE__ */ B({
|
|
|
18
18
|
class: { default: "" },
|
|
19
19
|
defaultExpanded: { default: () => [] },
|
|
20
20
|
layout: { default: "list" },
|
|
21
|
-
matrixGroups: { default: () => [] }
|
|
21
|
+
matrixGroups: { default: () => [] },
|
|
22
|
+
stickyHeader: { type: Boolean, default: !0 }
|
|
22
23
|
},
|
|
23
24
|
emits: ["update:modelValue"],
|
|
24
25
|
setup(l, { emit: y }) {
|
|
25
|
-
const e = l,
|
|
26
|
+
const e = l, u = y, s = n(() => e.layout === "matrix"), x = n(
|
|
26
27
|
() => (s.value ? e.matrixGroups : e.groups).map((o) => ({
|
|
27
28
|
label: o.label,
|
|
28
29
|
value: o.key,
|
|
@@ -42,15 +43,15 @@ const F = /* @__PURE__ */ B({
|
|
|
42
43
|
() => e.defaultExpanded
|
|
43
44
|
), {
|
|
44
45
|
selectAllList: G,
|
|
45
|
-
deselectAllList:
|
|
46
|
-
selectAllMatrix:
|
|
47
|
-
deselectAllMatrix:
|
|
48
|
-
} = T(() => e.modelValue),
|
|
49
|
-
function
|
|
50
|
-
e.readonly || (s.value ?
|
|
46
|
+
deselectAllList: k,
|
|
47
|
+
selectAllMatrix: z,
|
|
48
|
+
deselectAllMatrix: h
|
|
49
|
+
} = T(() => e.modelValue), A = n(() => s.value ? $(e.matrixGroups).length : e.groups.reduce((o, a) => o + a.permissions.length, 0));
|
|
50
|
+
function M() {
|
|
51
|
+
e.readonly || (s.value ? u("update:modelValue", z(e.matrixGroups, e.modelValue)) : u("update:modelValue", G(e.groups)));
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
-
e.readonly || (s.value ?
|
|
53
|
+
function B() {
|
|
54
|
+
e.readonly || (s.value ? u("update:modelValue", h(e.matrixGroups, e.modelValue)) : u("update:modelValue", k()));
|
|
54
55
|
}
|
|
55
56
|
function c(o) {
|
|
56
57
|
b(o, e.collapsible);
|
|
@@ -59,35 +60,36 @@ const F = /* @__PURE__ */ B({
|
|
|
59
60
|
class: P(["permission-editor", e.class])
|
|
60
61
|
}, [
|
|
61
62
|
K(Q, {
|
|
62
|
-
searchQuery:
|
|
63
|
+
searchQuery: r(d),
|
|
63
64
|
"onUpdate:searchQuery": a[0] || (a[0] = (t) => g(d) ? d.value = t : null),
|
|
64
|
-
selectedGroupKeys:
|
|
65
|
+
selectedGroupKeys: r(i),
|
|
65
66
|
"onUpdate:selectedGroupKeys": a[1] || (a[1] = (t) => g(i) ? i.value = t : null),
|
|
66
67
|
searchable: l.searchable,
|
|
67
68
|
size: l.size,
|
|
68
69
|
readonly: l.readonly,
|
|
69
|
-
"total-perms":
|
|
70
|
+
"total-perms": A.value,
|
|
70
71
|
"selected-count": l.modelValue.length,
|
|
71
72
|
"group-options": x.value,
|
|
72
|
-
onSelectAll:
|
|
73
|
-
onClearAll:
|
|
73
|
+
onSelectAll: M,
|
|
74
|
+
onClearAll: B
|
|
74
75
|
}, null, 8, ["searchQuery", "selectedGroupKeys", "searchable", "size", "readonly", "total-perms", "selected-count", "group-options"]),
|
|
75
76
|
s.value ? (m(), f(L, {
|
|
76
77
|
key: 0,
|
|
77
|
-
"matrix-groups":
|
|
78
|
+
"matrix-groups": r(v),
|
|
78
79
|
"model-value": l.modelValue,
|
|
79
|
-
"collapsed-groups":
|
|
80
|
+
"collapsed-groups": r(p),
|
|
80
81
|
"toggle-mode": l.toggleMode,
|
|
81
82
|
readonly: l.readonly,
|
|
82
83
|
size: l.size,
|
|
83
84
|
collapsible: l.collapsible,
|
|
85
|
+
"sticky-header": l.stickyHeader,
|
|
84
86
|
"onUpdate:modelValue": a[2] || (a[2] = (t) => o.$emit("update:modelValue", t)),
|
|
85
87
|
onToggleCollapse: c
|
|
86
|
-
}, null, 8, ["matrix-groups", "model-value", "collapsed-groups", "toggle-mode", "readonly", "size", "collapsible"])) : (m(), f(U, {
|
|
88
|
+
}, null, 8, ["matrix-groups", "model-value", "collapsed-groups", "toggle-mode", "readonly", "size", "collapsible", "sticky-header"])) : (m(), f(U, {
|
|
87
89
|
key: 1,
|
|
88
|
-
groups:
|
|
90
|
+
groups: r(V),
|
|
89
91
|
"model-value": l.modelValue,
|
|
90
|
-
"collapsed-groups":
|
|
92
|
+
"collapsed-groups": r(p),
|
|
91
93
|
"toggle-mode": l.toggleMode,
|
|
92
94
|
readonly: l.readonly,
|
|
93
95
|
size: l.size,
|
|
@@ -99,5 +101,5 @@ const F = /* @__PURE__ */ B({
|
|
|
99
101
|
}
|
|
100
102
|
});
|
|
101
103
|
export {
|
|
102
|
-
|
|
104
|
+
D as default
|
|
103
105
|
};
|
|
@@ -7,6 +7,7 @@ type __VLS_Props = {
|
|
|
7
7
|
readonly: boolean;
|
|
8
8
|
size: PermissionMatrixSize;
|
|
9
9
|
collapsible: boolean;
|
|
10
|
+
stickyHeader?: boolean;
|
|
10
11
|
};
|
|
11
12
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
12
13
|
"update:modelValue": (val: string[]) => any;
|
|
@@ -14,5 +15,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
14
15
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
16
|
"onUpdate:modelValue"?: (val: string[]) => any;
|
|
16
17
|
onToggleCollapse?: (groupKey: string) => any;
|
|
17
|
-
}>, {
|
|
18
|
+
}>, {
|
|
19
|
+
stickyHeader: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
21
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./PermissionEditorMatrix.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0b1ab970"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as I, computed as C, openBlock as s, createElementBlock as
|
|
1
|
+
import { defineComponent as I, computed as C, openBlock as s, createElementBlock as a, createVNode as N, createElementVNode as n, normalizeClass as d, normalizeStyle as J, Fragment as f, renderList as h, toDisplayString as G, withMemo as O, unref as y, createBlock as m, createCommentVNode as b, withModifiers as Q, isMemoSame as R, withCtx as U } from "vue";
|
|
2
2
|
import j from "../CheckBox.vue.js";
|
|
3
3
|
import A from "../Switch.vue.js";
|
|
4
4
|
import g from "../Icon.vue.js";
|
|
5
5
|
import W from "../Tooltip.vue.js";
|
|
6
|
-
import { isActionEnabled as
|
|
6
|
+
import { isActionEnabled as M, getMatrixPermKey as H } from "./utils.js";
|
|
7
7
|
import { usePermissionState as X } from "./usePermissionState.js";
|
|
8
8
|
const Y = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "text-center py-12 text-muted-foreground"
|
|
11
|
-
}, Z = { class: "custom-table" }, w =
|
|
11
|
+
}, Z = { class: "custom-table" }, w = ["colspan"], K = { class: "flex items-center justify-between" }, _ = { class: "flex items-center gap-2" }, ee = ["onClick"], te = { class: "custom-td" }, le = { class: "flex items-center gap-2 pl-6" }, se = ["onClick"], oe = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "flex items-center justify-center"
|
|
14
|
-
},
|
|
14
|
+
}, ne = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "flex items-center justify-center pointer-events-none"
|
|
17
|
-
},
|
|
17
|
+
}, ke = /* @__PURE__ */ I({
|
|
18
18
|
__name: "PermissionEditorMatrix",
|
|
19
19
|
props: {
|
|
20
20
|
matrixGroups: {},
|
|
@@ -23,37 +23,38 @@ const Y = {
|
|
|
23
23
|
toggleMode: {},
|
|
24
24
|
readonly: { type: Boolean },
|
|
25
25
|
size: {},
|
|
26
|
-
collapsible: { type: Boolean }
|
|
26
|
+
collapsible: { type: Boolean },
|
|
27
|
+
stickyHeader: { type: Boolean, default: !0 }
|
|
27
28
|
},
|
|
28
29
|
emits: ["update:modelValue", "toggleCollapse"],
|
|
29
|
-
setup(t, { emit:
|
|
30
|
-
const r = t, V =
|
|
30
|
+
setup(t, { emit: D }) {
|
|
31
|
+
const r = t, V = D, { hasPerm: S, getMatrixGroupState: v, toggleMatrixGroup: F } = X(
|
|
31
32
|
() => r.modelValue
|
|
32
33
|
), k = C(() => r.size === "sm" ? "text-xs" : "text-sm"), L = C(() => ({
|
|
33
34
|
"--cell-py": r.size === "sm" ? "0.5rem" : "0.625rem",
|
|
34
35
|
"--cell-px": r.size === "sm" ? "0.75rem" : "1rem"
|
|
35
36
|
})), u = C(() => {
|
|
36
|
-
const
|
|
37
|
+
const i = /* @__PURE__ */ new Set(), o = [];
|
|
37
38
|
for (const e of r.matrixGroups)
|
|
38
39
|
for (const l of e.actions)
|
|
39
|
-
|
|
40
|
+
i.has(l.key) || (i.add(l.key), o.push(l));
|
|
40
41
|
return o;
|
|
41
42
|
});
|
|
42
|
-
function
|
|
43
|
-
return
|
|
43
|
+
function $(i, o) {
|
|
44
|
+
return i.actions.some((e) => e.key === o);
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
return
|
|
46
|
+
function z(i, o, e) {
|
|
47
|
+
return M(o, e) ? S(H(i, o, e)) : !1;
|
|
47
48
|
}
|
|
48
|
-
function T(
|
|
49
|
-
if (r.readonly || !
|
|
50
|
-
const l =
|
|
51
|
-
V("update:modelValue",
|
|
49
|
+
function T(i, o, e) {
|
|
50
|
+
if (r.readonly || !M(o, e)) return;
|
|
51
|
+
const l = H(i, o, e), p = S(l) ? r.modelValue.filter((P) => P !== l) : [...r.modelValue, l];
|
|
52
|
+
V("update:modelValue", p);
|
|
52
53
|
}
|
|
53
|
-
function q(
|
|
54
|
-
r.readonly || V("update:modelValue",
|
|
54
|
+
function q(i) {
|
|
55
|
+
r.readonly || V("update:modelValue", F(i));
|
|
55
56
|
}
|
|
56
|
-
return (
|
|
57
|
+
return (i, o) => t.matrixGroups.length === 0 ? (s(), a("div", Y, [
|
|
57
58
|
N(g, {
|
|
58
59
|
icon: "lucide:search-x",
|
|
59
60
|
class: "w-8 h-8 mx-auto mb-3 opacity-50"
|
|
@@ -61,25 +62,27 @@ const Y = {
|
|
|
61
62
|
n("p", {
|
|
62
63
|
class: d(k.value)
|
|
63
64
|
}, "No permissions match your filters.", 2)
|
|
64
|
-
])) : (s(),
|
|
65
|
+
])) : (s(), a("div", {
|
|
65
66
|
key: 1,
|
|
66
67
|
class: "permission-matrix-wrapper",
|
|
67
68
|
style: J(L.value)
|
|
68
69
|
}, [
|
|
69
70
|
n("table", Z, [
|
|
70
|
-
n("thead",
|
|
71
|
+
n("thead", {
|
|
72
|
+
class: d(t.stickyHeader ? "custom-sticky-header" : "")
|
|
73
|
+
}, [
|
|
71
74
|
n("tr", null, [
|
|
72
75
|
n("th", {
|
|
73
76
|
class: d([k.value, "custom-th"])
|
|
74
77
|
}, "Permission", 2),
|
|
75
|
-
(s(!0),
|
|
78
|
+
(s(!0), a(f, null, h(u.value, (e) => (s(), a("th", {
|
|
76
79
|
key: e.key,
|
|
77
80
|
class: d([k.value, "custom-th text-center"])
|
|
78
81
|
}, G(e.label), 3))), 128))
|
|
79
82
|
])
|
|
80
|
-
]),
|
|
83
|
+
], 2),
|
|
81
84
|
n("tbody", null, [
|
|
82
|
-
(s(!0),
|
|
85
|
+
(s(!0), a(f, null, h(t.matrixGroups, (e) => (s(), a(f, {
|
|
83
86
|
key: e.key
|
|
84
87
|
}, [
|
|
85
88
|
O([
|
|
@@ -92,16 +95,16 @@ const Y = {
|
|
|
92
95
|
e.label,
|
|
93
96
|
e.icon,
|
|
94
97
|
u.value.length
|
|
95
|
-
], () => (s(),
|
|
98
|
+
], () => (s(), a("tr", {
|
|
96
99
|
class: "custom-group-row cursor-pointer select-none",
|
|
97
|
-
onClick: (l) =>
|
|
100
|
+
onClick: (l) => i.$emit("toggleCollapse", e.key)
|
|
98
101
|
}, [
|
|
99
102
|
n("td", {
|
|
100
103
|
colspan: u.value.length + 1,
|
|
101
104
|
class: "custom-td"
|
|
102
105
|
}, [
|
|
103
|
-
n("div",
|
|
104
|
-
n("div",
|
|
106
|
+
n("div", K, [
|
|
107
|
+
n("div", _, [
|
|
105
108
|
t.collapsible ? (s(), m(g, {
|
|
106
109
|
key: 0,
|
|
107
110
|
icon: "lucide:chevron-right",
|
|
@@ -136,13 +139,13 @@ const Y = {
|
|
|
136
139
|
disabled: t.readonly,
|
|
137
140
|
class: "pointer-events-none"
|
|
138
141
|
}, null, 8, ["model-value", "disabled"]))
|
|
139
|
-
], 8,
|
|
142
|
+
], 8, ee)
|
|
140
143
|
])
|
|
141
|
-
], 8,
|
|
144
|
+
], 8, w)
|
|
142
145
|
], 8, ["onClick"])), o, 0),
|
|
143
|
-
t.collapsedGroups.has(e.key) ? b("", !0) : (s(!0),
|
|
146
|
+
t.collapsedGroups.has(e.key) ? b("", !0) : (s(!0), a(f, { key: 0 }, h(e.rows, (l, p, P, x) => {
|
|
144
147
|
const B = [
|
|
145
|
-
...u.value.map((c) =>
|
|
148
|
+
...u.value.map((c) => z(e.key, l, c.key)),
|
|
146
149
|
t.readonly,
|
|
147
150
|
t.size,
|
|
148
151
|
t.toggleMode,
|
|
@@ -151,12 +154,12 @@ const Y = {
|
|
|
151
154
|
u.value.length
|
|
152
155
|
];
|
|
153
156
|
if (x && x.key === e.key + "-" + l.key && R(x, B)) return x;
|
|
154
|
-
const E = (s(),
|
|
157
|
+
const E = (s(), a("tr", {
|
|
155
158
|
key: e.key + "-" + l.key,
|
|
156
159
|
class: "custom-entity-row"
|
|
157
160
|
}, [
|
|
158
|
-
n("td",
|
|
159
|
-
n("div",
|
|
161
|
+
n("td", te, [
|
|
162
|
+
n("div", le, [
|
|
160
163
|
n("span", {
|
|
161
164
|
class: d([k.value]),
|
|
162
165
|
style: { color: "var(--color-foreground)" }
|
|
@@ -177,32 +180,32 @@ const Y = {
|
|
|
177
180
|
}, 8, ["content"])) : b("", !0)
|
|
178
181
|
])
|
|
179
182
|
]),
|
|
180
|
-
(s(!0),
|
|
183
|
+
(s(!0), a(f, null, h(u.value, (c) => (s(), a("td", {
|
|
181
184
|
key: c.key,
|
|
182
185
|
class: d([
|
|
183
186
|
"custom-td text-center",
|
|
184
|
-
|
|
187
|
+
!$(e, c.key) || !y(M)(l, c.key) ? "custom-disabled-cell" : t.readonly ? "" : "custom-active-cell"
|
|
185
188
|
]),
|
|
186
189
|
onClick: (ae) => T(e.key, l, c.key)
|
|
187
190
|
}, [
|
|
188
|
-
|
|
191
|
+
!$(e, c.key) || !y(M)(l, c.key) ? (s(), a("div", oe, [...o[3] || (o[3] = [
|
|
189
192
|
n("span", {
|
|
190
193
|
class: "text-xs select-none",
|
|
191
194
|
style: { color: "var(--color-muted-foreground)", opacity: "0.4" }
|
|
192
195
|
}, " — ", -1)
|
|
193
|
-
])])) : (s(),
|
|
196
|
+
])])) : (s(), a("div", ne, [
|
|
194
197
|
t.toggleMode === "checkbox" ? (s(), m(j, {
|
|
195
198
|
key: 0,
|
|
196
|
-
"model-value":
|
|
199
|
+
"model-value": z(e.key, l, c.key),
|
|
197
200
|
disabled: t.readonly,
|
|
198
201
|
size: t.size === "sm" ? "xs" : "sm"
|
|
199
202
|
}, null, 8, ["model-value", "disabled", "size"])) : (s(), m(A, {
|
|
200
203
|
key: 1,
|
|
201
|
-
"model-value":
|
|
204
|
+
"model-value": z(e.key, l, c.key),
|
|
202
205
|
disabled: t.readonly
|
|
203
206
|
}, null, 8, ["model-value", "disabled"]))
|
|
204
207
|
]))
|
|
205
|
-
], 10,
|
|
208
|
+
], 10, se))), 128))
|
|
206
209
|
]));
|
|
207
210
|
return E.memo = B, E;
|
|
208
211
|
}, o, 1), 128))
|
|
@@ -213,5 +216,5 @@ const Y = {
|
|
|
213
216
|
}
|
|
214
217
|
});
|
|
215
218
|
export {
|
|
216
|
-
|
|
219
|
+
ke as default
|
|
217
220
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as C, computed as g, openBlock as r, createElementBlock as d, normalizeClass as k, createElementVNode as y, normalizeStyle as S, createCommentVNode as P, Fragment as p, renderList as B, isMemoSame as T, createBlock as z, withCtx as o, renderSlot as n, mergeProps as s } from "vue";
|
|
2
|
+
import V from "./TimelineItem.vue.js";
|
|
3
|
+
const E = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "absolute top-4 left-4 right-4 h-0.5 bg-border",
|
|
6
6
|
"aria-hidden": "true"
|
|
7
|
-
},
|
|
7
|
+
}, M = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "absolute top-4 left-4 right-4 h-0.5 bg-border block sm:hidden",
|
|
10
10
|
"aria-hidden": "true"
|
|
11
|
-
},
|
|
11
|
+
}, L = /* @__PURE__ */ C({
|
|
12
12
|
__name: "Timeline",
|
|
13
13
|
props: {
|
|
14
14
|
steps: {},
|
|
@@ -21,72 +21,77 @@ const B = {
|
|
|
21
21
|
class: { default: "" }
|
|
22
22
|
},
|
|
23
23
|
emits: ["step-click"],
|
|
24
|
-
setup(e, { emit:
|
|
25
|
-
const l = e,
|
|
26
|
-
|
|
24
|
+
setup(e, { emit: w }) {
|
|
25
|
+
const l = e, x = w, a = g(() => l.direction === "vertical"), b = g(() => l.steps.length <= 1 ? 0 : Math.min(l.activeStep, l.steps.length - 1) / (l.steps.length - 1) * 100), $ = (i, f) => {
|
|
26
|
+
x("step-click", i, f);
|
|
27
27
|
};
|
|
28
|
-
return (i, f) => (r(),
|
|
28
|
+
return (i, f) => (r(), d("nav", {
|
|
29
29
|
"aria-label": "Progress",
|
|
30
|
-
class:
|
|
30
|
+
class: k(["w-full", l.class])
|
|
31
31
|
}, [
|
|
32
|
-
|
|
32
|
+
y("ol", {
|
|
33
33
|
role: "list",
|
|
34
|
-
class:
|
|
34
|
+
class: k([
|
|
35
35
|
"relative flex",
|
|
36
|
-
|
|
37
|
-
!
|
|
38
|
-
!
|
|
36
|
+
a.value ? "flex-col space-y-0" : "",
|
|
37
|
+
!a.value && e.textPosition === "bottom" ? "flex-row w-full justify-between items-center" : "",
|
|
38
|
+
!a.value && e.textPosition === "right" ? "flex-row w-full" : ""
|
|
39
39
|
])
|
|
40
40
|
}, [
|
|
41
|
-
!
|
|
42
|
-
|
|
41
|
+
!a.value && e.textPosition === "bottom" ? (r(), d("div", E, [
|
|
42
|
+
y("div", {
|
|
43
43
|
class: "h-full bg-primary transition-all duration-300 ease-in-out",
|
|
44
|
-
style:
|
|
44
|
+
style: S({ width: `${b.value}%` })
|
|
45
45
|
}, null, 4)
|
|
46
|
-
])) :
|
|
47
|
-
!
|
|
48
|
-
|
|
46
|
+
])) : P("", !0),
|
|
47
|
+
!a.value && e.textPosition === "right" ? (r(), d("div", M, [
|
|
48
|
+
y("div", {
|
|
49
49
|
class: "h-full bg-primary transition-all duration-300 ease-in-out",
|
|
50
|
-
style:
|
|
50
|
+
style: S({ width: `${b.value}%` })
|
|
51
51
|
}, null, 4)
|
|
52
|
-
])) :
|
|
53
|
-
(r(!0),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
52
|
+
])) : P("", !0),
|
|
53
|
+
(r(!0), d(p, null, B(e.steps, (c, m, N, u) => {
|
|
54
|
+
const v = [c, m, e.activeStep, e.direction, e.textPosition, e.lineStyle, e.indicatorType, e.clickable, e.steps.length];
|
|
55
|
+
if (u && u.key === c.id && T(u, v)) return u;
|
|
56
|
+
const h = (r(), z(V, {
|
|
57
|
+
key: c.id,
|
|
58
|
+
step: c,
|
|
59
|
+
index: m,
|
|
60
|
+
"is-last": m === e.steps.length - 1,
|
|
61
|
+
"active-step": e.activeStep,
|
|
62
|
+
direction: e.direction,
|
|
63
|
+
"text-position": e.textPosition,
|
|
64
|
+
"line-style": e.lineStyle,
|
|
65
|
+
"indicator-type": e.indicatorType,
|
|
66
|
+
clickable: e.clickable,
|
|
67
|
+
onStepClick: $
|
|
68
|
+
}, {
|
|
69
|
+
indicator: o((t) => [
|
|
70
|
+
n(i.$slots, "indicator", s({ ref_for: !0 }, t))
|
|
71
|
+
]),
|
|
72
|
+
title: o((t) => [
|
|
73
|
+
n(i.$slots, "title", s({ ref_for: !0 }, t))
|
|
74
|
+
]),
|
|
75
|
+
subtitle: o((t) => [
|
|
76
|
+
n(i.$slots, "subtitle", s({ ref_for: !0 }, t))
|
|
77
|
+
]),
|
|
78
|
+
status: o((t) => [
|
|
79
|
+
n(i.$slots, "status", s({ ref_for: !0 }, t))
|
|
80
|
+
]),
|
|
81
|
+
content: o((t) => [
|
|
82
|
+
n(i.$slots, "content", s({ ref_for: !0 }, t))
|
|
83
|
+
]),
|
|
84
|
+
body: o((t) => [
|
|
85
|
+
n(i.$slots, "body", s({ ref_for: !0 }, t))
|
|
86
|
+
]),
|
|
87
|
+
_: 3
|
|
88
|
+
}, 8, ["step", "index", "is-last", "active-step", "direction", "text-position", "line-style", "indicator-type", "clickable"]));
|
|
89
|
+
return h.memo = v, h;
|
|
90
|
+
}, f, 0), 128))
|
|
86
91
|
], 2)
|
|
87
92
|
], 2));
|
|
88
93
|
}
|
|
89
94
|
});
|
|
90
95
|
export {
|
|
91
|
-
|
|
96
|
+
L as default
|
|
92
97
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ToastNotification.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-9c775c23"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|