@foormjs/vue 0.0.2 → 0.1.0
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/dist/index.d.ts +31 -10
- package/dist/index.js +287 -246
- package/dist/index.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { TFoormEntry } from 'foorm';
|
|
2
|
+
import { TFoormEntryOptions } from 'foorm';
|
|
3
|
+
|
|
1
4
|
export declare const OoField: <TFormData, TFormContext>(__VLS_props: any, __VLS_ctx?: {
|
|
2
5
|
attrs: any;
|
|
3
6
|
emit: any;
|
|
@@ -64,13 +67,16 @@ export declare const OoField: <TFormData, TFormContext>(__VLS_props: any, __VLS_
|
|
|
64
67
|
emit: any;
|
|
65
68
|
}>) => any;
|
|
66
69
|
|
|
67
|
-
export declare const
|
|
70
|
+
export declare const OoForm: <TFormData = any, TFormContext = any>(__VLS_props: any, __VLS_ctx?: {
|
|
68
71
|
attrs: any;
|
|
69
72
|
emit: any;
|
|
70
73
|
slots: Partial<Record<`field:${any}`, (_: any) => any>> & {
|
|
71
74
|
"form.header"?(_: {
|
|
72
75
|
clearErrors: any;
|
|
73
76
|
reset: any;
|
|
77
|
+
title: any;
|
|
78
|
+
formContext: any;
|
|
79
|
+
disabled: any;
|
|
74
80
|
}): any;
|
|
75
81
|
"form.before"?(_: {
|
|
76
82
|
clearErrors: any;
|
|
@@ -79,15 +85,21 @@ export declare const OoFoorm: <TFormData extends object, TFormContext extends ob
|
|
|
79
85
|
"form.after"?(_: {
|
|
80
86
|
clearErrors: any;
|
|
81
87
|
reset: any;
|
|
88
|
+
disabled: any;
|
|
89
|
+
formContext: any;
|
|
82
90
|
}): any;
|
|
83
91
|
"form.submit"?(_: {
|
|
84
92
|
disabled: any;
|
|
93
|
+
text: any;
|
|
85
94
|
clearErrors: any;
|
|
86
95
|
reset: any;
|
|
96
|
+
formContext: any;
|
|
87
97
|
}): any;
|
|
88
98
|
"form.footer"?(_: {
|
|
99
|
+
disabled: any;
|
|
89
100
|
clearErrors: any;
|
|
90
101
|
reset: any;
|
|
102
|
+
formContext: any;
|
|
91
103
|
}): any;
|
|
92
104
|
};
|
|
93
105
|
}, __VLS_expose?: (exposed: any) => void, __VLS_setup?: Promise<{
|
|
@@ -98,6 +110,9 @@ export declare const OoFoorm: <TFormData extends object, TFormContext extends ob
|
|
|
98
110
|
"form.header"?(_: {
|
|
99
111
|
clearErrors: any;
|
|
100
112
|
reset: any;
|
|
113
|
+
title: any;
|
|
114
|
+
formContext: any;
|
|
115
|
+
disabled: any;
|
|
101
116
|
}): any;
|
|
102
117
|
"form.before"?(_: {
|
|
103
118
|
clearErrors: any;
|
|
@@ -106,25 +121,31 @@ export declare const OoFoorm: <TFormData extends object, TFormContext extends ob
|
|
|
106
121
|
"form.after"?(_: {
|
|
107
122
|
clearErrors: any;
|
|
108
123
|
reset: any;
|
|
124
|
+
disabled: any;
|
|
125
|
+
formContext: any;
|
|
109
126
|
}): any;
|
|
110
127
|
"form.submit"?(_: {
|
|
111
128
|
disabled: any;
|
|
129
|
+
text: any;
|
|
112
130
|
clearErrors: any;
|
|
113
131
|
reset: any;
|
|
132
|
+
formContext: any;
|
|
114
133
|
}): any;
|
|
115
134
|
"form.footer"?(_: {
|
|
135
|
+
disabled: any;
|
|
116
136
|
clearErrors: any;
|
|
117
137
|
reset: any;
|
|
138
|
+
formContext: any;
|
|
118
139
|
}): any;
|
|
119
140
|
};
|
|
120
141
|
emit: any;
|
|
121
142
|
}>) => any;
|
|
122
143
|
|
|
123
|
-
export declare interface TFoormComponentProps<
|
|
144
|
+
export declare interface TFoormComponentProps<V, TFormData, TFormContext> {
|
|
124
145
|
onBlur: Function;
|
|
125
146
|
error?: string;
|
|
126
147
|
model: {
|
|
127
|
-
value:
|
|
148
|
+
value: V;
|
|
128
149
|
};
|
|
129
150
|
formData: TFormData;
|
|
130
151
|
formContext?: TFormContext;
|
|
@@ -132,16 +153,16 @@ export declare interface TFoormComponentProps<T, TFormData, TFormContext> {
|
|
|
132
153
|
description?: string;
|
|
133
154
|
hint?: string;
|
|
134
155
|
placeholder?: string;
|
|
135
|
-
class?: Record<string, boolean
|
|
136
|
-
style?: Record<string, string
|
|
137
|
-
optional
|
|
138
|
-
required
|
|
139
|
-
disabled?: boolean;
|
|
140
|
-
hidden?: boolean;
|
|
156
|
+
class?: Record<string, boolean> | string;
|
|
157
|
+
style?: Record<string, string> | string;
|
|
158
|
+
optional?: boolean | undefined;
|
|
159
|
+
required?: boolean | undefined;
|
|
160
|
+
disabled?: boolean | undefined;
|
|
161
|
+
hidden?: boolean | undefined;
|
|
141
162
|
type: string;
|
|
142
163
|
altAction?: string;
|
|
143
164
|
name?: string;
|
|
144
|
-
field?:
|
|
165
|
+
field?: TFoormEntry<V, TFormData, TFormContext, TFoormEntryOptions>;
|
|
145
166
|
options?: unknown[];
|
|
146
167
|
length?: number;
|
|
147
168
|
autocomplete?: string;
|
package/dist/index.js
CHANGED
|
@@ -1,97 +1,102 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return o;
|
|
1
|
+
import { defineComponent as U, mergeModels as F, useModel as T, inject as z, ref as k, computed as p, watch as I, onUnmounted as L, getCurrentInstance as O, renderSlot as D, unref as n, provide as R, openBlock as b, createElementBlock as E, withModifiers as W, nextTick as G, createBlock as B, withCtx as M, toDisplayString as g, createCommentVNode as H, Fragment as J, renderList as K, mergeProps as N, normalizeProps as Q, guardReactiveProps as X, resolveDynamicComponent as P, normalizeClass as Y, createElementVNode as w, withDirectives as Z, vModelDynamic as ee } from "vue";
|
|
2
|
+
function $(i, o, t) {
|
|
3
|
+
if (typeof i == "function") {
|
|
4
|
+
if (i.__deserialized)
|
|
5
|
+
return i(o);
|
|
6
|
+
{
|
|
7
|
+
const r = t ? [o.v, o.data, o.context, o.entry] : [o.data, o.context, o.entry];
|
|
8
|
+
return i(...r);
|
|
9
|
+
}
|
|
11
10
|
}
|
|
12
|
-
return
|
|
11
|
+
return i;
|
|
13
12
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
13
|
+
function j(i, o) {
|
|
14
|
+
if (typeof i == "object" && i !== null) {
|
|
15
|
+
const t = {};
|
|
16
|
+
for (const [r, l] of Object.entries(i))
|
|
17
|
+
t[r] = $(l, o, !0);
|
|
18
|
+
return t;
|
|
19
|
+
}
|
|
20
|
+
return $(i, o, !0);
|
|
16
21
|
}
|
|
17
|
-
const
|
|
22
|
+
const te = /* @__PURE__ */ U({
|
|
18
23
|
__name: "VuilessField",
|
|
19
|
-
props: /* @__PURE__ */
|
|
24
|
+
props: /* @__PURE__ */ F({
|
|
20
25
|
rules: {}
|
|
21
26
|
}, {
|
|
22
27
|
modelValue: {},
|
|
23
28
|
modelModifiers: {}
|
|
24
29
|
}),
|
|
25
30
|
emits: ["update:modelValue"],
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
28
|
-
var
|
|
29
|
-
if ((
|
|
30
|
-
switch (
|
|
31
|
+
setup(i) {
|
|
32
|
+
const o = i, t = T(i, "modelValue"), r = z("vuiless"), l = k(), h = k(!1), v = k(!1), _ = p(() => {
|
|
33
|
+
var c;
|
|
34
|
+
if ((c = r == null ? void 0 : r.value) != null && c.firstValidation)
|
|
35
|
+
switch (r.value.firstValidation) {
|
|
31
36
|
case "on-change":
|
|
32
|
-
return
|
|
37
|
+
return r.value.firstSubmitHappened || h.value;
|
|
33
38
|
case "touched-on-blur":
|
|
34
|
-
return
|
|
39
|
+
return r.value.firstSubmitHappened || v.value && h.value;
|
|
35
40
|
case "on-blur":
|
|
36
|
-
return
|
|
41
|
+
return r.value.firstSubmitHappened || v.value;
|
|
37
42
|
case "on-submit":
|
|
38
|
-
return
|
|
43
|
+
return r.value.firstSubmitHappened;
|
|
39
44
|
case "none":
|
|
40
45
|
return !1;
|
|
41
46
|
}
|
|
42
47
|
return !1;
|
|
43
|
-
}),
|
|
44
|
-
if (_.value ||
|
|
45
|
-
return
|
|
48
|
+
}), y = p(() => {
|
|
49
|
+
if (_.value || l.value)
|
|
50
|
+
return f();
|
|
46
51
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}),
|
|
50
|
-
var
|
|
51
|
-
(
|
|
52
|
-
}),
|
|
53
|
-
validate: () => (
|
|
52
|
+
I([t], () => {
|
|
53
|
+
l.value = void 0, h.value = !0;
|
|
54
|
+
}), L(() => {
|
|
55
|
+
var c;
|
|
56
|
+
(c = r == null ? void 0 : r.value) == null || c.unregister(O());
|
|
57
|
+
}), r != null && r.value && r.value.register(O(), {
|
|
58
|
+
validate: () => (l.value = f(), l.value || !0),
|
|
54
59
|
clearErrors: () => {
|
|
55
|
-
|
|
60
|
+
h.value = !1, v.value = !1, l.value = void 0;
|
|
56
61
|
},
|
|
57
62
|
reset: () => {
|
|
58
|
-
|
|
63
|
+
t.value = "";
|
|
59
64
|
}
|
|
60
65
|
});
|
|
61
|
-
function
|
|
62
|
-
var
|
|
63
|
-
if ((
|
|
64
|
-
for (const
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
(
|
|
68
|
-
(
|
|
66
|
+
function f() {
|
|
67
|
+
var c, a, x;
|
|
68
|
+
if ((c = o.rules) != null && c.length)
|
|
69
|
+
for (const m of o.rules) {
|
|
70
|
+
const d = m(
|
|
71
|
+
t.value,
|
|
72
|
+
(a = r == null ? void 0 : r.value) == null ? void 0 : a.formData,
|
|
73
|
+
(x = r == null ? void 0 : r.value) == null ? void 0 : x.formContext
|
|
69
74
|
);
|
|
70
|
-
if (
|
|
71
|
-
return
|
|
75
|
+
if (d !== !0)
|
|
76
|
+
return d || "Wrong value";
|
|
72
77
|
}
|
|
73
78
|
}
|
|
74
|
-
function
|
|
79
|
+
function u() {
|
|
75
80
|
v.value = !0;
|
|
76
81
|
}
|
|
77
|
-
const
|
|
78
|
-
v:
|
|
79
|
-
get: () =>
|
|
80
|
-
set: (
|
|
82
|
+
const C = {
|
|
83
|
+
v: p({
|
|
84
|
+
get: () => t.value,
|
|
85
|
+
set: (c) => t.value = c
|
|
81
86
|
})
|
|
82
87
|
};
|
|
83
|
-
return (
|
|
84
|
-
var
|
|
85
|
-
return D(
|
|
86
|
-
onBlur:
|
|
87
|
-
error:
|
|
88
|
-
formData: (
|
|
89
|
-
formContext: (
|
|
90
|
-
model:
|
|
88
|
+
return (c, a) => {
|
|
89
|
+
var x, m;
|
|
90
|
+
return D(c.$slots, "default", {
|
|
91
|
+
onBlur: u,
|
|
92
|
+
error: y.value,
|
|
93
|
+
formData: (x = n(r)) == null ? void 0 : x.formData,
|
|
94
|
+
formContext: (m = n(r)) == null ? void 0 : m.formContext,
|
|
95
|
+
model: C.v
|
|
91
96
|
});
|
|
92
97
|
};
|
|
93
98
|
}
|
|
94
|
-
}),
|
|
99
|
+
}), oe = /* @__PURE__ */ U({
|
|
95
100
|
__name: "VuilessForm",
|
|
96
101
|
props: {
|
|
97
102
|
formData: {},
|
|
@@ -99,46 +104,46 @@ const ee = /* @__PURE__ */ q({
|
|
|
99
104
|
firstValidation: { default: "on-change" }
|
|
100
105
|
},
|
|
101
106
|
emits: ["submit"],
|
|
102
|
-
setup(
|
|
103
|
-
const
|
|
104
|
-
firstSubmitHappened:
|
|
105
|
-
firstValidation:
|
|
106
|
-
register: (
|
|
107
|
-
|
|
107
|
+
setup(i, { emit: o }) {
|
|
108
|
+
const t = i, r = o, l = /* @__PURE__ */ new Map(), h = k(!1), v = p(() => ({
|
|
109
|
+
firstSubmitHappened: h.value,
|
|
110
|
+
firstValidation: t.firstValidation,
|
|
111
|
+
register: (u, C) => {
|
|
112
|
+
l.set(u, C);
|
|
108
113
|
},
|
|
109
|
-
unregister: (
|
|
110
|
-
formData:
|
|
111
|
-
formContext:
|
|
114
|
+
unregister: (u) => l.delete(u),
|
|
115
|
+
formData: t.formData,
|
|
116
|
+
formContext: t.formContext
|
|
112
117
|
}));
|
|
113
|
-
|
|
118
|
+
R("vuiless", v);
|
|
114
119
|
function _() {
|
|
115
|
-
|
|
116
|
-
for (const { clearErrors:
|
|
117
|
-
|
|
120
|
+
h.value = !1;
|
|
121
|
+
for (const { clearErrors: u } of l.values())
|
|
122
|
+
u();
|
|
118
123
|
}
|
|
119
|
-
async function
|
|
120
|
-
for (const { reset:
|
|
121
|
-
|
|
122
|
-
await
|
|
124
|
+
async function y() {
|
|
125
|
+
for (const { reset: u } of l.values())
|
|
126
|
+
u();
|
|
127
|
+
await G(), _();
|
|
123
128
|
}
|
|
124
|
-
function
|
|
125
|
-
|
|
126
|
-
let
|
|
127
|
-
if (
|
|
128
|
-
for (const { validate:
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
function f() {
|
|
130
|
+
h.value = !0;
|
|
131
|
+
let u = !1;
|
|
132
|
+
if (t.firstValidation !== "none")
|
|
133
|
+
for (const { validate: C } of l.values())
|
|
134
|
+
C() !== !0 && (u = !0);
|
|
135
|
+
u || r("submit", t.formData);
|
|
131
136
|
}
|
|
132
|
-
return (
|
|
133
|
-
onSubmit:
|
|
137
|
+
return (u, C) => (b(), E("form", {
|
|
138
|
+
onSubmit: W(f, ["prevent"])
|
|
134
139
|
}, [
|
|
135
|
-
D(
|
|
140
|
+
D(u.$slots, "default", {
|
|
136
141
|
clearErrors: _,
|
|
137
|
-
reset:
|
|
142
|
+
reset: y
|
|
138
143
|
})
|
|
139
144
|
], 32));
|
|
140
145
|
}
|
|
141
|
-
}),
|
|
146
|
+
}), re = /* @__PURE__ */ U({
|
|
142
147
|
__name: "oo-field",
|
|
143
148
|
props: {
|
|
144
149
|
field: {},
|
|
@@ -156,88 +161,95 @@ const ee = /* @__PURE__ */ q({
|
|
|
156
161
|
value: {},
|
|
157
162
|
options: {},
|
|
158
163
|
attrs: {},
|
|
159
|
-
optional: {
|
|
160
|
-
disabled: {
|
|
161
|
-
hidden: {
|
|
164
|
+
optional: {},
|
|
165
|
+
disabled: {},
|
|
166
|
+
hidden: {},
|
|
162
167
|
length: {},
|
|
163
|
-
validators: {}
|
|
168
|
+
validators: {},
|
|
169
|
+
error: {}
|
|
164
170
|
},
|
|
165
|
-
setup(
|
|
166
|
-
const
|
|
171
|
+
setup(i) {
|
|
172
|
+
const o = i, t = z(
|
|
167
173
|
"vuiless"
|
|
168
|
-
),
|
|
174
|
+
), r = p(
|
|
169
175
|
() => ({
|
|
170
|
-
v:
|
|
171
|
-
data:
|
|
172
|
-
context:
|
|
173
|
-
entry:
|
|
176
|
+
v: t.value.formData[o.field],
|
|
177
|
+
data: t == null ? void 0 : t.value.formData,
|
|
178
|
+
context: t == null ? void 0 : t.value.formContext,
|
|
179
|
+
entry: o
|
|
174
180
|
})
|
|
175
|
-
)
|
|
176
|
-
|
|
181
|
+
);
|
|
182
|
+
function l(s) {
|
|
183
|
+
return typeof s == "function" ? p(() => $(s, r.value, !0)) : k(s);
|
|
184
|
+
}
|
|
185
|
+
const h = l(o.label), v = l(o.description), _ = l(o.hint), y = l(o.placeholder), f = l(o.optional), u = l(o.disabled), C = l(o.hidden), c = l(o.options), a = p(() => {
|
|
186
|
+
const s = j(o.classes, r.value);
|
|
177
187
|
return typeof s == "string" ? {
|
|
178
188
|
[s]: !0,
|
|
179
|
-
disabled:
|
|
180
|
-
|
|
181
|
-
required: !h.value
|
|
189
|
+
disabled: u.value,
|
|
190
|
+
required: !f.value
|
|
182
191
|
} : {
|
|
183
192
|
...s || {},
|
|
184
|
-
disabled:
|
|
185
|
-
|
|
186
|
-
required: !h.value
|
|
193
|
+
disabled: u.value,
|
|
194
|
+
required: !f.value
|
|
187
195
|
};
|
|
188
|
-
}),
|
|
189
|
-
() =>
|
|
190
|
-
),
|
|
196
|
+
}), x = p(
|
|
197
|
+
() => j(o.styles, r.value)
|
|
198
|
+
), m = p(() => j(o.attrs, r.value)), d = p(() => {
|
|
191
199
|
var s;
|
|
192
|
-
return (s =
|
|
193
|
-
(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
200
|
+
return (s = o.validators) == null ? void 0 : s.map(
|
|
201
|
+
(e) => (V, q, S) => $(
|
|
202
|
+
e,
|
|
203
|
+
{
|
|
204
|
+
v: V,
|
|
205
|
+
data: q,
|
|
206
|
+
context: S,
|
|
207
|
+
entry: o
|
|
208
|
+
},
|
|
209
|
+
!0
|
|
210
|
+
)
|
|
199
211
|
);
|
|
200
212
|
});
|
|
201
|
-
return (s,
|
|
202
|
-
modelValue:
|
|
203
|
-
"onUpdate:modelValue":
|
|
204
|
-
rules:
|
|
213
|
+
return (s, e) => (b(), B(n(te), {
|
|
214
|
+
modelValue: n(t).formData[o.field],
|
|
215
|
+
"onUpdate:modelValue": e[0] || (e[0] = (V) => n(t).formData[o.field] = V),
|
|
216
|
+
rules: d.value
|
|
205
217
|
}, {
|
|
206
|
-
default:
|
|
218
|
+
default: M((V) => [
|
|
207
219
|
D(s.$slots, "default", {
|
|
208
220
|
onBlur: V.onBlur,
|
|
209
|
-
error: V.error,
|
|
221
|
+
error: s.error || V.error,
|
|
210
222
|
model: V.model,
|
|
211
|
-
formData:
|
|
212
|
-
formContext:
|
|
213
|
-
label:
|
|
214
|
-
description:
|
|
215
|
-
hint:
|
|
216
|
-
placeholder:
|
|
223
|
+
formData: n(t).formData,
|
|
224
|
+
formContext: n(t).formContext,
|
|
225
|
+
label: n(h),
|
|
226
|
+
description: n(v),
|
|
227
|
+
hint: n(_),
|
|
228
|
+
placeholder: n(y),
|
|
217
229
|
classes: {
|
|
218
230
|
...a.value,
|
|
219
|
-
error: !!V.error
|
|
231
|
+
error: !!s.error || !!V.error
|
|
220
232
|
},
|
|
221
|
-
styles:
|
|
222
|
-
optional:
|
|
223
|
-
disabled:
|
|
224
|
-
hidden:
|
|
233
|
+
styles: x.value,
|
|
234
|
+
optional: n(f),
|
|
235
|
+
disabled: n(u),
|
|
236
|
+
hidden: n(C),
|
|
225
237
|
type: s.type,
|
|
226
238
|
altAction: s.altAction,
|
|
227
239
|
component: s.component,
|
|
228
240
|
vName: s.name,
|
|
229
241
|
field: s.field,
|
|
230
|
-
options:
|
|
242
|
+
options: n(c),
|
|
231
243
|
length: s.length,
|
|
232
|
-
required: !
|
|
244
|
+
required: !n(f),
|
|
233
245
|
autocomplete: s.autocomplete,
|
|
234
|
-
attrs:
|
|
246
|
+
attrs: m.value
|
|
235
247
|
})
|
|
236
248
|
]),
|
|
237
249
|
_: 3
|
|
238
250
|
}, 8, ["modelValue", "rules"]));
|
|
239
251
|
}
|
|
240
|
-
}),
|
|
252
|
+
}), ae = { key: 0 }, ne = { key: 1 }, le = { key: 0 }, se = ["onUpdate:modelValue", "onBlur", "placeholder", "autocomplete", "name", "type"], ue = { class: "oo-error-slot" }, ie = { key: 4 }, me = { key: 5 }, ce = ["disabled"], pe = /* @__PURE__ */ U({
|
|
241
253
|
__name: "oo-form",
|
|
242
254
|
props: {
|
|
243
255
|
form: {},
|
|
@@ -245,127 +257,156 @@ const ee = /* @__PURE__ */ q({
|
|
|
245
257
|
formContext: {},
|
|
246
258
|
firstValidation: {},
|
|
247
259
|
components: {},
|
|
248
|
-
types: {}
|
|
260
|
+
types: {},
|
|
261
|
+
errors: {}
|
|
249
262
|
},
|
|
250
|
-
emits: ["submit"],
|
|
251
|
-
setup(
|
|
252
|
-
const
|
|
263
|
+
emits: ["submit", "action", "unsupported-action"],
|
|
264
|
+
setup(i, { emit: o }) {
|
|
265
|
+
const t = i, r = p(() => t.form.executable()), l = p(
|
|
253
266
|
() => ({
|
|
254
267
|
v: void 0,
|
|
255
268
|
data: v.value,
|
|
256
|
-
context:
|
|
257
|
-
entry:
|
|
269
|
+
context: t.formContext,
|
|
270
|
+
entry: t
|
|
258
271
|
})
|
|
259
|
-
),
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
272
|
+
), h = k({}), v = p(() => t.formData || h.value);
|
|
273
|
+
function _(a) {
|
|
274
|
+
return typeof a == "function" ? p(() => $(a, l.value)) : k(a);
|
|
275
|
+
}
|
|
276
|
+
const y = _(r.value.submit.disabled), f = _(r.value.submit.text), u = _(r.value.title);
|
|
277
|
+
function C(a) {
|
|
278
|
+
t.form.supportsAltAction(a) ? c("action", a, v.value) : c("unsupported-action", a, v.value);
|
|
279
|
+
}
|
|
280
|
+
const c = o;
|
|
281
|
+
return (a, x) => (b(), B(n(oe), {
|
|
282
|
+
"first-validation": a.firstValidation,
|
|
283
|
+
onSubmit: x[0] || (x[0] = (m) => c("submit", m)),
|
|
265
284
|
"form-data": v.value,
|
|
266
|
-
"form-context":
|
|
285
|
+
"form-context": a.formContext
|
|
267
286
|
}, {
|
|
268
|
-
default:
|
|
269
|
-
D(
|
|
270
|
-
clearErrors:
|
|
271
|
-
reset:
|
|
287
|
+
default: M((m) => [
|
|
288
|
+
D(a.$slots, "form.header", {
|
|
289
|
+
clearErrors: m.clearErrors,
|
|
290
|
+
reset: m.reset,
|
|
291
|
+
title: n(u),
|
|
292
|
+
formContext: a.formContext,
|
|
293
|
+
disabled: n(y)
|
|
272
294
|
}, () => [
|
|
273
|
-
|
|
295
|
+
n(u) ? (b(), E("h2", ae, g(n(u)), 1)) : H("", !0)
|
|
274
296
|
]),
|
|
275
|
-
D(
|
|
276
|
-
clearErrors:
|
|
277
|
-
reset:
|
|
297
|
+
D(a.$slots, "form.before", {
|
|
298
|
+
clearErrors: m.clearErrors,
|
|
299
|
+
reset: m.reset
|
|
278
300
|
}),
|
|
279
|
-
(
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
required: !e.required,
|
|
299
|
-
disabled: e.disabled,
|
|
300
|
-
hidden: e.hidden,
|
|
301
|
-
type: e.type,
|
|
302
|
-
"alt-action": e.altAction,
|
|
303
|
-
name: e.vName,
|
|
304
|
-
field: e,
|
|
305
|
-
options: e.options,
|
|
306
|
-
length: e.length,
|
|
307
|
-
autocomplete: e.autocomplete
|
|
308
|
-
}, e.attrs), null, 16, ["on-blur", "error", "model", "form-data", "form-context", "label", "description", "hint", "placeholder", "class", "style", "optional", "required", "disabled", "hidden", "type", "alt-action", "name", "field", "options", "length", "autocomplete"])) : a.component && !((g = o.components) != null && g[a.component]) ? (m(), C("div", ae, " [" + b(e.label) + '] Component "' + b(e.component) + '" not supplied ', 1)) : (s = o.types) != null && s[a.type] ? (m(), B(F(o.types[a.type]), H({
|
|
309
|
-
key: 2,
|
|
310
|
-
"on-blur": e.onBlur,
|
|
311
|
-
error: e.error,
|
|
312
|
-
model: e.model,
|
|
313
|
-
"form-data": e.formData,
|
|
314
|
-
"form-context": e.formContext,
|
|
315
|
-
label: e.label,
|
|
316
|
-
description: e.description,
|
|
317
|
-
hint: e.hint,
|
|
318
|
-
placeholder: e.placeholder,
|
|
319
|
-
class: e.classes,
|
|
320
|
-
style: e.styles,
|
|
321
|
-
optional: e.optional,
|
|
322
|
-
required: !e.required,
|
|
323
|
-
disabled: e.disabled,
|
|
324
|
-
hidden: e.hidden,
|
|
325
|
-
type: e.type,
|
|
326
|
-
"alt-action": e.altAction,
|
|
327
|
-
name: e.vName,
|
|
328
|
-
field: e,
|
|
329
|
-
options: e.options,
|
|
330
|
-
length: e.length,
|
|
331
|
-
autocomplete: e.autocomplete
|
|
332
|
-
}, e.attrs), null, 16, ["on-blur", "error", "model", "form-data", "form-context", "label", "description", "hint", "placeholder", "class", "style", "optional", "required", "disabled", "hidden", "type", "alt-action", "name", "field", "options", "length", "autocomplete"])) : ["text", "password", "number"].includes(e.type) ? (m(), C("div", {
|
|
333
|
-
key: 3,
|
|
334
|
-
class: X(["oo-default-field", e.classes])
|
|
335
|
-
}, [
|
|
336
|
-
$("label", null, b(e.label), 1),
|
|
337
|
-
e.description ? (m(), C("span", ne, b(e.description), 1)) : j("", !0),
|
|
338
|
-
Y($("input", {
|
|
339
|
-
"onUpdate:modelValue": (E) => e.model.value = E,
|
|
340
|
-
onBlur: e.onBlur,
|
|
301
|
+
(b(!0), E(J, null, K(r.value.entries, (d) => {
|
|
302
|
+
var s;
|
|
303
|
+
return b(), B(re, N(d, {
|
|
304
|
+
error: (s = a.errors) == null ? void 0 : s[d.field]
|
|
305
|
+
}), {
|
|
306
|
+
default: M((e) => [
|
|
307
|
+
D(a.$slots, `field:${e.type}`, Q(X(e)), () => {
|
|
308
|
+
var V, q, S;
|
|
309
|
+
return [
|
|
310
|
+
d.component && ((V = t.components) != null && V[d.component]) ? (b(), B(P(t.components[d.component]), N({
|
|
311
|
+
key: 0,
|
|
312
|
+
"on-blur": e.onBlur,
|
|
313
|
+
error: e.error,
|
|
314
|
+
model: e.model,
|
|
315
|
+
"form-data": e.formData,
|
|
316
|
+
"form-context": e.formContext,
|
|
317
|
+
label: e.label,
|
|
318
|
+
description: e.description,
|
|
319
|
+
hint: e.hint,
|
|
341
320
|
placeholder: e.placeholder,
|
|
321
|
+
class: e.classes,
|
|
322
|
+
style: e.styles,
|
|
323
|
+
optional: e.optional,
|
|
324
|
+
required: !e.required,
|
|
325
|
+
disabled: e.disabled,
|
|
326
|
+
hidden: e.hidden,
|
|
327
|
+
type: e.type,
|
|
328
|
+
"alt-action": e.altAction,
|
|
329
|
+
name: e.vName,
|
|
330
|
+
field: e,
|
|
331
|
+
options: e.options,
|
|
332
|
+
length: e.length,
|
|
342
333
|
autocomplete: e.autocomplete,
|
|
334
|
+
onAction: C
|
|
335
|
+
}, e.attrs, {
|
|
336
|
+
modelValue: e.model.value,
|
|
337
|
+
"onUpdate:modelValue": (A) => e.model.value = A
|
|
338
|
+
}), null, 16, ["on-blur", "error", "model", "form-data", "form-context", "label", "description", "hint", "placeholder", "class", "style", "optional", "required", "disabled", "hidden", "type", "alt-action", "name", "field", "options", "length", "autocomplete", "modelValue", "onUpdate:modelValue"])) : d.component && !((q = t.components) != null && q[d.component]) ? (b(), E("div", ne, " [" + g(e.label) + '] Component "' + g(e.component) + '" not supplied ', 1)) : (S = t.types) != null && S[d.type] ? (b(), B(P(t.types[d.type]), N({
|
|
339
|
+
key: 2,
|
|
340
|
+
"on-blur": e.onBlur,
|
|
341
|
+
error: e.error,
|
|
342
|
+
model: e.model,
|
|
343
|
+
"form-data": e.formData,
|
|
344
|
+
"form-context": e.formContext,
|
|
345
|
+
label: e.label,
|
|
346
|
+
description: e.description,
|
|
347
|
+
hint: e.hint,
|
|
348
|
+
placeholder: e.placeholder,
|
|
349
|
+
class: e.classes,
|
|
350
|
+
style: e.styles,
|
|
351
|
+
optional: e.optional,
|
|
352
|
+
required: !e.required,
|
|
353
|
+
disabled: e.disabled,
|
|
354
|
+
hidden: e.hidden,
|
|
355
|
+
type: e.type,
|
|
356
|
+
"alt-action": e.altAction,
|
|
343
357
|
name: e.vName,
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
+
field: e,
|
|
359
|
+
options: e.options,
|
|
360
|
+
length: e.length,
|
|
361
|
+
autocomplete: e.autocomplete,
|
|
362
|
+
onAction: C
|
|
363
|
+
}, e.attrs, {
|
|
364
|
+
modelValue: e.model.value,
|
|
365
|
+
"onUpdate:modelValue": (A) => e.model.value = A
|
|
366
|
+
}), null, 16, ["on-blur", "error", "model", "form-data", "form-context", "label", "description", "hint", "placeholder", "class", "style", "optional", "required", "disabled", "hidden", "type", "alt-action", "name", "field", "options", "length", "autocomplete", "modelValue", "onUpdate:modelValue"])) : ["text", "password", "number"].includes(e.type) ? (b(), E("div", {
|
|
367
|
+
key: 3,
|
|
368
|
+
class: Y(["oo-default-field", e.classes])
|
|
369
|
+
}, [
|
|
370
|
+
w("label", null, g(e.label), 1),
|
|
371
|
+
e.description ? (b(), E("span", le, g(e.description), 1)) : H("", !0),
|
|
372
|
+
Z(w("input", {
|
|
373
|
+
"onUpdate:modelValue": (A) => e.model.value = A,
|
|
374
|
+
onBlur: e.onBlur,
|
|
375
|
+
placeholder: e.placeholder,
|
|
376
|
+
autocomplete: e.autocomplete,
|
|
377
|
+
name: e.vName,
|
|
378
|
+
type: e.type
|
|
379
|
+
}, null, 40, se), [
|
|
380
|
+
[ee, e.model.value]
|
|
381
|
+
]),
|
|
382
|
+
w("div", ue, g(e.error || e.hint), 1)
|
|
383
|
+
], 2)) : e.type === "paragraph" ? (b(), E("p", ie, g(e.description), 1)) : (b(), E("div", me, " [" + g(e.label) + '] Not supported field type "' + g(e.type) + '" ' + g(e.component), 1))
|
|
384
|
+
];
|
|
385
|
+
})
|
|
386
|
+
]),
|
|
387
|
+
_: 2
|
|
388
|
+
}, 1040, ["error"]);
|
|
389
|
+
}), 256)),
|
|
390
|
+
D(a.$slots, "form.after", {
|
|
391
|
+
clearErrors: m.clearErrors,
|
|
392
|
+
reset: m.reset,
|
|
393
|
+
disabled: n(y),
|
|
394
|
+
formContext: a.formContext
|
|
358
395
|
}),
|
|
359
|
-
D(
|
|
360
|
-
disabled:
|
|
361
|
-
|
|
362
|
-
|
|
396
|
+
D(a.$slots, "form.submit", {
|
|
397
|
+
disabled: n(y),
|
|
398
|
+
text: n(f),
|
|
399
|
+
clearErrors: m.clearErrors,
|
|
400
|
+
reset: m.reset,
|
|
401
|
+
formContext: a.formContext
|
|
363
402
|
}, () => [
|
|
364
|
-
|
|
403
|
+
w("button", { disabled: n(y) }, g(n(f)), 9, ce)
|
|
365
404
|
]),
|
|
366
|
-
D(
|
|
367
|
-
|
|
368
|
-
|
|
405
|
+
D(a.$slots, "form.footer", {
|
|
406
|
+
disabled: n(y),
|
|
407
|
+
clearErrors: m.clearErrors,
|
|
408
|
+
reset: m.reset,
|
|
409
|
+
formContext: a.formContext
|
|
369
410
|
})
|
|
370
411
|
]),
|
|
371
412
|
_: 3
|
|
@@ -373,6 +414,6 @@ const ee = /* @__PURE__ */ q({
|
|
|
373
414
|
}
|
|
374
415
|
});
|
|
375
416
|
export {
|
|
376
|
-
|
|
377
|
-
|
|
417
|
+
re as OoField,
|
|
418
|
+
pe as OoForm
|
|
378
419
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(V,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(V=typeof globalThis<"u"?globalThis:V||self,e(V.index={},V.Vue))})(this,function(V,e){"use strict";function B(c,r,o){if(typeof c=="function"){if(c.__deserialized)return c(r);{const n=o?[r.v,r.data,r.context,r.entry]:[r.data,r.context,r.entry];return c(...n)}}return c}function E(c,r){if(typeof c=="object"&&c!==null){const o={};for(const[n,l]of Object.entries(c))o[n]=B(l,r,!0);return o}return B(c,r,!0)}const A=e.defineComponent({__name:"VuilessField",props:e.mergeModels({rules:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(c){const r=c,o=e.useModel(c,"modelValue"),n=e.inject("vuiless"),l=e.ref(),f=e.ref(!1),u=e.ref(!1),C=e.computed(()=>{var d;if((d=n==null?void 0:n.value)!=null&&d.firstValidation)switch(n.value.firstValidation){case"on-change":return n.value.firstSubmitHappened||f.value;case"touched-on-blur":return n.value.firstSubmitHappened||u.value&&f.value;case"on-blur":return n.value.firstSubmitHappened||u.value;case"on-submit":return n.value.firstSubmitHappened;case"none":return!1}return!1}),y=e.computed(()=>{if(C.value||l.value)return b()});e.watch([o],()=>{l.value=void 0,f.value=!0}),e.onUnmounted(()=>{var d;(d=n==null?void 0:n.value)==null||d.unregister(e.getCurrentInstance())}),n!=null&&n.value&&n.value.register(e.getCurrentInstance(),{validate:()=>(l.value=b(),l.value||!0),clearErrors:()=>{f.value=!1,u.value=!1,l.value=void 0},reset:()=>{o.value=""}});function b(){var d,a,k;if((d=r.rules)!=null&&d.length)for(const m of r.rules){const p=m(o.value,(a=n==null?void 0:n.value)==null?void 0:a.formData,(k=n==null?void 0:n.value)==null?void 0:k.formContext);if(p!==!0)return p||"Wrong value"}}function i(){u.value=!0}const h={v:e.computed({get:()=>o.value,set:d=>o.value=d})};return(d,a)=>{var k,m;return e.renderSlot(d.$slots,"default",{onBlur:i,error:y.value,formData:(k=e.unref(n))==null?void 0:k.formData,formContext:(m=e.unref(n))==null?void 0:m.formContext,model:h.v})}}}),N=e.defineComponent({__name:"VuilessForm",props:{formData:{},formContext:{},firstValidation:{default:"on-change"}},emits:["submit"],setup(c,{emit:r}){const o=c,n=r,l=new Map,f=e.ref(!1),u=e.computed(()=>({firstSubmitHappened:f.value,firstValidation:o.firstValidation,register:(i,h)=>{l.set(i,h)},unregister:i=>l.delete(i),formData:o.formData,formContext:o.formContext}));e.provide("vuiless",u);function C(){f.value=!1;for(const{clearErrors:i}of l.values())i()}async function y(){for(const{reset:i}of l.values())i();await e.nextTick(),C()}function b(){f.value=!0;let i=!1;if(o.firstValidation!=="none")for(const{validate:h}of l.values())h()!==!0&&(i=!0);i||n("submit",o.formData)}return(i,h)=>(e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(b,["prevent"])},[e.renderSlot(i.$slots,"default",{clearErrors:C,reset:y})],32))}}),_=e.defineComponent({__name:"oo-field",props:{field:{},altAction:{},label:{},description:{},hint:{},placeholder:{},classes:{},styles:{},type:{},component:{},autocomplete:{},name:{},value:{},options:{},attrs:{},optional:{},disabled:{},hidden:{},length:{},validators:{},error:{}},setup(c){const r=c,o=e.inject("vuiless"),n=e.computed(()=>({v:o.value.formData[r.field],data:o==null?void 0:o.value.formData,context:o==null?void 0:o.value.formContext,entry:r}));function l(s){return typeof s=="function"?e.computed(()=>B(s,n.value,!0)):e.ref(s)}const f=l(r.label),u=l(r.description),C=l(r.hint),y=l(r.placeholder),b=l(r.optional),i=l(r.disabled),h=l(r.hidden),d=l(r.options),a=e.computed(()=>{const s=E(r.classes,n.value);return typeof s=="string"?{[s]:!0,disabled:i.value,required:!b.value}:{...s||{},disabled:i.value,required:!b.value}}),k=e.computed(()=>E(r.styles,n.value)),m=e.computed(()=>E(r.attrs,n.value)),p=e.computed(()=>{var s;return(s=r.validators)==null?void 0:s.map(t=>(g,S,x)=>B(t,{v:g,data:S,context:x,entry:r},!0))});return(s,t)=>(e.openBlock(),e.createBlock(e.unref(A),{modelValue:e.unref(o).formData[r.field],"onUpdate:modelValue":t[0]||(t[0]=g=>e.unref(o).formData[r.field]=g),rules:p.value},{default:e.withCtx(g=>[e.renderSlot(s.$slots,"default",{onBlur:g.onBlur,error:s.error||g.error,model:g.model,formData:e.unref(o).formData,formContext:e.unref(o).formContext,label:e.unref(f),description:e.unref(u),hint:e.unref(C),placeholder:e.unref(y),classes:{...a.value,error:!!s.error||!!g.error},styles:k.value,optional:e.unref(b),disabled:e.unref(i),hidden:e.unref(h),type:s.type,altAction:s.altAction,component:s.component,vName:s.name,field:s.field,options:e.unref(d),length:s.length,required:!e.unref(b),autocomplete:s.autocomplete,attrs:m.value})]),_:3},8,["modelValue","rules"]))}}),$={key:0},q={key:1},w={key:0},j=["onUpdate:modelValue","onBlur","placeholder","autocomplete","name","type"],U={class:"oo-error-slot"},M={key:4},O={key:5},P=["disabled"],H=e.defineComponent({__name:"oo-form",props:{form:{},formData:{},formContext:{},firstValidation:{},components:{},types:{},errors:{}},emits:["submit","action","unsupported-action"],setup(c,{emit:r}){const o=c,n=e.computed(()=>o.form.executable()),l=e.computed(()=>({v:void 0,data:u.value,context:o.formContext,entry:o})),f=e.ref({}),u=e.computed(()=>o.formData||f.value);function C(a){return typeof a=="function"?e.computed(()=>B(a,l.value)):e.ref(a)}const y=C(n.value.submit.disabled),b=C(n.value.submit.text),i=C(n.value.title);function h(a){o.form.supportsAltAction(a)?d("action",a,u.value):d("unsupported-action",a,u.value)}const d=r;return(a,k)=>(e.openBlock(),e.createBlock(e.unref(N),{"first-validation":a.firstValidation,onSubmit:k[0]||(k[0]=m=>d("submit",m)),"form-data":u.value,"form-context":a.formContext},{default:e.withCtx(m=>[e.renderSlot(a.$slots,"form.header",{clearErrors:m.clearErrors,reset:m.reset,title:e.unref(i),formContext:a.formContext,disabled:e.unref(y)},()=>[e.unref(i)?(e.openBlock(),e.createElementBlock("h2",$,e.toDisplayString(e.unref(i)),1)):e.createCommentVNode("",!0)]),e.renderSlot(a.$slots,"form.before",{clearErrors:m.clearErrors,reset:m.reset}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value.entries,p=>{var s;return e.openBlock(),e.createBlock(_,e.mergeProps(p,{error:(s=a.errors)==null?void 0:s[p.field]}),{default:e.withCtx(t=>[e.renderSlot(a.$slots,`field:${t.type}`,e.normalizeProps(e.guardReactiveProps(t)),()=>{var g,S,x;return[p.component&&((g=o.components)!=null&&g[p.component])?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.components[p.component]),e.mergeProps({key:0,"on-blur":t.onBlur,error:t.error,model:t.model,"form-data":t.formData,"form-context":t.formContext,label:t.label,description:t.description,hint:t.hint,placeholder:t.placeholder,class:t.classes,style:t.styles,optional:t.optional,required:!t.required,disabled:t.disabled,hidden:t.hidden,type:t.type,"alt-action":t.altAction,name:t.vName,field:t,options:t.options,length:t.length,autocomplete:t.autocomplete,onAction:h},t.attrs,{modelValue:t.model.value,"onUpdate:modelValue":D=>t.model.value=D}),null,16,["on-blur","error","model","form-data","form-context","label","description","hint","placeholder","class","style","optional","required","disabled","hidden","type","alt-action","name","field","options","length","autocomplete","modelValue","onUpdate:modelValue"])):p.component&&!((S=o.components)!=null&&S[p.component])?(e.openBlock(),e.createElementBlock("div",q," ["+e.toDisplayString(t.label)+'] Component "'+e.toDisplayString(t.component)+'" not supplied ',1)):(x=o.types)!=null&&x[p.type]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.types[p.type]),e.mergeProps({key:2,"on-blur":t.onBlur,error:t.error,model:t.model,"form-data":t.formData,"form-context":t.formContext,label:t.label,description:t.description,hint:t.hint,placeholder:t.placeholder,class:t.classes,style:t.styles,optional:t.optional,required:!t.required,disabled:t.disabled,hidden:t.hidden,type:t.type,"alt-action":t.altAction,name:t.vName,field:t,options:t.options,length:t.length,autocomplete:t.autocomplete,onAction:h},t.attrs,{modelValue:t.model.value,"onUpdate:modelValue":D=>t.model.value=D}),null,16,["on-blur","error","model","form-data","form-context","label","description","hint","placeholder","class","style","optional","required","disabled","hidden","type","alt-action","name","field","options","length","autocomplete","modelValue","onUpdate:modelValue"])):["text","password","number"].includes(t.type)?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["oo-default-field",t.classes])},[e.createElementVNode("label",null,e.toDisplayString(t.label),1),t.description?(e.openBlock(),e.createElementBlock("span",w,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":D=>t.model.value=D,onBlur:t.onBlur,placeholder:t.placeholder,autocomplete:t.autocomplete,name:t.vName,type:t.type},null,40,j),[[e.vModelDynamic,t.model.value]]),e.createElementVNode("div",U,e.toDisplayString(t.error||t.hint),1)],2)):t.type==="paragraph"?(e.openBlock(),e.createElementBlock("p",M,e.toDisplayString(t.description),1)):(e.openBlock(),e.createElementBlock("div",O," ["+e.toDisplayString(t.label)+'] Not supported field type "'+e.toDisplayString(t.type)+'" '+e.toDisplayString(t.component),1))]})]),_:2},1040,["error"])}),256)),e.renderSlot(a.$slots,"form.after",{clearErrors:m.clearErrors,reset:m.reset,disabled:e.unref(y),formContext:a.formContext}),e.renderSlot(a.$slots,"form.submit",{disabled:e.unref(y),text:e.unref(b),clearErrors:m.clearErrors,reset:m.reset,formContext:a.formContext},()=>[e.createElementVNode("button",{disabled:e.unref(y)},e.toDisplayString(e.unref(b)),9,P)]),e.renderSlot(a.$slots,"form.footer",{disabled:e.unref(y),clearErrors:m.clearErrors,reset:m.reset,formContext:a.formContext})]),_:3},8,["first-validation","form-data","form-context"]))}});V.OoField=_,V.OoForm=H,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foormjs/vue",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "@foormjs/vue",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"type-check": "vue-tsc --build --force"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"foorm": "0.0
|
|
50
|
+
"foorm": "0.1.0",
|
|
51
51
|
"vue": "^3.3.9",
|
|
52
52
|
"vuiless-forms": "^0.0.3"
|
|
53
53
|
},
|