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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Fe, useSlots as Be, computed as i, markRaw as T, ref as m, provide as U, watch as N, openBlock as r, createElementBlock as y, normalizeClass as M, createVNode as
|
|
1
|
+
import { defineComponent as Fe, useSlots as Be, computed as i, markRaw as T, ref as m, provide as U, watch as N, openBlock as r, createElementBlock as y, normalizeClass as M, createVNode as S, createSlots as Te, withCtx as X, renderSlot as d, normalizeProps as x, guardReactiveProps as $, createElementVNode as Q, createBlock as V, createCommentVNode as g, isRef as Re, unref as Y, mergeProps as h, Fragment as G, resolveDynamicComponent as qe, toDisplayString as Ee } from "vue";
|
|
2
2
|
import Qe from "../Input.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import J from "../Button.vue.js";
|
|
@@ -26,7 +26,7 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
26
26
|
}, at = {
|
|
27
27
|
key: 3,
|
|
28
28
|
class: "-mt-2"
|
|
29
|
-
}, nt = { key: 5 },
|
|
29
|
+
}, nt = { key: 5 }, Ct = /* @__PURE__ */ Fe({
|
|
30
30
|
__name: "Screen",
|
|
31
31
|
props: {
|
|
32
32
|
name: { default: "" },
|
|
@@ -130,10 +130,10 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
130
130
|
}), e;
|
|
131
131
|
});
|
|
132
132
|
i(() => D.value.map((e) => e.key));
|
|
133
|
-
const ae = i(() => D.value.length > 1), ne = i(() => D.value.length > 0 ? D.value[0].key : "table"), c = Me(`view-mode-${Z.value}`, ne.value), L = i(() => D.value.find((a) => a.key === c.value)?.component ?? null), F = i(() => c.value === "table" && v.table ? "table" : c.value === "list" && v.list ? "list" : c.value === "list" && v.grid ? "grid" : c.value === "kanban" && v.kanban ? "kanban" : c.value === "calendar" && v.calendar ? "calendar" : null), w = m(""), p = m({}), P = m({ field: "", order: "" }),
|
|
133
|
+
const ae = i(() => D.value.length > 1), ne = i(() => D.value.length > 0 ? D.value[0].key : "table"), c = Me(`view-mode-${Z.value}`, ne.value), L = i(() => D.value.find((a) => a.key === c.value)?.component ?? null), F = i(() => c.value === "table" && v.table ? "table" : c.value === "list" && v.list ? "list" : c.value === "list" && v.grid ? "grid" : c.value === "kanban" && v.kanban ? "kanban" : c.value === "calendar" && v.calendar ? "calendar" : null), w = m(""), p = m({}), P = m({ field: "", order: "" }), C = m(l.pageInfo?.currentPage || 1), R = m(l.pageInfo?.itemsPerPage || l.paginationProps?.itemsPerPage || 10), o = m([]), q = m([]), B = m(!1), f = m(
|
|
134
134
|
l.defaultQuickFilter !== void 0 ? l.defaultQuickFilter : l.quickFilters && l.quickFilters.length > 0 ? l.quickFilters[0].value : ""
|
|
135
135
|
), ie = i(() => !l.quickFilters || l.quickFilters.length === 0 ? !1 : l.skipQuickFilterViews && l.skipQuickFilterViews.length > 0 ? !l.skipQuickFilterViews.includes(c.value) : !0), oe = (e) => {
|
|
136
|
-
f.value = e,
|
|
136
|
+
f.value = e, C.value = 1, b();
|
|
137
137
|
}, O = i(() => w.value && w.value.trim() !== "" || f.value !== "" && f.value !== null && f.value !== void 0 ? !0 : p.value ? Object.keys(p.value).some(
|
|
138
138
|
(e) => p.value[e] !== "" && p.value[e] !== null && p.value[e] !== void 0
|
|
139
139
|
) : !1), z = i(() => l.data && l.data.length > 0), re = i(() => !l.skipEmptyViews || l.skipEmptyViews.length === 0 ? !1 : l.skipEmptyViews.includes(c.value)), s = i(() => ({
|
|
@@ -142,14 +142,13 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
142
142
|
activeFilters: p.value,
|
|
143
143
|
activeQuickFilter: f.value,
|
|
144
144
|
activeSort: P.value,
|
|
145
|
-
page:
|
|
145
|
+
page: C.value,
|
|
146
146
|
limit: R.value,
|
|
147
147
|
selectedRows: o.value,
|
|
148
148
|
isFiltered: O.value,
|
|
149
149
|
hasData: z.value,
|
|
150
150
|
loading: l.loading
|
|
151
151
|
})), se = {
|
|
152
|
-
disableSearch: !0,
|
|
153
152
|
forceSelectable: !l.hideSelectable,
|
|
154
153
|
onTableChange: (e) => {
|
|
155
154
|
P.value = { field: e.sort.field, order: e.sort.order }, b();
|
|
@@ -166,7 +165,7 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
166
165
|
N(
|
|
167
166
|
() => l.pageInfo?.currentPage,
|
|
168
167
|
(e) => {
|
|
169
|
-
e && (
|
|
168
|
+
e && (C.value = e);
|
|
170
169
|
}
|
|
171
170
|
), N(
|
|
172
171
|
() => l.pageInfo?.itemsPerPage,
|
|
@@ -177,19 +176,19 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
177
176
|
let A = null;
|
|
178
177
|
N(w, () => {
|
|
179
178
|
A && clearTimeout(A), A = setTimeout(() => {
|
|
180
|
-
|
|
179
|
+
C.value = 1, b();
|
|
181
180
|
}, 300);
|
|
182
181
|
});
|
|
183
182
|
const ce = (e) => {
|
|
184
|
-
|
|
183
|
+
C.value = e, b();
|
|
185
184
|
}, me = (e) => {
|
|
186
|
-
R.value = e,
|
|
185
|
+
R.value = e, C.value = 1, b();
|
|
187
186
|
}, b = () => {
|
|
188
187
|
if (!l.refetch) return;
|
|
189
188
|
const e = { ...p.value };
|
|
190
189
|
f.value !== "" && f.value !== null && f.value !== void 0 && (e[l.quickFilterKey] = f.value);
|
|
191
190
|
const a = P.value.field && P.value.order ? { field: P.value.field, order: P.value.order } : void 0, n = {
|
|
192
|
-
pagination: { page:
|
|
191
|
+
pagination: { page: C.value, limit: R.value },
|
|
193
192
|
search: w.value,
|
|
194
193
|
filter: e
|
|
195
194
|
};
|
|
@@ -203,10 +202,10 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
203
202
|
}), pe = i(() => {
|
|
204
203
|
const e = u("vlite.screen.searchPlaceholder");
|
|
205
204
|
return e !== "vlite.screen.searchPlaceholder" ? e : "Search...";
|
|
206
|
-
}),
|
|
205
|
+
}), ge = i(() => {
|
|
207
206
|
const e = u("vlite.screen.confirmDeleteTitle");
|
|
208
207
|
return e !== "vlite.screen.confirmDeleteTitle" ? e : "Confirm Deletion";
|
|
209
|
-
}),
|
|
208
|
+
}), he = i(() => {
|
|
210
209
|
const e = u("vlite.screen.confirmDeleteDesc", { count: q.value.length });
|
|
211
210
|
return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${q.value.length > 1 ? "items" : "item"}?`;
|
|
212
211
|
}), ye = i(() => {
|
|
@@ -225,12 +224,12 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
225
224
|
return e !== "vlite.screen.importData" ? e : "Import Data";
|
|
226
225
|
}), xe = m(null), E = m(!1), j = m(!1), Ve = (e) => {
|
|
227
226
|
e.value === "export" ? E.value = !0 : e.value === "import" && (j.value = !0);
|
|
228
|
-
},
|
|
227
|
+
}, Ce = i(
|
|
229
228
|
() => (l.exportSchema || []).map((e) => ({
|
|
230
229
|
field: e.name || e.field,
|
|
231
230
|
title: e.label || e.title || e.name || e.field
|
|
232
231
|
}))
|
|
233
|
-
),
|
|
232
|
+
), Se = i(
|
|
234
233
|
() => (l.importSchema || []).map((e) => ({
|
|
235
234
|
field: e.name || e.field,
|
|
236
235
|
title: e.label || e.title || e.name || e.field,
|
|
@@ -257,11 +256,11 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
257
256
|
);
|
|
258
257
|
};
|
|
259
258
|
return (e, a) => (r(), y("div", We, [
|
|
260
|
-
t.customHeader ? d(e.$slots, "custom-header", x(
|
|
259
|
+
t.customHeader ? d(e.$slots, "custom-header", x(h({ key: 1 }, s.value))) : (r(), y("div", {
|
|
261
260
|
key: 0,
|
|
262
261
|
class: M([t.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
|
|
263
262
|
}, [
|
|
264
|
-
|
|
263
|
+
S(Oe, {
|
|
265
264
|
title: t.title,
|
|
266
265
|
"title-i18n": t.titleI18n,
|
|
267
266
|
"title-class": t.titleClass,
|
|
@@ -295,13 +294,13 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
295
294
|
icon: "lucide:trash-2",
|
|
296
295
|
title: fe.value,
|
|
297
296
|
onClick: a[0] || (a[0] = (n) => k(o.value))
|
|
298
|
-
}, null, 8, ["title"])) :
|
|
297
|
+
}, null, 8, ["title"])) : g("", !0),
|
|
299
298
|
ae.value ? (r(), V(ze, {
|
|
300
299
|
key: 1,
|
|
301
300
|
modelValue: Y(c),
|
|
302
301
|
"onUpdate:modelValue": a[1] || (a[1] = (n) => Re(c) ? c.value = n : null),
|
|
303
302
|
views: D.value
|
|
304
|
-
}, null, 8, ["modelValue", "views"])) :
|
|
303
|
+
}, null, 8, ["modelValue", "views"])) : g("", !0),
|
|
305
304
|
d(e.$slots, "before-search", x($(s.value))),
|
|
306
305
|
t.showRefresh ? (r(), V(J, {
|
|
307
306
|
key: 2,
|
|
@@ -312,7 +311,7 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
312
311
|
title: ve.value,
|
|
313
312
|
disabled: t.loading,
|
|
314
313
|
onClick: b
|
|
315
|
-
}, null, 8, ["title", "disabled"])) :
|
|
314
|
+
}, null, 8, ["title", "disabled"])) : g("", !0),
|
|
316
315
|
t.filterSchema && t.filterSchema.length > 0 ? (r(), V(Ue, {
|
|
317
316
|
key: 3,
|
|
318
317
|
schema: t.filterSchema,
|
|
@@ -320,9 +319,9 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
320
319
|
modelValue: p.value,
|
|
321
320
|
"onUpdate:modelValue": a[2] || (a[2] = (n) => p.value = n),
|
|
322
321
|
onChange: b
|
|
323
|
-
}, null, 8, ["schema", "type", "modelValue"])) :
|
|
322
|
+
}, null, 8, ["schema", "type", "modelValue"])) : g("", !0),
|
|
324
323
|
t.canSearch ? (r(), y("div", et, [
|
|
325
|
-
|
|
324
|
+
S(Qe, {
|
|
326
325
|
lazy: "",
|
|
327
326
|
modelValue: w.value,
|
|
328
327
|
"onUpdate:modelValue": a[3] || (a[3] = (n) => w.value = n),
|
|
@@ -332,11 +331,11 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
332
331
|
class: "bg-background w-full",
|
|
333
332
|
"show-clear-button": !0
|
|
334
333
|
}, null, 8, ["modelValue", "placeholder"])
|
|
335
|
-
])) :
|
|
334
|
+
])) : g("", !0)
|
|
336
335
|
]),
|
|
337
336
|
Q("div", tt, [
|
|
338
337
|
d(e.$slots, "actions", x($(s.value)), () => [
|
|
339
|
-
|
|
338
|
+
S(Xe, {
|
|
340
339
|
"can-add": t.canAdd,
|
|
341
340
|
"add-component": t.addComponent,
|
|
342
341
|
"add-btn": t.addBtn,
|
|
@@ -351,7 +350,7 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
351
350
|
"export-props": t.exportProps,
|
|
352
351
|
"import-props": t.importProps,
|
|
353
352
|
onSelect: Ve
|
|
354
|
-
}, null, 8, ["export-props", "import-props"])) :
|
|
353
|
+
}, null, 8, ["export-props", "import-props"])) : g("", !0),
|
|
355
354
|
d(e.$slots, "after-add", x($(s.value)))
|
|
356
355
|
])
|
|
357
356
|
])
|
|
@@ -359,21 +358,21 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
359
358
|
d(e.$slots, "sub-header", x($(s.value))),
|
|
360
359
|
ie.value ? (r(), y("div", {
|
|
361
360
|
key: 2,
|
|
362
|
-
class: M(["-mt-1
|
|
361
|
+
class: M(["-mt-1 max-sm:hidden!", t.quickFilterVariant == "line" ? "mb-1.5 sm:mb-3" : "mb-3.5"])
|
|
363
362
|
}, [
|
|
364
|
-
|
|
363
|
+
S(Je, {
|
|
365
364
|
modelValue: f.value,
|
|
366
365
|
"onUpdate:modelValue": a[5] || (a[5] = (n) => f.value = n),
|
|
367
366
|
options: t.quickFilters,
|
|
368
367
|
variant: t.quickFilterVariant,
|
|
369
368
|
onChange: oe
|
|
370
369
|
}, null, 8, ["modelValue", "options", "variant"])
|
|
371
|
-
], 2)) :
|
|
370
|
+
], 2)) : g("", !0),
|
|
372
371
|
Q("div", {
|
|
373
372
|
class: M(["flex-1 w-full relative", t.containerClass])
|
|
374
373
|
}, [
|
|
375
374
|
!z.value && !t.loading && !re.value ? (r(), y(G, { key: 0 }, [
|
|
376
|
-
e.$slots.empty ? d(e.$slots, "empty", x(
|
|
375
|
+
e.$slots.empty ? d(e.$slots, "empty", x(h({ key: 0 }, s.value))) : (r(), V(Ye, {
|
|
377
376
|
key: 1,
|
|
378
377
|
"empty-title": t.emptyTitle,
|
|
379
378
|
"empty-title-i18n": t.emptyTitleI18n,
|
|
@@ -386,42 +385,42 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
386
385
|
"add-btn": t.addBtn
|
|
387
386
|
}, null, 8, ["empty-title", "empty-title-i18n", "empty-description", "empty-description-i18n", "empty-icon", "is-filtered", "can-add", "add-component", "add-btn"]))
|
|
388
387
|
], 64)) : (r(), y(G, { key: 1 }, [
|
|
389
|
-
F.value === "table" ? d(e.$slots, "table",
|
|
388
|
+
F.value === "table" ? d(e.$slots, "table", h({
|
|
390
389
|
key: 0,
|
|
391
390
|
data: t.data,
|
|
392
391
|
loading: t.loading,
|
|
393
392
|
selectedRows: o.value,
|
|
394
393
|
delete: k,
|
|
395
394
|
updateSelectedRows: (n) => o.value = n
|
|
396
|
-
}, s.value)) : F.value === "list" ? d(e.$slots, "list",
|
|
395
|
+
}, s.value)) : F.value === "list" ? d(e.$slots, "list", h({
|
|
397
396
|
key: 1,
|
|
398
397
|
data: t.data,
|
|
399
398
|
loading: t.loading,
|
|
400
399
|
selectedRows: o.value,
|
|
401
400
|
delete: k,
|
|
402
401
|
updateSelectedRows: (n) => o.value = n
|
|
403
|
-
}, s.value)) : F.value === "grid" ? d(e.$slots, "grid",
|
|
402
|
+
}, s.value)) : F.value === "grid" ? d(e.$slots, "grid", h({
|
|
404
403
|
key: 2,
|
|
405
404
|
data: t.data,
|
|
406
405
|
loading: t.loading,
|
|
407
406
|
selectedRows: o.value,
|
|
408
407
|
delete: k,
|
|
409
408
|
updateSelectedRows: (n) => o.value = n
|
|
410
|
-
}, s.value)) : F.value === "kanban" ? d(e.$slots, "kanban",
|
|
409
|
+
}, s.value)) : F.value === "kanban" ? d(e.$slots, "kanban", h({
|
|
411
410
|
key: 3,
|
|
412
411
|
data: t.data,
|
|
413
412
|
loading: t.loading,
|
|
414
413
|
selectedRows: o.value,
|
|
415
414
|
delete: k,
|
|
416
415
|
updateSelectedRows: (n) => o.value = n
|
|
417
|
-
}, s.value)) : F.value === "calendar" ? d(e.$slots, "calendar",
|
|
416
|
+
}, s.value)) : F.value === "calendar" ? d(e.$slots, "calendar", h({
|
|
418
417
|
key: 4,
|
|
419
418
|
data: t.data,
|
|
420
419
|
loading: t.loading,
|
|
421
420
|
selectedRows: o.value,
|
|
422
421
|
delete: k,
|
|
423
422
|
updateSelectedRows: (n) => o.value = n
|
|
424
|
-
}, s.value)) : L.value ? (r(), V(qe(L.value),
|
|
423
|
+
}, s.value)) : L.value ? (r(), V(qe(L.value), h({
|
|
425
424
|
key: 5,
|
|
426
425
|
data: t.data,
|
|
427
426
|
loading: t.loading,
|
|
@@ -434,7 +433,7 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
434
433
|
], 64))
|
|
435
434
|
], 2),
|
|
436
435
|
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (r(), y("div", at, [
|
|
437
|
-
|
|
436
|
+
S(Y(je), h({
|
|
438
437
|
"current-page": t.pageInfo.currentPage,
|
|
439
438
|
"total-pages": t.pageInfo.totalPages,
|
|
440
439
|
"total-items": t.pageInfo.totalItems
|
|
@@ -442,12 +441,12 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
442
441
|
onChange: ce,
|
|
443
442
|
"onUpdate:itemsPerPage": me
|
|
444
443
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
445
|
-
])) :
|
|
446
|
-
|
|
444
|
+
])) : g("", !0),
|
|
445
|
+
S(Ae, {
|
|
447
446
|
show: B.value,
|
|
448
447
|
"onUpdate:show": a[7] || (a[7] = (n) => B.value = n),
|
|
449
|
-
title:
|
|
450
|
-
description:
|
|
448
|
+
title: ge.value,
|
|
449
|
+
description: he.value,
|
|
451
450
|
"confirm-text": ye.value,
|
|
452
451
|
"cancel-text": we.value,
|
|
453
452
|
variant: "danger",
|
|
@@ -459,28 +458,28 @@ const We = { class: "flex flex-col w-full space-y-8" }, Ze = { class: "flex flex
|
|
|
459
458
|
show: E.value,
|
|
460
459
|
"onUpdate:show": a[9] || (a[9] = (n) => E.value = n),
|
|
461
460
|
data: t.data || [],
|
|
462
|
-
fields:
|
|
461
|
+
fields: Ce.value,
|
|
463
462
|
mode: $e.value,
|
|
464
463
|
"export-props": t.exportProps,
|
|
465
464
|
"on-export": Ie
|
|
466
|
-
}, null, 8, ["show", "data", "fields", "mode", "export-props"])) :
|
|
465
|
+
}, null, 8, ["show", "data", "fields", "mode", "export-props"])) : g("", !0),
|
|
467
466
|
H.value ? (r(), y("div", nt, [
|
|
468
|
-
|
|
467
|
+
S(Ne, h({
|
|
469
468
|
show: j.value,
|
|
470
469
|
"onUpdate:show": a[10] || (a[10] = (n) => j.value = n),
|
|
471
470
|
ref_key: "importDataRef",
|
|
472
471
|
ref: xe,
|
|
473
|
-
fields:
|
|
472
|
+
fields: Se.value,
|
|
474
473
|
processBatch: De,
|
|
475
474
|
onComplete: Pe
|
|
476
475
|
}, typeof t.importProps == "object" ? t.importProps : {}, {
|
|
477
476
|
title: be.value,
|
|
478
477
|
class: "hidden!"
|
|
479
478
|
}), null, 16, ["show", "fields", "title"])
|
|
480
|
-
])) :
|
|
479
|
+
])) : g("", !0)
|
|
481
480
|
]));
|
|
482
481
|
}
|
|
483
482
|
});
|
|
484
483
|
export {
|
|
485
|
-
|
|
484
|
+
Ct as default
|
|
486
485
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SidePanel.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3446a690"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as D, ref as
|
|
1
|
+
import { defineComponent as D, ref as L, inject as V, computed as f, markRaw as j, watch as h, onMounted as K, onUnmounted as M, openBlock as l, createElementBlock as d, Fragment as F, createElementVNode as y, mergeProps as w, withModifiers as R, renderSlot as c, createCommentVNode as a, createBlock as g, Teleport as U, createVNode as $, Transition as k, withCtx as x, normalizeClass as m, toDisplayString as B, resolveDynamicComponent as q } from "vue";
|
|
2
2
|
import G from "./Button.vue.js";
|
|
3
3
|
import { useKeyStroke as H } from "../composables/useKeyStroke.js";
|
|
4
4
|
import { $t as T } from "../utils/i18n.js";
|
|
5
|
-
const J = { class: "text-lg font-bold text-foreground" },
|
|
5
|
+
const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold text-foreground" }, X = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "mt-1 text-sm text-muted-foreground"
|
|
8
|
-
},
|
|
8
|
+
}, te = /* @__PURE__ */ D({
|
|
9
9
|
inheritAttrs: !1,
|
|
10
10
|
__name: "SidePanel",
|
|
11
11
|
props: {
|
|
@@ -30,51 +30,53 @@ const J = { class: "text-lg font-bold text-foreground" }, Q = {
|
|
|
30
30
|
},
|
|
31
31
|
emits: ["close", "update:show", "onOpen", "onAfterOpen", "onAfterClose"],
|
|
32
32
|
setup(o, { emit: z }) {
|
|
33
|
-
const t = o,
|
|
34
|
-
let
|
|
35
|
-
const
|
|
33
|
+
const t = o, v = z, s = L(t.show);
|
|
34
|
+
let u = null;
|
|
35
|
+
const i = V("dropdown-context", null), C = f(() => t.body ? j(t.body) : void 0);
|
|
36
36
|
h(
|
|
37
37
|
() => t.show,
|
|
38
38
|
(e) => {
|
|
39
|
-
s.value = e, e && (
|
|
39
|
+
s.value = e, e && (v("onOpen"), i?.close());
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
42
|
const A = () => {
|
|
43
|
-
s.value = !0,
|
|
44
|
-
},
|
|
45
|
-
s.value = !1,
|
|
43
|
+
s.value = !0, i?.close();
|
|
44
|
+
}, n = () => {
|
|
45
|
+
s.value = !1, v("update:show", !1), v("close");
|
|
46
46
|
}, O = () => {
|
|
47
|
-
t.closeOutside &&
|
|
48
|
-
}, { onKeyStroke:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
t.closeOutside && n();
|
|
48
|
+
}, { onKeyStroke: S } = H();
|
|
49
|
+
S("Escape", n), h(s, (e) => {
|
|
50
|
+
u && clearTimeout(u), e ? (i?.onChildToggle?.(!0), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", u = setTimeout(() => {
|
|
51
|
+
i?.onChildToggle?.(!1);
|
|
52
52
|
}, 300));
|
|
53
|
+
}), K(() => {
|
|
54
|
+
s.value && i?.onChildToggle?.(!0);
|
|
53
55
|
}), M(() => {
|
|
54
|
-
s.value &&
|
|
55
|
-
}), F(() => {
|
|
56
|
-
d && clearTimeout(d), s.value && n?.onChildToggle?.(!1), document.body.style.overflow = "";
|
|
56
|
+
u && clearTimeout(u), s.value && i?.onChildToggle?.(!1), document.body.style.overflow = "";
|
|
57
57
|
});
|
|
58
|
-
const
|
|
58
|
+
const I = {
|
|
59
59
|
sm: "max-w-sm",
|
|
60
60
|
md: "max-w-md",
|
|
61
61
|
lg: "max-w-lg",
|
|
62
62
|
xl: "max-w-xl",
|
|
63
63
|
full: "max-w-full"
|
|
64
|
-
}, E =
|
|
64
|
+
}, E = f(() => t.position === "left" ? "left-0" : "right-0"), N = f(() => t.position === "left" ? "slide-left" : "slide-right"), r = f(() => t.titleI18n ? T(t.titleI18n) : t.title), b = f(
|
|
65
65
|
() => t.descriptionI18n ? T(t.descriptionI18n) : t.description
|
|
66
66
|
);
|
|
67
|
-
return (e,
|
|
67
|
+
return (e, p) => (l(), d(F, null, [
|
|
68
68
|
y("span", w({
|
|
69
69
|
onClick: R(A, ["stop"]),
|
|
70
70
|
class: `${o.triggerClass}`
|
|
71
|
-
}, e.$attrs
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
}, e.$attrs, {
|
|
72
|
+
"data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : r.value ? `sidepanel-trigger-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel-trigger"
|
|
73
|
+
}), [
|
|
74
|
+
c(e.$slots, "trigger", {}, () => [
|
|
75
|
+
o.body ? c(e.$slots, "default", { key: 0 }, void 0, !0) : a("", !0)
|
|
74
76
|
], !0)
|
|
75
|
-
], 16),
|
|
76
|
-
(l(),
|
|
77
|
-
k
|
|
77
|
+
], 16, J),
|
|
78
|
+
(l(), g(U, { to: "body" }, [
|
|
79
|
+
$(k, {
|
|
78
80
|
"enter-active-class": "transition-opacity duration-300 ease-out",
|
|
79
81
|
"enter-from-class": "opacity-0",
|
|
80
82
|
"enter-to-class": "opacity-100",
|
|
@@ -82,60 +84,64 @@ const J = { class: "text-lg font-bold text-foreground" }, Q = {
|
|
|
82
84
|
"leave-from-class": "opacity-100",
|
|
83
85
|
"leave-to-class": "opacity-0"
|
|
84
86
|
}, {
|
|
85
|
-
default:
|
|
86
|
-
s.value ? (l(),
|
|
87
|
+
default: x(() => [
|
|
88
|
+
s.value ? (l(), d("div", {
|
|
87
89
|
key: 0,
|
|
88
|
-
class:
|
|
90
|
+
class: m(["fixed inset-0 z-50 v-sidepanel-overlay", o.overlayClass]),
|
|
89
91
|
onClick: O
|
|
90
92
|
}, null, 2)) : a("", !0)
|
|
91
93
|
]),
|
|
92
94
|
_: 1
|
|
93
95
|
}),
|
|
94
|
-
k
|
|
96
|
+
$(k, {
|
|
95
97
|
name: N.value,
|
|
96
|
-
onAfterEnter:
|
|
97
|
-
onAfterLeave:
|
|
98
|
+
onAfterEnter: p[0] || (p[0] = (P) => e.$emit("onAfterOpen")),
|
|
99
|
+
onAfterLeave: p[1] || (p[1] = (P) => e.$emit("onAfterClose"))
|
|
98
100
|
}, {
|
|
99
|
-
default:
|
|
100
|
-
s.value ? (l(),
|
|
101
|
+
default: x(() => [
|
|
102
|
+
s.value ? (l(), d("div", {
|
|
101
103
|
key: 0,
|
|
102
|
-
|
|
104
|
+
role: "dialog",
|
|
105
|
+
"aria-modal": "true",
|
|
106
|
+
class: m(["sidepanel-body fixed inset-y-0 z-50 flex flex-col bg-body shadow-sm border transition-transform duration-300 ease-in-out w-full", [I[o.size], E.value, t.class]]),
|
|
107
|
+
"data-testid": e.$attrs["data-testid"] || (r.value ? `sidepanel-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel")
|
|
103
108
|
}, [
|
|
104
|
-
|
|
109
|
+
r.value || e.$slots.header ? (l(), d("div", {
|
|
105
110
|
key: 0,
|
|
106
|
-
class:
|
|
111
|
+
class: m([o.headerClass, "flex-none flex items-center justify-between px-5 py-2 border-b border-border"])
|
|
107
112
|
}, [
|
|
108
|
-
|
|
113
|
+
c(e.$slots, "header", {}, () => [
|
|
109
114
|
y("div", null, [
|
|
110
|
-
y("h3",
|
|
111
|
-
|
|
115
|
+
y("h3", W, B(r.value), 1),
|
|
116
|
+
b.value ? (l(), d("p", X, B(b.value), 1)) : a("", !0)
|
|
112
117
|
])
|
|
113
118
|
], !0),
|
|
114
|
-
o.hideCloseButton ? a("", !0) : (l(),
|
|
119
|
+
o.hideCloseButton ? a("", !0) : (l(), g(G, {
|
|
115
120
|
key: 0,
|
|
116
121
|
rounded: "full",
|
|
117
122
|
size: "sm",
|
|
118
123
|
variant: "ghost",
|
|
119
124
|
icon: "lucide:x",
|
|
120
|
-
onClick:
|
|
121
|
-
class: "-mr-2"
|
|
125
|
+
onClick: n,
|
|
126
|
+
class: "-mr-2",
|
|
127
|
+
"data-testid": "sidepanel-close-btn"
|
|
122
128
|
}))
|
|
123
129
|
], 2)) : a("", !0),
|
|
124
130
|
y("div", {
|
|
125
|
-
class:
|
|
131
|
+
class: m(["flex-1 overflow-y-auto px-6 py-4 scrollbar-thin scrollbar-stable", o.bodyClass])
|
|
126
132
|
}, [
|
|
127
|
-
|
|
133
|
+
C.value ? (l(), g(q(C.value), w({ key: 0 }, { ...o.bodyProps, ...e.$attrs }, { close: n }), null, 16)) : c(e.$slots, "default", {
|
|
128
134
|
key: 1,
|
|
129
|
-
close:
|
|
135
|
+
close: n
|
|
130
136
|
}, void 0, !0)
|
|
131
137
|
], 2),
|
|
132
|
-
e.$slots.footer ? (l(),
|
|
138
|
+
e.$slots.footer ? (l(), d("div", {
|
|
133
139
|
key: 1,
|
|
134
|
-
class:
|
|
140
|
+
class: m(["flex-none px-6 py-3 border-t border-border", o.footerClass])
|
|
135
141
|
}, [
|
|
136
|
-
|
|
142
|
+
c(e.$slots, "footer", { close: n }, void 0, !0)
|
|
137
143
|
], 2)) : a("", !0)
|
|
138
|
-
],
|
|
144
|
+
], 10, Q)) : a("", !0)
|
|
139
145
|
]),
|
|
140
146
|
_: 3
|
|
141
147
|
}, 8, ["name"])
|
|
@@ -144,5 +150,5 @@ const J = { class: "text-lg font-bold text-foreground" }, Q = {
|
|
|
144
150
|
}
|
|
145
151
|
});
|
|
146
152
|
export {
|
|
147
|
-
|
|
153
|
+
te as default
|
|
148
154
|
};
|
|
@@ -11,7 +11,7 @@ declare const _default: import('vue').DefineComponent<SidebarMenuProps, {}, {},
|
|
|
11
11
|
indentSize: number;
|
|
12
12
|
defaultExpanded: string[];
|
|
13
13
|
showCompactLabels: boolean;
|
|
14
|
-
renderMode: "tree" | "popover";
|
|
14
|
+
renderMode: "tree" | "popover" | "drilldown";
|
|
15
15
|
compactIconSize: string;
|
|
16
16
|
labelClass: string;
|
|
17
17
|
compactLabelClass: string;
|