@effect-app/vue-components 0.12.19 → 0.12.21
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/types/components/OmegaForm/InputProps.d.ts +5 -47
- package/dist/types/components/OmegaForm/OmegaArray.vue.d.ts +5 -5
- package/dist/types/components/OmegaForm/OmegaAutoGen.vue.d.ts +8 -9
- package/dist/types/components/OmegaForm/OmegaFormInput.vue.d.ts +4 -3
- package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +14 -13
- package/dist/types/components/OmegaForm/OmegaInput.vue.d.ts +2 -3
- package/dist/types/components/OmegaForm/OmegaInputVuetify.vue.d.ts +2 -2
- package/dist/types/components/OmegaForm/OmegaInternalInput.vue.d.ts +6 -6
- package/dist/types/components/OmegaForm/OmegaWrapper.vue.d.ts +3 -3
- package/dist/types/components/OmegaForm/index.d.ts +2 -1
- package/dist/types/components/OmegaForm/useOmegaForm.d.ts +2 -2
- package/dist/vue-components.es.js +15 -13
- package/dist/vue-components.es10.js +246 -6
- package/dist/vue-components.es11.js +5 -5
- package/dist/vue-components.es12.js +6 -111
- package/dist/vue-components.es13.js +113 -0
- package/dist/vue-components.es15.js +7 -2
- package/dist/vue-components.es16.js +2 -89
- package/dist/vue-components.es17.js +4 -0
- package/dist/vue-components.es18.js +89 -2
- package/dist/vue-components.es2.js +17 -15
- package/dist/vue-components.es20.js +2 -5
- package/dist/vue-components.es21.js +2 -32
- package/dist/vue-components.es22.js +5 -2
- package/dist/vue-components.es23.js +2 -2
- package/dist/vue-components.es24.js +90 -11
- package/dist/vue-components.es25.js +11 -90
- package/dist/vue-components.es26.js +1 -1
- package/dist/vue-components.es4.js +2 -2
- package/dist/vue-components.es5.js +28 -66
- package/dist/vue-components.es6.js +65 -55
- package/dist/vue-components.es7.js +60 -29
- package/dist/vue-components.es8.js +28 -124
- package/dist/vue-components.es9.js +118 -241
- package/package.json +5 -9
- package/src/components/OmegaForm/InputProps.ts +37 -64
- package/src/components/OmegaForm/OmegaArray.vue +5 -3
- package/src/components/OmegaForm/OmegaAutoGen.vue +10 -10
- package/src/components/OmegaForm/OmegaFormInput.vue +6 -8
- package/src/components/OmegaForm/OmegaFormStuff.ts +76 -77
- package/src/components/OmegaForm/OmegaInput.vue +1 -2
- package/src/components/OmegaForm/OmegaInputVuetify.vue +3 -3
- package/src/components/OmegaForm/OmegaInternalInput.vue +5 -5
- package/src/components/OmegaForm/OmegaWrapper.vue +2 -2
- package/src/components/OmegaForm/index.ts +2 -1
- package/src/components/OmegaForm/useOmegaForm.ts +20 -22
- package/dist/vue-components.es14.js +0 -9
- package/dist/vue-components.es19.js +0 -4
|
@@ -1,127 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
r.search = e.toString(), window.history.replaceState({}, "", r.toString());
|
|
1
|
+
import { ref as l, computed as p, readonly as v, provide as E, inject as f } from "vue";
|
|
2
|
+
const s = Symbol();
|
|
3
|
+
function g(o, i, t = "onSubmit") {
|
|
4
|
+
const r = l([]), n = (e) => {
|
|
5
|
+
r.value = r.value.filter((d) => d.inputId !== e);
|
|
6
|
+
}, c = (e) => {
|
|
7
|
+
n(e.inputId), r.value.push(e);
|
|
8
|
+
}, m = () => {
|
|
9
|
+
r.value = [];
|
|
10
|
+
}, a = p(() => t === "onSubmit" ? o.value > 0 : !0), u = {
|
|
11
|
+
errors: v(r),
|
|
12
|
+
addError: c,
|
|
13
|
+
removeError: n,
|
|
14
|
+
clearErrors: m,
|
|
15
|
+
showErrors: a,
|
|
16
|
+
generalErrors: i,
|
|
17
|
+
showErrorsOn: t ?? "onSubmit"
|
|
19
18
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
let e;
|
|
29
|
-
const r = o?.persistency;
|
|
30
|
-
if (!r?.policies || r.policies.length === 0) return {};
|
|
31
|
-
if (r.policies.includes("querystring"))
|
|
32
|
-
try {
|
|
33
|
-
const t = new URLSearchParams(window.location.search).get(n.value);
|
|
34
|
-
g(), t && (e = JSON.parse(t));
|
|
35
|
-
} catch (s) {
|
|
36
|
-
console.error(s);
|
|
37
|
-
}
|
|
38
|
-
if (
|
|
39
|
-
// query string has higher priority than local/session storage
|
|
40
|
-
!e && (r.policies.includes("local") || r.policies.includes("session"))
|
|
41
|
-
) {
|
|
42
|
-
const s = r.policies.includes("local") ? localStorage : sessionStorage;
|
|
43
|
-
if (s)
|
|
44
|
-
try {
|
|
45
|
-
const t = JSON.parse(
|
|
46
|
-
s.getItem(n.value) || "{}"
|
|
47
|
-
);
|
|
48
|
-
s.removeItem(n.value), e = t;
|
|
49
|
-
} catch (t) {
|
|
50
|
-
console.error(t);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (e ??= {}, i?.defaultValues == null)
|
|
54
|
-
return e;
|
|
55
|
-
{
|
|
56
|
-
const s = i?.defaultValues;
|
|
57
|
-
return m(s, e);
|
|
58
|
-
}
|
|
59
|
-
}), a = j({
|
|
60
|
-
...i,
|
|
61
|
-
validators: {
|
|
62
|
-
onSubmit: S,
|
|
63
|
-
...i?.validators || {}
|
|
64
|
-
},
|
|
65
|
-
onSubmit: i?.onSubmit ? ({ formApi: e, meta: r, value: s }) => i.onSubmit?.({
|
|
66
|
-
formApi: e,
|
|
67
|
-
meta: r,
|
|
68
|
-
value: s
|
|
69
|
-
}) : void 0,
|
|
70
|
-
defaultValues: V.value
|
|
71
|
-
}), L = () => {
|
|
72
|
-
Object.keys(l).forEach((e) => {
|
|
73
|
-
a.setFieldValue(e, void 0);
|
|
74
|
-
});
|
|
75
|
-
}, p = (e) => e.reduce(
|
|
76
|
-
(r, s) => {
|
|
77
|
-
const t = s.split(".");
|
|
78
|
-
return t.reduce((c, u, U) => (U === t.length - 1 ? c[u] = a.getFieldValue(s) : c[u] = c[u] ?? {}, c[u]), r), r;
|
|
79
|
-
},
|
|
80
|
-
{}
|
|
81
|
-
), w = (e) => {
|
|
82
|
-
if (e) {
|
|
83
|
-
if (Array.isArray(e.keys))
|
|
84
|
-
return p(e.keys);
|
|
85
|
-
if (Array.isArray(e.banKeys)) {
|
|
86
|
-
const r = Object.keys(l).filter(
|
|
87
|
-
(s) => e.banKeys?.includes(s)
|
|
88
|
-
);
|
|
89
|
-
return p(r);
|
|
90
|
-
}
|
|
91
|
-
return a.store.state.values;
|
|
92
|
-
}
|
|
93
|
-
}, f = () => {
|
|
94
|
-
const e = o?.persistency;
|
|
95
|
-
if (!(!e?.policies || e.policies.length === 0) && (e.policies.includes("local") || e.policies.includes("session"))) {
|
|
96
|
-
const r = e.policies.includes("local") ? localStorage : sessionStorage;
|
|
97
|
-
if (!r) return;
|
|
98
|
-
const s = w(e);
|
|
99
|
-
return r.setItem(n.value, JSON.stringify(s));
|
|
100
|
-
}
|
|
101
|
-
}, y = () => {
|
|
102
|
-
const e = o?.persistency;
|
|
103
|
-
if (!(!e?.policies || e.policies.length === 0) && e.policies.includes("querystring")) {
|
|
104
|
-
const r = w(e), s = new URLSearchParams(window.location.search);
|
|
105
|
-
s.set(n.value, JSON.stringify(r));
|
|
106
|
-
const t = new URL(window.location.href);
|
|
107
|
-
t.search = s.toString(), window.history.replaceState({}, "", t.toString());
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
P(f), I(() => {
|
|
111
|
-
window.addEventListener("beforeunload", f), window.addEventListener("blur", y);
|
|
112
|
-
}), N(() => {
|
|
113
|
-
window.removeEventListener("beforeunload", f), window.removeEventListener("blur", y);
|
|
114
|
-
});
|
|
115
|
-
const h = Object.assign(a, {
|
|
116
|
-
meta: l,
|
|
117
|
-
filterItems: b,
|
|
118
|
-
clear: L
|
|
119
|
-
});
|
|
120
|
-
return R(J, h), Object.assign(h, {
|
|
121
|
-
Input: D
|
|
122
|
-
});
|
|
123
|
-
};
|
|
19
|
+
return E(s, u), u;
|
|
20
|
+
}
|
|
21
|
+
function O() {
|
|
22
|
+
const o = f(s);
|
|
23
|
+
if (!o)
|
|
24
|
+
throw new Error("useOmegaErrors must be used within an OmegaForm provider");
|
|
25
|
+
return o;
|
|
26
|
+
}
|
|
124
27
|
export {
|
|
125
|
-
|
|
126
|
-
|
|
28
|
+
s as OmegaErrorsKey,
|
|
29
|
+
g as provideOmegaErrors,
|
|
30
|
+
O as useOmegaErrors
|
|
127
31
|
};
|
|
@@ -1,248 +1,125 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
meta: { required: l, nullableOrUndefined: r }
|
|
38
|
-
})
|
|
39
|
-
);
|
|
40
|
-
} else {
|
|
41
|
-
const f = m({
|
|
42
|
-
parent: o,
|
|
43
|
-
property: s.type,
|
|
44
|
-
meta: { required: l, nullableOrUndefined: r }
|
|
45
|
-
});
|
|
46
|
-
u[o] = f;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if ("propertySignatures" in d)
|
|
50
|
-
Object.assign(
|
|
51
|
-
u,
|
|
52
|
-
m({
|
|
53
|
-
parent: o,
|
|
54
|
-
propertySignatures: d.propertySignatures,
|
|
55
|
-
meta: { required: l, nullableOrUndefined: r }
|
|
56
|
-
})
|
|
57
|
-
);
|
|
58
|
-
else {
|
|
59
|
-
const p = m({
|
|
60
|
-
parent: o,
|
|
61
|
-
property: s.type,
|
|
62
|
-
meta: { required: l, nullableOrUndefined: r }
|
|
63
|
-
});
|
|
64
|
-
u[o] = p;
|
|
1
|
+
import { useForm as j } from "@tanstack/vue-form";
|
|
2
|
+
import { S as E } from "effect-app";
|
|
3
|
+
import { generateMetaFromSchema as O } from "./vue-components.es10.js";
|
|
4
|
+
import { computed as v, onUnmounted as P, onMounted as I, onBeforeUnmount as N, provide as R } from "vue";
|
|
5
|
+
import { isObject as A } from "./vue-components.es22.js";
|
|
6
|
+
import D from "./vue-components.es5.js";
|
|
7
|
+
const F = Symbol("OmegaForm"), $ = (d, i, o) => {
|
|
8
|
+
if (!d) throw new Error("Schema is required");
|
|
9
|
+
const S = E.standardSchemaV1(d), { filterItems: b, meta: a } = O(d), n = v(() => {
|
|
10
|
+
if (o?.persistency?.id)
|
|
11
|
+
return o.persistency.id;
|
|
12
|
+
const e = window.location.pathname, r = Object.keys(a);
|
|
13
|
+
return `${e}-${r.join("-")}`;
|
|
14
|
+
}), g = () => {
|
|
15
|
+
const e = new URLSearchParams(window.location.search);
|
|
16
|
+
e.delete(n.value);
|
|
17
|
+
const r = new URL(window.location.href);
|
|
18
|
+
r.search = e.toString(), window.history.replaceState({}, "", r.toString());
|
|
19
|
+
};
|
|
20
|
+
function m(e, r) {
|
|
21
|
+
for (const s in r)
|
|
22
|
+
r[s] && A(r[s]) ? (e[s] || (e[s] = {}), m(e[s], r[s])) : e[s] = r[s];
|
|
23
|
+
return e;
|
|
24
|
+
}
|
|
25
|
+
const V = v(() => {
|
|
26
|
+
if (i?.defaultValues && !o?.persistency?.overrideDefaultValues)
|
|
27
|
+
return i?.defaultValues;
|
|
28
|
+
let e;
|
|
29
|
+
const r = o?.persistency;
|
|
30
|
+
if (!r?.policies || r.policies.length === 0) return {};
|
|
31
|
+
if (r.policies.includes("querystring"))
|
|
32
|
+
try {
|
|
33
|
+
const t = new URLSearchParams(window.location.search).get(n.value);
|
|
34
|
+
g(), t && (e = JSON.parse(t));
|
|
35
|
+
} catch (s) {
|
|
36
|
+
console.error(s);
|
|
65
37
|
}
|
|
38
|
+
if (
|
|
39
|
+
// query string has higher priority than local/session storage
|
|
40
|
+
!e && (r.policies.includes("local") || r.policies.includes("session"))
|
|
41
|
+
) {
|
|
42
|
+
const s = r.policies.includes("local") ? localStorage : sessionStorage;
|
|
43
|
+
if (s)
|
|
44
|
+
try {
|
|
45
|
+
const t = JSON.parse(
|
|
46
|
+
s.getItem(n.value) || "{}"
|
|
47
|
+
);
|
|
48
|
+
s.removeItem(n.value), e = t;
|
|
49
|
+
} catch (t) {
|
|
50
|
+
console.error(t);
|
|
51
|
+
}
|
|
66
52
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const r = n.types.find(
|
|
73
|
-
(l) => l._tag !== "UndefinedKeyword" && l !== t.Null.ast
|
|
74
|
-
);
|
|
75
|
-
return "propertySignatures" in r ? m({
|
|
76
|
-
propertySignatures: r.propertySignatures,
|
|
77
|
-
parent: i,
|
|
78
|
-
meta: e
|
|
79
|
-
}) : n.types.every(t.AST.isLiteral) ? {
|
|
80
|
-
...e,
|
|
81
|
-
type: "select",
|
|
82
|
-
members: n.types.map((l) => l.literal)
|
|
83
|
-
} : {
|
|
84
|
-
...e,
|
|
85
|
-
...m({
|
|
86
|
-
parent: i,
|
|
87
|
-
meta: e,
|
|
88
|
-
property: r
|
|
89
|
-
})
|
|
90
|
-
};
|
|
53
|
+
if (e ??= {}, i?.defaultValues == null)
|
|
54
|
+
return e;
|
|
55
|
+
{
|
|
56
|
+
const s = i?.defaultValues;
|
|
57
|
+
return m(s, e);
|
|
91
58
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}) : (e.type = t.AST.getAnnotation(
|
|
108
|
-
n,
|
|
109
|
-
t.AST.TitleAnnotationId
|
|
110
|
-
).pipe(
|
|
111
|
-
g.getOrElse(() => "unknown")
|
|
112
|
-
), e);
|
|
113
|
-
}
|
|
114
|
-
return u;
|
|
115
|
-
}, y = (e) => {
|
|
116
|
-
const i = e.ast, n = {};
|
|
117
|
-
if (i._tag === "Transformation" || i._tag === "Refinement")
|
|
118
|
-
return y(t.make(i.from));
|
|
119
|
-
if ("propertySignatures" in i) {
|
|
120
|
-
const a = m({
|
|
121
|
-
propertySignatures: i.propertySignatures
|
|
59
|
+
}), l = j({
|
|
60
|
+
...i,
|
|
61
|
+
validators: {
|
|
62
|
+
onSubmit: S,
|
|
63
|
+
...i?.validators || {}
|
|
64
|
+
},
|
|
65
|
+
onSubmit: i?.onSubmit ? ({ formApi: e, meta: r, value: s }) => i.onSubmit?.({
|
|
66
|
+
formApi: e,
|
|
67
|
+
meta: r,
|
|
68
|
+
value: s
|
|
69
|
+
}) : void 0,
|
|
70
|
+
defaultValues: V.value
|
|
71
|
+
}), L = () => {
|
|
72
|
+
Object.keys(a).forEach((e) => {
|
|
73
|
+
l.setFieldValue(e, void 0);
|
|
122
74
|
});
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
75
|
+
}, p = (e) => e.reduce((r, s) => {
|
|
76
|
+
const t = s.split(".");
|
|
77
|
+
return t.reduce((c, u, U) => (U === t.length - 1 ? c[u] = l.getFieldValue(s) : c[u] = c[u] ?? {}, c[u]), r), r;
|
|
78
|
+
}, {}), w = (e) => {
|
|
79
|
+
if (e) {
|
|
80
|
+
if (Array.isArray(e.keys))
|
|
81
|
+
return p(e.keys);
|
|
82
|
+
if (Array.isArray(e.banKeys)) {
|
|
83
|
+
const r = Object.keys(a).filter(
|
|
84
|
+
(s) => e.banKeys?.includes(s)
|
|
85
|
+
);
|
|
86
|
+
return p(r);
|
|
129
87
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
})
|
|
165
|
-
)), e.required && n.annotations({
|
|
166
|
-
message: () => i("validation.empty")
|
|
167
|
-
}), e.maxLength && (n = n.pipe(t.maxLength(e.maxLength)).annotations({
|
|
168
|
-
message: () => i("validation.string.maxLength", {
|
|
169
|
-
maxLength: e.maxLength
|
|
170
|
-
})
|
|
171
|
-
})), e.minLength && (n = n.pipe(t.minLength(e.minLength)).annotations({
|
|
172
|
-
message: () => i("validation.string.minLength", {
|
|
173
|
-
minLength: e.minLength
|
|
174
|
-
})
|
|
175
|
-
}));
|
|
176
|
-
break;
|
|
177
|
-
case "number":
|
|
178
|
-
n = t.Number.annotations({
|
|
179
|
-
message: () => i("validation.empty")
|
|
180
|
-
}), e.required && n.annotations({
|
|
181
|
-
message: () => i("validation.empty")
|
|
182
|
-
}), e.minimum && (n = n.pipe(t.greaterThanOrEqualTo(e.minimum)).annotations({
|
|
183
|
-
message: () => i("validation.number.min", {
|
|
184
|
-
minimum: e.minimum,
|
|
185
|
-
isExclusive: !0
|
|
186
|
-
})
|
|
187
|
-
})), e.maximum && (n = n.pipe(t.lessThanOrEqualTo(e.maximum)).annotations({
|
|
188
|
-
message: () => i("validation.number.max", {
|
|
189
|
-
maximum: e.maximum,
|
|
190
|
-
isExclusive: !0
|
|
191
|
-
})
|
|
192
|
-
})), e.exclusiveMinimum && (n = n.pipe(t.greaterThan(e.exclusiveMinimum)).annotations({
|
|
193
|
-
message: () => i("validation.number.min", {
|
|
194
|
-
minimum: e.exclusiveMinimum,
|
|
195
|
-
isExclusive: !1
|
|
196
|
-
})
|
|
197
|
-
})), e.exclusiveMaximum && (n = n.pipe(t.lessThan(e.exclusiveMaximum)).annotations({
|
|
198
|
-
message: () => i("validation.number.max", {
|
|
199
|
-
maximum: e.exclusiveMaximum,
|
|
200
|
-
isExclusive: !1
|
|
201
|
-
})
|
|
202
|
-
}));
|
|
203
|
-
break;
|
|
204
|
-
case "select":
|
|
205
|
-
n = t.Literal(...e.members).annotations({
|
|
206
|
-
message: () => ({
|
|
207
|
-
message: i("validation.not_a_valid", {
|
|
208
|
-
type: "select",
|
|
209
|
-
message: e.members.join(", ")
|
|
210
|
-
}),
|
|
211
|
-
override: !0
|
|
212
|
-
})
|
|
213
|
-
});
|
|
214
|
-
break;
|
|
215
|
-
case "multiple":
|
|
216
|
-
n = t.Array(t.String).annotations({
|
|
217
|
-
message: () => i("validation.not_a_valid", {
|
|
218
|
-
type: "multiple",
|
|
219
|
-
message: e.members.join(", ")
|
|
220
|
-
})
|
|
221
|
-
});
|
|
222
|
-
break;
|
|
223
|
-
case "boolean":
|
|
224
|
-
n = t.Boolean;
|
|
225
|
-
break;
|
|
226
|
-
// todo: switch must be exhaustive or have default case, otherwise falls through with schema undefined.
|
|
227
|
-
case "unknown":
|
|
228
|
-
n = t.Unknown;
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
return e.required ? n.pipe(
|
|
232
|
-
t.annotations({
|
|
233
|
-
message: () => i("validation.empty")
|
|
234
|
-
})
|
|
235
|
-
) : n = t.NullishOr(n), t.standardSchemaV1(n);
|
|
236
|
-
}, U = (e, i) => t.NullOr(e).pipe(
|
|
237
|
-
t.transform(t.typeSchema(e), {
|
|
238
|
-
decode: (n) => n ?? i(),
|
|
239
|
-
encode: (n) => n
|
|
240
|
-
})
|
|
241
|
-
);
|
|
88
|
+
return l.store.state.values;
|
|
89
|
+
}
|
|
90
|
+
}, f = () => {
|
|
91
|
+
const e = o?.persistency;
|
|
92
|
+
if (!(!e?.policies || e.policies.length === 0) && (e.policies.includes("local") || e.policies.includes("session"))) {
|
|
93
|
+
const r = e.policies.includes("local") ? localStorage : sessionStorage;
|
|
94
|
+
if (!r) return;
|
|
95
|
+
const s = w(e);
|
|
96
|
+
return r.setItem(n.value, JSON.stringify(s));
|
|
97
|
+
}
|
|
98
|
+
}, y = () => {
|
|
99
|
+
const e = o?.persistency;
|
|
100
|
+
if (!(!e?.policies || e.policies.length === 0) && e.policies.includes("querystring")) {
|
|
101
|
+
const r = w(e), s = new URLSearchParams(window.location.search);
|
|
102
|
+
s.set(n.value, JSON.stringify(r));
|
|
103
|
+
const t = new URL(window.location.href);
|
|
104
|
+
t.search = s.toString(), window.history.replaceState({}, "", t.toString());
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
P(f), I(() => {
|
|
108
|
+
window.addEventListener("beforeunload", f), window.addEventListener("blur", y);
|
|
109
|
+
}), N(() => {
|
|
110
|
+
window.removeEventListener("beforeunload", f), window.removeEventListener("blur", y);
|
|
111
|
+
});
|
|
112
|
+
const h = Object.assign(l, {
|
|
113
|
+
meta: a,
|
|
114
|
+
filterItems: b,
|
|
115
|
+
clear: L
|
|
116
|
+
});
|
|
117
|
+
return R(F, h), Object.assign(h, {
|
|
118
|
+
Input: D,
|
|
119
|
+
Field: l.Field
|
|
120
|
+
});
|
|
121
|
+
};
|
|
242
122
|
export {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
L as generateInputStandardSchemaFromFieldMeta,
|
|
246
|
-
N as generateMetaFromSchema,
|
|
247
|
-
U as nullableInput
|
|
123
|
+
F as OmegaFormKey,
|
|
124
|
+
$ as useOmegaForm
|
|
248
125
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/vue-components",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.21",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@mdi/js": "^7.4.47",
|
|
6
6
|
"@tanstack/vue-form": "^1.2.4",
|
|
@@ -14,12 +14,8 @@
|
|
|
14
14
|
"vuetify": "^3.9.4"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@storybook/
|
|
18
|
-
"@storybook/
|
|
19
|
-
"@storybook/blocks": "^8.6.14",
|
|
20
|
-
"@storybook/testing-library": "^0.2.2",
|
|
21
|
-
"@storybook/vue3": "^9.1.1",
|
|
22
|
-
"@storybook/vue3-vite": "^9.1.1",
|
|
17
|
+
"@storybook/vue3": "^9.1.2",
|
|
18
|
+
"@storybook/vue3-vite": "^9.1.2",
|
|
23
19
|
"@types/node": "^24.2.0",
|
|
24
20
|
"@typescript-eslint/eslint-plugin": "8.39.0",
|
|
25
21
|
"@typescript-eslint/parser": "8.39.0",
|
|
@@ -32,7 +28,7 @@
|
|
|
32
28
|
"jsdom": "^26.1.0",
|
|
33
29
|
"rimraf": "^6.0.1",
|
|
34
30
|
"sass": "^1.90.0",
|
|
35
|
-
"storybook": "^9.1.
|
|
31
|
+
"storybook": "^9.1.2",
|
|
36
32
|
"typescript": "~5.9.2",
|
|
37
33
|
"vite": "^7.1.0",
|
|
38
34
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
@@ -54,7 +50,7 @@
|
|
|
54
50
|
"dependencies": {
|
|
55
51
|
"highlight.js": "^11.11.1",
|
|
56
52
|
"vue3-highlightjs": "^1.0.5",
|
|
57
|
-
"@effect-app/vue": "2.51.
|
|
53
|
+
"@effect-app/vue": "2.51.10",
|
|
58
54
|
"effect-app": "3.0.9"
|
|
59
55
|
},
|
|
60
56
|
"scripts": {
|