@effect-app/vue-components 0.21.0 → 0.21.1
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/OmegaFormInput.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/useOmegaForm.d.ts +1 -1
- package/dist/vue-components.es7.js +1 -1
- package/package.json +1 -1
- package/src/components/OmegaForm/OmegaFormInput.vue +1 -1
- package/src/components/OmegaForm/OmegaInput.vue +1 -1
- package/src/components/OmegaForm/useOmegaForm.ts +1 -1
|
@@ -4,7 +4,7 @@ import type { FieldValidators, TypeOverride } from "./OmegaFormStuff";
|
|
|
4
4
|
declare const _default: <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, 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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
5
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
|
|
6
6
|
name: Name;
|
|
7
|
-
label
|
|
7
|
+
label?: string;
|
|
8
8
|
validators?: FieldValidators<From>;
|
|
9
9
|
options?: {
|
|
10
10
|
title: string;
|
|
@@ -36,7 +36,7 @@ export interface OmegaFormReturn<From extends Record<PropertyKey, any>, To exten
|
|
|
36
36
|
Input: <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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
37
37
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
|
|
38
38
|
name: Name;
|
|
39
|
-
label
|
|
39
|
+
label?: string;
|
|
40
40
|
validators?: FieldValidators<From>;
|
|
41
41
|
options?: {
|
|
42
42
|
title: string;
|
|
@@ -21,7 +21,7 @@ const j = /* @__PURE__ */ g({
|
|
|
21
21
|
if (!t.value)
|
|
22
22
|
throw console.log(e.name, Object.keys(e.form.meta), e.form.meta), new Error("Meta is undefined");
|
|
23
23
|
return k(t.value);
|
|
24
|
-
}), { formatMessage: f } = w(), o = (a) => a.replace(/([A-Z])/g, " $1").replace(/^./, (n) => n.toUpperCase()).trim(), d = () => e.form.i18nNamespace ? f({ id: `${e.form.i18nNamespace}.
|
|
24
|
+
}), { formatMessage: f } = w(), o = (a) => a.replace(/([A-Z])/g, " $1").replace(/^./, (n) => n.toUpperCase()).trim(), d = () => e.form.i18nNamespace ? f({ id: `${e.form.i18nNamespace}.fields.${e.name}`, defaultMessage: o(e.name) }) : o(e.name);
|
|
25
25
|
return (a, n) => (l(), s(h(a.form.Field), {
|
|
26
26
|
name: a.name,
|
|
27
27
|
validators: {
|
package/package.json
CHANGED
|
@@ -69,5 +69,5 @@ const humanize = (str: string) => {
|
|
|
69
69
|
.replace(/^./, (char) => char.toUpperCase()) // Capitalize the first letter
|
|
70
70
|
.trim() // Remove leading/trailing spaces
|
|
71
71
|
}
|
|
72
|
-
const i18n = () => props.form.i18nNamespace ? formatMessage({id:`${props.form.i18nNamespace}.
|
|
72
|
+
const i18n = () => props.form.i18nNamespace ? formatMessage({id:`${props.form.i18nNamespace}.fields.${props.name}`, defaultMessage: humanize(props.name)}) : humanize(props.name)
|
|
73
73
|
</script>
|