@openmrs/esm-globals 5.0.1-pre.813 → 5.0.1
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
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
[35m@openmrs/esm-globals:build[0m: cache hit, replaying output [
|
|
2
|
-
[35m@openmrs/esm-globals:build: [0masset [1m[32mopenmrs-esm-globals.js[39m[22m
|
|
3
|
-
[35m@openmrs/esm-globals:build: [0mruntime modules
|
|
1
|
+
[35m@openmrs/esm-globals:build[0m: cache hit, replaying output [2m45f82fdd4f90e5d0[0m
|
|
2
|
+
[35m@openmrs/esm-globals:build: [0masset [1m[32mopenmrs-esm-globals.js[39m[22m 3.22 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (name: main) 1 related asset
|
|
3
|
+
[35m@openmrs/esm-globals:build: [0mruntime modules 1.81 KiB 6 modules
|
|
4
4
|
[35m@openmrs/esm-globals:build: [0morphan modules 2.45 KiB [1m[33m[orphan][39m[22m 2 modules
|
|
5
|
-
[35m@openmrs/esm-globals:build: [
|
|
6
|
-
[35m@openmrs/esm-globals:build: [
|
|
5
|
+
[35m@openmrs/esm-globals:build: [0mcacheable modules 5.76 KiB
|
|
6
|
+
[35m@openmrs/esm-globals:build: [0m modules by path [1m../../../node_modules/systemjs-webpack-interop/auto-public-path/*.js[39m[22m 935 bytes
|
|
7
|
+
[35m@openmrs/esm-globals:build: [0m [1m../../../node_modules/systemjs-webpack-interop/auto-public-path/1.js[39m[22m 89 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
8
|
+
[35m@openmrs/esm-globals:build: [0m [1m../../../node_modules/systemjs-webpack-interop/auto-public-path/auto-...(truncated)[39m[22m 846 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
9
|
+
[35m@openmrs/esm-globals:build: [0m [1m./src/index.ts + 1 modules[39m[22m 2.49 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
10
|
+
[35m@openmrs/esm-globals:build: [0m [1m../../../node_modules/systemjs-webpack-interop/public-path.js[39m[22m 2.36 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
11
|
+
[35m@openmrs/esm-globals:build: [0mwebpack 5.88.0 compiled [1m[32msuccessfully[39m[22m in 15965 ms
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
System.register([],(function(e,t){return{execute:function(){e((()=>{var e={968:(e,t,n)=>{const o=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=o(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var o="/"===n.pathname[0]?n.pathname:"/"+n.pathname,i=0,r=o.length;i!==t&&r>=0;)"/"===o[--r]&&i++;if(i!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+i+") in the URL path "+e);var c=o.slice(0,r+1);return n.protocol+"//"+n.host+c};Number.isInteger}},n={};function o(t){var i=n[t];if(void 0!==i)return i.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,o),r.exports}o.y=t,o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&!e;)e=n[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i={};return(0,o(968).s)(1),(()=>{"use strict";o.r(i),o.d(i,{dispatchActionableNotificationShown:()=>v,dispatchConnectivityChanged:()=>t,dispatchNotificationShown:()=>p,dispatchPrecacheStaticDependencies:()=>s,subscribeActionableNotificationShown:()=>l,subscribeConnectivity:()=>r,subscribeConnectivityChanged:()=>n,subscribeNotificationShown:()=>h,subscribePrecacheStaticDependencies:()=>a,subscribeToastShown:()=>f});const e="openmrs:connectivity-changed";function t(t){window.dispatchEvent(new CustomEvent(e,{detail:{online:t}}))}function n(t){const n=e=>t(e.detail);return window.addEventListener(e,n),()=>window.removeEventListener(e,n)}function r(e){return e({online:navigator.onLine}),n(e)}const c="openmrs:precache-static-dependencies";function s(e={}){window.dispatchEvent(new CustomEvent(c,{detail:e}))}function a(e){const t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}const d="openmrs:notification-shown",u="openmrs:actionable-notification-shown",w="openmrs:toast-shown";function p(e){window.dispatchEvent(new CustomEvent(d,{detail:e}))}function v(e){window.dispatchEvent(new CustomEvent(u,{detail:e}))}function h(e){const t=t=>e(t.detail);return window.addEventListener(d,t),()=>window.removeEventListener(d,t)}function l(e){const t=t=>e(t.detail);return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}function f(e){const t=t=>e(t.detail);return window.addEventListener(w,t),()=>window.removeEventListener(w,t)}})(),i})())}}}));
|
|
2
2
|
//# sourceMappingURL=openmrs-esm-globals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openmrs-esm-globals.js","mappings":"4CACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAA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H,OAAOQ,iBAAiBS,EAAuBX,GACxC,IAAIN,OAAOS,oBAAoBQ,EAAuBX,EACjE,CAC2B,SAASiB,EAAqClB,GACrE,MAAMC,EAAWC,GAAKF,EAAGE,EAAGJ,QAE5B,OADAH,OAAOQ,iBAAiBU,EAAiCZ,GAClD,IAAIN,OAAOS,oBAAoBS,EAAiCZ,EAC3E,CAC2B,SAASkB,EAAoBnB,GACpD,MAAMC,EAAWC,GAAKF,EAAGE,EAAGJ,QAE5B,OADAH,OAAOQ,iBAAiBW,EAAgBb,GACjC,IAAIN,OAAOS,oBAAoBU,EAAgBb,EAC1D,C","sources":["webpack://_openmrs_esm_globals/webpack/bootstrap","webpack://_openmrs_esm_globals/webpack/runtime/define property getters","webpack://_openmrs_esm_globals/webpack/runtime/hasOwnProperty shorthand","webpack://_openmrs_esm_globals/webpack/runtime/make namespace object","webpack://_openmrs_esm_globals/./src/events.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const connectivityChangedEventName = \"openmrs:connectivity-changed\";\nexport function dispatchConnectivityChanged(online) {\n window.dispatchEvent(new CustomEvent(connectivityChangedEventName, {\n detail: {\n online\n }\n }));\n}\n/** @category Offline */ export function subscribeConnectivityChanged(cb) {\n const handler = (ev)=>cb(ev.detail);\n window.addEventListener(connectivityChangedEventName, handler);\n return ()=>window.removeEventListener(connectivityChangedEventName, handler);\n}\n/** @category Offline */ export function subscribeConnectivity(cb) {\n cb({\n online: navigator.onLine\n });\n return subscribeConnectivityChanged(cb);\n}\nconst precacheStaticDependenciesEventName = \"openmrs:precache-static-dependencies\";\nexport function dispatchPrecacheStaticDependencies(data = {}) {\n window.dispatchEvent(new CustomEvent(precacheStaticDependenciesEventName, {\n detail: data\n }));\n}\n/** @category Offline */ export function subscribePrecacheStaticDependencies(cb) {\n const handler = (ev)=>cb(ev.detail);\n window.addEventListener(precacheStaticDependenciesEventName, handler);\n return ()=>window.removeEventListener(precacheStaticDependenciesEventName, handler);\n}\nconst notificationShownName = \"openmrs:notification-shown\";\nconst actionableNotificationShownName = \"openmrs:actionable-notification-shown\";\nconst toastShownName = \"openmrs:toast-shown\";\nexport function dispatchNotificationShown(data) {\n window.dispatchEvent(new CustomEvent(notificationShownName, {\n detail: data\n }));\n}\nexport function dispatchActionableNotificationShown(data) {\n window.dispatchEvent(new CustomEvent(actionableNotificationShownName, {\n detail: data\n }));\n}\n/** @category UI */ export function subscribeNotificationShown(cb) {\n const handler = (ev)=>cb(ev.detail);\n window.addEventListener(notificationShownName, handler);\n return ()=>window.removeEventListener(notificationShownName, handler);\n}\n/** @category UI */ export function subscribeActionableNotificationShown(cb) {\n const handler = (ev)=>cb(ev.detail);\n window.addEventListener(actionableNotificationShownName, handler);\n return ()=>window.removeEventListener(actionableNotificationShownName, handler);\n}\n/** @category UI */ export function subscribeToastShown(cb) {\n const handler = (ev)=>cb(ev.detail);\n window.addEventListener(toastShownName, handler);\n return ()=>window.removeEventListener(toastShownName, handler);\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","connectivityChangedEventName","dispatchConnectivityChanged","online","window","dispatchEvent","CustomEvent","detail","subscribeConnectivityChanged","cb","handler","ev","addEventListener","removeEventListener","subscribeConnectivity","navigator","onLine","precacheStaticDependenciesEventName","dispatchPrecacheStaticDependencies","data","subscribePrecacheStaticDependencies","notificationShownName","actionableNotificationShownName","toastShownName","dispatchNotificationShown","dispatchActionableNotificationShown","subscribeNotificationShown","subscribeActionableNotificationShown","subscribeToastShown"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"openmrs-esm-globals.js","mappings":"yFAAA,MAAMA,EAAmB,SAEzBC,EAAQ,EAAiB,SAAwBC,GAY7C,GAXGA,IACHA,EAAe,IAUV,IAAmBC,OAAS,IAAmBA,KAAKC,IAEvD,MADAC,QAAQC,MAAM,qBAAsB,KAC9BC,MACJ,uHAIJ,IAA0BP,EACxB,IAAmBG,KAAKC,IACxBF,EAGN,C,gBCoDAD,EAAQ,EAlCR,SAA0BO,EAAWC,GAKnC,IAAIC,EAAIC,SAASC,cAAc,KAC/BF,EAAEG,KAAOL,EAKT,IAHA,IAAIM,EAA6B,MAAlBJ,EAAEI,SAAS,GAAaJ,EAAEI,SAAW,IAAMJ,EAAEI,SACxDC,EAAmB,EACrBC,EAAQF,EAASG,OACZF,IAAqBN,GAAsBO,GAAS,GAE5C,MADFF,IAAWE,IAEpBD,IAIJ,GAAIA,IAAqBN,EACvB,MAAMF,MACJ,iDACEE,EACA,gDACAM,EACA,qBACAP,GAIN,IAAIU,EAAYJ,EAASK,MAAM,EAAGH,EAAQ,GAE1C,OAAON,EAAEU,SAAW,KAAOV,EAAEW,KAAOH,CACtC,EAMEI,OAAOC,S,GCjFLC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAa1B,QAGrB,IAAI4B,EAASL,EAAyBE,GAAY,CAGjDzB,QAAS,CAAC,GAOX,OAHA6B,EAAoBJ,GAAUG,EAAQA,EAAO5B,QAASwB,GAG/CI,EAAO5B,OACf,CCtBAwB,EAAoBM,EAAIC,ECCxBP,EAAoBQ,EAAI,CAAChC,EAASiC,KACjC,IAAI,IAAIC,KAAOD,EACXT,EAAoBW,EAAEF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path/auto-public-path.js","webpack://@openmrs/esm-globals/../../../node_modules/systemjs-webpack-interop/public-path.js","webpack://@openmrs/esm-globals/webpack/bootstrap","webpack://@openmrs/esm-globals/webpack/runtime/__system_context__","webpack://@openmrs/esm-globals/webpack/runtime/define property getters","webpack://@openmrs/esm-globals/webpack/runtime/global","webpack://@openmrs/esm-globals/webpack/runtime/hasOwnProperty shorthand","webpack://@openmrs/esm-globals/webpack/runtime/make namespace object","webpack://@openmrs/esm-globals/webpack/runtime/publicPath","webpack://@openmrs/esm-globals/../../../node_modules/systemjs-webpack-interop/auto-public-path/1.js","webpack://@openmrs/esm-globals/./src/events.ts"],"sourcesContent":["const resolveDirectory = require(\"../public-path\").resolveDirectory;\n\nexports.autoPublicPath = function autoPublicPath(rootDirLevel) {\n if (!rootDirLevel) {\n rootDirLevel = 1;\n }\n\n if (typeof __webpack_public_path__ !== \"undefined\") {\n if (typeof __system_context__ === \"undefined\") {\n throw Error(\n \"systemjs-webpack-interop requires webpack@>=5.0.0-beta.15 and output.libraryTarget set to 'system'\"\n );\n }\n\n if (!__system_context__.meta || !__system_context__.meta.url) {\n console.error(\"__system_context__\", __system_context__);\n throw Error(\n \"systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(\n __system_context__.meta.url,\n rootDirLevel\n );\n }\n};\n","exports.setPublicPath = function setPublicPath(\n systemjsModuleName,\n rootDirectoryLevel\n) {\n if (!rootDirectoryLevel) {\n rootDirectoryLevel = 1;\n }\n if (\n typeof systemjsModuleName !== \"string\" ||\n systemjsModuleName.trim().length === 0\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName) must be called with a non-empty string 'systemjsModuleName'\"\n );\n }\n\n if (\n typeof rootDirectoryLevel !== \"number\" ||\n rootDirectoryLevel <= 0 ||\n isNaN(rootDirectoryLevel) ||\n !isInteger(rootDirectoryLevel)\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName, rootDirectoryLevel) must be called with a positive integer 'rootDirectoryLevel'\"\n );\n }\n\n var moduleUrl;\n try {\n moduleUrl = window.System.resolve(systemjsModuleName);\n if (!moduleUrl) {\n throw Error();\n }\n } catch (err) {\n throw Error(\n \"systemjs-webpack-interop: There is no such module '\" +\n systemjsModuleName +\n \"' in the SystemJS registry. Did you misspell the name of your module?\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(moduleUrl, rootDirectoryLevel);\n};\n\nfunction resolveDirectory(urlString, rootDirectoryLevel) {\n // Our friend IE11 doesn't support new URL()\n // https://github.com/single-spa/single-spa/issues/612\n // https://gist.github.com/jlong/2428561\n\n var a = document.createElement(\"a\");\n a.href = urlString;\n\n var pathname = a.pathname[0] === \"/\" ? a.pathname : \"/\" + a.pathname;\n var numDirsProcessed = 0,\n index = pathname.length;\n while (numDirsProcessed !== rootDirectoryLevel && index >= 0) {\n var char = pathname[--index];\n if (char === \"/\") {\n numDirsProcessed++;\n }\n }\n\n if (numDirsProcessed !== rootDirectoryLevel) {\n throw Error(\n \"systemjs-webpack-interop: rootDirectoryLevel (\" +\n rootDirectoryLevel +\n \") is greater than the number of directories (\" +\n numDirsProcessed +\n \") in the URL path \" +\n urlString\n );\n }\n\n var finalPath = pathname.slice(0, index + 1);\n\n return a.protocol + \"//\" + a.host + finalPath;\n}\n\nexports.resolveDirectory = resolveDirectory;\n\n// borrowed from https://github.com/parshap/js-is-integer/blob/master/index.js\nvar isInteger =\n Number.isInteger ||\n function isInteger(val) {\n return typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n };\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.y = __system_context__;","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","const autoPublicPath = require(\"./auto-public-path\").autoPublicPath;\n\nautoPublicPath(1);\n","const connectivityChangedEventName = \"openmrs:connectivity-changed\";\nexport function dispatchConnectivityChanged(online) {\n window.dispatchEvent(new CustomEvent(connectivityChangedEventName, {\n detail: {\n online\n }\n }));\n}\n/** @category Offline */ export function subscribeConnectivityChanged(cb) {\n const handler = (ev)=>cb(ev.detail);\n window.addEventListener(connectivityChangedEventName, handler);\n return ()=>window.removeEventListener(connectivityChangedEventName, handler);\n}\n/** @category Offline */ export function subscribeConnectivity(cb) {\n cb({\n online: navigator.onLine\n });\n return subscribeConnectivityChanged(cb);\n}\nconst precacheStaticDependenciesEventName = \"openmrs:precache-static-dependencies\";\nexport function dispatchPrecacheStaticDependencies(data = {}) {\n window.dispatchEvent(new CustomEvent(precacheStaticDependenciesEventName, {\n detail: data\n }));\n}\n/** @category Offline */ export function subscribePrecacheStaticDependencies(cb) {\n const handler = (ev)=>cb(ev.detail);\n window.addEventListener(precacheStaticDependenciesEventName, handler);\n return ()=>window.removeEventListener(precacheStaticDependenciesEventName, handler);\n}\nconst notificationShownName = \"openmrs:notification-shown\";\nconst actionableNotificationShownName = \"openmrs:actionable-notification-shown\";\nconst toastShownName = \"openmrs:toast-shown\";\nexport function dispatchNotificationShown(data) {\n window.dispatchEvent(new CustomEvent(notificationShownName, {\n detail: data\n }));\n}\nexport function dispatchActionableNotificationShown(data) {\n window.dispatchEvent(new CustomEvent(actionableNotificationShownName, {\n detail: data\n }));\n}\n/** @category UI */ export function subscribeNotificationShown(cb) {\n const handler = (ev)=>cb(ev.detail);\n window.addEventListener(notificationShownName, handler);\n return ()=>window.removeEventListener(notificationShownName, handler);\n}\n/** @category UI */ export function subscribeActionableNotificationShown(cb) {\n const handler = (ev)=>cb(ev.detail);\n window.addEventListener(actionableNotificationShownName, handler);\n return ()=>window.removeEventListener(actionableNotificationShownName, handler);\n}\n/** @category UI */ export function subscribeToastShown(cb) {\n const handler = (ev)=>cb(ev.detail);\n window.addEventListener(toastShownName, handler);\n return ()=>window.removeEventListener(toastShownName, handler);\n}\n"],"names":["resolveDirectory","exports","rootDirLevel","meta","url","console","error","Error","urlString","rootDirectoryLevel","a","document","createElement","href","pathname","numDirsProcessed","index","length","finalPath","slice","protocol","host","Number","isInteger","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","module","__webpack_modules__","y","__system_context__","d","definition","key","o","Object","defineProperty","enumerable","get","g","globalThis","this","Function","e","window","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","scriptUrl","importScripts","location","currentScript","src","scripts","getElementsByTagName","i","replace","p","autoPublicPath","connectivityChangedEventName","dispatchConnectivityChanged","online","dispatchEvent","CustomEvent","detail","subscribeConnectivityChanged","cb","handler","ev","addEventListener","removeEventListener","subscribeConnectivity","navigator","onLine","precacheStaticDependenciesEventName","dispatchPrecacheStaticDependencies","data","subscribePrecacheStaticDependencies","notificationShownName","actionableNotificationShownName","toastShownName","dispatchNotificationShown","dispatchActionableNotificationShown","subscribeNotificationShown","subscribeActionableNotificationShown","subscribeToastShown"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-globals",
|
|
3
|
-
"version": "5.0.1
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"browser": "dist/openmrs-esm-globals.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"single-spa": "^5.9.3"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "c29b88275be224849a36fcad074af34e3f30f495"
|
|
43
43
|
}
|
package/webpack.config.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
|
|
2
|
+
const SystemJSPublicPathWebpackPlugin = require("systemjs-webpack-interop/SystemJSPublicPathWebpackPlugin");
|
|
2
3
|
const { resolve } = require("path");
|
|
3
4
|
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
|
4
5
|
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
|
|
@@ -10,22 +11,24 @@ module.exports = (env) => ({
|
|
|
10
11
|
output: {
|
|
11
12
|
filename: "openmrs-esm-globals.js",
|
|
12
13
|
path: resolve(__dirname, "dist"),
|
|
13
|
-
|
|
14
|
+
libraryTarget: "system",
|
|
14
15
|
},
|
|
15
16
|
devtool: "source-map",
|
|
16
17
|
module: {
|
|
17
18
|
rules: [
|
|
18
19
|
{
|
|
19
20
|
test: /\.m?(js|ts|tsx)$/,
|
|
20
|
-
exclude: /
|
|
21
|
+
exclude: /node_modules/,
|
|
21
22
|
use: "@swc-node/loader",
|
|
22
23
|
},
|
|
23
24
|
],
|
|
24
25
|
},
|
|
26
|
+
externals: Object.keys(peerDependencies || {}),
|
|
25
27
|
resolve: {
|
|
26
28
|
extensions: [".ts", ".js", ".tsx", ".jsx"],
|
|
27
29
|
},
|
|
28
30
|
plugins: [
|
|
31
|
+
new SystemJSPublicPathWebpackPlugin(),
|
|
29
32
|
new CleanWebpackPlugin(),
|
|
30
33
|
new ForkTsCheckerWebpackPlugin(),
|
|
31
34
|
new BundleAnalyzerPlugin({
|