@effect-app/vue-components 4.0.0-beta.220 → 4.0.0-beta.221
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/CommandButton.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/OmegaAutoGen.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/index.d.ts +1 -1
- package/dist/types/components/OmegaForm/meta/checks.d.ts +1 -1
- package/dist/types/components/OmegaForm/meta/createMeta.d.ts +2 -1
- package/dist/types/components/OmegaForm/meta/defaults.d.ts +1 -1
- package/dist/types/components/OmegaForm/meta/redacted.d.ts +1 -1
- package/dist/types/components/OmegaForm/meta/types.d.ts +1 -1
- package/dist/types/components/OmegaForm/meta/walker.d.ts +1 -1
- package/dist/types/components/OmegaForm/submit.d.ts +1 -1
- package/dist/types/components/OmegaForm/types.d.ts +3 -1
- package/dist/types/components/OmegaForm/useOmegaForm.d.ts +1 -1
- package/dist/types/components/OmegaForm/validation/localized.d.ts +1 -1
- package/dist/types/utils/index.d.ts +3 -3
- package/dist/vue-components.es.js +15 -15
- package/dist/vue-components100.es.js +269 -0
- package/dist/vue-components102.es.js +8 -0
- package/dist/vue-components103.es.js +73 -0
- package/dist/vue-components104.es.js +5 -0
- package/dist/vue-components105.es.js +52 -0
- package/dist/vue-components106.es.js +5 -0
- package/dist/vue-components107.es.js +24 -0
- package/dist/vue-components108.es.js +5 -0
- package/dist/vue-components109.es.js +59 -0
- package/dist/vue-components110.es.js +5 -0
- package/dist/vue-components111.es.js +12 -0
- package/dist/vue-components112.es.js +22 -0
- package/dist/vue-components114.es.js +9 -0
- package/dist/vue-components115.es.js +4 -0
- package/dist/vue-components116.es.js +38 -0
- package/dist/vue-components117.es.js +27 -0
- package/dist/vue-components118.es.js +28 -0
- package/dist/vue-components119.es.js +7 -0
- package/dist/vue-components12.es.js +25 -47
- package/dist/vue-components120.es.js +18 -0
- package/dist/vue-components121.es.js +36 -0
- package/dist/vue-components122.es.js +18 -0
- package/dist/vue-components123.es.js +21 -0
- package/dist/vue-components124.es.js +30 -0
- package/dist/vue-components125.es.js +7 -0
- package/dist/vue-components126.es.js +9 -0
- package/dist/vue-components127.es.js +38 -0
- package/dist/vue-components128.es.js +25 -0
- package/dist/vue-components129.es.js +128 -0
- package/dist/vue-components13.es.js +62 -120
- package/dist/vue-components130.es.js +24 -0
- package/dist/vue-components131.es.js +21 -0
- package/dist/vue-components132.es.js +9 -0
- package/dist/vue-components133.es.js +19 -0
- package/dist/vue-components134.es.js +5 -0
- package/dist/vue-components135.es.js +29 -0
- package/dist/vue-components136.es.js +5 -0
- package/dist/vue-components137.es.js +43 -0
- package/dist/vue-components138.es.js +82 -0
- package/dist/vue-components139.es.js +33 -0
- package/dist/vue-components14.es.js +13 -63
- package/dist/vue-components140.es.js +19 -0
- package/dist/vue-components141.es.js +48 -0
- package/dist/vue-components15.es.js +27 -58
- package/dist/vue-components16.es.js +52 -21
- package/dist/vue-components17.es.js +86 -4
- package/dist/vue-components18.es.js +3 -79
- package/dist/vue-components19.es.js +3 -91
- package/dist/vue-components2.es.js +15 -6
- package/dist/vue-components20.es.js +17 -71
- package/dist/vue-components21.es.js +72 -11
- package/dist/vue-components22.es.js +12 -54
- package/dist/vue-components23.es.js +25 -4
- package/dist/vue-components24.es.js +249 -41
- package/dist/vue-components25.es.js +64 -4
- package/dist/vue-components26.es.js +65 -81
- package/dist/vue-components27.es.js +8 -0
- package/dist/vue-components28.es.js +11 -7
- package/dist/vue-components29.es.js +5 -8
- package/dist/vue-components30.es.js +25 -266
- package/dist/vue-components31.es.js +75 -0
- package/dist/vue-components32.es.js +108 -7
- package/dist/vue-components33.es.js +55 -71
- package/dist/vue-components34.es.js +6 -4
- package/dist/vue-components35.es.js +3 -51
- package/dist/vue-components36.es.js +5 -4
- package/dist/vue-components37.es.js +685 -21
- package/dist/vue-components38.es.js +6 -4
- package/dist/vue-components39.es.js +4 -58
- package/dist/vue-components40.es.js +5 -4
- package/dist/vue-components41.es.js +26 -11
- package/dist/vue-components42.es.js +4 -21
- package/dist/vue-components43.es.js +48 -0
- package/dist/vue-components44.es.js +69 -8
- package/dist/vue-components45.es.js +8 -3
- package/dist/vue-components46.es.js +9 -37
- package/dist/vue-components47.es.js +7 -26
- package/dist/vue-components48.es.js +169 -24
- package/dist/vue-components49.es.js +13 -6
- package/dist/vue-components50.es.js +9 -16
- package/dist/vue-components51.es.js +3 -35
- package/dist/vue-components52.es.js +6 -17
- package/dist/vue-components53.es.js +27 -19
- package/dist/vue-components54.es.js +212 -21
- package/dist/vue-components55.es.js +84 -6
- package/dist/vue-components56.es.js +72 -7
- package/dist/vue-components57.es.js +807 -26
- package/dist/vue-components58.es.js +3 -24
- package/dist/vue-components59.es.js +103 -122
- package/dist/vue-components60.es.js +49 -19
- package/dist/vue-components61.es.js +514 -15
- package/dist/vue-components62.es.js +438 -7
- package/dist/vue-components63.es.js +9 -18
- package/dist/vue-components64.es.js +12 -4
- package/dist/vue-components65.es.js +16 -26
- package/dist/vue-components66.es.js +28 -4
- package/dist/vue-components67.es.js +20 -27
- package/dist/vue-components68.es.js +29 -5
- package/dist/vue-components69.es.js +27 -16
- package/dist/vue-components70.es.js +71 -38
- package/dist/vue-components71.es.js +5 -80
- package/dist/vue-components72.es.js +17 -32
- package/dist/vue-components73.es.js +4 -18
- package/dist/vue-components74.es.js +69 -47
- package/dist/vue-components75.es.js +140 -0
- package/dist/vue-components76.es.js +4 -0
- package/dist/vue-components77.es.js +21 -0
- package/dist/vue-components78.es.js +55 -0
- package/dist/vue-components79.es.js +9 -0
- package/dist/vue-components80.es.js +16 -0
- package/dist/vue-components81.es.js +39 -0
- package/dist/vue-components82.es.js +49 -0
- package/dist/vue-components83.es.js +128 -0
- package/dist/vue-components84.es.js +65 -0
- package/dist/vue-components85.es.js +63 -0
- package/dist/vue-components86.es.js +25 -0
- package/dist/vue-components87.es.js +5 -0
- package/dist/vue-components88.es.js +80 -0
- package/dist/vue-components89.es.js +95 -0
- package/dist/vue-components90.es.js +73 -0
- package/dist/vue-components91.es.js +12 -0
- package/dist/vue-components92.es.js +56 -0
- package/dist/vue-components93.es.js +5 -0
- package/dist/vue-components94.es.js +44 -0
- package/dist/vue-components95.es.js +5 -0
- package/dist/vue-components96.es.js +84 -0
- package/dist/vue-components98.es.js +8 -0
- package/dist/vue-components99.es.js +9 -0
- package/package.json +3 -3
- package/src/components/CommandButton.vue +1 -1
- package/src/components/OmegaForm/OmegaAutoGen.vue +1 -1
- package/src/components/OmegaForm/index.ts +1 -1
- package/src/components/OmegaForm/meta/checks.ts +2 -1
- package/src/components/OmegaForm/meta/createMeta.ts +3 -1
- package/src/components/OmegaForm/meta/defaults.ts +3 -1
- package/src/components/OmegaForm/meta/redacted.ts +1 -1
- package/src/components/OmegaForm/meta/types.ts +1 -1
- package/src/components/OmegaForm/meta/walker.ts +1 -1
- package/src/components/OmegaForm/submit.ts +4 -1
- package/src/components/OmegaForm/types.ts +3 -1
- package/src/components/OmegaForm/useOmegaForm.ts +2 -1
- package/src/components/OmegaForm/useRegisterField.ts +1 -1
- package/src/components/OmegaForm/validation/localized.ts +2 -1
- package/src/utils/index.ts +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CommandBase, Progress } from "@effect-app/vue";
|
|
1
|
+
import type { CommandBase, Progress } from "@effect-app/vue/makeClient";
|
|
2
2
|
import type * as AsyncResult from "effect/unstable/reactivity/AsyncResult";
|
|
3
3
|
import type { VBtn } from "vuetify/components";
|
|
4
4
|
export type VBtnProps = VBtn["$props"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
|
-
import
|
|
2
|
+
import * as Order from "effect/Order";
|
|
3
3
|
import { type OmegaAutoGenMeta, type OmegaInputProps } from "./types";
|
|
4
4
|
declare const __VLS_export: <// dprint-ignore
|
|
5
5
|
From extends Record<PropertyKey, string>, To extends Record<PropertyKey, string>, Name extends DeepKeys<From>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type * as S from "effect-app/Schema";
|
|
2
2
|
export { getInputType, type SupportedInputs } from "./inputs";
|
|
3
3
|
export { createMeta, generateMetaFromSchema, isNullableOrUndefined, metadataFromAst } from "./meta/createMeta";
|
|
4
4
|
export type { CreateMeta, FilterItems } from "./meta/createMeta";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as S from "effect-app/Schema";
|
|
2
2
|
import type { FieldMeta } from "./types";
|
|
3
3
|
export declare const getCheckMetas: (property: S.AST.AST) => Array<Record<string, any>>;
|
|
4
4
|
export declare const getFieldMetadataFromAst: (property: S.AST.AST) => Partial<FieldMeta> & Record<string, unknown>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as S from "effect-app/Schema";
|
|
2
2
|
export declare const defaultsValueFromSchema: (schema: S.Schema<any>, record?: Record<string, any>) => any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as S from "effect-app/Schema";
|
|
2
2
|
export declare const toFormSchema: <From, To>(schema: S.Codec<To, From>) => S.Codec<To, From>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DeepKeys } from "@tanstack/vue-form";
|
|
2
|
-
import type
|
|
2
|
+
import type * as S from "effect-app/Schema";
|
|
3
3
|
import type { Redacted } from "effect/Redacted";
|
|
4
4
|
type StripRedacted<T> = T extends Redacted<any> ? string : T extends ReadonlyArray<infer U> ? ReadonlyArray<StripRedacted<U>> : T extends Record<string, any> ? {
|
|
5
5
|
[K in keyof T]: StripRedacted<T[K]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as api from "@opentelemetry/api";
|
|
2
2
|
import type { DeepKeys, StandardSchemaV1Issue, ValidationError, ValidationErrorMap } from "@tanstack/vue-form";
|
|
3
|
-
import
|
|
3
|
+
import * as Effect from "effect-app/Effect";
|
|
4
4
|
import type { Fiber as EffectFiber } from "effect/Fiber";
|
|
5
5
|
import type { OmegaFormApi, OmegaFormParams } from "./types";
|
|
6
6
|
declare const FormErrors_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { DeepKeys, DeepValue, FieldApi, FieldAsyncValidateOrFn, FieldState, FieldValidateOrFn, FormApi, FormAsyncValidateOrFn, FormOptions, FormState, FormValidateOrFn, StandardSchemaV1, VueFormApi } from "@tanstack/vue-form";
|
|
2
|
-
import type
|
|
2
|
+
import type * as Effect from "effect-app/Effect";
|
|
3
|
+
import type * as S from "effect-app/Schema";
|
|
3
4
|
import type { UnionToTuples } from "effect-app/utils";
|
|
4
5
|
import type { Fiber as EffectFiber } from "effect/Fiber";
|
|
6
|
+
import type * as Order from "effect/Order";
|
|
5
7
|
import type { Redacted } from "effect/Redacted";
|
|
6
8
|
import type { AllowedComponentProps, ComponentCustomProps, ComputedRef, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "vue";
|
|
7
9
|
import type { MergedInputProps, OmegaFieldInternalApi, TaggedUnionOptionsArray } from "./InputProps";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StandardSchemaV1 } from "@tanstack/vue-form";
|
|
2
|
-
import
|
|
2
|
+
import * as S from "effect-app/Schema";
|
|
3
3
|
import type { useIntl } from "../../../utils";
|
|
4
4
|
export type TransFn = ReturnType<typeof useIntl>["trans"];
|
|
5
5
|
export declare const makeStandardSchemaV1Hooks: (trans: TransFn) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { type makeIntl } from "@effect-app/vue";
|
|
2
|
-
import type
|
|
1
|
+
import { type makeIntl } from "@effect-app/vue/makeIntl";
|
|
2
|
+
import type * as S from "effect-app/Schema";
|
|
3
3
|
import { type InjectionKey } from "vue";
|
|
4
4
|
export declare const useIntlKey: InjectionKey<ReturnType<typeof makeIntl>["useIntl"]>;
|
|
5
5
|
export declare const useIntl: () => {
|
|
6
6
|
locale: import("vue").Ref<string, string>;
|
|
7
7
|
trans: (id: string, values?: Record<string, import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>>) => string;
|
|
8
8
|
readonly formatMessage: (descriptor: import("@formatjs/intl").MessageDescriptor, values?: Record<string, import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>>, opts?: import("intl-messageformat").Options) => string;
|
|
9
|
-
readonly intl: import("@effect-app/vue").IntlShape<string>;
|
|
9
|
+
readonly intl: import("@effect-app/vue/makeIntl").IntlShape<string>;
|
|
10
10
|
};
|
|
11
11
|
export declare const provideIntl: (intl: ReturnType<typeof makeIntl>["useIntl"]) => void;
|
|
12
12
|
/**
|
|
@@ -3,21 +3,21 @@ import { getTransformationFrom as t, provideIntl as n, useIntl as r, useIntlKey
|
|
|
3
3
|
import { useOnClose as a, usePreventClose as o } from "./vue-components8.es.js";
|
|
4
4
|
import s from "./vue-components10.es.js";
|
|
5
5
|
import { getInputType as c } from "./vue-components11.es.js";
|
|
6
|
-
import { createMeta as l, generateMetaFromSchema as u, isNullableOrUndefined as d, metadataFromAst as f } from "./vue-
|
|
7
|
-
import { defaultsValueFromSchema as p } from "./vue-
|
|
8
|
-
import { toFormSchema as m } from "./vue-
|
|
9
|
-
import { deepMerge as h } from "./vue-
|
|
10
|
-
import { makeStandardSchemaV1Hooks as g, toLocalizedStandardSchemaV1 as _ } from "./vue-
|
|
11
|
-
import { useErrorLabel as v } from "./vue-
|
|
12
|
-
import y from "./vue-
|
|
13
|
-
import b from "./vue-
|
|
14
|
-
import x from "./vue-
|
|
15
|
-
import S from "./vue-
|
|
16
|
-
import { FormErrors as C } from "./vue-
|
|
17
|
-
import { OmegaFormKey as w, useOmegaForm as T } from "./vue-
|
|
18
|
-
import { createUseFormWithCustomInput as E } from "./vue-
|
|
19
|
-
import { duplicateSchema as D } from "./vue-
|
|
20
|
-
import { components_exports as O } from "./vue-
|
|
6
|
+
import { createMeta as l, generateMetaFromSchema as u, isNullableOrUndefined as d, metadataFromAst as f } from "./vue-components84.es.js";
|
|
7
|
+
import { defaultsValueFromSchema as p } from "./vue-components85.es.js";
|
|
8
|
+
import { toFormSchema as m } from "./vue-components86.es.js";
|
|
9
|
+
import { deepMerge as h } from "./vue-components88.es.js";
|
|
10
|
+
import { makeStandardSchemaV1Hooks as g, toLocalizedStandardSchemaV1 as _ } from "./vue-components89.es.js";
|
|
11
|
+
import { useErrorLabel as v } from "./vue-components90.es.js";
|
|
12
|
+
import y from "./vue-components104.es.js";
|
|
13
|
+
import b from "./vue-components106.es.js";
|
|
14
|
+
import x from "./vue-components108.es.js";
|
|
15
|
+
import S from "./vue-components110.es.js";
|
|
16
|
+
import { FormErrors as C } from "./vue-components137.es.js";
|
|
17
|
+
import { OmegaFormKey as w, useOmegaForm as T } from "./vue-components138.es.js";
|
|
18
|
+
import { createUseFormWithCustomInput as E } from "./vue-components139.es.js";
|
|
19
|
+
import { duplicateSchema as D } from "./vue-components140.es.js";
|
|
20
|
+
import { components_exports as O } from "./vue-components141.es.js";
|
|
21
21
|
//#region src/index.ts
|
|
22
22
|
function k(e) {
|
|
23
23
|
for (let t in O) if (Object.prototype.hasOwnProperty.call(O, t)) {
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { getInputType as e } from "./vue-components11.es.js";
|
|
2
|
+
import { Fragment as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createSlots as a, defineComponent as o, guardReactiveProps as s, mergeProps as c, normalizeProps as l, openBlock as u, renderList as d, renderSlot as f, resolveComponent as p, resolveDynamicComponent as m, unref as h, withCtx as g } from "vue";
|
|
3
|
+
//#region src/components/OmegaForm/OmegaInputVuetify.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _ = /* @__PURE__ */ o({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "OmegaInputVuetify",
|
|
7
|
+
props: {
|
|
8
|
+
inputProps: {},
|
|
9
|
+
field: {},
|
|
10
|
+
state: {}
|
|
11
|
+
},
|
|
12
|
+
emits: ["focus", "blur"],
|
|
13
|
+
setup(o) {
|
|
14
|
+
return (_, v) => {
|
|
15
|
+
let y = p("v-text-field"), b = p("v-textarea"), x = p("v-radio"), S = p("v-radio-group"), C = p("v-select"), w = p("v-autocomplete");
|
|
16
|
+
return u(), i("div", {
|
|
17
|
+
class: "omega-input",
|
|
18
|
+
onFocusout: v[4] ||= (e) => {
|
|
19
|
+
_.$emit("blur", e), o.field.handleBlur();
|
|
20
|
+
},
|
|
21
|
+
onFocusin: v[5] ||= (e) => _.$emit("focus", e)
|
|
22
|
+
}, [
|
|
23
|
+
o.inputProps.type === "boolean" || o.inputProps.type === "switch" ? (u(), n(m(o.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), c({
|
|
24
|
+
key: 0,
|
|
25
|
+
id: o.inputProps.id,
|
|
26
|
+
name: o.field.name,
|
|
27
|
+
label: o.inputProps.label,
|
|
28
|
+
"error-messages": o.inputProps.errorMessages,
|
|
29
|
+
error: o.inputProps.error,
|
|
30
|
+
ripple: ""
|
|
31
|
+
}, _.$attrs, {
|
|
32
|
+
"model-value": o.state.value,
|
|
33
|
+
onChange: v[0] ||= (e) => o.field.handleChange(e.target.checked)
|
|
34
|
+
}), a({ _: 2 }, [_.$slots.label ? {
|
|
35
|
+
name: "label",
|
|
36
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
37
|
+
required: o.inputProps.required,
|
|
38
|
+
id: o.inputProps.id,
|
|
39
|
+
label: o.inputProps.label
|
|
40
|
+
})))]),
|
|
41
|
+
key: "0"
|
|
42
|
+
} : void 0]), 1040, [
|
|
43
|
+
"id",
|
|
44
|
+
"name",
|
|
45
|
+
"label",
|
|
46
|
+
"error-messages",
|
|
47
|
+
"error",
|
|
48
|
+
"model-value"
|
|
49
|
+
])) : r("", !0),
|
|
50
|
+
o.inputProps.type === "email" || o.inputProps.type === "string" || o.inputProps.type === "password" || o.inputProps.type === "date" ? (u(), n(y, c({
|
|
51
|
+
key: 1,
|
|
52
|
+
id: o.inputProps.id,
|
|
53
|
+
required: o.inputProps.required,
|
|
54
|
+
"min-length": o.inputProps.minLength,
|
|
55
|
+
"max-length": o.inputProps.maxLength,
|
|
56
|
+
type: h(e)(o.inputProps.type),
|
|
57
|
+
name: o.field.name,
|
|
58
|
+
label: o.inputProps.label,
|
|
59
|
+
"error-messages": o.inputProps.errorMessages,
|
|
60
|
+
error: o.inputProps.error
|
|
61
|
+
}, _.$attrs, {
|
|
62
|
+
"model-value": o.state.value,
|
|
63
|
+
"onUpdate:modelValue": o.field.handleChange
|
|
64
|
+
}), a({ _: 2 }, [_.$slots.label ? {
|
|
65
|
+
name: "label",
|
|
66
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
67
|
+
required: o.inputProps.required,
|
|
68
|
+
id: o.inputProps.id,
|
|
69
|
+
label: o.inputProps.label
|
|
70
|
+
})))]),
|
|
71
|
+
key: "0"
|
|
72
|
+
} : void 0]), 1040, [
|
|
73
|
+
"id",
|
|
74
|
+
"required",
|
|
75
|
+
"min-length",
|
|
76
|
+
"max-length",
|
|
77
|
+
"type",
|
|
78
|
+
"name",
|
|
79
|
+
"label",
|
|
80
|
+
"error-messages",
|
|
81
|
+
"error",
|
|
82
|
+
"model-value",
|
|
83
|
+
"onUpdate:modelValue"
|
|
84
|
+
])) : r("", !0),
|
|
85
|
+
o.inputProps.type === "text" ? (u(), n(b, c({
|
|
86
|
+
key: 2,
|
|
87
|
+
id: o.inputProps.id,
|
|
88
|
+
required: o.inputProps.required,
|
|
89
|
+
"min-length": o.inputProps.minLength,
|
|
90
|
+
"max-length": o.inputProps.maxLength,
|
|
91
|
+
name: o.field.name,
|
|
92
|
+
label: o.inputProps.label,
|
|
93
|
+
"error-messages": o.inputProps.errorMessages,
|
|
94
|
+
error: o.inputProps.error
|
|
95
|
+
}, _.$attrs, {
|
|
96
|
+
"model-value": o.state.value,
|
|
97
|
+
"onUpdate:modelValue": o.field.handleChange
|
|
98
|
+
}), a({ _: 2 }, [_.$slots.label ? {
|
|
99
|
+
name: "label",
|
|
100
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
101
|
+
required: o.inputProps.required,
|
|
102
|
+
id: o.inputProps.id,
|
|
103
|
+
label: o.inputProps.label
|
|
104
|
+
})))]),
|
|
105
|
+
key: "0"
|
|
106
|
+
} : void 0]), 1040, [
|
|
107
|
+
"id",
|
|
108
|
+
"required",
|
|
109
|
+
"min-length",
|
|
110
|
+
"max-length",
|
|
111
|
+
"name",
|
|
112
|
+
"label",
|
|
113
|
+
"error-messages",
|
|
114
|
+
"error",
|
|
115
|
+
"model-value",
|
|
116
|
+
"onUpdate:modelValue"
|
|
117
|
+
])) : r("", !0),
|
|
118
|
+
o.inputProps.type === "number" || o.inputProps.type === "range" ? (u(), n(m(o.inputProps.type === "range" ? "v-slider" : "v-text-field"), c({
|
|
119
|
+
key: 3,
|
|
120
|
+
id: o.inputProps.id,
|
|
121
|
+
required: o.inputProps.required,
|
|
122
|
+
min: o.inputProps.min,
|
|
123
|
+
max: o.inputProps.max,
|
|
124
|
+
type: o.inputProps.type,
|
|
125
|
+
name: o.field.name,
|
|
126
|
+
label: o.inputProps.label,
|
|
127
|
+
"error-messages": o.inputProps.errorMessages,
|
|
128
|
+
error: o.inputProps.error
|
|
129
|
+
}, _.$attrs, {
|
|
130
|
+
"model-value": o.state.value,
|
|
131
|
+
"onUpdate:modelValue": v[1] ||= (e) => {
|
|
132
|
+
e || e === 0 ? o.field.handleChange(Number(e)) : o.field.handleChange(void 0);
|
|
133
|
+
}
|
|
134
|
+
}), a({ _: 2 }, [_.$slots.label ? {
|
|
135
|
+
name: "label",
|
|
136
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
137
|
+
required: o.inputProps.required,
|
|
138
|
+
id: o.inputProps.id,
|
|
139
|
+
label: o.inputProps.label
|
|
140
|
+
})))]),
|
|
141
|
+
key: "0"
|
|
142
|
+
} : void 0]), 1040, [
|
|
143
|
+
"id",
|
|
144
|
+
"required",
|
|
145
|
+
"min",
|
|
146
|
+
"max",
|
|
147
|
+
"type",
|
|
148
|
+
"name",
|
|
149
|
+
"label",
|
|
150
|
+
"error-messages",
|
|
151
|
+
"error",
|
|
152
|
+
"model-value"
|
|
153
|
+
])) : r("", !0),
|
|
154
|
+
o.inputProps.type === "radio" ? (u(), n(S, c({
|
|
155
|
+
key: 4,
|
|
156
|
+
id: o.inputProps.id,
|
|
157
|
+
name: o.field.name,
|
|
158
|
+
label: o.inputProps.label,
|
|
159
|
+
"error-messages": o.inputProps.errorMessages,
|
|
160
|
+
error: o.inputProps.error
|
|
161
|
+
}, _.$attrs, {
|
|
162
|
+
"model-value": o.state.value,
|
|
163
|
+
"onUpdate:modelValue": o.field.handleChange
|
|
164
|
+
}), a({
|
|
165
|
+
default: g(() => [(u(!0), i(t, null, d(o.inputProps.options, (e) => (u(), n(x, {
|
|
166
|
+
key: e.value,
|
|
167
|
+
label: e.title,
|
|
168
|
+
value: e.value
|
|
169
|
+
}, null, 8, ["label", "value"]))), 128))]),
|
|
170
|
+
_: 2
|
|
171
|
+
}, [_.$slots.label ? {
|
|
172
|
+
name: "label",
|
|
173
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
174
|
+
required: o.inputProps.required,
|
|
175
|
+
id: o.inputProps.id,
|
|
176
|
+
label: o.inputProps.label
|
|
177
|
+
})))]),
|
|
178
|
+
key: "0"
|
|
179
|
+
} : void 0]), 1040, [
|
|
180
|
+
"id",
|
|
181
|
+
"name",
|
|
182
|
+
"label",
|
|
183
|
+
"error-messages",
|
|
184
|
+
"error",
|
|
185
|
+
"model-value",
|
|
186
|
+
"onUpdate:modelValue"
|
|
187
|
+
])) : r("", !0),
|
|
188
|
+
o.inputProps.type === "select" || o.inputProps.type === "multiple" ? (u(), n(C, c({
|
|
189
|
+
key: 5,
|
|
190
|
+
id: o.inputProps.id,
|
|
191
|
+
clearable: o.inputProps.type === "select",
|
|
192
|
+
required: o.inputProps.required,
|
|
193
|
+
multiple: o.inputProps.type === "multiple",
|
|
194
|
+
chips: o.inputProps.type === "multiple",
|
|
195
|
+
name: o.field.name,
|
|
196
|
+
label: o.inputProps.label,
|
|
197
|
+
items: o.inputProps.options,
|
|
198
|
+
"error-messages": o.inputProps.errorMessages,
|
|
199
|
+
error: o.inputProps.error
|
|
200
|
+
}, _.$attrs, {
|
|
201
|
+
"model-value": o.state.value,
|
|
202
|
+
onClear: v[2] ||= (e) => o.field.handleChange(void 0),
|
|
203
|
+
"onUpdate:modelValue": o.field.handleChange
|
|
204
|
+
}), a({ _: 2 }, [_.$slots.label ? {
|
|
205
|
+
name: "label",
|
|
206
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
207
|
+
required: o.inputProps.required,
|
|
208
|
+
id: o.inputProps.id,
|
|
209
|
+
label: o.inputProps.label
|
|
210
|
+
})))]),
|
|
211
|
+
key: "0"
|
|
212
|
+
} : void 0]), 1040, [
|
|
213
|
+
"id",
|
|
214
|
+
"clearable",
|
|
215
|
+
"required",
|
|
216
|
+
"multiple",
|
|
217
|
+
"chips",
|
|
218
|
+
"name",
|
|
219
|
+
"label",
|
|
220
|
+
"items",
|
|
221
|
+
"error-messages",
|
|
222
|
+
"error",
|
|
223
|
+
"model-value",
|
|
224
|
+
"onUpdate:modelValue"
|
|
225
|
+
])) : r("", !0),
|
|
226
|
+
o.inputProps.type === "autocomplete" || o.inputProps.type === "autocompletemultiple" ? (u(), n(w, c({
|
|
227
|
+
key: 6,
|
|
228
|
+
id: o.inputProps.id,
|
|
229
|
+
clearable: o.inputProps.type === "autocomplete",
|
|
230
|
+
multiple: o.inputProps.type === "autocompletemultiple",
|
|
231
|
+
required: o.inputProps.required,
|
|
232
|
+
name: o.field.name,
|
|
233
|
+
label: o.inputProps.label,
|
|
234
|
+
items: o.inputProps.options,
|
|
235
|
+
"error-messages": o.inputProps.errorMessages,
|
|
236
|
+
error: o.inputProps.error,
|
|
237
|
+
chips: o.inputProps.type === "autocompletemultiple"
|
|
238
|
+
}, _.$attrs, {
|
|
239
|
+
"model-value": o.state.value,
|
|
240
|
+
onClear: v[3] ||= (e) => o.field.handleChange(void 0),
|
|
241
|
+
"onUpdate:modelValue": o.field.handleChange
|
|
242
|
+
}), a({ _: 2 }, [_.$slots.label ? {
|
|
243
|
+
name: "label",
|
|
244
|
+
fn: g(() => [f(_.$slots, "label", l(s({
|
|
245
|
+
required: o.inputProps.required,
|
|
246
|
+
id: o.inputProps.id,
|
|
247
|
+
label: o.inputProps.label
|
|
248
|
+
})))]),
|
|
249
|
+
key: "0"
|
|
250
|
+
} : void 0]), 1040, [
|
|
251
|
+
"id",
|
|
252
|
+
"clearable",
|
|
253
|
+
"multiple",
|
|
254
|
+
"required",
|
|
255
|
+
"name",
|
|
256
|
+
"label",
|
|
257
|
+
"items",
|
|
258
|
+
"error-messages",
|
|
259
|
+
"error",
|
|
260
|
+
"chips",
|
|
261
|
+
"model-value",
|
|
262
|
+
"onUpdate:modelValue"
|
|
263
|
+
])) : r("", !0)
|
|
264
|
+
], 32);
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
//#endregion
|
|
269
|
+
export { _ as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);if(e.appendChild(document.createTextNode(`.omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){grid-template-rows:1fr;min-height:0;transition:all .2s;display:grid;overflow:hidden}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;appearance:none;width:auto;box-shadow:none;min-width:auto;height:auto;padding:.5em .5em .5em 1em;display:block}`)),document.head.appendChild(e),window.customElements){let e=window.customElements.define;window.customElements.define=function(t,n){let r=n.prototype.connectedCallback;return n.prototype.connectedCallback=function(){if(r&&r.call(this),this.shadowRoot){let e=document.createElement(`style`);e.appendChild(document.createTextNode(`.omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){grid-template-rows:1fr;min-height:0;transition:all .2s;display:grid;overflow:hidden}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;appearance:none;width:auto;box-shadow:none;min-width:auto;height:auto;padding:.5em .5em .5em 1em;display:block}`)),this.shadowRoot.appendChild(e)}},e.call(window.customElements,t,n)}}}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
2
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);if(e.appendChild(document.createTextNode(`.omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){grid-template-rows:1fr;min-height:0;transition:all .2s;display:grid;overflow:hidden}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;appearance:none;width:auto;box-shadow:none;min-width:auto;height:auto;padding:.5em .5em .5em 1em;display:block}`)),document.head.appendChild(e),window.customElements){let e=window.customElements.define;window.customElements.define=function(t,n){let r=n.prototype.connectedCallback;return n.prototype.connectedCallback=function(){if(r&&r.call(this),this.shadowRoot){let e=document.createElement(`style`);e.appendChild(document.createTextNode(`.omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){grid-template-rows:1fr;min-height:0;transition:all .2s;display:grid;overflow:hidden}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;appearance:none;width:auto;box-shadow:none;min-width:auto;height:auto;padding:.5em .5em .5em 1em;display:block}`)),this.shadowRoot.appendChild(e)}},e.call(window.customElements,t,n)}}}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
3
|
+
import e from "./vue-components100.es.js";
|
|
4
|
+
|
|
5
|
+
//#region src/components/OmegaForm/OmegaInputVuetify.vue
|
|
6
|
+
var t = e;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as default };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import e from "./vue-components102.es.js";
|
|
2
|
+
import { computed as t, createBlock as n, createCommentVNode as r, createElementVNode as i, createSlots as a, defineComponent as o, getCurrentInstance as s, guardReactiveProps as c, mergeProps as l, normalizeClass as u, normalizeProps as d, openBlock as f, renderSlot as p, unref as m, useAttrs as h, useId as g, useSlots as _, withCtx as v } from "vue";
|
|
3
|
+
import { useStore as y } from "@tanstack/vue-form";
|
|
4
|
+
//#region src/components/OmegaForm/OmegaInternalInput.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var b = /* @__PURE__ */ o({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "OmegaInternalInput",
|
|
8
|
+
props: {
|
|
9
|
+
field: {},
|
|
10
|
+
state: {},
|
|
11
|
+
meta: {},
|
|
12
|
+
label: {},
|
|
13
|
+
type: { default: void 0 },
|
|
14
|
+
validators: { default: void 0 },
|
|
15
|
+
required: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: void 0
|
|
18
|
+
},
|
|
19
|
+
inputClass: { default: void 0 },
|
|
20
|
+
register: {},
|
|
21
|
+
options: { default: void 0 }
|
|
22
|
+
},
|
|
23
|
+
setup(o) {
|
|
24
|
+
let b = o, x = t(() => b.required ?? b?.meta?.required), S = s()?.appContext.components.VTextField, C = h(), w = _(), T = t(() => {
|
|
25
|
+
let { class: e, ...t } = C;
|
|
26
|
+
return t;
|
|
27
|
+
}), E = t(() => C.class), D = g(), O = b.field;
|
|
28
|
+
y(O.store, (e) => e);
|
|
29
|
+
let k = y(O.form.store, (e) => e.fieldMeta), A = t(() => b.type ? b.type : b.meta?.type === "string" ? b.meta.format === "email" ? "email" : "string" : b.meta?.type || "unknown");
|
|
30
|
+
b.register(t(() => ({
|
|
31
|
+
name: b.field.name,
|
|
32
|
+
label: b.label,
|
|
33
|
+
id: D
|
|
34
|
+
})));
|
|
35
|
+
let j = t(() => k.value[b.field.name]?.errors ?? []), M = t(() => j.value.map((e) => e?.message).filter(Boolean)), N = (e) => e == null || e === !1 || e === "" || Number.isNaN(e), P = (e) => {
|
|
36
|
+
N(e) && b.meta?.type !== "boolean" ? b.meta?.nullableOrUndefined ? b.field.handleChange(b.meta.nullableOrUndefined === "undefined" ? void 0 : null) : b.meta?.isOptionalKey ? b.field.form.deleteField(b.field.name) : b.field.handleChange(e) : b.field.handleChange(e);
|
|
37
|
+
}, F = (e) => new Proxy(e, { get(e, t, n) {
|
|
38
|
+
return t === "handleChange" ? P : Reflect.get(...arguments);
|
|
39
|
+
} }), I = t(() => ({
|
|
40
|
+
inputProps: {
|
|
41
|
+
id: D,
|
|
42
|
+
required: x.value,
|
|
43
|
+
minLength: b.meta?.type === "string" && b.meta?.minLength,
|
|
44
|
+
maxLength: b.meta?.type === "string" && b.meta?.maxLength,
|
|
45
|
+
max: b.meta?.type === "number" ? b.meta?.maximum ?? (typeof b.meta?.exclusiveMaximum == "number" ? b.meta.exclusiveMaximum - 1 : void 0) : void 0,
|
|
46
|
+
min: b.meta?.type === "number" ? b.meta?.minimum ?? (typeof b.meta?.exclusiveMinimum == "number" ? b.meta.exclusiveMinimum + 1 : void 0) : void 0,
|
|
47
|
+
errorMessages: M.value,
|
|
48
|
+
error: !!M.value.length,
|
|
49
|
+
type: A.value,
|
|
50
|
+
label: w.label ? b.label : `${b.label}${x.value ? " *" : ""}`,
|
|
51
|
+
options: b.options,
|
|
52
|
+
inputClass: b.inputClass
|
|
53
|
+
},
|
|
54
|
+
state: b.state,
|
|
55
|
+
field: F(b.field)
|
|
56
|
+
}));
|
|
57
|
+
return (t, o) => p(t.$slots, "default", d(c({
|
|
58
|
+
...I.value.inputProps,
|
|
59
|
+
field: I.value.field,
|
|
60
|
+
state: I.value.state
|
|
61
|
+
})), () => [i("div", { class: u(E.value) }, [m(S) ? (f(), n(e, d(l({ key: 0 }, {
|
|
62
|
+
...T.value,
|
|
63
|
+
...I.value,
|
|
64
|
+
class: b.inputClass
|
|
65
|
+
})), a({ _: 2 }, [t.$slots.label ? {
|
|
66
|
+
name: "label",
|
|
67
|
+
fn: v((e) => [p(t.$slots, "label", d(c(e)))]),
|
|
68
|
+
key: "0"
|
|
69
|
+
} : void 0]), 1040)) : r("", !0)], 2)]);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
//#endregion
|
|
73
|
+
export { b as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useErrorLabel as e } from "./vue-components90.es.js";
|
|
2
|
+
import t from "./vue-components104.es.js";
|
|
3
|
+
import { computed as n, createBlock as r, createCommentVNode as i, createSlots as a, defineComponent as o, guardReactiveProps as s, inject as c, mergeProps as l, normalizeProps as u, openBlock as d, renderSlot as f, resolveDynamicComponent as p, unref as m, useAttrs as h, withCtx as g } from "vue";
|
|
4
|
+
//#region src/components/OmegaForm/OmegaInput.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var _ = /* @__PURE__ */ o({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "OmegaInput",
|
|
8
|
+
props: {
|
|
9
|
+
form: {},
|
|
10
|
+
label: {},
|
|
11
|
+
validators: {},
|
|
12
|
+
name: {},
|
|
13
|
+
inputClass: {}
|
|
14
|
+
},
|
|
15
|
+
setup(o) {
|
|
16
|
+
let _ = o, v = n(() => _.name), y = h(), b = n(() => {
|
|
17
|
+
if (_.inputClass !== null) return _.inputClass === void 0 ? y.class : _.inputClass;
|
|
18
|
+
}), x = c("getMetaFromArray", null), S = n(() => x?.value && x.value(_.name) ? x.value(v.value) : _.form.meta[v.value]), C = e(_.form);
|
|
19
|
+
return (e, n) => (d(), r(p(o.form.Field), {
|
|
20
|
+
name: o.name,
|
|
21
|
+
validators: o.validators
|
|
22
|
+
}, {
|
|
23
|
+
default: g(({ field: n, state: c }) => [S.value ? (d(), r(t, l({ key: 0 }, {
|
|
24
|
+
...e.$attrs,
|
|
25
|
+
...e.$props,
|
|
26
|
+
inputClass: b.value
|
|
27
|
+
}, {
|
|
28
|
+
field: n,
|
|
29
|
+
state: c,
|
|
30
|
+
register: o.form.registerField,
|
|
31
|
+
label: o.label ?? m(C)(v.value),
|
|
32
|
+
meta: S.value
|
|
33
|
+
}), a({
|
|
34
|
+
default: g((t) => [f(e.$slots, "default", u(s(t)))]),
|
|
35
|
+
_: 2
|
|
36
|
+
}, [e.$slots.label ? {
|
|
37
|
+
name: "label",
|
|
38
|
+
fn: g((t) => [f(e.$slots, "label", u(s(t)))]),
|
|
39
|
+
key: "0"
|
|
40
|
+
} : void 0]), 1040, [
|
|
41
|
+
"field",
|
|
42
|
+
"state",
|
|
43
|
+
"register",
|
|
44
|
+
"label",
|
|
45
|
+
"meta"
|
|
46
|
+
])) : i("", !0)]),
|
|
47
|
+
_: 3
|
|
48
|
+
}, 8, ["name", "validators"]));
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
//#endregion
|
|
52
|
+
export { _ as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createCommentVNode as e, defineComponent as t, mergeProps as n, normalizeProps as r, renderSlot as i, watch as a } from "vue";
|
|
2
|
+
//#region src/components/OmegaForm/OmegaTaggedUnionInternal.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var o = /* @__PURE__ */ t({
|
|
4
|
+
__name: "OmegaTaggedUnionInternal",
|
|
5
|
+
props: {
|
|
6
|
+
state: {},
|
|
7
|
+
field: {},
|
|
8
|
+
name: {},
|
|
9
|
+
form: {}
|
|
10
|
+
},
|
|
11
|
+
setup(t) {
|
|
12
|
+
let o = t, s = o.form.useStore(({ values: e }) => e);
|
|
13
|
+
return a(() => o.state, (e, t) => {
|
|
14
|
+
e === null && o.field.setValue(null), e !== t && (o.form.reset(s.value), setTimeout(() => {
|
|
15
|
+
o.field.validate("change");
|
|
16
|
+
}, 0));
|
|
17
|
+
}, { immediate: !0 }), (a, o) => t.state ? i(a.$slots, `${t.name ? `${t.name}.` : ""}${t.state}`, r(n({ key: 0 }, {
|
|
18
|
+
field: t.field,
|
|
19
|
+
state: t.state
|
|
20
|
+
}))) : e("", !0);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { o as default };
|