@openmrs/esm-patient-chart-app 11.3.1-pre.9645 → 11.3.1-pre.9651

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_chart_app;(()=>{"use strict";var e,r,t,n,a,o,i,l,s,u,p,f,c,h,d,m,v,g,b,y,w,_={20131:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(2017),t.e(1343),t.e(5434),t.e(9533),t.e(2540)]).then((()=>()=>t(52540)))},a=(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),o=(e,r)=>{if(t.S){var n="default",a=t.S[n];if(a&&a!==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:()=>a,init:()=>o})}},P={};function j(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,exports:{}};return _[e].call(t.exports,t,t.exports,j),t.exports}j.m=_,j.c=P,j.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return j.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,j.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var a=Object.create(null);j.r(a);var o={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((e=>o[e]=()=>t[e]));return o.default=()=>t,j.d(a,o),a},j.d=(e,r)=>{for(var t in r)j.o(r,t)&&!j.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},j.f={},j.e=e=>Promise.all(Object.keys(j.f).reduce(((r,t)=>(j.f[t](e,r),r)),[])),j.u=e=>e+".js",j.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),j.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@openmrs/esm-patient-chart-app:",j.l=(e,r,a,o)=>{if(t[e])t[e].push(r);else{var i,l;if(void 0!==a)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==n+a){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,j.nc&&i.setAttribute("nonce",j.nc),i.setAttribute("data-webpack",n+a),i.src=e),t[e]=[r];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(c);var a=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((e=>e(n))),r)return r(n)},c=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)}},j.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{j.S={};var e={},r={};j.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];j.o(j.S,t)||(j.S[t]={});var o=j.S[t],i="@openmrs/esm-patient-chart-app",l=(e,r,t,n)=>{var a=o[e]=o[e]||{},l=a[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(a[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@carbon/react","1.92.1",(()=>Promise.all([j.e(68),j.e(9007),j.e(4632),j.e(7816),j.e(1343),j.e(3373)]).then((()=>()=>j(67816))))),l("@openmrs/esm-framework","8.0.1-pre.3614",(()=>Promise.all([j.e(68),j.e(5992),j.e(517),j.e(5670),j.e(1343),j.e(8010),j.e(3808),j.e(5434),j.e(9533),j.e(868)]).then((()=>()=>j(55670))))),l("@openmrs/esm-patient-common-lib","11.3.1-pre.9645",(()=>Promise.all([j.e(68),j.e(5992),j.e(517),j.e(1343),j.e(8010),j.e(3808),j.e(5434),j.e(3697),j.e(9533),j.e(8487)]).then((()=>()=>j(43697))))),l("dayjs","1.11.13",(()=>j.e(3464).then((()=>()=>j(23464))))),l("lodash-es","4.17.21",(()=>Promise.all([j.e(5992),j.e(2687)]).then((()=>()=>j(42687))))),l("react-i18next","16.0.0",(()=>Promise.all([j.e(6336),j.e(1343)]).then((()=>()=>j(16336))))),l("react-router-dom","6.16.0",(()=>Promise.all([j.e(2913),j.e(1343)]).then((()=>()=>j(52913))))),l("react","18.3.1",(()=>j.e(4041).then((()=>()=>j(14041))))),l("rxjs","6.6.7",(()=>j.e(2457).then((()=>()=>j(82457))))),l("single-spa-react","6.0.2",(()=>j.e(1469).then((()=>()=>j(61469))))),l("single-spa","6.0.3",(()=>j.e(2244).then((()=>()=>j(22244))))),l("swr/_internal","2.2.5",(()=>Promise.all([j.e(2372),j.e(1343)]).then((()=>()=>j(42372))))),l("swr/immutable","2.2.5",(()=>Promise.all([j.e(1343),j.e(5434),j.e(7495)]).then((()=>()=>j(29876))))),l("swr/infinite","2.2.5",(()=>Promise.all([j.e(1343),j.e(5434),j.e(89)]).then((()=>()=>j(52470)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;j.g.importScripts&&(e=j.g.location+"");var r=j.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),j.p=e})(),a=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},o=(e,r)=>{e=a(e),r=a(r);for(var t=0;;){if(t>=e.length)return t<r.length&&"u"!=(typeof r[t])[0];var n=e[t],o=(typeof n)[0];if(t>=r.length)return"u"==o;var i=r[t],l=(typeof i)[0];if(o!=l)return"o"==o&&"n"==l||"s"==l||"u"==o;if("o"!=o&&"u"!=o&&n!=i)return n<i;t++}},i=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 o=[];for(a=1;a<e.length;a++){var l=e[a];o.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?o.pop()+" "+o.pop():i(l))}return s();function s(){return o.pop().replace(/^\((.+)\)$/,"$1")}},l=(e,r)=>{if(0 in e){r=a(r);var t=e[0],n=t<0;n&&(t=-t-1);for(var o=0,i=1,s=!0;;i++,o++){var u,p,f=i<e.length?(typeof e[i])[0]:"";if(o>=r.length||"o"==(p=(typeof(u=r[o]))[0]))return!s||("u"==f?i>t&&!n:""==f!=n);if("u"==p){if(!s||"u"!=f)return!1}else if(s)if(f==p)if(i<=t){if(u!=e[i])return!1}else{if(n?u>e[i]:u<e[i])return!1;u!=e[i]&&(s=!1)}else if("s"!=f&&"n"!=f){if(n||i<=t)return!1;s=!1,i--}else{if(i<=t||p<f!=n)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,i--)}}var c=[],h=c.pop.bind(c);for(o=1;o<e.length;o++){var d=e[o];c.push(1==d?h()|h():2==d?h()&h():d?l(d,r):!h())}return!!h()},s=(e,r)=>e&&j.o(e,r),u=e=>(e.loaded=1,e.get()),p=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),f=(e,r,t)=>{var n=t?p(e[r]):e[r];return Object.keys(n).reduce(((e,r)=>!e||!n[e].loaded&&o(e,r)?r:e),0)},c=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+i(n)+")",h=e=>{throw new Error(e)},d=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},m=(e,r,t)=>t?t():((e,r)=>h("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),v=(e=>function(r,t,n,a,o){var i=j.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,j.S[r],t,!1,a,o)):e(r,j.S[r],t,n,a,o)})(((e,r,t,n,a,o)=>{if(!s(r,t))return m(e,t,o);var i=f(r,t,n);return l(a,i)||d(c(r,t,i,a)),u(r[t][i])})),g={},b={1343:()=>v("default","react",!1,[1,18],(()=>j.e(4041).then((()=>()=>j(14041))))),88010:()=>v("default","swr/immutable",!1,[1,2],(()=>j.e(9876).then((()=>()=>j(29876))))),8125:()=>v("default","single-spa-react",!1,[1,6],(()=>j.e(1469).then((()=>()=>j(61469))))),24818:()=>v("default","rxjs",!1,[1,6],(()=>j.e(2457).then((()=>()=>j(82457))))),74730:()=>v("default","single-spa",!1,[1,6],(()=>j.e(2244).then((()=>()=>j(22244))))),98394:()=>v("default","swr/infinite",!1,[1,2],(()=>j.e(2470).then((()=>()=>j(52470))))),55434:()=>v("default","swr/_internal",!1,[1,2],(()=>j.e(2372).then((()=>()=>j(42372))))),8877:()=>v("default","react-router-dom",!1,[1,6],(()=>j.e(2913).then((()=>()=>j(52913))))),14497:()=>v("default","lodash-es",!1,[1,4],(()=>Promise.all([j.e(5992),j.e(2687)]).then((()=>()=>j(42687))))),46372:()=>v("default","dayjs",!1,[1,1],(()=>j.e(3464).then((()=>()=>j(23464))))),72339:()=>v("default","react-i18next",!1,[1,16],(()=>j.e(6336).then((()=>()=>j(16336))))),75198:()=>v("default","@carbon/react",!1,[1,1],(()=>Promise.all([j.e(68),j.e(9007),j.e(4632),j.e(7816)]).then((()=>()=>j(67816))))),54440:()=>v("default","@openmrs/esm-framework",!1,[1,8],(()=>Promise.all([j.e(68),j.e(5992),j.e(517),j.e(5670),j.e(8010),j.e(3808)]).then((()=>()=>j(55670))))),63276:()=>v("default","@openmrs/esm-patient-common-lib",!1,[0],(()=>Promise.all([j.e(68),j.e(5992),j.e(517),j.e(8010),j.e(3808),j.e(3697)]).then((()=>()=>j(43697)))))},y={868:[54440],1343:[1343],2540:[54440,63276],3808:[8125,24818,74730,98394],5434:[55434],8010:[88010],8487:[54440],9533:[8877,14497,46372,72339,75198]},w={},j.f.consumes=(e,r)=>{j.o(y,e)&&y[e].forEach((e=>{if(j.o(g,e))return r.push(g[e]);if(!w[e]){var t=r=>{g[e]=0,j.m[e]=t=>{delete j.c[e],t.exports=r()}};w[e]=!0;var n=r=>{delete g[e],j.m[e]=t=>{throw delete j.c[e],r}};try{var a=b[e]();a.then?r.push(g[e]=a.then(t).catch(n)):t(a)}catch(e){n(e)}}}))},(()=>{var e={9426:0};j.f.j=(r,t)=>{var n=j.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(1343|3808|5434|8010|9533)$/.test(r))e[r]=0;else{var a=new Promise(((t,a)=>n=e[r]=[t,a]));t.push(n[2]=a);var o=j.p+j.u(r),i=new Error;j.l(o,(t=>{if(j.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var a=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,a,[o,i,l]=t,s=0;if(o.some((r=>0!==e[r]))){for(n in i)j.o(i,n)&&(j.m[n]=i[n]);l&&l(j)}for(r&&r(t);s<o.length;s++)a=o[s],j.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=globalThis.webpackChunk_openmrs_esm_patient_chart_app=globalThis.webpackChunk_openmrs_esm_patient_chart_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),j.nc=void 0;var S=j(20131);_openmrs_esm_patient_chart_app=S})();
1
+ var _openmrs_esm_patient_chart_app;(()=>{"use strict";var e,r,t,n,a,o,i,l,s,u,p,f,c,h,d,m,v,g,b,y,w,_={20131:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(2017),t.e(1343),t.e(5434),t.e(9533),t.e(2540)]).then((()=>()=>t(52540)))},a=(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),o=(e,r)=>{if(t.S){var n="default",a=t.S[n];if(a&&a!==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:()=>a,init:()=>o})}},P={};function j(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,exports:{}};return _[e].call(t.exports,t,t.exports,j),t.exports}j.m=_,j.c=P,j.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return j.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,j.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var a=Object.create(null);j.r(a);var o={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((e=>o[e]=()=>t[e]));return o.default=()=>t,j.d(a,o),a},j.d=(e,r)=>{for(var t in r)j.o(r,t)&&!j.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},j.f={},j.e=e=>Promise.all(Object.keys(j.f).reduce(((r,t)=>(j.f[t](e,r),r)),[])),j.u=e=>e+".js",j.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),j.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@openmrs/esm-patient-chart-app:",j.l=(e,r,a,o)=>{if(t[e])t[e].push(r);else{var i,l;if(void 0!==a)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==n+a){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,j.nc&&i.setAttribute("nonce",j.nc),i.setAttribute("data-webpack",n+a),i.src=e),t[e]=[r];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(c);var a=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((e=>e(n))),r)return r(n)},c=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)}},j.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{j.S={};var e={},r={};j.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];j.o(j.S,t)||(j.S[t]={});var o=j.S[t],i="@openmrs/esm-patient-chart-app",l=(e,r,t,n)=>{var a=o[e]=o[e]||{},l=a[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(a[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@carbon/react","1.92.1",(()=>Promise.all([j.e(68),j.e(9007),j.e(4632),j.e(7816),j.e(1343),j.e(3373)]).then((()=>()=>j(67816))))),l("@openmrs/esm-framework","8.0.1-pre.3614",(()=>Promise.all([j.e(68),j.e(5992),j.e(517),j.e(5670),j.e(1343),j.e(8010),j.e(3808),j.e(5434),j.e(9533),j.e(868)]).then((()=>()=>j(55670))))),l("@openmrs/esm-patient-common-lib","11.3.1-pre.9651",(()=>Promise.all([j.e(68),j.e(5992),j.e(517),j.e(1343),j.e(8010),j.e(3808),j.e(5434),j.e(3697),j.e(9533),j.e(8487)]).then((()=>()=>j(43697))))),l("dayjs","1.11.13",(()=>j.e(3464).then((()=>()=>j(23464))))),l("lodash-es","4.17.21",(()=>Promise.all([j.e(5992),j.e(2687)]).then((()=>()=>j(42687))))),l("react-i18next","16.0.0",(()=>Promise.all([j.e(6336),j.e(1343)]).then((()=>()=>j(16336))))),l("react-router-dom","6.16.0",(()=>Promise.all([j.e(2913),j.e(1343)]).then((()=>()=>j(52913))))),l("react","18.3.1",(()=>j.e(4041).then((()=>()=>j(14041))))),l("rxjs","6.6.7",(()=>j.e(2457).then((()=>()=>j(82457))))),l("single-spa-react","6.0.2",(()=>j.e(1469).then((()=>()=>j(61469))))),l("single-spa","6.0.3",(()=>j.e(2244).then((()=>()=>j(22244))))),l("swr/_internal","2.2.5",(()=>Promise.all([j.e(2372),j.e(1343)]).then((()=>()=>j(42372))))),l("swr/immutable","2.2.5",(()=>Promise.all([j.e(1343),j.e(5434),j.e(7495)]).then((()=>()=>j(29876))))),l("swr/infinite","2.2.5",(()=>Promise.all([j.e(1343),j.e(5434),j.e(89)]).then((()=>()=>j(52470)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;j.g.importScripts&&(e=j.g.location+"");var r=j.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),j.p=e})(),a=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},o=(e,r)=>{e=a(e),r=a(r);for(var t=0;;){if(t>=e.length)return t<r.length&&"u"!=(typeof r[t])[0];var n=e[t],o=(typeof n)[0];if(t>=r.length)return"u"==o;var i=r[t],l=(typeof i)[0];if(o!=l)return"o"==o&&"n"==l||"s"==l||"u"==o;if("o"!=o&&"u"!=o&&n!=i)return n<i;t++}},i=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 o=[];for(a=1;a<e.length;a++){var l=e[a];o.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?o.pop()+" "+o.pop():i(l))}return s();function s(){return o.pop().replace(/^\((.+)\)$/,"$1")}},l=(e,r)=>{if(0 in e){r=a(r);var t=e[0],n=t<0;n&&(t=-t-1);for(var o=0,i=1,s=!0;;i++,o++){var u,p,f=i<e.length?(typeof e[i])[0]:"";if(o>=r.length||"o"==(p=(typeof(u=r[o]))[0]))return!s||("u"==f?i>t&&!n:""==f!=n);if("u"==p){if(!s||"u"!=f)return!1}else if(s)if(f==p)if(i<=t){if(u!=e[i])return!1}else{if(n?u>e[i]:u<e[i])return!1;u!=e[i]&&(s=!1)}else if("s"!=f&&"n"!=f){if(n||i<=t)return!1;s=!1,i--}else{if(i<=t||p<f!=n)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,i--)}}var c=[],h=c.pop.bind(c);for(o=1;o<e.length;o++){var d=e[o];c.push(1==d?h()|h():2==d?h()&h():d?l(d,r):!h())}return!!h()},s=(e,r)=>e&&j.o(e,r),u=e=>(e.loaded=1,e.get()),p=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),f=(e,r,t)=>{var n=t?p(e[r]):e[r];return Object.keys(n).reduce(((e,r)=>!e||!n[e].loaded&&o(e,r)?r:e),0)},c=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+i(n)+")",h=e=>{throw new Error(e)},d=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},m=(e,r,t)=>t?t():((e,r)=>h("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),v=(e=>function(r,t,n,a,o){var i=j.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,j.S[r],t,!1,a,o)):e(r,j.S[r],t,n,a,o)})(((e,r,t,n,a,o)=>{if(!s(r,t))return m(e,t,o);var i=f(r,t,n);return l(a,i)||d(c(r,t,i,a)),u(r[t][i])})),g={},b={1343:()=>v("default","react",!1,[1,18],(()=>j.e(4041).then((()=>()=>j(14041))))),88010:()=>v("default","swr/immutable",!1,[1,2],(()=>j.e(9876).then((()=>()=>j(29876))))),8125:()=>v("default","single-spa-react",!1,[1,6],(()=>j.e(1469).then((()=>()=>j(61469))))),24818:()=>v("default","rxjs",!1,[1,6],(()=>j.e(2457).then((()=>()=>j(82457))))),74730:()=>v("default","single-spa",!1,[1,6],(()=>j.e(2244).then((()=>()=>j(22244))))),98394:()=>v("default","swr/infinite",!1,[1,2],(()=>j.e(2470).then((()=>()=>j(52470))))),55434:()=>v("default","swr/_internal",!1,[1,2],(()=>j.e(2372).then((()=>()=>j(42372))))),8877:()=>v("default","react-router-dom",!1,[1,6],(()=>j.e(2913).then((()=>()=>j(52913))))),14497:()=>v("default","lodash-es",!1,[1,4],(()=>Promise.all([j.e(5992),j.e(2687)]).then((()=>()=>j(42687))))),46372:()=>v("default","dayjs",!1,[1,1],(()=>j.e(3464).then((()=>()=>j(23464))))),72339:()=>v("default","react-i18next",!1,[1,16],(()=>j.e(6336).then((()=>()=>j(16336))))),75198:()=>v("default","@carbon/react",!1,[1,1],(()=>Promise.all([j.e(68),j.e(9007),j.e(4632),j.e(7816)]).then((()=>()=>j(67816))))),54440:()=>v("default","@openmrs/esm-framework",!1,[1,8],(()=>Promise.all([j.e(68),j.e(5992),j.e(517),j.e(5670),j.e(8010),j.e(3808)]).then((()=>()=>j(55670))))),63276:()=>v("default","@openmrs/esm-patient-common-lib",!1,[0],(()=>Promise.all([j.e(68),j.e(5992),j.e(517),j.e(8010),j.e(3808),j.e(3697)]).then((()=>()=>j(43697)))))},y={868:[54440],1343:[1343],2540:[54440,63276],3808:[8125,24818,74730,98394],5434:[55434],8010:[88010],8487:[54440],9533:[8877,14497,46372,72339,75198]},w={},j.f.consumes=(e,r)=>{j.o(y,e)&&y[e].forEach((e=>{if(j.o(g,e))return r.push(g[e]);if(!w[e]){var t=r=>{g[e]=0,j.m[e]=t=>{delete j.c[e],t.exports=r()}};w[e]=!0;var n=r=>{delete g[e],j.m[e]=t=>{throw delete j.c[e],r}};try{var a=b[e]();a.then?r.push(g[e]=a.then(t).catch(n)):t(a)}catch(e){n(e)}}}))},(()=>{var e={9426:0};j.f.j=(r,t)=>{var n=j.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(1343|3808|5434|8010|9533)$/.test(r))e[r]=0;else{var a=new Promise(((t,a)=>n=e[r]=[t,a]));t.push(n[2]=a);var o=j.p+j.u(r),i=new Error;j.l(o,(t=>{if(j.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var a=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,a,[o,i,l]=t,s=0;if(o.some((r=>0!==e[r]))){for(n in i)j.o(i,n)&&(j.m[n]=i[n]);l&&l(j)}for(r&&r(t);s<o.length;s++)a=o[s],j.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=globalThis.webpackChunk_openmrs_esm_patient_chart_app=globalThis.webpackChunk_openmrs_esm_patient_chart_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),j.nc=void 0;var S=j(20131);_openmrs_esm_patient_chart_app=S})();
@@ -1956,7 +1956,7 @@
1956
1956
  "auxiliaryFiles": [
1957
1957
  "main.js.map"
1958
1958
  ],
1959
- "hash": "609a675c66ab0ec8",
1959
+ "hash": "cad8520c487a1a54",
1960
1960
  "childrenByOrder": {}
1961
1961
  },
1962
1962
  {
@@ -2014,9 +2014,9 @@
2014
2014
  "entry": false,
2015
2015
  "recorded": false,
2016
2016
  "reason": "reused as split chunk (cache group: default)",
2017
- "size": 197773,
2017
+ "size": 197910,
2018
2018
  "sizes": {
2019
- "javascript": 197773
2019
+ "javascript": 197910
2020
2020
  },
2021
2021
  "names": [],
2022
2022
  "idHints": [],
@@ -2030,7 +2030,7 @@
2030
2030
  "auxiliaryFiles": [
2031
2031
  "9294.js.map"
2032
2032
  ],
2033
- "hash": "ef6ab647baf60d71",
2033
+ "hash": "a5bd7dcf1cb18469",
2034
2034
  "childrenByOrder": {}
2035
2035
  },
2036
2036
  {
@@ -2057,7 +2057,7 @@
2057
2057
  "auxiliaryFiles": [
2058
2058
  "openmrs-esm-patient-chart-app.js.map"
2059
2059
  ],
2060
- "hash": "9dbd87dfce22c2e1",
2060
+ "hash": "405b93d84bb9eed3",
2061
2061
  "childrenByOrder": {}
2062
2062
  },
2063
2063
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","optionalBackendDependencies":{"emrapi":{"version":">=2.0.0 <4.0.0","feature":{"flagName":"emrapi-module","label":"EMR API Module","description":"This module, if installed, provides core EMR business logic."}}},"extensions":[{"name":"charts-summary-dashboard","component":"patientSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":0,"meta":{"slot":"patient-chart-summary-dashboard-slot","path":"Patient Summary"},"online":true,"offline":true},{"name":"encounter-list","component":"encounterListTableTabs","online":true,"offline":true},{"name":"start-visit-button","component":"startVisitActionButton","slot":"patient-actions-slot","online":true,"offline":true},{"name":"clinical-views-summary","component":"clinicalViewsSummary","online":true,"offline":true},{"name":"stop-visit-button","component":"stopVisitActionButton","slot":"patient-actions-slot","online":true,"offline":true},{"name":"mark-alive-button","slot":"patient-actions-slot","component":"markPatientAliveActionButton","online":true,"offline":true},{"name":"stop-visit-button-patient-search","slot":"patient-search-actions-slot","component":"stopVisitPatientSearchActionButton","online":true,"offline":true},{"name":"delete-visit-button","slot":"patient-actions-slot","component":"deleteVisitActionMenuButton","online":true,"offline":true},{"name":"delete-visit-button","slot":"patient-search-actions-slot","component":"deleteVisitActionMenuButton","online":true,"offline":true},{"name":"mark-patient-deceased-button","slot":"patient-actions-slot","component":"markPatientDeceasedActionButton","online":true,"offline":true},{"name":"encounters-summary-dashboard","slot":"patient-chart-dashboard-slot","component":"encountersSummaryDashboardLink","meta":{"slot":"patient-chart-encounters-dashboard-slot","path":"Visits","layoutMode":"anchored"},"order":5,"online":true,"offline":true},{"name":"past-visits-detail-overview","slot":"patient-chart-encounters-dashboard-slot","component":"pastVisitsDetailOverview","order":1,"meta":{"title":"Visits","view":"visits"},"online":true,"offline":true},{"name":"patient-details-tile","slot":"visit-form-header-slot","component":"patientDetailsTile","order":1,"online":true,"offline":true},{"name":"start-visit-button-patient-search","slot":"start-visit-button-slot","component":"startVisitPatientSearchActionButton","online":true,"offline":true},{"name":"visit-attribute-tags","slot":"patient-banner-tags-slot","component":"visitAttributeTags","online":true,"offline":true},{"name":"current-visit-summary","component":"currentVisitSummary","online":true,"offline":true,"meta":{"fullWidth":true}},{"name":"edit-visit-action-button","slot":"visit-detail-overview-actions","component":"editVisitDetailsActionButton","online":true,"offline":true,"order":0},{"name":"delete-visit-action-button","slot":"visit-detail-overview-actions","component":"deleteVisitActionButton","online":true,"offline":true,"order":1},{"name":"active-visit-action-button","slot":"active-visit-actions","component":"activeVisitActionsComponent","online":true,"offline":true,"order":1},{"name":"visit-context-header","slot":"visit-context-header-slot","component":"visitContextHeader"},{"name":"retrospective-date-time-picker","slot":"restrospective-date-time-picker-slot","component":"retrospectiveDateTimePicker"}],"featureFlags":[{"description":"Features to enter data for past visits. Includes the 'Edit Past Visit' button in the start visit dialog, and the 'Add Past Visit' button in the patient header","flagName":"rde","label":"Retrospective Data Entry"},{"description":"When enabled, encounter summaries will display the full form layout instead of a simple observation list.","flagName":"enable-embedded-form-view","label":"Enable Embedded Form View"}],"modals":[{"name":"delete-encounter-modal","component":"deleteEncounterModal"},{"name":"delete-visit-dialog","component":"deleteVisitModal"},{"name":"end-visit-dialog","component":"endVisitModal"},{"name":"mark-patient-alive-modal","component":"markPatientAliveModal"},{"name":"modify-visit-date-dialog","component":"modifyVisitDateModal"},{"name":"start-visit-dialog","component":"startVisitModal"},{"name":"visit-context-switcher","component":"visitContextSwitcherModal"}],"pages":[{"component":"root","routeRegex":"^patient/.+/chart","online":true,"offline":true}],"workspaces2":[{"name":"mark-patient-deceased-workspace-form","component":"markPatientDeceasedForm","window":"mark-patient-deceased"},{"name":"start-visit-workspace-form","component":"startVisitWorkspace","window":"start-visit"},{"name":"patient-chart-appointments-form-workspace","component":"@openmrs/esm-appointments-app#exportedAppointmentsFormWorkspace","window":"patient-chart-appointment-form"}],"workspaceWindows2":[{"name":"start-visit","group":"patient-chart"},{"name":"mark-patient-deceased","group":"patient-chart"},{"name":"patient-chart-appointment-form","group":"patient-chart"}],"workspaceGroups2":[{"name":"patient-chart"}],"version":"11.3.1-pre.9645"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","optionalBackendDependencies":{"emrapi":{"version":">=2.0.0 <4.0.0","feature":{"flagName":"emrapi-module","label":"EMR API Module","description":"This module, if installed, provides core EMR business logic."}}},"extensions":[{"name":"charts-summary-dashboard","component":"patientSummaryDashboardLink","slot":"patient-chart-dashboard-slot","order":0,"meta":{"slot":"patient-chart-summary-dashboard-slot","path":"Patient Summary"},"online":true,"offline":true},{"name":"encounter-list","component":"encounterListTableTabs","online":true,"offline":true},{"name":"start-visit-button","component":"startVisitActionButton","slot":"patient-actions-slot","online":true,"offline":true},{"name":"clinical-views-summary","component":"clinicalViewsSummary","online":true,"offline":true},{"name":"stop-visit-button","component":"stopVisitActionButton","slot":"patient-actions-slot","online":true,"offline":true},{"name":"mark-alive-button","slot":"patient-actions-slot","component":"markPatientAliveActionButton","online":true,"offline":true},{"name":"stop-visit-button-patient-search","slot":"patient-search-actions-slot","component":"stopVisitPatientSearchActionButton","online":true,"offline":true},{"name":"delete-visit-button","slot":"patient-actions-slot","component":"deleteVisitActionMenuButton","online":true,"offline":true},{"name":"delete-visit-button","slot":"patient-search-actions-slot","component":"deleteVisitActionMenuButton","online":true,"offline":true},{"name":"mark-patient-deceased-button","slot":"patient-actions-slot","component":"markPatientDeceasedActionButton","online":true,"offline":true},{"name":"encounters-summary-dashboard","slot":"patient-chart-dashboard-slot","component":"encountersSummaryDashboardLink","meta":{"slot":"patient-chart-encounters-dashboard-slot","path":"Visits","layoutMode":"anchored"},"order":5,"online":true,"offline":true},{"name":"past-visits-detail-overview","slot":"patient-chart-encounters-dashboard-slot","component":"pastVisitsDetailOverview","order":1,"meta":{"title":"Visits","view":"visits"},"online":true,"offline":true},{"name":"patient-details-tile","slot":"visit-form-header-slot","component":"patientDetailsTile","order":1,"online":true,"offline":true},{"name":"start-visit-button-patient-search","slot":"start-visit-button-slot","component":"startVisitPatientSearchActionButton","online":true,"offline":true},{"name":"visit-attribute-tags","slot":"patient-banner-tags-slot","component":"visitAttributeTags","online":true,"offline":true},{"name":"current-visit-summary","component":"currentVisitSummary","online":true,"offline":true,"meta":{"fullWidth":true}},{"name":"edit-visit-action-button","slot":"visit-detail-overview-actions","component":"editVisitDetailsActionButton","online":true,"offline":true,"order":0},{"name":"delete-visit-action-button","slot":"visit-detail-overview-actions","component":"deleteVisitActionButton","online":true,"offline":true,"order":1},{"name":"active-visit-action-button","slot":"active-visit-actions","component":"activeVisitActionsComponent","online":true,"offline":true,"order":1},{"name":"visit-context-header","slot":"visit-context-header-slot","component":"visitContextHeader"},{"name":"retrospective-date-time-picker","slot":"restrospective-date-time-picker-slot","component":"retrospectiveDateTimePicker"}],"featureFlags":[{"description":"Features to enter data for past visits. Includes the 'Edit Past Visit' button in the start visit dialog, and the 'Add Past Visit' button in the patient header","flagName":"rde","label":"Retrospective Data Entry"},{"description":"When enabled, encounter summaries will display the full form layout instead of a simple observation list.","flagName":"enable-embedded-form-view","label":"Enable Embedded Form View"}],"modals":[{"name":"delete-encounter-modal","component":"deleteEncounterModal"},{"name":"delete-visit-dialog","component":"deleteVisitModal"},{"name":"end-visit-dialog","component":"endVisitModal"},{"name":"mark-patient-alive-modal","component":"markPatientAliveModal"},{"name":"modify-visit-date-dialog","component":"modifyVisitDateModal"},{"name":"start-visit-dialog","component":"startVisitModal"},{"name":"visit-context-switcher","component":"visitContextSwitcherModal"}],"pages":[{"component":"root","routeRegex":"^patient/.+/chart","online":true,"offline":true}],"workspaces2":[{"name":"mark-patient-deceased-workspace-form","component":"markPatientDeceasedForm","window":"mark-patient-deceased"},{"name":"start-visit-workspace-form","component":"startVisitWorkspace","window":"start-visit"},{"name":"patient-chart-appointments-form-workspace","component":"@openmrs/esm-appointments-app#exportedAppointmentsFormWorkspace","window":"patient-chart-appointment-form"}],"workspaceWindows2":[{"name":"start-visit","group":"patient-chart"},{"name":"mark-patient-deceased","group":"patient-chart"},{"name":"patient-chart-appointment-form","group":"patient-chart"}],"workspaceGroups2":[{"name":"patient-chart"}],"version":"11.3.1-pre.9651"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-patient-chart-app",
3
- "version": "11.3.1-pre.9645",
3
+ "version": "11.3.1-pre.9651",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Patient dashboard microfrontend for the OpenMRS SPA",
6
6
  "browser": "dist/openmrs-esm-patient-chart-app.js",
@@ -55,7 +55,7 @@
55
55
  "swr": "2.x"
56
56
  },
