@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.
@@ -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: string;
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: string;
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}.inputs.${e.name}`, defaultMessage: o(e.name) }) : o(e.name);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/vue-components",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "peerDependencies": {
5
5
  "@mdi/js": "^7.4.47",
6
6
  "effect": "^3.17.13",
@@ -39,7 +39,7 @@ if (!form) {
39
39
 
40
40
  defineProps<{
41
41
  name: Name
42
- label: string
42
+ label?: string
43
43
  validators?: FieldValidators<From>
44
44
  options?: { title: string; value: string }[]
45
45
  type?: TypeOverride
@@ -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}.inputs.${props.name}`, defaultMessage: humanize(props.name)}) : humanize(props.name)
72
+ const i18n = () => props.form.i18nNamespace ? formatMessage({id:`${props.form.i18nNamespace}.fields.${props.name}`, defaultMessage: humanize(props.name)}) : humanize(props.name)
73
73
  </script>
@@ -72,7 +72,7 @@ export interface OmegaFormReturn<From extends Record<PropertyKey, any>, To exten
72
72
  never
73
73
  > & {
74
74
  name: Name
75
- label: string
75
+ label?: string
76
76
  validators?: FieldValidators<From>
77
77
  options?: {
78
78
  title: string