@effect-app/vue-components 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/components/OmegaForm/OmegaArray.vue.d.ts +2 -1
- package/dist/types/components/OmegaForm/OmegaErrorsContext.d.ts +3 -3
- package/dist/types/components/OmegaForm/OmegaInput.vue.d.ts +2 -1
- package/dist/types/components/OmegaForm/OmegaInputVuetify.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/createUseFormWithCustomInput.d.ts +3 -0
- package/dist/types/components/OmegaForm/index.d.ts +2 -2
- package/dist/vue-components.es.js +13 -11
- package/dist/vue-components.es10.js +1 -1
- package/dist/vue-components.es11.js +1 -1
- package/dist/vue-components.es14.js +2 -2
- package/dist/vue-components.es15.js +5 -5
- package/dist/vue-components.es16.js +1 -1
- package/dist/vue-components.es17.js +1 -1
- package/dist/vue-components.es19.js +2 -135
- package/dist/vue-components.es2.js +14 -12
- package/dist/vue-components.es20.js +137 -0
- package/dist/vue-components.es22.js +42 -2
- package/dist/vue-components.es23.js +1 -1
- package/dist/vue-components.es24.js +2 -90
- package/dist/vue-components.es25.js +92 -0
- package/dist/vue-components.es27.js +7 -31
- package/dist/vue-components.es28.js +33 -0
- package/dist/vue-components.es30.js +4 -23
- package/dist/vue-components.es31.js +11 -5
- package/dist/vue-components.es32.js +20 -18
- package/dist/vue-components.es33.js +5 -30
- package/dist/vue-components.es34.js +16 -17
- package/dist/vue-components.es35.js +25 -7
- package/dist/vue-components.es36.js +22 -5
- package/dist/vue-components.es37.js +12 -19
- package/dist/vue-components.es38.js +5 -9
- package/dist/vue-components.es39.js +19 -31
- package/dist/vue-components.es4.js +42 -80
- package/dist/vue-components.es40.js +9 -48
- package/dist/vue-components.es41.js +25 -20
- package/dist/vue-components.es42.js +48 -11
- package/dist/vue-components.es43.js +21 -60
- package/dist/vue-components.es44.js +54 -45
- package/dist/vue-components.es45.js +54 -15
- package/dist/vue-components.es46.js +15 -31
- package/dist/vue-components.es47.js +30 -26
- package/dist/vue-components.es48.js +29 -42
- package/dist/vue-components.es49.js +42 -2
- package/dist/vue-components.es5.js +82 -42
- package/dist/vue-components.es50.js +2 -44
- package/dist/vue-components.es51.js +44 -2
- package/dist/vue-components.es52.js +4 -0
- package/dist/vue-components.es6.js +6 -6
- package/dist/vue-components.es7.js +14 -16
- package/dist/vue-components.es8.js +3 -3
- package/dist/vue-components.es9.js +30 -2
- package/package.json +3 -3
- package/src/components/OmegaForm/OmegaArray.vue +2 -4
- package/src/components/OmegaForm/OmegaAutoGen.vue +2 -4
- package/src/components/OmegaForm/OmegaErrorsContext.ts +3 -3
- package/src/components/OmegaForm/OmegaFormInput.vue +2 -4
- package/src/components/OmegaForm/OmegaInput.vue +2 -4
- package/src/components/OmegaForm/OmegaInternalInput.vue +8 -3
- package/src/components/OmegaForm/OmegaWrapper.vue +2 -4
- package/src/components/OmegaForm/createUseFormWithCustomInput.ts +53 -0
- package/src/components/OmegaForm/index.ts +2 -3
- package/src/components/OmegaForm/useOmegaForm.ts +3 -5
- package/dist/vue-components.es21.js +0 -44
- package/dist/vue-components.es26.js +0 -9
- package/dist/vue-components.es29.js +0 -6
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DeepKeys, type DeepValue } from "@tanstack/vue-form";
|
|
2
2
|
import { type OmegaInputProps } from "./OmegaFormStuff";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: <// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
|
|
4
|
+
From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
5
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & (Omit<OmegaInputProps<From, To>, "validators" | "options" | "label" | "type" | "items"> & {
|
|
5
6
|
defaultItems?: DeepValue<From, DeepKeys<From>>;
|
|
6
7
|
items?: "please use `defaultItems` instead";
|
|
@@ -3,7 +3,7 @@ import { type InjectionKey, type Ref } from "vue";
|
|
|
3
3
|
import { type OmegaError, type ShowErrorsOn } from "./OmegaFormStuff";
|
|
4
4
|
export declare const OmegaErrorsKey: InjectionKey<{
|
|
5
5
|
errors: Ref<readonly OmegaError[]>;
|
|
6
|
-
|
|
6
|
+
mapError: (error: OmegaError) => void;
|
|
7
7
|
removeError: (inputId: string) => void;
|
|
8
8
|
clearErrors: () => void;
|
|
9
9
|
showErrors: Ref<boolean>;
|
|
@@ -20,7 +20,7 @@ export declare function buildOmegaErrors(formSubmissionAttempts: Ref<number>, ge
|
|
|
20
20
|
readonly inputId: string;
|
|
21
21
|
readonly errors: readonly string[];
|
|
22
22
|
}[]>>;
|
|
23
|
-
|
|
23
|
+
mapError: (error: OmegaError) => void;
|
|
24
24
|
removeError: (inputId: string) => void;
|
|
25
25
|
clearErrors: () => void;
|
|
26
26
|
showErrors: import("vue").ComputedRef<boolean>;
|
|
@@ -29,7 +29,7 @@ export declare function buildOmegaErrors(formSubmissionAttempts: Ref<number>, ge
|
|
|
29
29
|
};
|
|
30
30
|
export declare function useOmegaErrors(): {
|
|
31
31
|
errors: Ref<readonly OmegaError[]>;
|
|
32
|
-
|
|
32
|
+
mapError: (error: OmegaError) => void;
|
|
33
33
|
removeError: (inputId: string) => void;
|
|
34
34
|
clearErrors: () => void;
|
|
35
35
|
showErrors: Ref<boolean>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type OmegaInputPropsBase } from "./OmegaFormStuff";
|
|
2
|
-
declare const _default:
|
|
2
|
+
declare const _default: <// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
|
|
3
|
+
From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & OmegaInputPropsBase<From, To> & {}> & import("vue").PublicProps;
|
|
4
5
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
5
6
|
attrs: any;
|
|
@@ -4,7 +4,7 @@ declare const _default: <From extends Record<PropertyKey, any>, Name extends Dee
|
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly onBlur?: ((event: Event) => any) | undefined;
|
|
6
6
|
readonly onFocus?: ((event: Event) => any) | undefined;
|
|
7
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "
|
|
7
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur"> & {
|
|
8
8
|
inputProps: InputProps<From, Name>;
|
|
9
9
|
vuetifyValue: unknown;
|
|
10
10
|
} & {}> & import("vue").PublicProps;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type Component } from "vue";
|
|
2
|
+
import { useOmegaForm } from "./useOmegaForm";
|
|
3
|
+
export declare const createUseFormWithCustomInput: (CustomInputComponent: Component) => <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>>(...args: Parameters<typeof useOmegaForm<From, To>>) => import("./useOmegaForm").OmegaFormReturn<From, To, import("./OmegaFormStuff").DefaultInputProps<From>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { default as OmegaInput } from "./OmegaInput.vue";
|
|
2
1
|
export * as OmegaErrorsContext from "./OmegaErrorsContext";
|
|
3
2
|
export * from "./OmegaFormStuff";
|
|
4
3
|
export { type OmegaFormReturn, useOmegaForm } from "./useOmegaForm";
|
|
4
|
+
export { default as OmegaInput } from "./OmegaInput.vue";
|
|
5
5
|
export { default as OmegaVuetifyInput } from "./OmegaInternalInput.vue";
|
|
6
6
|
export { getInputType } from "./OmegaFormStuff";
|
|
7
|
-
export {
|
|
7
|
+
export { createUseFormWithCustomInput } from "./createUseFormWithCustomInput";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as o from "./vue-components.es2.js";
|
|
2
|
-
import { getTransformationFrom as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
2
|
+
import { getTransformationFrom as s, provideIntl as u, useIntl as c, useIntlKey as i } from "./vue-components.es3.js";
|
|
3
|
+
import { default as x } from "./vue-components.es4.js";
|
|
4
|
+
import { default as I } from "./vue-components.es5.js";
|
|
5
5
|
import * as n from "./vue-components.es6.js";
|
|
6
6
|
import { useOmegaForm as y } from "./vue-components.es7.js";
|
|
7
|
-
import { createMeta as
|
|
7
|
+
import { createMeta as O, duplicateSchema as h, generateInputStandardSchemaFromFieldMeta as S, generateMetaFromSchema as b, getInputType as M, nullableInput as j } from "./vue-components.es8.js";
|
|
8
|
+
import { createUseFormWithCustomInput as T } from "./vue-components.es9.js";
|
|
8
9
|
function a(r) {
|
|
9
10
|
for (const e in o)
|
|
10
11
|
if (Object.prototype.hasOwnProperty.call(o, e)) {
|
|
@@ -15,18 +16,19 @@ function a(r) {
|
|
|
15
16
|
const m = { install: a };
|
|
16
17
|
export {
|
|
17
18
|
n as OmegaErrorsContext,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
x as OmegaInput,
|
|
20
|
+
I as OmegaVuetifyInput,
|
|
21
|
+
O as createMeta,
|
|
22
|
+
T as createUseFormWithCustomInput,
|
|
21
23
|
m as default,
|
|
22
24
|
h as duplicateSchema,
|
|
23
25
|
S as generateInputStandardSchemaFromFieldMeta,
|
|
24
26
|
b as generateMetaFromSchema,
|
|
25
27
|
M as getInputType,
|
|
26
|
-
|
|
28
|
+
s as getTransformationFrom,
|
|
27
29
|
j as nullableInput,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
u as provideIntl,
|
|
31
|
+
c as useIntl,
|
|
32
|
+
i as useIntlKey,
|
|
31
33
|
y as useOmegaForm
|
|
32
34
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Exit as c, Runtime as s } from "effect";
|
|
2
|
-
import { dual as n, isFunction as m } from "./vue-components.
|
|
2
|
+
import { dual as n, isFunction as m } from "./vue-components.es22.js";
|
|
3
3
|
const i = Symbol.for("clone-trait"), u = n(2, (e, t) => i in e ? e[i](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
|
|
4
4
|
n(2, (e, t) => u(e, { ...e, ...m(t) ? t(e) : t }));
|
|
5
5
|
const b = (e) => new Promise((t, r) => e.addObserver((o) => {
|
|
@@ -1,7 +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-193816ae],.v-leave-to[data-v-193816ae]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-193816ae],.v-leave-active[data-v-193816ae]{display:grid;transition:all .15s}.v-enter-to[data-v-193816ae],.v-leave-from[data-v-193816ae]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-193816ae]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-193816ae]{min-height:0}.error-list[data-v-193816ae]{list-style-position:inside}div.error-list[data-v-193816ae]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-193816ae]{grid-template-columns:auto 1fr}.error-link[data-v-193816ae]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-193816ae]{grid-template-columns:1fr}.error-message[data-v-193816ae]{grid-column:1 / -1}}.error-item[data-v-193816ae]{display:contents}a[data-v-193816ae]{min-width:min-content}.error-link[data-v-193816ae]{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-193816ae],.v-leave-to[data-v-193816ae]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-193816ae],.v-leave-active[data-v-193816ae]{display:grid;transition:all .15s}.v-enter-to[data-v-193816ae],.v-leave-from[data-v-193816ae]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-193816ae]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-193816ae]{min-height:0}.error-list[data-v-193816ae]{list-style-position:inside}div.error-list[data-v-193816ae]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-193816ae]{grid-template-columns:auto 1fr}.error-link[data-v-193816ae]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-193816ae]{grid-template-columns:1fr}.error-message[data-v-193816ae]{grid-column:1 / -1}}.error-item[data-v-193816ae]{display:contents}a[data-v-193816ae]{min-width:min-content}.error-link[data-v-193816ae]{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 r from "./vue-components.
|
|
2
|
+
import r from "./vue-components.es25.js";
|
|
3
3
|
|
|
4
|
-
import o from "./vue-components.
|
|
4
|
+
import o from "./vue-components.es27.js";
|
|
5
5
|
const m = /* @__PURE__ */ o(r, [["__scopeId", "data-v-193816ae"]]);
|
|
6
6
|
export {
|
|
7
7
|
m as default
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-
|
|
2
|
-
import o from "./vue-components.
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-8d0c5c48]{display:contents}fieldset[disabled][data-v-8d0c5c48]>*{pointer-events:none}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(c,t){const d=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(d&&d.call(this),this.shadowRoot){const o=document.createElement("style");o.appendChild(document.createTextNode("fieldset[data-v-8d0c5c48]{display:contents}fieldset[disabled][data-v-8d0c5c48]>*{pointer-events:none}")),this.shadowRoot.appendChild(o)}},e.call(window.customElements,c,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import o from "./vue-components.es28.js";
|
|
3
3
|
|
|
4
|
-
import m from "./vue-components.
|
|
5
|
-
const
|
|
4
|
+
import m from "./vue-components.es27.js";
|
|
5
|
+
const c = /* @__PURE__ */ m(o, [["__scopeId", "data-v-8d0c5c48"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
c as default
|
|
8
8
|
};
|
|
@@ -1,137 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getInputType as C } from "./vue-components.es8.js";
|
|
3
|
-
const $ = /* @__PURE__ */ y({
|
|
4
|
-
inheritAttrs: !1,
|
|
5
|
-
__name: "OmegaInputVuetify",
|
|
6
|
-
props: {
|
|
7
|
-
inputProps: {},
|
|
8
|
-
vuetifyValue: {}
|
|
9
|
-
},
|
|
10
|
-
emits: ["focus", "blur"],
|
|
11
|
-
setup(q) {
|
|
12
|
-
return (e, p) => {
|
|
13
|
-
const t = s("v-text-field"), m = s("v-textarea"), d = s("v-radio"), P = s("v-radio-group"), g = s("v-select"), v = s("v-autocomplete");
|
|
14
|
-
return o(), u("div", {
|
|
15
|
-
class: "omega-input",
|
|
16
|
-
onFocusout: p[4] || (p[4] = (r) => e.$emit("blur", r)),
|
|
17
|
-
onFocusin: p[5] || (p[5] = (r) => e.$emit("focus", r))
|
|
18
|
-
}, [
|
|
19
|
-
e.inputProps.type === "boolean" || e.inputProps.type === "switch" ? (o(), n(a(e.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), i({
|
|
20
|
-
key: 0,
|
|
21
|
-
id: e.inputProps.id,
|
|
22
|
-
name: e.inputProps.name,
|
|
23
|
-
label: e.inputProps.label,
|
|
24
|
-
"error-messages": e.inputProps.errorMessages,
|
|
25
|
-
error: e.inputProps.error,
|
|
26
|
-
ripple: ""
|
|
27
|
-
}, e.$attrs, {
|
|
28
|
-
"model-value": e.vuetifyValue,
|
|
29
|
-
onChange: p[0] || (p[0] = (r) => e.inputProps.field.handleChange(r.target.checked))
|
|
30
|
-
}), null, 16, ["id", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
|
|
31
|
-
e.inputProps.type === "email" || e.inputProps.type === "string" || e.inputProps.type === "password" ? (o(), n(t, i({
|
|
32
|
-
key: 1,
|
|
33
|
-
id: e.inputProps.id,
|
|
34
|
-
required: e.inputProps.required,
|
|
35
|
-
"min-length": e.inputProps.minLength,
|
|
36
|
-
"max-length": e.inputProps.maxLength,
|
|
37
|
-
type: b(C)(e.inputProps.type),
|
|
38
|
-
name: e.inputProps.name,
|
|
39
|
-
label: e.inputProps.label,
|
|
40
|
-
"error-messages": e.inputProps.errorMessages,
|
|
41
|
-
error: e.inputProps.error
|
|
42
|
-
}, e.$attrs, {
|
|
43
|
-
"model-value": e.vuetifyValue,
|
|
44
|
-
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
45
|
-
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
46
|
-
e.inputProps.type === "text" ? (o(), n(m, i({
|
|
47
|
-
key: 2,
|
|
48
|
-
id: e.inputProps.id,
|
|
49
|
-
required: e.inputProps.required,
|
|
50
|
-
"min-length": e.inputProps.minLength,
|
|
51
|
-
"max-length": e.inputProps.maxLength,
|
|
52
|
-
name: e.inputProps.name,
|
|
53
|
-
label: e.inputProps.label,
|
|
54
|
-
"error-messages": e.inputProps.errorMessages,
|
|
55
|
-
error: e.inputProps.error
|
|
56
|
-
}, e.$attrs, {
|
|
57
|
-
"model-value": e.vuetifyValue,
|
|
58
|
-
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
59
|
-
}), null, 16, ["id", "required", "min-length", "max-length", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
60
|
-
e.inputProps.type === "number" || e.inputProps.type === "range" ? (o(), n(a(e.inputProps.type === "range" ? "v-slider" : "v-text-field"), i({
|
|
61
|
-
key: 3,
|
|
62
|
-
id: e.inputProps.id,
|
|
63
|
-
required: e.inputProps.required,
|
|
64
|
-
min: e.inputProps.min,
|
|
65
|
-
max: e.inputProps.max,
|
|
66
|
-
type: e.inputProps.type,
|
|
67
|
-
name: e.inputProps.name,
|
|
68
|
-
label: e.inputProps.label,
|
|
69
|
-
"error-messages": e.inputProps.errorMessages,
|
|
70
|
-
error: e.inputProps.error
|
|
71
|
-
}, e.$attrs, {
|
|
72
|
-
"model-value": e.vuetifyValue,
|
|
73
|
-
"onUpdate:modelValue": p[1] || (p[1] = (r) => {
|
|
74
|
-
r || r === 0 ? e.inputProps.field.handleChange(Number(r)) : e.inputProps.field.handleChange(void 0);
|
|
75
|
-
})
|
|
76
|
-
}), null, 16, ["id", "required", "min", "max", "type", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
|
|
77
|
-
e.inputProps.type === "radio" ? (o(), n(P, i({
|
|
78
|
-
key: 4,
|
|
79
|
-
id: e.inputProps.id,
|
|
80
|
-
name: e.inputProps.name,
|
|
81
|
-
label: e.inputProps.label,
|
|
82
|
-
"error-messages": e.inputProps.errorMessages,
|
|
83
|
-
error: e.inputProps.error
|
|
84
|
-
}, e.$attrs, {
|
|
85
|
-
"model-value": e.vuetifyValue,
|
|
86
|
-
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
87
|
-
}), {
|
|
88
|
-
default: f(() => [
|
|
89
|
-
(o(!0), u(h, null, V(e.inputProps.options, (r) => (o(), n(d, {
|
|
90
|
-
key: r.value,
|
|
91
|
-
label: r.title,
|
|
92
|
-
value: r.value
|
|
93
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
94
|
-
]),
|
|
95
|
-
_: 1
|
|
96
|
-
}, 16, ["id", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
97
|
-
e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (o(), n(g, i({
|
|
98
|
-
key: 5,
|
|
99
|
-
id: e.inputProps.id,
|
|
100
|
-
clearable: e.inputProps.type === "select",
|
|
101
|
-
required: e.inputProps.required,
|
|
102
|
-
multiple: e.inputProps.type === "multiple",
|
|
103
|
-
chips: e.inputProps.type === "multiple",
|
|
104
|
-
name: e.inputProps.name,
|
|
105
|
-
label: e.inputProps.label,
|
|
106
|
-
items: e.inputProps.options,
|
|
107
|
-
"error-messages": e.inputProps.errorMessages,
|
|
108
|
-
error: e.inputProps.error
|
|
109
|
-
}, e.$attrs, {
|
|
110
|
-
"model-value": e.vuetifyValue,
|
|
111
|
-
onClear: p[2] || (p[2] = (r) => e.inputProps.field.handleChange(void 0)),
|
|
112
|
-
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
113
|
-
}), null, 16, ["id", "clearable", "required", "multiple", "chips", "name", "label", "items", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
114
|
-
e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (o(), n(v, i({
|
|
115
|
-
key: 6,
|
|
116
|
-
id: e.inputProps.id,
|
|
117
|
-
clearable: e.inputProps.type === "autocomplete",
|
|
118
|
-
multiple: e.inputProps.type === "autocompletemultiple",
|
|
119
|
-
required: e.inputProps.required,
|
|
120
|
-
name: e.inputProps.name,
|
|
121
|
-
label: e.inputProps.label,
|
|
122
|
-
items: e.inputProps.options,
|
|
123
|
-
"error-messages": e.inputProps.errorMessages,
|
|
124
|
-
error: e.inputProps.error,
|
|
125
|
-
chips: e.inputProps.type === "autocompletemultiple"
|
|
126
|
-
}, e.$attrs, {
|
|
127
|
-
"model-value": e.vuetifyValue,
|
|
128
|
-
onClear: p[3] || (p[3] = (r) => e.inputProps.field.handleChange(void 0)),
|
|
129
|
-
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
130
|
-
}), null, 16, ["id", "clearable", "multiple", "required", "name", "label", "items", "error-messages", "error", "chips", "model-value", "onUpdate:modelValue"])) : l("", !0)
|
|
131
|
-
], 32);
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
});
|
|
1
|
+
import f from "./vue-components.es5.js";
|
|
135
2
|
export {
|
|
136
|
-
|
|
3
|
+
f as default
|
|
137
4
|
};
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { default as r } from "./vue-components.es5.js";
|
|
2
1
|
import * as e from "./vue-components.es6.js";
|
|
3
|
-
import { createMeta as
|
|
4
|
-
import { useOmegaForm as
|
|
5
|
-
import { default as
|
|
2
|
+
import { createMeta as a, duplicateSchema as o, generateInputStandardSchemaFromFieldMeta as m, generateMetaFromSchema as p, getInputType as u, nullableInput as n } from "./vue-components.es8.js";
|
|
3
|
+
import { useOmegaForm as g } from "./vue-components.es7.js";
|
|
4
|
+
import { default as s } from "./vue-components.es4.js";
|
|
5
|
+
import { default as c } from "./vue-components.es5.js";
|
|
6
|
+
import { createUseFormWithCustomInput as I } from "./vue-components.es9.js";
|
|
6
7
|
export {
|
|
7
8
|
e as OmegaErrorsContext,
|
|
8
|
-
|
|
9
|
+
s as OmegaInput,
|
|
9
10
|
c as OmegaVuetifyInput,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
a as createMeta,
|
|
12
|
+
I as createUseFormWithCustomInput,
|
|
13
|
+
o as duplicateSchema,
|
|
14
|
+
m as generateInputStandardSchemaFromFieldMeta,
|
|
15
|
+
p as generateMetaFromSchema,
|
|
16
|
+
u as getInputType,
|
|
17
|
+
n as nullableInput,
|
|
18
|
+
g as useOmegaForm
|
|
17
19
|
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { defineComponent as y, resolveComponent as s, createElementBlock as u, openBlock as o, createBlock as n, createCommentVNode as l, resolveDynamicComponent as a, mergeProps as i, unref as b, withCtx as f, Fragment as h, renderList as V } from "vue";
|
|
2
|
+
import { getInputType as C } from "./vue-components.es8.js";
|
|
3
|
+
const $ = /* @__PURE__ */ y({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "OmegaInputVuetify",
|
|
6
|
+
props: {
|
|
7
|
+
inputProps: {},
|
|
8
|
+
vuetifyValue: {}
|
|
9
|
+
},
|
|
10
|
+
emits: ["focus", "blur"],
|
|
11
|
+
setup(q) {
|
|
12
|
+
return (e, p) => {
|
|
13
|
+
const t = s("v-text-field"), m = s("v-textarea"), d = s("v-radio"), P = s("v-radio-group"), g = s("v-select"), v = s("v-autocomplete");
|
|
14
|
+
return o(), u("div", {
|
|
15
|
+
class: "omega-input",
|
|
16
|
+
onFocusout: p[4] || (p[4] = (r) => e.$emit("blur", r)),
|
|
17
|
+
onFocusin: p[5] || (p[5] = (r) => e.$emit("focus", r))
|
|
18
|
+
}, [
|
|
19
|
+
e.inputProps.type === "boolean" || e.inputProps.type === "switch" ? (o(), n(a(e.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), i({
|
|
20
|
+
key: 0,
|
|
21
|
+
id: e.inputProps.id,
|
|
22
|
+
name: e.inputProps.name,
|
|
23
|
+
label: e.inputProps.label,
|
|
24
|
+
"error-messages": e.inputProps.errorMessages,
|
|
25
|
+
error: e.inputProps.error,
|
|
26
|
+
ripple: ""
|
|
27
|
+
}, e.$attrs, {
|
|
28
|
+
"model-value": e.vuetifyValue,
|
|
29
|
+
onChange: p[0] || (p[0] = (r) => e.inputProps.field.handleChange(r.target.checked))
|
|
30
|
+
}), null, 16, ["id", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
|
|
31
|
+
e.inputProps.type === "email" || e.inputProps.type === "string" || e.inputProps.type === "password" ? (o(), n(t, i({
|
|
32
|
+
key: 1,
|
|
33
|
+
id: e.inputProps.id,
|
|
34
|
+
required: e.inputProps.required,
|
|
35
|
+
"min-length": e.inputProps.minLength,
|
|
36
|
+
"max-length": e.inputProps.maxLength,
|
|
37
|
+
type: b(C)(e.inputProps.type),
|
|
38
|
+
name: e.inputProps.name,
|
|
39
|
+
label: e.inputProps.label,
|
|
40
|
+
"error-messages": e.inputProps.errorMessages,
|
|
41
|
+
error: e.inputProps.error
|
|
42
|
+
}, e.$attrs, {
|
|
43
|
+
"model-value": e.vuetifyValue,
|
|
44
|
+
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
45
|
+
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
46
|
+
e.inputProps.type === "text" ? (o(), n(m, i({
|
|
47
|
+
key: 2,
|
|
48
|
+
id: e.inputProps.id,
|
|
49
|
+
required: e.inputProps.required,
|
|
50
|
+
"min-length": e.inputProps.minLength,
|
|
51
|
+
"max-length": e.inputProps.maxLength,
|
|
52
|
+
name: e.inputProps.name,
|
|
53
|
+
label: e.inputProps.label,
|
|
54
|
+
"error-messages": e.inputProps.errorMessages,
|
|
55
|
+
error: e.inputProps.error
|
|
56
|
+
}, e.$attrs, {
|
|
57
|
+
"model-value": e.vuetifyValue,
|
|
58
|
+
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
59
|
+
}), null, 16, ["id", "required", "min-length", "max-length", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
60
|
+
e.inputProps.type === "number" || e.inputProps.type === "range" ? (o(), n(a(e.inputProps.type === "range" ? "v-slider" : "v-text-field"), i({
|
|
61
|
+
key: 3,
|
|
62
|
+
id: e.inputProps.id,
|
|
63
|
+
required: e.inputProps.required,
|
|
64
|
+
min: e.inputProps.min,
|
|
65
|
+
max: e.inputProps.max,
|
|
66
|
+
type: e.inputProps.type,
|
|
67
|
+
name: e.inputProps.name,
|
|
68
|
+
label: e.inputProps.label,
|
|
69
|
+
"error-messages": e.inputProps.errorMessages,
|
|
70
|
+
error: e.inputProps.error
|
|
71
|
+
}, e.$attrs, {
|
|
72
|
+
"model-value": e.vuetifyValue,
|
|
73
|
+
"onUpdate:modelValue": p[1] || (p[1] = (r) => {
|
|
74
|
+
r || r === 0 ? e.inputProps.field.handleChange(Number(r)) : e.inputProps.field.handleChange(void 0);
|
|
75
|
+
})
|
|
76
|
+
}), null, 16, ["id", "required", "min", "max", "type", "name", "label", "error-messages", "error", "model-value"])) : l("", !0),
|
|
77
|
+
e.inputProps.type === "radio" ? (o(), n(P, i({
|
|
78
|
+
key: 4,
|
|
79
|
+
id: e.inputProps.id,
|
|
80
|
+
name: e.inputProps.name,
|
|
81
|
+
label: e.inputProps.label,
|
|
82
|
+
"error-messages": e.inputProps.errorMessages,
|
|
83
|
+
error: e.inputProps.error
|
|
84
|
+
}, e.$attrs, {
|
|
85
|
+
"model-value": e.vuetifyValue,
|
|
86
|
+
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
87
|
+
}), {
|
|
88
|
+
default: f(() => [
|
|
89
|
+
(o(!0), u(h, null, V(e.inputProps.options, (r) => (o(), n(d, {
|
|
90
|
+
key: r.value,
|
|
91
|
+
label: r.title,
|
|
92
|
+
value: r.value
|
|
93
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
94
|
+
]),
|
|
95
|
+
_: 1
|
|
96
|
+
}, 16, ["id", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
97
|
+
e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (o(), n(g, i({
|
|
98
|
+
key: 5,
|
|
99
|
+
id: e.inputProps.id,
|
|
100
|
+
clearable: e.inputProps.type === "select",
|
|
101
|
+
required: e.inputProps.required,
|
|
102
|
+
multiple: e.inputProps.type === "multiple",
|
|
103
|
+
chips: e.inputProps.type === "multiple",
|
|
104
|
+
name: e.inputProps.name,
|
|
105
|
+
label: e.inputProps.label,
|
|
106
|
+
items: e.inputProps.options,
|
|
107
|
+
"error-messages": e.inputProps.errorMessages,
|
|
108
|
+
error: e.inputProps.error
|
|
109
|
+
}, e.$attrs, {
|
|
110
|
+
"model-value": e.vuetifyValue,
|
|
111
|
+
onClear: p[2] || (p[2] = (r) => e.inputProps.field.handleChange(void 0)),
|
|
112
|
+
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
113
|
+
}), null, 16, ["id", "clearable", "required", "multiple", "chips", "name", "label", "items", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : l("", !0),
|
|
114
|
+
e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (o(), n(v, i({
|
|
115
|
+
key: 6,
|
|
116
|
+
id: e.inputProps.id,
|
|
117
|
+
clearable: e.inputProps.type === "autocomplete",
|
|
118
|
+
multiple: e.inputProps.type === "autocompletemultiple",
|
|
119
|
+
required: e.inputProps.required,
|
|
120
|
+
name: e.inputProps.name,
|
|
121
|
+
label: e.inputProps.label,
|
|
122
|
+
items: e.inputProps.options,
|
|
123
|
+
"error-messages": e.inputProps.errorMessages,
|
|
124
|
+
error: e.inputProps.error,
|
|
125
|
+
chips: e.inputProps.type === "autocompletemultiple"
|
|
126
|
+
}, e.$attrs, {
|
|
127
|
+
"model-value": e.vuetifyValue,
|
|
128
|
+
onClear: p[3] || (p[3] = (r) => e.inputProps.field.handleChange(void 0)),
|
|
129
|
+
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
130
|
+
}), null, 16, ["id", "clearable", "multiple", "required", "name", "label", "items", "error-messages", "error", "chips", "model-value", "onUpdate:modelValue"])) : l("", !0)
|
|
131
|
+
], 32);
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
export {
|
|
136
|
+
$ as default
|
|
137
|
+
};
|
|
@@ -1,4 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
const f = (c) => typeof c == "function", a = function(c, r) {
|
|
2
|
+
switch (c) {
|
|
3
|
+
case 0:
|
|
4
|
+
case 1:
|
|
5
|
+
throw new RangeError(`Invalid arity ${c}`);
|
|
6
|
+
case 2:
|
|
7
|
+
return function(n, t) {
|
|
8
|
+
return arguments.length >= 2 ? r(n, t) : function(e) {
|
|
9
|
+
return r(e, n);
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
case 3:
|
|
13
|
+
return function(n, t, e) {
|
|
14
|
+
return arguments.length >= 3 ? r(n, t, e) : function(u) {
|
|
15
|
+
return r(u, n, t);
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
case 4:
|
|
19
|
+
return function(n, t, e, u) {
|
|
20
|
+
return arguments.length >= 4 ? r(n, t, e, u) : function(i) {
|
|
21
|
+
return r(i, n, t, e);
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
case 5:
|
|
25
|
+
return function(n, t, e, u, i) {
|
|
26
|
+
return arguments.length >= 5 ? r(n, t, e, u, i) : function(s) {
|
|
27
|
+
return r(s, n, t, e, u);
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
default:
|
|
31
|
+
return function() {
|
|
32
|
+
if (arguments.length >= c)
|
|
33
|
+
return r.apply(this, arguments);
|
|
34
|
+
const n = arguments;
|
|
35
|
+
return function(t) {
|
|
36
|
+
return r(t, ...n);
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
};
|
|
2
41
|
export {
|
|
3
|
-
|
|
42
|
+
a as dual,
|
|
43
|
+
f as isFunction
|
|
4
44
|
};
|
|
@@ -1,92 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { mdiLink as z } from "@mdi/js";
|
|
3
|
-
import { useIntl as D } from "./vue-components.es3.js";
|
|
4
|
-
const G = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "error-alert"
|
|
7
|
-
}, L = { class: "text-h6 mb-3" }, M = { class: "font-weight-medium" }, O = { class: "error-message" }, P = ["href"], S = { key: 1 }, F = /* @__PURE__ */ E({
|
|
8
|
-
__name: "OmegaErrorsInternal",
|
|
9
|
-
props: {
|
|
10
|
-
errors: {},
|
|
11
|
-
generalErrors: {},
|
|
12
|
-
showErrors: { type: Boolean }
|
|
13
|
-
},
|
|
14
|
-
setup(k) {
|
|
15
|
-
const c = y()?.appContext.components.VAlert, p = k, { trans: f } = D(), m = B(() => p.generalErrors ? p.generalErrors.filter((e) => !!e).flatMap(
|
|
16
|
-
(e) => Object.values(e).filter((n) => !!n).flatMap(
|
|
17
|
-
(n) => n.filter(
|
|
18
|
-
(t) => !!t?.message
|
|
19
|
-
).map((t) => t.message)
|
|
20
|
-
)
|
|
21
|
-
) : []);
|
|
22
|
-
return (e, n) => (r(), o(C, null, {
|
|
23
|
-
default: s(() => [
|
|
24
|
-
e.showErrors && (e.errors.length || m.value.length) ? (r(), d("div", G, [
|
|
25
|
-
b(e.$slots, "default", I(V({ errors: e.errors, showedGeneralErrors: m.value })), () => [
|
|
26
|
-
(r(), o(l(a(c) ? "v-alert" : "div"), {
|
|
27
|
-
class: N([a(c) ? "mb-4" : "error-alert-content", "mb-4"]),
|
|
28
|
-
type: "error",
|
|
29
|
-
variant: "tonal",
|
|
30
|
-
role: "alert",
|
|
31
|
-
"aria-live": "polite"
|
|
32
|
-
}, {
|
|
33
|
-
default: s(() => [
|
|
34
|
-
i("div", L, u(a(f)("form.includes_error")) + ": ", 1),
|
|
35
|
-
e.errors.length ? (r(), o(l(e.errors.length > 1 ? "ul" : "div"), {
|
|
36
|
-
key: 0,
|
|
37
|
-
class: "error-list"
|
|
38
|
-
}, {
|
|
39
|
-
default: s(() => [
|
|
40
|
-
(r(!0), d(g, null, v(e.errors, (t) => (r(), o(l(e.errors.length > 1 ? "li" : "div"), {
|
|
41
|
-
key: t.inputId,
|
|
42
|
-
class: "error-item"
|
|
43
|
-
}, {
|
|
44
|
-
default: s(() => [
|
|
45
|
-
i("div", M, u(t.label), 1),
|
|
46
|
-
i("div", O, [
|
|
47
|
-
(r(), o(l(t.errors.length > 1 ? "ul" : "div"), { class: "error-list" }, {
|
|
48
|
-
default: s(() => [
|
|
49
|
-
(r(!0), d(g, null, v(t.errors, (h) => (r(), o(l(t.errors.length > 1 ? "li" : "span"), { key: h }, {
|
|
50
|
-
default: s(() => [
|
|
51
|
-
_(u(h), 1)
|
|
52
|
-
]),
|
|
53
|
-
_: 2
|
|
54
|
-
}, 1024))), 128))
|
|
55
|
-
]),
|
|
56
|
-
_: 2
|
|
57
|
-
}, 1024))
|
|
58
|
-
]),
|
|
59
|
-
i("a", {
|
|
60
|
-
href: `#${t.inputId}`,
|
|
61
|
-
class: "error-link"
|
|
62
|
-
}, [
|
|
63
|
-
(r(), o(l(a(c) ? "v-icon" : "i"), {
|
|
64
|
-
icon: a(z),
|
|
65
|
-
"aria-hidden": "true"
|
|
66
|
-
}, {
|
|
67
|
-
default: s(() => [...n[0] || (n[0] = [
|
|
68
|
-
i("i", null, "🔗", -1)
|
|
69
|
-
])]),
|
|
70
|
-
_: 1
|
|
71
|
-
}, 8, ["icon"])),
|
|
72
|
-
_(" " + u(a(f)("form.fix_input")), 1)
|
|
73
|
-
], 8, P)
|
|
74
|
-
]),
|
|
75
|
-
_: 2
|
|
76
|
-
}, 1024))), 128))
|
|
77
|
-
]),
|
|
78
|
-
_: 1
|
|
79
|
-
})) : (r(), d("span", S, u(m.value[0]), 1))
|
|
80
|
-
]),
|
|
81
|
-
_: 1
|
|
82
|
-
}, 8, ["class"]))
|
|
83
|
-
], !0)
|
|
84
|
-
])) : w("", !0)
|
|
85
|
-
]),
|
|
86
|
-
_: 3
|
|
87
|
-
}));
|
|
88
|
-
}
|
|
89
|
-
});
|
|
1
|
+
import f from "./vue-components.es13.js";
|
|
90
2
|
export {
|
|
91
|
-
|
|
3
|
+
f as default
|
|
92
4
|
};
|