vlite3 1.1.2 → 1.1.5
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 +5 -0
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -1
- package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.js +30 -28
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
- package/components/CategoryManager/CategoryManager.vue.js +138 -119
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/Chart/BarChart.vue.d.ts +48 -0
- package/components/Chart/CircleChart.vue.d.ts +47 -0
- package/components/Chart/LineChart.vue.d.ts +55 -0
- package/components/Chart/PieChart.vue.d.ts +49 -0
- package/components/Chart/index.d.ts +5 -0
- package/components/Chart/types.d.ts +135 -0
- package/components/Chart/utils.d.ts +40 -0
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/Comment/CommentEditor.vue.d.ts +41 -0
- package/components/Comment/CommentEditor.vue.js +221 -0
- package/components/Comment/CommentEditor.vue2.js +4 -0
- package/components/Comment/CommentItem.vue.d.ts +70 -0
- package/components/Comment/CommentItem.vue.js +7 -0
- package/components/Comment/CommentItem.vue2.js +322 -0
- package/components/Comment/CommentThread.vue.d.ts +64 -0
- package/components/Comment/CommentThread.vue.js +185 -0
- package/components/Comment/CommentThread.vue2.js +4 -0
- package/components/Comment/index.d.ts +4 -0
- package/components/Comment/types.d.ts +34 -0
- package/components/ConfirmationModal.vue.js +30 -28
- package/components/CopyButton.vue.d.ts +50 -0
- package/components/CopyButton.vue.js +69 -0
- package/components/CopyButton.vue2.js +4 -0
- package/components/DataTable/DataTable.vue.d.ts +2 -4
- package/components/DataTable/DataTable.vue.js +184 -235
- package/components/DataTable/DataTableHeader.vue.d.ts +2 -0
- package/components/DataTable/DataTableHeader.vue.js +24 -23
- package/components/DataTable/DataTableRow.vue.d.ts +2 -0
- package/components/DataTable/DataTableRow.vue.js +32 -31
- package/components/DataTable/types.d.ts +2 -9
- package/components/DatePicker.vue.js +41 -35
- package/components/DateRangePicker.vue.js +18 -17
- package/components/Dropdown/Dropdown.vue.d.ts +5 -0
- package/components/Dropdown/Dropdown.vue.js +141 -137
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +4 -0
- package/components/Dropdown/DropdownTrigger.vue.js +12 -7
- package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
- package/components/Dropdown/composables/useDropdownSelection.js +46 -31
- package/components/Empty/Empty.vue.js +7 -5
- package/components/Empty/index.d.ts +1 -1
- package/components/Empty/variants/Variant12.vue.d.ts +22 -0
- package/components/Empty/variants/Variant12.vue.js +35 -0
- package/components/Empty/variants/Variant12.vue2.js +4 -0
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Footer/Footer.vue.d.ts +3 -0
- package/components/Footer/Variant1.vue.d.ts +20 -0
- package/components/Footer/Variant2.vue.d.ts +20 -0
- package/components/Footer/Variant3.vue.d.ts +12 -0
- package/components/Footer/index.d.ts +2 -0
- package/components/Footer/types.d.ts +73 -0
- package/components/Form/CustomFields.vue.d.ts +2 -0
- package/components/Form/CustomFields.vue.js +1 -1
- package/components/Form/CustomFields.vue2.js +125 -122
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +68 -64
- package/components/Form/FormField.vue.js +205 -149
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +28 -27
- package/components/Form/types.d.ts +2 -2
- package/components/Form/utils/form.utils.d.ts +3 -3
- package/components/Form/utils/form.utils.js +37 -37
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.js +9 -7
- package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
- package/components/Invoice/InvoiceTotals.vue.js +86 -0
- package/components/Invoice/InvoiceTotals.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant1.vue.js +194 -207
- package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant2.vue.js +109 -118
- package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant3.vue.js +157 -167
- package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant4.vue.js +192 -202
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +22 -0
- package/components/Masonry/Masonry.vue.d.ts +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +60 -54
- package/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
- package/components/MultiSelect/MultiSelect.vue.js +92 -90
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +127 -121
- package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
- package/components/RichTextEditor/RichTextLinkPopover.vue.d.ts +26 -0
- package/components/RichTextEditor/RichTextReader.vue.d.ts +7 -0
- package/components/RichTextEditor/RichTextToolbar.vue.d.ts +24 -0
- package/components/RichTextEditor/composables/useRichTextImageUpload.d.ts +14 -0
- package/components/RichTextEditor/composables/useRichTextLinks.d.ts +32 -0
- package/components/RichTextEditor/index.d.ts +2 -0
- package/components/Screen/Screen.vue.js +45 -46
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/SidebarMenu/SidebarMenu.vue.js +192 -91
- package/components/SidebarMenu/SidebarMenu.vue3.js +5 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.js +170 -157
- package/components/SidebarMenu/types.d.ts +12 -3
- package/components/{DataTable/DataTableToolbar.vue.d.ts → Splitter/Splitter.vue.d.ts} +18 -15
- package/components/Splitter/Splitter.vue.js +64 -0
- package/components/Splitter/Splitter.vue2.js +4 -0
- package/components/Splitter/index.d.ts +1 -0
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/types.d.ts +1 -0
- package/components/StatusChip/status-map.js +34 -2
- package/components/Switch.vue.d.ts +6 -1
- package/components/Switch.vue.js +61 -24
- package/components/TagInput/TagInput.vue.d.ts +187 -0
- package/components/TagInput/TagInput.vue.js +113 -0
- package/components/TagInput/TagInput.vue2.js +4 -0
- package/components/TagInput/index.d.ts +1 -0
- package/components/Textarea.vue.js +19 -18
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/components/index.d.ts +4 -0
- package/core/config.d.ts +54 -0
- package/index.d.ts +4 -0
- package/index.js +300 -285
- package/package.json +1 -1
- package/style.css +657 -6
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +2 -0
- package/types/styles.d.ts +1 -0
- package/utils/functions.js +9 -9
- package/components/DataTable/DataTableToolbar.vue.js +0 -60
- package/components/DataTable/DataTableToolbar.vue2.js +0 -4
- package/components/SidebarMenu/SidebarMenu.vue2.js +0 -4
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VueDraggable as
|
|
1
|
+
import { defineComponent as _, computed as f, shallowRef as I, watch as ee, openBlock as n, createElementBlock as d, createElementVNode as w, createBlock as R, withCtx as N, createTextVNode as te, toDisplayString as v, createCommentVNode as i, Fragment as k, renderList as V, normalizeClass as C, createVNode as $, unref as ae, isMemoSame as le } from "vue";
|
|
2
|
+
import { VueDraggable as re } from "vue-draggable-plus";
|
|
3
3
|
import se from "./FormField.vue.js";
|
|
4
|
-
import
|
|
4
|
+
import E from "../Button.vue.js";
|
|
5
5
|
import oe from "../Label.vue.js";
|
|
6
6
|
import ne from "../Icon.vue.js";
|
|
7
|
-
import { $t as
|
|
8
|
-
import { setNestedValue as
|
|
7
|
+
import { $t as p } from "../../utils/i18n.js";
|
|
8
|
+
import { setNestedValue as T, resolveFieldType as de, evaluateConditional as F } from "./utils/form.utils.js";
|
|
9
9
|
const ue = { class: "custom-fields-wrapper" }, ie = { class: "flex justify-between items-center mb-2" }, ce = { class: "custom-fields-table border border-border rounded overflow-hidden bg-background" }, me = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "flex border-b border-border bg-muted/50 text-gray-800 text-xs font-semibold uppercase tracking-wider"
|
|
@@ -18,16 +18,16 @@ const ue = { class: "custom-fields-wrapper" }, ie = { class: "flex justify-betwe
|
|
|
18
18
|
}, ve = {
|
|
19
19
|
key: 2,
|
|
20
20
|
class: "w-10 flex-none p-3"
|
|
21
|
-
},
|
|
21
|
+
}, ye = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "w-10 flex-none flex items-center justify-center text-xs text-muted-foreground border-r border-border bg-muted/20"
|
|
24
|
-
},
|
|
24
|
+
}, ge = {
|
|
25
25
|
key: 2,
|
|
26
26
|
class: "w-10 flex-none flex items-center justify-center border-l border-border bg-muted/20"
|
|
27
|
-
},
|
|
27
|
+
}, he = {
|
|
28
28
|
key: 1,
|
|
29
29
|
class: "flex flex-col items-center justify-center py-6 text-center bg-muted/5"
|
|
30
|
-
},
|
|
30
|
+
}, we = { class: "text-sm font-medium text-foreground" }, pe = { class: "text-xs text-muted-foreground mt-1" }, Be = /* @__PURE__ */ _({
|
|
31
31
|
__name: "CustomFields",
|
|
32
32
|
props: {
|
|
33
33
|
name: {},
|
|
@@ -38,6 +38,7 @@ const ue = { class: "custom-fields-wrapper" }, ie = { class: "flex justify-betwe
|
|
|
38
38
|
size: { default: "md" },
|
|
39
39
|
rounded: { default: "md" },
|
|
40
40
|
disabled: { type: Boolean, default: !1 },
|
|
41
|
+
readonly: { type: Boolean, default: !1 },
|
|
41
42
|
draggable: { type: Boolean, default: !1 },
|
|
42
43
|
minRows: { default: 0 },
|
|
43
44
|
maxRows: {},
|
|
@@ -51,195 +52,197 @@ const ue = { class: "custom-fields-wrapper" }, ie = { class: "flex justify-betwe
|
|
|
51
52
|
isUpdate: { type: Boolean, default: !1 }
|
|
52
53
|
},
|
|
53
54
|
emits: ["update:modelValue", "change"],
|
|
54
|
-
setup(
|
|
55
|
-
const
|
|
56
|
-
const e =
|
|
55
|
+
setup(r, { emit: z }) {
|
|
56
|
+
const t = r, U = z, B = f(() => t.labelI18n ? p(t.labelI18n) : t.label), A = f(() => {
|
|
57
|
+
const e = p("vlite.customFields.emptyTitle");
|
|
57
58
|
return e !== "vlite.customFields.emptyTitle" ? e : "No items added";
|
|
58
|
-
}),
|
|
59
|
-
const e =
|
|
59
|
+
}), S = f(() => {
|
|
60
|
+
const e = p("vlite.customFields.emptyDescription");
|
|
60
61
|
return e !== "vlite.customFields.emptyDescription" ? e : "Add a new item to get started";
|
|
61
|
-
}),
|
|
62
|
+
}), s = I([]), j = () => `row_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
62
63
|
ee(
|
|
63
|
-
() =>
|
|
64
|
+
() => t.modelValue,
|
|
64
65
|
(e) => {
|
|
65
|
-
Array.isArray(e) ?
|
|
66
|
-
const
|
|
66
|
+
Array.isArray(e) ? s.value = e.map((a, o) => {
|
|
67
|
+
const l = s.value[o];
|
|
67
68
|
return {
|
|
68
|
-
...
|
|
69
|
-
_id:
|
|
69
|
+
...a,
|
|
70
|
+
_id: l?._id || j()
|
|
70
71
|
};
|
|
71
|
-
}) :
|
|
72
|
+
}) : s.value = [];
|
|
72
73
|
},
|
|
73
74
|
{ immediate: !0, deep: !0 }
|
|
74
75
|
);
|
|
75
|
-
const
|
|
76
|
+
const H = () => {
|
|
76
77
|
const e = {};
|
|
77
|
-
for (const
|
|
78
|
-
const o = typeof
|
|
79
|
-
|
|
78
|
+
for (const a of t.schema) {
|
|
79
|
+
const o = typeof a.value == "function" ? a.value() : a.value;
|
|
80
|
+
let l = null;
|
|
81
|
+
(a.props?.multiple || a.type === "multiSelect" || a.type === "tags") && (l = []), e[a.name] = o ?? l;
|
|
80
82
|
}
|
|
81
|
-
return { ...e, _id:
|
|
82
|
-
},
|
|
83
|
-
if (
|
|
84
|
-
const e = [...
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
if (
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
...
|
|
94
|
-
[
|
|
83
|
+
return { ...e, _id: j() };
|
|
84
|
+
}, L = () => {
|
|
85
|
+
if (t.disabled || t.readonly || t.maxRows && s.value.length >= t.maxRows) return;
|
|
86
|
+
const e = [...s.value, H()];
|
|
87
|
+
s.value = e, y(e);
|
|
88
|
+
}, M = (e) => {
|
|
89
|
+
if (t.disabled || t.readonly || s.value.length <= t.minRows) return;
|
|
90
|
+
const a = [...s.value];
|
|
91
|
+
a.splice(e, 1), s.value = a, y(a);
|
|
92
|
+
}, G = async (e, a, o) => {
|
|
93
|
+
const l = [...s.value];
|
|
94
|
+
l[e] = {
|
|
95
|
+
...l[e],
|
|
96
|
+
[a]: o.value
|
|
95
97
|
};
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
98
|
+
const h = t.schema.find((c) => c.name === a);
|
|
99
|
+
if (h && h.updateValues)
|
|
98
100
|
try {
|
|
99
|
-
const
|
|
100
|
-
let m = { ...
|
|
101
|
-
|
|
102
|
-
const b = await
|
|
101
|
+
const c = l[e];
|
|
102
|
+
let m = { ...t.values || {} };
|
|
103
|
+
t.name && (m = T(m, t.name, l));
|
|
104
|
+
const b = await h.updateValues({
|
|
103
105
|
value: o.value,
|
|
104
|
-
values:
|
|
106
|
+
values: c,
|
|
105
107
|
// strictly local row scope
|
|
106
108
|
globalValues: m,
|
|
107
109
|
// strictly global root scope
|
|
108
110
|
data: o.data,
|
|
109
|
-
isUpdate:
|
|
111
|
+
isUpdate: t.isUpdate
|
|
110
112
|
});
|
|
111
|
-
b && typeof b == "object" && (
|
|
112
|
-
} catch (
|
|
113
|
-
console.error(`[CustomFields] Error in updateValues for ${
|
|
113
|
+
b && typeof b == "object" && (l[e] = { ...l[e], ...b });
|
|
114
|
+
} catch (c) {
|
|
115
|
+
console.error(`[CustomFields] Error in updateValues for ${a}:`, c);
|
|
114
116
|
}
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
let
|
|
123
|
-
return
|
|
124
|
-
values:
|
|
125
|
-
globalValues:
|
|
126
|
-
isUpdate:
|
|
117
|
+
s.value = l, y(l);
|
|
118
|
+
}, O = (e) => {
|
|
119
|
+
s.value = e, y(e);
|
|
120
|
+
}, y = (e) => {
|
|
121
|
+
const a = e.map(({ _id: o, ...l }) => l);
|
|
122
|
+
U("update:modelValue", a), U("change", a);
|
|
123
|
+
}, W = (e, a) => s.value[e]?.[a], q = f(() => !(t.disabled || t.readonly || t.maxRows && s.value.length >= t.maxRows)), x = f(() => t.disabled || t.readonly ? !1 : s.value.length > t.minRows), D = f(() => t.headers && t.headers.length > 0 ? t.headers : t.schema.map((e) => e.labelI18n ? p(e.labelI18n) : e.label || e.name)), g = (e) => {
|
|
124
|
+
let a = { ...t.values || {} };
|
|
125
|
+
return t.name && (a = T(a, t.name, s.value)), {
|
|
126
|
+
values: s.value[e] || {},
|
|
127
|
+
globalValues: a,
|
|
128
|
+
isUpdate: t.isUpdate
|
|
127
129
|
};
|
|
128
|
-
},
|
|
129
|
-
if (!
|
|
130
|
-
const
|
|
131
|
-
return Object.keys(
|
|
130
|
+
}, J = (e, a) => de(e, g(a)), K = (e, a) => t.disabled ? !0 : F(a.disabled, g(e)), P = (e, a) => t.readonly ? !0 : F(a.readonly, g(e)), Q = (e, a) => a.when ? F(a.when, g(e)) : !0, X = (e) => {
|
|
131
|
+
if (!t.errors || !t.name) return "";
|
|
132
|
+
const a = `${t.name}.${e}.`;
|
|
133
|
+
return Object.keys(t.errors).filter((o) => o.startsWith(a)).map((o) => t.errors[o]).join(",");
|
|
132
134
|
};
|
|
133
|
-
return (e,
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
return (e, a) => (n(), d("div", ue, [
|
|
136
|
+
w("div", ie, [
|
|
137
|
+
B.value ? (n(), R(oe, {
|
|
136
138
|
key: 0,
|
|
137
139
|
class: "text-sm font-medium text-foreground"
|
|
138
140
|
}, {
|
|
139
|
-
default:
|
|
140
|
-
te(v(
|
|
141
|
+
default: N(() => [
|
|
142
|
+
te(v(B.value), 1)
|
|
141
143
|
]),
|
|
142
144
|
_: 1
|
|
143
|
-
})) :
|
|
144
|
-
|
|
145
|
+
})) : i("", !0),
|
|
146
|
+
r.readonly ? i("", !0) : (n(), R(E, {
|
|
147
|
+
key: 1,
|
|
145
148
|
type: "button",
|
|
146
149
|
variant: "outline",
|
|
147
150
|
size: "xs",
|
|
148
151
|
rounded: "full",
|
|
149
152
|
icon: "lucide:plus",
|
|
150
|
-
disabled: !
|
|
151
|
-
onClick:
|
|
152
|
-
}, null, 8, ["disabled"])
|
|
153
|
+
disabled: !q.value,
|
|
154
|
+
onClick: L
|
|
155
|
+
}, null, 8, ["disabled"]))
|
|
153
156
|
]),
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
(n(!0), d(k, null, V(
|
|
159
|
-
key:
|
|
160
|
-
class: C(["flex-1 p-3 min-w-0 truncate", { "border-l border-border":
|
|
157
|
+
w("div", ce, [
|
|
158
|
+
D.value.length > 0 ? (n(), d("div", me, [
|
|
159
|
+
r.draggable && !r.disabled && !r.readonly ? (n(), d("div", be)) : i("", !0),
|
|
160
|
+
r.showRowNumbers ? (n(), d("div", fe, " # ")) : i("", !0),
|
|
161
|
+
(n(!0), d(k, null, V(D.value, (o, l) => (n(), d("div", {
|
|
162
|
+
key: l,
|
|
163
|
+
class: C(["flex-1 p-3 min-w-0 truncate", { "border-l border-border": l > 0 }])
|
|
161
164
|
}, v(o), 3))), 128)),
|
|
162
|
-
|
|
163
|
-
])) :
|
|
164
|
-
|
|
165
|
-
"model-value":
|
|
166
|
-
"onUpdate:modelValue":
|
|
167
|
-
disabled: !
|
|
165
|
+
x.value ? (n(), d("div", ve)) : i("", !0)
|
|
166
|
+
])) : i("", !0),
|
|
167
|
+
$(ae(re), {
|
|
168
|
+
"model-value": s.value,
|
|
169
|
+
"onUpdate:modelValue": O,
|
|
170
|
+
disabled: !r.draggable || r.disabled || r.readonly,
|
|
168
171
|
animation: 150,
|
|
169
172
|
handle: ".drag-handle",
|
|
170
173
|
"ghost-class": "opacity-50",
|
|
171
174
|
class: "divide-y divide-border"
|
|
172
175
|
}, {
|
|
173
|
-
default:
|
|
174
|
-
(n(!0), d(k, null, V(
|
|
175
|
-
const m = [o,
|
|
176
|
-
if (
|
|
176
|
+
default: N(() => [
|
|
177
|
+
(n(!0), d(k, null, V(s.value, (o, l, h, c) => {
|
|
178
|
+
const m = [o, r.disabled, r.readonly, r.isUpdate, r.showRowNumbers, x.value, r.draggable, l, X(l)];
|
|
179
|
+
if (c && c.key === o._id && le(c, m)) return c;
|
|
177
180
|
const b = (n(), d("div", {
|
|
178
181
|
key: o._id,
|
|
179
182
|
class: "flex group bg-white transition-colors"
|
|
180
183
|
}, [
|
|
181
|
-
|
|
184
|
+
r.draggable && !r.disabled && !r.readonly ? (n(), d("div", {
|
|
182
185
|
key: 0,
|
|
183
|
-
class: C(["w-10 flex-none flex items-center justify-center border-r border-border bg-muted/5 drag-handle transition-colors",
|
|
186
|
+
class: C(["w-10 flex-none flex items-center justify-center border-r border-border bg-muted/5 drag-handle transition-colors", r.disabled ? "cursor-not-allowed opacity-50" : "cursor-grab active:cursor-grabbing hover:bg-muted/10 text-muted-foreground hover:text-foreground"])
|
|
184
187
|
}, [
|
|
185
|
-
|
|
188
|
+
$(ne, {
|
|
186
189
|
icon: "lucide:grip-vertical",
|
|
187
190
|
class: "w-4 h-4"
|
|
188
191
|
})
|
|
189
|
-
], 2)) :
|
|
190
|
-
|
|
191
|
-
(n(!0), d(k, null, V(
|
|
192
|
+
], 2)) : i("", !0),
|
|
193
|
+
r.showRowNumbers ? (n(), d("div", ye, v(l + 1), 1)) : i("", !0),
|
|
194
|
+
(n(!0), d(k, null, V(r.schema, (u, Y) => (n(), d("div", {
|
|
192
195
|
key: u.name,
|
|
193
|
-
class: C(["flex-1 min-w-0 relative", { "border-l border-border":
|
|
196
|
+
class: C(["flex-1 min-w-0 relative", { "border-l border-border": Y > 0 }])
|
|
194
197
|
}, [
|
|
195
|
-
|
|
198
|
+
Q(l, u) ? (n(), R(se, {
|
|
196
199
|
key: 0,
|
|
197
200
|
field: {
|
|
198
201
|
...u,
|
|
199
202
|
props: {
|
|
200
|
-
...
|
|
203
|
+
...J(u, l) === "multiSelect" ? { showControls: !1, wrap: !1 } : {},
|
|
201
204
|
...u.props || {}
|
|
202
205
|
},
|
|
203
206
|
label: void 0
|
|
204
207
|
},
|
|
205
|
-
value:
|
|
206
|
-
values:
|
|
207
|
-
errors:
|
|
208
|
-
error:
|
|
208
|
+
value: W(l, u.name),
|
|
209
|
+
values: s.value[l] || {},
|
|
210
|
+
errors: r.errors,
|
|
211
|
+
error: r.name && r.errors ? r.errors[`${r.name}.${l}.${u.name}`] : "",
|
|
209
212
|
variant: "transparent",
|
|
210
213
|
size: "sm",
|
|
211
214
|
rounded: "none",
|
|
212
|
-
disabled:
|
|
213
|
-
readonly:
|
|
214
|
-
isUpdate:
|
|
215
|
+
disabled: K(l, u),
|
|
216
|
+
readonly: P(l, u),
|
|
217
|
+
isUpdate: r.isUpdate,
|
|
215
218
|
class: "w-full h-full min-h-[40px]",
|
|
216
|
-
onChange: (
|
|
217
|
-
}, null, 8, ["field", "value", "values", "errors", "error", "disabled", "readonly", "isUpdate", "onChange"])) :
|
|
219
|
+
onChange: (Z) => G(l, u.name, Z)
|
|
220
|
+
}, null, 8, ["field", "value", "values", "errors", "error", "disabled", "readonly", "isUpdate", "onChange"])) : i("", !0)
|
|
218
221
|
], 2))), 128)),
|
|
219
|
-
|
|
220
|
-
|
|
222
|
+
x.value ? (n(), d("div", ge, [
|
|
223
|
+
$(E, {
|
|
221
224
|
type: "button",
|
|
222
225
|
variant: "ghost",
|
|
223
226
|
size: "xs",
|
|
224
227
|
icon: "lucide:trash-2",
|
|
225
|
-
disabled:
|
|
226
|
-
onClick: (u) =>
|
|
228
|
+
disabled: r.disabled || r.readonly,
|
|
229
|
+
onClick: (u) => M(l)
|
|
227
230
|
}, null, 8, ["disabled", "onClick"])
|
|
228
|
-
])) :
|
|
231
|
+
])) : i("", !0)
|
|
229
232
|
]));
|
|
230
233
|
return b.memo = m, b;
|
|
231
|
-
},
|
|
234
|
+
}, a, 0), 128))
|
|
232
235
|
]),
|
|
233
236
|
_: 1
|
|
234
237
|
}, 8, ["model-value", "disabled"]),
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
])) :
|
|
238
|
+
s.value.length === 0 ? (n(), d("div", he, [
|
|
239
|
+
w("p", we, v(A.value), 1),
|
|
240
|
+
w("p", pe, v(S.value), 1)
|
|
241
|
+
])) : i("", !0)
|
|
239
242
|
])
|
|
240
243
|
]));
|
|
241
244
|
}
|
|
242
245
|
});
|
|
243
246
|
export {
|
|
244
|
-
|
|
247
|
+
Be as default
|
|
245
248
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Form.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-712d6d5d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|