vlite3 1.0.10 → 1.1.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/README.md +4 -1
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -16
- package/components/AttachmentsList/AttachmentsList.vue.js +191 -167
- package/components/AvatarGroup/AvatarGroup.vue.d.ts +24 -0
- package/components/AvatarGroup/AvatarGroup.vue.js +91 -0
- package/components/AvatarGroup/AvatarGroup.vue2.js +4 -0
- package/components/AvatarGroup/index.d.ts +2 -0
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/Barcode/Barcode.vue.js +6 -5
- package/components/Button.vue.d.ts +1 -1
- package/components/Calendar/Calendar.vue.d.ts +229 -0
- package/components/Calendar/Calendar.vue.js +7 -0
- package/components/Calendar/Calendar.vue2.js +186 -0
- package/components/Calendar/CalendarEventItem.vue.d.ts +17 -0
- package/components/Calendar/CalendarEventItem.vue.js +111 -0
- package/components/Calendar/CalendarEventItem.vue2.js +4 -0
- package/components/Calendar/index.d.ts +2 -0
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +2 -1
- package/components/CategoryManager/CategoryManager.vue.js +322 -0
- package/components/CategoryManager/CategoryManager.vue2.js +4 -0
- package/components/CategoryManager/CategoryNode.vue.js +224 -0
- package/components/CategoryManager/CategoryNode.vue2.js +4 -0
- package/components/CategoryManager/types.d.ts +14 -0
- package/components/Chip/Chip.vue.d.ts +2 -2
- 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 +7 -7
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/ConfirmationModal.vue.d.ts +2 -2
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +48 -0
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.js +97 -0
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue2.js +4 -0
- package/components/CustomFieldsDisplay/index.d.ts +2 -0
- package/components/CustomFieldsDisplay/types.d.ts +18 -0
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DateTime/DateTime.vue.d.ts +2 -0
- package/components/DateTime/DateTime.vue.js +9 -23
- package/components/Dropdown/Dropdown.vue.d.ts +3 -3
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.d.ts +2 -2
- package/components/Dropdown/DropdownTrigger.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.d.ts +1 -1
- package/components/Form/CustomFields.vue.d.ts +1 -1
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +230 -241
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Form/composables/useForm.d.ts +2 -0
- package/components/Form/composables/useForm.js +76 -69
- package/components/Form/utils/form.utils.js +66 -66
- package/components/ImportData/ImportData.vue.js +48 -48
- package/components/ImportData/ImportStep2.vue.js +116 -5
- package/components/ImportData/ImportStep2.vue2.js +2 -105
- package/components/Input.vue.d.ts +3 -3
- package/components/Invoice/Invoice.vue.d.ts +3 -0
- package/components/Invoice/Invoice.vue.js +38 -0
- package/components/Invoice/Invoice.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +13 -0
- package/components/Invoice/InvoiceVariant1.vue.js +360 -0
- package/components/Invoice/InvoiceVariant1.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant2.vue.d.ts +13 -0
- package/components/Invoice/InvoiceVariant2.vue.js +226 -0
- package/components/Invoice/InvoiceVariant2.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant3.vue.d.ts +13 -0
- package/components/Invoice/InvoiceVariant3.vue.js +292 -0
- package/components/Invoice/InvoiceVariant3.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant4.vue.d.ts +13 -0
- package/components/Invoice/InvoiceVariant4.vue.js +343 -0
- package/components/Invoice/InvoiceVariant4.vue2.js +4 -0
- package/components/Invoice/index.d.ts +2 -0
- package/components/Invoice/types.d.ts +97 -0
- package/components/List/List.vue.d.ts +1 -9
- package/components/List/List.vue.js +166 -165
- package/components/List/ListFieldRow.vue.d.ts +10 -2
- package/components/List/ListFieldRow.vue.js +80 -78
- package/components/List/utils.d.ts +2 -1
- package/components/List/utils.js +8 -39
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/Navbar/NavbarItem.vue.d.ts +1 -1
- package/components/Navbar/NavbarTabs.vue.js +2 -2
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.d.ts +2 -2
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +38 -38
- package/components/OTPInput/OTPInput.vue.d.ts +1 -1
- package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
- package/components/Screen/ScreenFilter.vue.js +22 -21
- package/components/Screen/components/ScreenQuickFilters.vue.js +6 -5
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/StatusChip/status-map.js +27 -7
- package/components/Tabes/Tabes.vue.d.ts +1 -0
- package/components/Tabes/Tabes.vue.js +2 -2
- package/components/Tabes/Tabes.vue2.js +33 -32
- package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +141 -115
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/core/config.d.ts +76 -0
- package/core/index.js +17 -5
- package/index.d.ts +6 -1
- package/index.js +271 -256
- package/package.json +2 -1
- package/style.css +5 -3
- package/types/config.type.d.ts +6 -0
- package/types/list.type.d.ts +6 -0
- package/utils/configUtils.d.ts +9 -0
- package/utils/configUtils.js +7 -0
- package/utils/index.d.ts +1 -0
- package/utils/status.d.ts +5 -0
- package/utils/status.js +33 -0
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ne, computed as h, ref as b, shallowRef as
|
|
1
|
+
import { defineComponent as ne, computed as h, ref as b, shallowRef as $, openBlock as n, createBlock as d, withCtx as w, createElementVNode as B, createTextVNode as U, toDisplayString as _, createElementBlock as N, createCommentVNode as T, createVNode as ue, unref as pe, Fragment as ce, renderList as de, renderSlot as ve } from "vue";
|
|
2
2
|
import me from "../Modal.vue.js";
|
|
3
3
|
import I from "../Button.vue.js";
|
|
4
4
|
import fe from "../Timeline/Timeline.vue.js";
|
|
@@ -9,7 +9,7 @@ import ge from "./ImportStep2.vue.js";
|
|
|
9
9
|
import be from "./ImportStep3.vue.js";
|
|
10
10
|
import we from "./ImportStep4.vue.js";
|
|
11
11
|
import { showToast as E } from "../../composables/useNotifications.js";
|
|
12
|
-
const xe = { class: "px-2
|
|
12
|
+
const xe = { class: "px-2" }, ye = { class: "min-h-[300px]" }, De = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "mt-4 p-3 bg-destructive/10 border border-destructive/20 rounded-lg text-sm text-destructive"
|
|
15
15
|
}, ke = { class: "list-disc pl-5 space-y-1" }, _e = { class: "flex items-center justify-between w-full" }, Ie = { key: 1 }, Ve = /* @__PURE__ */ ne({
|
|
@@ -30,19 +30,19 @@ const xe = { class: "px-2 sm:px-4 py-2" }, ye = { class: "min-h-[300px]" }, De =
|
|
|
30
30
|
const s = x, R = L, P = h({
|
|
31
31
|
get: () => s.show,
|
|
32
32
|
set: (e) => R("update:show", e)
|
|
33
|
-
}), c = (e,
|
|
34
|
-
const
|
|
35
|
-
return
|
|
33
|
+
}), c = (e, o, u) => {
|
|
34
|
+
const i = u ? j(e, u) : j(e);
|
|
35
|
+
return i !== e ? i : o;
|
|
36
36
|
}, A = h(() => {
|
|
37
37
|
if (s.titleI18n) {
|
|
38
38
|
const e = j(s.titleI18n);
|
|
39
39
|
if (e !== s.titleI18n) return e;
|
|
40
40
|
}
|
|
41
41
|
return s.title;
|
|
42
|
-
}), a = b(1), v = b(!1), M =
|
|
42
|
+
}), a = b(1), v = b(!1), M = $([]), m = b({}), q = b({
|
|
43
43
|
existing: "replace",
|
|
44
44
|
new: "create"
|
|
45
|
-
}),
|
|
45
|
+
}), C = b(""), O = $(null), S = $([]), F = $([]), y = b([]), V = {
|
|
46
46
|
total: 0,
|
|
47
47
|
processed: 0,
|
|
48
48
|
created: 0,
|
|
@@ -52,20 +52,20 @@ const xe = { class: "px-2 sm:px-4 py-2" }, ye = { class: "min-h-[300px]" }, De =
|
|
|
52
52
|
percentage: 0,
|
|
53
53
|
errors: []
|
|
54
54
|
}, l = b({ ...V }), H = () => {
|
|
55
|
-
a.value = 1, v.value = !1, M.value = [], m.value = {}, q.value = { existing: "replace", new: "create" },
|
|
55
|
+
a.value = 1, v.value = !1, M.value = [], m.value = {}, q.value = { existing: "replace", new: "create" }, C.value = "", O.value = null, S.value = [], F.value = [], y.value = [], l.value = { ...V };
|
|
56
56
|
}, G = () => {
|
|
57
|
-
const e = [],
|
|
57
|
+
const e = [], o = {};
|
|
58
58
|
for (const t in m.value) {
|
|
59
59
|
const p = m.value[t];
|
|
60
|
-
p && (
|
|
60
|
+
p && (o[p] || (o[p] = []), o[p].push(t));
|
|
61
61
|
}
|
|
62
|
-
for (const t in
|
|
63
|
-
|
|
64
|
-
`Field "${t}" is mapped to multiple headers: ${
|
|
62
|
+
for (const t in o)
|
|
63
|
+
o[t].length > 1 && e.push(
|
|
64
|
+
`Field "${t}" is mapped to multiple headers: ${o[t].join(", ")}`
|
|
65
65
|
);
|
|
66
|
-
const u = s.fields.filter((t) => t.required).map((t) => t.field),
|
|
66
|
+
const u = s.fields.filter((t) => t.required).map((t) => t.field), i = Object.values(m.value);
|
|
67
67
|
for (const t of u)
|
|
68
|
-
if (!
|
|
68
|
+
if (!i.includes(t)) {
|
|
69
69
|
const p = s.fields.find((r) => r.field === t)?.title || t;
|
|
70
70
|
e.push(`Required field "${p}" is not mapped.`);
|
|
71
71
|
}
|
|
@@ -74,37 +74,37 @@ const xe = { class: "px-2 sm:px-4 py-2" }, ye = { class: "min-h-[300px]" }, De =
|
|
|
74
74
|
a.value === 2 && (y.value = G(), y.value.length > 0) || a.value < 4 && a.value++;
|
|
75
75
|
}, J = () => {
|
|
76
76
|
a.value > 1 && !v.value && a.value--;
|
|
77
|
-
}, Q = (e,
|
|
78
|
-
const
|
|
79
|
-
for (const t in
|
|
80
|
-
const p =
|
|
77
|
+
}, Q = (e, o) => e.map((u) => {
|
|
78
|
+
const i = {};
|
|
79
|
+
for (const t in o) {
|
|
80
|
+
const p = o[t];
|
|
81
81
|
if (!p) continue;
|
|
82
82
|
let r = u[t];
|
|
83
83
|
const g = s.fields.find((f) => f.field === p);
|
|
84
84
|
if ((r == null || r === "") && g?.defaultValue !== void 0 && (r = g.defaultValue), g?.expectedType && (g.expectedType === "number" && (r = Number(r) || 0), g.expectedType === "boolean" && (r = !!(r && r.toString().toLowerCase() !== "false" && r !== "0"))), g?.onMatch && (r = g.onMatch(r)), p.includes(".")) {
|
|
85
85
|
const f = p.split(".");
|
|
86
|
-
let D =
|
|
86
|
+
let D = i;
|
|
87
87
|
for (let k = 0; k < f.length - 1; k++)
|
|
88
88
|
D[f[k]] || (D[f[k]] = {}), D = D[f[k]];
|
|
89
89
|
D[f[f.length - 1]] = r;
|
|
90
90
|
} else
|
|
91
|
-
|
|
91
|
+
i[p] = r;
|
|
92
92
|
}
|
|
93
|
-
return
|
|
93
|
+
return i;
|
|
94
94
|
}), W = async () => {
|
|
95
95
|
v.value = !0, z();
|
|
96
96
|
try {
|
|
97
97
|
const e = Q(M.value, m.value);
|
|
98
98
|
l.value = { ...V, total: e.length };
|
|
99
|
-
const
|
|
100
|
-
for (let
|
|
101
|
-
|
|
99
|
+
const o = [];
|
|
100
|
+
for (let i = 0; i < e.length; i += s.batchSize)
|
|
101
|
+
o.push(e.slice(i, i + s.batchSize));
|
|
102
102
|
const u = setInterval(() => {
|
|
103
103
|
l.value.percentage < 90 && (l.value.percentage += Math.floor(Math.random() * 5) + 1);
|
|
104
104
|
}, 1e3);
|
|
105
|
-
for (const
|
|
105
|
+
for (const i of o) {
|
|
106
106
|
const t = await s.processBatch({
|
|
107
|
-
data:
|
|
107
|
+
data: i,
|
|
108
108
|
options: q.value
|
|
109
109
|
});
|
|
110
110
|
l.value.processed += t.processed, l.value.created += t.created, l.value.updated += t.updated, l.value.skipped += t.skipped, l.value.failed += t.failed, l.value.errors = [...l.value.errors, ...t.errors || []], l.value.percentage = Math.min(
|
|
@@ -124,21 +124,21 @@ const xe = { class: "px-2 sm:px-4 py-2" }, ye = { class: "min-h-[300px]" }, De =
|
|
|
124
124
|
{ id: 3, title: c("vlite.importData.stepOptions", "Options"), icon: "lucide:settings-2" },
|
|
125
125
|
{ id: 4, title: c("vlite.importData.stepImport", "Import"), icon: "lucide:loader" }
|
|
126
126
|
]), Z = h(() => c("vlite.importData.btnBack", "Back")), ee = h(() => c("vlite.importData.btnNext", "Next")), te = h(() => c("vlite.importData.btnStart", "Start Import")), ae = h(() => c("vlite.importData.btnDone", "Done")), le = (e) => {
|
|
127
|
-
|
|
128
|
-
},
|
|
127
|
+
C.value = e;
|
|
128
|
+
}, ie = (e) => {
|
|
129
129
|
O.value = e;
|
|
130
130
|
}, K = (e) => {
|
|
131
131
|
m.value = e;
|
|
132
|
-
},
|
|
133
|
-
|
|
132
|
+
}, oe = (e) => {
|
|
133
|
+
S.value = e;
|
|
134
134
|
}, re = (e) => {
|
|
135
135
|
F.value = e;
|
|
136
136
|
}, se = (e) => {
|
|
137
137
|
M.value = e;
|
|
138
138
|
};
|
|
139
|
-
return (e,
|
|
139
|
+
return (e, o) => (n(), d(me, {
|
|
140
140
|
show: P.value,
|
|
141
|
-
"onUpdate:show":
|
|
141
|
+
"onUpdate:show": o[0] || (o[0] = (u) => P.value = u),
|
|
142
142
|
title: A.value,
|
|
143
143
|
"max-width": "sm:max-w-4xl",
|
|
144
144
|
onClose: H,
|
|
@@ -155,33 +155,33 @@ const xe = { class: "px-2 sm:px-4 py-2" }, ye = { class: "min-h-[300px]" }, De =
|
|
|
155
155
|
])
|
|
156
156
|
]),
|
|
157
157
|
default: w(({ close: u }) => [
|
|
158
|
-
|
|
158
|
+
B("div", xe, [
|
|
159
159
|
ue(pe(fe), {
|
|
160
160
|
steps: Y.value,
|
|
161
161
|
"active-step": a.value - 1,
|
|
162
162
|
class: "mb-13"
|
|
163
163
|
}, null, 8, ["steps", "active-step"]),
|
|
164
|
-
|
|
164
|
+
B("div", ye, [
|
|
165
165
|
a.value === 1 ? (n(), d(he, {
|
|
166
166
|
key: 0,
|
|
167
|
-
importMethod:
|
|
167
|
+
importMethod: C.value,
|
|
168
168
|
csvFile: O.value,
|
|
169
169
|
mappings: m.value,
|
|
170
170
|
fields: x.fields,
|
|
171
|
-
headers:
|
|
171
|
+
headers: S.value,
|
|
172
172
|
preview: F.value,
|
|
173
173
|
importData: M.value,
|
|
174
174
|
"onUpdate:importMethod": le,
|
|
175
|
-
"onUpdate:csvFile":
|
|
175
|
+
"onUpdate:csvFile": ie,
|
|
176
176
|
"onUpdate:mappings": K,
|
|
177
|
-
"onUpdate:headers":
|
|
177
|
+
"onUpdate:headers": oe,
|
|
178
178
|
"onUpdate:preview": re,
|
|
179
179
|
"onUpdate:importData": se,
|
|
180
180
|
onNext: z
|
|
181
181
|
}, null, 8, ["importMethod", "csvFile", "mappings", "fields", "headers", "preview", "importData"])) : a.value === 2 ? (n(), d(ge, {
|
|
182
182
|
key: 1,
|
|
183
183
|
mappings: m.value,
|
|
184
|
-
headers:
|
|
184
|
+
headers: S.value,
|
|
185
185
|
preview: F.value,
|
|
186
186
|
availableFields: X.value,
|
|
187
187
|
"onUpdate:mappings": K
|
|
@@ -194,14 +194,14 @@ const xe = { class: "px-2 sm:px-4 py-2" }, ye = { class: "min-h-[300px]" }, De =
|
|
|
194
194
|
}, null, 8, ["progress"])) : T("", !0)
|
|
195
195
|
]),
|
|
196
196
|
y.value.length > 0 && a.value === 2 ? (n(), N("div", De, [
|
|
197
|
-
|
|
198
|
-
(n(!0), N(ce, null, de(y.value, (
|
|
197
|
+
B("ul", ke, [
|
|
198
|
+
(n(!0), N(ce, null, de(y.value, (i) => (n(), N("li", { key: i }, _(i), 1))), 128))
|
|
199
199
|
])
|
|
200
200
|
])) : T("", !0)
|
|
201
201
|
])
|
|
202
202
|
]),
|
|
203
203
|
footer: w(({ close: u }) => [
|
|
204
|
-
|
|
204
|
+
B("div", _e, [
|
|
205
205
|
a.value > 1 && a.value < 4 ? (n(), d(I, {
|
|
206
206
|
key: 0,
|
|
207
207
|
variant: "outline",
|
|
@@ -210,7 +210,7 @@ const xe = { class: "px-2 sm:px-4 py-2" }, ye = { class: "min-h-[300px]" }, De =
|
|
|
210
210
|
icon: "lucide:arrow-left"
|
|
211
211
|
}, {
|
|
212
212
|
default: w(() => [
|
|
213
|
-
|
|
213
|
+
U(_(Z.value), 1)
|
|
214
214
|
]),
|
|
215
215
|
_: 1
|
|
216
216
|
}, 8, ["disabled"])) : (n(), N("div", Ie)),
|
|
@@ -218,11 +218,11 @@ const xe = { class: "px-2 sm:px-4 py-2" }, ye = { class: "min-h-[300px]" }, De =
|
|
|
218
218
|
key: 2,
|
|
219
219
|
variant: "primary",
|
|
220
220
|
onClick: z,
|
|
221
|
-
disabled: a.value === 1 && !
|
|
221
|
+
disabled: a.value === 1 && !C.value || v.value,
|
|
222
222
|
"icon-right": "lucide:arrow-right"
|
|
223
223
|
}, {
|
|
224
224
|
default: w(() => [
|
|
225
|
-
|
|
225
|
+
U(_(ee.value), 1)
|
|
226
226
|
]),
|
|
227
227
|
_: 1
|
|
228
228
|
}, 8, ["disabled"])) : a.value === 3 ? (n(), d(I, {
|
|
@@ -233,7 +233,7 @@ const xe = { class: "px-2 sm:px-4 py-2" }, ye = { class: "min-h-[300px]" }, De =
|
|
|
233
233
|
loading: v.value
|
|
234
234
|
}, {
|
|
235
235
|
default: w(() => [
|
|
236
|
-
|
|
236
|
+
U(_(te.value), 1)
|
|
237
237
|
]),
|
|
238
238
|
_: 1
|
|
239
239
|
}, 8, ["loading"])) : a.value === 4 && l.value.percentage >= 100 ? (n(), d(I, {
|
|
@@ -242,7 +242,7 @@ const xe = { class: "px-2 sm:px-4 py-2" }, ye = { class: "min-h-[300px]" }, De =
|
|
|
242
242
|
onClick: u
|
|
243
243
|
}, {
|
|
244
244
|
default: w(() => [
|
|
245
|
-
|
|
245
|
+
U(_(ae.value), 1)
|
|
246
246
|
]),
|
|
247
247
|
_: 1
|
|
248
248
|
}, 8, ["onClick"])) : T("", !0)
|
|
@@ -1,7 +1,118 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as V, ref as $, computed as r, openBlock as n, createElementBlock as a, createElementVNode as e, toDisplayString as c, Fragment as h, renderList as x, isMemoSame as B, normalizeClass as I, createBlock as O, unref as j, createCommentVNode as w, createVNode as z } from "vue";
|
|
2
|
+
import A from "../Dropdown/Dropdown.vue.js";
|
|
3
|
+
import "@iconify/vue";
|
|
4
|
+
import { $t as E } from "../../utils/i18n.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
import P from "../CheckBox.vue.js";
|
|
8
|
+
const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }, q = { class: "border border-border rounded-xl overflow-hidden" }, L = { class: "overflow-x-auto max-h-[440px]" }, W = { class: "import-table" }, G = { class: "import-thead" }, J = { class: "import-th" }, K = { class: "import-th" }, Q = { class: "import-th" }, T = { class: "import-tbody" }, X = { class: "import-td-header" }, Y = { class: "import-td-dropdown" }, Z = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "text-xs italic text-muted-foreground"
|
|
11
|
+
}, tt = { class: "import-td-preview" }, et = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "space-y-1"
|
|
14
|
+
}, st = { class: "import-td-action" }, ot = { class: "flex justify-center items-center h-full" }, it = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "text-center text-sm text-warning font-medium p-4 bg-warning/10 rounded-lg border border-warning/20"
|
|
17
|
+
}, ut = /* @__PURE__ */ V({
|
|
18
|
+
__name: "ImportStep2",
|
|
19
|
+
props: {
|
|
20
|
+
headers: {},
|
|
21
|
+
preview: {},
|
|
22
|
+
mappings: {},
|
|
23
|
+
availableFields: {}
|
|
24
|
+
},
|
|
25
|
+
emits: ["next", "prev", "update:mappings"],
|
|
26
|
+
setup(l, { emit: b }) {
|
|
27
|
+
const m = l, v = b, o = $([]), d = (s, i) => {
|
|
28
|
+
const t = E(s);
|
|
29
|
+
return t !== s ? t : i;
|
|
30
|
+
}, y = r(() => m.headers.filter((s) => m.mappings[s] !== "")), k = (s) => {
|
|
31
|
+
const i = { ...m.mappings };
|
|
32
|
+
o.value.includes(s) ? o.value = o.value.filter((g) => g !== s) : o.value.push(s), i[s] !== "" && (i[s] = ""), v("update:mappings", i);
|
|
33
|
+
}, D = () => m.availableFields.map((s) => ({
|
|
34
|
+
label: s.required ? `${s.label} *` : s.label,
|
|
35
|
+
value: s.value
|
|
36
|
+
}));
|
|
37
|
+
r(() => d("vlite.importData.assignFields", "Assign Fields"));
|
|
38
|
+
const S = r(
|
|
39
|
+
() => d("vlite.importData.assignDesc", "Match your CSV columns to the correct system fields.")
|
|
40
|
+
), F = r(() => d("vlite.importData.csvHeader", "CSV Header")), C = r(() => d("vlite.importData.fieldMapping", "System Field")), H = r(() => d("vlite.importData.preview", "Data Preview")), M = r(
|
|
41
|
+
() => d("vlite.importData.noHeaders", "No headers mapped. Data will not be imported properly.")
|
|
42
|
+
);
|
|
43
|
+
return (s, i) => (n(), a("div", R, [
|
|
44
|
+
e("div", null, [
|
|
45
|
+
e("p", U, c(S.value), 1)
|
|
46
|
+
]),
|
|
47
|
+
e("div", q, [
|
|
48
|
+
e("div", L, [
|
|
49
|
+
e("table", W, [
|
|
50
|
+
e("thead", G, [
|
|
51
|
+
e("tr", null, [
|
|
52
|
+
e("th", J, c(F.value), 1),
|
|
53
|
+
e("th", K, c(C.value), 1),
|
|
54
|
+
e("th", Q, c(H.value), 1),
|
|
55
|
+
i[2] || (i[2] = e("th", { class: "import-th import-th-center" }, "Ignore", -1))
|
|
56
|
+
])
|
|
57
|
+
]),
|
|
58
|
+
e("tbody", T, [
|
|
59
|
+
(n(!0), a(h, null, x(l.headers, (t, g, nt, u) => {
|
|
60
|
+
const _ = [
|
|
61
|
+
t,
|
|
62
|
+
o.value.includes(t),
|
|
63
|
+
l.mappings[t],
|
|
64
|
+
l.preview.map((p) => p[t])
|
|
65
|
+
];
|
|
66
|
+
if (u && u.key === t && B(u, _)) return u;
|
|
67
|
+
const f = (n(), a("tr", {
|
|
68
|
+
key: t,
|
|
69
|
+
class: I([
|
|
70
|
+
"import-tr",
|
|
71
|
+
o.value.includes(t) ? "import-tr-ignored" : "import-tr-active"
|
|
72
|
+
])
|
|
73
|
+
}, [
|
|
74
|
+
e("td", X, c(t), 1),
|
|
75
|
+
e("td", Y, [
|
|
76
|
+
o.value.includes(t) ? (n(), a("span", Z, "Ignored")) : (n(), O(j(A), {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: "w-full",
|
|
79
|
+
options: D(),
|
|
80
|
+
selected: l.mappings[t],
|
|
81
|
+
placeholder: "Select Field",
|
|
82
|
+
variant: "outline",
|
|
83
|
+
showCaret: "",
|
|
84
|
+
"btn-props": { class: "w-full justify-between" },
|
|
85
|
+
onOnSelect: (p) => (l.mappings[t] = p.value, v("update:mappings", { ...l.mappings }))
|
|
86
|
+
}, null, 8, ["options", "selected", "onOnSelect"]))
|
|
87
|
+
]),
|
|
88
|
+
e("td", tt, [
|
|
89
|
+
o.value.includes(t) ? w("", !0) : (n(), a("div", et, [
|
|
90
|
+
(n(!0), a(h, null, x(l.preview, (p, N) => (n(), a("div", {
|
|
91
|
+
key: N,
|
|
92
|
+
class: "truncate text-xs"
|
|
93
|
+
}, c(String(p[t] || "").slice(0, 50)), 1))), 128))
|
|
94
|
+
]))
|
|
95
|
+
]),
|
|
96
|
+
e("td", st, [
|
|
97
|
+
e("div", ot, [
|
|
98
|
+
z(P, {
|
|
99
|
+
checked: o.value.includes(t),
|
|
100
|
+
"onUpdate:checked": (p) => k(t),
|
|
101
|
+
size: "sm"
|
|
102
|
+
}, null, 8, ["checked", "onUpdate:checked"])
|
|
103
|
+
])
|
|
104
|
+
])
|
|
105
|
+
], 2));
|
|
106
|
+
return f.memo = _, f;
|
|
107
|
+
}, i, 0), 128))
|
|
108
|
+
])
|
|
109
|
+
])
|
|
110
|
+
])
|
|
111
|
+
]),
|
|
112
|
+
y.value.length === 0 ? (n(), a("div", it, c(M.value), 1)) : w("", !0)
|
|
113
|
+
]));
|
|
114
|
+
}
|
|
115
|
+
});
|
|
5
116
|
export {
|
|
6
|
-
|
|
117
|
+
ut as default
|
|
7
118
|
};
|
|
@@ -1,107 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import E from "../Dropdown/Dropdown.vue.js";
|
|
3
|
-
import "@iconify/vue";
|
|
4
|
-
import { $t as P } from "../../utils/i18n.js";
|
|
5
|
-
/* empty css */
|
|
6
|
-
/* empty css */
|
|
7
|
-
import R from "../CheckBox.vue.js";
|
|
8
|
-
const U = { class: "space-y-6" }, q = { class: "font-medium text-lg mb-1" }, L = { class: "text-sm text-muted-foreground" }, W = { class: "border border-border rounded-xl overflow-hidden" }, G = { class: "overflow-x-auto max-h-[400px]" }, J = { class: "import-table" }, K = { class: "import-thead" }, Q = { class: "import-th" }, T = { class: "import-th" }, X = { class: "import-th" }, Y = { class: "import-tbody" }, Z = { class: "import-td-header" }, tt = { class: "import-td-dropdown" }, et = {
|
|
9
|
-
key: 1,
|
|
10
|
-
class: "text-xs italic text-muted-foreground"
|
|
11
|
-
}, st = { class: "import-td-preview" }, ot = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "space-y-1"
|
|
14
|
-
}, it = { class: "import-td-action" }, nt = { class: "flex justify-center items-center h-full" }, lt = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "text-center text-sm text-warning font-medium p-4 bg-warning/10 rounded-lg border border-warning/20"
|
|
17
|
-
}, gt = /* @__PURE__ */ $({
|
|
18
|
-
__name: "ImportStep2",
|
|
19
|
-
props: {
|
|
20
|
-
headers: {},
|
|
21
|
-
preview: {},
|
|
22
|
-
mappings: {},
|
|
23
|
-
availableFields: {}
|
|
24
|
-
},
|
|
25
|
-
emits: ["next", "prev", "update:mappings"],
|
|
26
|
-
setup(l, { emit: w }) {
|
|
27
|
-
const m = l, v = w, o = A([]), d = (s, i) => {
|
|
28
|
-
const t = P(s);
|
|
29
|
-
return t !== s ? t : i;
|
|
30
|
-
}, y = c(() => m.headers.filter((s) => m.mappings[s] !== "")), k = (s) => {
|
|
31
|
-
const i = { ...m.mappings };
|
|
32
|
-
o.value.includes(s) ? o.value = o.value.filter((g) => g !== s) : o.value.push(s), i[s] !== "" && (i[s] = ""), v("update:mappings", i);
|
|
33
|
-
}, D = () => m.availableFields.map((s) => ({
|
|
34
|
-
label: s.required ? `${s.label} *` : s.label,
|
|
35
|
-
value: s.value
|
|
36
|
-
})), S = c(() => d("vlite.importData.assignFields", "Assign Fields")), F = c(() => d("vlite.importData.assignDesc", "Match your CSV columns to the correct system fields.")), C = c(() => d("vlite.importData.csvHeader", "CSV Header")), H = c(() => d("vlite.importData.fieldMapping", "System Field")), M = c(() => d("vlite.importData.preview", "Data Preview")), N = c(() => d("vlite.importData.noHeaders", "No headers mapped. Data will not be imported properly."));
|
|
37
|
-
return (s, i) => (n(), a("div", U, [
|
|
38
|
-
e("div", null, [
|
|
39
|
-
e("h4", q, r(S.value), 1),
|
|
40
|
-
e("p", L, r(F.value), 1)
|
|
41
|
-
]),
|
|
42
|
-
e("div", W, [
|
|
43
|
-
e("div", G, [
|
|
44
|
-
e("table", J, [
|
|
45
|
-
e("thead", K, [
|
|
46
|
-
e("tr", null, [
|
|
47
|
-
e("th", Q, r(C.value), 1),
|
|
48
|
-
e("th", T, r(H.value), 1),
|
|
49
|
-
e("th", X, r(M.value), 1),
|
|
50
|
-
i[2] || (i[2] = e("th", { class: "import-th import-th-center" }, "Ignore", -1))
|
|
51
|
-
])
|
|
52
|
-
]),
|
|
53
|
-
e("tbody", Y, [
|
|
54
|
-
(n(!0), a(f, null, x(l.headers, (t, g, at, u) => {
|
|
55
|
-
const _ = [t, o.value.includes(t), l.mappings[t], l.preview.map((p) => p[t])];
|
|
56
|
-
if (u && u.key === t && B(u, _)) return u;
|
|
57
|
-
const h = (n(), a("tr", {
|
|
58
|
-
key: t,
|
|
59
|
-
class: I(["import-tr", o.value.includes(t) ? "import-tr-ignored" : "import-tr-active"])
|
|
60
|
-
}, [
|
|
61
|
-
e("td", Z, r(t), 1),
|
|
62
|
-
e("td", tt, [
|
|
63
|
-
o.value.includes(t) ? (n(), a("span", et, "Ignored")) : (n(), O(j(E), {
|
|
64
|
-
key: 0,
|
|
65
|
-
class: "w-full",
|
|
66
|
-
options: D(),
|
|
67
|
-
selected: l.mappings[t],
|
|
68
|
-
placeholder: "Select Field",
|
|
69
|
-
variant: "outline",
|
|
70
|
-
showCaret: "",
|
|
71
|
-
"btn-props": { class: "w-full justify-between" },
|
|
72
|
-
onOnSelect: (p) => {
|
|
73
|
-
l.mappings[t] = p.value, v("update:mappings", { ...l.mappings });
|
|
74
|
-
}
|
|
75
|
-
}, null, 8, ["options", "selected", "onOnSelect"]))
|
|
76
|
-
]),
|
|
77
|
-
e("td", st, [
|
|
78
|
-
o.value.includes(t) ? b("", !0) : (n(), a("div", ot, [
|
|
79
|
-
(n(!0), a(f, null, x(l.preview, (p, V) => (n(), a("div", {
|
|
80
|
-
key: V,
|
|
81
|
-
class: "truncate text-xs"
|
|
82
|
-
}, r(String(p[t] || "").slice(0, 50)), 1))), 128))
|
|
83
|
-
]))
|
|
84
|
-
]),
|
|
85
|
-
e("td", it, [
|
|
86
|
-
e("div", nt, [
|
|
87
|
-
z(R, {
|
|
88
|
-
checked: o.value.includes(t),
|
|
89
|
-
"onUpdate:checked": (p) => k(t),
|
|
90
|
-
size: "sm"
|
|
91
|
-
}, null, 8, ["checked", "onUpdate:checked"])
|
|
92
|
-
])
|
|
93
|
-
])
|
|
94
|
-
], 2));
|
|
95
|
-
return h.memo = _, h;
|
|
96
|
-
}, i, 0), 128))
|
|
97
|
-
])
|
|
98
|
-
])
|
|
99
|
-
])
|
|
100
|
-
]),
|
|
101
|
-
y.value.length === 0 ? (n(), a("div", lt, r(N.value), 1)) : b("", !0)
|
|
102
|
-
]));
|
|
103
|
-
}
|
|
104
|
-
});
|
|
1
|
+
import f from "./ImportStep2.vue.js";
|
|
105
2
|
export {
|
|
106
|
-
|
|
3
|
+
f as default
|
|
107
4
|
};
|
|
@@ -13,15 +13,15 @@ declare function __VLS_template(): {
|
|
|
13
13
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
14
|
declare const __VLS_component: import('vue').DefineComponent<InputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
15
15
|
blur: (event: FocusEvent) => any;
|
|
16
|
-
change: (value: string | number) => any;
|
|
17
16
|
focus: (event: FocusEvent) => any;
|
|
17
|
+
change: (value: string | number) => any;
|
|
18
18
|
"update:modelValue": (value: string | number) => any;
|
|
19
19
|
"click:icon": (event: MouseEvent) => any;
|
|
20
20
|
"click:icon-right": (event: MouseEvent) => any;
|
|
21
21
|
}, string, import('vue').PublicProps, Readonly<InputProps> & Readonly<{
|
|
22
22
|
onBlur?: (event: FocusEvent) => any;
|
|
23
|
-
onChange?: (value: string | number) => any;
|
|
24
23
|
onFocus?: (event: FocusEvent) => any;
|
|
24
|
+
onChange?: (value: string | number) => any;
|
|
25
25
|
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
26
26
|
"onClick:icon"?: (event: MouseEvent) => any;
|
|
27
27
|
"onClick:icon-right"?: (event: MouseEvent) => any;
|
|
@@ -31,9 +31,9 @@ declare const __VLS_component: import('vue').DefineComponent<InputProps, {}, {},
|
|
|
31
31
|
variant: InputVariant;
|
|
32
32
|
size: InputSize;
|
|
33
33
|
rounded: InputRounded;
|
|
34
|
+
loading: boolean;
|
|
34
35
|
readonly: boolean;
|
|
35
36
|
disabled: boolean;
|
|
36
|
-
loading: boolean;
|
|
37
37
|
modelValue: string | number;
|
|
38
38
|
rows: number;
|
|
39
39
|
showClearButton: boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { InvoiceProps } from './types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<InvoiceProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<InvoiceProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent as l, computed as e, openBlock as p, createBlock as s, resolveDynamicComponent as m } from "vue";
|
|
2
|
+
import { getComponentConfig as u } from "../../utils/configUtils.js";
|
|
3
|
+
import d from "./InvoiceVariant1.vue.js";
|
|
4
|
+
import f from "./InvoiceVariant2.vue.js";
|
|
5
|
+
import v from "./InvoiceVariant3.vue.js";
|
|
6
|
+
import _ from "./InvoiceVariant4.vue.js";
|
|
7
|
+
const k = /* @__PURE__ */ l({
|
|
8
|
+
__name: "Invoice",
|
|
9
|
+
props: {
|
|
10
|
+
data: {},
|
|
11
|
+
variant: {},
|
|
12
|
+
compact: { type: Boolean },
|
|
13
|
+
displayBarcodeValue: { type: Boolean }
|
|
14
|
+
},
|
|
15
|
+
setup(r) {
|
|
16
|
+
const a = r, o = u("invoice") || {}, t = e(() => a.variant ?? o.variant ?? "Variant1"), n = e(() => a.compact ?? o.compact ?? !1), c = e(() => a.displayBarcodeValue ?? o.displayBarcodeValue ?? !1), i = e(() => {
|
|
17
|
+
switch (t.value) {
|
|
18
|
+
case "Variant2":
|
|
19
|
+
return f;
|
|
20
|
+
case "Variant3":
|
|
21
|
+
return v;
|
|
22
|
+
case "Variant4":
|
|
23
|
+
return _;
|
|
24
|
+
default:
|
|
25
|
+
return d;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return (V, y) => (p(), s(m(i.value), {
|
|
29
|
+
data: a.data,
|
|
30
|
+
variant: t.value,
|
|
31
|
+
compact: n.value,
|
|
32
|
+
"display-barcode-value": c.value
|
|
33
|
+
}, null, 8, ["data", "variant", "compact", "display-barcode-value"]));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
k as default
|
|
38
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InvoiceData } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
data: InvoiceData;
|
|
4
|
+
/** Reduces padding, spacing, and font sizes for print-friendly output */
|
|
5
|
+
compact?: boolean;
|
|
6
|
+
/** Toggles the display of the barcode text value underneath the bars */
|
|
7
|
+
displayBarcodeValue?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
compact: boolean;
|
|
11
|
+
displayBarcodeValue: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|