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,34 +1,33 @@
1
- import { defineComponent as W, inject as X, computed as d, ref as Y, watch as Z, openBlock as s, createElementBlock as o, withModifiers as _, normalizeClass as h, createVNode as x, createCommentVNode as c, unref as t, Fragment as ee, renderList as te, createElementVNode as U, toDisplayString as k, renderSlot as ae, createBlock as p, mergeProps as ie } from "vue";
2
- import { useForm as le } from "./composables/useForm.js";
3
- import D from "./FormFields.vue.js";
4
- import A from "../Button.vue.js";
5
- import se from "../Timeline.vue.js";
6
- const ne = {
7
- key: 0,
8
- class: "form-timeline mb-18"
9
- }, oe = {
1
+ import { defineComponent as se, inject as le, computed as n, ref as oe, watch as $, onUnmounted as ne, openBlock as o, createElementBlock as u, withModifiers as re, normalizeClass as g, createVNode as V, unref as a, createCommentVNode as d, Fragment as ue, renderList as de, createElementVNode as p, toDisplayString as N, renderSlot as ce, createBlock as S, mergeProps as j } from "vue";
2
+ import { useForm as me } from "./composables/useForm.js";
3
+ import H from "./FormFields.vue.js";
4
+ import C from "../Button.vue.js";
5
+ import ve from "../Timeline/Timeline.vue.js";
6
+ import "@iconify/vue";
7
+ import { useVLiteConfig as fe } from "../../core/config.js";
8
+ const ge = {
10
9
  key: 1,
11
10
  class: "form-fields-single"
12
- }, re = {
11
+ }, he = {
13
12
  key: 2,
14
13
  class: "form-groups space-y-6"
15
- }, de = { class: "text-base font-semibold text-foreground" }, ue = {
14
+ }, be = { class: "text-base font-semibold text-foreground" }, ye = {
16
15
  key: 0,
17
16
  class: "text-sm text-muted-foreground mt-1"
18
- }, ce = { class: "form-group-body p-6" }, me = {
17
+ }, pe = { class: "form-group-body p-6" }, Se = {
19
18
  key: 3,
20
19
  class: "form-step"
21
- }, ve = { class: "text-lg font-semibold text-foreground" }, fe = {
20
+ }, Ce = { class: "text-lg font-semibold text-foreground" }, ke = {
22
21
  key: 0,
23
22
  class: "text-sm text-muted-foreground mt-1"
24
- }, ke = /* @__PURE__ */ W({
23
+ }, Fe = { class: "flex items-center gap-3" }, xe = { class: "flex items-center gap-3 ml-auto" }, qe = /* @__PURE__ */ se({
25
24
  __name: "Form",
26
25
  props: {
27
26
  schema: {},
28
27
  values: { default: () => ({}) },
29
- variant: { default: "outline" },
30
- size: { default: "md" },
31
- rounded: { default: "md" },
28
+ variant: {},
29
+ size: {},
30
+ rounded: {},
32
31
  loading: { type: Boolean, default: !1 },
33
32
  footer: { type: Boolean, default: !0 },
34
33
  groupsHeadings: { default: () => [] },
@@ -45,208 +44,252 @@ const ne = {
45
44
  groupClass: { default: "" },
46
45
  headerClass: { default: "" },
47
46
  footerClass: { default: "" },
48
- timelineTextPosition: { default: "bottom" },
49
- emitFields: { default: () => ["__typename"] }
47
+ timelineTextPosition: { default: "right" },
48
+ emitFields: { default: () => ["__typename"] },
49
+ showRequiredAsterisk: { type: Boolean }
50
50
  },
51
51
  emits: ["onSubmit", "onCancel", "onStepChange", "onAddonAction"],
52
- setup(e, { emit: M }) {
53
- const l = e, m = M, f = X("modal-context", null), G = d(() => l.showCancel || !!f), $ = d(() => !!f), b = d(() => !l.schema || l.schema.length === 0 ? !1 : Array.isArray(l.schema[0])), r = d(() => l.tabs && l.tabs.length > 0 && b.value), i = Y(0), w = d(() => l.tabs ? l.tabs.map((n, a) => ({
54
- id: n.id?.toString() || a.toString(),
55
- title: n.title,
56
- icon: n.icon,
57
- description: n.description,
58
- status: a < i.value ? "completed" : a === i.value ? "current" : "upcoming"
59
- })) : []), g = d(() => b.value ? l.schema : [l.schema]), P = d(() => r.value ? g.value[i.value] || [] : []), {
60
- formValues: y,
61
- errors: F,
62
- isSubmitting: N,
63
- handleFieldChange: j,
64
- validateField: E,
65
- validateAll: he,
66
- isFieldVisible: S,
67
- isFieldDisabled: C,
68
- isFieldReadonly: V,
69
- getFieldValue: be,
70
- handleSubmit: L,
71
- flatSchema: ge
72
- } = le({
73
- schema: l.schema,
74
- values: l.values,
75
- isUpdate: l.isUpdate,
76
- folderId: l.folderId,
77
- emitFields: l.emitFields,
78
- onSubmit: (n) => {
79
- m("onSubmit", n, f?.close);
52
+ setup(e, { emit: I }) {
53
+ const t = e, m = I, v = le(
54
+ "modal-context",
55
+ null
56
+ ), J = fe(), k = n(() => J?.components?.form || {}), U = n(() => t.variant ?? k.value.variant ?? "outline"), z = n(() => t.size ?? k.value.size ?? "md"), P = n(() => t.rounded ?? k.value.rounded ?? "md"), D = n(
57
+ () => t.showRequiredAsterisk ?? k.value.showRequiredAsterisk ?? !0
58
+ ), K = n(() => t.showCancel || !!v), O = n(() => !!v), F = n(() => !t.schema || t.schema.length === 0 ? !1 : Array.isArray(t.schema[0])), r = n(() => t.tabs && t.tabs.length > 0 && F.value), s = oe(0), M = n(() => t.tabs ? t.tabs.map((l, i) => ({
59
+ id: l.id?.toString() || i.toString(),
60
+ title: l.title,
61
+ icon: l.icon,
62
+ description: l.description,
63
+ status: i < s.value ? "completed" : i === s.value ? "current" : "upcoming"
64
+ })) : []), h = n(() => F.value ? t.schema : [t.schema]), E = n(() => r.value ? h.value[s.value] || [] : []), {
65
+ formValues: x,
66
+ errors: b,
67
+ isSubmitting: y,
68
+ handleFieldChange: Q,
69
+ validateField: W,
70
+ validateAll: X,
71
+ isFieldVisible: A,
72
+ isFieldDisabled: w,
73
+ isFieldReadonly: q,
74
+ getFieldValue: Ae,
75
+ handleSubmit: Y,
76
+ flatSchema: we
77
+ } = me({
78
+ schema: t.schema,
79
+ values: t.values,
80
+ isUpdate: t.isUpdate,
81
+ folderId: t.folderId,
82
+ emitFields: t.emitFields,
83
+ onSubmit: (l) => {
84
+ m("onSubmit", l, v?.close || (() => {
85
+ }));
80
86
  }
81
87
  });
82
- Z(
83
- () => l.values,
84
- (n) => {
88
+ $(
89
+ () => t.loading || y.value,
90
+ (l) => {
91
+ v?.setSubmitting && v.setSubmitting(l);
92
+ },
93
+ { immediate: !0 }
94
+ ), ne(() => {
95
+ v?.setSubmitting && v.setSubmitting(!1);
96
+ }), $(
97
+ () => t.values,
98
+ (l) => {
85
99
  },
86
100
  { deep: !0 }
87
101
  );
88
- const z = (n, a) => {
89
- j(n, a.value, a.data);
90
- }, q = () => {
102
+ const T = (l, i) => {
103
+ Q(l, i.value, i.data);
104
+ }, Z = () => {
91
105
  if (!r.value) return !0;
92
- const n = P.value;
93
- let a = !0;
94
- for (const u of n) {
95
- if (!S(u) || C(u)) continue;
96
- E(u) && (a = !1);
106
+ const l = E.value;
107
+ let i = !0;
108
+ for (const c of l) {
109
+ if (!A(c) || w(c)) continue;
110
+ W(c) && (i = !1);
97
111
  }
98
- return a;
99
- }, I = d(() => r.value ? i.value < g.value.length - 1 : !1), R = d(() => r.value ? i.value > 0 : !1), B = d(() => r.value ? i.value === g.value.length - 1 : !0), T = () => {
100
- I.value && q() && (i.value++, m("onStepChange", i.value));
101
- }, J = () => {
102
- R.value && (i.value--, m("onStepChange", i.value));
103
- }, K = (n, a) => {
104
- a <= i.value && (i.value = a, m("onStepChange", i.value));
105
- }, H = async () => {
106
- if (r.value && !B.value) {
107
- T();
108
- return;
112
+ return i;
113
+ }, _ = n(() => r.value ? s.value < h.value.length - 1 : !1), G = n(() => r.value ? s.value > 0 : !1), R = n(() => r.value ? s.value === h.value.length - 1 : !0), L = () => {
114
+ _.value && Z() && (s.value++, m("onStepChange", s.value));
115
+ }, ee = () => {
116
+ G.value && (s.value--, m("onStepChange", s.value));
117
+ }, te = (l, i) => {
118
+ i <= s.value && (s.value = i, m("onStepChange", s.value));
119
+ }, B = async () => {
120
+ if (r.value) {
121
+ if (!R.value && !t.isUpdate) {
122
+ L();
123
+ return;
124
+ }
125
+ if (!X()) {
126
+ const i = h.value.findIndex(
127
+ (c) => c.some((f) => !!b.value[f.name])
128
+ );
129
+ i !== -1 && i !== s.value && (s.value = i, m("onStepChange", s.value));
130
+ return;
131
+ }
109
132
  }
110
133
  try {
111
- await L();
134
+ await Y();
112
135
  } catch {
113
136
  }
114
- }, O = () => {
115
- m("onCancel"), f && f?.close?.();
137
+ }, ie = () => {
138
+ m("onCancel"), v && v?.close?.();
116
139
  };
117
- return (n, a) => (s(), o("form", {
118
- class: h(["form-container", l.class]),
119
- onSubmit: _(H, ["prevent"])
140
+ return (l, i) => (o(), u("form", {
141
+ class: g(["form-container", t.class]),
142
+ onSubmit: re(B, ["prevent"])
120
143
  }, [
121
- r.value && w.value.length > 0 ? (s(), o("div", ne, [
122
- x(se, {
123
- steps: w.value,
124
- activeStep: i.value,
144
+ r.value && M.value.length > 0 ? (o(), u("div", {
145
+ key: 0,
146
+ class: g(["form-timeline", e.timelineTextPosition == "right" ? "mb-6.5" : "mb-13"])
147
+ }, [
148
+ V(a(ve), {
149
+ steps: M.value,
150
+ activeStep: s.value,
125
151
  direction: "horizontal",
126
152
  textPosition: e.timelineTextPosition,
127
153
  clickable: !0,
128
- onStepClick: K
154
+ onStepClick: te
129
155
  }, null, 8, ["steps", "activeStep", "textPosition"])
130
- ])) : c("", !0),
131
- b.value ? b.value && !r.value ? (s(), o("div", re, [
132
- (s(!0), o(ee, null, te(g.value, (u, v) => (s(), o("div", {
133
- key: v,
134
- class: h(["form-group border rounded-lg overflow-hidden", e.groupClass])
156
+ ], 2)) : d("", !0),
157
+ F.value ? F.value && !r.value ? (o(), u("div", he, [
158
+ (o(!0), u(ue, null, de(h.value, (c, f) => (o(), u("div", {
159
+ key: f,
160
+ class: g(["form-group border rounded-lg overflow-hidden", e.groupClass])
135
161
  }, [
136
- e.groupsHeadings?.[v] ? (s(), o("div", {
162
+ e.groupsHeadings?.[f] ? (o(), u("div", {
137
163
  key: 0,
138
- class: h(["form-group-header bg-muted/50 px-6 py-4 border-b", e.headerClass])
164
+ class: g(["form-group-header bg-muted/50 px-6 py-4 border-b", e.headerClass])
139
165
  }, [
140
- U("h3", de, k(e.groupsHeadings[v]), 1),
141
- e.groupHeadingsDescription?.[v] ? (s(), o("p", ue, k(e.groupHeadingsDescription[v]), 1)) : c("", !0)
142
- ], 2)) : c("", !0),
143
- U("div", ce, [
144
- x(D, {
145
- schema: u,
146
- values: t(y),
147
- errors: t(F),
148
- variant: e.variant,
149
- size: e.size,
150
- rounded: e.rounded,
166
+ p("h3", be, N(e.groupsHeadings[f]), 1),
167
+ e.groupHeadingsDescription?.[f] ? (o(), u("p", ye, N(e.groupHeadingsDescription[f]), 1)) : d("", !0)
168
+ ], 2)) : d("", !0),
169
+ p("div", pe, [
170
+ V(H, {
171
+ schema: c,
172
+ values: a(x),
173
+ errors: a(b),
174
+ variant: U.value,
175
+ size: z.value,
176
+ rounded: P.value,
151
177
  className: e.className,
152
178
  isUpdate: e.isUpdate,
153
- isFieldVisible: t(S),
154
- isFieldDisabled: t(C),
155
- isFieldReadonly: t(V),
156
- onChange: z,
157
- onAddonAction: a[1] || (a[1] = (Q) => m("onAddonAction", Q))
158
- }, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
179
+ showRequiredAsterisk: D.value,
180
+ isFieldVisible: a(A),
181
+ isFieldDisabled: a(w),
182
+ isFieldReadonly: a(q),
183
+ onChange: T,
184
+ onAddonAction: i[1] || (i[1] = (ae) => m("onAddonAction", ae))
185
+ }, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
159
186
  ])
160
187
  ], 2))), 128))
161
- ])) : r.value ? (s(), o("div", me, [
162
- e.tabs?.[i.value] ? (s(), o("div", {
188
+ ])) : r.value ? (o(), u("div", Se, [
189
+ e.tabs?.[s.value] ? (o(), u("div", {
163
190
  key: 0,
164
- class: h(["form-step-header mb-6", e.headerClass])
191
+ class: g(["form-step-header mb-6", e.headerClass])
165
192
  }, [
166
- U("h2", ve, k(e.tabs[i.value].title), 1),
167
- e.tabs[i.value].description ? (s(), o("p", fe, k(e.tabs[i.value].description), 1)) : c("", !0)
168
- ], 2)) : c("", !0),
169
- x(D, {
170
- schema: P.value,
171
- values: t(y),
172
- errors: t(F),
173
- variant: e.variant,
174
- size: e.size,
175
- rounded: e.rounded,
193
+ p("h2", Ce, N(e.tabs[s.value].title), 1),
194
+ e.tabs[s.value].description ? (o(), u("p", ke, N(e.tabs[s.value].description), 1)) : d("", !0)
195
+ ], 2)) : d("", !0),
196
+ V(H, {
197
+ schema: E.value,
198
+ values: a(x),
199
+ errors: a(b),
200
+ variant: U.value,
201
+ size: z.value,
202
+ rounded: P.value,
176
203
  className: e.className,
177
204
  isUpdate: e.isUpdate,
178
- isFieldVisible: t(S),
179
- isFieldDisabled: t(C),
180
- isFieldReadonly: t(V),
181
- onChange: z,
182
- onAddonAction: a[2] || (a[2] = (u) => m("onAddonAction", u))
183
- }, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
184
- ])) : c("", !0) : (s(), o("div", oe, [
185
- x(D, {
205
+ showRequiredAsterisk: D.value,
206
+ isFieldVisible: a(A),
207
+ isFieldDisabled: a(w),
208
+ isFieldReadonly: a(q),
209
+ onChange: T,
210
+ onAddonAction: i[2] || (i[2] = (c) => m("onAddonAction", c))
211
+ }, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
212
+ ])) : d("", !0) : (o(), u("div", ge, [
213
+ V(H, {
186
214
  schema: e.schema,
187
- values: t(y),
188
- errors: t(F),
189
- variant: e.variant,
190
- size: e.size,
191
- rounded: e.rounded,
215
+ values: a(x),
216
+ errors: a(b),
217
+ variant: U.value,
218
+ size: z.value,
219
+ rounded: P.value,
192
220
  className: e.className,
193
221
  isUpdate: e.isUpdate,
194
- isFieldVisible: t(S),
195
- isFieldDisabled: t(C),
196
- isFieldReadonly: t(V),
197
- onChange: z,
198
- onAddonAction: a[0] || (a[0] = (u) => m("onAddonAction", u))
199
- }, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
222
+ showRequiredAsterisk: D.value,
223
+ isFieldVisible: a(A),
224
+ isFieldDisabled: a(w),
225
+ isFieldReadonly: a(q),
226
+ onChange: T,
227
+ onAddonAction: i[0] || (i[0] = (c) => m("onAddonAction", c))
228
+ }, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
200
229
  ])),
201
- ae(n.$slots, "default", {
202
- values: t(y),
203
- errors: t(F),
204
- isSubmitting: t(N),
205
- handleSubmit: H
230
+ ce(l.$slots, "default", {
231
+ values: a(x),
232
+ errors: a(b),
233
+ isSubmitting: a(y),
234
+ handleSubmit: B
206
235
  }, void 0, !0),
207
- e.footer ? (s(), o("div", {
236
+ e.footer ? (o(), u("div", {
208
237
  key: 4,
209
- class: h([
210
- "form-footer flex items-center justify-end gap-3",
238
+ class: g([
239
+ "form-footer flex items-center justify-between gap-3",
211
240
  e.footerClass,
212
- $.value ? "sticky bottom-0 z-20 bg-body pt-4 border-t border-border/75 -mx-4 px-4 mt-8" : "mt-6"
241
+ O.value ? "sticky bottom-0 z-20 bg-body pt-4 border-t border-border/75 -mx-4 px-4 mt-8" : "mt-6"
213
242
  ])
214
243
  }, [
215
- G.value ? (s(), p(A, {
216
- key: 0,
217
- type: "button",
218
- variant: "outline",
219
- text: e.cancelText,
220
- disabled: e.loading || t(N),
221
- onClick: O
222
- }, null, 8, ["text", "disabled"])) : c("", !0),
223
- r.value && R.value ? (s(), p(A, {
224
- key: 1,
225
- type: "button",
226
- variant: "outline",
227
- icon: "lucide:arrow-left",
228
- text: "Previous",
229
- onClick: J
230
- })) : c("", !0),
231
- r.value && !B.value ? (s(), p(A, {
232
- key: 2,
233
- type: "button",
234
- variant: "primary",
235
- text: "Next",
236
- iconRight: "lucide:arrow-right",
237
- onClick: T
238
- })) : (s(), p(A, ie({
239
- key: 3,
240
- type: "submit",
241
- variant: "primary",
242
- text: e.submitText
243
- }, e.submitProps, {
244
- loading: e.loading || t(N)
245
- }), null, 16, ["text", "loading"]))
246
- ], 2)) : c("", !0)
244
+ p("div", Fe, [
245
+ K.value ? (o(), S(C, {
246
+ key: 0,
247
+ type: "button",
248
+ variant: "outline",
249
+ text: e.cancelText,
250
+ disabled: e.loading || a(y),
251
+ onClick: ie
252
+ }, null, 8, ["text", "disabled"])) : d("", !0),
253
+ r.value && e.isUpdate && !R.value ? (o(), S(C, j({
254
+ key: 1,
255
+ type: "button",
256
+ variant: "primary",
257
+ text: e.submitText
258
+ }, e.submitProps, {
259
+ loading: e.loading || a(y),
260
+ onClick: B
261
+ }), null, 16, ["text", "loading"])) : d("", !0)
262
+ ]),
263
+ p("div", xe, [
264
+ r.value && G.value ? (o(), S(C, {
265
+ key: 0,
266
+ type: "button",
267
+ variant: "outline",
268
+ icon: "lucide:arrow-left",
269
+ text: "Previous",
270
+ onClick: ee
271
+ })) : d("", !0),
272
+ r.value && !R.value ? (o(), S(C, {
273
+ key: 1,
274
+ type: "button",
275
+ variant: e.isUpdate ? "outline" : "primary",
276
+ text: "Next",
277
+ iconRight: "lucide:arrow-right",
278
+ onClick: L
279
+ }, null, 8, ["variant"])) : d("", !0),
280
+ !r.value || R.value ? (o(), S(C, j({
281
+ key: 2,
282
+ type: "submit",
283
+ variant: "primary",
284
+ text: e.submitText
285
+ }, e.submitProps, {
286
+ loading: e.loading || a(y)
287
+ }), null, 16, ["text", "loading"])) : d("", !0)
288
+ ])
289
+ ], 2)) : d("", !0)
247
290
  ], 34));
248
291
  }
249
292
  });
250
293
  export {
251
- ke as default
294
+ qe as default
252
295
  };
@@ -11,6 +11,7 @@ interface Props {
11
11
  readonly?: boolean;
12
12
  error?: string;
13
13
  isUpdate?: boolean;
14
+ label?: string;
14
15
  }
15
16
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
17
  change: (payload: IFormFieldChangePayload) => any;
@@ -21,12 +22,12 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
21
22
  onAddonAction?: (action: string) => any;
22
23
  onAddonChange?: (name: string, payload: IFormFieldChangePayload) => any;
23
24
  }>, {
24
- disabled: boolean;
25
- size: InputSize;
25
+ readonly: boolean;
26
26
  variant: InputVariant;
27
+ size: InputSize;
27
28
  rounded: InputRounded;
28
29
  error: string;
29
- readonly: boolean;
30
+ disabled: boolean;
30
31
  isUpdate: boolean;
31
32
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
32
33
  export default _default;