vlite3 1.4.40 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AppShell/AppShellLayoutClassic.vue.js +27 -28
- package/components/AppShell/AppShellLayoutDashboard.vue.js +48 -48
- package/components/AppShell/AppShellLayoutDock.vue.js +51 -51
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +69 -69
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.d.ts +2 -2
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +78 -78
- package/components/AppShell/AppShellLayoutStorefront.vue.js +14 -15
- package/components/AppShell/useAppShell.d.ts +4 -0
- package/components/AppShell/useAppShell.js +45 -40
- package/components/AsyncSelect/createAsyncSelect.js +10 -10
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +50 -2
- package/components/AttachmentsList/AttachmentsList.vue.js +289 -272
- package/components/AttachmentsList/types.d.ts +37 -0
- package/components/BackButton.vue.js +2 -2
- package/components/Button.vue.d.ts +1 -0
- package/components/Button.vue.js +5 -241
- package/components/Button.vue2.js +245 -2
- package/components/ButtonGroup.vue.js +2 -2
- package/components/ButtonGroup.vue2.js +4 -1
- package/components/Calendar/Calendar.vue2.js +16 -16
- package/components/Cart/CartCouponInput.vue.js +24 -24
- package/components/Cart/CartEmptyState.vue.js +4 -4
- package/components/Cart/CartLineItem.vue.js +33 -33
- package/components/Cart/CartVariant1.vue.js +3 -3
- package/components/Cart/CartVariant2.vue.js +5 -5
- package/components/Cart/CartVariant3.vue.js +25 -25
- package/components/Cart/CartVariant4.vue.js +9 -9
- package/components/CategoryManager/CategoryManager.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue2.js +18 -18
- package/components/CategoryManager/CategoryNode.vue.js +4 -4
- package/components/CategoryMenu/CategoryMenu.vue.js +3 -2
- package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +3 -2
- package/components/Chat/ChatInterface.vue.js +23 -23
- package/components/Clipboard.vue.d.ts +7 -1
- package/components/Clipboard.vue.js +19 -17
- package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +22 -22
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +8 -8
- package/components/Comment/CommentEditor.vue.js +14 -14
- package/components/Comment/CommentItem.vue2.js +6 -6
- package/components/Comment/CommentThread.vue.js +4 -4
- package/components/DataList/DataList.vue.js +7 -7
- package/components/DataTable/DataTable.vue.d.ts +9 -1
- package/components/DataTable/DataTable.vue.js +374 -263
- package/components/DataTable/DataTableRow.vue.d.ts +23 -2
- package/components/DataTable/DataTableRow.vue.js +5 -198
- package/components/DataTable/DataTableRow.vue2.js +360 -2
- package/components/DataTable/dataTableHeaders.d.ts +18 -0
- package/components/DataTable/dataTableHeaders.js +9 -0
- package/components/DataTable/types.d.ts +6 -0
- package/components/DatePicker.vue.js +8 -9
- package/components/DateRangePicker.vue2.js +34 -34
- package/components/Dropdown/Dropdown.vue.d.ts +7 -2
- package/components/Dropdown/Dropdown.vue.js +146 -139
- package/components/Dropdown/DropdownTrigger.vue.js +6 -6
- package/components/ExportData/ExportData.vue.js +15 -15
- package/components/FilePicker/FilePickerDropzone.vue.js +16 -16
- package/components/FilePicker/FilePickerInput.vue.js +3 -2
- package/components/FilePicker/FilePreview.vue.js +3 -3
- package/components/FileTree/FileTree.vue.js +4 -4
- package/components/FileTree/FileTree.vue2.js +9 -9
- package/components/FileTree/FileTreeNode.vue.js +76 -72
- package/components/Footer/Variant1.vue.js +48 -48
- package/components/Footer/Variant2.vue.js +42 -42
- package/components/Form/AccordionView.vue.d.ts +1 -1
- package/components/Form/AccordionView.vue.js +2 -2
- package/components/Form/AccordionView.vue3.js +61 -57
- package/components/Form/Form.vue2.js +41 -41
- package/components/Form/TableRow.vue.d.ts +7 -0
- package/components/Form/TableRow.vue.js +187 -41
- package/components/Form/TableView.vue.d.ts +11 -1
- package/components/Form/TableView.vue.js +71 -49
- package/components/Form/composables/useForm.js +146 -142
- package/components/Form/index.vue.d.ts +5 -1
- package/components/Form/index.vue.js +2 -2
- package/components/Form/index.vue2.js +44 -37
- package/components/Form/rowHelpers.d.ts +20 -0
- package/components/Form/rowHelpers.js +76 -28
- package/components/Form/types.d.ts +11 -0
- package/components/GoogleLogin.vue.js +4 -4
- package/components/IconPicker.vue.js +9 -9
- package/components/ImportData/ImportData.vue.js +11 -11
- package/components/ImportData/ImportStep1.vue.js +10 -10
- package/components/ImportData/ImportStep2.vue.js +15 -14
- package/components/Input.vue.js +133 -129
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +9 -9
- package/components/MultiSelect/MultiSelect.vue.js +3 -2
- package/components/Navbar/Navbar.vue.js +17 -17
- package/components/Navbar/NavbarGroup.vue.js +8 -7
- package/components/Navbar/NavbarItem.vue.js +40 -39
- package/components/Navbar/NavbarTabs.vue.js +6 -184
- package/components/Navbar/NavbarTabs.vue2.js +204 -0
- package/components/Navbar/useNavbar.js +3 -3
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +81 -77
- package/components/OTPInput/OTPInput.vue.js +24 -23
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/Pagination/Pagination.vue.js +5 -274
- package/components/Pagination/Pagination.vue2.js +283 -2
- package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
- package/components/PricingPlan/PricingPlanItem.vue.js +7 -7
- package/components/Screen/Screen.vue.d.ts +1 -1
- package/components/Screen/Screen.vue.js +21 -21
- package/components/Screen/ScreenFilter.vue.js +5 -5
- package/components/Screen/components/ScreenAddAction.vue.js +3 -3
- package/components/Screen/components/ScreenEmptyState.vue.js +10 -10
- package/components/Screen/components/ScreenExportModal.vue.js +12 -12
- package/components/Screen/components/ScreenOptionsDropdown.vue.js +5 -5
- package/components/Screen/components/ScreenToolbar.vue.js +15 -15
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +6 -6
- package/components/SidebarMenu/SidebarMenu.vue.js +77 -72
- package/components/SidebarMenu/SidebarMenuItem.vue.js +172 -168
- package/components/Slider.vue.js +123 -108
- package/components/Tabes/Tabes.vue.d.ts +25 -4
- package/components/Tabes/Tabes.vue.js +3 -3
- package/components/Tabes/Tabes.vue2.js +274 -211
- package/components/Tabes/tabes.utils.d.ts +30 -0
- package/components/Tabes/tabes.utils.js +49 -18
- package/components/Tabes/types.d.ts +7 -0
- package/components/Textarea.vue.d.ts +2 -0
- package/components/Textarea.vue.js +19 -16
- package/components/ThemeToggle.vue.js +8 -8
- package/components/ToastNotification.vue2.js +10 -10
- package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
- package/components/TreeConnectors/TreeConnectors.vue.js +13 -8
- package/components/TreeConnectors/geometry.js +77 -69
- package/components/Workbook/WorkbookAddButton.vue.js +2 -2
- package/composables/useRtl.d.ts +14 -0
- package/composables/useRtl.js +33 -0
- package/index.js +470 -471
- package/package.json +5 -4
- package/style.css +86 -1
- package/types/button.d.ts +8 -0
- package/components/Navbar/NavbarTabs.vue3.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as G, computed as
|
|
1
|
+
import { defineComponent as G, computed as s, useModel as M, openBlock as t, createElementBlock as l, normalizeClass as T, createElementVNode as i, createCommentVNode as r, toDisplayString as n, withModifiers as $, createVNode as v, withCtx as z, createTextVNode as F, Fragment as m, renderList as f, createBlock as U, mergeModels as k } from "vue";
|
|
2
2
|
import y from "../Icon.vue.js";
|
|
3
3
|
import q from "../Input.vue.js";
|
|
4
4
|
/* empty css */
|
|
@@ -33,13 +33,13 @@ const H = { class: "mx-auto w-full max-w-7xl px-6 lg:px-8 py-12 lg:py-16" }, I =
|
|
|
33
33
|
}, Z = { class: "text-sm font-semibold text-foreground mb-4 tracking-wide" }, ee = { class: "space-y-3" }, te = ["href", "target", "rel", "onClick"], le = {
|
|
34
34
|
key: 3,
|
|
35
35
|
class: "flex items-center justify-center gap-1 mb-0"
|
|
36
|
-
}, re = ["href", "aria-label", "onClick"],
|
|
36
|
+
}, re = ["href", "aria-label", "onClick"], oe = {
|
|
37
37
|
key: 0,
|
|
38
38
|
class: "v-footer-bottom border-t border-border/50"
|
|
39
|
-
},
|
|
39
|
+
}, ae = { class: "mx-auto w-full max-w-7xl px-6 lg:px-8 py-6 flex flex-col sm:flex-row flex-wrap items-center justify-center gap-x-6 gap-y-4 text-center" }, ne = {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "text-sm text-muted-foreground"
|
|
42
|
-
},
|
|
42
|
+
}, se = {
|
|
43
43
|
key: 1,
|
|
44
44
|
class: "hidden sm:inline text-muted/30"
|
|
45
45
|
}, ie = {
|
|
@@ -57,18 +57,18 @@ const H = { class: "mx-auto w-full max-w-7xl px-6 lg:px-8 py-12 lg:py-16" }, I =
|
|
|
57
57
|
}),
|
|
58
58
|
emits: /* @__PURE__ */ k(["subscribe", "link-click"], ["update:newsletterEmail"]),
|
|
59
59
|
setup(x, { emit: w }) {
|
|
60
|
-
const b = x, h = w, e =
|
|
61
|
-
function
|
|
60
|
+
const b = x, h = w, e = s(() => b.data), L = s(() => b.labels || {}), c = M(x, "newsletterEmail"), C = s(() => e.value.linkGroups && e.value.linkGroups.length > 0), N = s(() => e.value.socialLinks && e.value.socialLinks.length > 0), p = s(() => e.value.legalLinks && e.value.legalLinks.length > 0), B = s(() => !!e.value.newsletter), E = s(() => e.value.brandName || e.value.brandLogo || e.value.brandDescription), V = s(() => e.value.copyright || p.value);
|
|
61
|
+
function j() {
|
|
62
62
|
c.value.trim() && h("subscribe", c.value.trim());
|
|
63
63
|
}
|
|
64
64
|
function g(_, d) {
|
|
65
65
|
h("link-click", _, d);
|
|
66
66
|
}
|
|
67
67
|
return (_, d) => (t(), l("footer", {
|
|
68
|
-
class:
|
|
68
|
+
class: T(["v-footer v-footer-v2 w-full bg-background text-foreground", x.containerClass])
|
|
69
69
|
}, [
|
|
70
70
|
i("div", H, [
|
|
71
|
-
|
|
71
|
+
E.value ? (t(), l("div", I, [
|
|
72
72
|
e.value.brandLogo || e.value.brandName ? (t(), l("div", J, [
|
|
73
73
|
e.value.brandLogo ? (t(), l("img", {
|
|
74
74
|
key: 0,
|
|
@@ -76,21 +76,21 @@ const H = { class: "mx-auto w-full max-w-7xl px-6 lg:px-8 py-12 lg:py-16" }, I =
|
|
|
76
76
|
alt: e.value.brandName || "Brand logo",
|
|
77
77
|
class: "h-10 w-10 object-contain rounded"
|
|
78
78
|
}, null, 8, K)) : r("", !0),
|
|
79
|
-
e.value.brandName ? (t(), l("span", O,
|
|
80
|
-
e.value.badge ? (t(), l("span", P,
|
|
79
|
+
e.value.brandName ? (t(), l("span", O, n(e.value.brandName), 1)) : r("", !0),
|
|
80
|
+
e.value.badge ? (t(), l("span", P, n(e.value.badge), 1)) : r("", !0)
|
|
81
81
|
])) : r("", !0),
|
|
82
|
-
e.value.brandDescription ? (t(), l("p", Q,
|
|
82
|
+
e.value.brandDescription ? (t(), l("p", Q, n(e.value.brandDescription), 1)) : r("", !0)
|
|
83
83
|
])) : r("", !0),
|
|
84
|
-
|
|
85
|
-
e.value.newsletter?.title ? (t(), l("p", W,
|
|
86
|
-
e.value.newsletter?.description ? (t(), l("p", X,
|
|
84
|
+
B.value ? (t(), l("div", R, [
|
|
85
|
+
e.value.newsletter?.title ? (t(), l("p", W, n(e.value.newsletter.title), 1)) : r("", !0),
|
|
86
|
+
e.value.newsletter?.description ? (t(), l("p", X, n(e.value.newsletter.description), 1)) : r("", !0),
|
|
87
87
|
i("form", {
|
|
88
88
|
class: "flex gap-2 w-full",
|
|
89
|
-
onSubmit:
|
|
89
|
+
onSubmit: $(j, ["prevent"])
|
|
90
90
|
}, [
|
|
91
91
|
v(q, {
|
|
92
92
|
modelValue: c.value,
|
|
93
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
93
|
+
"onUpdate:modelValue": d[0] || (d[0] = (o) => c.value = o),
|
|
94
94
|
type: "email",
|
|
95
95
|
placeholder: e.value.newsletter?.placeholder || "Enter your email",
|
|
96
96
|
class: "flex-1 min-w-0",
|
|
@@ -104,68 +104,68 @@ const H = { class: "mx-auto w-full max-w-7xl px-6 lg:px-8 py-12 lg:py-16" }, I =
|
|
|
104
104
|
class: "whitespace-nowrap"
|
|
105
105
|
}, {
|
|
106
106
|
default: z(() => [
|
|
107
|
-
F(
|
|
107
|
+
F(n(e.value.newsletter?.buttonText || L.value.subscribe || "Subscribe"), 1)
|
|
108
108
|
]),
|
|
109
109
|
_: 1
|
|
110
110
|
})
|
|
111
111
|
], 32)
|
|
112
112
|
])) : r("", !0),
|
|
113
113
|
C.value ? (t(), l("div", Y, [
|
|
114
|
-
(t(!0), l(m, null, f(e.value.linkGroups, (
|
|
114
|
+
(t(!0), l(m, null, f(e.value.linkGroups, (o, u) => (t(), l("div", {
|
|
115
115
|
key: u,
|
|
116
116
|
class: "flex flex-col items-center sm:items-start text-center sm:text-left min-w-[100px]"
|
|
117
117
|
}, [
|
|
118
|
-
i("h3", Z,
|
|
118
|
+
i("h3", Z, n(o.title), 1),
|
|
119
119
|
i("ul", ee, [
|
|
120
|
-
(t(!0), l(m, null, f(
|
|
120
|
+
(t(!0), l(m, null, f(o.links, (a, S) => (t(), l("li", { key: S }, [
|
|
121
121
|
i("a", {
|
|
122
|
-
href:
|
|
123
|
-
target:
|
|
124
|
-
rel:
|
|
122
|
+
href: a.url,
|
|
123
|
+
target: a.external ? "_blank" : void 0,
|
|
124
|
+
rel: a.external ? "noopener noreferrer" : void 0,
|
|
125
125
|
class: "inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors duration-200",
|
|
126
|
-
onClick: (D) => g(
|
|
126
|
+
onClick: (D) => g(a.url, D)
|
|
127
127
|
}, [
|
|
128
|
-
|
|
128
|
+
a.icon ? (t(), U(y, {
|
|
129
129
|
key: 0,
|
|
130
|
-
icon:
|
|
130
|
+
icon: a.icon,
|
|
131
131
|
class: "w-3.5 h-3.5 shrink-0"
|
|
132
132
|
}, null, 8, ["icon"])) : r("", !0),
|
|
133
|
-
i("span", null,
|
|
133
|
+
i("span", null, n(a.label), 1)
|
|
134
134
|
], 8, te)
|
|
135
135
|
]))), 128))
|
|
136
136
|
])
|
|
137
137
|
]))), 128))
|
|
138
138
|
])) : r("", !0),
|
|
139
139
|
N.value ? (t(), l("div", le, [
|
|
140
|
-
(t(!0), l(m, null, f(e.value.socialLinks, (
|
|
140
|
+
(t(!0), l(m, null, f(e.value.socialLinks, (o, u) => (t(), l("a", {
|
|
141
141
|
key: u,
|
|
142
|
-
href:
|
|
143
|
-
"aria-label":
|
|
142
|
+
href: o.url,
|
|
143
|
+
"aria-label": o.label || "Social link",
|
|
144
144
|
target: "_blank",
|
|
145
145
|
rel: "noopener noreferrer",
|
|
146
146
|
class: "inline-flex items-center justify-center w-9 h-9 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-all duration-200",
|
|
147
|
-
onClick: (
|
|
147
|
+
onClick: (a) => g(o.url, a)
|
|
148
148
|
}, [
|
|
149
149
|
v(y, {
|
|
150
|
-
icon:
|
|
150
|
+
icon: o.icon,
|
|
151
151
|
class: "w-[18px] h-[18px]"
|
|
152
152
|
}, null, 8, ["icon"])
|
|
153
153
|
], 8, re))), 128))
|
|
154
154
|
])) : r("", !0)
|
|
155
155
|
]),
|
|
156
|
-
|
|
157
|
-
i("div",
|
|
158
|
-
e.value.copyright ? (t(), l("p",
|
|
159
|
-
e.value.copyright && p.value ? (t(), l("span",
|
|
156
|
+
V.value ? (t(), l("div", oe, [
|
|
157
|
+
i("div", ae, [
|
|
158
|
+
e.value.copyright ? (t(), l("p", ne, n(e.value.copyright), 1)) : r("", !0),
|
|
159
|
+
e.value.copyright && p.value ? (t(), l("span", se, "|")) : r("", !0),
|
|
160
160
|
p.value ? (t(), l("div", ie, [
|
|
161
|
-
(t(!0), l(m, null, f(e.value.legalLinks, (
|
|
161
|
+
(t(!0), l(m, null, f(e.value.legalLinks, (o, u) => (t(), l("a", {
|
|
162
162
|
key: u,
|
|
163
|
-
href:
|
|
164
|
-
target:
|
|
165
|
-
rel:
|
|
163
|
+
href: o.url,
|
|
164
|
+
target: o.external ? "_blank" : void 0,
|
|
165
|
+
rel: o.external ? "noopener noreferrer" : void 0,
|
|
166
166
|
class: "text-sm text-muted-foreground hover:text-foreground transition-colors duration-200",
|
|
167
|
-
onClick: (
|
|
168
|
-
},
|
|
167
|
+
onClick: (a) => g(o.url, a)
|
|
168
|
+
}, n(o.label), 9, ue))), 128))
|
|
169
169
|
])) : r("", !0)
|
|
170
170
|
])
|
|
171
171
|
])) : r("", !0)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AccordionView.vue3.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-52660f5b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as default
|
|
7
7
|
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { defineComponent as q, shallowRef as N, watch as H, openBlock as
|
|
1
|
+
import { defineComponent as q, shallowRef as N, watch as H, openBlock as s, createElementBlock as i, createVNode as v, unref as y, withCtx as b, Fragment as R, renderList as A, isMemoSame as j, createBlock as k, resolveDynamicComponent as S, createTextVNode as K, toDisplayString as g, createCommentVNode as r, createElementVNode as u, normalizeClass as T, withModifiers as G } from "vue";
|
|
2
2
|
import { VueDraggable as J } from "vue-draggable-plus";
|
|
3
3
|
import P from "../Accordion/AccordionItem.vue.js";
|
|
4
4
|
import Q from "./FormField.vue.js";
|
|
5
5
|
import L from "../Label.vue.js";
|
|
6
6
|
import W from "../Button.vue.js";
|
|
7
|
-
import
|
|
8
|
-
import { renderLabel as
|
|
9
|
-
import { resolveI18nText as
|
|
10
|
-
import { fieldRendersOwnErrorMessage as
|
|
11
|
-
const
|
|
7
|
+
import C from "../Icon.vue.js";
|
|
8
|
+
import { renderLabel as w, resolveCustomFieldRowTitle as X } from "./rowHelpers.js";
|
|
9
|
+
import { resolveI18nText as Y } from "../../utils/i18n.js";
|
|
10
|
+
import { fieldRendersOwnErrorMessage as Z } from "./utils/form.utils.js";
|
|
11
|
+
const p = { class: "custom-fields-accordion min-w-0 w-full" }, I = ["onClick"], _ = { class: "flex items-center flex-1 py-3 px-4 min-w-0" }, ee = { class: "font-medium flex-1 text-left truncate mr-4 min-w-0" }, te = { class: "flex items-center gap-2 flex-none" }, le = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "text-destructive flex items-center justify-center rounded-full bg-destructive/10 w-6 h-6"
|
|
14
|
-
}, le = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "grid gap-4 min-w-0"
|
|
17
14
|
}, se = {
|
|
18
15
|
key: 0,
|
|
19
|
-
class: "
|
|
16
|
+
class: "grid gap-4 min-w-0"
|
|
20
17
|
}, ae = {
|
|
21
18
|
key: 0,
|
|
22
19
|
class: "text-destructive ml-0.5"
|
|
23
20
|
}, ne = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "text-destructive ml-0.5"
|
|
23
|
+
}, ie = {
|
|
24
24
|
key: 1,
|
|
25
25
|
class: "mt-1 text-xs text-destructive"
|
|
26
|
-
},
|
|
26
|
+
}, re = {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: "col-span-1 flex justify-end"
|
|
29
|
-
},
|
|
29
|
+
}, oe = {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "flex flex-col items-center justify-center py-6 text-center border border-border rounded bg-muted/5 mt-2"
|
|
32
|
-
},
|
|
32
|
+
}, ce = { class: "text-sm font-medium text-foreground" }, de = { class: "text-xs text-muted-foreground mt-1" }, Fe = /* @__PURE__ */ q({
|
|
33
33
|
__name: "AccordionView",
|
|
34
34
|
props: {
|
|
35
35
|
rows: {},
|
|
@@ -44,7 +44,7 @@ const Z = { class: "custom-fields-accordion min-w-0 w-full" }, p = ["onClick"],
|
|
|
44
44
|
canRemoveRow: { type: Boolean },
|
|
45
45
|
canAddRow: { type: Boolean },
|
|
46
46
|
helpers: {},
|
|
47
|
-
|
|
47
|
+
rowTitleKey: {},
|
|
48
48
|
itemName: {},
|
|
49
49
|
emptyTitle: {},
|
|
50
50
|
emptyDescription: {},
|
|
@@ -53,24 +53,28 @@ const Z = { class: "custom-fields-accordion min-w-0 w-full" }, p = ["onClick"],
|
|
|
53
53
|
onDragUpdate: { type: Function }
|
|
54
54
|
},
|
|
55
55
|
setup(e) {
|
|
56
|
-
const d = e, o = N([]), m = N([]), M = (
|
|
57
|
-
o.value.includes(
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
const d = e, o = N([]), m = N([]), M = (a) => {
|
|
57
|
+
o.value.includes(a) ? o.value = o.value.filter((n) => n !== a) : (m.value.includes(a) || (m.value = [...m.value, a]), o.value = [...o.value, a]);
|
|
58
|
+
}, V = (a, c) => X({
|
|
59
|
+
row: a,
|
|
60
|
+
titleKey: d.rowTitleKey,
|
|
61
|
+
schema: d.schema
|
|
62
|
+
}) || `${d.itemName} #${c + 1}`, h = (a) => a.labelI18n ? Y(
|
|
63
|
+
a.labelI18n,
|
|
64
|
+
typeof a.label == "string" ? a.label : void 0
|
|
65
|
+
) ?? a.label : a.label;
|
|
62
66
|
return H(
|
|
63
67
|
() => [d.helpers.errors, d.rows],
|
|
64
68
|
() => {
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
-
const c = /* @__PURE__ */ new Set([...o.value, ...
|
|
69
|
+
const a = d.rows.map((l, x) => d.helpers.hasRowErrors(x) ? l._id : null).filter((l) => l !== null);
|
|
70
|
+
if (a.length === 0) return;
|
|
71
|
+
const c = /* @__PURE__ */ new Set([...o.value, ...a]);
|
|
68
72
|
o.value = Array.from(c);
|
|
69
|
-
const n = /* @__PURE__ */ new Set([...m.value, ...
|
|
73
|
+
const n = /* @__PURE__ */ new Set([...m.value, ...a]);
|
|
70
74
|
m.value = Array.from(n);
|
|
71
75
|
},
|
|
72
76
|
{ deep: !0, immediate: !0 }
|
|
73
|
-
), (
|
|
77
|
+
), (a, c) => (s(), i("div", p, [
|
|
74
78
|
v(y(J), {
|
|
75
79
|
"model-value": e.rows,
|
|
76
80
|
"onUpdate:modelValue": e.onDragUpdate,
|
|
@@ -81,8 +85,8 @@ const Z = { class: "custom-fields-accordion min-w-0 w-full" }, p = ["onClick"],
|
|
|
81
85
|
class: "space-y-2 min-w-0"
|
|
82
86
|
}, {
|
|
83
87
|
default: b(() => [
|
|
84
|
-
(
|
|
85
|
-
const
|
|
88
|
+
(s(!0), i(R, null, A(e.rows, (n, l, x, f) => {
|
|
89
|
+
const B = [
|
|
86
90
|
n,
|
|
87
91
|
e.schema,
|
|
88
92
|
e.disabled,
|
|
@@ -99,10 +103,10 @@ const Z = { class: "custom-fields-accordion min-w-0 w-full" }, p = ["onClick"],
|
|
|
99
103
|
e.size,
|
|
100
104
|
e.rounded
|
|
101
105
|
];
|
|
102
|
-
if (
|
|
103
|
-
const
|
|
106
|
+
if (f && f.key === n._id && j(f, B)) return f;
|
|
107
|
+
const E = (s(), k(P, {
|
|
104
108
|
key: n._id,
|
|
105
|
-
item: { id: n._id, title:
|
|
109
|
+
item: { id: n._id, title: V(n, l) },
|
|
106
110
|
"is-open": o.value.includes(n._id),
|
|
107
111
|
"content-class": "border-t border-border",
|
|
108
112
|
variant: "solid",
|
|
@@ -114,7 +118,7 @@ const Z = { class: "custom-fields-accordion min-w-0 w-full" }, p = ["onClick"],
|
|
|
114
118
|
class: T(["flex items-stretch w-full min-w-0", [D, "!p-0 overflow-hidden"]]),
|
|
115
119
|
onClick: U
|
|
116
120
|
}, [
|
|
117
|
-
e.draggable && !e.disabled && !e.readonly ? (
|
|
121
|
+
e.draggable && !e.disabled && !e.readonly ? (s(), i("div", {
|
|
118
122
|
key: 0,
|
|
119
123
|
class: T([
|
|
120
124
|
"w-12 flex-none flex items-center justify-center border-r border-border bg-muted/5 drag-handle transition-colors",
|
|
@@ -123,31 +127,31 @@ const Z = { class: "custom-fields-accordion min-w-0 w-full" }, p = ["onClick"],
|
|
|
123
127
|
onClick: c[0] || (c[0] = G(() => {
|
|
124
128
|
}, ["stop"]))
|
|
125
129
|
}, [
|
|
126
|
-
v(
|
|
130
|
+
v(C, {
|
|
127
131
|
icon: "lucide:grip-vertical",
|
|
128
132
|
class: "w-4 h-4"
|
|
129
133
|
})
|
|
130
134
|
], 2)) : r("", !0),
|
|
131
|
-
u("div",
|
|
132
|
-
u("span",
|
|
133
|
-
u("div",
|
|
134
|
-
e.helpers.hasRowErrors(l) ? (
|
|
135
|
-
v(
|
|
135
|
+
u("div", _, [
|
|
136
|
+
u("span", ee, g(V(n, l)), 1),
|
|
137
|
+
u("div", te, [
|
|
138
|
+
e.helpers.hasRowErrors(l) ? (s(), i("div", le, [
|
|
139
|
+
v(C, {
|
|
136
140
|
icon: "lucide:alert-circle",
|
|
137
141
|
class: "w-4 h-4"
|
|
138
142
|
})
|
|
139
143
|
])) : r("", !0),
|
|
140
|
-
v(
|
|
144
|
+
v(C, {
|
|
141
145
|
icon: "lucide:chevron-down",
|
|
142
146
|
class: T(["w-4 h-4 transition-transform duration-200", { "rotate-180": t }])
|
|
143
147
|
}, null, 8, ["class"])
|
|
144
148
|
])
|
|
145
149
|
])
|
|
146
|
-
], 10,
|
|
150
|
+
], 10, I)
|
|
147
151
|
]),
|
|
148
152
|
content: b(() => [
|
|
149
|
-
m.value.includes(n._id) ? (
|
|
150
|
-
(
|
|
153
|
+
m.value.includes(n._id) ? (s(), i("div", se, [
|
|
154
|
+
(s(!0), i(R, null, A(e.schema, (t, U, D, F) => {
|
|
151
155
|
const z = [
|
|
152
156
|
t,
|
|
153
157
|
e.helpers.getFieldValue(l, t.name),
|
|
@@ -164,20 +168,20 @@ const Z = { class: "custom-fields-accordion min-w-0 w-full" }, p = ["onClick"],
|
|
|
164
168
|
e.rounded,
|
|
165
169
|
n
|
|
166
170
|
];
|
|
167
|
-
if (F && F.key === t.name &&
|
|
168
|
-
const $ = (
|
|
171
|
+
if (F && F.key === t.name && j(F, z)) return F;
|
|
172
|
+
const $ = (s(), i("div", {
|
|
169
173
|
key: t.name,
|
|
170
174
|
class: "col-span-1 flex flex-col min-w-0"
|
|
171
175
|
}, [
|
|
172
|
-
e.helpers.isFieldVisible(l, t) ? (
|
|
173
|
-
(t.label || t.labelI18n) && e.helpers.getResolvedType(t, l) !== "switch" && e.helpers.getResolvedType(t, l) !== "check" && e.helpers.getResolvedType(t, l) !== "customFields" && e.helpers.getResolvedType(t, l) !== "choiceBox" ? (
|
|
176
|
+
e.helpers.isFieldVisible(l, t) ? (s(), i(R, { key: 0 }, [
|
|
177
|
+
(t.label || t.labelI18n) && e.helpers.getResolvedType(t, l) !== "switch" && e.helpers.getResolvedType(t, l) !== "check" && e.helpers.getResolvedType(t, l) !== "customFields" && e.helpers.getResolvedType(t, l) !== "choiceBox" ? (s(), k(L, {
|
|
174
178
|
key: 0,
|
|
175
179
|
class: "mb-2 block text-sm font-medium"
|
|
176
180
|
}, {
|
|
177
181
|
default: b(() => [
|
|
178
|
-
typeof y(
|
|
182
|
+
typeof y(w)(h(t)) != "string" ? (s(), k(S(y(w)(h(t))), { key: 0 })) : (s(), i(R, { key: 1 }, [
|
|
179
183
|
K(g(h(t)) + " ", 1),
|
|
180
|
-
t.required ? (
|
|
184
|
+
t.required ? (s(), i("span", ae, "*")) : r("", !0)
|
|
181
185
|
], 64))
|
|
182
186
|
]),
|
|
183
187
|
_: 2
|
|
@@ -201,25 +205,25 @@ const Z = { class: "custom-fields-accordion min-w-0 w-full" }, p = ["onClick"],
|
|
|
201
205
|
isUpdate: e.isUpdate,
|
|
202
206
|
onChange: (O) => e.onFieldChange(l, t.name, O)
|
|
203
207
|
}, null, 8, ["field", "value", "values", "errors", "error", "variant", "size", "rounded", "disabled", "readonly", "isUpdate", "onChange"]),
|
|
204
|
-
e.helpers.getResolvedType(t, l) === "check" || e.helpers.getResolvedType(t, l) === "switch" && t.props?.switchVariant === "basic" ? (
|
|
208
|
+
e.helpers.getResolvedType(t, l) === "check" || e.helpers.getResolvedType(t, l) === "switch" && t.props?.switchVariant === "basic" ? (s(), k(L, {
|
|
205
209
|
key: 0,
|
|
206
210
|
class: "ml-2 text-sm font-medium cursor-pointer"
|
|
207
211
|
}, {
|
|
208
212
|
default: b(() => [
|
|
209
|
-
typeof y(
|
|
213
|
+
typeof y(w)(h(t)) != "string" ? (s(), k(S(y(w)(h(t))), { key: 0 })) : (s(), i(R, { key: 1 }, [
|
|
210
214
|
K(g(h(t)) + " ", 1),
|
|
211
|
-
t.required ? (
|
|
215
|
+
t.required ? (s(), i("span", ne, "*")) : r("", !0)
|
|
212
216
|
], 64))
|
|
213
217
|
]),
|
|
214
218
|
_: 2
|
|
215
219
|
}, 1024)) : r("", !0)
|
|
216
220
|
], 2),
|
|
217
|
-
e.helpers.getFieldError(l, t.name) && !y(
|
|
221
|
+
e.helpers.getFieldError(l, t.name) && !y(Z)(e.helpers.getResolvedType(t, l)) ? (s(), i("p", ie, g(e.helpers.getFieldError(l, t.name)), 1)) : r("", !0)
|
|
218
222
|
], 64)) : r("", !0)
|
|
219
223
|
]));
|
|
220
224
|
return $.memo = z, $;
|
|
221
225
|
}, c, 1), 128)),
|
|
222
|
-
e.canRemoveRow ? (
|
|
226
|
+
e.canRemoveRow ? (s(), i("div", re, [
|
|
223
227
|
v(W, {
|
|
224
228
|
type: "button",
|
|
225
229
|
variant: "secondary",
|
|
@@ -233,18 +237,18 @@ const Z = { class: "custom-fields-accordion min-w-0 w-full" }, p = ["onClick"],
|
|
|
233
237
|
]),
|
|
234
238
|
_: 2
|
|
235
239
|
}, 1032, ["item", "is-open"]));
|
|
236
|
-
return
|
|
240
|
+
return E.memo = B, E;
|
|
237
241
|
}, c, 3), 128))
|
|
238
242
|
]),
|
|
239
243
|
_: 1
|
|
240
244
|
}, 8, ["model-value", "onUpdate:modelValue", "disabled"]),
|
|
241
|
-
e.rows.length === 0 ? (
|
|
242
|
-
u("p",
|
|
243
|
-
u("p",
|
|
245
|
+
e.rows.length === 0 ? (s(), i("div", oe, [
|
|
246
|
+
u("p", ce, g(e.emptyTitle), 1),
|
|
247
|
+
u("p", de, g(e.emptyDescription), 1)
|
|
244
248
|
])) : r("", !0)
|
|
245
249
|
]));
|
|
246
250
|
}
|
|
247
251
|
});
|
|
248
252
|
export {
|
|
249
|
-
|
|
253
|
+
Fe as default
|
|
250
254
|
};
|