@openmrs/esm-patient-chart-app 11.3.1-pre.9336 → 11.3.1-pre.9344

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.3485",(()=>Promise.all([j.e(68),j.e(5992),j.e(1815),j.e(5670),j.e(1343),j.e(8010),j.e(5434),j.e(3808),j.e(9533),j.e(868)]).then((()=>()=>j(55670))))),l("@openmrs/esm-patient-common-lib","11.3.1-pre.9336",(()=>Promise.all([j.e(68),j.e(5992),j.e(1815),j.e(1343),j.e(8010),j.e(5434),j.e(3808),j.e(9533),j.e(5048),j.e(8487)]).then((()=>()=>j(15048))))),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))))),55434:()=>v("default","swr/_internal",!1,[1,2],(()=>j.e(2372).then((()=>()=>j(42372))))),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))))),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(1815),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(1815),j.e(8010),j.e(3808),j.e(5048)]).then((()=>()=>j(15048)))))},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.3485",(()=>Promise.all([j.e(68),j.e(5992),j.e(1815),j.e(5670),j.e(1343),j.e(8010),j.e(5434),j.e(3808),j.e(9533),j.e(868)]).then((()=>()=>j(55670))))),l("@openmrs/esm-patient-common-lib","11.3.1-pre.9344",(()=>Promise.all([j.e(68),j.e(5992),j.e(1815),j.e(1343),j.e(8010),j.e(5434),j.e(3808),j.e(9533),j.e(5048),j.e(8487)]).then((()=>()=>j(15048))))),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))))),55434:()=>v("default","swr/_internal",!1,[1,2],(()=>j.e(2372).then((()=>()=>j(42372))))),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))))),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(1815),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(1815),j.e(8010),j.e(3808),j.e(5048)]).then((()=>()=>j(15048)))))},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})();
@@ -1538,9 +1538,9 @@
1538
1538
  "entry": false,
1539
1539
  "recorded": false,
1540
1540
  "reason": "split chunk (cache group: default)",
1541
- "size": 157634,
1541
+ "size": 158035,
1542
1542
  "sizes": {
1543
- "javascript": 157634
1543
+ "javascript": 158035
1544
1544
  },
1545
1545
  "names": [],
1546
1546
  "idHints": [],
@@ -1554,7 +1554,7 @@
1554
1554
  "auxiliaryFiles": [
1555
1555
  "6997.js.map"
1556
1556
  ],
1557
- "hash": "1640bd8551bfab3e",
1557
+ "hash": "74f05f3cfda7e304",
1558
1558
  "childrenByOrder": {}
1559
1559
  },
1560
1560
  {
@@ -2005,7 +2005,7 @@
2005
2005
  "auxiliaryFiles": [
2006
2006
  "main.js.map"
2007
2007
  ],
2008
- "hash": "bd5e2813d4dc7d17",
2008
+ "hash": "880eb2ddcd062df5",
2009
2009
  "childrenByOrder": {}
2010
2010
  },
2011
2011
  {
@@ -2081,7 +2081,7 @@
2081
2081
  "auxiliaryFiles": [
2082
2082
  "openmrs-esm-patient-chart-app.js.map"
2083
2083
  ],
2084
- "hash": "fd42b6167aef4994",
2084
+ "hash": "850382b61e7bdf44",
2085
2085
  "childrenByOrder": {}
2086
2086
  },
2087
2087
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","optionalBackendDependencies":{"emrapi":{"version":"^2.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}],"workspaces":[{"name":"mark-patient-deceased-workspace-form","component":"markPatientDeceasedForm","title":"Mark patient deceased","type":"form"},{"name":"start-visit-workspace-form","component":"startVisitWorkspace","title":"startVisitWorkspaceTitle","type":"start-visit"}],"version":"11.3.1-pre.9336"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","optionalBackendDependencies":{"emrapi":{"version":"^2.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}],"workspaces":[{"name":"mark-patient-deceased-workspace-form","component":"markPatientDeceasedForm","title":"Mark patient deceased","type":"form"},{"name":"start-visit-workspace-form","component":"startVisitWorkspace","title":"startVisitWorkspaceTitle","type":"start-visit"}],"version":"11.3.1-pre.9344"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-patient-chart-app",
3
- "version": "11.3.1-pre.9336",
3
+ "version": "11.3.1-pre.9344",
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.9336",
58
+ "@openmrs/esm-patient-common-lib": "11.3.1-pre.9344",
59
59
  "@types/uuid": "^9.0.4",
60
60
  "webpack": "^5.99.9"
61
61
  },
@@ -1,8 +1,8 @@
1
- import React, { useState, useMemo, useCallback, type ChangeEvent } from 'react';
1
+ import React, { useState, useMemo, useCallback, useEffect, useRef, type ChangeEvent } from 'react';
2
2
  import classNames from 'classnames';
3
+ import { Layer, RadioButton, RadioButtonGroup, Search, StructuredListSkeleton, Tile } from '@carbon/react';
3
4
  import { useTranslation } from 'react-i18next';
