@openmrs/esm-framework 6.2.1-pre.2774 → 6.2.1-pre.2777

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.
@@ -7,22 +7,22 @@ assets by chunk 243 KiB (id hint: vendors)
7
7
  asset 645.openmrs-esm-framework.js 37.2 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
8
8
  asset 746.openmrs-esm-framework.js 17.6 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
9
9
  asset 588.openmrs-esm-framework.js 4.46 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
10
- asset openmrs-esm-framework.js 1.91 MiB [emitted] [minimized] [big] (name: main) 2 related assets
10
+ asset openmrs-esm-framework.js 1.92 MiB [emitted] [minimized] [big] (name: main) 2 related assets
11
11
  asset 619.openmrs-esm-framework.js 18.8 KiB [emitted] [minimized] 1 related asset
12
12
  asset 735.openmrs-esm-framework.js 6.54 KiB [emitted] [minimized] 2 related assets
13
13
  asset 530.openmrs-esm-framework.js 6.4 KiB [emitted] [minimized] 1 related asset
14
- orphan modules 8.9 MiB [orphan] 2879 modules
14
+ orphan modules 9.04 MiB [orphan] 2929 modules
15
15
  runtime modules 20 KiB 14 modules
16
- built modules 6.33 MiB (javascript) 336 bytes (share-init) 336 bytes (consume-shared) [built] 330 modules
16
+ built modules 6.37 MiB (javascript) 336 bytes (share-init) 336 bytes (consume-shared) [built] 330 modules
17
17
 
18
18
  WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
19
19
  This can impact web performance.
20
20
  Assets:
21
- openmrs-esm-framework.js (1.91 MiB)
21
+ openmrs-esm-framework.js (1.92 MiB)
22
22
 
23
23
  WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
24
24
  Entrypoints:
25
- main (1.91 MiB)
25
+ main (1.92 MiB)
26
26
  openmrs-esm-framework.js
27
27
 