57
57
  "devDependencies": {
58
- "@openmrs/esm-patient-common-lib": "11.3.1-pre.9645",
58
+ "@openmrs/esm-patient-common-lib": "11.3.1-pre.9651",
59
59
  "@types/uuid": "^9.0.4",
60
60
  "webpack": "^5.99.9"
61
61
  },
@@ -154,7 +154,12 @@ const ExportedVisitForm: React.FC<Workspace2DefinitionProps<ExportedVisitFormPro
154
154
 
155
155
  // default values are cached so form needs to be reset when they change (e.g. when default visit location finishes loading)
156
156
  useEffect(() => {
157
- reset(defaultValues);
157
+ reset(defaultValues, {
158
+ keepDirty: true,
159
+ keepDirtyValues: true,
160
+ keepErrors: true,
161
+ keepTouched: true,
162
+ });
158
163
  }, [defaultValues, reset]);
159
164
 
160
165
  const isValidVisitAttributesArray = useCallback((attributes: unknown): boolean => {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import dayjs from 'dayjs';
3
- import { fireEvent, render, renderHook, screen } from '@testing-library/react';
3
+ import { fireEvent, render, renderHook, screen, waitFor } from '@testing-library/react';
4
4
  import userEvent from '@testing-library/user-event';
5
5
  import {
6
6
  type FetchResponse,
@@ -22,6 +22,7 @@ import {
22
22
  convertToDateTimeFields,
23
23
  createVisitAttribute,
24
24
  deleteVisitAttribute,
25
+ type VisitFormData,
25
26
  updateVisitAttribute,
26
27
  useVisitFormCallbacks,
27
28
  useVisitFormSchemaAndDefaultValues,
@@ -73,6 +74,12 @@ const defaultProps: PatientWorkspace2DefinitionProps<VisitFormProps, {}> = {
73
74
  isRootWorkspace: false,
74
75
  };
75
76
 
77
+ const defaultVisitLocation = {
78
+ display: 'Outpatient Clinic',
79
+ uuid: 'location-a',
80
+ };
81
+ const mockUseDefaultVisitLocation = jest.fn().mockReturnValue(defaultVisitLocation);
82
+
76
83
  const mockSaveVisit = jest.mocked(saveVisit);
77
84
  const mockUpdateVisit = jest.mocked(updateVisit);
78
85
  const mockUseConfig = jest.mocked(useConfig<ChartConfig>);
@@ -164,6 +171,15 @@ jest.mock('../hooks/useDefaultFacilityLocation', () => {
164
171
  };
165
172
  });
166
173
 
174
+ jest.mock('../hooks/useDefaultVisitLocation', () => {
175
+ const requireActual = jest.requireActual('../hooks/useDefaultVisitLocation');
176
+
177
+ return {
178
+ ...requireActual,
179
+ useDefaultVisitLocation: jest.fn((...args) => mockUseDefaultVisitLocation(...args)),
180
+ };
181
+ });
182
+
167
183
  jest.mock('./visit-form.resource', () => {
168
184
  const requireActual = jest.requireActual('./visit-form.resource');
169
185
  return {
@@ -212,6 +228,8 @@ describe('Visit form', () => {
212
228
  errorFetchingEmrConfiguration: null,
213
229
  mutateEmrConfiguration: null,
214
230
  });
231
+ mockUseDefaultVisitLocation.mockReset();
232
+ mockUseDefaultVisitLocation.mockReturnValue(defaultVisitLocation);
215
233
  });
216
234
 
217
235
  it('renders the Start Visit form with all the relevant fields and values', async () => {
@@ -309,6 +327,34 @@ describe('Visit form', () => {
309
327
  await user.click(screen.getByLabelText(/Outpatient visit/i));
310
328
  });
311
329
 
330
+ it('keeps user selections when default values update', async () => {
331
+ const user = userEvent.setup();
332
+ mockUseDefaultVisitLocation.mockReturnValueOnce({}).mockReturnValue({
333
+ display: 'Inpatient Ward',
334
+ uuid: 'location-b',
335
+ });
336
+
337
+ const props: PatientWorkspace2DefinitionProps<VisitFormProps, {}> = {
338
+ ...defaultProps,
339
+ groupProps: {
340
+ ...defaultProps.groupProps,
341
+ visitContext: null,
342
+ },
343
+ };
344
+ const { rerender } = render(<VisitForm {...props} />);
345
+
346
+ const visitStatusOngoing = screen.getByRole('tab', { name: /ongoing/i });
347
+ await user.click(visitStatusOngoing);
348
+ const outpatientVisitRadio = screen.getByRole('radio', { name: /^Outpatient Visit$/i });
349
+ await user.click(outpatientVisitRadio);
350
+
351
+ expect(outpatientVisitRadio).toBeChecked();
352
+
353
+ rerender(<VisitForm {...props} />);
354
+
355
+ await waitFor(() => expect(screen.getByRole('radio', { name: /^Outpatient Visit$/i })).toBeChecked());
356
+ });
357
+
312
358
  it('displays an error message when the visit start time is in the future', async () => {
313
359
  const user = userEvent.setup();
314
360