@effect-app/vue-components 4.0.0-beta.315 → 4.0.0-beta.317

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.
Files changed (52) hide show
  1. package/dist/types/components/Dialog.vue.d.ts +1 -1
  2. package/dist/types/components/OmegaForm/decimalSeparatorInput.d.ts +13 -0
  3. package/dist/vue-components.es.js +9 -9
  4. package/dist/vue-components14.es.js +1 -1
  5. package/dist/vue-components32.es.js +14 -23
  6. package/dist/vue-components33.es.js +23 -335
  7. package/dist/vue-components34.es.js +344 -0
  8. package/dist/vue-components36.es.js +7 -73
  9. package/dist/vue-components37.es.js +72 -3
  10. package/dist/vue-components38.es.js +4 -63
  11. package/dist/vue-components39.es.js +63 -4
  12. package/dist/vue-components40.es.js +4 -23
  13. package/dist/vue-components41.es.js +23 -4
  14. package/dist/vue-components42.es.js +3 -57
  15. package/dist/vue-components43.es.js +57 -3
  16. package/dist/vue-components44.es.js +4 -11
  17. package/dist/vue-components45.es.js +11 -21
  18. package/dist/vue-components46.es.js +22 -0
  19. package/dist/vue-components48.es.js +8 -3
  20. package/dist/vue-components49.es.js +3 -37
  21. package/dist/vue-components50.es.js +34 -23
  22. package/dist/vue-components51.es.js +23 -24
  23. package/dist/vue-components52.es.js +27 -6
  24. package/dist/vue-components53.es.js +6 -17
  25. package/dist/vue-components54.es.js +16 -34
  26. package/dist/vue-components55.es.js +34 -16
  27. package/dist/vue-components56.es.js +16 -19
  28. package/dist/vue-components57.es.js +10 -19
  29. package/dist/vue-components58.es.js +29 -6
  30. package/dist/vue-components59.es.js +6 -8
  31. package/dist/vue-components60.es.js +7 -36
  32. package/dist/vue-components61.es.js +37 -24
  33. package/dist/vue-components62.es.js +19 -122
  34. package/dist/vue-components63.es.js +126 -22
  35. package/dist/vue-components64.es.js +20 -17
  36. package/dist/vue-components65.es.js +18 -6
  37. package/dist/vue-components66.es.js +5 -15
  38. package/dist/vue-components67.es.js +18 -4
  39. package/dist/vue-components68.es.js +4 -28
  40. package/dist/vue-components69.es.js +28 -4
  41. package/dist/vue-components70.es.js +4 -42
  42. package/dist/vue-components71.es.js +38 -96
  43. package/dist/vue-components72.es.js +95 -30
  44. package/dist/vue-components73.es.js +35 -18
  45. package/dist/vue-components74.es.js +18 -49
  46. package/dist/vue-components75.es.js +50 -0
  47. package/package.json +3 -3
  48. package/src/components/OmegaForm/OmegaInputVuetify.vue +28 -3
  49. package/src/components/OmegaForm/decimalSeparatorInput.ts +38 -0
  50. package/src/components/OmegaForm/meta/checks.ts +4 -1
  51. package/dist/vue-components35.es.js +0 -8
  52. package/dist/vue-components47.es.js +0 -9
@@ -8,7 +8,7 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
8
  declare var __VLS_11: {
9
9
  open: boolean;
10
10
  cancel: () => void;
11
- isActive: any;
11
+ isActive: import("vue").Ref<boolean, boolean>;
12
12
  }, __VLS_15: string, __VLS_16: any;
