@openmrs/esm-app-shell 5.0.0 → 5.0.1-pre.813
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 +107 -101
- package/dist/e7831e65bf630771.js +1 -0
- package/dist/{ada4eada232e904d.js.map → e7831e65bf630771.js.map} +1 -1
- package/dist/f6119f9dfa081aeb.js +1 -0
- package/dist/{a97287a5da255cf7.js.map → f6119f9dfa081aeb.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{openmrs.904c37cbf573920b.js → openmrs.46f54143af9c4f1b.js} +2 -2
- package/dist/{openmrs.904c37cbf573920b.js.map → openmrs.46f54143af9c4f1b.js.map} +1 -1
- package/dist/service-worker.js +1 -1
- package/lib/023bd53d342b7463.woff +0 -0
- package/lib/02acc4469a2fe2e4.woff2 +0 -0
- package/lib/033e03f8663ab9b1.woff +0 -0
- package/lib/052607e67da262ec.woff +0 -0
- package/lib/081587ca0db8e63f.woff2 +0 -0
- package/lib/08cf53c4e5e71cf1.woff2 +0 -0
- package/lib/090b2bc014d24ea4.woff2 +0 -0
- package/lib/0a28cd0b47497b71.woff +0 -0
- package/lib/0a9765a89ff0437d.woff +0 -0
- package/lib/0ae92bcea615e948.woff2 +0 -0
- package/lib/0be8520d8945b3b7.woff2 +0 -0
- package/lib/0bf6b66a8b86b014.woff +0 -0
- package/lib/0e7dd073cd8bb0ad.woff2 +0 -0
- package/lib/14869ac5d1830304.woff2 +0 -0
- package/lib/14aaceff85fc8b28.woff2 +0 -0
- package/lib/1590052e1cf8f28d.woff +0 -0
- package/lib/16f443eed01776ca.woff2 +0 -0
- package/lib/183bae0e53a22182.woff2 +0 -0
- package/lib/19b239a0bb74b27e.woff +0 -0
- package/lib/19c8f94ccd6289f5.woff2 +0 -0
- package/lib/1ae86565eab7451c.woff2 +0 -0
- package/lib/1c7bf8797e0a9be6.woff2 +0 -0
- package/lib/1d9aff9a93a3bb66.woff +0 -0
- package/lib/1f266d3619b30f16.woff2 +0 -0
- package/lib/1f8c5a4087a524fd.woff2 +0 -0
- package/lib/20ba2b23c5c0cd0b.woff2 +0 -0
- package/lib/2269d45733c5cf8f.woff +0 -0
- package/lib/258ecbd235953099.woff +0 -0
- package/lib/295dd01a1fbfee6d.woff2 +0 -0
- package/lib/2d7f835ab7c7c764.woff +0 -0
- package/lib/2f66cca99eeead63.woff +0 -0
- package/lib/2f686985e26e7107.woff2 +0 -0
- package/lib/315eff729e4ccbd9.woff2 +0 -0
- package/lib/32f1e5aadf845e08.woff +0 -0
- package/lib/338484e1c850669c.woff +0 -0
- package/lib/33b7a82f1e295190.woff +0 -0
- package/lib/3674d98ec4a9173d.woff +0 -0
- package/lib/368d16e3259bf207.woff2 +0 -0
- package/lib/36c49aa341a7079a.woff2 +0 -0
- package/lib/36e1e0430475edee.woff2 +0 -0
- package/lib/3bc19662b8630ee9.woff2 +0 -0
- package/lib/3f645f473b3f8fba.woff2 +0 -0
- package/lib/4095df88acae9e98.woff +0 -0
- package/lib/4218ac9901b9d36d.woff2 +0 -0
- package/lib/45ae93918c51cff2.js +22 -0
- package/lib/4680ba68412e4da9.woff2 +0 -0
- package/lib/47d7a8698d562a0e.woff +0 -0
- package/lib/47ec6c9dffe776a0.woff +0 -0
- package/lib/48e37bd7ebf85a1f.woff2 +0 -0
- package/lib/48edfdf51dfb3160.woff +0 -0
- package/lib/4a35a2746c8ad7a5.woff +0 -0
- package/lib/4e11b8a7c445255f.woff2 +0 -0
- package/lib/4ea1f5c3baf89fe3.woff +0 -0
- package/lib/4ea99f41c896bf9d.woff +0 -0
- package/lib/5005db1d1caf70c7.woff +0 -0
- package/lib/527f45835605c1e2.js +505 -0
- package/lib/528a8e7c1c141a31.woff +0 -0
- package/lib/52ca12f5b516d4ea.woff +0 -0
- package/lib/537ddd61c5c1fce2.woff2 +0 -0
- package/lib/5432f7541ec25c34.woff +0 -0
- package/lib/54a95d73a9454ba3.woff +0 -0
- package/lib/56c4118c0907f151.woff2 +0 -0
- package/lib/5938bc2ae7ec60c0.woff2 +0 -0
- package/lib/594306657c4e44e8.woff +0 -0
- package/lib/5a538aa477a66067.woff +0 -0
- package/lib/5c6586155f0d278a.woff2 +0 -0
- package/lib/60ec587649ba812a.woff2 +0 -0
- package/lib/616567cd947eb9dd.woff +0 -0
- package/lib/65168b59f44caab4.woff +0 -0
- package/lib/65c0982f98374864.woff +0 -0
- package/lib/65e6511e035870e1.woff2 +0 -0
- package/lib/661425f6798cd16a.woff2 +0 -0
- package/lib/66b864fe213caf46.woff2 +0 -0
- package/lib/6775fee945132ef9.woff +0 -0
- package/lib/68bbd362c8e4983b.woff +0 -0
- package/lib/68d6deec87b6b604.woff +0 -0
- package/lib/69a7e6d31d390296.woff +0 -0
- package/lib/69d087d970ee9455.woff2 +0 -0
- package/lib/69fa3fc7363bbc04.woff +0 -0
- package/lib/6a1f0178b45b2e9e.woff +0 -0
- package/lib/6c6c45e66ff54281.woff2 +0 -0
- package/lib/6fab4b9bc6dd3981.js +76 -0
- package/lib/6ffb9ed97b21fdc0.woff +0 -0
- package/lib/7073a7323e92bd11.woff2 +0 -0
- package/lib/718c6cc31274ab1a.woff2 +0 -0
- package/lib/72cdbedfe04be9f9.woff2 +0 -0
- package/lib/7509c9f56fe9e532.woff2 +0 -0
- package/lib/75dc5c5b04adc8bf.woff2 +0 -0
- package/lib/76a7c256fc8b3490.woff +0 -0
- package/lib/77b48bc05299ecca.woff2 +0 -0
- package/lib/787f56efa306ddbc.woff +0 -0
- package/lib/7a0a0215c248c73d.woff2 +0 -0
- package/lib/7c4463d9c84f263a.woff +0 -0
- package/lib/7d112a556b7670d2.woff +0 -0
- package/lib/7d52d6014b5f2bbc.woff +0 -0
- package/lib/7f00bebb24e40167.woff2 +0 -0
- package/lib/7f2c6ea3e740417e.woff +0 -0
- package/lib/802c6176541eeed7.woff2 +0 -0
- package/lib/8080081b3379c637.woff2 +0 -0
- package/lib/8274cc1afc7619f1.woff +0 -0
- package/lib/8605507b7a8487c4.woff2 +0 -0
- package/lib/8a83d654702f6534.woff2 +0 -0
- package/lib/8ccee65f6cf254ee.woff +0 -0
- package/lib/8d82a082a4aba439.woff +0 -0
- package/lib/8de04ae985937b56.woff +0 -0
- package/lib/8fe71173a13fe571.woff2 +0 -0
- package/lib/90edccb224a51cee.woff +0 -0
- package/lib/94b292fe87831a8b.woff +0 -0
- package/lib/95dc66c1b88745f8.woff +0 -0
- package/lib/95fb698be77c85ef.woff +0 -0
- package/lib/9624cec0f9bdd81e.woff2 +0 -0
- package/lib/9662331fa31e3f20.woff +0 -0
- package/lib/98a3af55a1698171.woff2 +0 -0
- package/lib/9ba85996af74c5ce.woff2 +0 -0
- package/lib/9bc133b1df25cb74.woff +0 -0
- package/lib/9ddb22faa35006e7.woff2 +0 -0
- package/lib/9e97352380611b95.woff +0 -0
- package/lib/a167fb2799dd741b.woff2 +0 -0
- package/lib/a2045a5cc4fdf94f.woff2 +0 -0
- package/lib/a246c73905a31c93.woff2 +0 -0
- package/lib/a401aa7939cb6e6f.woff2 +0 -0
- package/lib/a41a71258c38684d.woff +0 -0
- package/lib/a60d94a72d615a8e.woff +0 -0
- package/lib/a66764dd0c1fa213.woff +0 -0
- package/lib/a6ed036f17a1ea29.woff2 +0 -0
- package/lib/a8f635129d660202.woff +0 -0
- package/lib/a9f25ca430709a1a.woff2 +0 -0
- package/lib/ae14d98ad8a1212c.woff +0 -0
- package/lib/aeec4f78084adf7f.woff +0 -0
- package/lib/af11e94b0644eba5.woff +0 -0
- package/lib/afa9121a49e95351.woff2 +0 -0
- package/lib/afcda12d9f805543.woff2 +0 -0
- package/lib/b09ded85a7da77f1.woff2 +0 -0
- package/lib/b2f4e9d1e821b71c.woff2 +0 -0
- package/lib/b30b06698dc369b2.woff +0 -0
- package/lib/b4a074bf828bb757.woff2 +0 -0
- package/lib/b7f447da43f6e596.woff2 +0 -0
- package/lib/b7f633b871b84820.woff +0 -0
- package/lib/bcca84a524572d10.woff2 +0 -0
- package/lib/be4d1f97b11d087c.woff2 +0 -0
- package/lib/be91def2232f6776.woff +0 -0
- package/lib/bec14780d81164de.woff2 +0 -0
- package/lib/c285f4b15d11f172.woff +0 -0
- package/lib/c4673617b80801f3.woff +0 -0
- package/lib/c553f7e0199c5084.woff2 +0 -0
- package/lib/c8470ed2c145ace7.woff +0 -0
- package/lib/c9d9ce9f465df4fe.woff2 +0 -0
- package/lib/ccb2870475da9fe8.woff +0 -0
- package/lib/d04134fa33c2606d.woff +0 -0
- package/lib/d11f9c5cd7d9ea16.woff +0 -0
- package/lib/d188f7f036ac5779.woff2 +0 -0
- package/lib/d265d81c58525ae4.woff2 +0 -0
- package/lib/d5942cd81663e136.woff2 +0 -0
- package/lib/d6097a5c452acf6d.woff +0 -0
- package/lib/d66b8ff73d95cabb.woff2 +0 -0
- package/lib/d77f5bf95de8edaa.woff +0 -0
- package/lib/d8829a685af4f372.woff +0 -0
- package/lib/d88899ef0fd16719.woff2 +0 -0
- package/lib/d9a5d958e69e058d.woff2 +0 -0
- package/lib/da65d9a514c628c8.woff +0 -0
- package/lib/dac90d495be353a0.woff2 +0 -0
- package/lib/dd7071bc6306585c.woff +0 -0
- package/lib/dd8ce598529c3fab.woff2 +0 -0
- package/lib/ddef6f2dd566c2b9.woff +0 -0
- package/lib/de013f1be25103fa.woff2 +0 -0
- package/lib/dee2ff599db31e5b.woff +0 -0
- package/lib/dee7c6b5dd954d9b.woff +0 -0
- package/lib/df222fceeffca849.woff2 +0 -0
- package/lib/e0d2e5b12f028b5d.woff +0 -0
- package/lib/e33e3db8e4f7559f.woff +0 -0
- package/lib/e62b00b9199c1ac9.woff2 +0 -0
- package/lib/e696cef1407b2610.woff2 +0 -0
- package/lib/e89ca83b24959664.woff +0 -0
- package/lib/eb8c0ae77ad55249.woff +0 -0
- package/lib/ed0997bd7d221b8e.woff +0 -0
- package/lib/eed48feba743e21c.woff2 +0 -0
- package/lib/f280bda8a6e535a6.woff +0 -0
- package/lib/f543c88feb236d11.woff2 +0 -0
- package/lib/f591b0079faa93fe.woff2 +0 -0
- package/lib/f6ed27923769ad1d.woff2 +0 -0
- package/lib/f8803bebe640d99a.woff +0 -0
- package/lib/favicon.ico +0 -0
- package/lib/fbebeb4336e67012.woff2 +0 -0
- package/lib/fd522cd7a5c646fe.woff +0 -0
- package/lib/icon_128x128.3dde25c6e69b1c010a6a5d6b27b3f436.png +0 -0
- package/lib/icon_144x144.e263e02b838d229b02ff9133e6e0f2ba.png +0 -0
- package/lib/icon_192x192.d3d318638bbe8a10a3c687d3d302d01a.png +0 -0
- package/lib/icon_256x256.c729f6e7e914b58fcea5ce91d7aa9bad.png +0 -0
- package/lib/icon_384x384.c8923df6b6bd08eba5c79b78d7fcecc0.png +0 -0
- package/lib/icon_512x512.7163efb26df832de513bc58d925ea22e.png +0 -0
- package/lib/icon_96x96.682ee334ae19d49894217370b8596f61.png +0 -0
- package/lib/index.html +91 -0
- package/lib/logo-512.png +0 -0
- package/lib/logo.svg +30 -0
- package/lib/manifest.c61e464ba60302bdc2442acdd49954f1.json +47 -0
- package/lib/openmrs.js +11656 -0
- package/lib/service-worker.js +1732 -0
- package/package.json +4 -4
- package/dist/a97287a5da255cf7.js +0 -1
- package/dist/ada4eada232e904d.js +0 -1
- /package/dist/{openmrs.904c37cbf573920b.js.LICENSE.txt → openmrs.46f54143af9c4f1b.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-app-shell",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1-pre.813",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"main": "dist/openmrs.js",
|
|
6
6
|
"scripts": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@carbon/react": "^1.12.0",
|
|
38
|
-
"@openmrs/esm-framework": "5.0.
|
|
39
|
-
"@openmrs/esm-styleguide": "5.0.
|
|
38
|
+
"@openmrs/esm-framework": "5.0.1-pre.813",
|
|
39
|
+
"@openmrs/esm-styleguide": "5.0.1-pre.813",
|
|
40
40
|
"@swc-node/loader": "^1.3.5",
|
|
41
41
|
"dayjs": "^1.10.4",
|
|
42
42
|
"dexie": "^3.0.3",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"cross-env": "^7.0.3"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "0987145a28a9cddc5dca2eb63fc0728c0bc0e2fe"
|
|
68
68
|
}
|
package/dist/a97287a5da255cf7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_openmrs_esm_app_shell=self.webpackChunk_openmrs_esm_app_shell||[]).push([[599],{1599:(e,t,r)=>{r.r(t),r.d(t,{Breadcrumbs:()=>m,CustomBreadcrumbItem:()=>b,default:()=>f});var n=r(7959),o=r.n(n),s=r(5730),c=r(294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){a(e,t,r[t])}))}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function u(e,t){const r=[...t];var n;return e.replace(/:([A-Za-z0-9_]+)/g,(e=>null!==(n=r.shift())&&void 0!==n?n:e))}function p(e,t){const r=null==t?void 0:t.exec(e);if(r){const[,...e]=r;return e}{const r=e.split("/");if(r.pop(),r.length>1)return p(r.join("/"),t)}return[]}const b=({breadcrumbRegistration:e,params:t})=>{const[r,a]=(0,n.useState)("");return(0,n.useEffect)((()=>{"function"==typeof e.settings.title?Promise.resolve(e.settings.title(t)).then((e=>a(e))):a(e.settings.title)}),[e,t]),o().createElement(s.gN6,{key:e.settings.path},o().createElement(c.ConfigurableLink,{to:u(e.settings.path,t)},r||o().createElement(s.lSo,null)))},m=()=>{const[e,t]=(0,n.useState)(location.pathname),r=(0,c.getBreadcrumbsFor)(e),a=r[r.length-1],u=p(e,null==a?void 0:a.matcher);return(0,n.useEffect)((()=>{const e=()=>t(location.pathname);return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)}),[]),r.length>4&&r.splice(1,r.length-3,l(i({},r[1]),{settings:l(i({},r[1].settings),{title:"..."})})),o().createElement(s.aGc,{className:"breadcrumbs-container"},r.map(((e,t)=>o().createElement(b,{key:`breadcrumb-item-${t}`,breadcrumbRegistration:e,params:u}))))},f=m}}]);
|
package/dist/ada4eada232e904d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_openmrs_esm_app_shell=self.webpackChunk_openmrs_esm_app_shell||[]).push([[394],{7980:(e,n,t)=>{"use strict";t.r(n),t.d(n,{run:()=>W});var o=t(1023),r=t(7034),i=t(294);const s={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};function a(e,n,t,o,r,i,s){try{var a=e[i](s),c=a.value}catch(e){return void t(e)}a.done?n(c):Promise.resolve(c).then(o,r)}function c(e){return function(){var n=this,t=arguments;return new Promise((function(o,r){var i=e.apply(n,t);function s(e){a(i,o,r,s,c,"next",e)}function c(e){a(i,o,r,s,c,"throw",e)}s(void 0)}))}}function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const u=[];function d(e){if(Array.isArray(e)){const n=e.map(d);return e=>n.some((n=>n(e)))}return"string"==typeof e?(0,o.pathToActiveWhen)(window.getOpenmrsSpaBase()+e):e instanceof RegExp?n=>function(e,n){return e.test(n.pathname.replace(window.getOpenmrsSpaBase(),""))}(e,n):()=>e}const p="startupApp",f=new Map;function m(e,n){return c((function*(){const t=yield(0,i.importDynamic)(e);return t&&Object.hasOwn(t,n)&&"function"==typeof t[n]?(e in f?yield f[e]:yield f[e]=new Promise(((e,n)=>{if(Object.hasOwn(t,p)){const o=t[p];if("function"==typeof o)return Promise.resolve(o()).then(e).catch(n)}e(null)})),Promise.resolve(t[n]())):(t&&Object.hasOwn(t,n)?console.warn(`The export ${n} of the app ${e} is not a function`):console.warn(`The app ${e} does not define a component called ${n}, this cannot be loaded`),s)}))}function h(e,n){if(e&&n&&"object"==typeof n){var t,o;(0,i.defineConfigSchema)(e,{});const r=null!==(o=n.extensions)&&void 0!==o?o:[];null===(t=n.pages)||void 0===t||t.forEach((n=>{var t,o,r;u.push((o=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(n){l(e,n,t[n])}))}return e}({},n),r=null!=(r={order:null!==(t=n.order)&&void 0!==t?t:Number.MAX_SAFE_INTEGER,appName:e})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t.push.apply(t,o)}return t}(Object(r)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(r,e))})),o))})),r.forEach((n=>{v(e,n)}))}}function y(){u.sort(((e,n)=>e.order-n.order));let e,n=0;for(let t of u){t.appName!==e?(n=0,e=t.appName):n++;const o=`${t.appName}-page-${n}`,r=document.createElement("div");r.id=`single-spa-application:${o}`,document.body.appendChild(r),g(o,t)}}function g(e,n){const t=void 0!==n.route?n.route:void 0!==n.routeRegex&&new RegExp(n.routeRegex);if(!1===t)return void console.warn('A registered page definition is missing a route and thus cannot be registered.\nTo fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.',e);if(!n.component)return void console.warn('A registered page definition is missing a component and thus cannot be registered.\nTo fix this, ensure that you define the "component" field inside the page definition.',e);const r=function(e,{online:n,offline:t}){return o=>!!(navigator.onLine&&(null==n||n)||!navigator.onLine&&null!=t&&t)&&e(o)}(d(t),n),i=m(n.appName,n.component);(0,o.registerApplication)(e,i,r)}function v(e,n){const t=n.name;if(!t)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be\nregistered. To fix this, ensure that you define the "name" field inside the\nextension definition.`,n);n.slots&&n.slot&&console.warn(`The extension ${t} from ${e} declares both a 'slots' property and \na 'slot' property. Only the 'slots' property will be honored.`);const o=n.slots?n.slots:n.slot?[n.slot]:[];if(!n.component&&!n.load)return void console.error(`The extension ${t} from ${e} is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the extension definition.`,n);let r;if(n.component)r=m(e,n.component);else if(n.load){if("function"!=typeof n.load)return void console.error(`The extension ${t} from ${e} declares a 'load' property that is not a function. This is not\nsupported, so the extension will not be loaded.`);r=n.load}(0,i.registerExtension)({name:t,load:r,meta:n.meta||{},order:n.order||Number.MAX_SAFE_INTEGER,moduleName:e,privileges:n.privileges});for(const e of o)(0,i.attach)(e,t)}var b=t(8658),w=t.n(b),O=t(538),S=t.n(O),x=t(961),P=t(8433),T=t(4043);function E(e,n,t){if("function"!=typeof e.importTranslation)throw Error(`Module ${n} does not export an importTranslation function`);const o=e.importTranslation(`./${t}.json`);if(!(o instanceof Promise))throw Error(`Module ${n} exports an importTranslation function that does not return a promise. Did you forget to set require.context mode to 'lazy'?`);return o}const $="@openmrs/esm-app-shell";function j(e,n,t,o,r,i,s){try{var a=e[i](s),c=a.value}catch(e){return void t(e)}a.done?n(c):Promise.resolve(c).then(o,r)}function N(e){return function(){var n=this,t=arguments;return new Promise((function(o,r){var i=e.apply(n,t);function s(e){j(i,o,r,s,a,"next",e)}function a(e){j(i,o,r,s,a,"throw",e)}s(void 0)}))}}function A(){return A=N((function*(){const e=document.querySelectorAll("script[type='openmrs-routes']"),n=[];for(let t=0;t<e.length;t++)n.push(function(){var e=N((function*(e){const n=[];let t;try{e.textContent?t=JSON.parse(e.textContent):e.src&&(t=(yield(0,r.openmrsFetch)(e.src)).data)}catch(n){var o;return console.error(`Caught error while loading routes from ${null!==(o=e.src)&&void 0!==o?o:"JSON script tag content"}`,n),[]}return"object"==typeof t&&Object.entries(t).forEach((([e,t])=>{n.push([e,t]),h(e,t)})),Promise.resolve(n)}));return function(n){return e.apply(this,arguments)}}()(e.item(t)));window.installedModules=(yield Promise.all(n)).flat()})),A.apply(this,arguments)}function C(e){return k.apply(this,arguments)}function k(){return(k=N((function*(e){for(const n of e)(0,r.provide)(n.value,n.name)}))).apply(this,arguments)}function M(){const e=navigator.onLine;(0,o.triggerAppChange)(),(0,r.dispatchConnectivityChanged)(e),(0,r.showToast)({critical:!0,description:"Connection: "+(e?"online":"offline"),title:"App",kind:e?"success":"warning"})}function L(){return window.addEventListener("offline",M),window.addEventListener("online",M),(window.i18next=w()||b,new MutationObserver((()=>{window.i18next.changeLanguage(void 0).catch((e=>console.error("i18next failed to re-detect language",e)))})).observe(document.documentElement,{attributeFilter:["lang"],attributes:!0}),window.i18next.on("languageChanged",(()=>{document.documentElement.setAttribute("dir",window.i18next.dir())})),window.i18next.use(x.Z).use({type:"backend",init(){},read(e,n,t){"translation"===n?t(Error("can't handle translation namespace"),null):void 0===n||void 0===e?t(Error(),null):(0,r.importDynamic)(n).then((t=>Promise.all([E(t,n,e),(0,r.getConfigInternal)(n)]))).then((([n,o])=>{let r=null!=n?n:{};if(o&&"Translation overrides"in o){const n=o["Translation overrides"];e in n&&(r=(0,T.Z)(r,n[e]))}t(null,r)})).catch((e=>{t(e,null)}))}}).use(P.initReactI18next).use(S()).init({detection:{order:["querystring","htmlTag","localStorage","navigator"],lookupQuerystring:"lang"},fallbackLng:"en"})).catch((e=>console.error("Failed to initialize translations",e))).then((()=>(0,o.start)()))}function D(e){console.error(e),function(e){const n=document.querySelector("#app-error");if(n){const t=n.content.cloneNode(!0),o=t.querySelector('[data-var="message"]');if(o&&(o.textContent=(null==e?void 0:e.message)||"No additional information available."),localStorage.getItem("openmrs:devtools")&&Object.keys(localStorage).some((e=>e.startsWith("import-map-override:")))){const e=null==t?void 0:t.querySelector("#buttons");if(e){const n=document.createElement("button");n.className="cds--btn",n.innerHTML="Clear dev overrides",n.onclick=_,e.appendChild(n)}}document.body.appendChild(t)}}(e)}function _(){for(const e of Object.keys(localStorage))e.startsWith("import-map-override:")&&!["import-map-override:react","import-map-override:react-dom"].includes(e)&&localStorage.removeItem(e);location.reload()}function q(){return(q=N((function*(){try{yield(0,r.registerOmrsServiceWorker)(`${window.getOpenmrsSpaBase()}service-worker.js`),yield(0,r.activateOfflineCapability)(),function(){let e=null;!function(e){let n=!1,t=!1;(0,r.getCurrentUser)({includeAuthStatus:!1}).subscribe((o=>{t=!!o,e(n,t)})),(0,r.subscribeConnectivity)((({online:o})=>{n=o,e(o,t)}))}(((n,t)=>{const o=!e||(new Date).getTime()-e.getTime()>3e5;t&&n&&o&&(e=new Date,(0,r.dispatchPrecacheStaticDependencies)())}))}()}catch(e){console.error("Error while setting up offline mode.",e),(0,r.showNotification)({kind:"error",title:"Offline Setup Error",description:e.message})}}))).apply(this,arguments)}function R(){return F.apply(this,arguments)}function F(){return F=N((function*(){yield function(){return I.apply(this,arguments)}();const e=new URL(`${window.openmrsBase}/ws/rest/v1/session`,window.location.origin).href;yield(0,r.messageOmrsServiceWorker)({type:"registerDynamicRoute",url:e,strategy:"network-first"}),yield(0,r.openmrsFetch)("/ws/rest/v1/session").catch((e=>console.warn("Failed to precache the user session data from the app shell. MFs depending on this data may run into problems while offline.",e)))})),F.apply(this,arguments)}function I(){return(I=N((function*(){const e=yield window.importMapOverrides.getCurrentPageMap();yield(0,r.messageOmrsServiceWorker)({type:"onImportMapChanged",importMap:e})}))).apply(this,arguments)}function B(){(0,r.subscribeConnectivity)((({online:e})=>{const n=document.querySelector("body");e?n.classList.remove("omrs-offline"):n.classList.add("omrs-offline")}))}function W(e,n){const o=(0,r.renderLoadingSpinner)(document.body),s=function(e){const n=Promise.all(e.map((e=>{const n=`${(0,r.interpolateUrl)(`\${openmrsSpaBase}${e}`)}`,t=function(e){return/^https?:\/\//i.test(e)}(e)?e:`${window.location.origin}${n}`;return fetch(t).then((e=>e.json())).then((n=>({name:e,value:n}))).catch((n=>(console.error(`Loading the config from "${e}" failed.`,n),{name:e,value:{}})))})));return()=>n.then(C)}(e);return(0,r.integrateBreakpoints)(),(0,r.renderToasts)(document.querySelector(".omrs-toasts-container")),(0,r.renderModals)(document.querySelector(".omrs-modals-container")),(0,r.renderInlineNotifications)(document.querySelector(".omrs-inline-notifications-container")),(0,r.renderActionableNotifications)(document.querySelector(".omrs-actionable-notifications-container")),(0,r.createAppState)({}),(0,r.subscribeNotificationShown)(r.showNotification),(0,r.subscribeActionableNotificationShown)(r.showActionableNotification),(0,r.subscribeToastShown)(r.showToast),(0,r.subscribePrecacheStaticDependencies)(R),(0,r.setupApiModule)(),function(){const e=function(){const e={featureName:"app-shell",moduleName:$};return[{name:"breadcrumbs-widget",slot:"breadcrumbs-slot",load:(0,i.getAsyncLifecycle)((()=>t.e(599).then(t.bind(t,1599))),e),online:!0,offline:!0}]}();for(const n of e)v($,n)}(),function(){return A.apply(this,arguments)}().then(y).then(B).then(s).then(L).catch(D).then(o).then((()=>n?function(){return q.apply(this,arguments)}():void 0))}},7603:()=>{}}]);
|
/package/dist/{openmrs.904c37cbf573920b.js.LICENSE.txt → openmrs.46f54143af9c4f1b.js.LICENSE.txt}
RENAMED
|
File without changes
|