vlite3 0.9.1 → 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.
Files changed (42) hide show
  1. package/components/Alert.vue.js +40 -38
  2. package/components/Carousel/Carousel.vue.d.ts +2 -2
  3. package/components/Carousel/Carousel.vue.js +2 -2
  4. package/components/Carousel/Carousel.vue2.js +1 -1
  5. package/components/Chat/ChatBubble.vue.d.ts +18 -0
  6. package/components/Chat/ChatInterface.vue.d.ts +45 -0
  7. package/components/Chat/index.d.ts +2 -0
  8. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  9. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  10. package/components/DataTable/DataTableRow.vue.js +1 -1
  11. package/components/DateTime/DateTime.vue.js +31 -0
  12. package/components/DateTime/DateTime.vue2.js +4 -0
  13. package/components/DateTime/index.d.ts +1 -0
  14. package/components/FilePicker/FilePicker.vue.d.ts +4 -1
  15. package/components/FilePicker/FilePicker.vue.js +189 -139
  16. package/components/Form/CustomFields.vue.d.ts +2 -0
  17. package/components/Form/CustomFields.vue.js +2 -2
  18. package/components/Form/CustomFields.vue2.js +121 -99
  19. package/components/Form/FormField.vue.js +3 -1
  20. package/components/Form/types.d.ts +1 -0
  21. package/components/List/ListFieldRow.vue.js +1 -1
  22. package/components/NavbarCommandPalette.vue.js +1 -1
  23. package/components/Screen/Screen.vue.d.ts +1 -0
  24. package/components/Screen/Screen.vue.js +112 -107
  25. package/components/Screen/ScreenFilter.vue.js +3 -2
  26. package/components/Screen/components/ScreenEmptyState.vue.js +11 -10
  27. package/components/Screen/components/ScreenHeaderTitle.vue.d.ts +2 -0
  28. package/components/Screen/components/ScreenHeaderTitle.vue.js +28 -24
  29. package/components/Screen/components/ScreenQuickFilters.vue.js +1 -1
  30. package/components/Screen/types.d.ts +3 -0
  31. package/core/config.d.ts +2 -2
  32. package/core/config.js +7 -7
  33. package/core/index.js +3 -3
  34. package/index.d.ts +1 -1
  35. package/index.js +2 -2
  36. package/package.json +2 -2
  37. package/style.css +9 -10
  38. package/types/config.type.d.ts +1 -1
  39. package/components/Date/Date.vue.js +0 -21
  40. package/components/Date/Date.vue2.js +0 -4
  41. package/components/Date/index.d.ts +0 -1
  42. /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 i, ref as s, markRaw as we, provide as F, watch as R, openBlock as n, createElementBlock as m, normalizeClass as q, createVNode as w, createSlots as ke, withCtx as Q, renderSlot as d, createElementVNode as I, createBlock as p, createCommentVNode as c, isRef as be, unref as D, Fragment as M, resolveDynamicComponent as xe, mergeProps as A, toDisplayString as Ce } from "vue";
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";
@@ -6,10 +6,10 @@ import Pe from "../ConfirmationModal.vue.js";
6
6
  import Se from "../Pagination/Pagination.vue.js";
7
7
  import $e from "./ScreenFilter.vue.js";
8
8
  import Ie from "../ImportData/ImportData.vue.js";
9
- import { usePersistentState as Ve } from "../../utils/usePersistentState.js";
10
- import { useVLiteConfig as Te } from "../../core/config.js";
11
- import { $t as f } from "../../utils/i18n.js";
12
- import { SCREEN_CONTEXT_KEY as Be } from "../DataTable/types.js";
9
+ import { usePersistentState as Be } from "../../utils/usePersistentState.js";
10
+ import { useVLiteConfig as Ve } from "../../core/config.js";
11
+ import { $t as v } from "../../utils/i18n.js";
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";
15
15
  import qe from "./components/ScreenOptionsDropdown.vue.js";
@@ -71,8 +71,11 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
71
71
  showRefresh: { type: Boolean, default: !1 },
