@effect-app/vue-components 2.10.6 → 2.10.7
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/vue-components.es10.js +7 -7
- package/dist/vue-components.es11.js +2 -2
- package/dist/vue-components.es12.js +209 -206
- package/dist/vue-components.es16.js +4 -11
- package/dist/vue-components.es17.js +10 -4
- package/dist/vue-components.es18.js +55 -10
- package/dist/vue-components.es19.js +63 -50
- package/dist/vue-components.es20.js +6 -68
- package/dist/vue-components.es21.js +5 -5
- package/dist/vue-components.es22.js +3 -6
- package/dist/vue-components.es23.js +3 -3
- package/dist/vue-components.es24.js +2 -3
- package/dist/vue-components.es25.js +1 -1
- package/dist/vue-components.es26.js +1 -1
- package/dist/vue-components.es27.js +1 -1
- package/dist/vue-components.es28.js +17 -2
- package/dist/vue-components.es29.js +10 -16
- package/dist/vue-components.es31.js +1 -1
- package/dist/vue-components.es32.js +1 -1
- package/dist/vue-components.es5.js +1 -1
- package/package.json +3 -3
- package/src/components/OmegaForm/OmegaFormStuff.ts +12 -11
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { useForm as B } from "@tanstack/vue-form";
|
|
2
2
|
import { Data as K, S as V, Effect as f, Fiber as $, Option as P, Array as F } from "effect-app";
|
|
3
|
-
import { runtimeFiberAsPromise as T } from "./vue-components.
|
|
3
|
+
import { runtimeFiberAsPromise as T } from "./vue-components.es17.js";
|
|
4
4
|
import { computed as x, onUnmounted as W, onMounted as z, onBeforeUnmount as G, watch as D, ref as Z, h as H } from "vue";
|
|
5
5
|
import { useIntl as Q } from "./vue-components.es3.js";
|
|
6
|
-
import X from "./vue-components.
|
|
7
|
-
import Y from "./vue-components.
|
|
8
|
-
import C from "./vue-components.
|
|
6
|
+
import X from "./vue-components.es18.js";
|
|
7
|
+
import Y from "./vue-components.es19.js";
|
|
8
|
+
import C from "./vue-components.es20.js";
|
|
9
9
|
import { generateMetaFromSchema as ee, deepMerge as R, defaultsValueFromSchema as re } from "./vue-components.es12.js";
|
|
10
10
|
import te from "./vue-components.es6.js";
|
|
11
11
|
import se from "./vue-components.es8.js";
|
|
12
|
-
import ne from "./vue-components.
|
|
13
|
-
import { trace as N } from "./vue-components.
|
|
14
|
-
import { context as U } from "./vue-components.
|
|
12
|
+
import ne from "./vue-components.es21.js";
|
|
13
|
+
import { trace as N } from "./vue-components.es22.js";
|
|
14
|
+
import { context as U } from "./vue-components.es23.js";
|
|
15
15
|
class oe extends K.TaggedError("FormErrors") {
|
|
16
16
|
}
|
|
17
17
|
const g = (i) => function(n) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import l from "./vue-components.
|
|
1
|
+
import l from "./vue-components.es28.js";
|
|
2
2
|
import { inject as c, provide as u } from "vue";
|
|
3
|
-
import { onMountedWithCleanup as f } from "./vue-components.
|
|
3
|
+
import { onMountedWithCleanup as f } from "./vue-components.es29.js";
|
|
4
4
|
const p = () => l(), i = Symbol("DialogBus"), r = () => c(i, null), g = () => {
|
|
5
5
|
const n = p();
|
|
6
6
|
return u(i, n), n;
|
|
@@ -1,270 +1,273 @@
|
|
|
1
|
-
import { S as
|
|
1
|
+
import { S as r, Option as q } from "effect-app";
|
|
2
2
|
import { getMetadataFromSchema as k } from "@effect-app/vue/form";
|
|
3
|
-
import { useIntl as V, getTransformationFrom as
|
|
4
|
-
import { isObject as E } from "./vue-components.
|
|
5
|
-
const $ = (e) =>
|
|
3
|
+
import { useIntl as V, getTransformationFrom as _ } from "./vue-components.es3.js";
|
|
4
|
+
import { isObject as E } from "./vue-components.es16.js";
|
|
5
|
+
const $ = (e) => r.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKeyword" || n === r.Null.ast), g = (e) => !e || !r.AST.isUnion(e) ? !1 : e.types.find((n) => n._tag === "UndefinedKeyword") ? "undefined" : e.types.find((n) => n === r.Null.ast) ? "null" : !1, L = (e) => {
|
|
6
6
|
const n = [];
|
|
7
7
|
for (const t of e)
|
|
8
|
-
if (
|
|
9
|
-
const
|
|
10
|
-
n.push(...
|
|
8
|
+
if (r.AST.isUnion(t)) {
|
|
9
|
+
const p = L(t.types);
|
|
10
|
+
n.push(...p);
|
|
11
11
|
} else
|
|
12
12
|
n.push(t);
|
|
13
13
|
return n;
|
|
14
|
-
},
|
|
14
|
+
}, f = ({ meta: e = {}, parent: n = "", property: t, propertySignatures: p }, o = {}) => {
|
|
15
15
|
if (t && t._tag === "Transformation")
|
|
16
|
-
return
|
|
16
|
+
return f({
|
|
17
17
|
parent: n,
|
|
18
18
|
meta: e,
|
|
19
19
|
property: t.from
|
|
20
20
|
});
|
|
21
21
|
if (t?._tag === "TypeLiteral" && "propertySignatures" in t)
|
|
22
|
-
return
|
|
22
|
+
return f({
|
|
23
23
|
meta: e,
|
|
24
24
|
propertySignatures: t.propertySignatures
|
|
25
25
|
});
|
|
26
|
-
if (
|
|
27
|
-
for (const s of
|
|
28
|
-
const
|
|
26
|
+
if (p) {
|
|
27
|
+
for (const s of p) {
|
|
28
|
+
const i = n ? `${n}.${s.name.toString()}` : s.name.toString(), l = g(s.type);
|
|
29
29
|
let a;
|
|
30
|
-
e._isNullableDiscriminatedUnion && s.name.toString() === "_tag" || e.required === !1 ? a = !1 : a = !
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
const
|
|
34
|
-
(u) => u._tag !== "UndefinedKeyword" && u !==
|
|
35
|
-
).map(
|
|
36
|
-
if (
|
|
30
|
+
e._isNullableDiscriminatedUnion && s.name.toString() === "_tag" || e.required === !1 ? a = !1 : a = !l;
|
|
31
|
+
const m = s.type;
|
|
32
|
+
if (r.AST.isUnion(s.type)) {
|
|
33
|
+
const c = L(s.type.types).filter(
|
|
34
|
+
(u) => u._tag !== "UndefinedKeyword" && u !== r.Null.ast
|
|
35
|
+
).map(_);
|
|
36
|
+
if (c.some(
|
|
37
37
|
(u) => "propertySignatures" in u
|
|
38
38
|
)) {
|
|
39
|
-
if (!
|
|
40
|
-
const u =
|
|
41
|
-
parent:
|
|
39
|
+
if (!l) {
|
|
40
|
+
const u = f({
|
|
41
|
+
parent: i,
|
|
42
42
|
property: s.type,
|
|
43
|
-
meta: { required: a, nullableOrUndefined:
|
|
43
|
+
meta: { required: a, nullableOrUndefined: l }
|
|
44
44
|
});
|
|
45
|
-
o[
|
|
45
|
+
o[i] = u;
|
|
46
46
|
}
|
|
47
|
-
for (const u of
|
|
47
|
+
for (const u of c)
|
|
48
48
|
if ("propertySignatures" in u) {
|
|
49
|
-
const y =
|
|
49
|
+
const y = l && c.length > 1;
|
|
50
50
|
Object.assign(
|
|
51
51
|
o,
|
|
52
|
-
|
|
53
|
-
parent:
|
|
52
|
+
f({
|
|
53
|
+
parent: i,
|
|
54
54
|
propertySignatures: u.propertySignatures,
|
|
55
55
|
meta: y ? { _isNullableDiscriminatedUnion: !0 } : {}
|
|
56
56
|
})
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
59
|
} else {
|
|
60
|
-
const u =
|
|
60
|
+
const u = c.filter(r.AST.isTupleType);
|
|
61
61
|
if (u.length > 0) {
|
|
62
62
|
const y = u[0];
|
|
63
|
-
if (o[
|
|
63
|
+
if (o[i] = {
|
|
64
64
|
type: "multiple",
|
|
65
65
|
members: y.elements,
|
|
66
66
|
rest: y.rest,
|
|
67
67
|
required: a,
|
|
68
|
-
nullableOrUndefined:
|
|
68
|
+
nullableOrUndefined: l
|
|
69
69
|
}, y.rest && y.rest.length > 0) {
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
72
|
-
for (const
|
|
73
|
-
const h = `${
|
|
70
|
+
const S = y.rest[0];
|
|
71
|
+
if (S.type._tag === "TypeLiteral" && "propertySignatures" in S.type)
|
|
72
|
+
for (const d of S.type.propertySignatures) {
|
|
73
|
+
const h = `${i}.${d.name.toString()}`, T = f({
|
|
74
74
|
parent: h,
|
|
75
|
-
property:
|
|
75
|
+
property: d.type,
|
|
76
76
|
meta: {
|
|
77
|
-
required: !g(
|
|
78
|
-
nullableOrUndefined: g(
|
|
77
|
+
required: !g(d.type),
|
|
78
|
+
nullableOrUndefined: g(d.type)
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
|
-
if (
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
84
|
-
for (const A of
|
|
85
|
-
const
|
|
86
|
-
parent:
|
|
81
|
+
if (T && typeof T == "object" && "type" in T && (o[h] = T, T.type === "multiple" && r.AST.isTupleType(d.type) && d.type.rest && d.type.rest.length > 0)) {
|
|
82
|
+
const w = d.type.rest[0];
|
|
83
|
+
if (w.type._tag === "TypeLiteral" && "propertySignatures" in w.type)
|
|
84
|
+
for (const A of w.type.propertySignatures) {
|
|
85
|
+
const M = `${h}.${A.name.toString()}`, O = f({
|
|
86
|
+
parent: M,
|
|
87
87
|
property: A.type,
|
|
88
88
|
meta: {
|
|
89
89
|
required: !g(A.type),
|
|
90
90
|
nullableOrUndefined: g(A.type)
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
|
-
O && typeof O == "object" && "type" in O && (o[
|
|
93
|
+
O && typeof O == "object" && "type" in O && (o[M] = O);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
} else {
|
|
99
|
-
const y =
|
|
100
|
-
parent:
|
|
99
|
+
const y = f({
|
|
100
|
+
parent: i,
|
|
101
101
|
property: s.type,
|
|
102
|
-
meta: { required: a, nullableOrUndefined:
|
|
102
|
+
meta: { required: a, nullableOrUndefined: l }
|
|
103
103
|
});
|
|
104
|
-
o[
|
|
104
|
+
o[i] = y;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
} else
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const y =
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
107
|
+
} else {
|
|
108
|
+
const b = _(m);
|
|
109
|
+
if ("propertySignatures" in b)
|
|
110
|
+
Object.assign(
|
|
111
|
+
o,
|
|
112
|
+
f({
|
|
113
|
+
parent: i,
|
|
114
|
+
propertySignatures: b.propertySignatures,
|
|
115
|
+
meta: { required: a, nullableOrUndefined: l }
|
|
116
|
+
})
|
|
117
|
+
);
|
|
118
|
+
else if (r.AST.isTupleType(s.type))
|
|
119
|
+
if (s.type.rest.length > 0 && s.type.rest[0].type._tag === "TypeLiteral" && "propertySignatures" in s.type.rest[0].type) {
|
|
120
|
+
const v = s.type.rest[0].type;
|
|
121
|
+
if (v._tag === "TypeLiteral" && "propertySignatures" in v)
|
|
122
|
+
for (const u of v.propertySignatures) {
|
|
123
|
+
const y = `${i}.${u.name.toString()}`;
|
|
124
|
+
if (r.AST.isTupleType(u.type) && u.type.rest.length > 0) {
|
|
125
|
+
const S = u.type.rest[0].type;
|
|
126
|
+
if (S._tag === "TypeLiteral" && "propertySignatures" in S)
|
|
127
|
+
for (const d of S.propertySignatures) {
|
|
128
|
+
const h = `${y}.${d.name.toString()}`, T = f({
|
|
129
|
+
parent: h,
|
|
130
|
+
property: d.type,
|
|
131
|
+
meta: {
|
|
132
|
+
required: !g(d.type),
|
|
133
|
+
nullableOrUndefined: g(d.type)
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
o[h] = T;
|
|
137
|
+
}
|
|
138
|
+
else
|
|
139
|
+
o[y] = {
|
|
140
|
+
type: "multiple",
|
|
141
|
+
members: u.type.elements,
|
|
142
|
+
rest: u.type.rest,
|
|
143
|
+
required: !g(u.type),
|
|
144
|
+
nullableOrUndefined: g(u.type)
|
|
145
|
+
};
|
|
146
|
+
} else {
|
|
147
|
+
const S = f({
|
|
148
|
+
parent: y,
|
|
149
|
+
property: u.type,
|
|
150
|
+
meta: {
|
|
151
|
+
required: !g(u.type),
|
|
152
|
+
nullableOrUndefined: g(u.type)
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
o[y] = S;
|
|
156
|
+
}
|
|
154
157
|
}
|
|
158
|
+
} else
|
|
159
|
+
o[i] = {
|
|
160
|
+
type: "multiple",
|
|
161
|
+
members: s.type.elements,
|
|
162
|
+
rest: s.type.rest,
|
|
163
|
+
required: a,
|
|
164
|
+
nullableOrUndefined: l
|
|
165
|
+
};
|
|
166
|
+
else {
|
|
167
|
+
const c = f({
|
|
168
|
+
parent: i,
|
|
169
|
+
property: s.type,
|
|
170
|
+
meta: {
|
|
171
|
+
// an empty string is valid for a S.String field, so we should not mark it as required
|
|
172
|
+
// TODO: handle this better via the createMeta minLength parsing
|
|
173
|
+
required: a && (s.type._tag !== "StringKeyword" || k(s.type).minLength),
|
|
174
|
+
nullableOrUndefined: l
|
|
155
175
|
}
|
|
156
|
-
|
|
157
|
-
o[
|
|
158
|
-
|
|
159
|
-
members: s.type.elements,
|
|
160
|
-
rest: s.type.rest,
|
|
161
|
-
required: a,
|
|
162
|
-
nullableOrUndefined: p
|
|
163
|
-
};
|
|
164
|
-
else {
|
|
165
|
-
const T = m({
|
|
166
|
-
parent: r,
|
|
167
|
-
property: s.type,
|
|
168
|
-
meta: {
|
|
169
|
-
// an empty string is valid for a S.String field, so we should not mark it as required
|
|
170
|
-
// TODO: handle this better via the createMeta minLength parsing
|
|
171
|
-
required: a && (s.type._tag !== "StringKeyword" || k(s.type).minLength),
|
|
172
|
-
nullableOrUndefined: p
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
o[r] = T;
|
|
176
|
+
});
|
|
177
|
+
o[i] = c;
|
|
178
|
+
}
|
|
176
179
|
}
|
|
177
180
|
}
|
|
178
181
|
return o;
|
|
179
182
|
}
|
|
180
183
|
if (t) {
|
|
181
184
|
const s = $(t);
|
|
182
|
-
if (Object.hasOwnProperty.call(e, "required") || (e.required = !s),
|
|
183
|
-
const
|
|
184
|
-
(
|
|
185
|
+
if (Object.hasOwnProperty.call(e, "required") || (e.required = !s), r.AST.isUnion(t)) {
|
|
186
|
+
const l = L(t.types), a = l.find(
|
|
187
|
+
(m) => m._tag !== "UndefinedKeyword" && m !== r.Null.ast
|
|
185
188
|
);
|
|
186
|
-
return "propertySignatures" in a ?
|
|
189
|
+
return "propertySignatures" in a ? f({
|
|
187
190
|
propertySignatures: a.propertySignatures,
|
|
188
191
|
parent: n,
|
|
189
192
|
meta: e
|
|
190
|
-
}) :
|
|
193
|
+
}) : l.every(r.AST.isLiteral) ? {
|
|
191
194
|
...e,
|
|
192
195
|
type: "select",
|
|
193
|
-
members:
|
|
196
|
+
members: l.map((m) => m.literal)
|
|
194
197
|
} : {
|
|
195
198
|
...e,
|
|
196
|
-
...
|
|
199
|
+
...f({
|
|
197
200
|
parent: n,
|
|
198
201
|
meta: e,
|
|
199
202
|
property: a
|
|
200
203
|
})
|
|
201
204
|
};
|
|
202
205
|
}
|
|
203
|
-
if (
|
|
206
|
+
if (r.AST.isTupleType(t))
|
|
204
207
|
return {
|
|
205
208
|
...e,
|
|
206
209
|
type: "multiple",
|
|
207
210
|
members: t.elements,
|
|
208
211
|
rest: t.rest
|
|
209
212
|
};
|
|
210
|
-
const
|
|
213
|
+
const i = r.AST.getAnnotation(
|
|
211
214
|
t,
|
|
212
|
-
|
|
213
|
-
).pipe(
|
|
214
|
-
return e = { ...e, ...
|
|
215
|
+
r.AST.JSONSchemaAnnotationId
|
|
216
|
+
).pipe(q.getOrElse(() => ({})));
|
|
217
|
+
return e = { ...e, ...i }, "from" in t ? f({
|
|
215
218
|
parent: n,
|
|
216
219
|
meta: e,
|
|
217
220
|
property: t.from
|
|
218
|
-
}) : (e.type =
|
|
221
|
+
}) : (e.type = r.AST.getAnnotation(
|
|
219
222
|
t,
|
|
220
|
-
|
|
223
|
+
r.AST.TitleAnnotationId
|
|
221
224
|
).pipe(
|
|
222
|
-
|
|
225
|
+
q.getOrElse(() => "unknown")
|
|
223
226
|
), e);
|
|
224
227
|
}
|
|
225
228
|
return o;
|
|
226
229
|
}, N = (e) => {
|
|
227
|
-
const n = e.ast, t = {},
|
|
230
|
+
const n = e.ast, t = {}, p = {};
|
|
228
231
|
if (n._tag === "Transformation" || n._tag === "Refinement")
|
|
229
|
-
return N(
|
|
232
|
+
return N(r.make(n.from));
|
|
230
233
|
if (n._tag === "Union") {
|
|
231
|
-
const
|
|
232
|
-
if (
|
|
234
|
+
const i = (n.types || []).filter((a) => a._tag !== "UndefinedKeyword" && a !== r.Null.ast).map(_);
|
|
235
|
+
if (i.every((a) => a._tag === "TypeLiteral" && "propertySignatures" in a) && i.length > 0) {
|
|
233
236
|
const a = [];
|
|
234
|
-
for (const
|
|
235
|
-
if ("propertySignatures" in
|
|
236
|
-
const
|
|
237
|
-
(
|
|
237
|
+
for (const m of i)
|
|
238
|
+
if ("propertySignatures" in m) {
|
|
239
|
+
const b = m.propertySignatures.find(
|
|
240
|
+
(v) => v.name.toString() === "_tag"
|
|
238
241
|
);
|
|
239
|
-
|
|
240
|
-
const
|
|
241
|
-
propertySignatures:
|
|
242
|
+
b && r.AST.isLiteral(b.type) && a.push(b.type.literal);
|
|
243
|
+
const c = f({
|
|
244
|
+
propertySignatures: m.propertySignatures
|
|
242
245
|
});
|
|
243
|
-
Object.assign(t,
|
|
246
|
+
Object.assign(t, c);
|
|
244
247
|
}
|
|
245
248
|
return a.length > 0 && (t._tag = {
|
|
246
249
|
type: "select",
|
|
247
250
|
members: a,
|
|
248
251
|
required: !0
|
|
249
|
-
}), { meta: t, defaultValues:
|
|
252
|
+
}), { meta: t, defaultValues: p };
|
|
250
253
|
}
|
|
251
254
|
}
|
|
252
255
|
if ("propertySignatures" in n) {
|
|
253
|
-
const o =
|
|
256
|
+
const o = f({
|
|
254
257
|
propertySignatures: n.propertySignatures
|
|
255
258
|
});
|
|
256
|
-
if (Object.values(o).every((
|
|
257
|
-
return { meta: o, defaultValues:
|
|
258
|
-
const s = (
|
|
259
|
-
for (const a in
|
|
260
|
-
const
|
|
261
|
-
|
|
259
|
+
if (Object.values(o).every((i) => i && "type" in i))
|
|
260
|
+
return { meta: o, defaultValues: p };
|
|
261
|
+
const s = (i, l = "") => {
|
|
262
|
+
for (const a in i) {
|
|
263
|
+
const m = l ? `${l}.${a}` : a;
|
|
264
|
+
i[a] && typeof i[a] == "object" && "type" in i[a] ? t[m] = i[a] : i[a] && typeof i[a] == "object" && s(i[a], m);
|
|
262
265
|
}
|
|
263
266
|
};
|
|
264
267
|
s(o);
|
|
265
268
|
}
|
|
266
|
-
return { meta: t, defaultValues:
|
|
267
|
-
}, B = (e) =>
|
|
269
|
+
return { meta: t, defaultValues: p };
|
|
270
|
+
}, B = (e) => r.extend(e, r.Struct({})), J = (e) => {
|
|
268
271
|
const { meta: n } = N(e);
|
|
269
272
|
return { schema: e, meta: n };
|
|
270
273
|
}, z = (e) => {
|
|
@@ -272,48 +275,48 @@ const $ = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKe
|
|
|
272
275
|
let t;
|
|
273
276
|
switch (e.type) {
|
|
274
277
|
case "string":
|
|
275
|
-
t =
|
|
278
|
+
t = r.String.annotations({
|
|
276
279
|
message: () => n("validation.empty")
|
|
277
|
-
}), e.format === "email" && (t =
|
|
280
|
+
}), e.format === "email" && (t = r.compose(
|
|
278
281
|
t,
|
|
279
|
-
|
|
282
|
+
r.Email.annotations({
|
|
280
283
|
message: () => n("validation.email.invalid")
|
|
281
284
|
})
|
|
282
285
|
)), e.required && (t = t.annotations({
|
|
283
286
|
message: () => n("validation.empty")
|
|
284
|
-
}).pipe(
|
|
287
|
+
}).pipe(r.minLength(1)).annotations({
|
|
285
288
|
message: () => n("validation.empty")
|
|
286
|
-
})), typeof e.maxLength == "number" && (t = t.pipe(
|
|
289
|
+
})), typeof e.maxLength == "number" && (t = t.pipe(r.maxLength(e.maxLength)).annotations({
|
|
287
290
|
message: () => n("validation.string.maxLength", {
|
|
288
291
|
maxLength: e.maxLength
|
|
289
292
|
})
|
|
290
|
-
})), typeof e.minLength == "number" && (t = t.pipe(
|
|
293
|
+
})), typeof e.minLength == "number" && (t = t.pipe(r.minLength(e.minLength)).annotations({
|
|
291
294
|
message: () => n("validation.string.minLength", {
|
|
292
295
|
minLength: e.minLength
|
|
293
296
|
})
|
|
294
297
|
}));
|
|
295
298
|
break;
|
|
296
299
|
case "number":
|
|
297
|
-
t =
|
|
300
|
+
t = r.Number.annotations({
|
|
298
301
|
message: () => n("validation.empty")
|
|
299
302
|
}), e.required && t.annotations({
|
|
300
303
|
message: () => n("validation.empty")
|
|
301
|
-
}), typeof e.minimum == "number" && (t = t.pipe(
|
|
304
|
+
}), typeof e.minimum == "number" && (t = t.pipe(r.greaterThanOrEqualTo(e.minimum)).annotations({
|
|
302
305
|
message: () => n(e.minimum === 0 ? "validation.number.positive" : "validation.number.min", {
|
|
303
306
|
minimum: e.minimum,
|
|
304
307
|
isExclusive: !0
|
|
305
308
|
})
|
|
306
|
-
})), typeof e.maximum == "number" && (t = t.pipe(
|
|
309
|
+
})), typeof e.maximum == "number" && (t = t.pipe(r.lessThanOrEqualTo(e.maximum)).annotations({
|
|
307
310
|
message: () => n("validation.number.max", {
|
|
308
311
|
maximum: e.maximum,
|
|
309
312
|
isExclusive: !0
|
|
310
313
|
})
|
|
311
|
-
})), typeof e.exclusiveMinimum == "number" && (t = t.pipe(
|
|
314
|
+
})), typeof e.exclusiveMinimum == "number" && (t = t.pipe(r.greaterThan(e.exclusiveMinimum)).annotations({
|
|
312
315
|
message: () => n(e.exclusiveMinimum === 0 ? "validation.number.positive" : "validation.number.min", {
|
|
313
316
|
minimum: e.exclusiveMinimum,
|
|
314
317
|
isExclusive: !1
|
|
315
318
|
})
|
|
316
|
-
})), typeof e.exclusiveMaximum == "number" && (t = t.pipe(
|
|
319
|
+
})), typeof e.exclusiveMaximum == "number" && (t = t.pipe(r.lessThan(e.exclusiveMaximum)).annotations({
|
|
317
320
|
message: () => n("validation.number.max", {
|
|
318
321
|
maximum: e.exclusiveMaximum,
|
|
319
322
|
isExclusive: !1
|
|
@@ -321,7 +324,7 @@ const $ = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKe
|
|
|
321
324
|
}));
|
|
322
325
|
break;
|
|
323
326
|
case "select":
|
|
324
|
-
t =
|
|
327
|
+
t = r.Literal(...e.members).annotations({
|
|
325
328
|
message: () => ({
|
|
326
329
|
message: n("validation.not_a_valid", {
|
|
327
330
|
type: "select",
|
|
@@ -332,7 +335,7 @@ const $ = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKe
|
|
|
332
335
|
});
|
|
333
336
|
break;
|
|
334
337
|
case "multiple":
|
|
335
|
-
t =
|
|
338
|
+
t = r.Array(r.String).annotations({
|
|
336
339
|
message: () => n("validation.not_a_valid", {
|
|
337
340
|
type: "multiple",
|
|
338
341
|
message: e.members.join(", ")
|
|
@@ -340,22 +343,22 @@ const $ = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKe
|
|
|
340
343
|
});
|
|
341
344
|
break;
|
|
342
345
|
case "boolean":
|
|
343
|
-
t =
|
|
346
|
+
t = r.Boolean;
|
|
344
347
|
break;
|
|
345
348
|
case "unknown":
|
|
346
|
-
t =
|
|
349
|
+
t = r.Unknown;
|
|
347
350
|
break;
|
|
348
351
|
default:
|
|
349
|
-
console.warn(`Unhandled field type: ${e}`), t =
|
|
352
|
+
console.warn(`Unhandled field type: ${e}`), t = r.Unknown;
|
|
350
353
|
break;
|
|
351
354
|
}
|
|
352
355
|
return e.required ? t.pipe(
|
|
353
|
-
|
|
356
|
+
r.annotations({
|
|
354
357
|
message: () => n("validation.empty")
|
|
355
358
|
})
|
|
356
|
-
) : t =
|
|
357
|
-
}, C = (e, n) =>
|
|
358
|
-
|
|
359
|
+
) : t = r.NullishOr(t), r.standardSchemaV1(t);
|
|
360
|
+
}, C = (e, n) => r.NullOr(e).pipe(
|
|
361
|
+
r.transform(r.typeSchema(e), {
|
|
359
362
|
decode: (t) => t ?? n(),
|
|
360
363
|
encode: (t) => t
|
|
361
364
|
})
|
|
@@ -378,71 +381,71 @@ const $ = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKe
|
|
|
378
381
|
], G = (e) => K.includes(e) ? e : "text";
|
|
379
382
|
function j(e, n) {
|
|
380
383
|
const t = { ...e };
|
|
381
|
-
for (const
|
|
382
|
-
Array.isArray(n[
|
|
384
|
+
for (const p in n)
|
|
385
|
+
Array.isArray(n[p]) ? t[p] = n[p] : n[p] && E(n[p]) ? t[p] = j(t[p], n[p]) : t[p] = n[p];
|
|
383
386
|
return t;
|
|
384
387
|
}
|
|
385
|
-
function
|
|
388
|
+
function U(e) {
|
|
386
389
|
return e && "fields" in e && typeof e.fields == "object";
|
|
387
390
|
}
|
|
388
391
|
function F(e) {
|
|
389
392
|
return e && "members" in e && Array.isArray(e.members);
|
|
390
393
|
}
|
|
391
|
-
const
|
|
394
|
+
const x = (e, n = {}) => {
|
|
392
395
|
const t = e.ast;
|
|
393
396
|
if (t?.defaultValue)
|
|
394
397
|
return t.defaultValue();
|
|
395
398
|
if (g(e.ast) === "null")
|
|
396
399
|
return null;
|
|
397
400
|
if (g(e.ast) !== "undefined") {
|
|
398
|
-
if (
|
|
399
|
-
const
|
|
401
|
+
if (U(e)) {
|
|
402
|
+
const p = {};
|
|
400
403
|
for (const [o, s] of Object.entries(e.fields)) {
|
|
401
|
-
const
|
|
402
|
-
if (
|
|
404
|
+
const i = s?.ast;
|
|
405
|
+
if (i?.defaultValue)
|
|
403
406
|
try {
|
|
404
|
-
|
|
407
|
+
p[o] = i.defaultValue();
|
|
405
408
|
continue;
|
|
406
409
|
} catch {
|
|
407
410
|
}
|
|
408
|
-
const
|
|
409
|
-
|
|
411
|
+
const l = x(s, n[o] || {});
|
|
412
|
+
l !== void 0 && (p[o] = l);
|
|
410
413
|
}
|
|
411
|
-
return { ...
|
|
414
|
+
return { ...p, ...n };
|
|
412
415
|
}
|
|
413
|
-
if (e?.from &&
|
|
414
|
-
return
|
|
416
|
+
if (e?.from && U(e.from))
|
|
417
|
+
return x(e.from, n);
|
|
415
418
|
if (F(e)) {
|
|
416
|
-
const
|
|
417
|
-
const a =
|
|
418
|
-
(!o[
|
|
419
|
+
const p = e.members.reduce((o, s) => (U(s) && Object.entries(s.fields).forEach(([i, l]) => {
|
|
420
|
+
const a = l.ast, m = o[i]?.ast;
|
|
421
|
+
(!o[i] || a?.defaultValue && !m?.defaultValue) && (o[i] = l);
|
|
419
422
|
}), o), {});
|
|
420
|
-
return Object.entries(
|
|
423
|
+
return Object.entries(p).reduce((o, [s, i]) => (o[s] = x(i, n[s] || {}), o), n);
|
|
421
424
|
}
|
|
422
425
|
if (Object.keys(n).length === 0)
|
|
423
426
|
switch (e.ast._tag) {
|
|
424
427
|
case "Refinement":
|
|
425
|
-
return
|
|
428
|
+
return x(r.make(e.ast.from), n);
|
|
426
429
|
case "Transformation": {
|
|
427
|
-
const
|
|
428
|
-
return
|
|
430
|
+
const p = r.make(e.ast.from);
|
|
431
|
+
return x(p, n);
|
|
429
432
|
}
|
|
430
433
|
case "TypeLiteral": {
|
|
431
|
-
const
|
|
434
|
+
const p = { ...n };
|
|
432
435
|
for (const o of t.propertySignatures) {
|
|
433
|
-
const s = o.name.toString(),
|
|
434
|
-
if (
|
|
435
|
-
|
|
436
|
+
const s = o.name.toString(), i = o.type;
|
|
437
|
+
if (i._tag === "Transformation" && i.defaultValue) {
|
|
438
|
+
p[s] = i.defaultValue();
|
|
436
439
|
continue;
|
|
437
440
|
}
|
|
438
|
-
if (
|
|
439
|
-
|
|
441
|
+
if (i.defaultValue) {
|
|
442
|
+
p[s] = i.defaultValue();
|
|
440
443
|
continue;
|
|
441
444
|
}
|
|
442
|
-
const
|
|
443
|
-
a !== void 0 && (
|
|
445
|
+
const l = r.make(i), a = x(l, n[s] || {});
|
|
446
|
+
a !== void 0 && (p[s] = a);
|
|
444
447
|
}
|
|
445
|
-
return
|
|
448
|
+
return p;
|
|
446
449
|
}
|
|
447
450
|
case "StringKeyword":
|
|
448
451
|
return "";
|
|
@@ -452,9 +455,9 @@ const v = (e, n = {}) => {
|
|
|
452
455
|
}
|
|
453
456
|
};
|
|
454
457
|
export {
|
|
455
|
-
|
|
458
|
+
f as createMeta,
|
|
456
459
|
j as deepMerge,
|
|
457
|
-
|
|
460
|
+
x as defaultsValueFromSchema,
|
|
458
461
|
B as duplicateSchema,
|
|
459
462
|
z as generateInputStandardSchemaFromFieldMeta,
|
|
460
463
|
J as generateMetaFromSchema,
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
e(() => {
|
|
5
|
-
const o = t();
|
|
6
|
-
o && (n = o);
|
|
7
|
-
}), u(() => {
|
|
8
|
-
n && n();
|
|
9
|
-
});
|
|
10
|
-
}
|
|
1
|
+
import "vue";
|
|
2
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
3
|
+
const t = Object.prototype.toString, c = (o) => t.call(o) === "[object Object]";
|
|
11
4
|
export {
|
|
12
|
-
|
|
5
|
+
c as isObject
|
|
13
6
|
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
const
|
|
1
|
+
import { Exit as c, Runtime as u } from "effect";
|
|
2
|
+
import { dual as n, isFunction as m } from "./vue-components.es30.js";
|
|
3
|
+
const i = Symbol.for("clone-trait"), a = n(2, (e, t) => i in e ? e[i](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
|
|
4
|
+
n(2, (e, t) => a(e, { ...e, ...m(t) ? t(e) : t }));
|
|
5
|
+
const p = (e, t) => new Promise((o, s) => e.addObserver((r) => {
|
|
6
|
+
c.isSuccess(r) ? o(r.value) : s(u.makeFiberFailure(r.cause));
|
|
7
|
+
}));
|
|
4
8
|
export {
|
|
5
|
-
|
|
9
|
+
a as clone,
|
|
10
|
+
i as cloneTrait,
|
|
11
|
+
p as runtimeFiberAsPromise
|
|
6
12
|
};
|
|
@@ -1,12 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
import { defineComponent as F, computed as f, onMounted as M, provide as P, createBlock as c, openBlock as s, resolveDynamicComponent as p, withCtx as g, renderSlot as o, createElementBlock as k, normalizeProps as l, guardReactiveProps as u, Fragment as A, renderList as C, mergeProps as b } from "vue";
|
|
2
|
+
const N = /* @__PURE__ */ F({
|
|
3
|
+
inheritAttrs: !1,
|
|
4
|
+
__name: "OmegaArray",
|
|
5
|
+
props: {
|
|
6
|
+
form: {},
|
|
7
|
+
inputClass: {},
|
|
8
|
+
name: {},
|
|
9
|
+
defaultItems: {},
|
|
10
|
+
items: {}
|
|
11
|
+
},
|
|
12
|
+
setup(n) {
|
|
13
|
+
const a = n, y = a.form.useStore((e) => e.values), i = f(() => {
|
|
14
|
+
const e = a.name.replace(/\[/g, ".").replace(/\]/g, "");
|
|
15
|
+
try {
|
|
16
|
+
return e.split(".").reduce((r, t) => r && r[t], y.value);
|
|
17
|
+
} catch (r) {
|
|
18
|
+
return console.error(r), [];
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
M(async () => {
|
|
22
|
+
a.defaultItems && !i.value && a.form.setFieldValue(a.name, a.defaultItems);
|
|
23
|
+
});
|
|
24
|
+
const $ = f(() => (r) => {
|
|
25
|
+
const t = r.replace(/\[\d+\]/g, "");
|
|
26
|
+
return a.form.meta[t];
|
|
27
|
+
});
|
|
28
|
+
return P("getMetaFromArray", $), (e, r) => (s(), c(p(n.form.Field), { name: n.name }, {
|
|
29
|
+
default: g(({ field: t, state: d }) => [
|
|
30
|
+
o(e.$slots, "pre-array", l(u({ field: t, state: d }))),
|
|
31
|
+
(s(!0), k(A, null, C(i.value, (B, m) => (s(), c(p(n.form.Field), {
|
|
32
|
+
key: `${n.name}[${Number(m)}]`,
|
|
33
|
+
name: (
|
|
34
|
+
// eslint-disable-next-line
|
|
35
|
+
`${n.name}[${Number(m)}]`
|
|
36
|
+
)
|
|
37
|
+
}, {
|
|
38
|
+
default: g(({ field: v, state: h }) => [
|
|
39
|
+
o(e.$slots, "default", b({ ref_for: !0 }, {
|
|
40
|
+
subField: v,
|
|
41
|
+
subState: h,
|
|
42
|
+
index: Number(m),
|
|
43
|
+
field: t
|
|
44
|
+
}))
|
|
45
|
+
]),
|
|
46
|
+
_: 2
|
|
47
|
+
}, 1032, ["name"]))), 128)),
|
|
48
|
+
o(e.$slots, "post-array", l(u({ field: t, state: d }))),
|
|
49
|
+
o(e.$slots, "field", l(u({ field: t })))
|
|
50
|
+
]),
|
|
51
|
+
_: 3
|
|
52
|
+
}, 8, ["name"]));
|
|
53
|
+
}
|
|
54
|
+
});
|
|
8
55
|
export {
|
|
9
|
-
|
|
10
|
-
i as cloneTrait,
|
|
11
|
-
p as runtimeFiberAsPromise
|
|
56
|
+
N as default
|
|
12
57
|
};
|
|
@@ -1,57 +1,70 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
__name: "
|
|
1
|
+
import { defineComponent as O, computed as j, createElementBlock as M, openBlock as _, Fragment as E, renderList as A, renderSlot as F, createVNode as g, unref as h, mergeProps as k } from "vue";
|
|
2
|
+
import { Order as l, pipe as v, Array as u } from "effect-app";
|
|
3
|
+
const I = /* @__PURE__ */ O({
|
|
4
|
+
__name: "OmegaAutoGen",
|
|
5
5
|
props: {
|
|
6
6
|
form: {},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
pick: {},
|
|
8
|
+
omit: {},
|
|
9
|
+
labelMap: { type: Function },
|
|
10
|
+
filterMap: { type: Function },
|
|
11
|
+
order: {},
|
|
12
|
+
sort: {}
|
|
11
13
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
14
|
+
setup(i) {
|
|
15
|
+
const p = (e) => (r) => Object.fromEntries(
|
|
16
|
+
Object.entries(r).map(([t, o]) => [t, e(o, t)])
|
|
17
|
+
), a = (e) => (r) => Object.fromEntries(
|
|
18
|
+
Object.entries(r).filter(([t, o]) => e(o, t))
|
|
19
|
+
), m = (e) => (r) => Object.entries(r).reduce(
|
|
20
|
+
(t, [o, c]) => {
|
|
21
|
+
const s = e(c, o);
|
|
22
|
+
return s !== !1 && (t[o] = s), t;
|
|
23
|
+
},
|
|
24
|
+
{}
|
|
25
|
+
), n = i, f = (e, r) => {
|
|
26
|
+
const t = r?.indexOf(e) ?? -1;
|
|
27
|
+
return t === -1 ? Number.MAX_SAFE_INTEGER : t;
|
|
28
|
+
}, d = l.mapInput(
|
|
29
|
+
l.number,
|
|
30
|
+
(e) => f(e.name, n.order || [])
|
|
31
|
+
), b = j(
|
|
32
|
+
() => v(
|
|
33
|
+
n.form.meta,
|
|
34
|
+
// include / exclude
|
|
35
|
+
a(
|
|
36
|
+
(e, r) => n.pick ? n.pick.includes(r) && !n.omit?.includes(r) : !n.omit?.includes(r)
|
|
37
|
+
),
|
|
38
|
+
(e) => e,
|
|
39
|
+
// labelMap and adding name
|
|
40
|
+
p((e, r) => ({
|
|
41
|
+
name: r,
|
|
42
|
+
label: n.labelMap?.(r) || r,
|
|
43
|
+
...e
|
|
44
|
+
})),
|
|
45
|
+
// filterMap
|
|
46
|
+
n.filterMap ? m((e) => {
|
|
47
|
+
const r = n.filterMap?.(e.name, e);
|
|
48
|
+
return r === void 0 || r === !0 ? e : r;
|
|
49
|
+
}) : (e) => e,
|
|
50
|
+
// transform to array
|
|
51
|
+
(e) => Object.values(e),
|
|
52
|
+
// order
|
|
53
|
+
u.sort(d),
|
|
54
|
+
// sort
|
|
55
|
+
n.sort ? u.sort(n.sort) : (e) => e
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
return (e, r) => (_(!0), M(E, null, A(b.value, ({ name: t, label: o, ...c }) => F(e.$slots, "default", {
|
|
59
|
+
child: { name: t, label: o, ...c }
|
|
60
|
+
}, () => [
|
|
61
|
+
g(h(i.form).Input, k({
|
|
62
|
+
name: t,
|
|
63
|
+
label: o
|
|
64
|
+
}, { ref_for: !0 }, c), null, 16, ["name", "label"])
|
|
65
|
+
])), 256));
|
|
53
66
|
}
|
|
54
67
|
});
|
|
55
68
|
export {
|
|
56
|
-
|
|
69
|
+
I as default
|
|
57
70
|
};
|
|
@@ -1,70 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
form: {},
|
|
7
|
-
pick: {},
|
|
8
|
-
omit: {},
|
|
9
|
-
labelMap: { type: Function },
|
|
10
|
-
filterMap: { type: Function },
|
|
11
|
-
order: {},
|
|
12
|
-
sort: {}
|
|
13
|
-
},
|
|
14
|
-
setup(i) {
|
|
15
|
-
const p = (e) => (r) => Object.fromEntries(
|
|
16
|
-
Object.entries(r).map(([t, o]) => [t, e(o, t)])
|
|
17
|
-
), a = (e) => (r) => Object.fromEntries(
|
|
18
|
-
Object.entries(r).filter(([t, o]) => e(o, t))
|
|
19
|
-
), m = (e) => (r) => Object.entries(r).reduce(
|
|
20
|
-
(t, [o, c]) => {
|
|
21
|
-
const s = e(c, o);
|
|
22
|
-
return s !== !1 && (t[o] = s), t;
|
|
23
|
-
},
|
|
24
|
-
{}
|
|
25
|
-
), n = i, f = (e, r) => {
|
|
26
|
-
const t = r?.indexOf(e) ?? -1;
|
|
27
|
-
return t === -1 ? Number.MAX_SAFE_INTEGER : t;
|
|
28
|
-
}, d = l.mapInput(
|
|
29
|
-
l.number,
|
|
30
|
-
(e) => f(e.name, n.order || [])
|
|
31
|
-
), b = j(
|
|
32
|
-
() => v(
|
|
33
|
-
n.form.meta,
|
|
34
|
-
// include / exclude
|
|
35
|
-
a(
|
|
36
|
-
(e, r) => n.pick ? n.pick.includes(r) && !n.omit?.includes(r) : !n.omit?.includes(r)
|
|
37
|
-
),
|
|
38
|
-
(e) => e,
|
|
39
|
-
// labelMap and adding name
|
|
40
|
-
p((e, r) => ({
|
|
41
|
-
name: r,
|
|
42
|
-
label: n.labelMap?.(r) || r,
|
|
43
|
-
...e
|
|
44
|
-
})),
|
|
45
|
-
// filterMap
|
|
46
|
-
n.filterMap ? m((e) => {
|
|
47
|
-
const r = n.filterMap?.(e.name, e);
|
|
48
|
-
return r === void 0 || r === !0 ? e : r;
|
|
49
|
-
}) : (e) => e,
|
|
50
|
-
// transform to array
|
|
51
|
-
(e) => Object.values(e),
|
|
52
|
-
// order
|
|
53
|
-
u.sort(d),
|
|
54
|
-
// sort
|
|
55
|
-
n.sort ? u.sort(n.sort) : (e) => e
|
|
56
|
-
)
|
|
57
|
-
);
|
|
58
|
-
return (e, r) => (_(!0), M(E, null, A(b.value, ({ name: t, label: o, ...c }) => F(e.$slots, "default", {
|
|
59
|
-
child: { name: t, label: o, ...c }
|
|
60
|
-
}, () => [
|
|
61
|
-
g(h(i.form).Input, k({
|
|
62
|
-
name: t,
|
|
63
|
-
label: o
|
|
64
|
-
}, { ref_for: !0 }, c), null, 16, ["name", "label"])
|
|
65
|
-
])), 256));
|
|
66
|
-
}
|
|
67
|
-
});
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");if(a.appendChild(document.createTextNode('.v-enter-from[data-v-6b2bf87e],.v-leave-to[data-v-6b2bf87e]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-6b2bf87e],.v-leave-active[data-v-6b2bf87e]{display:grid;transition:all .15s}.v-enter-to[data-v-6b2bf87e],.v-leave-from[data-v-6b2bf87e]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-6b2bf87e]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-6b2bf87e]{min-height:0}.error-list[data-v-6b2bf87e]{list-style-position:inside}.error-list [data-v-6b2bf87e]::marker{margin:0;padding:0}.error-alert-content[data-v-6b2bf87e]{background-color:var(--error-background, #fff5f5);color:var(--error-color, #c92a2a);padding:1em}.error-link[data-v-6b2bf87e]{font-weight:700;position:relative;color:var(--error-color, #c92a2a);cursor:pointer}.error-link[data-v-6b2bf87e]:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:rgba(from var(--error-color, #c92a2a) r g b / .5)}.text-h6[data-v-6b2bf87e]{font-weight:700;font-size:1.25em}.error-message[data-v-6b2bf87e]{font-style:italic}.error-item[data-v-6b2bf87e]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-6b2bf87e]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-6b2bf87e]{display:flex;gap:1.5em}.container svg[data-v-6b2bf87e]{width:3em}.container .single-error[data-v-6b2bf87e]{display:inline-block}')),document.head.appendChild(a),window.customElements){const e=window.customElements.define;window.customElements.define=function(i,t){const r=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(r&&r.call(this),this.shadowRoot){const o=document.createElement("style");o.appendChild(document.createTextNode('.v-enter-from[data-v-6b2bf87e],.v-leave-to[data-v-6b2bf87e]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-6b2bf87e],.v-leave-active[data-v-6b2bf87e]{display:grid;transition:all .15s}.v-enter-to[data-v-6b2bf87e],.v-leave-from[data-v-6b2bf87e]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-6b2bf87e]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-6b2bf87e]{min-height:0}.error-list[data-v-6b2bf87e]{list-style-position:inside}.error-list [data-v-6b2bf87e]::marker{margin:0;padding:0}.error-alert-content[data-v-6b2bf87e]{background-color:var(--error-background, #fff5f5);color:var(--error-color, #c92a2a);padding:1em}.error-link[data-v-6b2bf87e]{font-weight:700;position:relative;color:var(--error-color, #c92a2a);cursor:pointer}.error-link[data-v-6b2bf87e]:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:rgba(from var(--error-color, #c92a2a) r g b / .5)}.text-h6[data-v-6b2bf87e]{font-weight:700;font-size:1.25em}.error-message[data-v-6b2bf87e]{font-style:italic}.error-item[data-v-6b2bf87e]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-6b2bf87e]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-6b2bf87e]{display:flex;gap:1.5em}.container svg[data-v-6b2bf87e]{width:3em}.container .single-error[data-v-6b2bf87e]{display:inline-block}')),this.shadowRoot.appendChild(o)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import r from "./vue-components.es33.js";
|
|
3
|
+
|
|
4
|
+
import o from "./vue-components.es35.js";
|
|
5
|
+
const m = /* @__PURE__ */ o(r, [["__scopeId", "data-v-6b2bf87e"]]);
|
|
68
6
|
export {
|
|
69
|
-
|
|
7
|
+
m as default
|
|
70
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
2
|
-
import
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-8c9cb27c]{display:contents}fieldset[disabled][data-v-8c9cb27c]>*{pointer-events:none}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(o,t){const d=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(d&&d.call(this),this.shadowRoot){const c=document.createElement("style");c.appendChild(document.createTextNode("fieldset[data-v-8c9cb27c]{display:contents}fieldset[disabled][data-v-8c9cb27c]>*{pointer-events:none}")),this.shadowRoot.appendChild(c)}},e.call(window.customElements,o,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import o from "./vue-components.es36.js";
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import m from "./vue-components.es35.js";
|
|
5
|
+
const a = /* @__PURE__ */ m(o, [["__scopeId", "data-v-8c9cb27c"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import m from "./vue-components.es35.js";
|
|
5
|
-
const a = /* @__PURE__ */ m(o, [["__scopeId", "data-v-8c9cb27c"]]);
|
|
1
|
+
import { TraceAPI as r } from "./vue-components.es52.js";
|
|
2
|
+
var t = r.getInstance();
|
|
6
3
|
export {
|
|
7
|
-
|
|
4
|
+
t as trace
|
|
8
5
|
};
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
function c(t) {
|
|
2
|
+
return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, f) {
|
|
3
|
+
var i = t.get(e);
|
|
4
|
+
i ? i.push(f) : t.set(e, [f]);
|
|
5
|
+
}, off: function(e, f) {
|
|
6
|
+
var i = t.get(e);
|
|
7
|
+
i && (f ? i.splice(i.indexOf(f) >>> 0, 1) : t.set(e, []));
|
|
8
|
+
}, emit: function(e, f) {
|
|
9
|
+
var i = t.get(e);
|
|
10
|
+
i && i.slice().map(function(a) {
|
|
11
|
+
a(f);
|
|
12
|
+
}), (i = t.get("*")) && i.slice().map(function(a) {
|
|
13
|
+
a(e, f);
|
|
14
|
+
});
|
|
15
|
+
} };
|
|
16
|
+
}
|
|
2
17
|
export {
|
|
3
|
-
|
|
18
|
+
c as default
|
|
4
19
|
};
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
i && i.slice().map(function(a) {
|
|
11
|
-
a(f);
|
|
12
|
-
}), (i = t.get("*")) && i.slice().map(function(a) {
|
|
13
|
-
a(e, f);
|
|
14
|
-
});
|
|
15
|
-
} };
|
|
1
|
+
import { onMounted as e, onUnmounted as u } from "vue";
|
|
2
|
+
function p(t) {
|
|
3
|
+
let n;
|
|
4
|
+
e(() => {
|
|
5
|
+
const o = t();
|
|
6
|
+
o && (n = o);
|
|
7
|
+
}), u(() => {
|
|
8
|
+
n && n();
|
|
9
|
+
});
|
|
16
10
|
}
|
|
17
11
|
export {
|
|
18
|
-
|
|
12
|
+
p as onMountedWithCleanup
|
|
19
13
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as v, mergeModels as C, useModel as k, useSlots as V, computed as _, resolveComponent as g, createBlock as y, openBlock as B, unref as a, createSlots as E, withCtx as u, renderSlot as d, renderList as M, normalizeProps as S, guardReactiveProps as w } from "vue";
|
|
2
2
|
import { useOnClose as L } from "./vue-components.es11.js";
|
|
3
|
-
import { onMountedWithCleanup as h } from "./vue-components.
|
|
3
|
+
import { onMountedWithCleanup as h } from "./vue-components.es29.js";
|
|
4
4
|
const z = /* @__PURE__ */ v({
|
|
5
5
|
__name: "Dialog",
|
|
6
6
|
props: /* @__PURE__ */ C({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/vue-components",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.7",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@mdi/js": "^7.4.47",
|
|
6
6
|
"effect": "^3.19.3",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"highlight.js": "^11.11.1",
|
|
54
54
|
"mitt": "^3.0.1",
|
|
55
55
|
"vue3-highlightjs": "^1.0.5",
|
|
56
|
-
"
|
|
57
|
-
"effect-app": "
|
|
56
|
+
"effect-app": "3.15.0",
|
|
57
|
+
"@effect-app/vue": "2.93.5"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "pnpm build:run",
|
|
@@ -501,18 +501,19 @@ export const createMeta = <T = any>(
|
|
|
501
501
|
acc[key as NestedKeyOf<T>] = newMeta as FieldMeta
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
} else if ("propertySignatures" in typeToProcess) {
|
|
505
|
-
Object.assign(
|
|
506
|
-
acc,
|
|
507
|
-
createMeta<T>({
|
|
508
|
-
parent: key,
|
|
509
|
-
propertySignatures: typeToProcess.propertySignatures,
|
|
510
|
-
meta: { required: isRequired, nullableOrUndefined }
|
|
511
|
-
})
|
|
512
|
-
)
|
|
513
504
|
} else {
|
|
514
|
-
//
|
|
515
|
-
|
|
505
|
+
// Unwrap transformations (like ExtendedClass) to check for propertySignatures
|
|
506
|
+
const unwrappedTypeToProcess = getTransformationFrom(typeToProcess)
|
|
507
|
+
if ("propertySignatures" in unwrappedTypeToProcess) {
|
|
508
|
+
Object.assign(
|
|
509
|
+
acc,
|
|
510
|
+
createMeta<T>({
|
|
511
|
+
parent: key,
|
|
512
|
+
propertySignatures: unwrappedTypeToProcess.propertySignatures,
|
|
513
|
+
meta: { required: isRequired, nullableOrUndefined }
|
|
514
|
+
})
|
|
515
|
+
)
|
|
516
|
+
} else if (S.AST.isTupleType(p.type)) {
|
|
516
517
|
// Check if it has struct elements
|
|
517
518
|
const hasStructElements = p.type.rest.length > 0
|
|
518
519
|
&& p.type.rest[0].type._tag === "TypeLiteral"
|