@openmrs/esm-patient-programs-app 11.3.1-pre.9452 → 11.3.1-pre.9458
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +7 -7
- package/dist/3390.js +1 -1
- package/dist/3390.js.map +1 -1
- package/dist/3697.js +1 -0
- package/dist/3697.js.map +1 -0
- package/dist/5912.js +1 -1
- package/dist/5912.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-patient-programs-app.js +1 -1
- package/dist/openmrs-esm-patient-programs-app.js.buildmanifest.json +35 -35
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/programs/programs-action-menu.component.tsx +2 -2
- package/src/programs/programs-action-menu.test.tsx +2 -2
- package/src/programs/programs-detailed-summary.component.tsx +2 -2
- package/src/programs/programs-detailed-summary.test.tsx +2 -2
- package/src/programs/programs-form.test.tsx +21 -13
- package/src/programs/programs-form.workspace.tsx +40 -43
- package/src/programs/programs-overview.component.tsx +2 -2
- package/src/programs/programs-overview.test.tsx +2 -2
- package/src/routes.json +9 -3
- package/dist/5048.js +0 -1
- package/dist/5048.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var _openmrs_esm_patient_programs_app;(()=>{"use strict";var e,r,t,n,o,a,i,s,l,u,p,f,d,c,h,m,v,g,b,y,w,_={33864:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(5005),t.e(7498),t.e(1343),t.e(5434),t.e(600),t.e(3390)]).then((()=>()=>t(83390)))},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})}},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 o=Object.create(null);j.r(o);var a={};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=>a[e]=()=>t[e]));return a.default=()=>t,j.d(o,a),o},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-programs-app:",j.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var i,s;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==n+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,j.nc&&i.setAttribute("nonce",j.nc),i.setAttribute("data-webpack",n+o),i.src=e),t[e]=[r];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=t[e];if(delete t[e],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),s&&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 o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];j.o(j.S,t)||(j.S[t]={});var a=j.S[t],i="@openmrs/esm-patient-programs-app",s=(e,r,t,n)=>{var o=a[e]=a[e]||{},s=o[r];(!s||!s.loaded&&(!n!=!s.eager?n:i>s.from))&&(o[r]={get:t,from:i,eager:!!n})},l=[];return"default"===t&&(s("@openmrs/esm-framework","8.0.1-pre.3518",(()=>Promise.all([j.e(8743),j.e(5005),j.e(5670),j.e(1343),j.e(5434),j.e(6372),j.e(6730),j.e(600)]).then((()=>()=>j(55670))))),s("@openmrs/esm-patient-common-lib","11.3.1-pre.
|
|
1
|
+
var _openmrs_esm_patient_programs_app;(()=>{"use strict";var e,r,t,n,o,a,i,s,l,u,p,f,d,c,h,m,v,g,b,y,w,_={33864:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(5005),t.e(7498),t.e(1343),t.e(5434),t.e(600),t.e(3390)]).then((()=>()=>t(83390)))},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})}},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 o=Object.create(null);j.r(o);var a={};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=>a[e]=()=>t[e]));return a.default=()=>t,j.d(o,a),o},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-programs-app:",j.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var i,s;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==n+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,j.nc&&i.setAttribute("nonce",j.nc),i.setAttribute("data-webpack",n+o),i.src=e),t[e]=[r];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=t[e];if(delete t[e],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),s&&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 o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];j.o(j.S,t)||(j.S[t]={});var a=j.S[t],i="@openmrs/esm-patient-programs-app",s=(e,r,t,n)=>{var o=a[e]=a[e]||{},s=o[r];(!s||!s.loaded&&(!n!=!s.eager?n:i>s.from))&&(o[r]={get:t,from:i,eager:!!n})},l=[];return"default"===t&&(s("@openmrs/esm-framework","8.0.1-pre.3518",(()=>Promise.all([j.e(8743),j.e(5005),j.e(5670),j.e(1343),j.e(5434),j.e(6372),j.e(6730),j.e(600)]).then((()=>()=>j(55670))))),s("@openmrs/esm-patient-common-lib","11.3.1-pre.9458",(()=>Promise.all([j.e(8743),j.e(5005),j.e(1343),j.e(5434),j.e(6372),j.e(6730),j.e(600),j.e(3697),j.e(9543)]).then((()=>()=>j(43697))))),s("dayjs","1.11.13",(()=>j.e(3464).then((()=>()=>j(23464))))),s("react-i18next","16.0.0",(()=>Promise.all([j.e(6336),j.e(1343)]).then((()=>()=>j(16336))))),s("react-router-dom","6.16.0",(()=>Promise.all([j.e(2913),j.e(1343)]).then((()=>()=>j(52913))))),s("react","18.3.1",(()=>j.e(4041).then((()=>()=>j(14041))))),s("rxjs","6.6.7",(()=>j.e(2457).then((()=>()=>j(82457))))),s("swr/_internal","2.2.5",(()=>Promise.all([j.e(2372),j.e(1343)]).then((()=>()=>j(42372))))),s("swr/immutable","2.2.5",(()=>Promise.all([j.e(1343),j.e(5434),j.e(7495)]).then((()=>()=>j(29876))))),s("swr/infinite","2.2.5",(()=>Promise.all([j.e(1343),j.e(5434),j.e(89)]).then((()=>()=>j(52470)))))),e[t]=l.length?Promise.all(l).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})(),o=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},a=(e,r)=>{e=o(e),r=o(r);for(var t=0;;){if(t>=e.length)return t<r.length&&"u"!=(typeof r[t])[0];var n=e[t],a=(typeof n)[0];if(t>=r.length)return"u"==a;var i=r[t],s=(typeof i)[0];if(a!=s)return"o"==a&&"n"==s||"s"==s||"u"==a;if("o"!=a&&"u"!=a&&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,o=1;o<e.length;o++)n--,t+="u"==(typeof(s=e[o]))[0]?"-":(n>0?".":"")+(n=2,s);return t}var a=[];for(o=1;o<e.length;o++){var s=e[o];a.push(0===s?"not("+l()+")":1===s?"("+l()+" || "+l()+")":2===s?a.pop()+" "+a.pop():i(s))}return l();function l(){return a.pop().replace(/^\((.+)\)$/,"$1")}},s=(e,r)=>{if(0 in e){r=o(r);var t=e[0],n=t<0;n&&(t=-t-1);for(var a=0,i=1,l=!0;;i++,a++){var u,p,f=i<e.length?(typeof e[i])[0]:"";if(a>=r.length||"o"==(p=(typeof(u=r[a]))[0]))return!l||("u"==f?i>t&&!n:""==f!=n);if("u"==p){if(!l||"u"!=f)return!1}else if(l)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]&&(l=!1)}else if("s"!=f&&"n"!=f){if(n||i<=t)return!1;l=!1,i--}else{if(i<=t||p<f!=n)return!1;l=!1}else"s"!=f&&"n"!=f&&(l=!1,i--)}}var d=[],c=d.pop.bind(d);for(a=1;a<e.length;a++){var h=e[a];d.push(1==h?c()|c():2==h?c()&c():h?s(h,r):!c())}return!!c()},l=(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&&a(e,r)?r:e),0)},d=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+i(n)+")",c=e=>{throw new Error(e)},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},m=(e,r,t)=>t?t():((e,r)=>c("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),v=(e=>function(r,t,n,o,a){var i=j.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,j.S[r],t,!1,o,a)):e(r,j.S[r],t,n,o,a)})(((e,r,t,n,o,a)=>{if(!l(r,t))return m(e,t,a);var i=f(r,t,n);return s(o,i)||h(d(r,t,i,o)),u(r[t][i])})),g={},b={1343:()=>v("default","react",!1,[1,18],(()=>j.e(4041).then((()=>()=>j(14041))))),55434:()=>v("default","swr/_internal",!1,[1,2],(()=>j.e(2372).then((()=>()=>j(42372))))),46372:()=>v("default","dayjs",!1,[1,1],(()=>j.e(3464).then((()=>()=>j(23464))))),8877:()=>v("default","react-router-dom",!1,[1,6],(()=>j.e(2913).then((()=>()=>j(52913))))),24818:()=>v("default","rxjs",!1,[1,6],(()=>j.e(2457).then((()=>()=>j(82457))))),88010:()=>v("default","swr/immutable",!1,[1,2],(()=>j.e(9876).then((()=>()=>j(29876))))),98394:()=>v("default","swr/infinite",!1,[1,2],(()=>j.e(2470).then((()=>()=>j(52470))))),54440:()=>v("default","@openmrs/esm-framework",!1,[1,8],(()=>Promise.all([j.e(8743),j.e(5670),j.e(6372),j.e(6730)]).then((()=>()=>j(55670))))),72339:()=>v("default","react-i18next",!1,[1,16],(()=>j.e(6336).then((()=>()=>j(16336))))),36274:()=>v("default","@openmrs/esm-patient-common-lib",!1,[1,11],(()=>Promise.all([j.e(8743),j.e(6372),j.e(6730),j.e(3697)]).then((()=>()=>j(43697)))))},y={600:[54440,72339],1343:[1343],3390:[36274],5434:[55434],6372:[46372],6730:[8877,24818,88010,98394]},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 o=b[e]();o.then?r.push(g[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}}))},(()=>{var e={9453: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(/^(6(00|372|730)|1343|5434)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=j.p+j.u(r),i=new Error;j.l(a,(t=>{if(j.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,s]=t,l=0;if(a.some((r=>0!==e[r]))){for(n in i)j.o(i,n)&&(j.m[n]=i[n]);s&&s(j)}for(r&&r(t);l<a.length;l++)o=a[l],j.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))})(),j.nc=void 0;var S=j(33864);_openmrs_esm_patient_programs_app=S})();
|
|
@@ -396,10 +396,10 @@
|
|
|
396
396
|
"initial": false,
|
|
397
397
|
"entry": false,
|
|
398
398
|
"recorded": false,
|
|
399
|
-
"size":
|
|
399
|
+
"size": 44650,
|
|
400
400
|
"sizes": {
|
|
401
401
|
"consume-shared": 42,
|
|
402
|
-
"javascript":
|
|
402
|
+
"javascript": 44608
|
|
403
403
|
},
|
|
404
404
|
"names": [],
|
|
405
405
|
"idHints": [],
|
|
@@ -412,7 +412,7 @@
|
|
|
412
412
|
"auxiliaryFiles": [
|
|
413
413
|
"3390.js.map"
|
|
414
414
|
],
|
|
415
|
-
"hash": "
|
|
415
|
+
"hash": "d20f024ae8c60bc3",
|
|
416
416
|
"childrenByOrder": {}
|
|
417
417
|
},
|
|
418
418
|
{
|
|
@@ -461,6 +461,31 @@
|
|
|
461
461
|
"hash": "a2c4e01748e0473b",
|
|
462
462
|
"childrenByOrder": {}
|
|
463
463
|
},
|
|
464
|
+
{
|
|
465
|
+
"rendered": true,
|
|
466
|
+
"initial": false,
|
|
467
|
+
"entry": false,
|
|
468
|
+
"recorded": false,
|
|
469
|
+
"reason": "reused as split chunk (cache group: default)",
|
|
470
|
+
"size": 238993,
|
|
471
|
+
"sizes": {
|
|
472
|
+
"javascript": 238993
|
|
473
|
+
},
|
|
474
|
+
"names": [],
|
|
475
|
+
"idHints": [],
|
|
476
|
+
"runtime": [
|
|
477
|
+
"@openmrs/esm-patient-programs-app",
|
|
478
|
+
"main"
|
|
479
|
+
],
|
|
480
|
+
"files": [
|
|
481
|
+
"3697.js"
|
|
482
|
+
],
|
|
483
|
+
"auxiliaryFiles": [
|
|
484
|
+
"3697.js.map"
|
|
485
|
+
],
|
|
486
|
+
"hash": "b22500c30926bb44",
|
|
487
|
+
"childrenByOrder": {}
|
|
488
|
+
},
|
|
464
489
|
{
|
|
465
490
|
"rendered": true,
|
|
466
491
|
"initial": false,
|
|
@@ -666,31 +691,6 @@
|
|
|
666
691
|
"hash": "3732bd6df41b4301",
|
|
667
692
|
"childrenByOrder": {}
|
|
668
693
|
},
|
|
669
|
-
{
|
|
670
|
-
"rendered": true,
|
|
671
|
-
"initial": false,
|
|
672
|
-
"entry": false,
|
|
673
|
-
"recorded": false,
|
|
674
|
-
"reason": "reused as split chunk (cache group: default)",
|
|
675
|
-
"size": 234113,
|
|
676
|
-
"sizes": {
|
|
677
|
-
"javascript": 234113
|
|
678
|
-
},
|
|
679
|
-
"names": [],
|
|
680
|
-
"idHints": [],
|
|
681
|
-
"runtime": [
|
|
682
|
-
"@openmrs/esm-patient-programs-app",
|
|
683
|
-
"main"
|
|
684
|
-
],
|
|
685
|
-
"files": [
|
|
686
|
-
"5048.js"
|
|
687
|
-
],
|
|
688
|
-
"auxiliaryFiles": [
|
|
689
|
-
"5048.js.map"
|
|
690
|
-
],
|
|
691
|
-
"hash": "9278903296fd4ffd",
|
|
692
|
-
"childrenByOrder": {}
|
|
693
|
-
},
|
|
694
694
|
{
|
|
695
695
|
"rendered": true,
|
|
696
696
|
"initial": false,
|
|
@@ -832,9 +832,9 @@
|
|
|
832
832
|
"initial": false,
|
|
833
833
|
"entry": false,
|
|
834
834
|
"recorded": false,
|
|
835
|
-
"size":
|
|
835
|
+
"size": 60498,
|
|
836
836
|
"sizes": {
|
|
837
|
-
"javascript":
|
|
837
|
+
"javascript": 60498
|
|
838
838
|
},
|
|
839
839
|
"names": [],
|
|
840
840
|
"idHints": [],
|
|
@@ -848,7 +848,7 @@
|
|
|
848
848
|
"auxiliaryFiles": [
|
|
849
849
|
"5912.js.map"
|
|
850
850
|
],
|
|
851
|
-
"hash": "
|
|
851
|
+
"hash": "257f83f7abb7af4e",
|
|
852
852
|
"childrenByOrder": {}
|
|
853
853
|
},
|
|
854
854
|
{
|
|
@@ -1339,10 +1339,10 @@
|
|
|
1339
1339
|
"initial": true,
|
|
1340
1340
|
"entry": true,
|
|
1341
1341
|
"recorded": false,
|
|
1342
|
-
"size":
|
|
1342
|
+
"size": 2606208,
|
|
1343
1343
|
"sizes": {
|
|
1344
1344
|
"consume-shared": 210,
|
|
1345
|
-
"javascript":
|
|
1345
|
+
"javascript": 2582769,
|
|
1346
1346
|
"share-init": 420,
|
|
1347
1347
|
"runtime": 22809
|
|
1348
1348
|
},
|
|
@@ -1359,7 +1359,7 @@
|
|
|
1359
1359
|
"auxiliaryFiles": [
|
|
1360
1360
|
"main.js.map"
|
|
1361
1361
|
],
|
|
1362
|
-
"hash": "
|
|
1362
|
+
"hash": "bba0267134d45360",
|
|
1363
1363
|
"childrenByOrder": {}
|
|
1364
1364
|
},
|
|
1365
1365
|
{
|
|
@@ -1408,7 +1408,7 @@
|
|
|
1408
1408
|
"auxiliaryFiles": [
|
|
1409
1409
|
"openmrs-esm-patient-programs-app.js.map"
|
|
1410
1410
|
],
|
|
1411
|
-
"hash": "
|
|
1411
|
+
"hash": "9543a204b5ea005a",
|
|
1412
1412
|
"childrenByOrder": {}
|
|
1413
1413
|
},
|
|
1414
1414
|
{
|
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":{"fullWidth":false},"order":6},{"name":"programs-details-widget","slot":"patient-chart-programs-dashboard-slot","component":"programsDetailedSummary","order":6},{"name":"programs-summary-dashboard","slot":"patient-chart-dashboard-slot","component":"programsDashboardLink","meta":{"slot":"patient-chart-programs-dashboard-slot","path":"Programs"},"order":10}],"pages":[],"
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.2.0"},"extensions":[{"name":"programs-overview-widget","component":"programsOverview","meta":{"fullWidth":false},"order":6},{"name":"programs-details-widget","slot":"patient-chart-programs-dashboard-slot","component":"programsDetailedSummary","order":6},{"name":"programs-summary-dashboard","slot":"patient-chart-dashboard-slot","component":"programsDashboardLink","meta":{"slot":"patient-chart-programs-dashboard-slot","path":"Programs"},"order":10}],"pages":[],"workspaces2":[{"name":"programs-form-workspace","component":"programsFormWorkspace","window":"programs-form-window"}],"workspaceWindows2":[{"name":"programs-form-window","group":"patient-chart"}],"modals":[{"name":"program-delete-confirmation-modal","component":"deleteProgramConfirmationModal"}],"version":"11.3.1-pre.9458"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-patient-programs-app",
|
|
3
|
-
"version": "11.3.1-pre.
|
|
3
|
+
"version": "11.3.1-pre.9458",
|
|
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",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"swr": "2.x"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@openmrs/esm-patient-common-lib": "11.3.1-pre.
|
|
55
|
+
"@openmrs/esm-patient-common-lib": "11.3.1-pre.9458",
|
|
56
56
|
"webpack": "^5.99.9"
|
|
57
57
|
},
|
|
58
58
|
"stableVersion": "11.3.0"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { Layer, OverflowMenu, OverflowMenuItem } from '@carbon/react';
|
|
4
|
-
import {
|
|
4
|
+
import { launchWorkspace2, showModal, useLayoutType } from '@openmrs/esm-framework';
|
|
5
5
|
import styles from './programs-action-menu.scss';
|
|
6
6
|
|
|
7
7
|
interface ProgramActionsProps {
|
|
@@ -15,7 +15,7 @@ export const ProgramsActionMenu = ({ patientUuid, programEnrollmentId }: Program
|
|
|
15
15
|
|
|
16
16
|
const launchEditProgramsForm = useCallback(
|
|
17
17
|
() =>
|
|
18
|
-
|
|
18
|
+
launchWorkspace2('programs-form-workspace', {
|
|
19
19
|
workspaceTitle: t('editProgramEnrollment', 'Edit program enrollment'),
|
|
20
20
|
programEnrollmentId,
|
|
21
21
|
}),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import userEvent from '@testing-library/user-event';
|
|
3
3
|
import { render, screen, waitFor } from '@testing-library/react';
|
|
4
|
-
import {
|
|
4
|
+
import { launchWorkspace2, showModal, useLayoutType } from '@openmrs/esm-framework';
|
|
5
5
|
import { mockPatient } from 'tools';
|
|
6
6
|
import { ProgramsActionMenu } from './programs-action-menu.component';
|
|
7
7
|
|
|
8
8
|
const mockShowModal = jest.mocked(showModal);
|
|
9
9
|
const mockUseLayoutType = jest.mocked(useLayoutType);
|
|
10
|
-
const mockLaunchWorkspace = jest.mocked(
|
|
10
|
+
const mockLaunchWorkspace = jest.mocked(launchWorkspace2);
|
|
11
11
|
|
|
12
12
|
const testProps = {
|
|
13
13
|
programEnrollmentId: '123',
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
useConfig,
|
|
24
24
|
useLayoutType,
|
|
25
25
|
isDesktop as desktopLayout,
|
|
26
|
-
|
|
26
|
+
launchWorkspace2,
|
|
27
27
|
} from '@openmrs/esm-framework';
|
|
28
28
|
import { CardHeader, EmptyState, ErrorState } from '@openmrs/esm-patient-common-lib';
|
|
29
29
|
import { findLastState, usePrograms } from './programs.resource';
|
|
@@ -91,7 +91,7 @@ const ProgramsDetailedSummary: React.FC<ProgramsDetailedSummaryProps> = ({ patie
|
|
|
91
91
|
[enrollments, t],
|
|
92
92
|
);
|
|
93
93
|
|
|
94
|
-
const launchProgramsForm = useCallback(() =>
|
|
94
|
+
const launchProgramsForm = useCallback(() => launchWorkspace2('programs-form-workspace'), []);
|
|
95
95
|
|
|
96
96
|
const isEnrolledInAllPrograms = useMemo(() => {
|
|
97
97
|
if (!availablePrograms?.length || !enrollments?.length) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import userEvent from '@testing-library/user-event';
|
|
3
3
|
import { screen, within } from '@testing-library/react';
|
|
4
|
-
import { getDefaultsFromConfigSchema,
|
|
4
|
+
import { getDefaultsFromConfigSchema, launchWorkspace2, openmrsFetch, useConfig } from '@openmrs/esm-framework';
|
|
5
5
|
import { mockCareProgramsResponse, mockEnrolledInAllProgramsResponse, mockEnrolledProgramsResponse } from '__mocks__';
|
|
6
6
|
import { mockPatient, renderWithSwr, waitForLoadingToFinish } from 'tools';
|
|
7
7
|
import { type ConfigObject, configSchema } from '../config-schema';
|
|
8
8
|
import ProgramsDetailedSummary from './programs-detailed-summary.component';
|
|
9
9
|
|
|
10
|
-
const mockLaunchWorkspace = jest.mocked(
|
|
10
|
+
const mockLaunchWorkspace = jest.mocked(launchWorkspace2);
|
|
11
11
|
const mockUseConfig = jest.mocked(useConfig<ConfigObject>);
|
|
12
12
|
const mockOpenmrsFetch = openmrsFetch as jest.Mock;
|
|
13
13
|
|
|
@@ -16,8 +16,9 @@ import {
|
|
|
16
16
|
useAvailablePrograms,
|
|
17
17
|
useEnrollments,
|
|
18
18
|
} from './programs.resource';
|
|
19
|
-
import ProgramsForm from './programs-form.workspace';
|
|
19
|
+
import ProgramsForm, { type ProgramsFormProps } from './programs-form.workspace';
|
|
20
20
|
import { type ConfigObject, configSchema } from '../config-schema';
|
|
21
|
+
import { type PatientWorkspace2DefinitionProps } from '@openmrs/esm-patient-common-lib';
|
|
21
22
|
|
|
22
23
|
const mockUseAvailablePrograms = jest.mocked(useAvailablePrograms);
|
|
23
24
|
const mockUseEnrollments = jest.mocked(useEnrollments);
|
|
@@ -26,19 +27,22 @@ const mockUpdateProgramEnrollment = jest.mocked(updateProgramEnrollment);
|
|
|
26
27
|
const mockShowSnackbar = jest.mocked(showSnackbar);
|
|
27
28
|
const mockUseLocations = jest.mocked(useLocations);
|
|
28
29
|
const mockCloseWorkspace = jest.fn();
|
|
29
|
-
const mockCloseWorkspaceWithSavedChanges = jest.fn();
|
|
30
|
-
const mockPromptBeforeClosing = jest.fn();
|
|
31
30
|
const mockUseConfig = jest.mocked(useConfig<ConfigObject>);
|
|
32
31
|
|
|
33
|
-
const testProps = {
|
|
32
|
+
const testProps: PatientWorkspace2DefinitionProps<ProgramsFormProps, {}> = {
|
|
34
33
|
closeWorkspace: mockCloseWorkspace,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
groupProps: {
|
|
35
|
+
patientUuid: mockPatient.id,
|
|
36
|
+
patient: mockPatient,
|
|
37
|
+
visitContext: null,
|
|
38
|
+
mutateVisitContext: null,
|
|
39
|
+
},
|
|
40
|
+
workspaceName: '',
|
|
41
|
+
launchChildWorkspace: jest.fn(),
|
|
42
|
+
workspaceProps: {},
|
|
43
|
+
windowProps: {},
|
|
44
|
+
windowName: '',
|
|
45
|
+
isRootWorkspace: false,
|
|
42
46
|
};
|
|
43
47
|
|
|
44
48
|
jest.mock('./programs.resource', () => ({
|
|
@@ -111,7 +115,7 @@ describe('ProgramsForm', () => {
|
|
|
111
115
|
new AbortController(),
|
|
112
116
|
);
|
|
113
117
|
|
|
114
|
-
expect(
|
|
118
|
+
expect(mockCloseWorkspace).toHaveBeenCalledTimes(1);
|
|
115
119
|
expect(mockShowSnackbar).toHaveBeenCalledTimes(1);
|
|
116
120
|
expect(mockShowSnackbar).toHaveBeenCalledWith({
|
|
117
121
|
subtitle: 'It is now visible in the Programs table',
|
|
@@ -174,5 +178,9 @@ describe('ProgramsForm', () => {
|
|
|
174
178
|
});
|
|
175
179
|
|
|
176
180
|
function renderProgramsForm(programEnrollmentUuidToEdit?: string) {
|
|
177
|
-
|
|
181
|
+
const props = {
|
|
182
|
+
...testProps,
|
|
183
|
+
workspaceProps: { programEnrollmentId: programEnrollmentUuidToEdit },
|
|
184
|
+
};
|
|
185
|
+
render(<ProgramsForm {...props} />);
|
|
178
186
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback,
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import type { TFunction } from 'i18next';
|
|
@@ -28,8 +28,9 @@ import {
|
|
|
28
28
|
useConfig,
|
|
29
29
|
useLayoutType,
|
|
30
30
|
useSession,
|
|
31
|
+
Workspace2,
|
|
31
32
|
} from '@openmrs/esm-framework';
|
|
32
|
-
import { type
|
|
33
|
+
import { type PatientWorkspace2DefinitionProps } from '@openmrs/esm-patient-common-lib';
|
|
33
34
|
import { type ConfigObject } from '../config-schema';
|
|
34
35
|
import {
|
|
35
36
|
createProgramEnrollment,
|
|
@@ -40,7 +41,7 @@ import {
|
|
|
40
41
|
} from './programs.resource';
|
|
41
42
|
import styles from './programs-form.scss';
|
|
42
43
|
|
|
43
|
-
interface ProgramsFormProps
|
|
44
|
+
export interface ProgramsFormProps {
|
|
44
45
|
programEnrollmentId?: string;
|
|
45
46
|
}
|
|
46
47
|
|
|
@@ -55,12 +56,10 @@ const createProgramsFormSchema = (t: TFunction) =>
|
|
|
55
56
|
|
|
56
57
|
export type ProgramsFormData = z.infer<ReturnType<typeof createProgramsFormSchema>>;
|
|
57
58
|
|
|
58
|
-
const ProgramsForm: React.FC<ProgramsFormProps
|
|
59
|
+
const ProgramsForm: React.FC<PatientWorkspace2DefinitionProps<ProgramsFormProps, {}>> = ({
|
|
59
60
|
closeWorkspace,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
programEnrollmentId,
|
|
63
|
-
promptBeforeClosing,
|
|
61
|
+
groupProps: { patientUuid },
|
|
62
|
+
workspaceProps: { programEnrollmentId },
|
|
64
63
|
}) => {
|
|
65
64
|
const { t } = useTranslation();
|
|
66
65
|
const isTablet = useLayoutType() === 'tablet';
|
|
@@ -115,10 +114,6 @@ const ProgramsForm: React.FC<ProgramsFormProps> = ({
|
|
|
115
114
|
|
|
116
115
|
const selectedProgram = useWatch({ control, name: 'selectedProgram' });
|
|
117
116
|
|
|
118
|
-
useEffect(() => {
|
|
119
|
-
promptBeforeClosing(() => isDirty);
|
|
120
|
-
}, [isDirty, promptBeforeClosing]);
|
|
121
|
-
|
|
122
117
|
const onSubmit = useCallback(
|
|
123
118
|
async (data: ProgramsFormData) => {
|
|
124
119
|
const { selectedProgram, enrollmentDate, completionDate, enrollmentLocation, selectedProgramStatus } = data;
|
|
@@ -145,7 +140,7 @@ const ProgramsForm: React.FC<ProgramsFormProps> = ({
|
|
|
145
140
|
}
|
|
146
141
|
|
|
147
142
|
await mutateEnrollments();
|
|
148
|
-
|
|
143
|
+
closeWorkspace({ discardUnsavedChanges: true });
|
|
149
144
|
|
|
150
145
|
showSnackbar({
|
|
151
146
|
kind: 'success',
|
|
@@ -164,7 +159,7 @@ const ProgramsForm: React.FC<ProgramsFormProps> = ({
|
|
|
164
159
|
});
|
|
165
160
|
}
|
|
166
161
|
},
|
|
167
|
-
[
|
|
162
|
+
[closeWorkspace, currentEnrollment, currentState, mutateEnrollments, patientUuid, t],
|
|
168
163
|
);
|
|
169
164
|
|
|
170
165
|
const programName = (
|
|
@@ -331,36 +326,38 @@ const ProgramsForm: React.FC<ProgramsFormProps> = ({
|
|
|
331
326
|
}
|
|
332
327
|
|
|
333
328
|
return (
|
|
334
|
-
<
|
|
335
|
-
<
|
|
336
|
-
{
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
{formGroups.map((group, i) => (
|
|
346
|
-
<FormGroup style={group.style} legendText={group.legendText} key={i}>
|
|
347
|
-
<div className={styles.selectContainer}>{isTablet ? <Layer>{group.value}</Layer> : group.value}</div>
|
|
348
|
-
</FormGroup>
|
|
349
|
-
))}
|
|
350
|
-
</Stack>
|
|
351
|
-
<ButtonSet className={classNames(isTablet ? styles.tablet : styles.desktop)}>
|
|
352
|
-
<Button className={styles.button} kind="secondary" onClick={() => closeWorkspace()}>
|
|
353
|
-
{getCoreTranslation('cancel')}
|
|
354
|
-
</Button>
|
|
355
|
-
<Button className={styles.button} disabled={isSubmitting} kind="primary" type="submit">
|
|
356
|
-
{isSubmitting ? (
|
|
357
|
-
<InlineLoading description={t('saving', 'Saving') + '...'} />
|
|
358
|
-
) : (
|
|
359
|
-
<span>{t('saveAndClose', 'Save and close')}</span>
|
|
329
|
+
<Workspace2 title={t('programEnrollmentWorkspaceTitle', 'Program enrollment')} hasUnsavedChanges={isDirty}>
|
|
330
|
+
<Form className={styles.form} onSubmit={handleSubmit(onSubmit)}>
|
|
331
|
+
<Stack className={styles.formContainer} gap={7}>
|
|
332
|
+
{!availablePrograms.length && (
|
|
333
|
+
<InlineNotification
|
|
334
|
+
className={styles.notification}
|
|
335
|
+
kind="error"
|
|
336
|
+
lowContrast
|
|
337
|
+
subtitle={t('configurePrograms', 'Please configure programs to continue.')}
|
|
338
|
+
title={t('noProgramsConfigured', 'No programs configured')}
|
|
339
|
+
/>
|
|
360
340
|
)}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
341
|
+
{formGroups.map((group, i) => (
|
|
342
|
+
<FormGroup style={group.style} legendText={group.legendText} key={i}>
|
|
343
|
+
<div className={styles.selectContainer}>{isTablet ? <Layer>{group.value}</Layer> : group.value}</div>
|
|
344
|
+
</FormGroup>
|
|
345
|
+
))}
|
|
346
|
+
</Stack>
|
|
347
|
+
<ButtonSet className={classNames(isTablet ? styles.tablet : styles.desktop)}>
|
|
348
|
+
<Button className={styles.button} kind="secondary" onClick={() => closeWorkspace()}>
|
|
349
|
+
{getCoreTranslation('cancel')}
|
|
350
|
+
</Button>
|
|
351
|
+
<Button className={styles.button} disabled={isSubmitting} kind="primary" type="submit">
|
|
352
|
+
{isSubmitting ? (
|
|
353
|
+
<InlineLoading description={t('saving', 'Saving') + '...'} />
|
|
354
|
+
) : (
|
|
355
|
+
<span>{t('saveAndClose', 'Save and close')}</span>
|
|
356
|
+
)}
|
|
357
|
+
</Button>
|
|
358
|
+
</ButtonSet>
|
|
359
|
+
</Form>
|
|
360
|
+
</Workspace2>
|
|
364
361
|
);
|
|
365
362
|
};
|
|
366
363
|
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
type ConfigObject,
|
|
22
22
|
formatDate,
|
|
23
23
|
formatDatetime,
|
|
24
|
-
|
|
24
|
+
launchWorkspace2,
|
|
25
25
|
useConfig,
|
|
26
26
|
useLayoutType,
|
|
27
27
|
usePagination,
|
|
@@ -54,7 +54,7 @@ const ProgramsOverview: React.FC<ProgramsOverviewProps> = ({ basePath, patientUu
|
|
|
54
54
|
|
|
55
55
|
const { results: paginatedEnrollments, goTo, currentPage } = usePagination(enrollments ?? [], programsCount);
|
|
56
56
|
|
|
57
|
-
const launchProgramsForm = useCallback(() =>
|
|
57
|
+
const launchProgramsForm = useCallback(() => launchWorkspace2('programs-form-workspace'), []);
|
|
58
58
|
|
|
59
59
|
const tableHeaders = [
|
|
60
60
|
{
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import userEvent from '@testing-library/user-event';
|
|
3
3
|
import { screen, within } from '@testing-library/react';
|
|
4
|
-
import {
|
|
4
|
+
import { launchWorkspace2, openmrsFetch } from '@openmrs/esm-framework';
|
|
5
5
|
import { mockCareProgramsResponse, mockEnrolledInAllProgramsResponse, mockEnrolledProgramsResponse } from '__mocks__';
|
|
6
6
|
import { mockPatient, renderWithSwr, waitForLoadingToFinish } from 'tools';
|
|
7
7
|
import ProgramsOverview from './programs-overview.component';
|
|
8
8
|
|
|
9
9
|
const mockOpenmrsFetch = openmrsFetch as jest.Mock;
|
|
10
|
-
const mockLaunchWorkspace = jest.mocked(
|
|
10
|
+
const mockLaunchWorkspace = jest.mocked(launchWorkspace2);
|
|
11
11
|
|
|
12
12
|
const testProps = {
|
|
13
13
|
basePath: `/patient/${mockPatient.id}/chart`,
|
package/src/routes.json
CHANGED
|
@@ -30,11 +30,17 @@
|
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
32
|
"pages": [],
|
|
33
|
-
"
|
|
33
|
+
"workspaces2": [
|
|
34
34
|
{
|
|
35
35
|
"name": "programs-form-workspace",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
36
|
+
"component": "programsFormWorkspace",
|
|
37
|
+
"window": "programs-form-window"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"workspaceWindows2": [
|
|
41
|
+
{
|
|
42
|
+
"name": "programs-form-window",
|
|
43
|
+
"group": "patient-chart"
|
|
38
44
|
}
|
|
39
45
|
],
|
|
40
46
|
"modals": [
|