@openmrs/esm-patient-allergies-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/3357.js +1 -1
- package/dist/3357.js.map +1 -1
- package/dist/4341.js +1 -0
- package/dist/4341.js.map +1 -0
- package/dist/5563.js +1 -1
- package/dist/5563.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-patient-allergies-app.js +1 -1
- package/dist/openmrs-esm-patient-allergies-app.js.buildmanifest.json +35 -35
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/allergies/allergies-action-menu.component.tsx +3 -4
- package/src/allergies/allergies-detailed-summary.component.tsx +2 -2
- package/src/allergies/allergies-form/allergy-form.test.tsx +29 -14
- package/src/allergies/allergies-form/allergy-form.workspace.tsx +202 -192
- package/src/allergies/allergies-overview.component.tsx +2 -2
- package/src/index.ts +0 -1
- package/src/routes.json +8 -3
- package/dist/8803.js +0 -1
- package/dist/8803.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var _openmrs_esm_patient_allergies_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,p,f,d,c,h,m,v,g,b,y,w,_={30615:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(3753),t.e(5641),t.e(5434),t.e(600),t.e(3357)]).then((()=>()=>t(53357)))},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-allergies-app:",j.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==n+o){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+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),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 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-allergies-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},l=o[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(o[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","8.0.1-pre.3518",(()=>Promise.all([j.e(8555),j.e(3753),j.e(5670),j.e(5641),j.e(8010),j.e(5434),j.e(8382),j.e(600)]).then((()=>()=>j(55670))))),l("@openmrs/esm-patient-common-lib","11.3.1-pre.
|
|
1
|
+
var _openmrs_esm_patient_allergies_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,p,f,d,c,h,m,v,g,b,y,w,_={30615:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(3753),t.e(5641),t.e(5434),t.e(600),t.e(3357)]).then((()=>()=>t(53357)))},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-allergies-app:",j.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==n+o){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+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),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 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-allergies-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},l=o[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(o[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","8.0.1-pre.3518",(()=>Promise.all([j.e(8555),j.e(3753),j.e(5670),j.e(5641),j.e(8010),j.e(5434),j.e(8382),j.e(600)]).then((()=>()=>j(55670))))),l("@openmrs/esm-patient-common-lib","11.3.1-pre.9458",(()=>Promise.all([j.e(8555),j.e(3753),j.e(5641),j.e(8010),j.e(5434),j.e(8382),j.e(600),j.e(4341)]).then((()=>()=>j(94341))))),l("dayjs","1.11.13",(()=>j.e(3464).then((()=>()=>j(23464))))),l("react-i18next","16.0.0",(()=>Promise.all([j.e(6336),j.e(5641)]).then((()=>()=>j(16336))))),l("react-router-dom","6.16.0",(()=>Promise.all([j.e(2913),j.e(5641)]).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("swr/_internal","2.2.5",(()=>Promise.all([j.e(2372),j.e(5641)]).then((()=>()=>j(42372))))),l("swr/immutable","2.2.5",(()=>Promise.all([j.e(5641),j.e(5434),j.e(7495)]).then((()=>()=>j(29876))))),l("swr/infinite","2.2.5",(()=>Promise.all([j.e(5641),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})(),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],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"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(l=e[o]))[0]?"-":(n>0?".":"")+(n=2,l);return t}var a=[];for(o=1;o<e.length;o++){var l=e[o];a.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?a.pop()+" "+a.pop():i(l))}return s();function s(){return a.pop().replace(/^\((.+)\)$/,"$1")}},l=(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,s=!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!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 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?l(h,r):!c())}return!!c()},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&&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(!s(r,t))return m(e,t,a);var i=f(r,t,n);return l(o,i)||h(d(r,t,i,o)),u(r[t][i])})),g={},b={75641:()=>v("default","react",!1,[1,18,2,0],(()=>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))))),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))))),46372:()=>v("default","dayjs",!1,[1,1],(()=>j.e(3464).then((()=>()=>j(23464))))),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(8555),j.e(5670),j.e(8010),j.e(8382)]).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(8555),j.e(8010),j.e(8382),j.e(4341)]).then((()=>()=>j(94341)))))},y={600:[54440,72339],3357:[36274],5434:[55434],5641:[75641],8010:[88010],8382:[8877,24818,46372,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={9978: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(/^(5434|5641|600|8010|8382)$/.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,l]=t,s=0;if(a.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<a.length;s++)o=a[s],j.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_patient_allergies_app=globalThis.webpackChunk_openmrs_esm_patient_allergies_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),j.nc=void 0;var S=j(30615);_openmrs_esm_patient_allergies_app=S})();
|
|
@@ -375,10 +375,10 @@
|
|
|
375
375
|
"initial": false,
|
|
376
376
|
"entry": false,
|
|
377
377
|
"recorded": false,
|
|
378
|
-
"size":
|
|
378
|
+
"size": 136018,
|
|
379
379
|
"sizes": {
|
|
380
380
|
"consume-shared": 42,
|
|
381
|
-
"javascript":
|
|
381
|
+
"javascript": 135976
|
|
382
382
|
},
|
|
383
383
|
"names": [],
|
|
384
384
|
"idHints": [],
|
|
@@ -391,7 +391,7 @@
|
|
|
391
391
|
"auxiliaryFiles": [
|
|
392
392
|
"3357.js.map"
|
|
393
393
|
],
|
|
394
|
-
"hash": "
|
|
394
|
+
"hash": "1e17639001ff07a9",
|
|
395
395
|
"childrenByOrder": {}
|
|
396
396
|
},
|
|
397
397
|
{
|
|
@@ -579,6 +579,31 @@
|
|
|
579
579
|
"hash": "ea28118d8615f5b2",
|
|
580
580
|
"childrenByOrder": {}
|
|
581
581
|
},
|
|
582
|
+
{
|
|
583
|
+
"rendered": true,
|
|
584
|
+
"initial": false,
|
|
585
|
+
"entry": false,
|
|
586
|
+
"recorded": false,
|
|
587
|
+
"reason": "reused as split chunk (cache group: default)",
|
|
588
|
+
"size": 256842,
|
|
589
|
+
"sizes": {
|
|
590
|
+
"javascript": 256842
|
|
591
|
+
},
|
|
592
|
+
"names": [],
|
|
593
|
+
"idHints": [],
|
|
594
|
+
"runtime": [
|
|
595
|
+
"@openmrs/esm-patient-allergies-app",
|
|
596
|
+
"main"
|
|
597
|
+
],
|
|
598
|
+
"files": [
|
|
599
|
+
"4341.js"
|
|
600
|
+
],
|
|
601
|
+
"auxiliaryFiles": [
|
|
602
|
+
"4341.js.map"
|
|
603
|
+
],
|
|
604
|
+
"hash": "469ea904ea86643f",
|
|
605
|
+
"childrenByOrder": {}
|
|
606
|
+
},
|
|
582
607
|
{
|
|
583
608
|
"rendered": true,
|
|
584
609
|
"initial": false,
|
|
@@ -737,9 +762,9 @@
|
|
|
737
762
|
"initial": false,
|
|
738
763
|
"entry": false,
|
|
739
764
|
"recorded": false,
|
|
740
|
-
"size":
|
|
765
|
+
"size": 72548,
|
|
741
766
|
"sizes": {
|
|
742
|
-
"javascript":
|
|
767
|
+
"javascript": 72548
|
|
743
768
|
},
|
|
744
769
|
"names": [],
|
|
745
770
|
"idHints": [],
|
|
@@ -753,7 +778,7 @@
|
|
|
753
778
|
"auxiliaryFiles": [
|
|
754
779
|
"5563.js.map"
|
|
755
780
|
],
|
|
756
|
-
"hash": "
|
|
781
|
+
"hash": "1111a45284e4f718",
|
|
757
782
|
"childrenByOrder": {}
|
|
758
783
|
},
|
|
759
784
|
{
|
|
@@ -1288,10 +1313,10 @@
|
|
|
1288
1313
|
"initial": true,
|
|
1289
1314
|
"entry": true,
|
|
1290
1315
|
"recorded": false,
|
|
1291
|
-
"size":
|
|
1316
|
+
"size": 2872278,
|
|
1292
1317
|
"sizes": {
|
|
1293
1318
|
"consume-shared": 210,
|
|
1294
|
-
"javascript":
|
|
1319
|
+
"javascript": 2848876,
|
|
1295
1320
|
"share-init": 420,
|
|
1296
1321
|
"runtime": 22772
|
|
1297
1322
|
},
|
|
@@ -1308,32 +1333,7 @@
|
|
|
1308
1333
|
"auxiliaryFiles": [
|
|
1309
1334
|
"main.js.map"
|
|
1310
1335
|
],
|
|
1311
|
-
"hash": "
|
|
1312
|
-
"childrenByOrder": {}
|
|
1313
|
-
},
|
|
1314
|
-
{
|
|
1315
|
-
"rendered": true,
|
|
1316
|
-
"initial": false,
|
|
1317
|
-
"entry": false,
|
|
1318
|
-
"recorded": false,
|
|
1319
|
-
"reason": "reused as split chunk (cache group: default)",
|
|
1320
|
-
"size": 251962,
|
|
1321
|
-
"sizes": {
|
|
1322
|
-
"javascript": 251962
|
|
1323
|
-
},
|
|
1324
|
-
"names": [],
|
|
1325
|
-
"idHints": [],
|
|
1326
|
-
"runtime": [
|
|
1327
|
-
"@openmrs/esm-patient-allergies-app",
|
|
1328
|
-
"main"
|
|
1329
|
-
],
|
|
1330
|
-
"files": [
|
|
1331
|
-
"8803.js"
|
|
1332
|
-
],
|
|
1333
|
-
"auxiliaryFiles": [
|
|
1334
|
-
"8803.js.map"
|
|
1335
|
-
],
|
|
1336
|
-
"hash": "637371b6d2033c52",
|
|
1336
|
+
"hash": "e74a646bac7209da",
|
|
1337
1337
|
"childrenByOrder": {}
|
|
1338
1338
|
},
|
|
1339
1339
|
{
|
|
@@ -1538,7 +1538,7 @@
|
|
|
1538
1538
|
"auxiliaryFiles": [
|
|
1539
1539
|
"openmrs-esm-patient-allergies-app.js.map"
|
|
1540
1540
|
],
|
|
1541
|
-
"hash": "
|
|
1541
|
+
"hash": "0f5fa2c2e64eaeb7",
|
|
1542
1542
|
"childrenByOrder": {}
|
|
1543
1543
|
}
|
|
1544
1544
|
]
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"allergy-tile","component":"allergiesTile","slot":"patient-details-header-slot","online":true,"offline":true,"order":3},{"name":"allergies-list","component":"allergiesList","slot":"allergy-list-pills-slot"},{"name":"allergies-details-widget","component":"allergiesDetailedSummary","slot":"patient-chart-allergies-dashboard-slot","online":true,"offline":true},{"name":"allergies-summary-dashboard","component":"allergiesDashboardLink","slot":"patient-chart-dashboard-slot","online":true,"offline":true,"order":6,"meta":{"slot":"patient-chart-allergies-dashboard-slot","path":"Allergies"}}],"modals":[{"name":"delete-allergy-modal","component":"deleteAllergyModal"}],"
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"allergy-tile","component":"allergiesTile","slot":"patient-details-header-slot","online":true,"offline":true,"order":3},{"name":"allergies-list","component":"allergiesList","slot":"allergy-list-pills-slot"},{"name":"allergies-details-widget","component":"allergiesDetailedSummary","slot":"patient-chart-allergies-dashboard-slot","online":true,"offline":true},{"name":"allergies-summary-dashboard","component":"allergiesDashboardLink","slot":"patient-chart-dashboard-slot","online":true,"offline":true,"order":6,"meta":{"slot":"patient-chart-allergies-dashboard-slot","path":"Allergies"}}],"modals":[{"name":"delete-allergy-modal","component":"deleteAllergyModal"}],"workspaces2":[{"name":"patient-allergy-form-workspace","component":"allergyFormWorkspace","window":"patient-allergy-form-window"}],"workspaceWindows2":[{"name":"patient-allergy-form-window","group":"patient-chart"}],"version":"11.3.1-pre.9458"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-patient-allergies-app",
|
|
3
|
-
"version": "11.3.1-pre.
|
|
3
|
+
"version": "11.3.1-pre.9458",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Patient allergies microfrontend for the OpenMRS SPA",
|
|
6
6
|
"browser": "dist/openmrs-esm-patient-allergies-app.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"swr": "2.x"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@openmrs/esm-patient-common-lib": "11.3.1-pre.
|
|
54
|
+
"@openmrs/esm-patient-common-lib": "11.3.1-pre.9458",
|
|
55
55
|
"webpack": "^5.99.9"
|
|
56
56
|
},
|
|
57
57
|
"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 { type Allergy } from '../types';
|
|
6
6
|
import { patientAllergiesFormWorkspace } from '../constants';
|
|
7
7
|
import styles from './allergies-action-menu.scss';
|
|
@@ -16,12 +16,11 @@ export const AllergiesActionMenu = ({ allergy, patientUuid }: allergiesActionMen
|
|
|
16
16
|
const isTablet = useLayoutType() === 'tablet';
|
|
17
17
|
|
|
18
18
|
const launchEditAllergiesForm = useCallback(() => {
|
|
19
|
-
|
|
20
|
-
workspaceTitle: t('editAllergy', 'Edit an allergy'),
|
|
19
|
+
launchWorkspace2(patientAllergiesFormWorkspace, {
|
|
21
20
|
allergy,
|
|
22
21
|
formContext: 'editing',
|
|
23
22
|
});
|
|
24
|
-
}, [allergy
|
|
23
|
+
}, [allergy]);
|
|
25
24
|
|
|
26
25
|
const launchDeleteAllergyDialog = (allergyId: string) => {
|
|
27
26
|
const dispose = showModal('delete-allergy-modal', {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
TableHeader,
|
|
14
14
|
TableRow,
|
|
15
15
|
} from '@carbon/react';
|
|
16
|
-
import { AddIcon, formatDate,
|
|
16
|
+
import { AddIcon, formatDate, launchWorkspace2, parseDate, useLayoutType } from '@openmrs/esm-framework';
|
|
17
17
|
import { CardHeader, EmptyState, ErrorState } from '@openmrs/esm-patient-common-lib';
|
|
18
18
|
import { patientAllergiesFormWorkspace } from '../constants';
|
|
19
19
|
import { useAllergies } from './allergy-intolerance.resource';
|
|
@@ -33,7 +33,7 @@ const AllergiesDetailedSummary: React.FC<AllergiesDetailedSummaryProps> = ({ pat
|
|
|
33
33
|
const displayText = t('allergyIntolerances', 'allergy intolerances');
|
|
34
34
|
const headerTitle = t('allergies', 'Allergies');
|
|
35
35
|
|
|
36
|
-
const launchAllergiesForm = useCallback(() =>
|
|
36
|
+
const launchAllergiesForm = useCallback(() => launchWorkspace2(patientAllergiesFormWorkspace), []);
|
|
37
37
|
|
|
38
38
|
const tableHeaders = [
|
|
39
39
|
{ key: 'display', header: t('allergen', 'Allergen') },
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import userEvent from '@testing-library/user-event';
|
|
3
3
|
import { screen, render } from '@testing-library/react';
|
|
4
4
|
import { getDefaultsFromConfigSchema, showSnackbar, useConfig } from '@openmrs/esm-framework';
|
|
5
|
+
import { type PatientWorkspace2DefinitionProps } from '@openmrs/esm-patient-common-lib';
|
|
5
6
|
import { mockAllergens, mockAllergicReactions, mockAllergy } from '__mocks__';
|
|
6
7
|
import { mockPatient } from 'tools';
|
|
7
8
|
import {
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
updatePatientAllergy,
|
|
13
14
|
} from './allergy-form.resource';
|
|
14
15
|
import { type AllergiesConfigObject, configSchema } from '../../config-schema';
|
|
15
|
-
import AllergyForm from './allergy-form.workspace';
|
|
16
|
+
import AllergyForm, { type AllergyFormWorkspaceProps } from './allergy-form.workspace';
|
|
16
17
|
|
|
17
18
|
const mockSaveAllergy = jest.mocked(saveAllergy);
|
|
18
19
|
const mockShowSnackbar = jest.mocked(showSnackbar);
|
|
@@ -197,21 +198,35 @@ describe('AllergyForm', () => {
|
|
|
197
198
|
});
|
|
198
199
|
});
|
|
199
200
|
|
|
200
|
-
function renderAllergyForm(
|
|
201
|
-
const defaultProps = {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
201
|
+
function renderAllergyForm(workspaceProps: Partial<AllergyFormWorkspaceProps> = {}) {
|
|
202
|
+
const defaultProps: PatientWorkspace2DefinitionProps<AllergyFormWorkspaceProps, {}> = {
|
|
203
|
+
workspaceProps: {
|
|
204
|
+
allergy: null,
|
|
205
|
+
formContext: 'creating' as 'creating' | 'editing',
|
|
206
|
+
},
|
|
207
|
+
groupProps: {
|
|
208
|
+
patient: mockPatient,
|
|
209
|
+
patientUuid: mockPatient.id,
|
|
210
|
+
visitContext: null,
|
|
211
|
+
mutateVisitContext: null,
|
|
212
|
+
},
|
|
213
|
+
closeWorkspace: jest.fn(),
|
|
214
|
+
launchChildWorkspace: jest.fn(),
|
|
215
|
+
windowProps: {},
|
|
216
|
+
workspaceName: '',
|
|
217
|
+
windowName: '',
|
|
218
|
+
isRootWorkspace: false,
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
const props = {
|
|
222
|
+
...defaultProps,
|
|
223
|
+
workspaceProps: {
|
|
224
|
+
...defaultProps.workspaceProps,
|
|
225
|
+
...workspaceProps,
|
|
226
|
+
},
|
|
212
227
|
};
|
|
213
228
|
|
|
214
|
-
render(<AllergyForm {...
|
|
229
|
+
render(<AllergyForm {...props} />);
|
|
215
230
|
}
|
|
216
231
|
|
|
217
232
|
function buildExpectedPayload(allergen, reaction, severity, comment) {
|