72
72
  containerClass: {},
73
73
  headerClass: {},
74
+ titleClass: {},
75
+ descriptionClass: {},
74
76
  viewProps: { default: () => ({}) },
75
77
  hideSelectable: { type: Boolean, default: !1 },
78
+ hideDeleteBtn: { type: Boolean, default: !1 },
76
79
  quickFilters: { default: () => [] },
77
80
  quickFilterKey: { default: "status" },
78
81
  defaultQuickFilter: {},
@@ -80,26 +83,26 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
80
83
  },
81
84
  emits: ["add", "delete"],
82
85
  setup(t, { emit: K }) {
83
- const l = t, x = Te(), E = K, P = ye(), L = i(() => l.name || l.title || "default-screen"), h = Ve(
86
+ const l = t, x = Ve(), E = K, P = ye(), L = n(() => l.name || l.title || "default-screen"), g = Be(
84
87
  `view-mode-${L.value}`,
85
88
  l.table || P.table ? "table" : "list"
86
- ), g = s(""), u = s({}), j = s({ field: "", order: "" }), k = s(l.pageInfo?.currentPage || 1), V = s(l.pageInfo?.itemsPerPage || l.paginationProps?.itemsPerPage || 10), r = s([]), S = s([]), C = s(!1), y = s(
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(
87
90
  l.defaultQuickFilter !== void 0 ? l.defaultQuickFilter : l.quickFilters && l.quickFilters.length > 0 ? l.quickFilters[0].value : ""
88
- ), z = i(() => l.quickFilters && l.quickFilters.length > 0), H = (e) => {
89
- y.value = e, k.value = 1, v();
90
- }, U = i(() => {
91
+ ), z = n(() => l.quickFilters && l.quickFilters.length > 0), H = (e) => {
92
+ c.value = e, k.value = 1, p();
93
+ }, U = n(() => {
91
94
  let e;
92
- return h.value === "table" ? e = l.table || !!P.table : e = l.list || !!P.list || !!P.grid, typeof e == "object" && e !== null ? we(e) : e;
93
- }), X = i(() => g.value && g.value.trim() !== "" ? !0 : u.value ? Object.keys(u.value).some(
94
- (e) => u.value[e] !== "" && u.value[e] !== null && u.value[e] !== void 0
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
95
98
  ) : !1), Y = {
96
99
  disableSearch: !0,
97
100
  forceSelectable: !l.hideSelectable,
98
101
  onTableChange: (e) => {
99
- j.value = { field: e.sort.field, order: e.sort.order }, v();
102
+ j.value = { field: e.sort.field, order: e.sort.order }, p();
100
103
  }
101
104
  };
102
- F(Be, Y), F("screen-selected-rows", r), F("screen-request-delete", (e) => b(e));
105
+ F(Te, Y), F("screen-selected-rows", r), F("screen-request-delete", (e) => b(e));
103
106
  const b = (e) => {
104
107
  S.value = e, C.value = !0;
105
108
  }, G = () => {
@@ -115,65 +118,65 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
115
118
  ), R(
116
119
  () => l.pageInfo?.itemsPerPage,
117
120
  (e) => {
118
- e && (V.value = e);
121
+ e && (B.value = e);
119
122
  }
120
123
  );
121
- let T = null;
122
- R(g, () => {
123
- T && clearTimeout(T), T = setTimeout(() => {
124
- k.value = 1, v();
124
+ let V = null;
125
+ R(y, () => {
126
+ V && clearTimeout(V), V = setTimeout(() => {
127
+ k.value = 1, p();
125
128
  }, 300);
126
129
  });
127
130
  const W = (e) => {
128
- k.value = e, v();
131
+ k.value = e, p();
129
132
  }, Z = (e) => {
130
- V.value = e, k.value = 1, v();
131
- }, v = () => {
133
+ B.value = e, k.value = 1, p();
134
+ }, p = () => {
132
135
  if (!l.refetch) return;
133
- const e = { ...u.value };
134
- y.value !== "" && y.value !== null && y.value !== void 0 && (e[l.quickFilterKey] = y.value), l.refetch({
135
- pagination: { page: k.value, limit: V.value },
136
- search: g.value,
136
+ const e = { ...m.value };
137
+ c.value !== "" && c.value !== null && c.value !== void 0 && (e[l.quickFilterKey] = c.value), l.refetch({
138
+ pagination: { page: k.value, limit: B.value },
139
+ search: y.value,
137
140
  sort: { ...j.value },
138
141
  filter: e
139
142
  });
140
- }, _ = i(() => l.data && l.data.length > 0), ee = i(() => {
141
- const e = f("vlite.screen.deleteSelected");
143
+ }, _ = n(() => l.data && l.data.length > 0), ee = n(() => {
144
+ const e = v("vlite.screen.deleteSelected");
142
145
  return e !== "vlite.screen.deleteSelected" ? e : "Delete Selected";
143
- }), te = i(() => {
144
- const e = f("vlite.screen.refresh");
146
+ }), te = n(() => {
147
+ const e = v("vlite.screen.refresh");
145
148
  return e !== "vlite.screen.refresh" ? e : "Refresh";
146
- }), le = i(() => {
147
- const e = f("vlite.screen.searchPlaceholder");
149
+ }), le = n(() => {
150
+ const e = v("vlite.screen.searchPlaceholder");
148
151
  return e !== "vlite.screen.searchPlaceholder" ? e : "Search...";
149
- }), ae = i(() => {
150
- const e = f("vlite.screen.confirmDeleteTitle");
152
+ }), ae = n(() => {
153
+ const e = v("vlite.screen.confirmDeleteTitle");
151
154
  return e !== "vlite.screen.confirmDeleteTitle" ? e : "Confirm Deletion";
152
- }), oe = i(() => {
153
- const e = f("vlite.screen.confirmDeleteDesc", { count: S.value.length });
155
+ }), ie = n(() => {
156
+ const e = v("vlite.screen.confirmDeleteDesc", { count: S.value.length });
154
157
  return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${S.value.length > 1 ? "items" : "item"}?`;
155
- }), ie = i(() => {
156
- const e = f("vlite.screen.confirmDeleteBtn");
158
+ }), ne = n(() => {
159
+ const e = v("vlite.screen.confirmDeleteBtn");
157
160
  return e !== "vlite.screen.confirmDeleteBtn" ? e : "Delete";
158
- }), ne = i(() => {
159
- const e = f("vlite.screen.cancelBtn");
161
+ }), oe = n(() => {
162
+ const e = v("vlite.screen.cancelBtn");
160
163
  return e !== "vlite.screen.cancelBtn" ? e : "Cancel";
161
- }), re = i(() => {
162
- const e = f("vlite.screen.missingView");
164
+ }), re = n(() => {
165
+ const e = v("vlite.screen.missingView");
163
166
  return e !== "vlite.screen.missingView" ? e : "Please provide a `:list` or `:table` component or slot.";
164
- }), N = i(
167
+ }), N = n(
165
168
  () => l.exportSchema && l.exportSchema.length > 0 && l.exportProps !== !1 || l.importSchema && l.importSchema.length > 0 && l.importProps !== !1
166
- ), se = i(() => {
167
- const e = f("vlite.screen.importData");
169
+ ), se = n(() => {
170
+ const e = v("vlite.screen.importData");
168
171
  return e !== "vlite.screen.importData" ? e : "Import Data";
169
- }), de = s(null), $ = s(!1), B = s(!1), ce = (e) => {
170
- e.value === "export" ? $.value = !0 : e.value === "import" && (B.value = !0);
171
- }, ue = i(
172
+ }), de = s(null), $ = s(!1), T = s(!1), ce = (e) => {
173
+ e.value === "export" ? $.value = !0 : e.value === "import" && (T.value = !0);
174
+ }, ue = n(
172
175
  () => (l.exportSchema || []).map((e) => ({
173
176
  field: e.name || e.field,
174
177
  title: e.label || e.title || e.name || e.field
175
178
  }))
176
- ), me = i(
179
+ ), me = n(
177
180
  () => (l.importSchema || []).map((e) => ({
178
181
  field: e.name || e.field,
179
182
  title: e.label || e.title || e.name || e.field,
@@ -188,27 +191,29 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
188
191
  skipped: 0,
189
192
  failed: 0,
190
193
  errors: []
191
- }), ve = () => v(), pe = i(
194
+ }), ve = () => p(), pe = n(
192
195
  () => l.exportMode || x?.exportData?.mode || "frontend"
193
196
  ), he = async (e) => {
194
197
  x?.services?.exportApi && l.exportType ? await x.services.exportApi(l.exportType, {
195
198
  format: e,
196
- search: g.value,
197
- filter: u.value
199
+ search: y.value,
200
+ filter: m.value
198
201
  }) : console.warn(
199
202
  "VLite Screen: No exportApi configured or no exportType provided for generic backend export."
200
203
  );
201
204
  };
202
- return (e, o) => (n(), m("div", Ne, [
203
- t.customHeader ? d(e.$slots, "custom-header", { key: 1 }) : (n(), m("div", {
205
+ return (e, i) => (o(), f("div", Ne, [
206
+ t.customHeader ? d(e.$slots, "custom-header", { key: 1 }) : (o(), f("div", {
204
207
  key: 0,
205
208
  class: q([t.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
206
209
  }, [
207
210
  w(Fe, {
208
211
  title: t.title,
209
212
  "title-i18n": t.titleI18n,
213
+ "title-class": t.titleClass,
210
214
  description: t.description,
211
215
  "description-i18n": t.descriptionI18n,
216
+ "description-class": t.descriptionClass,
212
217
  info: t.info,
213
218
  "info-i18n": t.infoI18n
214
219
  }, ke({ _: 2 }, [
@@ -226,24 +231,24 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
226
231
  ]),
227
232
  key: "1"
228
233
  } : void 0
229
- ]), 1032, ["title", "title-i18n", "description", "description-i18n", "info", "info-i18n"]),
234
+ ]), 1032, ["title", "title-i18n", "title-class", "description", "description-i18n", "description-class", "info", "info-i18n"]),
230
235
  I("div", Qe, [
231
236
  I("div", Me, [
232
- r.value.length > 0 && !t.hideSelectable ? (n(), p(O, {
237
+ r.value.length > 0 && !t.hideSelectable && !t.hideDeleteBtn ? (o(), h(O, {
233
238
  key: 0,
234
239
  variant: "outline",
235
240
  class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
236
241
  icon: "lucide:trash-2",
237
242
  title: ee.value,
238
- onClick: o[0] || (o[0] = (a) => b(r.value))
239
- }, null, 8, ["title"])) : c("", !0),
240
- (t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (n(), p(Re, {
243
+ onClick: i[0] || (i[0] = (a) => b(r.value))
244
+ }, null, 8, ["title"])) : u("", !0),
245
+ (t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (o(), h(Re, {
241
246
  key: 1,
242
- modelValue: D(h),
243
- "onUpdate:modelValue": o[1] || (o[1] = (a) => be(h) ? h.value = a : null)
244
- }, null, 8, ["modelValue"])) : c("", !0),
247
+ modelValue: D(g),
248
+ "onUpdate:modelValue": i[1] || (i[1] = (a) => be(g) ? g.value = a : null)
249
+ }, null, 8, ["modelValue"])) : u("", !0),
245
250
  d(e.$slots, "before-search"),
246
- t.showRefresh ? (n(), p(O, {
251
+ t.showRefresh ? (o(), h(O, {
247
252
  key: 2,
248
253
  variant: "outline",
249
254
  icon: "lucide:refresh-cw",
@@ -251,28 +256,28 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
251
256
  class: "shrink-0 h-9! w-9!",
252
257
  title: te.value,
253
258
  disabled: t.loading,
254
- onClick: v
255
- }, null, 8, ["title", "disabled"])) : c("", !0),
256
- t.filterSchema && t.filterSchema.length > 0 ? (n(), p($e, {
259
+ onClick: p
260
+ }, null, 8, ["title", "disabled"])) : u("", !0),
261
+ t.filterSchema && t.filterSchema.length > 0 ? (o(), h($e, {
257
262
  key: 3,
258
263
  schema: t.filterSchema,
259
264
  type: t.filterType,
260
- modelValue: u.value,
261
- "onUpdate:modelValue": o[2] || (o[2] = (a) => u.value = a),
262
- onChange: v
263
- }, null, 8, ["schema", "type", "modelValue"])) : c("", !0),
264
- t.canSearch ? (n(), m("div", Oe, [
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, [
265
270
  w(De, {
266
271
  lazy: "",
267
- modelValue: g.value,
268
- "onUpdate:modelValue": o[3] || (o[3] = (a) => g.value = a),
272
+ modelValue: y.value,
273
+ "onUpdate:modelValue": i[3] || (i[3] = (a) => y.value = a),
269
274
  icon: "lucide:search",
270
275
  placeholder: le.value,
271
276
  variant: "outline",
272
277
  class: "bg-background w-full",
273
278
  "show-clear-button": !0
274
279
  }, null, 8, ["modelValue", "placeholder"])
275
- ])) : c("", !0)
280
+ ])) : u("", !0)
276
281
  ]),
277
282
  I("div", Ke, [
278
283
  d(e.$slots, "actions", {}, () => [
@@ -283,37 +288,37 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
283
288
  loading: t.loading,
284
289
  data: t.data,
285
290
  refetch: t.refetch,
286
- onAdd: o[4] || (o[4] = (a) => e.$emit("add"))
291
+ onAdd: i[4] || (i[4] = (a) => e.$emit("add"))
287
292
  }, null, 8, ["can-add", "add-component", "add-btn", "loading", "data", "refetch"])
288
293
  ]),
289
- N.value ? (n(), p(qe, {
294
+ N.value ? (o(), h(qe, {
290
295
  key: 0,
291
296
  "export-props": t.exportProps,
292
297
  "import-props": t.importProps,
293
298
  onSelect: ce
294
- }, null, 8, ["export-props", "import-props"])) : c("", !0),
299
+ }, null, 8, ["export-props", "import-props"])) : u("", !0),
295
300
  d(e.$slots, "after-add")
296
301
  ])
297
302
  ])
298
303
  ], 2)),
299
- z.value ? (n(), m("div", {
304
+ d(e.$slots, "sub-header"),
305
+ z.value ? (o(), f("div", {
300
306
  key: 2,
301
- class: q(["max-sm:-mt-1", t.quickFilterVariant == "line" ? "mb-1.5 sm:mb-0" : "mb-2"])
307
+ class: q(["-mt-1", t.quickFilterVariant == "line" ? "mb-1.5 sm:mb-1" : "mb-2"])
302
308
  }, [
303
309
  w(Ue, {
304
- modelValue: y.value,
305
- "onUpdate:modelValue": o[5] || (o[5] = (a) => y.value = a),
310
+ modelValue: c.value,
311
+ "onUpdate:modelValue": i[5] || (i[5] = (a) => c.value = a),
306
312
  options: t.quickFilters,
307
313
  variant: t.quickFilterVariant,
308
314
  onChange: H
309
315
  }, null, 8, ["modelValue", "options", "variant"])
310
- ], 2)) : c("", !0),
311
- d(e.$slots, "sub-header"),
316
+ ], 2)) : u("", !0),
312
317
  I("div", {
313
318
  class: q(["flex-1 w-full relative", t.containerClass])
314
319
  }, [
315
- !_.value && !t.loading ? (n(), m(M, { key: 0 }, [
316
- e.$slots.empty ? d(e.$slots, "empty", { key: 0 }) : (n(), p(Ee, {
320
+ !_.value && !t.loading ? (o(), f(M, { key: 0 }, [
321
+ e.$slots.empty ? d(e.$slots, "empty", { key: 0 }) : (o(), h(Ee, {
317
322
  key: 1,
318
323
  "empty-title": t.emptyTitle,
319
324
  "empty-title-i18n": t.emptyTitleI18n,
@@ -325,41 +330,41 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
325
330
  "add-component": t.addComponent,
326
331
  "add-btn": t.addBtn
327
332
  }, null, 8, ["empty-title", "empty-title-i18n", "empty-description", "empty-description-i18n", "empty-icon", "is-filtered", "can-add", "add-component", "add-btn"]))
328
- ], 64)) : (n(), m(M, { key: 1 }, [
329
- D(h) === "table" && e.$slots.table ? d(e.$slots, "table", {
333
+ ], 64)) : (o(), f(M, { key: 1 }, [
334
+ D(g) === "table" && e.$slots.table ? d(e.$slots, "table", {
330
335
  key: 0,
331
336
  data: t.data,
332
337
  loading: t.loading,
333
338
  selectedRows: r.value,
334
339
  delete: b,
335
340
  updateSelectedRows: (a) => r.value = a
336
- }) : D(h) === "list" && e.$slots.list ? d(e.$slots, "list", {
341
+ }) : D(g) === "list" && e.$slots.list ? d(e.$slots, "list", {
337
342
  key: 1,
338
343
  data: t.data,
339
344
  loading: t.loading,
340
345
  selectedRows: r.value,
341
346
  delete: b,
342
347
  updateSelectedRows: (a) => r.value = a
343
- }) : D(h) === "list" && e.$slots.grid ? d(e.$slots, "grid", {
348
+ }) : D(g) === "list" && e.$slots.grid ? d(e.$slots, "grid", {
344
349
  key: 2,
345
350
  data: t.data,
346
351
  loading: t.loading,
347
352
  selectedRows: r.value,
348
353
  delete: b,
349
354
  updateSelectedRows: (a) => r.value = a
350
- }) : U.value ? (n(), p(xe(U.value), A({
355
+ }) : U.value ? (o(), h(xe(U.value), A({
351
356
  key: 3,
352
357
  data: t.data,
353
358
  loading: t.loading,
354
359
  refetch: t.refetch,
355
360
  selectedRows: r.value,
356
- "onUpdate:selectedRows": o[6] || (o[6] = (a) => r.value = a),
361
+ "onUpdate:selectedRows": i[6] || (i[6] = (a) => r.value = a),
357
362
  delete: b,
358
363
  onDelete: J
359
- }, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (n(), m("div", Le, Ce(re.value), 1))
364
+ }, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (o(), f("div", Le, Ce(re.value), 1))
360
365
  ], 64))
361
366
  ], 2),
362
- t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (n(), m("div", ze, [
367
+ t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (o(), f("div", ze, [
363
368
  w(D(Se), A({
364
369
  "current-page": t.pageInfo.currentPage,
365
370
  "total-pages": t.pageInfo.totalPages,
@@ -368,32 +373,32 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
368
373
  onChange: W,
369
374
  "onUpdate:itemsPerPage": Z
370
375
  }), null, 16, ["current-page", "total-pages", "total-items"])
371
- ])) : c("", !0),
376
+ ])) : u("", !0),
372
377
  w(Pe, {
373
378
  show: C.value,
374
- "onUpdate:show": o[7] || (o[7] = (a) => C.value = a),
379
+ "onUpdate:show": i[7] || (i[7] = (a) => C.value = a),
375
380
  title: ae.value,
376
- description: oe.value,
377
- "confirm-text": ie.value,
378
- "cancel-text": ne.value,
381
+ description: ie.value,
382
+ "confirm-text": ne.value,
383
+ "cancel-text": oe.value,
379
384
  variant: "danger",
380
385
  onConfirm: G,
381
- onCancel: o[8] || (o[8] = (a) => C.value = !1)
386
+ onCancel: i[8] || (i[8] = (a) => C.value = !1)
382
387
  }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"]),
383
- $.value ? (n(), p(je, {
388
+ $.value ? (o(), h(je, {
384
389
  key: 4,
385
390
  show: $.value,
386
- "onUpdate:show": o[9] || (o[9] = (a) => $.value = a),
391
+ "onUpdate:show": i[9] || (i[9] = (a) => $.value = a),
387
392
  data: t.data || [],
388
393
  fields: ue.value,
389
394
  mode: pe.value,
390
395
  "export-props": t.exportProps,
391
396
  "on-export": he
392
- }, null, 8, ["show", "data", "fields", "mode", "export-props"])) : c("", !0),
393
- N.value ? (n(), m("div", He, [
397
+ }, null, 8, ["show", "data", "fields", "mode", "export-props"])) : u("", !0),
398
+ N.value ? (o(), f("div", He, [
394
399
  w(Ie, A({
395
- show: B.value,
396
- "onUpdate:show": o[10] || (o[10] = (a) => B.value = a),
400
+ show: T.value,
401
+ "onUpdate:show": i[10] || (i[10] = (a) => T.value = a),
397
402
  ref_key: "importDataRef",
398
403
  ref: de,
399
404
  fields: me.value,
@@ -403,7 +408,7 @@ const Ne = { class: "flex flex-col w-full space-y-8" }, Qe = { class: "flex flex
403
408
  title: se.value,
404
409
  class: "hidden!"
405
410
  }), null, 16, ["show", "fields", "title"])
406
- ])) : c("", !0)
411
+ ])) : u("", !0)
407
412
  ]));
408
413
  }
409
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
- }, le = /* @__PURE__ */ B({
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
- le as default
184
+ se as default
184
185
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as C, computed as m, markRaw as k, resolveComponent as p, 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 y, toDisplayString as B, createCommentVNode as l } from "vue";
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 s from "../../Button.vue.js";
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__ */ C({
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 = p("router-link");
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(s, i({
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(B(c.value), 1)
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(s, i({
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(B(c.value), 1)
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(s, i({
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(B(c.value), 1)
90
+ s(y(c.value), 1)
90
91
  ]),
91
92
  _: 1
92
93
  }, 16, ["icon"])
@@ -5,6 +5,8 @@ type __VLS_Props = {
5
5
  descriptionI18n?: string;
6
6
  info?: string;
7
7
  infoI18n?: string;
8
+ titleClass?: string;
9
+ descriptionClass?: string;
8
10
  };
9
11
  declare function __VLS_template(): {
10
12
  attrs: Partial<{}>;
@@ -1,14 +1,11 @@
1
- import { defineComponent as f, computed as l, openBlock as n, createElementBlock as o, renderSlot as a, createElementVNode as p, toDisplayString as d, createBlock as u, withCtx as x, createVNode as h, createCommentVNode as i } from "vue";
2
- import I from "../../Icon.vue.js";
3
- import _ from "../../Tooltip.vue.js";
4
- import { $t as m } from "../../../utils/i18n.js";
5
- const g = { class: "flex flex-col shrink-0" }, k = {
1
+ import { defineComponent as p, computed as c, openBlock as n, createElementBlock as o, renderSlot as a, createElementVNode as u, normalizeClass as d, toDisplayString as m, createBlock as x, withCtx as h, createVNode as I, createCommentVNode as i } from "vue";
2
+ import C from "../../Icon.vue.js";
3
+ import g from "../../Tooltip.vue.js";
4
+ import { $t as f } from "../../../utils/i18n.js";
5
+ const k = { class: "flex flex-col shrink-0" }, v = {
6
6
  key: 0,
7
7
  class: "flex items-center! gap-2"
8
- }, v = { class: "text-fs-7.5 font-bold text-foreground" }, y = {
9
- key: 0,
10
- class: "text-sm text-gray-700 mt-1 md:max-w-[450px]"
11
- }, S = /* @__PURE__ */ f({
8
+ }, S = /* @__PURE__ */ p({
12
9
  __name: "ScreenHeaderTitle",
13
10
  props: {
14
11
  title: {},
@@ -16,24 +13,28 @@ const g = { class: "flex flex-col shrink-0" }, k = {
16
13
  description: {},
17
14
  descriptionI18n: {},
18
15
  info: {},
19
- infoI18n: {}
16
+ infoI18n: {},
17
+ titleClass: {},
18
+ descriptionClass: {}
20
19
  },
21
- setup(e) {
22
- const t = e, r = l(() => t.titleI18n ? m(t.titleI18n) : t.title), s = l(
23
- () => t.descriptionI18n ? m(t.descriptionI18n) : t.description
20
+ setup(t) {
21
+ const e = t, s = c(() => e.titleI18n ? f(e.titleI18n) : e.title), r = c(
22
+ () => e.descriptionI18n ? f(e.descriptionI18n) : e.description
24
23
  );
25
- return (c, $) => (n(), o("div", g, [
26
- a(c.$slots, "title", {}, () => [
27
- r.value ? (n(), o("div", k, [
28
- p("h1", v, d(r.value), 1),
29
- e.info || e.infoI18n ? (n(), u(_, {
24
+ return (l, y) => (n(), o("div", k, [
25
+ a(l.$slots, "title", {}, () => [
26
+ s.value ? (n(), o("div", v, [
27
+ u("h1", {
28
+ class: d(["text-fs-7.5 font-bold text-foreground", t.titleClass])
29
+ }, m(s.value), 3),
30
+ t.info || t.infoI18n ? (n(), x(g, {
30
31
  key: 0,
31
- content: e.info,
32
- "content-i18n": e.infoI18n,
32
+ content: t.info,
33
+ "content-i18n": t.infoI18n,
33
34
  placement: "right"
34
35
  }, {
35
- default: x(() => [
36
- h(I, {
36
+ default: h(() => [
37
+ I(C, {
37
38
  icon: "lucide:info",
38
39
  class: "w-[18px] h-[18px] mt-3! text-muted-foreground hover:text-foreground cursor-pointer transition-colors outline-none"
39
40
  })
@@ -42,8 +43,11 @@ const g = { class: "flex flex-col shrink-0" }, k = {
42
43
  }, 8, ["content", "content-i18n"])) : i("", !0)
43
44
  ])) : i("", !0)
44
45
  ]),
45
- a(c.$slots, "description", {}, () => [
46
- s.value ? (n(), o("p", y, d(s.value), 1)) : i("", !0)
46
+ a(l.$slots, "description", {}, () => [
47
+ r.value ? (n(), o("p", {
48
+ key: 0,
49
+ class: d(["text-sm text-gray-700 mt-1 md:max-w-[450px]", t.descriptionClass])
50
+ }, m(r.value), 3)) : i("", !0)
47
51
  ])
48
52
  ]));
49
53
  }
@@ -22,7 +22,7 @@ const p = { class: "w-max" }, V = /* @__PURE__ */ i({
22
22
  };
23
23
  return (e, v) => (r(), u("div", p, [
24
24
  m(d(b), {
25
- class: "border-b-0! border-0! pb-0.5",
25
+ class: "border-b-0! border-0! pb-0",
26
26
  "model-value": a.modelValue,
27
27
  options: t.value,
28
28
  variant: a.variant || "line",
@@ -84,8 +84,11 @@ export interface ScreenProps {
84
84
  showRefresh?: boolean;
85
85
  containerClass?: string;
86
86
  headerClass?: string;
87
+ titleClass?: string;
88
+ descriptionClass?: string;
87
89
  viewProps?: Record<string, any>;
88
90
  hideSelectable?: boolean;
91
+ hideDeleteBtn?: boolean;
89
92
  /**
90
93
  * Quick-filter tabs rendered below the header (above the content).
91
94
  * Inspired by modern dashboards (Shopify, Linear, Vercel).