@openmrs/esm-app-shell 5.1.1-pre.1006 → 5.1.1-pre.1012
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 +10 -10
- package/dist/0c7bdacc0bf0c58b.js +1 -0
- package/dist/{94dd85a77ea5ca09.js.map → 0c7bdacc0bf0c58b.js.map} +1 -1
- package/dist/679ffe3f5c635ef8.js +1 -0
- package/dist/{653386216e3cce70.js.map → 679ffe3f5c635ef8.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{openmrs.59edbfe0025d4091.js → openmrs.7cc32a57a75eb96f.js} +2 -2
- package/dist/{openmrs.59edbfe0025d4091.js.map → openmrs.7cc32a57a75eb96f.js.map} +1 -1
- package/dist/service-worker.js +1 -1
- package/lib/esm-devtools-app/main.js +1 -1
- package/lib/esm-devtools-app/openmrs-esm-devtools-app.js +1 -1
- package/lib/esm-devtools-app/openmrs-esm-devtools-app.js.buildmanifest.json +2 -2
- package/lib/esm-devtools-app/routes.json +1 -1
- package/lib/esm-implementer-tools-app/main.js +1 -1
- package/lib/esm-implementer-tools-app/openmrs-esm-implementer-tools-app.js +1 -1
- package/lib/esm-implementer-tools-app/openmrs-esm-implementer-tools-app.js.buildmanifest.json +2 -2
- package/lib/esm-implementer-tools-app/routes.json +1 -1
- package/lib/esm-login-app/main.js +1 -1
- package/lib/esm-login-app/openmrs-esm-login-app.js +1 -1
- package/lib/esm-login-app/openmrs-esm-login-app.js.buildmanifest.json +2 -2
- package/lib/esm-login-app/routes.json +1 -1
- package/lib/esm-offline-tools-app/main.js +1 -1
- package/lib/esm-offline-tools-app/openmrs-esm-offline-tools-app.js +1 -1
- package/lib/esm-offline-tools-app/openmrs-esm-offline-tools-app.js.buildmanifest.json +2 -2
- package/lib/esm-offline-tools-app/routes.json +1 -1
- package/lib/esm-primary-navigation-app/main.js +1 -1
- package/lib/esm-primary-navigation-app/openmrs-esm-primary-navigation-app.js +1 -1
- package/lib/esm-primary-navigation-app/openmrs-esm-primary-navigation-app.js.buildmanifest.json +2 -2
- package/lib/esm-primary-navigation-app/routes.json +1 -1
- package/lib/index.html +1 -1
- package/lib/openmrs.js +4 -4
- package/lib/service-worker.js +1 -1
- package/package.json +4 -4
- package/dist/653386216e3cce70.js +0 -1
- package/dist/94dd85a77ea5ca09.js +0 -1
- /package/dist/{openmrs.59edbfe0025d4091.js.LICENSE.txt → openmrs.7cc32a57a75eb96f.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.1.1-pre.
|
|
3
|
+
"version": "5.1.1-pre.1012",
|
|
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.1.1-pre.
|
|
39
|
-
"@openmrs/esm-styleguide": "5.1.1-pre.
|
|
38
|
+
"@openmrs/esm-framework": "5.1.1-pre.1012",
|
|
39
|
+
"@openmrs/esm-styleguide": "5.1.1-pre.1012",
|
|
40
40
|
"dayjs": "^1.10.4",
|
|
41
41
|
"dexie": "^3.0.3",
|
|
42
42
|
"html-webpack-plugin": "^5.5.0",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"cross-env": "^7.0.3"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "492a33d94295a8e20151abfe76e25ac865d09437"
|
|
68
68
|
}
|
package/dist/653386216e3cce70.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_openmrs_esm_app_shell=self.webpackChunk_openmrs_esm_app_shell||[]).push([[954],{1954:(e,t,r)=>{r.r(t),r.d(t,{Breadcrumbs:()=>v,CustomBreadcrumbItem:()=>h,default:()=>O});var n=r(7959),o=r.n(n),a=r(2592),i=r(7575);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e){if(Array.isArray(e))return e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(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){l(e,t,r[t])}))}return e}function b(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 m(e,t){return c(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return a}}(e,t)||y(e,t)||f()}function y(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function d(e,t){var r,n,o=function(e){if(Array.isArray(e))return u(e)}(n=t)||s(n)||y(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return e.replace(/:([A-Za-z0-9_]+)/g,(function(e){return null!==(r=o.shift())&&void 0!==r?r:e}))}function g(e,t){var r=null==t?void 0:t.exec(e);if(r)return(c(n=r)||s(n)||y(n)||f()).slice(1);var n,o=e.split("/");return o.pop(),o.length>1?g(o.join("/"),t):[]}var h=function(e){var t=e.breadcrumbRegistration,r=e.params,u=m((0,n.useState)(""),2),c=u[0],l=u[1];return(0,n.useEffect)((function(){"function"==typeof t.settings.title?Promise.resolve(t.settings.title(r)).then((function(e){return l(e)})):l(t.settings.title)}),[t,r]),o().createElement(a.gN6,{key:t.settings.path},o().createElement(i.ConfigurableLink,{to:d(t.settings.path,r)},c||o().createElement(a.lSo,null)))},v=function(){var e=m((0,n.useState)(location.pathname),2),t=e[0],r=e[1],u=(0,i.getBreadcrumbsFor)(t),c=u[u.length-1],l=g(t,null==c?void 0:c.matcher);return(0,n.useEffect)((function(){var e=function(){return r(location.pathname)};return window.addEventListener("popstate",e),function(){return window.removeEventListener("popstate",e)}}),[]),u.length>4&&u.splice(1,u.length-3,b(p({},u[1]),{settings:b(p({},u[1].settings),{title:"..."})})),o().createElement(a.aGc,{className:"breadcrumbs-container"},u.map((function(e,t){return o().createElement(h,{key:"breadcrumb-item-".concat(t),breadcrumbRegistration:e,params:l})})))};const O=v}}]);
|
package/dist/94dd85a77ea5ca09.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_openmrs_esm_app_shell=self.webpackChunk_openmrs_esm_app_shell||[]).push([[527],{6254:(e,n,t)=>{"use strict";t.r(n),t.d(n,{run:()=>V});var r=t(1023),o=t(7034),i=t(7575),a={bootstrap:function(){return Promise.resolve()},mount:function(){return Promise.resolve()},unmount:function(){return Promise.resolve()}};function c(e,n,t,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void t(e)}c.done?n(u):Promise.resolve(u).then(r,o)}function u(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function a(e){c(i,r,o,a,u,"next",e)}function u(e){c(i,r,o,a,u,"throw",e)}a(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}var s=[];function f(e){if(Array.isArray(e)){var n=e.map(f);return function(e){return n.some((function(n){return n(e)}))}}return"string"==typeof e?(0,r.pathToActiveWhen)(window.getOpenmrsSpaBase()+e):(t=e,(null!=(o=RegExp)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?o[Symbol.hasInstance](t):t instanceof o)?function(n){return function(e,n){return e.test(n.pathname.replace(window.getOpenmrsSpaBase(),""))}(e,n)}:function(){return e});var t,o}var p="startupApp",d=new Map;function h(e,n){return u((function(){var t;return function(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=n.call(e,a)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(r){switch(r.label){case 0:return[4,(0,i.importDynamic)(e)];case 1:return(t=r.sent())&&Object.hasOwn(t,n)&&"function"==typeof t[n]?e in d?[3,3]:[4,d[e]=new Promise((function(e,n){if(Object.hasOwn(t,p)){var r=t[p];if("function"==typeof r)return Promise.resolve(r()).then(e).catch(n)}e(null)}))]:[3,6];case 2:return r.sent(),[3,5];case 3:return[4,d[e]];case 4:r.sent(),r.label=5;case 5:return[2,Promise.resolve(t[n]())];case 6:t&&Object.hasOwn(t,n)?console.warn("The export ".concat(n," of the app ").concat(e," is not a function")):console.warn("The app ".concat(e," does not define a component called ").concat(n,", this cannot be loaded")),r.label=7;case 7:return[2,a]}}))}))}function m(e,n){if(e&&n&&"object"==typeof n){var t,r;(0,i.defineConfigSchema)(e,{});var o=null!==(r=n.extensions)&&void 0!==r?r:[];null===(t=n.pages)||void 0===t||t.forEach((function(n){var t,r,o;s.push((r=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){l(e,n,t[n])}))}return e}({},n),o=null!=(o={order:null!==(t=n.order)&&void 0!==t?t:Number.MAX_SAFE_INTEGER,appName:e})?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})),r))})),o.forEach((function(n){b(e,n)}))}}function y(){s.sort((function(e,n){var t=e.order-n.order;return 0!=t?t:e.appName.localeCompare(n.appName,"en")}));var e=new Map,n=!0,t=!1,r=void 0;try{for(var o,i=s[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var a=o.value;e.has(a.appName)?e.set(a.appName,e.get(a.appName)+1):e.set(a.appName,0);var c=e.get(a.appName),u="".concat(a.appName,"-page-").concat(c),l=document.createElement("div");l.id="single-spa-application:".concat(u),document.body.appendChild(l),v(u,a)}}catch(e){t=!0,r=e}finally{try{n||null==i.return||i.return()}finally{if(t)throw r}}}function v(e,n){var t=void 0!==n.route?n.route:void 0!==n.routeRegex&&new RegExp(n.routeRegex);if(!1!==t)if(n.component){var o=function(e,n){var t=n.online,r=n.offline;return function(n){return!!(navigator.onLine&&(null==t||t)||!navigator.onLine&&null!=r&&r)&&e(n)}}(f(t),n),i=h(n.appName,n.component);(0,r.registerApplication)(e,i,o)}else 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);else 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)}function b(e,n){var t=n.name;if(t){n.slots&&n.slot&&console.warn("The extension ".concat(t," from ").concat(e," declares both a 'slots' property and \na 'slot' property. Only the 'slots' property will be honored."));var r=n.slots?n.slots:n.slot?[n.slot]:[];if(n.component||n.load){var o,a,c;if(n.component)o=h(e,n.component);else if(n.load){if("function"!=typeof n.load)return void console.error("The extension ".concat(t," from ").concat(e," declares a 'load' property that is not a function. This is not\nsupported, so the extension will not be loaded."));o=n.load}(0,i.registerExtension)({name:t,load:o,meta:n.meta||{},order:n.order,moduleName:e,privileges:n.privileges,online:null===(a=n.online)||void 0===a||a,offline:null!==(c=n.offline)&&void 0!==c&&c,featureFlag:n.featureFlag});var u=!0,l=!1,s=void 0;try{for(var f,p=r[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var d=f.value;(0,i.attach)(d,t)}}catch(e){l=!0,s=e}finally{try{u||null==p.return||p.return()}finally{if(l)throw s}}}else console.error("The extension ".concat(t," from ").concat(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)}else console.error("An extension definition in ".concat(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)}var g=t(8658),w=t.n(g),S=t(3841),O=t.n(S),x=t(4259),j=t(8433),P=t(766);function A(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function T(e,n,t){if("function"!=typeof e.importTranslation)throw Error("Module ".concat(n," does not export an importTranslation function"));var r,o,i=e.importTranslation("./".concat(t,".json"));if(r=i,!(null!=(o=Promise)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?o[Symbol.hasInstance](r):r instanceof o))throw Error("Module ".concat(n," exports an importTranslation function that does not return a promise. Did you forget to set require.context mode to 'lazy'?"));return i}var k="@openmrs/esm-app-shell";function C(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function E(e,n,t,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void t(e)}c.done?n(u):Promise.resolve(u).then(r,o)}function N(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function a(e){E(i,r,o,a,c,"next",e)}function c(e){E(i,r,o,a,c,"throw",e)}a(void 0)}))}}function M(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function I(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,c=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(c)throw o}}return i}}(e,n)||function(e,n){if(e){if("string"==typeof e)return C(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?C(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=n.call(e,a)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}var L=Symbol("openmrs_registration_promises");function _(){return _=N((function(){var e,n,t,r,i,a;return D(this,(function(c){switch(c.label){case 0:for(e=document.querySelectorAll("script[type='openmrs-routes']"),n=[],t=0;t<e.length;t++)n.push(function(){var e=N((function(e){var n,t,r;return D(this,(function(i){switch(i.label){case 0:n=void 0,i.label=1;case 1:return i.trys.push([1,5,,6]),e.textContent?(n=JSON.parse(e.textContent),[3,4]):[3,2];case 2:return e.src?[4,(0,o.openmrsFetch)(e.src)]:[3,4];case 3:n=i.sent().data,i.label=4;case 4:return[3,6];case 5:return t=i.sent(),console.error("Caught error while loading routes from ".concat(null!==(r=e.src)&&void 0!==r?r:"JSON script tag content"),t),[2,{}];case 6:return[2,Promise.resolve(null!=n?n:{})]}}))}));return function(n){return e.apply(this,arguments)}}()(e.item(t)));return[4,Promise.all(n)];case 1:return r=c.sent().reduce((function(e,n){return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){M(e,n,t[n])}))}return e}({},e,n)}),{}),i=[],a=Object.entries(r).map((u=N((function(e){var n,t,r;return D(this,(function(o){return n=I(e,2),t=n[0],r=n[1],i.push([t,r]),m(t,r),[2]}))})),function(e){return u.apply(this,arguments)})),window[L]=Promise.all(a),window.installedModules=i,[2]}var u}))})),_.apply(this,arguments)}function q(e){return F.apply(this,arguments)}function F(){return(F=N((function(e){var n,t,r,i,a,c;return D(this,(function(u){n=!0,t=!1,r=void 0;try{for(i=e[Symbol.iterator]();!(n=(a=i.next()).done);n=!0)c=a.value,(0,o.provide)(c.value,c.name)}catch(e){t=!0,r=e}finally{try{n||null==i.return||i.return()}finally{if(t)throw r}}return[2]}))}))).apply(this,arguments)}function R(){var e=navigator.onLine;(0,r.triggerAppChange)(),(0,o.dispatchConnectivityChanged)(e),(0,o.showToast)({critical:!0,description:"Connection: ".concat(e?"online":"offline"),title:"App",kind:e?"success":"warning"})}function W(){return window.addEventListener("offline",R),window.addEventListener("online",R),(window.i18next=w()||g,new MutationObserver((function(){window.i18next.changeLanguage(void 0).catch((function(e){return console.error("i18next failed to re-detect language",e)}))})).observe(document.documentElement,{attributeFilter:["lang"],attributes:!0}),window.i18next.on("languageChanged",(function(){document.documentElement.setAttribute("dir",window.i18next.dir())})),window.i18next.use(x.Z).use({type:"backend",init:function(){},read:function(e,n,t){"translation"===n?t(Error("can't handle translation namespace"),null):void 0===n||void 0===e?t(Error(),null):"@openmrs/esm-app-shell"===n?(0,o.getConfigInternal)(n).then((function(n){var r={};if(n&&"Translation overrides"in n){var o=n["Translation overrides"];e in o&&(r=o[e])}t(null,r)})).catch((function(e){t(e,null)})):(0,o.importDynamic)(n).then((function(t){return Promise.all([T(t,n,e),(0,o.getConfigInternal)(n)])})).then((function(n){var r,o,i=(o=2,function(e){if(Array.isArray(e))return e}(r=n)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,c=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(c)throw o}}return i}}(r,o)||function(e,n){if(e){if("string"==typeof e)return A(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?A(e,n):void 0}}(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],c=i[1],u=null!=a?a:{};if(c&&"Translation overrides"in c){var l=c["Translation overrides"];e in l&&(u=(0,P.Z)(u,l[e]))}t(null,u)})).catch((function(e){t(e,null)}))}}).use(j.initReactI18next).use(O()).init({detection:{order:["querystring","htmlTag","localStorage","navigator"],lookupQuerystring:"lang"},fallbackLng:"en"})).catch((function(e){return console.error("Failed to initialize translations",e)})).then((function(){return(0,r.start)()}))}function B(){return U.apply(this,arguments)}function U(){return U=N((function(){var e,n;return D(this,(function(t){switch(t.label){case 0:return[4,Promise.all([window[L],(0,o.getCurrentImportMap)()])];case 1:return e=I.apply(void 0,[t.sent(),2]),n=e[1],window.installedModules.map(function(){var e=N((function(e){var t,r;return D(this,(function(i){return t=I(e,1),r=t[0],(0,o.importDynamic)(r,void 0,{importMap:n}).catch(),[2]}))}));return function(n){return e.apply(this,arguments)}}()),[2]}}))})),U.apply(this,arguments)}function G(e){console.error(e),function(e){var n=document.querySelector("#app-error");if(n){var t=n.content.cloneNode(!0),r=t.querySelector('[data-var="message"]');if(r&&(r.textContent=(null==e?void 0:e.message)||"No additional information available."),localStorage.getItem("openmrs:devtools")&&Object.keys(localStorage).some((function(e){return e.startsWith("import-map-override:")}))){var o=null==t?void 0:t.querySelector("#buttons");if(o){var i=document.createElement("button");i.className="cds--btn",i.innerHTML="Clear dev overrides",i.onclick=z,o.appendChild(i)}}document.body.appendChild(t)}}(e)}function z(){var e=!0,n=!1,t=void 0;try{for(var r,o=Object.keys(localStorage)[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value;i.startsWith("import-map-override:")&&!["import-map-override:react","import-map-override:react-dom"].includes(i)&&localStorage.removeItem(i)}}catch(e){n=!0,t=e}finally{try{e||null==o.return||o.return()}finally{if(n)throw t}}location.reload()}function J(){return Z.apply(this,arguments)}function Z(){return(Z=N((function(){var e;return D(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,(0,o.registerOmrsServiceWorker)("".concat(window.getOpenmrsSpaBase(),"service-worker.js"))];case 1:return n.sent(),[4,(0,o.activateOfflineCapability)()];case 2:return n.sent(),3e5,t=null,r=function(e,n){var r=!t||(new Date).getTime()-t.getTime()>3e5;n&&e&&r&&(t=new Date,(0,o.dispatchPrecacheStaticDependencies)())},i=!1,a=!1,(0,o.getCurrentUser)({includeAuthStatus:!1}).subscribe((function(e){r(i,a=!!e)})),(0,o.subscribeConnectivity)((function(e){var n=e.online;i=n,r(n,a)})),[3,4];case 3:return e=n.sent(),console.error("Error while setting up offline mode.",e),(0,o.showNotification)({kind:"error",title:"Offline Setup Error",description:e.message}),[3,4];case 4:return[2]}var t,r,i,a}))}))).apply(this,arguments)}function $(){return H.apply(this,arguments)}function H(){return(H=N((function(){var e;return D(this,(function(n){switch(n.label){case 0:return[4,Q()];case 1:return n.sent(),e=new URL("".concat(window.openmrsBase,"/ws/rest/v1/session"),window.location.origin).href,[4,(0,o.messageOmrsServiceWorker)({type:"registerDynamicRoute",url:e,strategy:"network-first"})];case 2:return n.sent(),[4,(0,o.openmrsFetch)("/ws/rest/v1/session").catch((function(e){return 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)}))];case 3:return n.sent(),[2]}}))}))).apply(this,arguments)}function Q(){return X.apply(this,arguments)}function X(){return(X=N((function(){var e;return D(this,(function(n){switch(n.label){case 0:return[4,window.importMapOverrides.getCurrentPageMap()];case 1:return e=n.sent(),[4,(0,o.messageOmrsServiceWorker)({type:"onImportMapChanged",importMap:e})];case 2:return n.sent(),[2]}}))}))).apply(this,arguments)}function K(){(0,o.subscribeConnectivity)((function(e){var n=e.online,t=document.querySelector("body");n?t.classList.remove("omrs-offline"):t.classList.add("omrs-offline")}))}function V(e,n){var r=(0,o.renderLoadingSpinner)(document.body),a=function(e){var n=Promise.all(e.map((function(e){var n=(0,o.interpolateUrl)(e);return fetch(n).then((function(e){return e.json()})).then((function(n){return{name:e,value:n}})).catch((function(n){return console.error('Loading the config from "'.concat(e,'" failed.'),n),{name:e,value:{}}}))})));return function(){return n.then(q)}}(e);return(0,o.integrateBreakpoints)(),(0,o.renderToasts)(document.querySelector(".omrs-toasts-container")),(0,o.renderModals)(document.querySelector(".omrs-modals-container")),(0,o.renderInlineNotifications)(document.querySelector(".omrs-inline-notifications-container")),(0,o.renderActionableNotifications)(document.querySelector(".omrs-actionable-notifications-container")),(0,o.subscribeNotificationShown)(o.showNotification),(0,o.subscribeActionableNotificationShown)(o.showActionableNotification),(0,o.subscribeToastShown)(o.showToast),(0,o.subscribePrecacheStaticDependencies)($),(0,o.setupApiModule)(),function(){var e,n=(e={featureName:"app-shell",moduleName:k},[{name:"breadcrumbs-widget",slot:"breadcrumbs-slot",load:(0,i.getAsyncLifecycle)((function(){return t.e(954).then(t.bind(t,1954))}),e),online:!0,offline:!0}]),r=!0,o=!1,a=void 0;try{for(var c,u=n[Symbol.iterator]();!(r=(c=u.next()).done);r=!0){var l=c.value;b(k,l)}}catch(e){o=!0,a=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw a}}}(),function(){return _.apply(this,arguments)}().then(y).then(K).then(a).then(W).catch(G).then(r).then(n?J:void 0).then(B)}},7603:()=>{}}]);
|
/package/dist/{openmrs.59edbfe0025d4091.js.LICENSE.txt → openmrs.7cc32a57a75eb96f.js.LICENSE.txt}
RENAMED
|
File without changes
|