13
13
  type __VLS_Slots = {} & {
14
14
  [K in NonNullable<typeof __VLS_15>]?: (props: typeof __VLS_16) => any;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * VNumberInput only accepts the active decimal separator and silently drops
3
+ * the other one while typing. Attached in capture phase on the component
4
+ * root, this handler lets users type either "." or ",": the wrong character
5
+ * is translated to the active separator before Vuetify's own beforeinput
6
+ * filter can reject it.
7
+ *
8
+ * No validation beyond Vuetify's own single-separator typing rule: OmegaForm
9
+ * deliberately lets out-of-schema values through so schema errors show,
10
+ * instead of silently blocking input (same reasoning as min/max not being
11
+ * passed as props).
12
+ */
13
+ export declare const handleDecimalSeparatorBeforeinput: (e: InputEvent, separator: string) => void;
@@ -10,15 +10,15 @@ import { toFormSchema as h } from "./vue-components18.es.js";
10
10
  import { deepMerge as g } from "./vue-components20.es.js";
11
11
  import { makeStandardSchemaV1Hooks as _, toLocalizedStandardSchemaV1 as v } from "./vue-components21.es.js";
12
12
  import { useErrorLabel as y } from "./vue-components22.es.js";
13
- import b from "./vue-components37.es.js";
14
- import x from "./vue-components39.es.js";
15
- import S from "./vue-components41.es.js";
16
- import C from "./vue-components43.es.js";
17
- import { FormErrors as w } from "./vue-components70.es.js";
18
- import { OmegaFormKey as T, useOmegaForm as E } from "./vue-components71.es.js";
19
- import { createUseFormWithCustomInput as D } from "./vue-components72.es.js";
20
- import { duplicateSchema as O } from "./vue-components73.es.js";
21
- import { components_exports as k } from "./vue-components74.es.js";
13
+ import b from "./vue-components38.es.js";
14
+ import x from "./vue-components40.es.js";
15
+ import S from "./vue-components42.es.js";
16
+ import C from "./vue-components44.es.js";
17
+ import { FormErrors as w } from "./vue-components71.es.js";
18
+ import { OmegaFormKey as T, useOmegaForm as E } from "./vue-components72.es.js";
19
+ import { createUseFormWithCustomInput as D } from "./vue-components73.es.js";
20
+ import { duplicateSchema as O } from "./vue-components74.es.js";
21
+ import { components_exports as k } from "./vue-components75.es.js";
22
22
  //#region src/index.ts
23
23
  function A(e) {
24
24
  for (let t in k) if (Object.prototype.hasOwnProperty.call(k, t)) {
@@ -43,7 +43,7 @@ var t = (e) => {
43
43
  r.exclusiveMaximum = e.exclusiveMaximum;
44
44
  break;
45
45
  }
46
- } else e.AST.isBoolean(t) ? r.type = "boolean" : e.AST.isDeclaration(t) && t.annotations?.typeConstructor?._tag === "Date" ? r.type = "date" : r.type = "unknown";
46
+ } else e.AST.isBoolean(t) ? r.type = "boolean" : e.AST.isDeclaration(t) && (t.annotations?.typeConstructor?._tag === "Date" || t.annotations?.representation?.id === "effect/schema/Date") ? r.type = "date" : r.type = "unknown";
47
47
  return r;
48
48
  };
49
49
  //#endregion
@@ -1,24 +1,15 @@
1
- //#region src/components/OmegaForm/types.ts
2
- var e = [
3
- "string",
4
- "text",
5
- "number",
6
- "select",
7
- "multiple",
8
- "boolean",
9
- "radio",
10
- "autocomplete",
11
- "autocompletemultiple",
12
- "switch",
13
- "range",
14
- "password",
15
- "email",
16
- "date",
17
- "tel",
18
- "url",
19
- "color",
20
- "time",
21
- "search"
22
- ];
1
+ //#region src/components/OmegaForm/decimalSeparatorInput.ts
2
+ var e = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), t = (t, n) => {
3
+ if (!t.data) return;
4
+ let r = [".", ","].filter((e) => e !== n);
5
+ if (!r.some((e) => t.data.includes(e))) return;
6
+ let i = t.target;
7
+ t.preventDefault(), t.stopPropagation();
8
+ let a = r.reduce((e, t) => e.replaceAll(t, n), t.data), o = i.selectionStart ?? i.value.length, s = i.selectionEnd ?? i.value.length, c = i.value.slice(0, o) + a + i.value.slice(s);
9
+ if (!RegExp(`^-?\\d*${e(n)}?\\d*$`).test(c)) return;
10
+ i.value = c;
11
+ let l = o + a.length;
12
+ i.setSelectionRange(l, l), i.dispatchEvent(new Event("input", { bubbles: !0 }));
13
+ };
23
14
  //#endregion
