@frumu/tandem-panel 0.4.19 → 0.4.21
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/bin/setup.js +38 -1
- package/dist/assets/{index-B_avj5aY.css → index-B3iGh6pG.css} +1 -1
- package/dist/assets/index-BsbwdhBh.js +2910 -0
- package/dist/assets/{react-query-BiFBqyAt.js → react-query-DtPmeC_c.js} +1 -1
- package/dist/assets/{vendor-Q0KoFXrG.js → vendor-UNKt3GY8.js} +49 -49
- package/dist/index.html +4 -4
- package/lib/automations/workflow-list.js +147 -0
- package/lib/setup/control-panel-preferences.js +125 -0
- package/lib/setup/control-panel-principal.js +60 -0
- package/package.json +3 -3
- package/server/routes/control-panel-preferences.js +97 -0
- package/dist/assets/index-7omBpQ9G.js +0 -2900
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as C,e as g,u as L,f as S,T as k,g as w,C as Q,q as p}from"./preact-vendor-CWXGD9A4.js";import{s as O,n as b,a as M,Q as P,b as D,i as V,M as W}from"./vendor-
|
|
1
|
+
import{R as C,e as g,u as L,f as S,T as k,g as w,C as Q,q as p}from"./preact-vendor-CWXGD9A4.js";import{s as O,n as b,a as M,Q as P,b as D,i as V,M as W}from"./vendor-UNKt3GY8.js";var I=C(void 0),_=e=>{const s=S(I);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},Y=({client:e,children:s})=>(g(()=>(e.mount(),()=>{e.unmount()}),[e]),L(I.Provider,{value:e,children:s})),q=C(!1),x=()=>S(q);q.Provider;function j(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var z=C(j()),N=()=>S(z),B=(e,s,o)=>{const t=o?.state.error&&typeof e.throwOnError=="function"?O(e.throwOnError,[o.state.error,o]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||t)&&(s.isReset()||(e.retryOnMount=!1))},H=e=>{g(()=>{e.clearReset()},[e])},U=({result:e,errorResetBoundary:s,throwOnError:o,query:t,suspense:n})=>e.isError&&!s.isReset()&&!e.isFetching&&t&&(n&&e.data===void 0||O(o,[e.error,t])),A=e=>{if(e.suspense){const o=n=>n==="static"?n:Math.max(n??1e3,1e3),t=e.staleTime;e.staleTime=typeof t=="function"?(...n)=>o(t(...n)):o(t),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},G=(e,s)=>e.isLoading&&e.isFetching&&!s,E=(e,s)=>e?.suspense&&s.isPending,v=(e,s,o)=>s.fetchOptimistic(e).catch(()=>{o.clearReset()});function Z({queries:e,...s},o){const t=_(),n=x(),u=N(),r=k(()=>e.map(a=>{const l=t.defaultQueryOptions(a);return l._optimisticResults=n?"isRestoring":"optimistic",l}),[e,t,n]);r.forEach(a=>{A(a);const l=t.getQueryCache().get(a.queryHash);B(a,u,l)}),H(u);const[c]=w(()=>new D(t,r,s)),[m,i,h]=c.getOptimisticResult(r,s.combine),y=!n&&s.subscribed!==!1;Q(p(a=>y?c.subscribe(M.batchCalls(a)):b,[c,y]),()=>c.getCurrentResult()),g(()=>{c.setQueries(r,s)},[r,s,c]);const R=m.some((a,l)=>E(r[l],a))?m.flatMap((a,l)=>{const f=r[l];if(f&&E(f,a)){const F=new P(t,f);return v(f,F,u)}return[]}):[];if(R.length>0)throw Promise.all(R);const T=m.find((a,l)=>{const f=r[l];return f&&U({result:a,errorResetBoundary:u,throwOnError:f.throwOnError,query:t.getQueryCache().get(f.queryHash),suspense:f.suspense})});if(T?.error)throw T.error;return i(h())}function J(e,s,o){const t=x(),n=N(),u=_(),r=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(r);const c=u.getQueryCache().get(r.queryHash);r._optimisticResults=t?"isRestoring":"optimistic",A(r),B(r,n,c),H(n);const m=!u.getQueryCache().get(r.queryHash),[i]=w(()=>new s(u,r)),h=i.getOptimisticResult(r),y=!t&&e.subscribed!==!1;if(Q(p(d=>{const R=y?i.subscribe(M.batchCalls(d)):b;return i.updateResult(),R},[i,y]),()=>i.getCurrentResult()),g(()=>{i.setOptions(r)},[r,i]),E(r,h))throw v(r,i,n);if(U({result:h,errorResetBoundary:n,throwOnError:r.throwOnError,query:c,suspense:r.suspense}))throw h.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(r,h),r.experimental_prefetchInRender&&!V&&G(h,t)&&(m?v(r,i,n):c?.promise)?.catch(b).finally(()=>{i.updateResult()}),r.notifyOnChangeProps?h:i.trackResult(h)}function $(e,s){return J(e,P)}function ee(e,s){const o=_(),[t]=w(()=>new W(o,e));g(()=>{t.setOptions(e)},[t,e]);const n=Q(p(r=>t.subscribe(M.batchCalls(r)),[t]),()=>t.getCurrentResult()),u=p((r,c)=>{t.mutate(r,c).catch(b)},[t]);if(n.error&&O(t.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:u,mutateAsync:n.mutate}}export{Y as Q,_ as a,ee as b,Z as c,$ as u};
|