vlite3 0.1.10 → 0.2.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.
- package/README.md +226 -150
- package/components/Button.vue.js +1 -1
- package/components/Chip/Chip.vue.js +15 -15
- package/components/DataTable/DataTable.vue.js +2 -2
- package/components/DataTable/DataTable.vue2.js +41 -39
- package/components/DataTable/types.d.ts +1 -0
- package/components/DatePicker.vue.d.ts +12 -3
- package/components/DatePicker.vue.js +80 -39
- package/components/Dropdown/DropdownMenu.vue.js +48 -47
- package/components/Form/Form.vue.d.ts +2 -0
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +104 -101
- package/components/Form/FormField.vue.d.ts +4 -0
- package/components/Form/FormField.vue.js +248 -148
- package/components/Form/FormFields.vue.d.ts +2 -0
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +45 -39
- package/components/Form/types.d.ts +24 -4
- package/components/Form/utils/form.utils.d.ts +5 -1
- package/components/Form/utils/form.utils.js +69 -60
- package/components/GoogleLogin.vue.d.ts +41 -0
- package/components/GoogleLogin.vue.js +60 -0
- package/components/GoogleLogin.vue2.js +4 -0
- package/components/Input.vue.js +120 -111
- package/components/NumberInput.vue.d.ts +38 -0
- package/components/NumberInput.vue.js +7 -0
- package/components/NumberInput.vue2.js +191 -0
- package/components/Pagination/Pagination.vue.d.ts +1 -0
- package/components/Pagination/Pagination.vue.js +60 -46
- package/components/ProgressBar/ProgressBar.vue.d.ts +12 -0
- package/components/ProgressBar/ProgressBar.vue.js +7 -0
- package/components/ProgressBar/ProgressBar.vue2.js +158 -0
- package/components/ProgressBar/index.d.ts +3 -0
- package/components/Spinner/Spinner.vue.d.ts +8 -0
- package/components/Spinner/Spinner.vue.js +89 -0
- package/components/Spinner/Spinner.vue2.js +4 -0
- package/components/Spinner/index.d.ts +2 -0
- package/components/Spinner/types.d.ts +9 -0
- package/components/Tabes/Tabes.vue.d.ts +3 -1
- package/components/Tabes/Tabes.vue.js +103 -44
- package/directives/vScrollReveal.d.ts +2 -0
- package/directives/vScrollReveal.js +48 -0
- package/index.d.ts +8 -0
- package/index.js +180 -147
- package/package.json +6 -3
- package/style.css +56 -4
- package/types/form.type.d.ts +2 -2
- package/types/progressbar.d.ts +75 -0
- package/utils/env.d.ts +14 -0
- package/utils/env.js +4 -0
- package/utils/functions.d.ts +99 -0
- package/utils/functions.js +91 -7
- package/utils/index.d.ts +2 -0
- package/utils/search.util.d.ts +127 -0
- package/utils/search.util.js +363 -0
|
@@ -62,10 +62,12 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
62
62
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
63
63
|
onSubmit: (payload: IFormSubmitPayload, close: () => void) => any;
|
|
64
64
|
onCancel: () => any;
|
|
65
|
+
onAddonAction: (action: string) => any;
|
|
65
66
|
onStepChange: (step: number) => any;
|
|
66
67
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
67
68
|
onOnSubmit?: (payload: IFormSubmitPayload, close: () => void) => any;
|
|
68
69
|
onOnCancel?: () => any;
|
|
70
|
+
onOnAddonAction?: (action: string) => any;
|
|
69
71
|
onOnStepChange?: (step: number) => any;
|
|
70
72
|
}>, {
|
|
71
73
|
values: Record<string, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Form.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-67eb0c47"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useForm as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as W, inject as X, computed as d, ref as Y, watch as Z, openBlock as l, 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 se } from "./composables/useForm.js";
|
|
3
|
+
import D from "./FormFields.vue.js";
|
|
4
|
+
import A from "../Button.vue.js";
|
|
5
|
+
import le from "../Timeline.vue.js";
|
|
6
|
+
const ne = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "form-timeline mb-18"
|
|
9
|
-
},
|
|
9
|
+
}, oe = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "form-fields-single"
|
|
12
|
-
},
|
|
12
|
+
}, re = {
|
|
13
13
|
key: 2,
|
|
14
14
|
class: "form-groups space-y-6"
|
|
15
|
-
},
|
|
15
|
+
}, de = { class: "text-base font-semibold text-foreground" }, ue = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "text-sm text-muted-foreground mt-1"
|
|
18
|
-
},
|
|
18
|
+
}, ce = { class: "form-group-body p-6" }, me = {
|
|
19
19
|
key: 3,
|
|
20
20
|
class: "form-step"
|
|
21
|
-
},
|
|
21
|
+
}, ve = { class: "text-lg font-semibold text-foreground" }, fe = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "text-sm text-muted-foreground mt-1"
|
|
24
|
-
},
|
|
24
|
+
}, ke = /* @__PURE__ */ W({
|
|
25
25
|
__name: "Form",
|
|
26
26
|
props: {
|
|
27
27
|
schema: {},
|
|
@@ -47,62 +47,62 @@ const le = {
|
|
|
47
47
|
footerClass: { default: "" },
|
|
48
48
|
timelineTextPosition: { default: "bottom" }
|
|
49
49
|
},
|
|
50
|
-
emits: ["onSubmit", "onCancel", "onStepChange"],
|
|
51
|
-
setup(e, { emit:
|
|
52
|
-
const
|
|
53
|
-
id:
|
|
54
|
-
title:
|
|
55
|
-
icon:
|
|
56
|
-
description:
|
|
57
|
-
status:
|
|
58
|
-
})) : []), g =
|
|
50
|
+
emits: ["onSubmit", "onCancel", "onStepChange", "onAddonAction"],
|
|
51
|
+
setup(e, { emit: M }) {
|
|
52
|
+
const s = e, m = M, f = X("modal-context", null), G = d(() => s.showCancel || !!f), $ = d(() => !!f), b = d(() => !s.schema || s.schema.length === 0 ? !1 : Array.isArray(s.schema[0])), r = d(() => s.tabs && s.tabs.length > 0 && b.value), i = Y(0), w = d(() => s.tabs ? s.tabs.map((n, a) => ({
|
|
53
|
+
id: n.id?.toString() || a.toString(),
|
|
54
|
+
title: n.title,
|
|
55
|
+
icon: n.icon,
|
|
56
|
+
description: n.description,
|
|
57
|
+
status: a < i.value ? "completed" : a === i.value ? "current" : "upcoming"
|
|
58
|
+
})) : []), g = d(() => b.value ? s.schema : [s.schema]), P = d(() => r.value ? g.value[i.value] || [] : []), {
|
|
59
59
|
formValues: y,
|
|
60
60
|
errors: S,
|
|
61
|
-
isSubmitting:
|
|
61
|
+
isSubmitting: N,
|
|
62
62
|
handleFieldChange: j,
|
|
63
63
|
validateField: E,
|
|
64
|
-
validateAll:
|
|
64
|
+
validateAll: he,
|
|
65
65
|
isFieldVisible: C,
|
|
66
66
|
isFieldDisabled: F,
|
|
67
|
-
isFieldReadonly:
|
|
68
|
-
getFieldValue:
|
|
67
|
+
isFieldReadonly: V,
|
|
68
|
+
getFieldValue: be,
|
|
69
69
|
handleSubmit: L,
|
|
70
|
-
flatSchema:
|
|
71
|
-
} =
|
|
72
|
-
schema:
|
|
73
|
-
values:
|
|
74
|
-
isUpdate:
|
|
75
|
-
folderId:
|
|
76
|
-
onSubmit: (
|
|
77
|
-
m("onSubmit",
|
|
70
|
+
flatSchema: ge
|
|
71
|
+
} = se({
|
|
72
|
+
schema: s.schema,
|
|
73
|
+
values: s.values,
|
|
74
|
+
isUpdate: s.isUpdate,
|
|
75
|
+
folderId: s.folderId,
|
|
76
|
+
onSubmit: (n) => {
|
|
77
|
+
m("onSubmit", n, f?.close);
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
|
|
81
|
-
() =>
|
|
82
|
-
(
|
|
80
|
+
Z(
|
|
81
|
+
() => s.values,
|
|
82
|
+
(n) => {
|
|
83
83
|
},
|
|
84
84
|
{ deep: !0 }
|
|
85
85
|
);
|
|
86
|
-
const
|
|
87
|
-
j(
|
|
86
|
+
const z = (n, a) => {
|
|
87
|
+
j(n, a.value, a.data);
|
|
88
88
|
}, q = () => {
|
|
89
89
|
if (!r.value) return !0;
|
|
90
|
-
const
|
|
91
|
-
let
|
|
92
|
-
for (const
|
|
93
|
-
if (!C(
|
|
94
|
-
E(
|
|
90
|
+
const n = P.value;
|
|
91
|
+
let a = !0;
|
|
92
|
+
for (const u of n) {
|
|
93
|
+
if (!C(u) || F(u)) continue;
|
|
94
|
+
E(u) && (a = !1);
|
|
95
95
|
}
|
|
96
|
-
return
|
|
97
|
-
}, I =
|
|
98
|
-
I.value && q() && (
|
|
96
|
+
return a;
|
|
97
|
+
}, 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 = () => {
|
|
98
|
+
I.value && q() && (i.value++, m("onStepChange", i.value));
|
|
99
99
|
}, J = () => {
|
|
100
|
-
|
|
101
|
-
}, K = (
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
if (r.value && !
|
|
105
|
-
|
|
100
|
+
R.value && (i.value--, m("onStepChange", i.value));
|
|
101
|
+
}, K = (n, a) => {
|
|
102
|
+
a <= i.value && (i.value = a, m("onStepChange", i.value));
|
|
103
|
+
}, H = async () => {
|
|
104
|
+
if (r.value && !B.value) {
|
|
105
|
+
T();
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
108
|
try {
|
|
@@ -110,37 +110,37 @@ const le = {
|
|
|
110
110
|
} catch {
|
|
111
111
|
}
|
|
112
112
|
}, O = () => {
|
|
113
|
-
m("onCancel"),
|
|
113
|
+
m("onCancel"), f && f?.close?.();
|
|
114
114
|
};
|
|
115
|
-
return (
|
|
116
|
-
class: h(["form-container",
|
|
117
|
-
onSubmit:
|
|
115
|
+
return (n, a) => (l(), o("form", {
|
|
116
|
+
class: h(["form-container", s.class]),
|
|
117
|
+
onSubmit: _(H, ["prevent"])
|
|
118
118
|
}, [
|
|
119
|
-
r.value &&
|
|
120
|
-
x(
|
|
121
|
-
steps:
|
|
122
|
-
activeStep:
|
|
119
|
+
r.value && w.value.length > 0 ? (l(), o("div", ne, [
|
|
120
|
+
x(le, {
|
|
121
|
+
steps: w.value,
|
|
122
|
+
activeStep: i.value,
|
|
123
123
|
direction: "horizontal",
|
|
124
124
|
textPosition: e.timelineTextPosition,
|
|
125
125
|
clickable: !0,
|
|
126
126
|
onStepClick: K
|
|
127
127
|
}, null, 8, ["steps", "activeStep", "textPosition"])
|
|
128
|
-
])) :
|
|
129
|
-
b.value ? b.value && !r.value ? (
|
|
130
|
-
(
|
|
131
|
-
key:
|
|
128
|
+
])) : c("", !0),
|
|
129
|
+
b.value ? b.value && !r.value ? (l(), o("div", re, [
|
|
130
|
+
(l(!0), o(ee, null, te(g.value, (u, v) => (l(), o("div", {
|
|
131
|
+
key: v,
|
|
132
132
|
class: h(["form-group border rounded-lg overflow-hidden", e.groupClass])
|
|
133
133
|
}, [
|
|
134
|
-
e.groupsHeadings?.[
|
|
134
|
+
e.groupsHeadings?.[v] ? (l(), o("div", {
|
|
135
135
|
key: 0,
|
|
136
136
|
class: h(["form-group-header bg-muted/50 px-6 py-4 border-b", e.headerClass])
|
|
137
137
|
}, [
|
|
138
|
-
|
|
139
|
-
e.groupHeadingsDescription?.[
|
|
140
|
-
], 2)) :
|
|
141
|
-
|
|
142
|
-
x(
|
|
143
|
-
schema:
|
|
138
|
+
U("h3", de, k(e.groupsHeadings[v]), 1),
|
|
139
|
+
e.groupHeadingsDescription?.[v] ? (l(), o("p", ue, k(e.groupHeadingsDescription[v]), 1)) : c("", !0)
|
|
140
|
+
], 2)) : c("", !0),
|
|
141
|
+
U("div", ce, [
|
|
142
|
+
x(D, {
|
|
143
|
+
schema: u,
|
|
144
144
|
values: t(y),
|
|
145
145
|
errors: t(S),
|
|
146
146
|
variant: e.variant,
|
|
@@ -150,21 +150,22 @@ const le = {
|
|
|
150
150
|
isUpdate: e.isUpdate,
|
|
151
151
|
isFieldVisible: t(C),
|
|
152
152
|
isFieldDisabled: t(F),
|
|
153
|
-
isFieldReadonly: t(
|
|
154
|
-
onChange:
|
|
153
|
+
isFieldReadonly: t(V),
|
|
154
|
+
onChange: z,
|
|
155
|
+
onAddonAction: a[1] || (a[1] = (Q) => m("onAddonAction", Q))
|
|
155
156
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
156
157
|
])
|
|
157
158
|
], 2))), 128))
|
|
158
|
-
])) : r.value ? (
|
|
159
|
-
e.tabs?.[
|
|
159
|
+
])) : r.value ? (l(), o("div", me, [
|
|
160
|
+
e.tabs?.[i.value] ? (l(), o("div", {
|
|
160
161
|
key: 0,
|
|
161
162
|
class: h(["form-step-header mb-6", e.headerClass])
|
|
162
163
|
}, [
|
|
163
|
-
|
|
164
|
-
e.tabs[
|
|
165
|
-
], 2)) :
|
|
166
|
-
x(
|
|
167
|
-
schema:
|
|
164
|
+
U("h2", ve, k(e.tabs[i.value].title), 1),
|
|
165
|
+
e.tabs[i.value].description ? (l(), o("p", fe, k(e.tabs[i.value].description), 1)) : c("", !0)
|
|
166
|
+
], 2)) : c("", !0),
|
|
167
|
+
x(D, {
|
|
168
|
+
schema: P.value,
|
|
168
169
|
values: t(y),
|
|
169
170
|
errors: t(S),
|
|
170
171
|
variant: e.variant,
|
|
@@ -174,11 +175,12 @@ const le = {
|
|
|
174
175
|
isUpdate: e.isUpdate,
|
|
175
176
|
isFieldVisible: t(C),
|
|
176
177
|
isFieldDisabled: t(F),
|
|
177
|
-
isFieldReadonly: t(
|
|
178
|
-
onChange:
|
|
178
|
+
isFieldReadonly: t(V),
|
|
179
|
+
onChange: z,
|
|
180
|
+
onAddonAction: a[2] || (a[2] = (u) => m("onAddonAction", u))
|
|
179
181
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
180
|
-
])) :
|
|
181
|
-
x(
|
|
182
|
+
])) : c("", !0) : (l(), o("div", oe, [
|
|
183
|
+
x(D, {
|
|
182
184
|
schema: e.schema,
|
|
183
185
|
values: t(y),
|
|
184
186
|
errors: t(S),
|
|
@@ -189,17 +191,18 @@ const le = {
|
|
|
189
191
|
isUpdate: e.isUpdate,
|
|
190
192
|
isFieldVisible: t(C),
|
|
191
193
|
isFieldDisabled: t(F),
|
|
192
|
-
isFieldReadonly: t(
|
|
193
|
-
onChange:
|
|
194
|
+
isFieldReadonly: t(V),
|
|
195
|
+
onChange: z,
|
|
196
|
+
onAddonAction: a[0] || (a[0] = (u) => m("onAddonAction", u))
|
|
194
197
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
195
198
|
])),
|
|
196
|
-
|
|
199
|
+
ae(n.$slots, "default", {
|
|
197
200
|
values: t(y),
|
|
198
201
|
errors: t(S),
|
|
199
|
-
isSubmitting: t(
|
|
200
|
-
handleSubmit:
|
|
202
|
+
isSubmitting: t(N),
|
|
203
|
+
handleSubmit: H
|
|
201
204
|
}, void 0, !0),
|
|
202
|
-
e.footer ? (
|
|
205
|
+
e.footer ? (l(), o("div", {
|
|
203
206
|
key: 4,
|
|
204
207
|
class: h([
|
|
205
208
|
"form-footer flex items-center justify-end gap-3",
|
|
@@ -207,41 +210,41 @@ const le = {
|
|
|
207
210
|
$.value ? "sticky bottom-0 z-20 bg-body pt-4 border-t border-border/40 -mx-4 px-4 mt-4" : "mt-6"
|
|
208
211
|
])
|
|
209
212
|
}, [
|
|
210
|
-
G.value ? (
|
|
213
|
+
G.value ? (l(), p(A, {
|
|
211
214
|
key: 0,
|
|
212
215
|
type: "button",
|
|
213
216
|
variant: "outline",
|
|
214
217
|
text: e.cancelText,
|
|
215
|
-
disabled: e.loading || t(
|
|
218
|
+
disabled: e.loading || t(N),
|
|
216
219
|
onClick: O
|
|
217
|
-
}, null, 8, ["text", "disabled"])) :
|
|
218
|
-
r.value &&
|
|
220
|
+
}, null, 8, ["text", "disabled"])) : c("", !0),
|
|
221
|
+
r.value && R.value ? (l(), p(A, {
|
|
219
222
|
key: 1,
|
|
220
223
|
type: "button",
|
|
221
224
|
variant: "outline",
|
|
222
225
|
icon: "lucide:arrow-left",
|
|
223
226
|
text: "Previous",
|
|
224
227
|
onClick: J
|
|
225
|
-
})) :
|
|
226
|
-
r.value && !
|
|
228
|
+
})) : c("", !0),
|
|
229
|
+
r.value && !B.value ? (l(), p(A, {
|
|
227
230
|
key: 2,
|
|
228
231
|
type: "button",
|
|
229
232
|
variant: "primary",
|
|
230
233
|
text: "Next",
|
|
231
234
|
iconRight: "lucide:arrow-right",
|
|
232
|
-
onClick:
|
|
233
|
-
})) : (
|
|
235
|
+
onClick: T
|
|
236
|
+
})) : (l(), p(A, ie({
|
|
234
237
|
key: 3,
|
|
235
238
|
type: "submit",
|
|
236
239
|
variant: "primary",
|
|
237
240
|
text: e.submitText
|
|
238
241
|
}, e.submitProps, {
|
|
239
|
-
loading: e.loading || t(
|
|
242
|
+
loading: e.loading || t(N)
|
|
240
243
|
}), null, 16, ["text", "loading"]))
|
|
241
|
-
], 2)) :
|
|
244
|
+
], 2)) : c("", !0)
|
|
242
245
|
], 34));
|
|
243
246
|
}
|
|
244
247
|
});
|
|
245
248
|
export {
|
|
246
|
-
|
|
249
|
+
ke as default
|
|
247
250
|
};
|
|
@@ -14,8 +14,12 @@ interface Props {
|
|
|
14
14
|
}
|
|
15
15
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
16
16
|
change: (payload: IFormFieldChangePayload) => any;
|
|
17
|
+
addonAction: (action: string) => any;
|
|
18
|
+
addonChange: (name: string, payload: IFormFieldChangePayload) => any;
|
|
17
19
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
18
20
|
onChange?: (payload: IFormFieldChangePayload) => any;
|
|
21
|
+
onAddonAction?: (action: string) => any;
|
|
22
|
+
onAddonChange?: (name: string, payload: IFormFieldChangePayload) => any;
|
|
19
23
|
}>, {
|
|
20
24
|
disabled: boolean;
|
|
21
25
|
size: InputSize;
|