4
5
  import { useFormContext, Controller } from 'react-hook-form';
5
- import { Layer, RadioButton, RadioButtonGroup, Search, StructuredListSkeleton, Tile } from '@carbon/react';
6
6
  import { PatientChartPagination } from '@openmrs/esm-patient-common-lib';
7
7
  import { useDebounce, useLayoutType, usePagination, type VisitType } from '@openmrs/esm-framework';
8
8
  import { type VisitFormData } from './visit-form.resource';
@@ -14,7 +14,7 @@ interface BaseVisitTypeProps {
14
14
 
15
15
  const BaseVisitType: React.FC<BaseVisitTypeProps> = ({ visitTypes }) => {
16
16
  const { t } = useTranslation();
17
- const { control } = useFormContext<VisitFormData>();
17
+ const { control, setValue } = useFormContext<VisitFormData>();
18
18
  const isTablet = useLayoutType() === 'tablet';
19
19
  const [searchTerm, setSearchTerm] = useState<string>('');
20
20
  const debouncedSearchTerm = useDebounce(searchTerm, 300);
@@ -29,30 +29,40 @@ const BaseVisitType: React.FC<BaseVisitTypeProps> = ({ visitTypes }) => {
29
29
 
30
30
  const { results, currentPage, goTo } = usePagination(searchResults, 5);
31
31
  const hasNoMatchingSearchResults = debouncedSearchTerm.trim() !== '' && searchResults.length === 0;
32
+ const prevSearchTermRef = useRef(debouncedSearchTerm);
32
33
 
33
34
  const handleSearchTermChange = useCallback((e: ChangeEvent<HTMLInputElement>) => {
34
35
  setSearchTerm(e.target.value);
35
36
  }, []);
36
37
 
38
+ useEffect(() => {
39
+ if (searchResults?.length === 1) {
40
+ setValue('visitType', searchResults[0].uuid);
41
+ }
42
+ }, [searchResults, setValue]);
43
+
44
+ // Reset pagination to page 1 when search term changes
45
+ useEffect(() => {
46
+ if (prevSearchTermRef.current !== debouncedSearchTerm && currentPage !== 1) {
47
+ goTo(1);
48
+ }
49
+ prevSearchTermRef.current = debouncedSearchTerm;
50
+ }, [debouncedSearchTerm, currentPage, goTo]);
51
+
52
+ const searchComponent = (
53
+ <Search
54
+ labelText={t('searchForAVisitType', 'Search for a visit type')}
55
+ onChange={handleSearchTermChange}
56
+ placeholder={t('searchForAVisitType', 'Search for a visit type')}
57
+ value={searchTerm}
58
+ />
59
+ );
60
+
37
61
  return (
38
62
  <div className={classNames(styles.visitTypeOverviewWrapper, isTablet ? styles.tablet : styles.desktop)}>
39
63
  {visitTypes.length ? (
40
64
  <>
41
- {isTablet ? (
42
- <Layer>
43
- <Search
44
- labelText={t('searchForAVisitType', 'Search for a visit type')}
45
- onChange={handleSearchTermChange}
46
- placeholder={t('searchForAVisitType', 'Search for a visit type')}
47
- />
48
- </Layer>
49
- ) : (
50
- <Search
51
- labelText={t('searchForAVisitType', 'Search for a visit type')}
52
- onChange={handleSearchTermChange}
53
- placeholder={t('searchForAVisitType', 'Search for a visit type')}
54
- />
55
- )}
65
+ {isTablet ? <Layer>{searchComponent}</Layer> : searchComponent}
56
66
 
57
67
  {hasNoMatchingSearchResults ? (
58
68
  <div className={styles.tileContainer}>
@@ -67,7 +77,6 @@ const BaseVisitType: React.FC<BaseVisitTypeProps> = ({ visitTypes }) => {
67
77
  <Controller
68
78
  name="visitType"
69
79
  control={control}
70
- defaultValue={results?.length === 1 ? results[0].uuid : null}
71
80
  render={({ field: { onChange, value } }) => (
72
81
  <RadioButtonGroup
73
82
  className={styles.radioButtonGroup}
@@ -76,7 +85,7 @@ const BaseVisitType: React.FC<BaseVisitTypeProps> = ({ visitTypes }) => {
76
85
  orientation="vertical"
77
86
  valueSelected={value}
78
87
  >
79
- {results.map(({ uuid, display, name }) => (
88
+ {results.map(({ display, uuid }) => (
80
89
  <RadioButton
81
90
  className={styles.radioButton}
82
91
  id={`visit-type-${uuid}`}
@@ -97,7 +106,7 @@ const BaseVisitType: React.FC<BaseVisitTypeProps> = ({ visitTypes }) => {
97
106
  onPageNumberChange={({ page }) => goTo(page)}
98
107
  pageNumber={currentPage}
99
108
  pageSize={5}
100
- totalItems={visitTypes?.length}
109
+ totalItems={searchResults.length}
101
110
  />
102
111
  </div>
103
112
  )}