@openmrs/esm-patient-attachments-app 11.3.1-pre.9541 → 11.3.1-pre.9550

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_attachments_app;(()=>{"use strict";var e,t,r,n,o,a,i,s,l,u,p,f,c,d,h,m,v,g,b,y,w,_={66737:(e,t,r)=>{var n={"./start":()=>Promise.all([r.e(2467),r.e(5537),r.e(5641),r.e(600),r.e(4290)]).then((()=>()=>r(44290)))},o=(e,t)=>(r.R=t,t=r.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),r.R=void 0,t),a=(e,t)=>{if(r.S){var n="default",o=r.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return r.S[n]=e,r.I(n,t)}};r.d(t,{get:()=>o,init:()=>a})}},P={};function j(e){var t=P[e];if(void 0!==t)return t.exports;var r=P[e]={id:e,exports:{}};return _[e].call(r.exports,r,r.exports,j),r.exports}j.m=_,j.c=P,j.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return j.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,j.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var o=Object.create(null);j.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var i=2&n&&r;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,j.d(o,a),o},j.d=(e,t)=>{for(var r in t)j.o(t,r)&&!j.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},j.f={},j.e=e=>Promise.all(Object.keys(j.f).reduce(((t,r)=>(j.f[r](e,t),t)),[])),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,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},n="@openmrs/esm-patient-attachments-app:",j.l=(e,t,o,a)=>{if(r[e])r[e].push(t);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),r[e]=[t];var f=(t,n)=>{i.onerror=i.onload=null,clearTimeout(c);var o=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),t)return t(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),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={},t={};j.I=(r,n)=>{n||(n=[]);var o=t[r];if(o||(o=t[r]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[r])return e[r];j.o(j.S,r)||(j.S[r]={});var a=j.S[r],i="@openmrs/esm-patient-attachments-app",s=(e,t,r,n)=>{var o=a[e]=a[e]||{},s=o[t];(!s||!s.loaded&&(!n!=!s.eager?n:i>s.from))&&(o[t]={get:r,from:i,eager:!!n})},l=[];return"default"===r&&(s("@openmrs/esm-framework","8.0.1-pre.3581",(()=>Promise.all([j.e(8743),j.e(2467),j.e(5670),j.e(5641),j.e(5434),j.e(8541),j.e(600)]).then((()=>()=>j(55670))))),s("@openmrs/esm-patient-common-lib","11.3.1-pre.9541",(()=>Promise.all([j.e(8743),j.e(2467),j.e(5641),j.e(5434),j.e(8541),j.e(600),j.e(4341)]).then((()=>()=>j(94341))))),s("dayjs","1.11.13",(()=>j.e(3464).then((()=>()=>j(23464))))),s("react-i18next","16.0.0",(()=>Promise.all([j.e(6336),j.e(5641)]).then((()=>()=>j(16336))))),s("react-router-dom","6.16.0",(()=>Promise.all([j.e(2913),j.e(5641)]).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(5641)]).then((()=>()=>j(42372))))),s("swr/immutable","2.2.5",(()=>Promise.all([j.e(5641),j.e(5434),j.e(7495)]).then((()=>()=>j(29876))))),s("swr/infinite","2.2.5",(()=>Promise.all([j.e(5641),j.e(5434),j.e(89)]).then((()=>()=>j(52470)))))),e[r]=l.length?Promise.all(l).then((()=>e[r]=1)):1}}})(),(()=>{var e;j.g.importScripts&&(e=j.g.location+"");var t=j.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[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 t=e=>e.split(".").map((e=>+e==e?+e:e)),r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=r[1]?t(r[1]):[];return r[2]&&(n.length++,n.push.apply(n,t(r[2]))),r[3]&&(n.push([]),n.push.apply(n,t(r[3]))),n},a=(e,t)=>{e=o(e),t=o(t);for(var r=0;;){if(r>=e.length)return r<t.length&&"u"!=(typeof t[r])[0];var n=e[r],a=(typeof n)[0];if(r>=t.length)return"u"==a;var i=t[r],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;r++}},i=e=>{var t=e[0],r="";if(1===e.length)return"*";if(t+.5){r+=0==t?">=":-1==t?"<":1==t?"^":2==t?"~":t>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,r+="u"==(typeof(s=e[o]))[0]?"-":(n>0?".":"")+(n=2,s);return r}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,t)=>{if(0 in e){t=o(t);var r=e[0],n=r<0;n&&(r=-r-1);for(var a=0,i=1,l=!0;;i++,a++){var u,p,f=i<e.length?(typeof e[i])[0]:"";if(a>=t.length||"o"==(p=(typeof(u=t[a]))[0]))return!l||("u"==f?i>r&&!n:""==f!=n);if("u"==p){if(!l||"u"!=f)return!1}else if(l)if(f==p)if(i<=r){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<=r)return!1;l=!1,i--}else{if(i<=r||p<f!=n)return!1;l=!1}else"s"!=f&&"n"!=f&&(l=!1,i--)}}var c=[],d=c.pop.bind(c);for(a=1;a<e.length;a++){var h=e[a];c.push(1==h?d()|d():2==h?d()&d():h?s(h,t):!d())}return!!d()},l=(e,t)=>e&&j.o(e,t),u=e=>(e.loaded=1,e.get()),p=e=>Object.keys(e).reduce(((t,r)=>(e[r].eager&&(t[r]=e[r]),t)),{}),f=(e,t,r)=>{var n=r?p(e[t]):e[t];return Object.keys(n).reduce(((e,t)=>!e||!n[e].loaded&&a(e,t)?t:e),0)},c=(e,t,r,n)=>"Unsatisfied version "+r+" from "+(r&&e[t][r].from)+" of shared singleton module "+t+" (required "+i(n)+")",d=e=>{throw new Error(e)},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},m=(e,t,r)=>r?r():((e,t)=>d("Shared module "+t+" doesn't exist in shared scope "+e))(e,t),v=(e=>function(t,r,n,o,a){var i=j.I(t);return i&&i.then&&!n?i.then(e.bind(e,t,j.S[t],r,!1,o,a)):e(t,j.S[t],r,n,o,a)})(((e,t,r,n,o,a)=>{if(!l(t,r))return m(e,r,a);var i=f(t,r,n);return s(o,i)||h(c(t,r,i,o)),u(t[r][i])})),g={},b={75641:()=>v("default","react",!1,[1,18,2,0],(()=>j.e(4041).then((()=>()=>j(14041))))),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))))),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(5434),j.e(8541)]).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(5434),j.e(8541),j.e(4341)]).then((()=>()=>j(94341)))))},y={600:[54440,72339],4290:[36274],5434:[55434],5641:[75641],8541:[8877,24818,46372,88010,98394]},w={},j.f.consumes=(e,t)=>{j.o(y,e)&&y[e].forEach((e=>{if(j.o(g,e))return t.push(g[e]);if(!w[e]){var r=t=>{g[e]=0,j.m[e]=r=>{delete j.c[e],r.exports=t()}};w[e]=!0;var n=t=>{delete g[e],j.m[e]=r=>{throw delete j.c[e],t}};try{var o=b[e]();o.then?t.push(g[e]=o.then(r).catch(n)):r(o)}catch(e){n(e)}}}))},(()=>{var e={5536:0};j.f.j=(t,r)=>{var n=j.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else if(/^((56|85)41|5434|600)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=o);var a=j.p+j.u(t),i=new Error;j.l(a,(r=>{if(j.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;i.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,o,[a,i,s]=r,l=0;if(a.some((t=>0!==e[t]))){for(n in i)j.o(i,n)&&(j.m[n]=i[n]);s&&s(j)}for(t&&t(r);l<a.length;l++)o=a[l],j.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),j.nc=void 0;var S=j(66737);_openmrs_esm_patient_attachments_app=S})();
1
+ var _openmrs_esm_patient_attachments_app;(()=>{"use strict";var e,t,r,n,o,a,i,s,l,u,p,f,c,d,h,m,v,g,b,y,w,_={66737:(e,t,r)=>{var n={"./start":()=>Promise.all([r.e(2467),r.e(5537),r.e(5641),r.e(600),r.e(4290)]).then((()=>()=>r(44290)))},o=(e,t)=>(r.R=t,t=r.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),r.R=void 0,t),a=(e,t)=>{if(r.S){var n="default",o=r.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return r.S[n]=e,r.I(n,t)}};r.d(t,{get:()=>o,init:()=>a})}},P={};function j(e){var t=P[e];if(void 0!==t)return t.exports;var r=P[e]={id:e,exports:{}};return _[e].call(r.exports,r,r.exports,j),r.exports}j.m=_,j.c=P,j.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return j.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,j.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var o=Object.create(null);j.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var i=2&n&&r;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,j.d(o,a),o},j.d=(e,t)=>{for(var r in t)j.o(t,r)&&!j.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},j.f={},j.e=e=>Promise.all(Object.keys(j.f).reduce(((t,r)=>(j.f[r](e,t),t)),[])),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,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},n="@openmrs/esm-patient-attachments-app:",j.l=(e,t,o,a)=>{if(r[e])r[e].push(t);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),r[e]=[t];var f=(t,n)=>{i.onerror=i.onload=null,clearTimeout(c);var o=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),t)return t(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),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={},t={};j.I=(r,n)=>{n||(n=[]);var o=t[r];if(o||(o=t[r]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[r])return e[r];j.o(j.S,r)||(j.S[r]={});var a=j.S[r],i="@openmrs/esm-patient-attachments-app",s=(e,t,r,n)=>{var o=a[e]=a[e]||{},s=o[t];(!s||!s.loaded&&(!n!=!s.eager?n:i>s.from))&&(o[t]={get:r,from:i,eager:!!n})},l=[];return"default"===r&&(s("@openmrs/esm-framework","8.0.1-pre.3592",(()=>Promise.all([j.e(9735),j.e(2467),j.e(5670),j.e(5641),j.e(5434),j.e(8541),j.e(600)]).then((()=>()=>j(55670))))),s("@openmrs/esm-patient-common-lib","11.3.1-pre.9550",(()=>Promise.all([j.e(9735),j.e(2467),j.e(5641),j.e(5434),j.e(8541),j.e(600),j.e(4341)]).then((()=>()=>j(94341))))),s("dayjs","1.11.13",(()=>j.e(3464).then((()=>()=>j(23464))))),s("react-i18next","16.0.0",(()=>Promise.all([j.e(6336),j.e(5641)]).then((()=>()=>j(16336))))),s("react-router-dom","6.16.0",(()=>Promise.all([j.e(2913),j.e(5641)]).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(5641)]).then((()=>()=>j(42372))))),s("swr/immutable","2.2.5",(()=>Promise.all([j.e(5641),j.e(5434),j.e(7495)]).then((()=>()=>j(29876))))),s("swr/infinite","2.2.5",(()=>Promise.all([j.e(5641),j.e(5434),j.e(89)]).then((()=>()=>j(52470)))))),e[r]=l.length?Promise.all(l).then((()=>e[r]=1)):1}}})(),(()=>{var e;j.g.importScripts&&(e=j.g.location+"");var t=j.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[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 t=e=>e.split(".").map((e=>+e==e?+e:e)),r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=r[1]?t(r[1]):[];return r[2]&&(n.length++,n.push.apply(n,t(r[2]))),r[3]&&(n.push([]),n.push.apply(n,t(r[3]))),n},a=(e,t)=>{e=o(e),t=o(t);for(var r=0;;){if(r>=e.length)return r<t.length&&"u"!=(typeof t[r])[0];var n=e[r],a=(typeof n)[0];if(r>=t.length)return"u"==a;var i=t[r],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;r++}},i=e=>{var t=e[0],r="";if(1===e.length)return"*";if(t+.5){r+=0==t?">=":-1==t?"<":1==t?"^":2==t?"~":t>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,r+="u"==(typeof(s=e[o]))[0]?"-":(n>0?".":"")+(n=2,s);return r}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,t)=>{if(0 in e){t=o(t);var r=e[0],n=r<0;n&&(r=-r-1);for(var a=0,i=1,l=!0;;i++,a++){var u,p,f=i<e.length?(typeof e[i])[0]:"";if(a>=t.length||"o"==(p=(typeof(u=t[a]))[0]))return!l||("u"==f?i>r&&!n:""==f!=n);if("u"==p){if(!l||"u"!=f)return!1}else if(l)if(f==p)if(i<=r){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<=r)return!1;l=!1,i--}else{if(i<=r||p<f!=n)return!1;l=!1}else"s"!=f&&"n"!=f&&(l=!1,i--)}}var c=[],d=c.pop.bind(c);for(a=1;a<e.length;a++){var h=e[a];c.push(1==h?d()|d():2==h?d()&d():h?s(h,t):!d())}return!!d()},l=(e,t)=>e&&j.o(e,t),u=e=>(e.loaded=1,e.get()),p=e=>Object.keys(e).reduce(((t,r)=>(e[r].eager&&(t[r]=e[r]),t)),{}),f=(e,t,r)=>{var n=r?p(e[t]):e[t];return Object.keys(n).reduce(((e,t)=>!e||!n[e].loaded&&a(e,t)?t:e),0)},c=(e,t,r,n)=>"Unsatisfied version "+r+" from "+(r&&e[t][r].from)+" of shared singleton module "+t+" (required "+i(n)+")",d=e=>{throw new Error(e)},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},m=(e,t,r)=>r?r():((e,t)=>d("Shared module "+t+" doesn't exist in shared scope "+e))(e,t),v=(e=>function(t,r,n,o,a){var i=j.I(t);return i&&i.then&&!n?i.then(e.bind(e,t,j.S[t],r,!1,o,a)):e(t,j.S[t],r,n,o,a)})(((e,t,r,n,o,a)=>{if(!l(t,r))return m(e,r,a);var i=f(t,r,n);return s(o,i)||h(c(t,r,i,o)),u(t[r][i])})),g={},b={75641:()=>v("default","react",!1,[1,18,2,0],(()=>j.e(4041).then((()=>()=>j(14041))))),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))))),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(9735),j.e(5670),j.e(5434),j.e(8541)]).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(9735),j.e(5434),j.e(8541),j.e(4341)]).then((()=>()=>j(94341)))))},y={600:[54440,72339],4290:[36274],5434:[55434],5641:[75641],8541:[8877,24818,46372,88010,98394]},w={},j.f.consumes=(e,t)=>{j.o(y,e)&&y[e].forEach((e=>{if(j.o(g,e))return t.push(g[e]);if(!w[e]){var r=t=>{g[e]=0,j.m[e]=r=>{delete j.c[e],r.exports=t()}};w[e]=!0;var n=t=>{delete g[e],j.m[e]=r=>{throw delete j.c[e],t}};try{var o=b[e]();o.then?t.push(g[e]=o.then(r).catch(n)):r(o)}catch(e){n(e)}}}))},(()=>{var e={5536:0};j.f.j=(t,r)=>{var n=j.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else if(/^((56|85)41|5434|600)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=o);var a=j.p+j.u(t),i=new Error;j.l(a,(r=>{if(j.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;i.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,o,[a,i,s]=r,l=0;if(a.some((t=>0!==e[t]))){for(n in i)j.o(i,n)&&(j.m[n]=i[n]);s&&s(j)}for(t&&t(r);l<a.length;l++)o=a[l],j.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),j.nc=void 0;var S=j(66737);_openmrs_esm_patient_attachments_app=S})();
@@ -64,7 +64,7 @@
64
64
  ],
65
65
  "files": [],
66
66
  "auxiliaryFiles": [],
67
- "hash": "dd78c246ed3b7608",
67
+ "hash": "808afa50595e23e9",
68
68
  "childrenByOrder": {}
69
69
  },
70
70
  {
@@ -567,9 +567,9 @@
567
567
  "initial": false,
568
568
  "entry": false,
569
569
  "recorded": false,
570
- "size": 169951,
570
+ "size": 170017,
571
571
  "sizes": {
572
- "javascript": 169909,
572
+ "javascript": 169975,
573
573
  "consume-shared": 42
574
574
  },
575
575
  "names": [],
@@ -583,7 +583,7 @@
583
583
  "auxiliaryFiles": [
584
584
  "4290.js.map"
585
585
  ],
586
- "hash": "addbdfa8ca076e25",
586
+ "hash": "2c82bc56ab4a0bbc",
587
587
  "childrenByOrder": {}
588
588
  },
589
589
  {
@@ -591,9 +591,9 @@
591
591
  "initial": false,
592
592
  "entry": false,
593
593
  "recorded": false,
594
- "size": 2400,
594
+ "size": 2411,
595
595
  "sizes": {
596
- "javascript": 2400
596
+ "javascript": 2411
597
597
  },
598
598
  "names": [],
599
599
  "idHints": [],
@@ -605,7 +605,7 @@
605
605
  "4300.js"
606
606
  ],
607
607
  "auxiliaryFiles": [],
608
- "hash": "75b5de12f4e9c91c",
608
+ "hash": "25e476f3f565be3e",
609
609
  "childrenByOrder": {}
610
610
  },
611
611
  {
@@ -652,7 +652,7 @@
652
652
  "auxiliaryFiles": [
653
653
  "4341.js.map"
654
654
  ],
655
- "hash": "a9a117dbc1c3bde8",
655
+ "hash": "da89b9c94d49b941",
656
656
  "childrenByOrder": {}
657
657
  },
658
658
  {
@@ -832,7 +832,7 @@
832
832
  "auxiliaryFiles": [
833
833
  "openmrs-esm-patient-attachments-app.js.map"
834
834
  ],
835
- "hash": "ab73f71a471a10a4",
835
+ "hash": "89773f31f747f06e",
836
836
  "childrenByOrder": {}
837
837
  },
838
838
  {
@@ -928,7 +928,7 @@
928
928
  "auxiliaryFiles": [
929
929
  "5670.js.map"
930
930
  ],
931
- "hash": "9396de649ffe420a",
931
+ "hash": "11705c5f381acd52",
932
932
  "childrenByOrder": {}
933
933
  },
934
934
  {
@@ -1318,9 +1318,9 @@
1318
1318
  "initial": false,
1319
1319
  "entry": false,
1320
1320
  "recorded": false,
1321
- "size": 28891,
1321
+ "size": 28909,
1322
1322
  "sizes": {
1323
- "javascript": 28891
1323
+ "javascript": 28909
1324
1324
  },
1325
1325
  "names": [],
1326
1326
  "idHints": [],
@@ -1334,34 +1334,7 @@
1334
1334
  "auxiliaryFiles": [
1335
1335
  "8734.js.map"
1336
1336
  ],
1337
- "hash": "61f72fb211b79530",
1338
- "childrenByOrder": {}
1339
- },
1340
- {
1341
- "rendered": true,
1342
- "initial": false,
1343
- "entry": false,
1344
- "recorded": false,
1345
- "reason": "split chunk (cache group: defaultVendors)",
1346
- "size": 4385028,
1347
- "sizes": {
1348
- "javascript": 4385028
1349
- },
1350
- "names": [],
1351
- "idHints": [
1352
- "vendors"
1353
- ],
1354
- "runtime": [
1355
- "@openmrs/esm-patient-attachments-app",
1356
- "main"
1357
- ],
1358
- "files": [
1359
- "8743.js"
1360
- ],
1361
- "auxiliaryFiles": [
1362
- "8743.js.map"
1363
- ],
1364
- "hash": "a42e16f53f5ab625",
1337
+ "hash": "1f0cddbea0516381",
1365
1338
  "childrenByOrder": {}
1366
1339
  },
1367
1340
  {
@@ -1369,10 +1342,10 @@
1369
1342
  "initial": true,
1370
1343
  "entry": true,
1371
1344
  "recorded": false,
1372
- "size": 3021495,
1345
+ "size": 3021561,
1373
1346
  "sizes": {
1374
1347
  "consume-shared": 168,
1375
- "javascript": 2998219,
1348
+ "javascript": 2998285,
1376
1349
  "share-init": 420,
1377
1350
  "runtime": 22688
1378
1351
  },
@@ -1389,7 +1362,7 @@
1389
1362
  "auxiliaryFiles": [
1390
1363
  "main.js.map"
1391
1364
  ],
1392
- "hash": "aaadc43d662dc070",
1365
+ "hash": "340f3fe6d3ca5ed5",
1393
1366
  "childrenByOrder": {}
1394
1367
  },
1395
1368
  {
@@ -1458,6 +1431,33 @@
1458
1431
  "hash": "78fa493a32489db5",
1459
1432
  "childrenByOrder": {}
1460
1433
  },
1434
+ {
1435
+ "rendered": true,
1436
+ "initial": false,
1437
+ "entry": false,
1438
+ "recorded": false,
1439
+ "reason": "split chunk (cache group: defaultVendors)",
1440
+ "size": 4526955,
1441
+ "sizes": {
1442
+ "javascript": 4526955
1443
+ },
1444
+ "names": [],
1445
+ "idHints": [
1446
+ "vendors"
1447
+ ],
1448
+ "runtime": [
1449
+ "@openmrs/esm-patient-attachments-app",
1450
+ "main"
1451
+ ],
1452
+ "files": [
1453
+ "9735.js"
1454
+ ],
1455
+ "auxiliaryFiles": [
1456
+ "9735.js.map"
1457
+ ],
1458
+ "hash": "d607b4941f2c4e78",
1459
+ "childrenByOrder": {}
1460
+ },
1461
1461
  {
1462
1462
  "rendered": true,
1463
1463
  "initial": false,
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.2.0"},"extensions":[{"name":"attachments-overview-widget","component":"attachmentsOverview","slot":"patient-chart-attachments-dashboard-slot"},{"name":"attachments-results-summary-dashboard","component":"attachmentsSummaryResultsDashboard","slot":"patient-chart-dashboard-slot","meta":{"slot":"patient-chart-attachments-dashboard-slot","path":"Attachments"},"order":9},{"name":"capture-photo-widget","component":"capturePhotoWidget","slot":"capture-patient-photo-slot"}],"modals":[{"name":"capture-photo-modal","component":"capturePhotoModal"},{"name":"delete-attachment-modal","component":"deleteAttachmentModal"}],"pages":[],"version":"11.3.1-pre.9541"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.2.0"},"extensions":[{"name":"attachments-overview-widget","component":"attachmentsOverview","slot":"patient-chart-attachments-dashboard-slot"},{"name":"attachments-results-summary-dashboard","component":"attachmentsSummaryResultsDashboard","slot":"patient-chart-dashboard-slot","meta":{"slot":"patient-chart-attachments-dashboard-slot","path":"Attachments"},"order":9},{"name":"capture-photo-widget","component":"capturePhotoWidget","slot":"capture-patient-photo-slot"}],"modals":[{"name":"capture-photo-modal","component":"capturePhotoModal"},{"name":"delete-attachment-modal","component":"deleteAttachmentModal"}],"pages":[],"version":"11.3.1-pre.9550"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-patient-attachments-app",
3
- "version": "11.3.1-pre.9541",
3
+ "version": "11.3.1-pre.9550",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Patient attachments microfrontend for the OpenMRS SPA",
6
6
  "browser": "dist/openmrs-esm-patient-attachments-app.js",
@@ -56,7 +56,7 @@
56
56
  "swr": "2.x"
57
57
  },
