@openmrs/esm-patient-programs-app 8.0.2-pre.5004 → 8.0.2-pre.5019

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
- var _openmrs_esm_patient_programs_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,p,f,d,h,m,c={1342:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(255),t.e(731),t.e(268),t.e(325),t.e(868),t.e(461)]).then((()=>()=>t(7461)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},v={};function g(e){var r=v[e];if(void 0!==r)return r.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return c[e].call(t.exports,t,t.exports,g),t.loaded=!0,t.exports}g.m=c,g.c=v,g.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return g.d(r,{a:r}),r},g.d=(e,r)=>{for(var t in r)g.o(r,t)&&!g.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},g.f={},g.e=e=>Promise.all(Object.keys(g.f).reduce(((r,t)=>(g.f[t](e,r),r)),[])),g.u=e=>e+".js",g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),g.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-patient-programs-app:",g.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+o){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,g.nc&&i.setAttribute("nonce",g.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),l&&document.head.appendChild(i)}},g.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},g.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{g.S={};var e={},r={};g.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];g.o(g.S,t)||(g.S[t]={});var a=g.S[t],i="@openmrs/esm-patient-programs-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},l=o[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(o[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","5.6.1-pre.2058",(()=>Promise.all([g.e(130),g.e(268)]).then((()=>()=>g(130))))),l("@openmrs/esm-patient-common-lib","8.0.2-pre.5004",(()=>Promise.all([g.e(255),g.e(731),g.e(268),g.e(325),g.e(793),g.e(868)]).then((()=>()=>g(4793))))),l("dayjs","1.11.11",(()=>g.e(879).then((()=>()=>g(8879))))),l("react-i18next","11.18.6",(()=>Promise.all([g.e(443),g.e(268)]).then((()=>()=>g(443))))),l("react-router-dom","6.16.0",(()=>Promise.all([g.e(591),g.e(268)]).then((()=>()=>g(6591))))),l("react","18.3.1",(()=>g.e(784).then((()=>()=>g(2784))))),l("swr/_internal","2.2.4",(()=>Promise.all([g.e(729),g.e(268)]).then((()=>()=>g(4729))))),l("swr/immutable","2.2.4",(()=>Promise.all([g.e(255),g.e(268),g.e(325),g.e(303)]).then((()=>()=>g(2303)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;g.g.importScripts&&(e=g.g.location+"");var r=g.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&!e;)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),g.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=e[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[n],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}},o=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,a=1;a<e.length;a++)n--,t+="u"==(typeof(l=e[a]))[0]?"-":(n>0?".":"")+(n=2,l);return t}var i=[];for(a=1;a<e.length;a++){var l=e[a];i.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?i.pop()+" "+i.pop():o(l))}return s();function s(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,l=1,s=!0;;l++,i++){var u,p,f=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(p=(typeof(u=r[i]))[0]))return!s||("u"==f?l>n&&!o:""==f!=o);if("u"==p){if(!s||"u"!=f)return!1}else if(s)if(f==p)if(l<=n){if(u!=e[l])return!1}else{if(o?u>e[l]:u<e[l])return!1;u!=e[l]&&(s=!1)}else if("s"!=f&&"n"!=f){if(o||l<=n)return!1;s=!1,l--}else{if(l<=n||p<f!=o)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,l--)}}var d=[],h=d.pop.bind(d);for(i=1;i<e.length;i++){var m=e[i];d.push(1==m?h()|h():2==m?h()&h():m?a(m,r):!h())}return!!h()},i=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&n(e,r)?r:e),0)},l=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",s=(e,r,t,n)=>{var o=i(e,t);return a(n,o)||u(l(e,t,o,n)),p(e[t][o])},u=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},p=e=>(e.loaded=1,e.get()),f=(e=>function(r,t,n,o){var a=g.I(r);return a&&a.then?a.then(e.bind(e,r,g.S[r],t,n,o)):e(0,g.S[r],t,n,o)})(((e,r,t,n,o)=>r&&g.o(r,t)?s(r,0,t,n):o())),d={},h={268:()=>f("default","react",[1,18],(()=>g.e(784).then((()=>()=>g(2784))))),3325:()=>f("default","swr/_internal",[1,2],(()=>g.e(729).then((()=>()=>g(4729))))),8744:()=>f("default","react-router-dom",[1,6],(()=>g.e(591).then((()=>()=>g(6591))))),9198:()=>f("default","swr/immutable",[1,2],(()=>g.e(152).then((()=>()=>g(2303))))),884:()=>f("default","@openmrs/esm-patient-common-lib",[1,8],(()=>g.e(793).then((()=>()=>g(4793))))),2870:()=>f("default","@openmrs/esm-framework",[1,5],(()=>g.e(130).then((()=>()=>g(130))))),4924:()=>f("default","react-i18next",[1,11],(()=>g.e(443).then((()=>()=>g(443))))),3565:()=>f("default","dayjs",[1,1],(()=>g.e(879).then((()=>()=>g(8879)))))},m={234:[3565],268:[268],325:[3325],793:[8744,9198],868:[884,2870,4924]},g.f.consumes=(e,r)=>{g.o(m,e)&&m[e].forEach((e=>{if(g.o(d,e))return r.push(d[e]);var t=r=>{d[e]=0,g.m[e]=t=>{delete g.c[e],t.exports=r()}},n=r=>{delete d[e],g.m[e]=t=>{throw delete g.c[e],r}};try{var o=h[e]();o.then?r.push(d[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}))},(()=>{var e={55:0};g.f.j=(r,t)=>{var n=g.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^([28]68|325)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=g.p+g.u(r),i=new Error;g.l(a,(t=>{if(g.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,l]=t,s=0;if(a.some((r=>0!==e[r]))){for(n in i)g.o(i,n)&&(g.m[n]=i[n]);l&&l(g)}for(r&&r(t);s<a.length;s++)o=a[s],g.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_patient_programs_app=globalThis.webpackChunk_openmrs_esm_patient_programs_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),g.nc=void 0;var b=g(1342);_openmrs_esm_patient_programs_app=b})();
1
+ var _openmrs_esm_patient_programs_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,p,f,d,h,m,c={1342:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(255),t.e(731),t.e(268),t.e(325),t.e(868),t.e(461)]).then((()=>()=>t(7461)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},v={};function g(e){var r=v[e];if(void 0!==r)return r.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return c[e].call(t.exports,t,t.exports,g),t.loaded=!0,t.exports}g.m=c,g.c=v,g.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return g.d(r,{a:r}),r},g.d=(e,r)=>{for(var t in r)g.o(r,t)&&!g.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},g.f={},g.e=e=>Promise.all(Object.keys(g.f).reduce(((r,t)=>(g.f[t](e,r),r)),[])),g.u=e=>e+".js",g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),g.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-patient-programs-app:",g.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+o){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,g.nc&&i.setAttribute("nonce",g.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),l&&document.head.appendChild(i)}},g.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},g.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{g.S={};var e={},r={};g.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];g.o(g.S,t)||(g.S[t]={});var a=g.S[t],i="@openmrs/esm-patient-programs-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},l=o[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(o[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","5.6.1-pre.2058",(()=>Promise.all([g.e(130),g.e(268)]).then((()=>()=>g(130))))),l("@openmrs/esm-patient-common-lib","8.0.2-pre.5019",(()=>Promise.all([g.e(255),g.e(731),g.e(268),g.e(325),g.e(793),g.e(868)]).then((()=>()=>g(4793))))),l("dayjs","1.11.11",(()=>g.e(879).then((()=>()=>g(8879))))),l("react-i18next","11.18.6",(()=>Promise.all([g.e(443),g.e(268)]).then((()=>()=>g(443))))),l("react-router-dom","6.16.0",(()=>Promise.all([g.e(591),g.e(268)]).then((()=>()=>g(6591))))),l("react","18.3.1",(()=>g.e(784).then((()=>()=>g(2784))))),l("swr/_internal","2.2.4",(()=>Promise.all([g.e(729),g.e(268)]).then((()=>()=>g(4729))))),l("swr/immutable","2.2.4",(()=>Promise.all([g.e(255),g.e(268),g.e(325),g.e(303)]).then((()=>()=>g(2303)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;g.g.importScripts&&(e=g.g.location+"");var r=g.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&!e;)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),g.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=e[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[n],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}},o=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,a=1;a<e.length;a++)n--,t+="u"==(typeof(l=e[a]))[0]?"-":(n>0?".":"")+(n=2,l);return t}var i=[];for(a=1;a<e.length;a++){var l=e[a];i.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?i.pop()+" "+i.pop():o(l))}return s();function s(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,l=1,s=!0;;l++,i++){var u,p,f=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(p=(typeof(u=r[i]))[0]))return!s||("u"==f?l>n&&!o:""==f!=o);if("u"==p){if(!s||"u"!=f)return!1}else if(s)if(f==p)if(l<=n){if(u!=e[l])return!1}else{if(o?u>e[l]:u<e[l])return!1;u!=e[l]&&(s=!1)}else if("s"!=f&&"n"!=f){if(o||l<=n)return!1;s=!1,l--}else{if(l<=n||p<f!=o)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,l--)}}var d=[],h=d.pop.bind(d);for(i=1;i<e.length;i++){var m=e[i];d.push(1==m?h()|h():2==m?h()&h():m?a(m,r):!h())}return!!h()},i=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&n(e,r)?r:e),0)},l=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",s=(e,r,t,n)=>{var o=i(e,t);return a(n,o)||u(l(e,t,o,n)),p(e[t][o])},u=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},p=e=>(e.loaded=1,e.get()),f=(e=>function(r,t,n,o){var a=g.I(r);return a&&a.then?a.then(e.bind(e,r,g.S[r],t,n,o)):e(0,g.S[r],t,n,o)})(((e,r,t,n,o)=>r&&g.o(r,t)?s(r,0,t,n):o())),d={},h={268:()=>f("default","react",[1,18],(()=>g.e(784).then((()=>()=>g(2784))))),3325:()=>f("default","swr/_internal",[1,2],(()=>g.e(729).then((()=>()=>g(4729))))),8744:()=>f("default","react-router-dom",[1,6],(()=>g.e(591).then((()=>()=>g(6591))))),9198:()=>f("default","swr/immutable",[1,2],(()=>g.e(152).then((()=>()=>g(2303))))),884:()=>f("default","@openmrs/esm-patient-common-lib",[1,8],(()=>g.e(793).then((()=>()=>g(4793))))),2870:()=>f("default","@openmrs/esm-framework",[1,5],(()=>g.e(130).then((()=>()=>g(130))))),4924:()=>f("default","react-i18next",[1,11],(()=>g.e(443).then((()=>()=>g(443))))),3565:()=>f("default","dayjs",[1,1],(()=>g.e(879).then((()=>()=>g(8879)))))},m={234:[3565],268:[268],325:[3325],793:[8744,9198],868:[884,2870,4924]},g.f.consumes=(e,r)=>{g.o(m,e)&&m[e].forEach((e=>{if(g.o(d,e))return r.push(d[e]);var t=r=>{d[e]=0,g.m[e]=t=>{delete g.c[e],t.exports=r()}},n=r=>{delete d[e],g.m[e]=t=>{throw delete g.c[e],r}};try{var o=h[e]();o.then?r.push(d[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}))},(()=>{var e={55:0};g.f.j=(r,t)=>{var n=g.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^([28]68|325)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=g.p+g.u(r),i=new Error;g.l(a,(t=>{if(g.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,l]=t,s=0;if(a.some((r=>0!==e[r]))){for(n in i)g.o(i,n)&&(g.m[n]=i[n]);l&&l(g)}for(r&&r(t);s<a.length;s++)o=a[s],g.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_patient_programs_app=globalThis.webpackChunk_openmrs_esm_patient_programs_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),g.nc=void 0;var b=g(1342);_openmrs_esm_patient_programs_app=b})();
@@ -24,7 +24,7 @@
24
24
  "auxiliaryFiles": [
25
25
  "openmrs-esm-patient-programs-app.js.map"
26
26
  ],
27
- "hash": "afb742f250246089",
27
+ "hash": "e00592f49b6529ea",
28
28
  "childrenByOrder": {}
29
29
  },
30
30
  {
@@ -83,10 +83,10 @@
83
83
  "initial": true,
84
84
  "entry": true,
85
85
  "recorded": false,
86
- "size": 2208398,
86
+ "size": 2208445,
87
87
  "sizes": {
88
88
  "consume-shared": 210,
89
- "javascript": 2186555,
89
+ "javascript": 2186602,
90
90
  "share-init": 336,
91
91
  "runtime": 21297
92
92
  },
@@ -103,7 +103,7 @@
103
103
  "auxiliaryFiles": [
104
104
  "main.js.map"
105
105
  ],
106
- "hash": "783591f37eea4558",
106
+ "hash": "1612917b44f30a3f",
107
107
  "childrenByOrder": {}
108
108
  },
109
109
  {
@@ -111,9 +111,9 @@
111
111
  "initial": false,
112
112
  "entry": false,
113
113
  "recorded": false,
114
- "size": 27620,
114
+ "size": 27737,
115
115
  "sizes": {
116
- "javascript": 27578,
116
+ "javascript": 27695,
117
117
  "consume-shared": 42
118
118
  },
119
119
  "names": [],
@@ -128,7 +128,7 @@
128
128
  "auxiliaryFiles": [
129
129
  "234.js.map"
130
130
  ],
131
- "hash": "bdb1fb64931f6ad0",
131
+ "hash": "3a8fc7c7dace6b82",
132
132
  "childrenByOrder": {}
133
133
  },
134
134
  {
@@ -322,9 +322,9 @@
322
322
  "initial": false,
323
323
  "entry": false,
324
324
  "recorded": false,
325
- "size": 46393,
325
+ "size": 46440,
326
326
  "sizes": {
327
- "javascript": 46393
327
+ "javascript": 46440
328
328
  },
329
329
  "names": [],
330
330
  "idHints": [],
@@ -337,7 +337,7 @@
337
337
  "auxiliaryFiles": [
338
338
  "461.js.map"
339
339
  ],
340
- "hash": "0e0267bb77e8ed7d",
340
+ "hash": "1497fa3b78ac2aff",
341
341
  "childrenByOrder": {}
342
342
  },
343
343
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"programs-overview-widget","component":"programsOverview","meta":{"columnSpan":4},"order":6},{"name":"programs-details-widget","slot":"patient-chart-programs-dashboard-slot","component":"programsDetailedSummary","meta":{"columnSpan":1},"order":6},{"name":"programs-summary-dashboard","slot":"patient-chart-dashboard-slot","component":"programsDashboardLink","meta":{"slot":"patient-chart-programs-dashboard-slot","columns":1,"path":"Programs"},"order":10}],"pages":[],"workspaces":[{"name":"programs-form-workspace","title":"programEnrollmentWorkspaceTitle","component":"programsFormWorkspace"}],"version":"8.0.2-pre.5004"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"programs-overview-widget","component":"programsOverview","meta":{"columnSpan":4},"order":6},{"name":"programs-details-widget","slot":"patient-chart-programs-dashboard-slot","component":"programsDetailedSummary","meta":{"columnSpan":1},"order":6},{"name":"programs-summary-dashboard","slot":"patient-chart-dashboard-slot","component":"programsDashboardLink","meta":{"slot":"patient-chart-programs-dashboard-slot","columns":1,"path":"Programs"},"order":10}],"pages":[],"workspaces":[{"name":"programs-form-workspace","title":"programEnrollmentWorkspaceTitle","component":"programsFormWorkspace"}],"version":"8.0.2-pre.5019"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-patient-programs-app",
3
- "version": "8.0.2-pre.5004",
3
+ "version": "8.0.2-pre.5019",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Patient programs microfrontend for the OpenMRS SPA",
6
6
  "browser": "dist/openmrs-esm-patient-programs-app.js",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@carbon/react": "^1.12.0",
41
- "@openmrs/esm-patient-common-lib": "^8.0.2-pre.5004",
41
+ "@openmrs/esm-patient-common-lib": "^8.0.2-pre.5019",
42
42
  "lodash-es": "^4.17.21"
43
43
  },
44
44
  "peerDependencies": {
@@ -52,7 +52,7 @@
52
52
  "swr": "2.x"
53
53
  },
54
54
  "devDependencies": {
55
- "@openmrs/esm-patient-common-lib": "8.0.2-pre.5004",
55
+ "@openmrs/esm-patient-common-lib": "8.0.2-pre.5019",
56
56
  "webpack": "^5.88.2"
57
57
  },
58
58
  "stableVersion": "8.0.1"
@@ -8,6 +8,5 @@ export const configSchema = {
8
8
  };
9
9
 
10
10
  export interface ConfigObject {
11
- customUrl: string;
12
11
  hideAddProgramButton: boolean;
13
12
  }
@@ -105,6 +105,7 @@ const ProgramsDetailedSummary: React.FC<ProgramsDetailedSummaryProps> = ({ patie
105
105
  <span>{isValidating ? <InlineLoading /> : null}</span>
106
106
  {hideAddProgramButton ? null : (
107
107
  <Button
108
+ disabled={isEnrolledInAllPrograms}
108
109
  kind="ghost"
109
110
  renderIcon={(props) => <Add size={16} {...props} />}
110
111
  iconDescription={t('addPrograms', 'Add programs')}
@@ -1,4 +1,4 @@
1
- @import '@openmrs/esm-styleguide/src/vars';
1
+ @use '@openmrs/esm-styleguide/src/vars' as *;
2
2
 
3
3
  .widgetCard {
4
4
  border: 1px solid $ui-03;
@@ -88,6 +88,7 @@ describe('ProgramsDetailedSummary', () => {
88
88
  expect(editButton).toBeInTheDocument();
89
89
 
90
90
  // Clicking "Add" launches the programs form in a workspace
91
+ expect(addButton).toBeEnabled();
91
92
  await user.click(addButton);
92
93
 
93
94
  expect(launchPatientWorkspace).toHaveBeenCalledWith('programs-form-workspace');
@@ -111,6 +112,7 @@ describe('ProgramsDetailedSummary', () => {
111
112
  expect(screen.getByRole('row', { name: /hiv care and treatment/i })).toBeInTheDocument();
112
113
  expect(screen.getByRole('row', { name: /hiv differentiated care/i })).toBeInTheDocument();
113
114
  expect(screen.getByRole('row', { name: /oncology screening and diagnosis/i })).toBeInTheDocument();
115
+ expect(screen.getByRole('button', { name: /add/i })).toBeDisabled();
114
116
  expect(screen.getByText(/enrolled in all programs/i)).toBeInTheDocument();
115
117
  expect(screen.getByText(/there are no more programs left to enroll this patient in/i)).toBeInTheDocument();
116
118
  });
@@ -1,6 +1,6 @@
1
- @use '@carbon/styles/scss/type';
2
- @use '@carbon/styles/scss/spacing';
3
- @import '@openmrs/esm-styleguide/src/vars';
1
+ @use '@carbon/type';
2
+ @use '@carbon/layout';
3
+ @use '@openmrs/esm-styleguide/src/vars' as *;
4
4
 
5
5
  .loading {
6
6
  margin-left: 1rem;
@@ -42,6 +42,12 @@
42
42
 
43
43
  .errorMessage {
44
44
  @include type.type-style("label-02");
45
- margin-top: spacing.$spacing-03;
45
+ margin-top: layout.$spacing-03;
46
46
  color: $danger;
47
47
  }
48
+
49
+ .notification {
50
+ margin: 0;
51
+ min-width: 100%;
52
+ padding: 0;
53
+ }
@@ -1,9 +1,6 @@
1
1
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
2
  import { type TFunction, useTranslation } from 'react-i18next';
3
3
  import dayjs from 'dayjs';
4
- import filter from 'lodash-es/filter';
5
- import includes from 'lodash-es/includes';
6
- import map from 'lodash-es/map';
7
4
  import {
8
5
  Button,
9
6
  ButtonSet,
@@ -72,7 +69,10 @@ const ProgramsForm: React.FC<ProgramsFormProps> = ({
72
69
 
73
70
  const eligiblePrograms = currentProgram
74
71
  ? [currentProgram]
75
- : filter(availablePrograms, (program) => !includes(map(enrollments, 'program.uuid'), program.uuid));
72
+ : availablePrograms.filter((program) => {
73
+ const enrollment = enrollments.find((e) => e.program.uuid === program.uuid);
74
+ return !enrollment || enrollment.dateCompleted !== null;
75
+ });
76
76
 
77
77
  const getLocationUuid = () => {
78
78
  if (!currentEnrollment?.location.uuid && session?.sessionLocation?.uuid) {
@@ -243,7 +243,7 @@ const ProgramsForm: React.FC<ProgramsFormProps> = ({
243
243
 
244
244
  const formGroups = [
245
245
  {
246
- style: { maxWidth: isTablet ? '50%' : 'fit-content' },
246
+ style: { maxWidth: isTablet && '50%' },
247
247
  legendText: '',
248
248
  value: programSelect,
249
249
  },
@@ -267,10 +267,10 @@ const ProgramsForm: React.FC<ProgramsFormProps> = ({
267
267
  return (
268
268
  <Form className={styles.form} onSubmit={handleSubmit(onSubmit)}>
269
269
  <Stack className={styles.formContainer} gap={7}>
270
- {!eligiblePrograms.length && (
270
+ {!availablePrograms.length && (
271
271
  <InlineNotification
272
- style={{ minWidth: '100%', margin: '0rem', padding: '0rem' }}
273
- kind={'error'}
272
+ className={styles.notification}
273
+ kind="error"
274
274
  lowContrast
275
275
  subtitle={t('configurePrograms', 'Please configure programs to continue.')}
276
276
  title={t('noProgramsConfigured', 'No programs configured')}
@@ -1,4 +1,4 @@
1
- @import '@openmrs/esm-styleguide/src/vars';
1
+ @use '@openmrs/esm-styleguide/src/vars' as *;
2
2
 
3
3
  .widgetCard {
4
4
  border: 1px solid $ui-03;
@@ -3,8 +3,7 @@ import { screen } from '@testing-library/react';
3
3
  import userEvent from '@testing-library/user-event';
4
4
  import { openmrsFetch } from '@openmrs/esm-framework';
5
5
  import { launchPatientWorkspace } from '@openmrs/esm-patient-common-lib';
6
- import { mockEnrolledProgramsResponse } from '__mocks__';
7
-
6
+ import { mockCareProgramsResponse, mockEnrolledInAllProgramsResponse, mockEnrolledProgramsResponse } from '__mocks__';
8
7
  import { mockPatient, renderWithSwr, waitForLoadingToFinish } from 'tools';
9
8
  import ProgramsOverview from './programs-overview.component';
10
9
 
@@ -81,10 +80,27 @@ describe('ProgramsOverview', () => {
81
80
  expect(screen.getByRole('row', { name: /HIV Care and Treatment/i })).toBeInTheDocument();
82
81
 
83
82
  // Clicking "Add" launches the programs form in a workspace
83
+ expect(addButton).toBeEnabled();
84
84
  await user.click(addButton);
85
85
 
86
86
  expect(launchPatientWorkspace).toHaveBeenCalledWith('programs-form-workspace');
87
87
  });
88
+
89
+ it('renders a notification when the patient is enrolled in all available programs', async () => {
90
+ mockOpenmrsFetch.mockReturnValueOnce({ data: { results: mockEnrolledInAllProgramsResponse } });
91
+ mockOpenmrsFetch.mockReturnValueOnce({ data: { results: mockCareProgramsResponse } });
92
+
93
+ renderProgramsOverview();
94
+
95
+ await waitForLoadingToFinish();
96
+
97
+ expect(screen.getByRole('row', { name: /hiv care and treatment/i })).toBeInTheDocument();
98
+ expect(screen.getByRole('row', { name: /hiv differentiated care/i })).toBeInTheDocument();
99
+ expect(screen.getByRole('row', { name: /oncology screening and diagnosis/i })).toBeInTheDocument();
100
+ expect(screen.getByRole('button', { name: /add/i })).toBeDisabled();
101
+ expect(screen.getByText(/enrolled in all programs/i)).toBeInTheDocument();
102
+ expect(screen.getByText(/there are no more programs left to enroll this patient in/i)).toBeInTheDocument();
103
+ });
88
104
  });
89
105
 
90
106
  function renderProgramsOverview() {