vlite3 0.9.2 → 0.9.3
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/Alert.vue.js +40 -38
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/Carousel/Carousel.vue.js +2 -2
- package/components/Carousel/Carousel.vue2.js +1 -1
- package/components/DataTable/DataTableRow.vue.js +1 -1
- package/components/DateTime/DateTime.vue.js +31 -0
- package/components/DateTime/DateTime.vue2.js +4 -0
- package/components/DateTime/index.d.ts +1 -0
- package/components/Form/CustomFields.vue.d.ts +2 -0
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +121 -99
- package/components/Form/FormField.vue.js +1 -0
- package/components/Form/types.d.ts +1 -0
- package/components/List/ListFieldRow.vue.js +1 -1
- package/components/Screen/Screen.vue.js +69 -69
- package/components/Screen/ScreenFilter.vue.js +3 -2
- package/components/Screen/components/ScreenEmptyState.vue.js +11 -10
- package/core/config.d.ts +2 -2
- package/core/config.js +7 -7
- package/core/index.js +3 -3
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/package.json +1 -1
- package/style.css +9 -9
- package/types/config.type.d.ts +1 -1
- package/components/Date/Date.vue.js +0 -21
- package/components/Date/Date.vue2.js +0 -4
- package/components/Date/index.d.ts +0 -1
- /package/components/{Date/Date.vue.d.ts → DateTime/DateTime.vue.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ge, useSlots as ye, computed as n, ref as s, markRaw as we, provide as F, watch as R, openBlock as o, createElementBlock as
|
|
1
|
+
import { defineComponent as ge, useSlots as ye, computed as n, ref as s, markRaw as we, provide as F, watch as R, openBlock as o, createElementBlock as f, normalizeClass as q, createVNode as w, createSlots as ke, withCtx as Q, renderSlot as d, createElementVNode as I, createBlock as h, createCommentVNode as u, isRef as be, unref as D, Fragment as M, resolveDynamicComponent as xe, mergeProps as A, toDisplayString as Ce } from "vue";
|
|
2
2
|
import De from "../Input.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import O from "../Button.vue.js";
|
|
@@ -8,7 +8,7 @@ import $e from "./ScreenFilter.vue.js";
|
|
|
8
8
|
import Ie from "../ImportData/ImportData.vue.js";
|
|
9
9
|
import { usePersistentState as Be } from "../../utils/usePersistentState.js";
|
|
10
10
|
import { useVLiteConfig as Ve } from "../../core/config.js";
|
|
11
|
-
import { $t as
|
|
11
|
+
import { $t as v } from "../../utils/i18n.js";
|
|
12
12
|
import { SCREEN_CONTEXT_KEY as Te } from "../DataTable/types.js";
|
|
13
13
|
import Fe from "./components/ScreenHeaderTitle.vue.js";
|
|
14
14
|
import Re from "./components/ScreenViewToggle.vue.js";
|
|
@@ -83,23 +83,23 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
83
83
|
},
|
|
84
84
|
emits: ["add", "delete"],
|
|
85
85
|
setup(t, { emit: K }) {
|
|
86
|
-
const l = t, x = Ve(), E = K, P = ye(), L = n(() => l.name || l.title || "default-screen"),
|
|
86
|
+
const l = t, x = Ve(), E = K, P = ye(), L = n(() => l.name || l.title || "default-screen"), g = Be(
|
|
87
87
|
`view-mode-${L.value}`,
|
|
88
88
|
l.table || P.table ? "table" : "list"
|
|
89
|
-
),
|
|
89
|
+
), y = s(""), m = s({}), j = s({ field: "", order: "" }), k = s(l.pageInfo?.currentPage || 1), B = s(l.pageInfo?.itemsPerPage || l.paginationProps?.itemsPerPage || 10), r = s([]), S = s([]), C = s(!1), c = s(
|
|
90
90
|
l.defaultQuickFilter !== void 0 ? l.defaultQuickFilter : l.quickFilters && l.quickFilters.length > 0 ? l.quickFilters[0].value : ""
|
|
91
91
|
), z = n(() => l.quickFilters && l.quickFilters.length > 0), H = (e) => {
|
|
92
|
-
|
|
92
|
+
c.value = e, k.value = 1, p();
|
|
93
93
|
}, U = n(() => {
|
|
94
94
|
let e;
|
|
95
|
-
return
|
|
96
|
-
}), X = n(() =>
|
|
97
|
-
(e) =>
|
|
95
|
+
return g.value === "table" ? e = l.table || !!P.table : e = l.list || !!P.list || !!P.grid, typeof e == "object" && e !== null ? we(e) : e;
|
|
96
|
+
}), X = n(() => y.value && y.value.trim() !== "" || c.value !== "" && c.value !== null && c.value !== void 0 ? !0 : m.value ? Object.keys(m.value).some(
|
|
97
|
+
(e) => m.value[e] !== "" && m.value[e] !== null && m.value[e] !== void 0
|
|
98
98
|
) : !1), Y = {
|
|
99
99
|
disableSearch: !0,
|
|
100
100
|
forceSelectable: !l.hideSelectable,
|
|
101
101
|
onTableChange: (e) => {
|
|
102
|
-
j.value = { field: e.sort.field, order: e.sort.order },
|
|
102
|
+
j.value = { field: e.sort.field, order: e.sort.order }, p();
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
F(Te, Y), F("screen-selected-rows", r), F("screen-request-delete", (e) => b(e));
|
|
@@ -122,52 +122,52 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
122
122
|
}
|
|
123
123
|
);
|
|
124
124
|
let V = null;
|
|
125
|
-
R(
|
|
125
|
+
R(y, () => {
|
|
126
126
|
V && clearTimeout(V), V = setTimeout(() => {
|
|
127
|
-
k.value = 1,
|
|
127
|
+
k.value = 1, p();
|
|
128
128
|
}, 300);
|
|
129
129
|
});
|
|
130
130
|
const W = (e) => {
|
|
131
|
-
k.value = e,
|
|
131
|
+
k.value = e, p();
|
|
132
132
|
}, Z = (e) => {
|
|
133
|
-
B.value = e, k.value = 1,
|
|
134
|
-
},
|
|
133
|
+
B.value = e, k.value = 1, p();
|
|
134
|
+
}, p = () => {
|
|
135
135
|
if (!l.refetch) return;
|
|
136
|
-
const e = { ...
|
|
137
|
-
|
|
136
|
+
const e = { ...m.value };
|
|
137
|
+
c.value !== "" && c.value !== null && c.value !== void 0 && (e[l.quickFilterKey] = c.value), l.refetch({
|
|
138
138
|
pagination: { page: k.value, limit: B.value },
|
|
139
|
-
search:
|
|
139
|
+
search: y.value,
|
|
140
140
|
sort: { ...j.value },
|
|
141
141
|
filter: e
|
|
142
142
|
});
|
|
143
143
|
}, _ = n(() => l.data && l.data.length > 0), ee = n(() => {
|
|
144
|
-
const e =
|
|
144
|
+
const e = v("vlite.screen.deleteSelected");
|
|
145
145
|
return e !== "vlite.screen.deleteSelected" ? e : "Delete Selected";
|
|
146
146
|
}), te = n(() => {
|
|
147
|
-
const e =
|
|
147
|
+
const e = v("vlite.screen.refresh");
|
|
148
148
|
return e !== "vlite.screen.refresh" ? e : "Refresh";
|
|
149
149
|
}), le = n(() => {
|
|
150
|
-
const e =
|
|
150
|
+
const e = v("vlite.screen.searchPlaceholder");
|
|
151
151
|
return e !== "vlite.screen.searchPlaceholder" ? e : "Search...";
|
|
152
152
|
}), ae = n(() => {
|
|
153
|
-
const e =
|
|
153
|
+
const e = v("vlite.screen.confirmDeleteTitle");
|
|
154
154
|
return e !== "vlite.screen.confirmDeleteTitle" ? e : "Confirm Deletion";
|
|
155
155
|
}), ie = n(() => {
|
|
156
|
-
const e =
|
|
156
|
+
const e = v("vlite.screen.confirmDeleteDesc", { count: S.value.length });
|
|
157
157
|
return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${S.value.length > 1 ? "items" : "item"}?`;
|
|
158
158
|
}), ne = n(() => {
|
|
159
|
-
const e =
|
|
159
|
+
const e = v("vlite.screen.confirmDeleteBtn");
|
|
160
160
|
return e !== "vlite.screen.confirmDeleteBtn" ? e : "Delete";
|
|
161
161
|
}), oe = n(() => {
|
|
162
|
-
const e =
|
|
162
|
+
const e = v("vlite.screen.cancelBtn");
|
|
163
163
|
return e !== "vlite.screen.cancelBtn" ? e : "Cancel";
|
|
164
164
|
}), re = n(() => {
|
|
165
|
-
const e =
|
|
165
|
+
const e = v("vlite.screen.missingView");
|
|
166
166
|
return e !== "vlite.screen.missingView" ? e : "Please provide a `:list` or `:table` component or slot.";
|
|
167
167
|
}), N = n(
|
|
168
168
|
() => l.exportSchema && l.exportSchema.length > 0 && l.exportProps !== !1 || l.importSchema && l.importSchema.length > 0 && l.importProps !== !1
|
|
169
169
|
), se = n(() => {
|
|
170
|
-
const e =
|
|
170
|
+
const e = v("vlite.screen.importData");
|
|
171
171
|
return e !== "vlite.screen.importData" ? e : "Import Data";
|
|
172
172
|
}), de = s(null), $ = s(!1), T = s(!1), ce = (e) => {
|
|
173
173
|
e.value === "export" ? $.value = !0 : e.value === "import" && (T.value = !0);
|
|
@@ -191,19 +191,19 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
191
191
|
skipped: 0,
|
|
192
192
|
failed: 0,
|
|
193
193
|
errors: []
|
|
194
|
-
}), ve = () =>
|
|
194
|
+
}), ve = () => p(), pe = n(
|
|
195
195
|
() => l.exportMode || x?.exportData?.mode || "frontend"
|
|
196
196
|
), he = async (e) => {
|
|
197
197
|
x?.services?.exportApi && l.exportType ? await x.services.exportApi(l.exportType, {
|
|
198
198
|
format: e,
|
|
199
|
-
search:
|
|
200
|
-
filter:
|
|
199
|
+
search: y.value,
|
|
200
|
+
filter: m.value
|
|
201
201
|
}) : console.warn(
|
|
202
202
|
"VLite Screen: No exportApi configured or no exportType provided for generic backend export."
|
|
203
203
|
);
|
|
204
204
|
};
|
|
205
|
-
return (e, i) => (o(),
|
|
206
|
-
t.customHeader ? d(e.$slots, "custom-header", { key: 1 }) : (o(),
|
|
205
|
+
return (e, i) => (o(), f("div", Ne, [
|
|
206
|
+
t.customHeader ? d(e.$slots, "custom-header", { key: 1 }) : (o(), f("div", {
|
|
207
207
|
key: 0,
|
|
208
208
|
class: q([t.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
|
|
209
209
|
}, [
|
|
@@ -234,21 +234,21 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
234
234
|
]), 1032, ["title", "title-i18n", "title-class", "description", "description-i18n", "description-class", "info", "info-i18n"]),
|
|
235
235
|
I("div", Qe, [
|
|
236
236
|
I("div", Me, [
|
|
237
|
-
r.value.length > 0 && !t.hideSelectable && !t.hideDeleteBtn ? (o(),
|
|
237
|
+
r.value.length > 0 && !t.hideSelectable && !t.hideDeleteBtn ? (o(), h(O, {
|
|
238
238
|
key: 0,
|
|
239
239
|
variant: "outline",
|
|
240
240
|
class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
|
|
241
241
|
icon: "lucide:trash-2",
|
|
242
242
|
title: ee.value,
|
|
243
243
|
onClick: i[0] || (i[0] = (a) => b(r.value))
|
|
244
|
-
}, null, 8, ["title"])) :
|
|
245
|
-
(t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (o(),
|
|
244
|
+
}, null, 8, ["title"])) : u("", !0),
|
|
245
|
+
(t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (o(), h(Re, {
|
|
246
246
|
key: 1,
|
|
247
|
-
modelValue: D(
|
|
248
|
-
"onUpdate:modelValue": i[1] || (i[1] = (a) => be(
|
|
249
|
-
}, null, 8, ["modelValue"])) :
|
|
247
|
+
modelValue: D(g),
|
|
248
|
+
"onUpdate:modelValue": i[1] || (i[1] = (a) => be(g) ? g.value = a : null)
|
|
249
|
+
}, null, 8, ["modelValue"])) : u("", !0),
|
|
250
250
|
d(e.$slots, "before-search"),
|
|
251
|
-
t.showRefresh ? (o(),
|
|
251
|
+
t.showRefresh ? (o(), h(O, {
|
|
252
252
|
key: 2,
|
|
253
253
|
variant: "outline",
|
|
254
254
|
icon: "lucide:refresh-cw",
|
|
@@ -256,28 +256,28 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
256
256
|
class: "shrink-0 h-9! w-9!",
|
|
257
257
|
title: te.value,
|
|
258
258
|
disabled: t.loading,
|
|
259
|
-
onClick:
|
|
260
|
-
}, null, 8, ["title", "disabled"])) :
|
|
261
|
-
t.filterSchema && t.filterSchema.length > 0 ? (o(),
|
|
259
|
+
onClick: p
|
|
260
|
+
}, null, 8, ["title", "disabled"])) : u("", !0),
|
|
261
|
+
t.filterSchema && t.filterSchema.length > 0 ? (o(), h($e, {
|
|
262
262
|
key: 3,
|
|
263
263
|
schema: t.filterSchema,
|
|
264
264
|
type: t.filterType,
|
|
265
|
-
modelValue:
|
|
266
|
-
"onUpdate:modelValue": i[2] || (i[2] = (a) =>
|
|
267
|
-
onChange:
|
|
268
|
-
}, null, 8, ["schema", "type", "modelValue"])) :
|
|
269
|
-
t.canSearch ? (o(),
|
|
265
|
+
modelValue: m.value,
|
|
266
|
+
"onUpdate:modelValue": i[2] || (i[2] = (a) => m.value = a),
|
|
267
|
+
onChange: p
|
|
268
|
+
}, null, 8, ["schema", "type", "modelValue"])) : u("", !0),
|
|
269
|
+
t.canSearch ? (o(), f("div", Oe, [
|
|
270
270
|
w(De, {
|
|
271
271
|
lazy: "",
|
|
272
|
-
modelValue:
|
|
273
|
-
"onUpdate:modelValue": i[3] || (i[3] = (a) =>
|
|
272
|
+
modelValue: y.value,
|
|
273
|
+
"onUpdate:modelValue": i[3] || (i[3] = (a) => y.value = a),
|
|
274
274
|
icon: "lucide:search",
|
|
275
275
|
placeholder: le.value,
|
|
276
276
|
variant: "outline",
|
|
277
277
|
class: "bg-background w-full",
|
|
278
278
|
"show-clear-button": !0
|
|
279
279
|
}, null, 8, ["modelValue", "placeholder"])
|
|
280
|
-
])) :
|
|
280
|
+
])) : u("", !0)
|
|
281
281
|
]),
|
|
282
282
|
I("div", Ke, [
|
|
283
283
|
d(e.$slots, "actions", {}, () => [
|
|
@@ -291,34 +291,34 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
291
291
|
onAdd: i[4] || (i[4] = (a) => e.$emit("add"))
|
|
292
292
|
}, null, 8, ["can-add", "add-component", "add-btn", "loading", "data", "refetch"])
|
|
293
293
|
]),
|
|
294
|
-
N.value ? (o(),
|
|
294
|
+
N.value ? (o(), h(qe, {
|
|
295
295
|
key: 0,
|
|
296
296
|
"export-props": t.exportProps,
|
|
297
297
|
"import-props": t.importProps,
|
|
298
298
|
onSelect: ce
|
|
299
|
-
}, null, 8, ["export-props", "import-props"])) :
|
|
299
|
+
}, null, 8, ["export-props", "import-props"])) : u("", !0),
|
|
300
300
|
d(e.$slots, "after-add")
|
|
301
301
|
])
|
|
302
302
|
])
|
|
303
303
|
], 2)),
|
|
304
304
|
d(e.$slots, "sub-header"),
|
|
305
|
-
z.value ? (o(),
|
|
305
|
+
z.value ? (o(), f("div", {
|
|
306
306
|
key: 2,
|
|
307
307
|
class: q(["-mt-1", t.quickFilterVariant == "line" ? "mb-1.5 sm:mb-1" : "mb-2"])
|
|
308
308
|
}, [
|
|
309
309
|
w(Ue, {
|
|
310
|
-
modelValue:
|
|
311
|
-
"onUpdate:modelValue": i[5] || (i[5] = (a) =>
|
|
310
|
+
modelValue: c.value,
|
|
311
|
+
"onUpdate:modelValue": i[5] || (i[5] = (a) => c.value = a),
|
|
312
312
|
options: t.quickFilters,
|
|
313
313
|
variant: t.quickFilterVariant,
|
|
314
314
|
onChange: H
|
|
315
315
|
}, null, 8, ["modelValue", "options", "variant"])
|
|
316
|
-
], 2)) :
|
|
316
|
+
], 2)) : u("", !0),
|
|
317
317
|
I("div", {
|
|
318
318
|
class: q(["flex-1 w-full relative", t.containerClass])
|
|
319
319
|
}, [
|
|
320
|
-
!_.value && !t.loading ? (o(),
|
|
321
|
-
e.$slots.empty ? d(e.$slots, "empty", { key: 0 }) : (o(),
|
|
320
|
+
!_.value && !t.loading ? (o(), f(M, { key: 0 }, [
|
|
321
|
+
e.$slots.empty ? d(e.$slots, "empty", { key: 0 }) : (o(), h(Ee, {
|
|
322
322
|
key: 1,
|
|
323
323
|
"empty-title": t.emptyTitle,
|
|
324
324
|
"empty-title-i18n": t.emptyTitleI18n,
|
|
@@ -330,29 +330,29 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
330
330
|
"add-component": t.addComponent,
|
|
331
331
|
"add-btn": t.addBtn
|
|
332
332
|
}, null, 8, ["empty-title", "empty-title-i18n", "empty-description", "empty-description-i18n", "empty-icon", "is-filtered", "can-add", "add-component", "add-btn"]))
|
|
333
|
-
], 64)) : (o(),
|
|
334
|
-
D(
|
|
333
|
+
], 64)) : (o(), f(M, { key: 1 }, [
|
|
334
|
+
D(g) === "table" && e.$slots.table ? d(e.$slots, "table", {
|
|
335
335
|
key: 0,
|
|
336
336
|
data: t.data,
|
|
337
337
|
loading: t.loading,
|
|
338
338
|
selectedRows: r.value,
|
|
339
339
|
delete: b,
|
|
340
340
|
updateSelectedRows: (a) => r.value = a
|
|
341
|
-
}) : D(
|
|
341
|
+
}) : D(g) === "list" && e.$slots.list ? d(e.$slots, "list", {
|
|
342
342
|
key: 1,
|
|
343
343
|
data: t.data,
|
|
344
344
|
loading: t.loading,
|
|
345
345
|
selectedRows: r.value,
|
|
346
346
|
delete: b,
|
|
347
347
|
updateSelectedRows: (a) => r.value = a
|
|
348
|
-
}) : D(
|
|
348
|
+
}) : D(g) === "list" && e.$slots.grid ? d(e.$slots, "grid", {
|
|
349
349
|
key: 2,
|
|
350
350
|
data: t.data,
|
|
351
351
|
loading: t.loading,
|
|
352
352
|
selectedRows: r.value,
|
|
353
353
|
delete: b,
|
|
354
354
|
updateSelectedRows: (a) => r.value = a
|
|
355
|
-
}) : U.value ? (o(),
|
|
355
|
+
}) : U.value ? (o(), h(xe(U.value), A({
|
|
356
356
|
key: 3,
|
|
357
357
|
data: t.data,
|
|
358
358
|
loading: t.loading,
|
|
@@ -361,10 +361,10 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
361
361
|
"onUpdate:selectedRows": i[6] || (i[6] = (a) => r.value = a),
|
|
362
362
|
delete: b,
|
|
363
363
|
onDelete: J
|
|
364
|
-
}, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (o(),
|
|
364
|
+
}, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (o(), f("div", Le, Ce(re.value), 1))
|
|
365
365
|
], 64))
|
|
366
366
|
], 2),
|
|
367
|
-
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (o(),
|
|
367
|
+
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (o(), f("div", ze, [
|
|
368
368
|
w(D(Se), A({
|
|
369
369
|
"current-page": t.pageInfo.currentPage,
|
|
370
370
|
"total-pages": t.pageInfo.totalPages,
|
|
@@ -373,7 +373,7 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
373
373
|
onChange: W,
|
|
374
374
|
"onUpdate:itemsPerPage": Z
|
|
375
375
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
376
|
-
])) :
|
|
376
|
+
])) : u("", !0),
|
|
377
377
|
w(Pe, {
|
|
378
378
|
show: C.value,
|
|
379
379
|
"onUpdate:show": i[7] || (i[7] = (a) => C.value = a),
|
|
@@ -385,7 +385,7 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
385
385
|
onConfirm: G,
|
|
386
386
|
onCancel: i[8] || (i[8] = (a) => C.value = !1)
|
|
387
387
|
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"]),
|
|
388
|
-
$.value ? (o(),
|
|
388
|
+
$.value ? (o(), h(je, {
|
|
389
389
|
key: 4,
|
|
390
390
|
show: $.value,
|
|
391
391
|
"onUpdate:show": i[9] || (i[9] = (a) => $.value = a),
|
|
@@ -394,8 +394,8 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
394
394
|
mode: pe.value,
|
|
395
395
|
"export-props": t.exportProps,
|
|
396
396
|
"on-export": he
|
|
397
|
-
}, null, 8, ["show", "data", "fields", "mode", "export-props"])) :
|
|
398
|
-
N.value ? (o(),
|
|
397
|
+
}, null, 8, ["show", "data", "fields", "mode", "export-props"])) : u("", !0),
|
|
398
|
+
N.value ? (o(), f("div", He, [
|
|
399
399
|
w(Ie, A({
|
|
400
400
|
show: T.value,
|
|
401
401
|
"onUpdate:show": i[10] || (i[10] = (a) => T.value = a),
|
|
@@ -408,7 +408,7 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
|
|
|
408
408
|
title: se.value,
|
|
409
409
|
class: "hidden!"
|
|
410
410
|
}), null, 16, ["show", "fields", "title"])
|
|
411
|
-
])) :
|
|
411
|
+
])) : u("", !0)
|
|
412
412
|
]));
|
|
413
413
|
}
|
|
414
414
|
});
|
|
@@ -15,13 +15,14 @@ import "@vueuse/core";
|
|
|
15
15
|
/* empty css */
|
|
16
16
|
import "iconify-icon-picker";
|
|
17
17
|
import "iconify-icon-picker/style.css";
|
|
18
|
+
import "vue-draggable-plus";
|
|
18
19
|
/* empty css */
|
|
19
20
|
/* empty css */
|
|
20
21
|
import "../../core/config.js";
|
|
21
22
|
const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }, E = { style: { "will-change": "transform", contain: "layout style" } }, I = {
|
|
22
23
|
class: "py-4 px-3.5 min-w-[290px]",
|
|
23
24
|
style: { "will-change": "transform", contain: "layout style" }
|
|
24
|
-
},
|
|
25
|
+
}, se = /* @__PURE__ */ B({
|
|
25
26
|
__name: "ScreenFilter",
|
|
26
27
|
props: {
|
|
27
28
|
schema: {},
|
|
@@ -180,5 +181,5 @@ const A = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
180
181
|
}
|
|
181
182
|
});
|
|
182
183
|
export {
|
|
183
|
-
|
|
184
|
+
se as default
|
|
184
185
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, computed as m, markRaw as k, resolveComponent as C, openBlock as n, createBlock as a, unref as h, withCtx as d, createElementBlock as o, Fragment as u, resolveDynamicComponent as w, mergeProps as i, createVNode as f, createTextVNode as s, toDisplayString as y, createCommentVNode as l } from "vue";
|
|
2
2
|
import x from "../../Empty/Empty.vue.js";
|
|
3
|
-
import
|
|
3
|
+
import B from "../../Button.vue.js";
|
|
4
4
|
import A from "../../Modal.vue.js";
|
|
5
5
|
import { $t as I } from "../../../utils/i18n.js";
|
|
6
|
-
const D = ["href", "target"], $ = /* @__PURE__ */
|
|
6
|
+
const D = ["href", "target"], $ = /* @__PURE__ */ p({
|
|
7
7
|
__name: "ScreenEmptyState",
|
|
8
8
|
props: {
|
|
9
9
|
emptyTitle: {},
|
|
@@ -28,8 +28,9 @@ const D = ["href", "target"], $ = /* @__PURE__ */ C({
|
|
|
28
28
|
return r !== "vlite.screen.addNew" ? r : "Add New";
|
|
29
29
|
});
|
|
30
30
|
return (r, N) => {
|
|
31
|
-
const g =
|
|
31
|
+
const g = C("router-link");
|
|
32
32
|
return n(), a(h(x), {
|
|
33
|
+
class: "py-0.5!",
|
|
33
34
|
title: e.emptyTitle,
|
|
34
35
|
titleI18n: e.emptyTitleI18n,
|
|
35
36
|
description: e.emptyDescription,
|
|
@@ -45,14 +46,14 @@ const D = ["href", "target"], $ = /* @__PURE__ */ C({
|
|
|
45
46
|
body: b.value
|
|
46
47
|
}, e.addBtn.modalProps), {
|
|
47
48
|
trigger: d(() => [
|
|
48
|
-
f(
|
|
49
|
+
f(B, i({
|
|
49
50
|
icon: e.addBtn.icon || "fluent:add-16-filled",
|
|
50
51
|
variant: "secondary",
|
|
51
52
|
rounded: "full",
|
|
52
53
|
class: "px-6!"
|
|
53
54
|
}, e.addBtn.buttonProps), {
|
|
54
55
|
default: d(() => [
|
|
55
|
-
y(
|
|
56
|
+
s(y(c.value), 1)
|
|
56
57
|
]),
|
|
57
58
|
_: 1
|
|
58
59
|
}, 16, ["icon"])
|
|
@@ -64,12 +65,12 @@ const D = ["href", "target"], $ = /* @__PURE__ */ C({
|
|
|
64
65
|
class: "inline-flex"
|
|
65
66
|
}, {
|
|
66
67
|
default: d(() => [
|
|
67
|
-
f(
|
|
68
|
+
f(B, i({
|
|
68
69
|
icon: e.addBtn.icon || "fluent:add-16-filled",
|
|
69
70
|
variant: "secondary"
|
|
70
71
|
}, e.addBtn.buttonProps), {
|
|
71
72
|
default: d(() => [
|
|
72
|
-
y(
|
|
73
|
+
s(y(c.value), 1)
|
|
73
74
|
]),
|
|
74
75
|
_: 1
|
|
75
76
|
}, 16, ["icon"])
|
|
@@ -81,12 +82,12 @@ const D = ["href", "target"], $ = /* @__PURE__ */ C({
|
|
|
81
82
|
target: e.addBtn.target,
|
|
82
83
|
class: "inline-flex"
|
|
83
84
|
}, [
|
|
84
|
-
f(
|
|
85
|
+
f(B, i({
|
|
85
86
|
icon: e.addBtn.icon || "lucide:plus",
|
|
86
87
|
variant: "secondary"
|
|
87
88
|
}, e.addBtn.buttonProps), {
|
|
88
89
|
default: d(() => [
|
|
89
|
-
y(
|
|
90
|
+
s(y(c.value), 1)
|
|
90
91
|
]),
|
|
91
92
|
_: 1
|
|
92
93
|
}, 16, ["icon"])
|
package/core/config.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export declare const configState: {
|
|
|
33
33
|
price?: {
|
|
34
34
|
currency?: string;
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
datetime?: {
|
|
37
37
|
format?: string;
|
|
38
38
|
};
|
|
39
39
|
empty?: {
|
|
@@ -78,7 +78,7 @@ export declare function useVLiteConfig(): {
|
|
|
78
78
|
price?: {
|
|
79
79
|
currency?: string;
|
|
80
80
|
};
|
|
81
|
-
|
|
81
|
+
datetime?: {
|
|
82
82
|
format?: string;
|
|
83
83
|
};
|
|
84
84
|
empty?: {
|
package/core/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { reactive as n, inject as
|
|
2
|
-
import { deepMerge as
|
|
1
|
+
import { reactive as n, inject as i } from "vue";
|
|
2
|
+
import { deepMerge as c } from "../utils/object.js";
|
|
3
3
|
const r = /* @__PURE__ */ Symbol("vlite-config"), s = {
|
|
4
4
|
services: {},
|
|
5
5
|
components: {
|
|
@@ -7,7 +7,7 @@ const r = /* @__PURE__ */ Symbol("vlite-config"), s = {
|
|
|
7
7
|
price: {
|
|
8
8
|
currency: "USD"
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
datetime: {
|
|
11
11
|
format: "MM/DD/YYYY"
|
|
12
12
|
},
|
|
13
13
|
statusChip: {
|
|
@@ -16,16 +16,16 @@ const r = /* @__PURE__ */ Symbol("vlite-config"), s = {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}, e = n({ ...s });
|
|
19
|
-
function
|
|
20
|
-
const o =
|
|
19
|
+
function a(t) {
|
|
20
|
+
const o = c(e, t);
|
|
21
21
|
Object.assign(e, o);
|
|
22
22
|
}
|
|
23
23
|
function u() {
|
|
24
|
-
return
|
|
24
|
+
return i(r, e);
|
|
25
25
|
}
|
|
26
26
|
export {
|
|
27
27
|
r as VLITE_CONFIG_KEY,
|
|
28
28
|
e as configState,
|
|
29
|
-
|
|
29
|
+
a as updateConfig,
|
|
30
30
|
u as useVLiteConfig
|
|
31
31
|
};
|
package/core/index.js
CHANGED
|
@@ -14,9 +14,9 @@ function o(e = {}) {
|
|
|
14
14
|
...t.components?.price || {},
|
|
15
15
|
...e.components.price || {}
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
...t.components?.
|
|
19
|
-
...e.components.
|
|
17
|
+
datetime: {
|
|
18
|
+
...t.components?.datetime || {},
|
|
19
|
+
...e.components.datetime || {}
|
|
20
20
|
},
|
|
21
21
|
empty: {
|
|
22
22
|
...t.components?.empty || {},
|
package/index.d.ts
CHANGED
|
@@ -75,5 +75,5 @@ export { createVLite, useVLiteConfig } from './core';
|
|
|
75
75
|
export { GoogleSignInPlugin };
|
|
76
76
|
export * from './components/StatusChip';
|
|
77
77
|
export * from './components/Price';
|
|
78
|
-
export * from './components/
|
|
78
|
+
export * from './components/DateTime';
|
|
79
79
|
export * from './core/config.ts';
|
package/index.js
CHANGED
|
@@ -117,7 +117,7 @@ import { createVLite as Vt } from "./core/index.js";
|
|
|
117
117
|
import { default as Yt } from "./components/StatusChip/StatusChip.vue.js";
|
|
118
118
|
import { STATUS_MAP as jt, normalizeStatus as qt, resolveStatus as Wt } from "./components/StatusChip/status-map.js";
|
|
119
119
|
import { default as $t } from "./components/Price/Price.vue.js";
|
|
120
|
-
import { default as Zt } from "./components/
|
|
120
|
+
import { default as Zt } from "./components/DateTime/DateTime.vue.js";
|
|
121
121
|
import { VLITE_CONFIG_KEY as oa, configState as ra, updateConfig as ta, useVLiteConfig as aa } from "./core/config.js";
|
|
122
122
|
export {
|
|
123
123
|
y as $t,
|
|
@@ -148,9 +148,9 @@ export {
|
|
|
148
148
|
Eo as DataTable,
|
|
149
149
|
Lo as DataTableHeader,
|
|
150
150
|
Ro as DataTableRow,
|
|
151
|
-
Zt as Date,
|
|
152
151
|
bt as DatePicker,
|
|
153
152
|
zt as DateRangePicker,
|
|
153
|
+
Zt as DateTime,
|
|
154
154
|
Me as Dropdown,
|
|
155
155
|
Ge as DropdownItem,
|
|
156
156
|
Ke as DropdownMenu,
|