@effect-app/vue-components 2.11.4 → 3.0.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.
@@ -218,7 +218,6 @@ export type OmegaConfig<T> = {
218
218
  export interface OF<From, To> extends OmegaFormApi<From, To> {
219
219
  meta: MetaRecord<From>
220
220
  unionMeta: Record<string, MetaRecord<From>>
221
- unionDefaultValues: Record<string, Record<string, any>>
222
221
  clear: () => void
223
222
  i18nNamespace?: string
224
223
  ignorePreventCloseEvents?: boolean
@@ -684,7 +683,7 @@ export const useOmegaForm = <
684
683
  const standardSchema = S.standardSchemaV1(schema)
685
684
  const decode = S.decode(schema)
686
685
 
687
- const { meta, unionDefaultValues, unionMeta } = generateMetaFromSchema(schema)
686
+ const { meta, unionMeta } = generateMetaFromSchema(schema)
688
687
 
689
688
  const persistencyKey = computed(() => {
690
689
  if (omegaConfig?.persistency?.id) {
@@ -919,7 +918,6 @@ export const useOmegaForm = <
919
918
  // Reset with current values to mark them as the new baseline
920
919
  form.reset(values.value)
921
920
  }
922
- return undefined
923
921
  })
924
922
  }
925
923
 
@@ -956,7 +954,6 @@ export const useOmegaForm = <
956
954
  ignorePreventCloseEvents: omegaConfig?.ignorePreventCloseEvents,
957
955
  meta,
958
956
  unionMeta,
959
- unionDefaultValues,
960
957
  clear,
961
958
  handleSubmit: (meta?: Record<string, any>) => {
962
959
  const span = api.trace.getSpan(api.context.active())
@@ -965,18 +962,8 @@ export const useOmegaForm = <
965
962
  // /** @experimental */
966
963
  handleSubmitEffect,
967
964
  registerField: (field: ComputedRef<{ name: string; label: string; id: string }>) => {
968
- watch(field, (f) => {
969
- fieldMap.value.set(f.name, { label: f.label, id: f.id })
970
- }, { immediate: true })
971
- onUnmounted(() => {
972
- // Only delete if this component instance still owns the registration (id matches)
973
- // This prevents the old component from removing the new component's registration
974
- // when Vue re-keys and mounts new before unmounting old
975
- const current = fieldMap.value.get(field.value.name)
976
- if (current?.id === field.value.id) {
977
- fieldMap.value.delete(field.value.name)
978
- }
979
- })
965
+ watch(field, (f) => fieldMap.value.set(f.name, { label: f.label, id: f.id }), { immediate: true })
966
+ onUnmounted(() => fieldMap.value.delete(field.value.name)) // todo; perhap only when owned (id match)
980
967
  }
981
968
  })
982
969
 
@@ -5,9 +5,7 @@ const Key = Symbol("injected") as InjectionKey<Map<string, { label: string; id:
5
5
 
6
6
  export const useRegisterField = (field: ComputedRef<{ name: string; label: string; id: string }>) => {
7
7
  const map = injectCertain(Key)
8
- watch(field, (f) => {
9
- map.set(f.name, { label: f.label, id: f.id })
10
- }, { immediate: true })
8
+ watch(field, (f) => map.set(f.name, { label: f.label, id: f.id }), { immediate: true })
11
9
  onUnmounted(() => map.delete(field.value.name)) // todo; perhap only when owned
12
10
  }
13
11
 
@@ -1,4 +0,0 @@
1
- import f from "./vue-components.es19.js";
2
- export {
3
- f as default
4
- };
@@ -1,9 +0,0 @@
1
- const s = (t, e) => {
2
- const o = t.__vccOpts || t;
3
- for (const [r, c] of e)
4
- o[r] = c;
5
- return o;
6
- };
7
- export {
8
- s as default
9
- };