mtxuilib 0.0.385 → 0.0.386

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.
@@ -1 +1 @@
1
- "use client";var b=Object.defineProperty,g=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var a=Object.getOwnPropertySymbols;var l=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var p=(e,t,n)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&p(e,n,t[n]);if(a)for(var n of a(t))f.call(t,n)&&p(e,n,t[n]);return e},y=(e,t)=>g(e,M(t));var S=(e,t)=>{var n={};for(var o in e)l.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&a)for(var o of a(e))t.indexOf(o)<0&&f.call(e,o)&&(n[o]=e[o]);return n};import{Fragment as O,jsx as s}from"react/jsx-runtime";import{Suspense as I}from"react";import{useMutation as F,useSuspenseQuery as P}from"gomtm/connectquery";import{FormProvider as Q,useForm as V}from"react-hook-form";function k(e){const{defaultValues:t,methodQuerySig:n,params:o,children:r,mutationMethodSig:i}=e,u=F(i),d=h=>{u.mutateAsync(h)};return t?s(c,{defaultValues:t,onSubmit:d,children:r}):s(I,{fallback:s(O,{children:"ConnectEsUpdateForm loading"}),children:s(C,{methodQuerySig:n,params:o,onSubmit:d,children:r})})}function c(e){const{defaultValues:t,onSubmit:n,children:o}=e,r=V({defaultValues:t});return s(Q,y(m({},r),{children:s("form",{onSubmit:r.handleSubmit(n),children:o})}))}function C(e){const u=e,{methodQuerySig:t,params:n,onSubmit:o}=u,r=S(u,["methodQuerySig","params","onSubmit"]),i=P(t,n);return s(c,m({defaultValues:i.data,onSubmit:o},r))}export{k as ConnectEsUpdateForm};
1
+ "use client";var b=Object.defineProperty,g=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var p=(e,t,n)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l=(e,t)=>{for(var n in t||(t={}))f.call(t,n)&&p(e,n,t[n]);if(m)for(var n of m(t))y.call(t,n)&&p(e,n,t[n]);return e},c=(e,t)=>g(e,M(t));var S=(e,t)=>{var n={};for(var o in e)f.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&m)for(var o of m(e))t.indexOf(o)<0&&y.call(e,o)&&(n[o]=e[o]);return n};import{Fragment as v,jsx as a}from"react/jsx-runtime";import{Suspense as I,useMemo as F}from"react";import{useMutation as P,useSuspenseQuery as V}from"gomtm/connectquery";import{FormProvider as Q,useForm as C}from"react-hook-form";function q(e){const{defaultValues:t,methodQuerySig:n,params:o,children:r,mutationMethodSig:s}=e,d=P(s),u=i=>{d.mutateAsync(i)};return t?a(h,{defaultValues:t,onSubmit:u,children:r}):a(I,{fallback:a(v,{children:"ConnectEsUpdateForm loading"}),children:a(O,{methodQuerySig:n,params:o,onSubmit:u,children:r})})}function h(e){const{defaultValues:t,onSubmit:n,children:o}=e,r=C({defaultValues:t});return a(Q,c(l({},r),{children:a("form",{onSubmit:r.handleSubmit(n),children:o})}))}function O(e){const u=e,{methodQuerySig:t,params:n,onSubmit:o}=u,r=S(u,["methodQuerySig","params","onSubmit"]),s=V(t,n),d=F(()=>{const i=s.data;return i.value?i.value:s.data},[s.data]);return a(h,l({defaultValues:d,onSubmit:o},r))}export{q as ConnectEsUpdateForm};