24
- export { e as typeOverrides };
15
+ export { t as handleDecimalSeparatorBeforeinput };
@@ -1,336 +1,24 @@
1
- import { getInputType as e } from "./vue-components13.es.js";
2
- import { typeOverrides as t } from "./vue-components32.es.js";
3
- import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createSlots as s, defineComponent as c, guardReactiveProps as l, mergeProps as u, normalizeProps as d, openBlock as f, renderList as p, renderSlot as m, resolveComponent as h, resolveDynamicComponent as g, unref as _, watchEffect as v, withCtx as y } from "vue";
4
- //#region src/components/OmegaForm/OmegaInputVuetify.vue?vue&type=script&setup=true&lang.ts
5
- var b = /*@__PURE__*/ c({
6
- inheritAttrs: !1,
7
- __name: "OmegaInputVuetify",
8
- props: {
9
- inputProps: {},
10
- field: {},
11
- state: {}
12
- },
13
- emits: ["focus", "blur"],
14
- setup(c) {
15
- let b = c, x = r(() => !t.includes(b.inputProps.type));
16
- return v(() => {
17
- x.value && console.warn(`[OmegaForm] Unhandled input type "${b.inputProps.type}", falling back to a text input.`);
18
- }), (t, r) => {
19
- let v = h("v-text-field"), b = h("v-textarea"), S = h("v-number-input"), C = h("v-slider"), w = h("v-radio"), T = h("v-radio-group"), E = h("v-select"), D = h("v-autocomplete");
20
- return f(), o("div", {
21
- class: "omega-input",
22
- onFocusout: r[9] ||= (e) => {
23
- t.$emit("blur", e), c.field.handleBlur();
24
- },
25
- onFocusin: r[10] ||= (e) => t.$emit("focus", e)
26
- }, [
27
- c.inputProps.type === "boolean" || c.inputProps.type === "switch" ? (f(), i(g(c.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), u({
28
- key: 0,
29
- id: c.inputProps.id,
30
- name: c.field.name,
31
- label: c.inputProps.label,
32
- "error-messages": c.inputProps.errorMessages,
33
- error: c.inputProps.error,
34
- ripple: ""
35
- }, t.$attrs, {
36
- "model-value": c.state.value,
37
- onChange: r[0] ||= (e) => c.field.handleChange(e.target.checked)
38
- }), s({ _: 2 }, [t.$slots.label ? {
39
- name: "label",
40
- fn: y(() => [m(t.$slots, "label", d(l({
41
- required: c.inputProps.required,
42
- id: c.inputProps.id,
43
- label: c.inputProps.label
44
- })))]),
45
- key: "0"
46
- } : void 0]), 1040, [
47
- "id",
48
- "name",
49
- "label",
50
- "error-messages",
51
- "error",
52
- "model-value"
53
- ])) : a("", !0),
54
- c.inputProps.type === "email" || c.inputProps.type === "string" || c.inputProps.type === "password" || c.inputProps.type === "date" || c.inputProps.type === "tel" || c.inputProps.type === "url" || c.inputProps.type === "color" || c.inputProps.type === "time" || c.inputProps.type === "search" ? (f(), i(v, u({
55
- key: 1,
56
- id: c.inputProps.id,
57
- required: c.inputProps.required,
58
- "min-length": c.inputProps.minLength,
59
- "max-length": c.inputProps.maxLength,
60
- type: _(e)(c.inputProps.type),
61
- name: c.field.name,
62
- label: c.inputProps.label,
63
- "error-messages": c.inputProps.errorMessages,
64
- error: c.inputProps.error
65
- }, t.$attrs, {
66
- "model-value": c.state.value,
67
- "onUpdate:modelValue": r[1] ||= (e) => c.field.handleChange(e)
68
- }), s({ _: 2 }, [t.$slots.label ? {
69
- name: "label",
70
- fn: y(() => [m(t.$slots, "label", d(l({
71
- required: c.inputProps.required,
72
- id: c.inputProps.id,
73
- label: c.inputProps.label
74
- })))]),
75
- key: "0"
76
- } : void 0]), 1040, [
77
- "id",
78
- "required",
79
- "min-length",
80
- "max-length",
81
- "type",
82
- "name",
83
- "label",
84
- "error-messages",
85
- "error",
86
- "model-value"
87
- ])) : a("", !0),
88
- c.inputProps.type === "text" ? (f(), i(b, u({
89
- key: 2,
90
- id: c.inputProps.id,
91
- required: c.inputProps.required,
92
- "min-length": c.inputProps.minLength,
93
- "max-length": c.inputProps.maxLength,
94
- name: c.field.name,
95
- label: c.inputProps.label,
96
- "error-messages": c.inputProps.errorMessages,
97
- error: c.inputProps.error
98
- }, t.$attrs, {
99
- "model-value": c.state.value,
100
- "onUpdate:modelValue": r[2] ||= (e) => c.field.handleChange(e)
101
- }), s({ _: 2 }, [t.$slots.label ? {
102
- name: "label",
103
- fn: y(() => [m(t.$slots, "label", d(l({
104
- required: c.inputProps.required,
105
- id: c.inputProps.id,
106
- label: c.inputProps.label
107
- })))]),
108
- key: "0"
109
- } : void 0]), 1040, [
110
- "id",
111
- "required",
112
- "min-length",
113
- "max-length",
114
- "name",
115
- "label",
116
- "error-messages",
117
- "error",
118
- "model-value"
119
- ])) : a("", !0),
120
- c.inputProps.type === "number" ? (f(), i(S, u({
121
- key: 3,
122
- id: c.inputProps.id,
123
- required: c.inputProps.required,
124
- role: "spinbutton",
125
- "aria-valuemin": typeof c.inputProps.min == "number" ? c.inputProps.min : void 0,
126
- "aria-valuemax": typeof c.inputProps.max == "number" ? c.inputProps.max : void 0,
127
- "aria-valuenow": typeof c.state.value == "number" ? c.state.value : void 0,
128
- name: c.field.name,
129
- label: c.inputProps.label,
130
- "error-messages": c.inputProps.errorMessages,
131
- error: c.inputProps.error,
132
- precision: c.inputProps.refinement === "int" ? 0 : null,
133
- "control-variant": "stacked"
134
- }, t.$attrs, {
135
- "model-value": c.state.value,
136
- "onUpdate:modelValue": r[3] ||= (e) => c.field.handleChange(e ?? void 0)
137
- }), s({ _: 2 }, [t.$slots.label ? {
138
- name: "label",
139
- fn: y(() => [m(t.$slots, "label", d(l({
140
- required: c.inputProps.required,
141
- id: c.inputProps.id,
142
- label: c.inputProps.label
143
- })))]),
144
- key: "0"
145
- } : void 0]), 1040, [
146
- "id",
147
- "required",
148
- "aria-valuemin",
149
- "aria-valuemax",
150
- "aria-valuenow",
151
- "name",
152
- "label",
153
- "error-messages",
154
- "error",
155
- "precision",
156
- "model-value"
157
- ])) : a("", !0),
158
- c.inputProps.type === "range" ? (f(), i(C, u({
159
- key: 4,
160
- id: c.inputProps.id,
161
- required: c.inputProps.required,
162
- min: typeof c.inputProps.min == "number" ? c.inputProps.min : void 0,
163
- max: typeof c.inputProps.max == "number" ? c.inputProps.max : void 0,
164
- name: c.field.name,
165
- label: c.inputProps.label,
166
- "error-messages": c.inputProps.errorMessages,
167
- error: c.inputProps.error
168
- }, t.$attrs, {
169
- "model-value": c.state.value,
170
- "onUpdate:modelValue": r[4] ||= (e) => {
171
- e || e === 0 ? c.field.handleChange(Number(e)) : c.field.handleChange(void 0);
172
- }
173
- }), s({ _: 2 }, [t.$slots.label ? {
174
- name: "label",
175
- fn: y(() => [m(t.$slots, "label", d(l({
176
- required: c.inputProps.required,
177
- id: c.inputProps.id,
178
- label: c.inputProps.label
179
- })))]),
180
- key: "0"
181
- } : void 0]), 1040, [
182
- "id",
183
- "required",
184
- "min",
185
- "max",
186
- "name",
187
- "label",
188
- "error-messages",
189
- "error",
190
- "model-value"
191
- ])) : a("", !0),
192
- c.inputProps.type === "radio" ? (f(), i(T, u({
193
- key: 5,
194
- id: c.inputProps.id,
195
- name: c.field.name,
196
- label: c.inputProps.label,
197
- "error-messages": c.inputProps.errorMessages,
198
- error: c.inputProps.error
199
- }, t.$attrs, {
200
- "model-value": c.state.value,
201
- "onUpdate:modelValue": r[5] ||= (e) => c.field.handleChange(e)
202
- }), s({
203
- default: y(() => [(f(!0), o(n, null, p(c.inputProps.options, (e) => (f(), i(w, {
204
- key: e.value,
205
- label: e.title,
206
- value: e.value
207
- }, null, 8, ["label", "value"]))), 128))]),
208
- _: 2
209
- }, [t.$slots.label ? {
210
- name: "label",
211
- fn: y(() => [m(t.$slots, "label", d(l({
212
- required: c.inputProps.required,
213
- id: c.inputProps.id,
214
- label: c.inputProps.label
215
- })))]),
216
- key: "0"
217
- } : void 0]), 1040, [
218
- "id",
219
- "name",
220
- "label",
221
- "error-messages",
222
- "error",
223
- "model-value"
224
- ])) : a("", !0),
225
- c.inputProps.type === "select" || c.inputProps.type === "multiple" ? (f(), i(E, u({
226
- key: 6,
227
- id: c.inputProps.id,
228
- clearable: c.inputProps.type === "select",
229
- required: c.inputProps.required,
230
- multiple: c.inputProps.type === "multiple",
231
- chips: c.inputProps.type === "multiple",
232
- name: c.field.name,
233
- label: c.inputProps.label,
234
- items: c.inputProps.options,
235
- "error-messages": c.inputProps.errorMessages,
236
- error: c.inputProps.error
237
- }, t.$attrs, {
238
- "model-value": c.state.value,
239
- onClear: r[6] ||= (e) => c.field.handleChange(void 0),
240
- "onUpdate:modelValue": c.field.handleChange
241
- }), s({ _: 2 }, [t.$slots.label ? {
242
- name: "label",
243
- fn: y(() => [m(t.$slots, "label", d(l({
244
- required: c.inputProps.required,
245
- id: c.inputProps.id,
246
- label: c.inputProps.label
247
- })))]),
248
- key: "0"
249
- } : void 0]), 1040, [
250
- "id",
251
- "clearable",
252
- "required",
253
- "multiple",
254
- "chips",
255
- "name",
256
- "label",
257
- "items",
258
- "error-messages",
259
- "error",
260
- "model-value",
261
- "onUpdate:modelValue"
262
- ])) : a("", !0),
263
- c.inputProps.type === "autocomplete" || c.inputProps.type === "autocompletemultiple" ? (f(), i(D, u({
264
- key: 7,
265
- id: c.inputProps.id,
266
- clearable: c.inputProps.type === "autocomplete",
267
- multiple: c.inputProps.type === "autocompletemultiple",
268
- required: c.inputProps.required,
269
- name: c.field.name,
270
- label: c.inputProps.label,
271
- items: c.inputProps.options,
272
- "error-messages": c.inputProps.errorMessages,
273
- error: c.inputProps.error,
274
- chips: c.inputProps.type === "autocompletemultiple"
275
- }, t.$attrs, {
276
- "model-value": c.state.value,
277
- onClear: r[7] ||= (e) => c.field.handleChange(void 0),
278
- "onUpdate:modelValue": c.field.handleChange
279
- }), s({ _: 2 }, [t.$slots.label ? {
280
- name: "label",
281
- fn: y(() => [m(t.$slots, "label", d(l({
282
- required: c.inputProps.required,
283
- id: c.inputProps.id,
284
- label: c.inputProps.label
285
- })))]),
286
- key: "0"
287
- } : void 0]), 1040, [
288
- "id",
289
- "clearable",
290
- "multiple",
291
- "required",
292
- "name",
293
- "label",
294
- "items",
295
- "error-messages",
296
- "error",
297
- "chips",
298
- "model-value",
299
- "onUpdate:modelValue"
300
- ])) : a("", !0),
301
- x.value ? (f(), i(v, u({
302
- key: 8,
303
- id: c.inputProps.id,
304
- required: c.inputProps.required,
305
- type: _(e)(c.inputProps.type),
306
- name: c.field.name,
307
- label: c.inputProps.label,
308
- "error-messages": c.inputProps.errorMessages,
309
- error: c.inputProps.error
310
- }, t.$attrs, {
311
- "model-value": c.state.value,
312
- "onUpdate:modelValue": r[8] ||= (e) => c.field.handleChange(e)
313
- }), s({ _: 2 }, [t.$slots.label ? {
314
- name: "label",
315
- fn: y(() => [m(t.$slots, "label", d(l({
316
- required: c.inputProps.required,
317
- id: c.inputProps.id,
318
- label: c.inputProps.label
319
- })))]),
320
- key: "0"
321
- } : void 0]), 1040, [
322
- "id",
323
- "required",
324
- "type",
325
- "name",
326
- "label",
327
- "error-messages",
328
- "error",
329
- "model-value"
330
- ])) : a("", !0)
331
- ], 32);
332
- };
333
- }
334
- });
1
+ //#region src/components/OmegaForm/types.ts
2
+ var e = [
3
+ "string",
4
+ "text",
5
+ "number",
6
+ "select",
7
+ "multiple",
8
+ "boolean",
9
+ "radio",
10
+ "autocomplete",
11
+ "autocompletemultiple",
12
+ "switch",
13
+ "range",
14
+ "password",
15
+ "email",
16
+ "date",
17
+ "tel",
18
+ "url",
19
+ "color",
20
+ "time",
21
+ "search"
22
+ ];
335
23
  //#endregion
336
- export { b as default };
24
+ export { e as typeOverrides };