@effect-app/vue-components 0.4.2 → 0.4.4

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.
@@ -1,218 +1,135 @@
1
- import { S as i, pipe as p, Option as f } from "effect-app";
2
- import { useIntl as S } from "./vue-components.es3.js";
3
- const y = i.NonEmptyArray(i.String), v = (e) => i.AST.isUnion(e) && e.types.find((t) => t._tag === "UndefinedKeyword" || t === i.Null.ast), x = (e) => !e || !i.AST.isUnion(e) ? !1 : e.types.find((t) => t._tag === "UndefinedKeyword") ? "undefined" : e.types.find((t) => t === i.Null.ast) ? "null" : !1, m = ({ meta: e = {}, parent: t = "", property: n, propertySignatures: a }, l = {}) => {
4
- if (n && n._tag === "Transformation")
5
- return m({
6
- parent: t,
7
- meta: e,
8
- property: n.from
9
- });
10
- if ((n == null ? void 0 : n._tag) === "TypeLiteral" && "propertySignatures" in n)
11
- return m({
12
- meta: e,
13
- propertySignatures: n.propertySignatures
14
- });
15
- if (a) {
16
- for (const s of a) {
17
- const u = t ? `${t}.${s.name.toString()}` : s.name.toString(), r = x(s.type), o = !r;
18
- let d = s.type;
19
- if (i.AST.isUnion(s.type) && (d = s.type.types.find(
20
- (g) => g._tag !== "UndefinedKeyword" && g !== i.Null.ast
21
- )), "propertySignatures" in d)
22
- Object.assign(
23
- l,
24
- m({
25
- parent: u,
26
- propertySignatures: d.propertySignatures,
27
- meta: { required: o, nullableOrUndefined: r }
28
- })
29
- );
30
- else {
31
- const g = m({
32
- parent: u,
33
- property: s.type,
34
- meta: { required: o, nullableOrUndefined: r }
35
- });
36
- l[u] = g;
1
+ import { useForm as I } from "@tanstack/vue-form";
2
+ import { S as N } from "effect-app";
3
+ import { generateMetaFromSchema as R } from "./vue-components.es7.js";
4
+ import { computed as b, onUnmounted as A, onMounted as D, onBeforeUnmount as J, provide as K } from "vue";
5
+ import { isObject as q } from "./vue-components.es17.js";
6
+ import M from "./vue-components.es18.js";
7
+ const x = Symbol("OmegaForm"), H = (w, s, i) => {
8
+ if (!w) throw new Error("Schema is required");
9
+ const V = N.standardSchemaV1(w), { filterItems: L, meta: t } = R(w), d = b(() => {
10
+ var l;
11
+ if ((l = i == null ? void 0 : i.persistency) != null && l.id)
12
+ return i.persistency.id;
13
+ const e = window.location.pathname, r = Object.keys(t);
14
+ return `${e}-${r.join("-")}`;
15
+ }), U = () => {
16
+ const e = new URLSearchParams(window.location.search);
17
+ e.delete(d.value);
18
+ const r = new URL(window.location.href);
19
+ r.search = e.toString(), window.history.replaceState({}, "", r.toString());
20
+ };
21
+ function v(e, r) {
22
+ for (const l in r)
23
+ r[l] && q(r[l]) ? (e[l] || (e[l] = {}), v(e[l], r[l])) : e[l] = r[l];
24
+ return e;
25
+ }
26
+ const j = b(() => {
27
+ var l;
28
+ if (s != null && s.defaultValues && !((l = i == null ? void 0 : i.persistency) != null && l.overrideDefaultValues))
29
+ return s == null ? void 0 : s.defaultValues;
30
+ let e;
31
+ const r = i == null ? void 0 : i.persistency;
32
+ if (!(r != null && r.policies) || r.policies.length === 0) return {};
33
+ if (r.policies.includes("querystring"))
34
+ try {
35
+ const c = new URLSearchParams(window.location.search).get(d.value);
36
+ U(), c && (e = JSON.parse(c));
37
+ } catch (u) {
38
+ console.error(u);
37
39
  }
40
+ if (
41
+ // query string has higher priority than local/session storage
42
+ !e && (r.policies.includes("local") || r.policies.includes("session"))
43
+ ) {
44
+ const u = r.policies.includes("local") ? localStorage : sessionStorage;
45
+ if (u)
46
+ try {
47
+ const c = JSON.parse(
48
+ u.getItem(d.value) || "{}"
49
+ );
50
+ u.removeItem(d.value), e = c;
51
+ } catch (c) {
52
+ console.error(c);
53
+ }
38
54
  }
39
- return l;
40
- }
41
- if (n) {
42
- const s = v(n);
43
- if (Object.hasOwnProperty.call(e, "required") || (e.required = !s), i.AST.isUnion(n)) {
44
- const r = n.types.find(
45
- (o) => o._tag !== "UndefinedKeyword" && o !== i.Null.ast
46
- );
47
- return "propertySignatures" in r ? m({
48
- propertySignatures: r.propertySignatures,
49
- parent: t,
50
- meta: e
51
- }) : n.types.every(i.AST.isLiteral) ? {
52
- ...e,
53
- type: "select",
54
- members: n.types.map((o) => o.literal)
55
- } : {
56
- ...e,
57
- ...m({
58
- parent: t,
59
- meta: e,
60
- property: r
61
- })
62
- };
55
+ if (e ?? (e = {}), (s == null ? void 0 : s.defaultValues) == null)
56
+ return e;
57
+ {
58
+ const u = s == null ? void 0 : s.defaultValues;
59
+ return v(u, e);
63
60
  }
64
- if (i.AST.isTupleType(n))
65
- return {
66
- ...e,
67
- type: "multiple",
68
- members: n.elements
69
- };
70
- const u = i.AST.getAnnotation(
71
- n,
72
- i.AST.JSONSchemaAnnotationId
73
- ).pipe(f.getOrElse(() => ({})));
74
- return e = { ...e, ...u }, "from" in n ? m({
75
- parent: t,
76
- meta: e,
77
- property: n.from
78
- }) : (e.type = i.AST.getAnnotation(
79
- n,
80
- i.AST.TitleAnnotationId
81
- ).pipe(
82
- f.getOrElse(() => "unknown")
83
- ), e);
84
- }
85
- return l;
86
- }, c = (e) => {
87
- const t = e.ast, n = {};
88
- if (t._tag === "Transformation" || t._tag === "Refinement")
89
- return c(i.make(t.from));
90
- if ("propertySignatures" in t) {
91
- const a = m({
92
- propertySignatures: t.propertySignatures
61
+ }), n = I({
62
+ ...s,
63
+ validators: {
64
+ onSubmit: V,
65
+ ...(s == null ? void 0 : s.validators) || {}
66
+ },
67
+ onSubmit: s != null && s.onSubmit ? ({ formApi: e, meta: r, value: l }) => {
68
+ var u;
69
+ return (u = s.onSubmit) == null ? void 0 : u.call(s, {
70
+ formApi: e,
71
+ meta: r,
72
+ value: l
73
+ });
74
+ } : void 0,
75
+ defaultValues: j.value
76
+ }), E = () => {
77
+ Object.keys(t).forEach((e) => {
78
+ n.setFieldValue(e, void 0);
93
79
  });
94
- if (Object.values(a).every((s) => s && "type" in s))
95
- return a;
96
- const l = (s, u = "") => {
97
- for (const r in s) {
98
- const o = u ? `${u}.${r}` : r;
99
- s[r] && typeof s[r] == "object" && "type" in s[r] ? n[o] = s[r] : s[r] && typeof s[r] == "object" && l(s[r], o);
80
+ }, S = (e) => e.reduce(
81
+ (r, l) => {
82
+ const u = l.split(".");
83
+ return u.reduce((c, o, P) => (P === u.length - 1 ? c[o] = n.getFieldValue(l) : c[o] = c[o] ?? {}, c[o]), r), r;
84
+ },
85
+ {}
86
+ ), f = (e) => {
87
+ if (e) {
88
+ if (Array.isArray(e.keys))
89
+ return S(e.keys);
90
+ if (Array.isArray(e.banKeys)) {
91
+ const r = Object.keys(t).filter(
92
+ (l) => {
93
+ var u;
94
+ return (u = e.banKeys) == null ? void 0 : u.includes(l);
95
+ }
96
+ );
97
+ return S(r);
100
98
  }
101
- };
102
- l(a);
103
- }
104
- return n;
105
- }, b = (e) => i.extend(e, i.Struct({})), A = (e) => {
106
- const t = c(e), n = p(
107
- e.ast,
108
- f.liftPredicate((a) => a._tag === "Refinement" && "filter" in a),
109
- f.flatMap((a) => i.AST.getJSONSchemaAnnotation(a)),
110
- f.filter((a) => "items" in a),
111
- f.filterMap(
112
- ({ items: a }) => i.decodeUnknownOption(y)(a)
113
- ),
114
- f.zipWith(
115
- i.AST.getMessageAnnotation(e.ast),
116
- (a, l) => ({
117
- items: a,
118
- message: l("")
119
- })
120
- ),
121
- f.getOrUndefined
122
- );
123
- return { schema: e, meta: t, filterItems: n };
124
- }, O = (e) => {
125
- const { trans: t } = S();
126
- let n;
127
- switch (e.type) {
128
- case "string":
129
- n = i.String.annotations({
130
- message: () => t("validation.empty")
131
- }), e.format === "email" && (n = i.compose(
132
- n,
133
- i.Email.annotations({
134
- message: () => t("validation.email.invalid")
135
- })
136
- )), e.required && n.annotations({
137
- message: () => t("validation.empty")
138
- }), e.maxLength && (n = n.pipe(i.maxLength(e.maxLength)).annotations({
139
- message: () => t("validation.string.maxLength", {
140
- maxLength: e.maxLength
141
- })
142
- })), e.minLength && (n = n.pipe(i.minLength(e.minLength)).annotations({
143
- message: () => t("validation.string.minLength", {
144
- minLength: e.minLength
145
- })
146
- }));
147
- break;
148
- case "number":
149
- n = i.Number.annotations({
150
- message: () => t("validation.empty")
151
- }), e.required && n.annotations({
152
- message: () => t("validation.empty")
153
- }), e.minimum && (n = n.pipe(i.greaterThanOrEqualTo(e.minimum)).annotations({
154
- message: () => t("validation.number.min", {
155
- minimum: e.minimum,
156
- isExclusive: !0
157
- })
158
- })), e.maximum && (n = n.pipe(i.lessThanOrEqualTo(e.maximum)).annotations({
159
- message: () => t("validation.number.max", {
160
- maximum: e.maximum,
161
- isExclusive: !0
162
- })
163
- })), e.exclusiveMinimum && (n = n.pipe(i.greaterThan(e.exclusiveMinimum)).annotations({
164
- message: () => t("validation.number.min", {
165
- minimum: e.exclusiveMinimum,
166
- isExclusive: !1
167
- })
168
- })), e.exclusiveMaximum && (n = n.pipe(i.lessThan(e.exclusiveMaximum)).annotations({
169
- message: () => t("validation.number.max", {
170
- maximum: e.exclusiveMaximum,
171
- isExclusive: !1
172
- })
173
- }));
174
- break;
175
- case "select":
176
- n = i.Literal(...e.members).annotations({
177
- message: () => ({
178
- message: t("validation.not_a_valid", {
179
- type: "select",
180
- message: e.members.join(", ")
181
- }),
182
- override: !0
183
- })
184
- });
185
- break;
186
- case "multiple":
187
- n = i.Array(i.String).annotations({
188
- message: () => t("validation.not_a_valid", {
189
- type: "multiple",
190
- message: e.members.join(", ")
191
- })
192
- });
193
- break;
194
- case "boolean":
195
- n = i.Boolean;
196
- break;
197
- // todo: switch must be exhaustive or have default case, otherwise falls through with schema undefined.
198
- case "unknown":
199
- n = i.Unknown;
200
- break;
201
- }
202
- return e.required ? n.pipe(
203
- i.annotations({
204
- message: () => t("validation.empty")
205
- })
206
- ) : n = i.NullishOr(n), i.standardSchemaV1(n);
207
- }, L = (e, t) => i.NullOr(e).pipe(
208
- i.transform(i.typeSchema(e), {
209
- decode: (n) => n ?? t(),
210
- encode: (n) => n
211
- })
212
- );
99
+ return n.store.state.values;
100
+ }
101
+ }, h = () => {
102
+ const e = i == null ? void 0 : i.persistency;
103
+ if (!(!(e != null && e.policies) || e.policies.length === 0) && (e.policies.includes("local") || e.policies.includes("session"))) {
104
+ const r = e.policies.includes("local") ? localStorage : sessionStorage;
105
+ if (!r) return;
106
+ const l = f(e);
107
+ return r.setItem(d.value, JSON.stringify(l));
108
+ }
109
+ }, a = () => {
110
+ const e = i == null ? void 0 : i.persistency;
111
+ if (!(!(e != null && e.policies) || e.policies.length === 0) && e.policies.includes("querystring")) {
112
+ const r = f(e), l = new URLSearchParams(window.location.search);
113
+ l.set(d.value, JSON.stringify(r));
114
+ const u = new URL(window.location.href);
115
+ u.search = l.toString(), window.history.replaceState({}, "", u.toString());
116
+ }
117
+ };
118
+ A(h), D(() => {
119
+ window.addEventListener("beforeunload", h), window.addEventListener("blur", a);
120
+ }), J(() => {
121
+ window.removeEventListener("beforeunload", h), window.removeEventListener("blur", a);
122
+ });
123
+ const y = Object.assign(n, {
124
+ meta: t,
125
+ filterItems: L,
126
+ clear: E
127
+ });
128
+ return K(x, y), Object.assign(y, {
129
+ Input: M
130
+ });
131
+ };
213
132
  export {
214
- b as duplicateSchema,
215
- O as generateInputStandardSchemaFromFieldMeta,
216
- A as generateMetaFromSchema,
217
- L as nullableInput
133
+ x as OmegaFormKey,
134
+ H as useOmegaForm
218
135
  };
@@ -1,7 +1,218 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-6833e150]{display:contents}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(i,t){const o=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(o&&o.call(this),this.shadowRoot){const d=document.createElement("style");d.appendChild(document.createTextNode("fieldset[data-v-6833e150]{display:contents}")),this.shadowRoot.appendChild(d)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import o from "./vue-components.es11.js";
3
- import m from "./vue-components.es12.js";
4
- const a = /* @__PURE__ */ m(o, [["__scopeId", "data-v-6833e150"]]);
1
+ import { S as i, pipe as p, Option as f } from "effect-app";
2
+ import { useIntl as S } from "./vue-components.es3.js";
3
+ const y = i.NonEmptyArray(i.String), v = (e) => i.AST.isUnion(e) && e.types.find((t) => t._tag === "UndefinedKeyword" || t === i.Null.ast), x = (e) => !e || !i.AST.isUnion(e) ? !1 : e.types.find((t) => t._tag === "UndefinedKeyword") ? "undefined" : e.types.find((t) => t === i.Null.ast) ? "null" : !1, m = ({ meta: e = {}, parent: t = "", property: n, propertySignatures: a }, l = {}) => {
4
+ if (n && n._tag === "Transformation")
5
+ return m({
6
+ parent: t,
7
+ meta: e,
8
+ property: n.from
9
+ });
10
+ if ((n == null ? void 0 : n._tag) === "TypeLiteral" && "propertySignatures" in n)
11
+ return m({
12
+ meta: e,
13
+ propertySignatures: n.propertySignatures
14
+ });
15
+ if (a) {
16
+ for (const s of a) {
17
+ const u = t ? `${t}.${s.name.toString()}` : s.name.toString(), r = x(s.type), o = !r;
18
+ let d = s.type;
19
+ if (i.AST.isUnion(s.type) && (d = s.type.types.find(
20
+ (g) => g._tag !== "UndefinedKeyword" && g !== i.Null.ast
21
+ )), "propertySignatures" in d)
22
+ Object.assign(
23
+ l,
24
+ m({
25
+ parent: u,
26
+ propertySignatures: d.propertySignatures,
27
+ meta: { required: o, nullableOrUndefined: r }
28
+ })
29
+ );
30
+ else {
31
+ const g = m({
32
+ parent: u,
33
+ property: s.type,
34
+ meta: { required: o, nullableOrUndefined: r }
35
+ });
36
+ l[u] = g;
37
+ }
38
+ }
39
+ return l;
40
+ }
41
+ if (n) {
42
+ const s = v(n);
43
+ if (Object.hasOwnProperty.call(e, "required") || (e.required = !s), i.AST.isUnion(n)) {
44
+ const r = n.types.find(
45
+ (o) => o._tag !== "UndefinedKeyword" && o !== i.Null.ast
46
+ );
47
+ return "propertySignatures" in r ? m({
48
+ propertySignatures: r.propertySignatures,
49
+ parent: t,
50
+ meta: e
51
+ }) : n.types.every(i.AST.isLiteral) ? {
52
+ ...e,
53
+ type: "select",
54
+ members: n.types.map((o) => o.literal)
55
+ } : {
56
+ ...e,
57
+ ...m({
58
+ parent: t,
59
+ meta: e,
60
+ property: r
61
+ })
62
+ };
63
+ }
64
+ if (i.AST.isTupleType(n))
65
+ return {
66
+ ...e,
67
+ type: "multiple",
68
+ members: n.elements
69
+ };
70
+ const u = i.AST.getAnnotation(
71
+ n,
72
+ i.AST.JSONSchemaAnnotationId
73
+ ).pipe(f.getOrElse(() => ({})));
74
+ return e = { ...e, ...u }, "from" in n ? m({
75
+ parent: t,
76
+ meta: e,
77
+ property: n.from
78
+ }) : (e.type = i.AST.getAnnotation(
79
+ n,
80
+ i.AST.TitleAnnotationId
81
+ ).pipe(
82
+ f.getOrElse(() => "unknown")
83
+ ), e);
84
+ }
85
+ return l;
86
+ }, c = (e) => {
87
+ const t = e.ast, n = {};
88
+ if (t._tag === "Transformation" || t._tag === "Refinement")
89
+ return c(i.make(t.from));
90
+ if ("propertySignatures" in t) {
91
+ const a = m({
92
+ propertySignatures: t.propertySignatures
93
+ });
94
+ if (Object.values(a).every((s) => s && "type" in s))
95
+ return a;
96
+ const l = (s, u = "") => {
97
+ for (const r in s) {
98
+ const o = u ? `${u}.${r}` : r;
99
+ s[r] && typeof s[r] == "object" && "type" in s[r] ? n[o] = s[r] : s[r] && typeof s[r] == "object" && l(s[r], o);
100
+ }
101
+ };
102
+ l(a);
103
+ }
104
+ return n;
105
+ }, b = (e) => i.extend(e, i.Struct({})), A = (e) => {
106
+ const t = c(e), n = p(
107
+ e.ast,
108
+ f.liftPredicate((a) => a._tag === "Refinement" && "filter" in a),
109
+ f.flatMap((a) => i.AST.getJSONSchemaAnnotation(a)),
110
+ f.filter((a) => "items" in a),
111
+ f.filterMap(
112
+ ({ items: a }) => i.decodeUnknownOption(y)(a)
113
+ ),
114
+ f.zipWith(
115
+ i.AST.getMessageAnnotation(e.ast),
116
+ (a, l) => ({
117
+ items: a,
118
+ message: l("")
119
+ })
120
+ ),
121
+ f.getOrUndefined
122
+ );
123
+ return { schema: e, meta: t, filterItems: n };
124
+ }, O = (e) => {
125
+ const { trans: t } = S();
126
+ let n;
127
+ switch (e.type) {
128
+ case "string":
129
+ n = i.String.annotations({
130
+ message: () => t("validation.empty")
131
+ }), e.format === "email" && (n = i.compose(
132
+ n,
133
+ i.Email.annotations({
134
+ message: () => t("validation.email.invalid")
135
+ })
136
+ )), e.required && n.annotations({
137
+ message: () => t("validation.empty")
138
+ }), e.maxLength && (n = n.pipe(i.maxLength(e.maxLength)).annotations({
139
+ message: () => t("validation.string.maxLength", {
140
+ maxLength: e.maxLength
141
+ })
142
+ })), e.minLength && (n = n.pipe(i.minLength(e.minLength)).annotations({
143
+ message: () => t("validation.string.minLength", {
144
+ minLength: e.minLength
145
+ })
146
+ }));
147
+ break;
148
+ case "number":
149
+ n = i.Number.annotations({
150
+ message: () => t("validation.empty")
151
+ }), e.required && n.annotations({
152
+ message: () => t("validation.empty")
153
+ }), e.minimum && (n = n.pipe(i.greaterThanOrEqualTo(e.minimum)).annotations({
154
+ message: () => t("validation.number.min", {
155
+ minimum: e.minimum,
156
+ isExclusive: !0
157
+ })
158
+ })), e.maximum && (n = n.pipe(i.lessThanOrEqualTo(e.maximum)).annotations({
159
+ message: () => t("validation.number.max", {
160
+ maximum: e.maximum,
161
+ isExclusive: !0
162
+ })
163
+ })), e.exclusiveMinimum && (n = n.pipe(i.greaterThan(e.exclusiveMinimum)).annotations({
164
+ message: () => t("validation.number.min", {
165
+ minimum: e.exclusiveMinimum,
166
+ isExclusive: !1
167
+ })
168
+ })), e.exclusiveMaximum && (n = n.pipe(i.lessThan(e.exclusiveMaximum)).annotations({
169
+ message: () => t("validation.number.max", {
170
+ maximum: e.exclusiveMaximum,
171
+ isExclusive: !1
172
+ })
173
+ }));
174
+ break;
175
+ case "select":
176
+ n = i.Literal(...e.members).annotations({
177
+ message: () => ({
178
+ message: t("validation.not_a_valid", {
179
+ type: "select",
180
+ message: e.members.join(", ")
181
+ }),
182
+ override: !0
183
+ })
184
+ });
185
+ break;
186
+ case "multiple":
187
+ n = i.Array(i.String).annotations({
188
+ message: () => t("validation.not_a_valid", {
189
+ type: "multiple",
190
+ message: e.members.join(", ")
191
+ })
192
+ });
193
+ break;
194
+ case "boolean":
195
+ n = i.Boolean;
196
+ break;
197
+ // todo: switch must be exhaustive or have default case, otherwise falls through with schema undefined.
198
+ case "unknown":
199
+ n = i.Unknown;
200
+ break;
201
+ }
202
+ return e.required ? n.pipe(
203
+ i.annotations({
204
+ message: () => t("validation.empty")
205
+ })
206
+ ) : n = i.NullishOr(n), i.standardSchemaV1(n);
207
+ }, L = (e, t) => i.NullOr(e).pipe(
208
+ i.transform(i.typeSchema(e), {
209
+ decode: (n) => n ?? t(),
210
+ encode: (n) => n
211
+ })
212
+ );
5
213
  export {
6
- a as default
214
+ b as duplicateSchema,
215
+ O as generateInputStandardSchemaFromFieldMeta,
216
+ A as generateMetaFromSchema,
217
+ L as nullableInput
7
218
  };
@@ -1,48 +1,8 @@
1
- import { defineComponent as i, computed as t, createBlock as p, openBlock as d, resolveDynamicComponent as u, withCtx as r, createVNode as f, mergeProps as c, renderSlot as v, normalizeProps as h, guardReactiveProps as g } from "vue";
2
- import { generateInputStandardSchemaFromFieldMeta as y } from "./vue-components.es6.js";
3
- import b from "./vue-components.es17.js";
4
- const S = /* @__PURE__ */ i({
5
- inheritAttrs: !1,
6
- __name: "OmegaInput",
7
- props: {
8
- form: {},
9
- name: {},
10
- validators: {},
11
- label: {},
12
- options: {},
13
- type: {}
14
- },
15
- setup(n) {
16
- const o = n, a = t(() => o.form.meta[o.name]), m = t(() => {
17
- if (!a.value)
18
- throw new Error("Meta is undefined");
19
- return y(a.value);
20
- });
21
- return (e, C) => (d(), p(u(e.form.Field), {
22
- name: e.name,
23
- validators: {
24
- onChange: m.value,
25
- ...e.validators
26
- }
27
- }, {
28
- default: r(({ field: l }) => [
29
- f(b, c({
30
- field: l,
31
- label: e.label,
32
- options: e.options,
33
- meta: a.value,
34
- type: e.type
35
- }, e.$attrs), {
36
- default: r((s) => [
37
- v(e.$slots, "default", h(g(s)))
38
- ]),
39
- _: 2
40
- }, 1040, ["field", "label", "options", "meta", "type"])
41
- ]),
42
- _: 3
43
- }, 8, ["name", "validators"]));
44
- }
45
- });
1
+ (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-6833e150]{display:contents}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(i,t){const o=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(o&&o.call(this),this.shadowRoot){const d=document.createElement("style");d.appendChild(document.createTextNode("fieldset[data-v-6833e150]{display:contents}")),this.shadowRoot.appendChild(d)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import o from "./vue-components.es11.js";
3
+
4
+ import m from "./vue-components.es13.js";
5
+ const e = /* @__PURE__ */ m(o, [["__scopeId", "data-v-6833e150"]]);
46
6
  export {
47
- S as default
7
+ e as default
48
8
  };
@@ -1,6 +1,7 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");if(t.appendChild(document.createTextNode(".v-enter-from[data-v-502ecb3a],.v-leave-to[data-v-502ecb3a]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-502ecb3a],.v-leave-active[data-v-502ecb3a]{display:grid;transition:all .15s}.v-enter-to[data-v-502ecb3a],.v-leave-from[data-v-502ecb3a]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-502ecb3a]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-502ecb3a]{min-height:0}.error-list[data-v-502ecb3a]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:.5em;align-items:start}@container (max-width: 28.125rem){.error-list[data-v-502ecb3a]{grid-template-columns:auto 1fr}.error-link[data-v-502ecb3a]{grid-column:1 / -1;justify-self:end}}@container (max-width: 18.75rem){.error-list[data-v-502ecb3a]{grid-template-columns:1fr}.error-message[data-v-502ecb3a]{grid-column:1 / -1}}.error-item[data-v-502ecb3a]{display:contents}a[data-v-502ecb3a]{min-width:min-content}.error-link[data-v-502ecb3a]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),document.head.appendChild(t),window.customElements){const e=window.customElements.define;window.customElements.define=function(n,a){const i=a.prototype.connectedCallback;return a.prototype.connectedCallback=function(){if(i&&i.call(this),this.shadowRoot){const r=document.createElement("style");r.appendChild(document.createTextNode(".v-enter-from[data-v-502ecb3a],.v-leave-to[data-v-502ecb3a]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-502ecb3a],.v-leave-active[data-v-502ecb3a]{display:grid;transition:all .15s}.v-enter-to[data-v-502ecb3a],.v-leave-from[data-v-502ecb3a]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-502ecb3a]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-502ecb3a]{min-height:0}.error-list[data-v-502ecb3a]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:.5em;align-items:start}@container (max-width: 28.125rem){.error-list[data-v-502ecb3a]{grid-template-columns:auto 1fr}.error-link[data-v-502ecb3a]{grid-column:1 / -1;justify-self:end}}@container (max-width: 18.75rem){.error-list[data-v-502ecb3a]{grid-template-columns:1fr}.error-message[data-v-502ecb3a]{grid-column:1 / -1}}.error-item[data-v-502ecb3a]{display:contents}a[data-v-502ecb3a]{min-width:min-content}.error-link[data-v-502ecb3a]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),this.shadowRoot.appendChild(r)}},e.call(window.customElements,n,a)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import o from "./vue-components.es14.js";
3
- import r from "./vue-components.es12.js";
2
+ import o from "./vue-components.es15.js";
3
+
4
+ import r from "./vue-components.es13.js";
4
5
  const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-502ecb3a"]]);
5
6
  export {
6
7
  e as default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/vue-components",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "peerDependencies": {
5
5
  "@mdi/js": "^7.4.47",
6
6
  "@tanstack/vue-form": "^1.2.4",
@@ -52,8 +52,8 @@
52
52
  "dependencies": {
53
53
  "highlight.js": "^11.11.1",
54
54
  "vue3-highlightjs": "^1.0.5",
55
- "@effect-app/vue": "2.40.1",
56
- "effect-app": "2.39.1"
55
+ "@effect-app/vue": "2.41.0",
56
+ "effect-app": "2.40.0"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "rimraf dist && vue-tsc && vite build",