28
- webpack 5.88.0 compiled with 2 warnings in 29858 ms
28
+ webpack 5.88.0 compiled with 2 warnings in 31764 ms
@@ -1,2 +1,2 @@
1
- "use strict";(globalThis.webpackChunk_openmrs_esm_framework=globalThis.webpackChunk_openmrs_esm_framework||[]).push([[588],{1588:(e,r,t)=>{t.r(r),t.d(r,{SWRConfig:()=>l,default:()=>c,mutate:()=>s.JG,preload:()=>s.MA,unstable_serialize:()=>i,useSWRConfig:()=>s.kY});var n=t(5776),a=t(1374),s=t(7859);const i=e=>(0,s.qC)(e)[0],u=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((r=>{e.status="fulfilled",e.value=r}),(r=>{e.status="rejected",e.reason=r})),e)}),o={dedupe:!0},l=s.$l.defineProperty(s.J$,"defaultValue",{value:s.u_}),c=(0,s.s6)(((e,r,t)=>{const{cache:i,compare:l,suspense:c,fallbackData:d,revalidateOnMount:f,revalidateIfStale:g,refreshInterval:E,refreshWhenHidden:R,refreshWhenOffline:h,keepPreviousData:V}=t,[T,_,k,m]=s.DY.get(i),[p,w]=(0,s.qC)(e),b=(0,n.useRef)(!1),v=(0,n.useRef)(!1),L=(0,n.useRef)(p),C=(0,n.useRef)(r),O=(0,n.useRef)(t),S=()=>O.current,D=()=>S().isVisible()&&S().isOnline(),[I,N,y,j]=(0,s.JN)(i,p),P=(0,n.useRef)({}).current,A=(0,s.o8)(d)?t.fallback[p]:d,W=(e,r)=>{for(const t in P){const n=t;if("data"===n){if(!l(e[n],r[n])){if(!(0,s.o8)(e[n]))return!1;if(!l(z,r[n]))return!1}}else if(r[n]!==e[n])return!1}return!0},M=(0,n.useMemo)((()=>{const e=!!p&&!!r&&((0,s.o8)(f)?!S().isPaused()&&!c&&(!!(0,s.o8)(g)||g):f),t=r=>{const t=(0,s.PM)(r);return delete t._k,e?{isValidating:!0,isLoading:!0,...t}:t},n=I(),a=j(),i=t(n),u=n===a?i:t(a);let o=i;return[()=>{const e=t(I());return W(e,o)?(o.data=e.data,o.isLoading=e.isLoading,o.isValidating=e.isValidating,o.error=e.error,o):(o=e,e)},()=>u]}),[i,p]),F=(0,a.useSyncExternalStore)((0,n.useCallback)((e=>y(p,((r,t)=>{W(t,r)||e()}))),[i,p]),M[0],M[1]),q=!b.current,J=T[p]&&T[p].length>0,U=F.data,Y=(0,s.o8)(U)?A:U,$=F.error,x=(0,n.useRef)(Y),z=V?(0,s.o8)(U)?x.current:U:Y,B=!(J&&!(0,s.o8)($))&&(q&&!(0,s.o8)(f)?f:!S().isPaused()&&(c?!(0,s.o8)(Y)&&g:(0,s.o8)(Y)||g)),G=!!(p&&r&&q&&B),H=(0,s.o8)(F.isValidating)?G:F.isValidating,K=(0,s.o8)(F.isLoading)?G:F.isLoading,Q=(0,n.useCallback)((async e=>{const r=C.current;if(!p||!r||v.current||S().isPaused())return!1;let n,a,i=!0;const u=e||{},o=!k[p]||!u.dedupe,c=()=>s.w6?!v.current&&p===L.current&&b.current:p===L.current,d={isValidating:!1,isLoading:!1},f=()=>{N(d)},g=()=>{const e=k[p];e&&e[1]===a&&delete k[p]},E={isValidating:!0};(0,s.o8)(I().data)&&(E.isLoading=!0);try{if(o&&(N(E),t.loadingTimeout&&(0,s.o8)(I().data)&&setTimeout((()=>{i&&c()&&S().onLoadingSlow(p,t)}),t.loadingTimeout),k[p]=[r(w),(0,s.u3)()]),[n,a]=k[p],n=await n,o&&setTimeout(g,t.dedupingInterval),!k[p]||k[p][1]!==a)return o&&c()&&S().onDiscarded(p),!1;d.error=s.i_;const e=_[p];if(!(0,s.o8)(e)&&(a<=e[0]||a<=e[1]||0===e[1]))return f(),o&&c()&&S().onDiscarded(p),!1;const u=I().data;d.data=l(u,n)?u:n,o&&c()&&S().onSuccess(n,p,t)}catch(e){g();const r=S(),{shouldRetryOnError:t}=r;r.isPaused()||(d.error=e,o&&c()&&(r.onError(e,p,r),(!0===t||(0,s.mf)(t)&&t(e))&&(S().revalidateOnFocus&&S().revalidateOnReconnect&&!D()||r.onErrorRetry(e,p,r,(e=>{const r=T[p];r&&r[0]&&r[0](s.sj.ERROR_REVALIDATE_EVENT,e)}),{retryCount:(u.retryCount||0)+1,dedupe:!0}))))}return i=!1,f(),!0}),[p,i]),X=(0,n.useCallback)(((...e)=>(0,s.BN)(i,L.current,...e)),[]);if((0,s.LI)((()=>{C.current=r,O.current=t,(0,s.o8)(U)||(x.current=U)})),(0,s.LI)((()=>{if(!p)return;const e=Q.bind(s.i_,o);let r=0;const t=(0,s.ko)(p,T,((t,n={})=>{if(t==s.sj.FOCUS_EVENT){const t=Date.now();S().revalidateOnFocus&&t>r&&D()&&(r=t+S().focusThrottleInterval,e())}else if(t==s.sj.RECONNECT_EVENT)S().revalidateOnReconnect&&D()&&e();else{if(t==s.sj.MUTATE_EVENT)return Q();if(t==s.sj.ERROR_REVALIDATE_EVENT)return Q(n)}}));return v.current=!1,L.current=p,b.current=!0,N({_k:w}),B&&((0,s.o8)(Y)||s.W6?e():(0,s.kw)(e)),()=>{v.current=!0,t()}}),[p]),(0,s.LI)((()=>{let e;function r(){const r=(0,s.mf)(E)?E(I().data):E;r&&-1!==e&&(e=setTimeout(t,r))}function t(){I().error||!R&&!S().isVisible()||!h&&!S().isOnline()?r():Q(o).then(r)}return r(),()=>{e&&(clearTimeout(e),e=-1)}}),[E,R,h,p]),(0,n.useDebugValue)(z),c&&(0,s.o8)(Y)&&p){if(!s.w6&&s.W6)throw new Error("Fallback data is required when using suspense in SSR.");C.current=r,O.current=t,v.current=!1;const e=m[p];if(!(0,s.o8)(e)){const r=X(e);u(r)}if(!(0,s.o8)($))throw $;{const e=Q(o);(0,s.o8)(z)||(e.status="fulfilled",e.value=!0),u(e)}}return{mutate:X,get data(){return P.data=!0,z},get error(){return P.error=!0,$},get isValidating(){return P.isValidating=!0,H},get isLoading(){return P.isLoading=!0,K}}}))}}]);
1
+ "use strict";(globalThis.webpackChunk_openmrs_esm_framework=globalThis.webpackChunk_openmrs_esm_framework||[]).push([[588],{1588:(e,r,t)=>{t.r(r),t.d(r,{SWRConfig:()=>l,default:()=>c,mutate:()=>s.JG,preload:()=>s.MA,unstable_serialize:()=>i,useSWRConfig:()=>s.kY});var n=t(5776),a=t(6289),s=t(7859);const i=e=>(0,s.qC)(e)[0],u=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((r=>{e.status="fulfilled",e.value=r}),(r=>{e.status="rejected",e.reason=r})),e)}),o={dedupe:!0},l=s.$l.defineProperty(s.J$,"defaultValue",{value:s.u_}),c=(0,s.s6)(((e,r,t)=>{const{cache:i,compare:l,suspense:c,fallbackData:d,revalidateOnMount:f,revalidateIfStale:g,refreshInterval:E,refreshWhenHidden:R,refreshWhenOffline:h,keepPreviousData:V}=t,[T,_,k,m]=s.DY.get(i),[p,w]=(0,s.qC)(e),b=(0,n.useRef)(!1),v=(0,n.useRef)(!1),L=(0,n.useRef)(p),C=(0,n.useRef)(r),O=(0,n.useRef)(t),S=()=>O.current,D=()=>S().isVisible()&&S().isOnline(),[I,N,y,j]=(0,s.JN)(i,p),P=(0,n.useRef)({}).current,A=(0,s.o8)(d)?t.fallback[p]:d,W=(e,r)=>{for(const t in P){const n=t;if("data"===n){if(!l(e[n],r[n])){if(!(0,s.o8)(e[n]))return!1;if(!l(z,r[n]))return!1}}else if(r[n]!==e[n])return!1}return!0},M=(0,n.useMemo)((()=>{const e=!!p&&!!r&&((0,s.o8)(f)?!S().isPaused()&&!c&&(!!(0,s.o8)(g)||g):f),t=r=>{const t=(0,s.PM)(r);return delete t._k,e?{isValidating:!0,isLoading:!0,...t}:t},n=I(),a=j(),i=t(n),u=n===a?i:t(a);let o=i;return[()=>{const e=t(I());return W(e,o)?(o.data=e.data,o.isLoading=e.isLoading,o.isValidating=e.isValidating,o.error=e.error,o):(o=e,e)},()=>u]}),[i,p]),F=(0,a.useSyncExternalStore)((0,n.useCallback)((e=>y(p,((r,t)=>{W(t,r)||e()}))),[i,p]),M[0],M[1]),q=!b.current,J=T[p]&&T[p].length>0,U=F.data,Y=(0,s.o8)(U)?A:U,$=F.error,x=(0,n.useRef)(Y),z=V?(0,s.o8)(U)?x.current:U:Y,B=!(J&&!(0,s.o8)($))&&(q&&!(0,s.o8)(f)?f:!S().isPaused()&&(c?!(0,s.o8)(Y)&&g:(0,s.o8)(Y)||g)),G=!!(p&&r&&q&&B),H=(0,s.o8)(F.isValidating)?G:F.isValidating,K=(0,s.o8)(F.isLoading)?G:F.isLoading,Q=(0,n.useCallback)((async e=>{const r=C.current;if(!p||!r||v.current||S().isPaused())return!1;let n,a,i=!0;const u=e||{},o=!k[p]||!u.dedupe,c=()=>s.w6?!v.current&&p===L.current&&b.current:p===L.current,d={isValidating:!1,isLoading:!1},f=()=>{N(d)},g=()=>{const e=k[p];e&&e[1]===a&&delete k[p]},E={isValidating:!0};(0,s.o8)(I().data)&&(E.isLoading=!0);try{if(o&&(N(E),t.loadingTimeout&&(0,s.o8)(I().data)&&setTimeout((()=>{i&&c()&&S().onLoadingSlow(p,t)}),t.loadingTimeout),k[p]=[r(w),(0,s.u3)()]),[n,a]=k[p],n=await n,o&&setTimeout(g,t.dedupingInterval),!k[p]||k[p][1]!==a)return o&&c()&&S().onDiscarded(p),!1;d.error=s.i_;const e=_[p];if(!(0,s.o8)(e)&&(a<=e[0]||a<=e[1]||0===e[1]))return f(),o&&c()&&S().onDiscarded(p),!1;const u=I().data;d.data=l(u,n)?u:n,o&&c()&&S().onSuccess(n,p,t)}catch(e){g();const r=S(),{shouldRetryOnError:t}=r;r.isPaused()||(d.error=e,o&&c()&&(r.onError(e,p,r),(!0===t||(0,s.mf)(t)&&t(e))&&(S().revalidateOnFocus&&S().revalidateOnReconnect&&!D()||r.onErrorRetry(e,p,r,(e=>{const r=T[p];r&&r[0]&&r[0](s.sj.ERROR_REVALIDATE_EVENT,e)}),{retryCount:(u.retryCount||0)+1,dedupe:!0}))))}return i=!1,f(),!0}),[p,i]),X=(0,n.useCallback)(((...e)=>(0,s.BN)(i,L.current,...e)),[]);if((0,s.LI)((()=>{C.current=r,O.current=t,(0,s.o8)(U)||(x.current=U)})),(0,s.LI)((()=>{if(!p)return;const e=Q.bind(s.i_,o);let r=0;const t=(0,s.ko)(p,T,((t,n={})=>{if(t==s.sj.FOCUS_EVENT){const t=Date.now();S().revalidateOnFocus&&t>r&&D()&&(r=t+S().focusThrottleInterval,e())}else if(t==s.sj.RECONNECT_EVENT)S().revalidateOnReconnect&&D()&&e();else{if(t==s.sj.MUTATE_EVENT)return Q();if(t==s.sj.ERROR_REVALIDATE_EVENT)return Q(n)}}));return v.current=!1,L.current=p,b.current=!0,N({_k:w}),B&&((0,s.o8)(Y)||s.W6?e():(0,s.kw)(e)),()=>{v.current=!0,t()}}),[p]),(0,s.LI)((()=>{let e;function r(){const r=(0,s.mf)(E)?E(I().data):E;r&&-1!==e&&(e=setTimeout(t,r))}function t(){I().error||!R&&!S().isVisible()||!h&&!S().isOnline()?r():Q(o).then(r)}return r(),()=>{e&&(clearTimeout(e),e=-1)}}),[E,R,h,p]),(0,n.useDebugValue)(z),c&&(0,s.o8)(Y)&&p){if(!s.w6&&s.W6)throw new Error("Fallback data is required when using suspense in SSR.");C.current=r,O.current=t,v.current=!1;const e=m[p];if(!(0,s.o8)(e)){const r=X(e);u(r)}if(!(0,s.o8)($))throw $;{const e=Q(o);(0,s.o8)(z)||(e.status="fulfilled",e.value=!0),u(e)}}return{mutate:X,get data(){return P.data=!0,z},get error(){return P.error=!0,$},get isValidating(){return P.isValidating=!0,H},get isLoading(){return P.isLoading=!0,K}}}))}}]);
2
2
  //# sourceMappingURL=588.openmrs-esm-framework.js.map