vlite3 0.4.8 → 0.5.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.
Files changed (268) hide show
  1. package/README.md +201 -100
  2. package/_virtual/Barcode.js +4 -0
  3. package/_virtual/CODE128.js +4 -0
  4. package/_virtual/CODE128A.js +4 -0
  5. package/_virtual/CODE128B.js +4 -0
  6. package/_virtual/CODE128C.js +4 -0
  7. package/_virtual/CODE128_AUTO.js +4 -0
  8. package/_virtual/CODE93.js +4 -0
  9. package/_virtual/CODE93FullASCII.js +4 -0
  10. package/_virtual/EAN.js +4 -0
  11. package/_virtual/EAN13.js +4 -0
  12. package/_virtual/EAN2.js +4 -0
  13. package/_virtual/EAN5.js +4 -0
  14. package/_virtual/EAN8.js +4 -0
  15. package/_virtual/ErrorHandler.js +4 -0
  16. package/_virtual/FileSaver.min.js +5 -0
  17. package/_virtual/FileSaver.min2.js +4 -0
  18. package/_virtual/ITF.js +4 -0
  19. package/_virtual/ITF14.js +4 -0
  20. package/_virtual/JsBarcode.js +7 -0
  21. package/_virtual/MSI.js +4 -0
  22. package/_virtual/MSI10.js +4 -0
  23. package/_virtual/MSI1010.js +4 -0
  24. package/_virtual/MSI11.js +4 -0
  25. package/_virtual/MSI1110.js +4 -0
  26. package/_virtual/UPC.js +4 -0
  27. package/_virtual/UPCE.js +4 -0
  28. package/_virtual/_commonjsHelpers.js +8 -0
  29. package/_virtual/alignment-pattern.js +4 -0
  30. package/_virtual/auto.js +4 -0
  31. package/_virtual/browser.js +7 -0
  32. package/_virtual/browser2.js +4 -0
  33. package/_virtual/canvas.js +4 -0
  34. package/_virtual/canvas2.js +4 -0
  35. package/_virtual/checksums.js +4 -0
  36. package/_virtual/constants.js +4 -0
  37. package/_virtual/constants2.js +4 -0
  38. package/_virtual/constants3.js +4 -0
  39. package/_virtual/constants4.js +4 -0
  40. package/_virtual/defaults.js +4 -0
  41. package/_virtual/dijkstra.js +4 -0
  42. package/_virtual/encoder.js +4 -0
  43. package/_virtual/error-correction-code.js +4 -0
  44. package/_virtual/error-correction-level.js +4 -0
  45. package/_virtual/exceptions.js +4 -0
  46. package/_virtual/finder-pattern.js +4 -0
  47. package/_virtual/fixOptions.js +4 -0
  48. package/_virtual/format-info.js +4 -0
  49. package/_virtual/galois-field.js +4 -0
  50. package/_virtual/getOptionsFromElement.js +4 -0
  51. package/_virtual/getRenderProperties.js +4 -0
  52. package/_virtual/index.js +4 -0
  53. package/_virtual/index10.js +4 -0
  54. package/_virtual/index11.js +4 -0
  55. package/_virtual/index2.js +4 -0
  56. package/_virtual/index3.js +4 -0
  57. package/_virtual/index4.js +4 -0
  58. package/_virtual/index5.js +4 -0
  59. package/_virtual/index6.js +4 -0
  60. package/_virtual/index7.js +4 -0
  61. package/_virtual/index8.js +4 -0
  62. package/_virtual/index9.js +4 -0
  63. package/_virtual/linearizeEncodings.js +4 -0
  64. package/_virtual/mask-pattern.js +4 -0
  65. package/_virtual/merge.js +4 -0
  66. package/_virtual/mode.js +4 -0
  67. package/_virtual/object.js +4 -0
  68. package/_virtual/optionsFromStrings.js +4 -0
  69. package/_virtual/papaparse.min.js +7 -0
  70. package/_virtual/papaparse.min2.js +4 -0
  71. package/_virtual/polynomial.js +4 -0
  72. package/_virtual/qrcode.js +4 -0
  73. package/_virtual/regex.js +4 -0
  74. package/_virtual/segments.js +4 -0
  75. package/_virtual/shared.js +4 -0
  76. package/_virtual/svg-tag.js +4 -0
  77. package/_virtual/svg.js +4 -0
  78. package/_virtual/utils.js +4 -0
  79. package/_virtual/utils2.js +4 -0
  80. package/_virtual/version-check.js +4 -0
  81. package/_virtual/version.js +4 -0
  82. package/components/Accordion/Accordion.vue.d.ts +7 -7
  83. package/components/Accordion/AccordionItem.vue.d.ts +4 -4
  84. package/components/Accordion/AccordionTrigger.vue.d.ts +2 -2
  85. package/components/Alert.vue.d.ts +1 -1
  86. package/components/Avatar.vue.d.ts +2 -2
  87. package/components/Avatar.vue.js +2 -2
  88. package/components/AvatarUploader/AvatarUploader.vue.d.ts +5 -5
  89. package/components/Badge.vue.d.ts +1 -1
  90. package/components/Barcode/Barcode.vue.d.ts +22 -0
  91. package/components/Barcode/Barcode.vue.js +58 -0
  92. package/components/Barcode/Barcode.vue2.js +4 -0
  93. package/components/Barcode/index.d.ts +2 -0
  94. package/components/Barcode/types.d.ts +5 -0
  95. package/components/Barcode/types.js +15 -0
  96. package/components/Breadcrumb/Breadcrumb.vue.d.ts +23 -0
  97. package/components/Breadcrumb/Breadcrumb.vue.js +7 -0
  98. package/components/Breadcrumb/Breadcrumb.vue2.js +84 -0
  99. package/components/Breadcrumb/BreadcrumbItem.vue.d.ts +27 -0
  100. package/components/Breadcrumb/BreadcrumbItem.vue.js +7 -0
  101. package/components/Breadcrumb/BreadcrumbItem.vue2.js +50 -0
  102. package/components/Breadcrumb/index.d.ts +3 -0
  103. package/components/Breadcrumb/types.d.ts +19 -0
  104. package/components/Button.vue.d.ts +4 -4
  105. package/components/Button.vue.js +32 -29
  106. package/components/ButtonGroup.vue.d.ts +1 -1
  107. package/components/Carousel/Carousel.vue.d.ts +58 -58
  108. package/components/CheckBox.vue.d.ts +2 -2
  109. package/components/Chip/Chip.vue.d.ts +3 -3
  110. package/components/ChoiceBox/ChoiceBox.vue.d.ts +4 -4
  111. package/components/ColorPicker/ColorPicker.vue.d.ts +3 -3
  112. package/components/ColorPicker/index.d.ts +1 -0
  113. package/components/CommandPaletteContent.vue.d.ts +15 -0
  114. package/components/CommandPaletteContent.vue.js +7 -0
  115. package/components/CommandPaletteContent.vue2.js +287 -0
  116. package/components/ConfirmationModal.vue.js +12 -10
  117. package/components/DataList/DataList.vue.d.ts +2 -2
  118. package/components/DataTable/DataTable.vue.d.ts +6 -6
  119. package/components/DataTable/DataTableRow.vue.d.ts +3 -3
  120. package/components/DatePicker.vue.d.ts +2 -2
  121. package/components/DatePicker.vue.js +7 -7
  122. package/components/DateRangePicker.vue.d.ts +29 -0
  123. package/components/DateRangePicker.vue.js +231 -0
  124. package/components/DateRangePicker.vue2.js +4 -0
  125. package/components/Dropdown/Dropdown.vue.d.ts +11 -6
  126. package/components/Dropdown/Dropdown.vue.js +147 -109
  127. package/components/Dropdown/DropdownBooleanItem.vue.js +9 -8
  128. package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
  129. package/components/Dropdown/DropdownGroupedLayout.vue.js +35 -34
  130. package/components/Dropdown/DropdownItem.vue.js +11 -10
  131. package/components/Dropdown/DropdownMenu.vue.d.ts +5 -3
  132. package/components/Dropdown/DropdownMenu.vue.js +114 -111
  133. package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
  134. package/components/Dropdown/DropdownTrigger.vue.js +9 -7
  135. package/components/ExportData/ExportData.vue.d.ts +16 -0
  136. package/components/ExportData/ExportData.vue.js +135 -0
  137. package/components/ExportData/ExportData.vue2.js +4 -0
  138. package/components/ExportData/index.d.ts +2 -0
  139. package/components/ExportData/types.d.ts +17 -0
  140. package/components/FilePicker/FilePicker.vue.d.ts +5 -5
  141. package/components/Form/CustomFields.vue.d.ts +6 -6
  142. package/components/Form/CustomFields.vue.js +1 -1
  143. package/components/Form/Form.vue.d.ts +4 -5
  144. package/components/Form/Form.vue.js +2 -2
  145. package/components/Form/Form.vue2.js +221 -178
  146. package/components/Form/FormField.vue.d.ts +4 -3
  147. package/components/Form/FormField.vue.js +70 -62
  148. package/components/Form/FormFields.vue.d.ts +3 -1
  149. package/components/Form/FormFields.vue.js +2 -2
  150. package/components/Form/FormFields.vue2.js +105 -59
  151. package/components/GoogleLogin.vue.d.ts +2 -2
  152. package/components/Icon.vue.d.ts +2 -0
  153. package/components/Icon.vue.js +12 -11
  154. package/components/ImportData/ImportData.vue.d.ts +31 -0
  155. package/components/ImportData/ImportData.vue.js +242 -0
  156. package/components/ImportData/ImportData.vue2.js +4 -0
  157. package/components/ImportData/ImportStep1.vue.d.ts +23 -0
  158. package/components/ImportData/ImportStep1.vue.js +162 -0
  159. package/components/ImportData/ImportStep1.vue2.js +4 -0
  160. package/components/ImportData/ImportStep2.vue.d.ts +20 -0
  161. package/components/ImportData/ImportStep2.vue.js +98 -0
  162. package/components/ImportData/ImportStep2.vue2.js +4 -0
  163. package/components/ImportData/ImportStep3.vue.d.ts +6 -0
  164. package/components/ImportData/ImportStep3.vue.js +98 -0
  165. package/components/ImportData/ImportStep3.vue2.js +4 -0
  166. package/components/ImportData/ImportStep4.vue.d.ts +6 -0
  167. package/components/ImportData/ImportStep4.vue.js +139 -0
  168. package/components/ImportData/ImportStep4.vue2.js +4 -0
  169. package/components/ImportData/index.d.ts +2 -0
  170. package/components/ImportData/types.d.ts +51 -0
  171. package/components/Input.vue.d.ts +9 -9
  172. package/components/Input.vue.js +137 -120
  173. package/components/List/List.vue.d.ts +18 -0
  174. package/components/List/List.vue.js +189 -0
  175. package/components/List/List.vue2.js +4 -0
  176. package/components/List/ListFieldRow.vue.d.ts +35 -0
  177. package/components/List/ListFieldRow.vue.js +119 -0
  178. package/components/List/ListFieldRow.vue2.js +4 -0
  179. package/components/List/index.d.ts +4 -0
  180. package/components/List/types.d.ts +1 -0
  181. package/components/List/utils.d.ts +9 -0
  182. package/components/List/utils.js +64 -0
  183. package/components/Masonry/Masonry.vue.d.ts +2 -2
  184. package/components/Modal.vue.js +5 -122
  185. package/components/Modal.vue2.js +133 -2
  186. package/components/MultiSelect/MultiSelect.vue.d.ts +12 -9
  187. package/components/MultiSelect/MultiSelect.vue.js +101 -64
  188. package/components/Navbar/Navbar.vue.d.ts +48 -9
  189. package/components/Navbar/Navbar.vue.js +418 -146
  190. package/components/Navbar/NavbarItem.vue.d.ts +2 -2
  191. package/components/Navbar/NavbarTabs.vue.d.ts +21 -0
  192. package/components/Navbar/NavbarTabs.vue.js +179 -0
  193. package/components/Navbar/NavbarTabs.vue3.js +5 -0
  194. package/components/Navbar/index.d.ts +3 -0
  195. package/components/NavbarCommandPalette.vue.d.ts +48 -0
  196. package/components/NumberInput.vue.d.ts +8 -8
  197. package/components/OTPInput/OTPInput.vue.d.ts +7 -7
  198. package/components/Pagination/Pagination.vue.d.ts +1 -1
  199. package/components/PermissionMatrix/PermissionEditor.vue.d.ts +36 -0
  200. package/components/PermissionMatrix/PermissionEditor.vue.js +323 -0
  201. package/components/PermissionMatrix/PermissionEditor.vue2.js +4 -0
  202. package/components/PermissionMatrix/PermissionMatrix.vue.d.ts +15 -0
  203. package/components/PermissionMatrix/PermissionMatrix.vue.js +7 -0
  204. package/components/PermissionMatrix/PermissionMatrix.vue2.js +245 -0
  205. package/components/PermissionMatrix/index.d.ts +3 -0
  206. package/components/PermissionMatrix/types.d.ts +59 -0
  207. package/components/PricingPlan/PricingPlan.vue.d.ts +3 -3
  208. package/components/ProgressBar/ProgressBar.vue.d.ts +3 -3
  209. package/components/QRCode/QRCode.vue.d.ts +15 -0
  210. package/components/QRCode/QRCode.vue.js +38 -0
  211. package/components/QRCode/QRCode.vue2.js +4 -0
  212. package/components/QRCode/index.d.ts +1 -0
  213. package/components/Screen/Screen.vue.d.ts +232 -5
  214. package/components/Screen/Screen.vue.js +423 -271
  215. package/components/Screen/ScreenFilter.vue.d.ts +2 -2
  216. package/components/Screen/ScreenFilter.vue.js +9 -9
  217. package/components/Screen/types.d.ts +12 -0
  218. package/components/SidePanel.vue.d.ts +2 -2
  219. package/components/SidebarMenu/SidebarMenu.vue.d.ts +15 -2
  220. package/components/SidebarMenu/SidebarMenu.vue.js +117 -47
  221. package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +2 -0
  222. package/components/SidebarMenu/SidebarMenuItem.vue.js +192 -175
  223. package/components/SidebarMenu/types.d.ts +32 -5
  224. package/components/Slider.vue.d.ts +2 -2
  225. package/components/Spinner/Spinner.vue.d.ts +2 -2
  226. package/components/Stats/Stats.vue.d.ts +14 -0
  227. package/components/Stats/Stats.vue.js +307 -0
  228. package/components/Stats/Stats.vue2.js +4 -0
  229. package/components/Stats/index.d.ts +2 -0
  230. package/components/Stats/types.d.ts +32 -0
  231. package/components/Switch.vue.d.ts +2 -1
  232. package/components/Switch.vue.js +4 -2
  233. package/components/Tabes/Tabes.vue.d.ts +3 -3
  234. package/components/Tabes/Tabes.vue.js +60 -57
  235. package/components/Tabes/types.d.ts +5 -0
  236. package/components/Textarea.vue.d.ts +3 -3
  237. package/components/{Timeline.vue.d.ts → Timeline/Timeline.vue.d.ts} +23 -2
  238. package/components/Timeline/Timeline.vue.js +92 -0
  239. package/components/Timeline/TimelineIndicator.vue.d.ts +9 -0
  240. package/components/Timeline/TimelineIndicator.vue.js +68 -0
  241. package/components/Timeline/TimelineIndicator.vue2.js +4 -0
  242. package/components/Timeline/TimelineItem.vue.d.ts +56 -0
  243. package/components/Timeline/TimelineItem.vue.js +173 -0
  244. package/components/Timeline/TimelineItem.vue2.js +4 -0
  245. package/components/Timeline/index.d.ts +3 -0
  246. package/components/Tooltip.vue.d.ts +2 -2
  247. package/components/Workbook/Sheet.vue.d.ts +2 -2
  248. package/components/Workbook/Workbook.vue.d.ts +3 -3
  249. package/components/index.d.ts +62 -0
  250. package/composables/useBreadcrumb.d.ts +17 -0
  251. package/composables/useBreadcrumb.js +27 -0
  252. package/core/config.d.ts +34 -0
  253. package/core/config.js +10 -7
  254. package/core/index.js +15 -8
  255. package/index.d.ts +55 -44
  256. package/index.js +243 -200
  257. package/package.json +12 -2
  258. package/router.d.ts +2 -0
  259. package/style.css +7 -5
  260. package/types/button.d.ts +1 -1
  261. package/types/config.type.d.ts +35 -0
  262. package/types/form.type.d.ts +3 -1
  263. package/types/index.d.ts +2 -1
  264. package/types/list.type.d.ts +57 -0
  265. package/types/navbar.type.d.ts +38 -1
  266. package/types/timeline.type.d.ts +14 -4
  267. package/components/Timeline.vue.js +0 -160
  268. /package/components/{Timeline.vue2.js → Timeline/Timeline.vue2.js} +0 -0