58
58
  "devDependencies": {
59
- "@openmrs/esm-patient-common-lib": "11.3.1-pre.9541",
59
+ "@openmrs/esm-patient-common-lib": "11.3.1-pre.9550",
60
60
  "webpack": "^5.99.9"
61
61
  },
62
62
  "stableVersion": "11.3.0"
@@ -4,8 +4,7 @@ import {
4
4
  Button,
5
5
  DataTable,
6
6
  DataTableSkeleton,
7
- OverflowMenu,
8
- OverflowMenuItem,
7
+ IconButton,
9
8
  Table,
10
9
  TableBody,
11
10
  TableCell,
@@ -15,7 +14,13 @@ import {
15
14
  TableRow,
16
15
  Tile,
17
16
  } from '@carbon/react';
18
- import { type Attachment, ResponsiveWrapper, useLayoutType } from '@openmrs/esm-framework';
17
+ import {
18
+ type Attachment,
19
+ getCoreTranslation,
20
+ ResponsiveWrapper,
21
+ TrashCanIcon,
22
+ useLayoutType,
23
+ } from '@openmrs/esm-framework';
19
24
  import { compare, EmptyDataIllustration } from '@openmrs/esm-patient-common-lib';
20
25
  import { type AttachmentTableData } from '../utils';
21
26
  import styles from './attachments-table-overview.scss';
@@ -37,7 +42,7 @@ const AttachmentsTableOverview: React.FC<AttachmentsTableOverviewProps> = ({
37
42
  const layout = useLayoutType();
38
43
  const isTablet = layout === 'tablet';
39
44
  const isDesktop = layout === 'small-desktop' || layout === 'large-desktop';
40
- const responsiveSize = isTablet ? 'lg' : 'sm';
45
+ const responsiveSize = isTablet ? 'lg' : 'md';
41
46
 
42
47
  const rows = useMemo(
43
48
  () =>
@@ -58,8 +63,19 @@ const AttachmentsTableOverview: React.FC<AttachmentsTableOverviewProps> = ({
58
63
  content: attachment.dateTime,
59
64
  sortKey: new Date(attachment.dateTimeValue).getTime(),
60
65
  },
66
+ actions: (
67
+ <IconButton
68
+ align="top-end"
69
+ kind="ghost"
70
+ label={getCoreTranslation('delete')}
71
+ onClick={() => onDeleteAttachment(attachment)}
72
+ size={responsiveSize}
73
+ >
74
+ <TrashCanIcon size={16} />
75
+ </IconButton>
76
+ ),
61
77
  })),
62
- [attachments, onOpenAttachment, responsiveSize],
78
+ [attachments, onDeleteAttachment, onOpenAttachment, responsiveSize],
63
79
  );
64
80
 
65
81
  const headers = useMemo(
@@ -67,30 +83,43 @@ const AttachmentsTableOverview: React.FC<AttachmentsTableOverviewProps> = ({
67
83
  {
68
84
  key: 'fileName',
69
85
  header: t('fileName', 'File name'),
70
- colSpan: 1,
71
86
  },
72
87
  {
73
88
  key: 'type',
74
89
  header: t('type', 'Type'),
75
- colSpan: 1,
76
90
  },
77
91
  {
78
92
  key: 'dateUploaded',
79
93
  header: t('dateUploaded', 'Date uploaded'),
80
- colSpan: 2,
81
94
  isSortable: true,
82
95
  },
96
+ {
97
+ key: 'actions',
98
+ header: '',
99
+ },
83
100
  ],
84
101
  [t],
85
102
  );
86
103
 
87
- const sortRow = (cellA, cellB, { sortDirection, sortStates }) => {
104
+ const sortRow = (
105
+ cellA: { sortKey?: number },
106
+ cellB: { sortKey?: number },
107
+ { sortDirection, sortStates }: { sortDirection: string; sortStates: { DESC: string } },
108
+ ) => {
88
109
  if (sortDirection === sortStates.DESC) {
89
110
  return compare(cellA?.sortKey, cellB?.sortKey);
90
111
  }
91
112
  return compare(cellB?.sortKey, cellA?.sortKey);
92
113
  };
93
114
 
115
+ if (isLoading) {
116
+ return (
117
+ <div className={styles.attachmentTable}>
118
+ <DataTableSkeleton className={styles.dataTableSkeleton} compact={isDesktop} zebra />
119
+ </div>
120
+ );
121
+ }
122
+
94
123
  if (!rows.length) {
95
124
  return (
96
125
  <ResponsiveWrapper>
@@ -104,30 +133,16 @@ const AttachmentsTableOverview: React.FC<AttachmentsTableOverviewProps> = ({
104
133
  );
105
134
  }
106
135
 
107
- if (isLoading) {
108
- return (
109
- <div className={styles.attachmentTable}>
110
- <DataTableSkeleton className={styles.dataTableSkeleton} compact={isDesktop} zebra />
111
- </div>
112
- );
113
- }
114
-
115
136
  return (
116
- <TableContainer>
117
- <DataTable
118
- rows={rows}
119
- headers={headers}
120
- overflowMenuOnHover={isDesktop}
121
- // `xs` on desktop to account for the overflow menu
122
- size={isTablet ? 'lg' : 'xs'}
123
- sortRow={sortRow}
124
- >
125
- {({ rows, headers, getHeaderProps, getTableProps }) => (
137
+ <DataTable rows={rows} headers={headers} overflowMenuOnHover={isDesktop} size={responsiveSize} sortRow={sortRow}>
138
+ {({ rows, headers, getHeaderProps, getRowProps, getTableProps }) => (
139
+ <TableContainer>
126
140
  <Table {...getTableProps()} useZebraStyles>
127
141
  <TableHead>
128
142
  <TableRow>
129
143
  {headers.map((header) => (
130
144
  <TableHeader
145
+ key={header.key}
131
146
  {...getHeaderProps({
132
147
  header,
133
148
  })}
@@ -138,28 +153,18 @@ const AttachmentsTableOverview: React.FC<AttachmentsTableOverviewProps> = ({
138
153
  </TableRow>
139
154
  </TableHead>
140
155
  <TableBody>
141
- {rows.map((row, indx) => (
142
- <TableRow key={row.id}>
156
+ {rows.map((row) => (
157
+ <TableRow key={row.id} {...getRowProps({ row })}>
143
158
  {row.cells.map((cell) => (
144
159
  <TableCell key={cell.id}>{cell.value?.content ?? cell.value}</TableCell>
145
160
  ))}
146
- <TableCell className="cds--table-column-menu">
147
- <OverflowMenu flipped size={responsiveSize}>
148
- <OverflowMenuItem
149
- className={styles.menuItem}
150
- itemText={t('delete', 'Delete')}
151
- isDelete
152
- onClick={() => onDeleteAttachment(attachments[indx])}
153
- />
154
- </OverflowMenu>
155
- </TableCell>
156
161
  </TableRow>
157
162
  ))}
158
163
  </TableBody>
159
164
  </Table>
160
- )}
161
- </DataTable>
162
- </TableContainer>
165
+ </TableContainer>
166
+ )}
167
+ </DataTable>
163
168
  );
164
169
  };
165
170
 
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Button, ModalHeader, ModalBody, ModalFooter } from '@carbon/react';
4
- import { type Attachment } from '@openmrs/esm-framework';
4
+ import { getCoreTranslation, type Attachment } from '@openmrs/esm-framework';
5
5
  import styles from './delete-attachment.scss';
6
6
 
7
7
  interface DeleteAttachmentConfirmationProps {
@@ -20,25 +20,25 @@ const DeleteAttachmentConfirmation: React.FC<DeleteAttachmentConfirmationProps>
20
20
  return (
21
21
  <>
22
22
  <ModalHeader closeModal={close} className={styles.modalHeader}>
23
- {t('delete', 'Delete')} {attachment.bytesContentFamily.toLowerCase()}?
23
+ {t('deleteAttachment', 'Delete attachment')}
24
24
  </ModalHeader>
25
25
  <ModalBody>
26
26
  <p className={styles.bodyText}>
27
27
  {t(
28
28
  'deleteAttachmentConfirmationText',
29
- `Are you sure you want to delete this {{attachmentType}}? This action can't be undone.`,
29
+ 'Are you sure you want to delete the attachment "{{fileName}}"? This action can\'t be undone.',
30
30
  {
31
- attachmentType: attachment.bytesContentFamily.toLowerCase(),
31
+ fileName: attachment.filename,
32
32
  },
33
33
  )}
34
34
  </p>
35
35
  </ModalBody>
36
36
  <ModalFooter>
37
37
  <Button size="lg" kind="secondary" onClick={() => close()}>
38
- {t('cancel', 'Cancel')}
38
+ {getCoreTranslation('cancel')}
39
39
  </Button>
40
40
  <Button autoFocus kind="danger" onClick={() => onConfirmation?.(attachment)} size="lg">
41
- {t('delete', 'Delete')}
41
+ {getCoreTranslation('delete')}
42
42
  </Button>
43
43
  </ModalFooter>
44
44
  </>
@@ -10,13 +10,12 @@
10
10
  "attachmentsInProperFormat": "Attachments",
11
11
  "cameraAccessErrorMessage": "Please enable camera access in your browser settings and try again.",
12
12
  "cameraError": "Camera Error",
13
- "cancel": "Cancel",
14
13
  "chooseAnAllowedFileType": "The file \"{{fileName}}\" cannot be uploaded. Please upload a file with one of the following extensions: {{supportedExtensions}}, or {{ lastExtension }}.",
15
14
  "closeModal": "Close",
16
15
  "closePreview": "Close preview",
17
16
  "dateUploaded": "Date uploaded",
18
- "delete": "Delete",
19
- "deleteAttachmentConfirmationText": "Are you sure you want to delete this {{attachmentType}}? This action can't be undone.",
17
+ "deleteAttachment": "Delete attachment",
18
+ "deleteAttachmentConfirmationText": "Are you sure you want to delete the attachment \"{{fileName}}\"? This action can't be undone.",
20
19
  "deleteImage": "Delete image",
21
20
  "deletePdf": "Delete PDF",
22
21
  "edit": "Edit",