@@ -1,33 +1,38 @@
1
- import { defineComponent as re, computed as i, ref as w, provide as K, watch as j, resolveComponent as se, openBlock as n, createElementBlock as o, normalizeClass as S, createElementVNode as b, renderSlot as k, toDisplayString as u, createCommentVNode as y, createBlock as s, unref as R, createVNode as f, resolveDynamicComponent as L, Fragment as I, mergeProps as v, withCtx as r, createTextVNode as h } from "vue";
2
- import ce from "../Input.vue.js";
3
- import m from "../Button.vue.js";
4
- import M from "../Icon.vue.js";
5
- import O from "../Modal.vue.js";
6
- import ue from "../ConfirmationModal.vue.js";
7
- import fe from "../Pagination/Pagination.vue.js";
8
- import me from "../Empty/Empty.vue.js";
9
- import ve from "./ScreenFilter.vue.js";
10
- import { usePersistentState as ge } from "../../utils/usePersistentState.js";
11
- import { $t as c } from "../../utils/i18n.js";
12
- const ye = { class: "flex flex-col w-full space-y-8" }, he = { class: "flex flex-col shrink-0" }, Be = {
1
+ import { defineComponent as De, computed as o, ref as x, provide as Z, watch as q, resolveComponent as Pe, openBlock as a, createElementBlock as c, normalizeClass as O, createElementVNode as g, renderSlot as B, toDisplayString as f, createBlock as s, withCtx as d, createVNode as u, createCommentVNode as m, unref as w, resolveDynamicComponent as z, Fragment as D, mergeProps as h, createTextVNode as p, renderList as Ie } from "vue";
2
+ import Se from "../Input.vue.js";
3
+ import v from "../Button.vue.js";
4
+ import R from "../Icon.vue.js";
5
+ import $e from "../Tooltip.vue.js";
6
+ import H from "../Modal.vue.js";
7
+ import Te from "../ConfirmationModal.vue.js";
8
+ import Ve from "../Pagination/Pagination.vue.js";
9
+ import je from "../Empty/Empty.vue.js";
10
+ import Ae from "./ScreenFilter.vue.js";
11
+ import Ee from "../Dropdown/Dropdown.vue.js";
12
+ import Oe from "../ExportData/ExportData.vue.js";
13
+ import Re from "../ImportData/ImportData.vue.js";
14
+ import { usePersistentState as Ne } from "../../utils/usePersistentState.js";
15
+ import { useVLiteConfig as Fe } from "../../core/config.js";
16
+ import { $t as r } from "../../utils/i18n.js";
17
+ const Le = { class: "flex flex-col w-full space-y-8" }, Me = { class: "flex flex-col shrink-0" }, Ue = {
13
18
  key: 0,
14
- class: "text-fs-7.5 font-bold text-foreground"
15
- }, we = {
19
+ class: "flex items-center! gap-2"
20
+ }, qe = { class: "text-fs-7.5 font-bold text-foreground" }, ze = {
16
21
  key: 0,
17
22
  class: "text-sm text-gray-700 mt-1 md:max-w-[450px]"
18
- }, be = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, ke = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, xe = {
23
+ }, He = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, Je = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, Ke = {
19
24
  key: 1,
20
25
  class: "flex items-center p-1 rounded-md border border-border shrink-0"
21
- }, Ce = ["title"], Pe = ["title"], De = {
26
+ }, Qe = ["title"], Ge = ["title"], We = {
22
27
  key: 4,
23
28
  class: "w-full md:w-60! max-sm:order-last"
24
- }, Ie = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, $e = ["href", "target"], Ve = ["href", "target"], Te = {
29
+ }, Xe = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, Ye = ["href", "target"], Ze = ["href", "target"], _e = {
25
30
  key: 1,
26
31
  class: "p-8 text-center text-muted-foreground border border-dashed border-border rounded-lg"
27
- }, Se = {
32
+ }, et = {
28
33
  key: 2,
29
34
  class: "-mt-2"
30
- }, Ke = /* @__PURE__ */ re({
35
+ }, tt = { class: "px-1 py-1 text-sm" }, nt = { class: "font-medium mb-3 text-muted-foreground" }, at = { class: "space-y-3" }, lt = { key: 4 }, Bt = /* @__PURE__ */ De({
31
36
  __name: "Screen",
32
37
  props: {
33
38
  name: { default: "" },
@@ -35,6 +40,8 @@ const ye = { class: "flex flex-col w-full space-y-8" }, he = { class: "flex flex
35
40
  titleI18n: {},
36
41
  description: {},
37
42
  descriptionI18n: {},
43
+ info: {},
44
+ infoI18n: {},
38
45
  pageInfo: {},
39
46
  data: { default: () => [] },
40
47
  loading: { type: Boolean, default: !1 },
@@ -52,6 +59,13 @@ const ye = { class: "flex flex-col w-full space-y-8" }, he = { class: "flex flex
52
59
  emptyIcon: { default: "lucide:inbox" },
53
60
  addComponent: {},
54
61
  addBtn: {},
62
+ exportSchema: { default: () => [] },
63
+ importSchema: { default: () => [] },
64
+ exportProps: { type: [Object, Boolean], default: !1 },
65
+ importProps: { type: [Object, Boolean], default: !1 },
66
+ exportMode: {},
67
+ importType: { default: "" },
68
+ exportType: {},
55
69
  list: {},
56
70
  table: {},
57
71
  customHeader: { type: Boolean, default: !1 },
@@ -65,393 +79,531 @@ const ye = { class: "flex flex-col w-full space-y-8" }, he = { class: "flex flex
65
79
  headerClass: {}
66
80
  },
67
81
  emits: ["add", "delete"],
68
- setup(e, { emit: Q }) {
69
- const a = e, z = Q, G = i(() => a.name || a.title || "default-screen"), C = ge(
70
- `view-mode-${G.value}`,
71
- a.table ? "table" : "list"
72
- ), $ = w(""), N = w({}), x = w(a.pageInfo?.currentPage || 1), V = w(a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10), B = w([]), T = w([]), P = w(!1);
73
- K("screen-selected-rows", B), K("screen-request-delete", (t) => A(t));
74
- const A = (t) => {
75
- T.value = t, P.value = !0;
76
- }, J = () => {
77
- z("delete", T.value), P.value = !1, B.value = [];
78
- }, W = (t) => {
79
- z("delete", t), B.value = [];
82
+ setup(t, { emit: _ }) {
83
+ const n = t, P = Fe(), J = _, ee = o(() => n.name || n.title || "default-screen"), I = Ne(
84
+ `view-mode-${ee.value}`,
85
+ n.table ? "table" : "list"
86
+ ), S = x(""), T = x({}), k = x(n.pageInfo?.currentPage || 1), V = x(n.pageInfo?.itemsPerPage || n.paginationProps?.itemsPerPage || 10), b = x([]), j = x([]), $ = x(!1);
87
+ Z("screen-selected-rows", b), Z("screen-request-delete", (e) => N(e));
88
+ const N = (e) => {
89
+ j.value = e, $.value = !0;
90
+ }, te = () => {
91
+ J("delete", j.value), $.value = !1, b.value = [];
92
+ }, ne = (e) => {
93
+ J("delete", e), b.value = [];
80
94
  };
81
- j(
82
- () => a.pageInfo?.currentPage,
83
- (t) => {
84
- t && (x.value = t);
95
+ q(
96
+ () => n.pageInfo?.currentPage,
97
+ (e) => {
98
+ e && (k.value = e);
85
99
  }
86
- ), j(
87
- () => a.pageInfo?.itemsPerPage,
88
- (t) => {
89
- t && (V.value = t);
100
+ ), q(
101
+ () => n.pageInfo?.itemsPerPage,
102
+ (e) => {
103
+ e && (V.value = e);
90
104
  }
91
105
  );
92
- let U = null;
93
- j($, (t) => {
94
- U && clearTimeout(U), U = setTimeout(() => {
95
- x.value = 1, D();
106
+ let F = null;
107
+ q(S, (e) => {
108
+ F && clearTimeout(F), F = setTimeout(() => {
109
+ k.value = 1, C();
96
110
  }, 300);
97
111
  });
98
- const X = (t) => {
99
- x.value = t, D();
100
- }, Y = (t) => {
101
- V.value = t, x.value = 1, D();
102
- }, D = () => {
103
- const t = {
112
+ const ae = (e) => {
113
+ k.value = e, C();
114
+ }, le = (e) => {
115
+ V.value = e, k.value = 1, C();
116
+ }, C = () => {
117
+ const e = {
104
118
  pageinfo: {
105
- page: x.value,
119
+ page: k.value,
106
120
  limit: V.value
107
121
  },
108
122
  pagination: {
109
- page: x.value,
123
+ page: k.value,
110
124
  limit: V.value
111
125
  },
112
- search: $.value,
113
- filter: N.value
126
+ search: S.value,
127
+ filter: T.value
114
128
  };
115
- a.refetch && a.refetch(t);
116
- }, q = i(() => C.value === "table" && a.table ? a.table : a.list), Z = i(() => a.data && a.data.length > 0), E = i(() => a.titleI18n ? c(a.titleI18n) : a.title), F = i(() => a.descriptionI18n ? c(a.descriptionI18n) : a.description), p = i(() => {
117
- const t = c("vlite.screen.deleteSelected");
118
- return t !== "vlite.screen.deleteSelected" ? t : "Delete Selected";
119
- }), _ = i(() => {
120
- const t = c("vlite.screen.listView");
121
- return t !== "vlite.screen.listView" ? t : "List View";
122
- }), ee = i(() => {
123
- const t = c("vlite.screen.tableView");
124
- return t !== "vlite.screen.tableView" ? t : "Table View";
125
- }), te = i(() => {
126
- const t = c("vlite.screen.refresh");
127
- return t !== "vlite.screen.refresh" ? t : "Refresh";
128
- }), ne = i(() => {
129
- const t = c("vlite.screen.searchPlaceholder");
130
- return t !== "vlite.screen.searchPlaceholder" ? t : "Search...";
131
- }), ae = i(() => {
132
- const t = c("vlite.screen.confirmDeleteTitle");
133
- return t !== "vlite.screen.confirmDeleteTitle" ? t : "Confirm Deletion";
134
- }), le = i(() => {
135
- const t = c("vlite.screen.confirmDeleteDesc", { count: T.value.length });
136
- return t !== "vlite.screen.confirmDeleteDesc" ? t : `Are you sure you want to delete the selected ${T.value.length > 1 ? "items" : "item"}?`;
137
- }), ie = i(() => {
138
- const t = c("vlite.screen.confirmDeleteBtn");
139
- return t !== "vlite.screen.confirmDeleteBtn" ? t : "Delete";
140
- }), de = i(() => {
141
- const t = c("vlite.screen.cancelBtn");
142
- return t !== "vlite.screen.cancelBtn" ? t : "Cancel";
143
- }), oe = i(() => {
144
- const t = c("vlite.screen.missingView");
145
- return t !== "vlite.screen.missingView" ? t : "Please provide a `:list` or `:table` component.";
146
- }), g = i(() => {
147
- if (a.addBtn?.labelI18n) return c(a.addBtn.labelI18n);
148
- if (a.addBtn?.label) return a.addBtn.label;
149
- const t = c("vlite.screen.addNew");
150
- return t !== "vlite.screen.addNew" ? t : "Add New";
151
- });
152
- return (t, l) => {
153
- const H = se("router-link");
154
- return n(), o("div", ye, [
155
- e.customHeader ? k(t.$slots, "custom-header", { key: 1 }) : (n(), o("div", {
129
+ n.refetch && n.refetch(e);
130
+ }, K = o(() => I.value === "table" && n.table ? n.table : n.list), oe = o(() => n.data && n.data.length > 0), Q = o(() => n.titleI18n ? r(n.titleI18n) : n.title), G = o(
131
+ () => n.descriptionI18n ? r(n.descriptionI18n) : n.description
132
+ ), ie = o(() => {
133
+ const e = r("vlite.screen.deleteSelected");
134
+ return e !== "vlite.screen.deleteSelected" ? e : "Delete Selected";
135
+ }), re = o(() => {
136
+ const e = r("vlite.screen.listView");
137
+ return e !== "vlite.screen.listView" ? e : "List View";
138
+ }), de = o(() => {
139
+ const e = r("vlite.screen.tableView");
140
+ return e !== "vlite.screen.tableView" ? e : "Table View";
141
+ }), se = o(() => {
142
+ const e = r("vlite.screen.refresh");
143
+ return e !== "vlite.screen.refresh" ? e : "Refresh";
144
+ }), ce = o(() => {
145
+ const e = r("vlite.screen.searchPlaceholder");
146
+ return e !== "vlite.screen.searchPlaceholder" ? e : "Search...";
147
+ }), ue = o(() => {
148
+ const e = r("vlite.screen.confirmDeleteTitle");
149
+ return e !== "vlite.screen.confirmDeleteTitle" ? e : "Confirm Deletion";
150
+ }), fe = o(() => {
151
+ const e = r("vlite.screen.confirmDeleteDesc", { count: j.value.length });
152
+ return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${j.value.length > 1 ? "items" : "item"}?`;
153
+ }), me = o(() => {
154
+ const e = r("vlite.screen.confirmDeleteBtn");
155
+ return e !== "vlite.screen.confirmDeleteBtn" ? e : "Delete";
156
+ }), ve = o(() => {
157
+ const e = r("vlite.screen.cancelBtn");
158
+ return e !== "vlite.screen.cancelBtn" ? e : "Cancel";
159
+ }), he = o(() => {
160
+ const e = r("vlite.screen.missingView");
161
+ return e !== "vlite.screen.missingView" ? e : "Please provide a `:list` or `:table` component.";
162
+ }), y = o(() => {
163
+ if (n.addBtn?.labelI18n) return r(n.addBtn.labelI18n);
164
+ if (n.addBtn?.label) return n.addBtn.label;
165
+ const e = r("vlite.screen.addNew");
166
+ return e !== "vlite.screen.addNew" ? e : "Add New";
167
+ }), W = o(() => {
168
+ const e = n.exportSchema && n.exportSchema.length > 0 && n.exportProps !== !1, l = n.importSchema && n.importSchema.length > 0 && n.importProps !== !1;
169
+ return e || l;
170
+ }), L = o(() => {
171
+ const e = r("vlite.screen.exportData");
172
+ return e !== "vlite.screen.exportData" ? e : "Export Data";
173
+ }), X = o(() => {
174
+ const e = r("vlite.screen.importData");
175
+ return e !== "vlite.screen.importData" ? e : "Import Data";
176
+ }), ge = o(() => {
177
+ const e = [];
178
+ return n.exportProps !== !1 && e.push({ value: "export", label: L.value, icon: "lucide:download" }), n.importProps !== !1 && e.push({ value: "import", label: X.value, icon: "lucide:upload" }), e;
179
+ }), M = x(null), xe = x(null), A = x(!1), U = x(!1), ye = (e) => {
180
+ e.value === "export" ? A.value = !0 : e.value === "import" && (U.value = !0);
181
+ }, pe = o(() => n.exportSchema ? n.exportSchema.map((e) => ({
182
+ field: e.name || e.field,
183
+ title: e.label || e.title || e.name || e.field
184
+ })) : []), we = o(() => n.importSchema ? n.importSchema.map((e) => ({
185
+ field: e.name || e.field,
186
+ title: e.label || e.title || e.name || e.field,
187
+ required: e.required || !1
188
+ })) : []), be = async (e) => P?.services?.importApi && n.importType ? await P.services.importApi(n.importType, e) : (console.warn(
189
+ "VLite Screen: No importApi configured or no importType provided for generic import."
190
+ ), {
191
+ processed: e.data.length,
192
+ created: e.data.length,
193
+ updated: 0,
194
+ skipped: 0,
195
+ failed: 0,
196
+ errors: []
197
+ }), Be = () => {
198
+ C();
199
+ }, ke = o(() => n.exportMode || P?.exportData?.mode || "frontend"), Ce = async (e) => {
200
+ if (P?.services?.exportApi && n.exportType) {
201
+ const l = {
202
+ format: e,
203
+ search: S.value,
204
+ filter: T.value
205
+ };
206
+ await P.services.exportApi(n.exportType, l);
207
+ } else
208
+ console.warn(
209
+ "VLite Screen: No exportApi configured or no exportType provided for generic backend export."
210
+ );
211
+ };
212
+ return (e, l) => {
213
+ const Y = Pe("router-link");
214
+ return a(), c("div", Le, [
215
+ t.customHeader ? B(e.$slots, "custom-header", { key: 1 }) : (a(), c("div", {
156
216
  key: 0,
157
- class: S([e.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
217
+ class: O([t.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
158
218
  }, [
159
- b("div", he, [
160
- k(t.$slots, "title", {}, () => [
161
- E.value ? (n(), o("h1", Be, u(E.value), 1)) : y("", !0)
219
+ g("div", Me, [
220
+ B(e.$slots, "title", {}, () => [
221
+ Q.value ? (a(), c("div", Ue, [
222
+ g("h1", qe, f(Q.value), 1),
223
+ t.info || t.infoI18n ? (a(), s($e, {
224
+ key: 0,
225
+ content: t.info,
226
+ "content-i18n": t.infoI18n
227
+ }, {
228
+ default: d(() => [
229
+ u(R, {
230
+ icon: "lucide:info",
231
+ class: "w-[18px] h-[18px] mt-3! text-muted-foreground hover:text-foreground cursor-pointer transition-colors outline-none"
232
+ })
233
+ ]),
234
+ _: 1
235
+ }, 8, ["content", "content-i18n"])) : m("", !0)
236
+ ])) : m("", !0)
162
237
  ]),
163
- k(t.$slots, "description", {}, () => [
164
- F.value ? (n(), o("p", we, u(F.value), 1)) : y("", !0)
238
+ B(e.$slots, "description", {}, () => [
239
+ G.value ? (a(), c("p", ze, f(G.value), 1)) : m("", !0)
165
240
  ])
166
241
  ]),
167
- b("div", be, [
168
- b("div", ke, [
169
- B.value.length > 0 ? (n(), s(m, {
242
+ g("div", He, [
243
+ g("div", Je, [
244
+ b.value.length > 0 ? (a(), s(v, {
170
245
  key: 0,
171
246
  variant: "outline",
172
247
  class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
173
248
  icon: "lucide:trash-2",
174
- title: p.value,
175
- onClick: l[0] || (l[0] = (d) => A(B.value))
176
- }, null, 8, ["title"])) : y("", !0),
177
- e.table && e.list ? (n(), o("div", xe, [
178
- b("button", {
179
- onClick: l[1] || (l[1] = (d) => C.value = "list"),
180
- class: S(["p-1.5 rounded", [
181
- R(C) === "list" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
249
+ title: ie.value,
250
+ onClick: l[0] || (l[0] = (i) => N(b.value))
251
+ }, null, 8, ["title"])) : m("", !0),
252
+ t.table && t.list ? (a(), c("div", Ke, [
253
+ g("button", {
254
+ onClick: l[1] || (l[1] = (i) => I.value = "list"),
255
+ class: O(["p-1.5 rounded", [
256
+ w(I) === "list" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
182
257
  ]]),
183
- title: _.value
258
+ title: re.value
184
259
  }, [
185
- f(M, {
260
+ u(R, {
186
261
  icon: "lucide:layout-grid",
187
262
  class: "w-4 h-4"
188
263
  })
189
- ], 10, Ce),
190
- b("button", {
191
- onClick: l[2] || (l[2] = (d) => C.value = "table"),
192
- class: S(["p-1.5 rounded", [
193
- R(C) === "table" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
264
+ ], 10, Qe),
265
+ g("button", {
266
+ onClick: l[2] || (l[2] = (i) => I.value = "table"),
267
+ class: O(["p-1.5 rounded", [
268
+ w(I) === "table" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
194
269
  ]]),
195
- title: ee.value
270
+ title: de.value
196
271
  }, [
197
- f(M, {
272
+ u(R, {
198
273
  icon: "lucide:list",
199
274
  class: "w-4 h-4"
200
275
  })
201
- ], 10, Pe)
202
- ])) : y("", !0),
203
- k(t.$slots, "before-search"),
204
- e.showRefresh ? (n(), s(m, {
276
+ ], 10, Ge)
277
+ ])) : m("", !0),
278
+ B(e.$slots, "before-search"),
279
+ t.showRefresh ? (a(), s(v, {
205
280
  key: 2,
206
281
  variant: "outline",
207
282
  icon: "lucide:refresh-cw",
208
283
  size: "lg",
209
284
  class: "shrink-0 h-9! w-9!",
210
- title: te.value,
211
- disabled: e.loading,
212
- onClick: D
213
- }, null, 8, ["title", "disabled"])) : y("", !0),
214
- e.filterSchema && e.filterSchema.length > 0 ? (n(), s(ve, {
285
+ title: se.value,
286
+ disabled: t.loading,
287
+ onClick: C
288
+ }, null, 8, ["title", "disabled"])) : m("", !0),
289
+ t.filterSchema && t.filterSchema.length > 0 ? (a(), s(Ae, {
215
290
  key: 3,
216
- schema: e.filterSchema,
217
- type: e.filterType,
218
- modelValue: N.value,
219
- "onUpdate:modelValue": l[3] || (l[3] = (d) => N.value = d),
220
- onChange: D
221
- }, null, 8, ["schema", "type", "modelValue"])) : y("", !0),
222
- e.canSearch ? (n(), o("div", De, [
223
- f(ce, {
291
+ schema: t.filterSchema,
292
+ type: t.filterType,
293
+ modelValue: T.value,
294
+ "onUpdate:modelValue": l[3] || (l[3] = (i) => T.value = i),
295
+ onChange: C
296
+ }, null, 8, ["schema", "type", "modelValue"])) : m("", !0),
297
+ t.canSearch ? (a(), c("div", We, [
298
+ u(Se, {
224
299
  lazy: "",
225
- modelValue: $.value,
226
- "onUpdate:modelValue": l[4] || (l[4] = (d) => $.value = d),
300
+ modelValue: S.value,
301
+ "onUpdate:modelValue": l[4] || (l[4] = (i) => S.value = i),
227
302
  icon: "lucide:search",
228
- placeholder: ne.value,
303
+ placeholder: ce.value,
229
304
  variant: "outline",
230
305
  class: "bg-background w-full",
231
306
  "show-clear-button": !0
232
307
  }, null, 8, ["modelValue", "placeholder"])
233
- ])) : y("", !0)
308
+ ])) : m("", !0)
234
309
  ]),
235
- b("div", Ie, [
236
- k(t.$slots, "actions", {}, () => [
237
- e.addComponent ? (n(), s(L(e.addComponent), { key: 0 })) : e.canAdd ? (n(), o(I, { key: 1 }, [
238
- e.addBtn ? (n(), o(I, { key: 0 }, [
239
- e.addBtn.modal ? (n(), s(O, v({
310
+ g("div", Xe, [
311
+ B(e.$slots, "actions", {}, () => [
312
+ t.addComponent ? (a(), s(z(t.addComponent), { key: 0 })) : t.canAdd ? (a(), c(D, { key: 1 }, [
313
+ t.addBtn ? (a(), c(D, { key: 0 }, [
314
+ t.addBtn.modal ? (a(), s(H, h({
240
315
  key: 0,
241
- body: e.addBtn.modal
242
- }, e.addBtn.modalProps, {
243
- refetch: e.refetch,
244
- data: e.data,
316
+ body: t.addBtn.modal
317
+ }, t.addBtn.modalProps, {
318
+ refetch: t.refetch,
319
+ data: t.data,
245
320
  triggerClass: "w-full",
246
- loading: e.loading
321
+ loading: t.loading
247
322
  }), {
248
- trigger: r(() => [
249
- f(m, v({
323
+ trigger: d(() => [
324
+ u(v, h({
250
325
  class: "w-full",
251
- icon: e.addBtn.icon || "fluent:add-16-filled",
252
- variant: e.addBtn.variant || "primary"
253
- }, e.addBtn.buttonProps), {
254
- default: r(() => [
255
- h(u(g.value), 1)
326
+ icon: t.addBtn.icon || "fluent:add-16-filled",
327
+ variant: t.addBtn.variant || "primary"
328
+ }, t.addBtn.buttonProps), {
329
+ default: d(() => [
330
+ p(f(y.value), 1)
256
331
  ]),
257
332
  _: 1
258
333
  }, 16, ["icon", "variant"])
259
334
  ]),
260
335
  _: 1
261
- }, 16, ["body", "refetch", "data", "loading"])) : e.addBtn.to ? (n(), s(H, {
336
+ }, 16, ["body", "refetch", "data", "loading"])) : t.addBtn.to ? (a(), s(Y, {
262
337
  key: 1,
263
- to: e.addBtn.to,
338
+ to: t.addBtn.to,
264
339
  class: "inline-flex w-full sm:w-auto"
265
340
  }, {
266
- default: r(() => [
267
- f(m, v({
341
+ default: d(() => [
342
+ u(v, h({
268
343
  class: "w-full",
269
- icon: e.addBtn.icon || "fluent:add-16-filled",
270
- variant: e.addBtn.variant || "primary"
271
- }, e.addBtn.buttonProps), {
272
- default: r(() => [
273
- h(u(g.value), 1)
344
+ icon: t.addBtn.icon || "fluent:add-16-filled",
345
+ variant: t.addBtn.variant || "primary"
346
+ }, t.addBtn.buttonProps), {
347
+ default: d(() => [
348
+ p(f(y.value), 1)
274
349
  ]),
275
350
  _: 1
276
351
  }, 16, ["icon", "variant"])
277
352
  ]),
278
353
  _: 1
279
- }, 8, ["to"])) : e.addBtn.href ? (n(), o("a", {
354
+ }, 8, ["to"])) : t.addBtn.href ? (a(), c("a", {
280
355
  key: 2,
281
- href: e.addBtn.href,
282
- target: e.addBtn.target,
356
+ href: t.addBtn.href,
357
+ target: t.addBtn.target,
283
358
  class: "inline-flex w-full sm:w-auto"
284
359
  }, [
285
- f(m, v({
360
+ u(v, h({
286
361
  class: "w-full",
287
- icon: e.addBtn.icon || "fluent:add-16-filled",
288
- variant: e.addBtn.variant || "primary"
289
- }, e.addBtn.buttonProps), {
290
- default: r(() => [
291
- h(u(g.value), 1)
362
+ icon: t.addBtn.icon || "fluent:add-16-filled",
363
+ variant: t.addBtn.variant || "primary"
364
+ }, t.addBtn.buttonProps), {
365
+ default: d(() => [
366
+ p(f(y.value), 1)
292
367
  ]),
293
368
  _: 1
294
369
  }, 16, ["icon", "variant"])
295
- ], 8, $e)) : (n(), s(m, v({
370
+ ], 8, Ye)) : (a(), s(v, h({
296
371
  key: 3,
297
372
  class: "w-full sm:w-auto",
298
- icon: e.addBtn.icon || "fluent:add-16-filled",
299
- variant: e.addBtn.variant || "primary"
300
- }, e.addBtn.buttonProps, {
301
- onClick: l[5] || (l[5] = (d) => e.addBtn.onClick ? e.addBtn.onClick() : t.$emit("add"))
373
+ icon: t.addBtn.icon || "fluent:add-16-filled",
374
+ variant: t.addBtn.variant || "primary"
375
+ }, t.addBtn.buttonProps, {
376
+ onClick: l[5] || (l[5] = (i) => t.addBtn.onClick ? t.addBtn.onClick() : e.$emit("add"))
302
377
  }), {
303
- default: r(() => [
304
- h(u(g.value), 1)
378
+ default: d(() => [
379
+ p(f(y.value), 1)
305
380
  ]),
306
381
  _: 1
307
382
  }, 16, ["icon", "variant"]))
308
- ], 64)) : (n(), s(m, {
383
+ ], 64)) : (a(), s(v, {
309
384
  key: 1,
310
385
  class: "w-full sm:w-auto",
311
386
  icon: "fluent:add-16-filled",
312
387
  variant: "primary",
313
- onClick: l[6] || (l[6] = (d) => t.$emit("add"))
388
+ onClick: l[6] || (l[6] = (i) => e.$emit("add"))
314
389
  }, {
315
- default: r(() => [
316
- h(u(g.value), 1)
390
+ default: d(() => [
391
+ p(f(y.value), 1)
317
392
  ]),
318
393
  _: 1
319
394
  }))
320
- ], 64)) : y("", !0)
395
+ ], 64)) : m("", !0)
321
396
  ]),
322
- k(t.$slots, "after-add")
397
+ W.value ? (a(), s(Ee, {
398
+ key: 0,
399
+ closeOnSelect: "",
400
+ position: "bottom-end",
401
+ options: ge.value,
402
+ onOnSelect: ye
403
+ }, {
404
+ trigger: d(() => [
405
+ u(v, {
406
+ variant: "outline",
407
+ icon: "lucide:more-vertical",
408
+ class: "px-2!",
409
+ title: w(r)("vlite.screen.moreOptions") !== "vlite.screen.moreOptions" ? w(r)("vlite.screen.moreOptions") : "More Options"
410
+ }, null, 8, ["title"])
411
+ ]),
412
+ _: 1
413
+ }, 8, ["options"])) : m("", !0),
414
+ B(e.$slots, "after-add")
323
415
  ])
324
416
  ])
325
417
  ], 2)),
326
- b("div", {
327
- class: S(["flex-1 w-full relative min-h-[300px]", e.containerClass])
418
+ g("div", {
419
+ class: O(["flex-1 w-full relative min-h-[300px]", t.containerClass])
328
420
  }, [
329
- !Z.value && !e.loading ? k(t.$slots, "empty", { key: 0 }, () => [
330
- f(R(me), {
331
- title: e.emptyTitle,
332
- titleI18n: e.emptyTitleI18n,
333
- description: e.emptyDescription,
334
- descriptionI18n: e.emptyDescriptionI18n,
335
- icon: e.emptyIcon
421
+ !oe.value && !t.loading ? B(e.$slots, "empty", { key: 0 }, () => [
422
+ u(w(je), {
423
+ title: t.emptyTitle,
424
+ titleI18n: t.emptyTitleI18n,
425
+ description: t.emptyDescription,
426
+ descriptionI18n: t.emptyDescriptionI18n,
427
+ icon: t.emptyIcon
336
428
  }, {
337
- action: r(() => [
338
- e.addComponent ? (n(), s(L(e.addComponent), { key: 0 })) : e.canAdd ? (n(), o(I, { key: 1 }, [
339
- e.addBtn ? (n(), o(I, { key: 0 }, [
340
- e.addBtn.modal ? (n(), s(O, v({
429
+ action: d(() => [
430
+ t.addComponent ? (a(), s(z(t.addComponent), { key: 0 })) : t.canAdd ? (a(), c(D, { key: 1 }, [
431
+ t.addBtn ? (a(), c(D, { key: 0 }, [
432
+ t.addBtn.modal ? (a(), s(H, h({
341
433
  key: 0,
342
- body: e.addBtn.modal
343
- }, e.addBtn.modalProps), {
344
- trigger: r(() => [
345
- f(m, v({
346
- icon: e.addBtn.icon || "fluent:add-16-filled",
347
- variant: e.addBtn.variant || "primary",
434
+ body: t.addBtn.modal
435
+ }, t.addBtn.modalProps), {
436
+ trigger: d(() => [
437
+ u(v, h({
438
+ icon: t.addBtn.icon || "fluent:add-16-filled",
439
+ variant: t.addBtn.variant || "primary",
348
440
  rounded: "full",
349
441
  class: "px-6!"
350
- }, e.addBtn.buttonProps), {
351
- default: r(() => [
352
- h(u(g.value), 1)
442
+ }, t.addBtn.buttonProps), {
443
+ default: d(() => [
444
+ p(f(y.value), 1)
353
445
  ]),
354
446
  _: 1
355
447
  }, 16, ["icon", "variant"])
356
448
  ]),
357
449
  _: 1
358
- }, 16, ["body"])) : e.addBtn.to ? (n(), s(H, {
450
+ }, 16, ["body"])) : t.addBtn.to ? (a(), s(Y, {
359
451
  key: 1,
360
- to: e.addBtn.to,
452
+ to: t.addBtn.to,
361
453
  class: "inline-flex"
362
454
  }, {
363
- default: r(() => [
364
- f(m, v({
365
- icon: e.addBtn.icon || "fluent:add-16-filled",
366
- variant: e.addBtn.variant || "outline"
367
- }, e.addBtn.buttonProps), {
368
- default: r(() => [
369
- h(u(g.value), 1)
455
+ default: d(() => [
456
+ u(v, h({
457
+ icon: t.addBtn.icon || "fluent:add-16-filled",
458
+ variant: t.addBtn.variant || "outline"
459
+ }, t.addBtn.buttonProps), {
460
+ default: d(() => [
461
+ p(f(y.value), 1)
370
462
  ]),
371
463
  _: 1
372
464
  }, 16, ["icon", "variant"])
373
465
  ]),
374
466
  _: 1
375
- }, 8, ["to"])) : e.addBtn.href ? (n(), o("a", {
467
+ }, 8, ["to"])) : t.addBtn.href ? (a(), c("a", {
376
468
  key: 2,
377
- href: e.addBtn.href,
378
- target: e.addBtn.target,
469
+ href: t.addBtn.href,
470
+ target: t.addBtn.target,
379
471
  class: "inline-flex"
380
472
  }, [
381
- f(m, v({
382
- icon: e.addBtn.icon || "lucide:plus",
383
- variant: e.addBtn.variant || "outline"
384
- }, e.addBtn.buttonProps), {
385
- default: r(() => [
386
- h(u(g.value), 1)
473
+ u(v, h({
474
+ icon: t.addBtn.icon || "lucide:plus",
475
+ variant: t.addBtn.variant || "outline"
476
+ }, t.addBtn.buttonProps), {
477
+ default: d(() => [
478
+ p(f(y.value), 1)
387
479
  ]),
388
480
  _: 1
389
481
  }, 16, ["icon", "variant"])
390
- ], 8, Ve)) : (n(), s(m, v({
482
+ ], 8, Ze)) : (a(), s(v, h({
391
483
  key: 3,
392
- icon: e.addBtn.icon || "lucide:plus",
393
- variant: e.addBtn.variant || "outline"
394
- }, e.addBtn.buttonProps, {
395
- onClick: l[7] || (l[7] = (d) => e.addBtn.onClick ? e.addBtn.onClick() : t.$emit("add"))
484
+ icon: t.addBtn.icon || "lucide:plus",
485
+ variant: t.addBtn.variant || "outline"
486
+ }, t.addBtn.buttonProps, {
487
+ onClick: l[7] || (l[7] = (i) => t.addBtn.onClick ? t.addBtn.onClick() : e.$emit("add"))
396
488
  }), {
397
- default: r(() => [
398
- h(u(g.value), 1)
489
+ default: d(() => [
490
+ p(f(y.value), 1)
399
491
  ]),
400
492
  _: 1
401
493
  }, 16, ["icon", "variant"]))
402
- ], 64)) : (n(), s(m, {
494
+ ], 64)) : (a(), s(v, {
403
495
  key: 1,
404
496
  icon: "lucide:plus",
405
497
  variant: "outline",
406
- onClick: l[8] || (l[8] = (d) => t.$emit("add"))
498
+ onClick: l[8] || (l[8] = (i) => e.$emit("add"))
407
499
  }, {
408
- default: r(() => [
409
- h(u(g.value), 1)
500
+ default: d(() => [
501
+ p(f(y.value), 1)
410
502
  ]),
411
503
  _: 1
412
504
  }))
413
- ], 64)) : y("", !0)
505
+ ], 64)) : m("", !0)
414
506
  ]),
415
507
  _: 1
416
508
  }, 8, ["title", "titleI18n", "description", "descriptionI18n", "icon"])
417
- ]) : (n(), o(I, { key: 1 }, [
418
- q.value ? (n(), s(L(q.value), {
509
+ ]) : (a(), c(D, { key: 1 }, [
510
+ K.value ? (a(), s(z(K.value), {
419
511
  key: 0,
420
- data: e.data,
421
- loading: e.loading,
422
- refetch: e.refetch,
423
- selectedRows: B.value,
424
- "onUpdate:selectedRows": l[9] || (l[9] = (d) => B.value = d),
425
- delete: A,
426
- onDelete: W
427
- }, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (n(), o("div", Te, u(oe.value), 1))
512
+ data: t.data,
513
+ loading: t.loading,
514
+ refetch: t.refetch,
515
+ selectedRows: b.value,
516
+ "onUpdate:selectedRows": l[9] || (l[9] = (i) => b.value = i),
517
+ delete: N,
518
+ onDelete: ne
519
+ }, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (a(), c("div", _e, f(he.value), 1))
428
520
  ], 64))
429
521
  ], 2),
430
- e.pagination && e.pageInfo && e.pageInfo.totalPages > 1 ? (n(), o("div", Se, [
431
- f(R(fe), v({
432
- "current-page": e.pageInfo.currentPage,
433
- "total-pages": e.pageInfo.totalPages,
434
- "total-items": e.pageInfo.totalItems
435
- }, e.paginationProps, {
436
- onChange: X,
437
- "onUpdate:itemsPerPage": Y
522
+ t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (a(), c("div", et, [
523
+ u(w(Ve), h({
524
+ "current-page": t.pageInfo.currentPage,
525
+ "total-pages": t.pageInfo.totalPages,
526
+ "total-items": t.pageInfo.totalItems
527
+ }, t.paginationProps, {
528
+ onChange: ae,
529
+ "onUpdate:itemsPerPage": le
438
530
  }), null, 16, ["current-page", "total-pages", "total-items"])
439
- ])) : y("", !0),
440
- f(ue, {
441
- show: P.value,
442
- "onUpdate:show": l[10] || (l[10] = (d) => P.value = d),
443
- title: ae.value,
444
- description: le.value,
445
- "confirm-text": ie.value,
446
- "cancel-text": de.value,
531
+ ])) : m("", !0),
532
+ u(Te, {
533
+ show: $.value,
534
+ "onUpdate:show": l[10] || (l[10] = (i) => $.value = i),
535
+ title: ue.value,
536
+ description: fe.value,
537
+ "confirm-text": me.value,
538
+ "cancel-text": ve.value,
447
539
  variant: "danger",
448
- onConfirm: J,
449
- onCancel: l[11] || (l[11] = (d) => P.value = !1)
450
- }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"])
540
+ onConfirm: te,
541
+ onCancel: l[11] || (l[11] = (i) => $.value = !1)
542
+ }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"]),
543
+ A.value ? (a(), s(H, {
544
+ key: 3,
545
+ show: A.value,
546
+ "onUpdate:show": l[12] || (l[12] = (i) => A.value = i),
547
+ title: L.value,
548
+ "max-width": "sm:max-w-[400px]"
549
+ }, {
550
+ default: d(({ close: i }) => [
551
+ u(Oe, h({
552
+ ref_key: "exportDataRef",
553
+ ref: M,
554
+ data: t.data || [],
555
+ fields: pe.value,
556
+ mode: ke.value,
557
+ "on-export": Ce
558
+ }, typeof t.exportProps == "object" ? t.exportProps : {}, {
559
+ title: L.value,
560
+ class: "hidden!"
561
+ }), null, 16, ["data", "fields", "mode", "title"]),
562
+ g("div", tt, [
563
+ g("h6", nt, f(w(r)("vlite.exportData.selectFormat") !== "vlite.exportData.selectFormat" ? w(r)("vlite.exportData.selectFormat") : "Select Export Format"), 1),
564
+ g("div", at, [
565
+ (a(!0), c(D, null, Ie(M.value?.availableFormats || [
566
+ { value: "excel", label: "Excel (.xlsx)", icon: "lucide:file-spreadsheet" },
567
+ { value: "csv", label: "CSV (.csv)", icon: "lucide:file-text" },
568
+ { value: "json", label: "JSON (.json)", icon: "lucide:file-json" }
569
+ ], (E) => (a(), s(v, {
570
+ key: E.value,
571
+ variant: "outline",
572
+ class: "w-full flex items-center justify-start gap-3 h-12",
573
+ onClick: (ot) => M.value?.exportData(E.value, i)
574
+ }, {
575
+ default: d(() => [
576
+ u(R, {
577
+ icon: E.icon,
578
+ class: "text-muted-foreground h-5 w-5"
579
+ }, null, 8, ["icon"]),
580
+ g("span", null, f(E.label), 1)
581
+ ]),
582
+ _: 2
583
+ }, 1032, ["onClick"]))), 128))
584
+ ])
585
+ ])
586
+ ]),
587
+ _: 1
588
+ }, 8, ["show", "title"])) : m("", !0),
589
+ W.value ? (a(), c("div", lt, [
590
+ u(Re, h({
591
+ show: U.value,
592
+ "onUpdate:show": l[13] || (l[13] = (i) => U.value = i),
593
+ ref_key: "importDataRef",
594
+ ref: xe,
595
+ fields: we.value,
596
+ processBatch: be,
597
+ onComplete: Be
598
+ }, typeof t.importProps == "object" ? t.importProps : {}, {
599
+ title: X.value,
600
+ class: "hidden!"
601
+ }), null, 16, ["show", "fields", "title"])
602
+ ])) : m("", !0)
451
603
  ]);
452
604
  };
453
605
  }
454
606
  });
455
607
  export {
456
- Ke as default
608
+ Bt as default
457
609
  };