@openmrs/esm-globals 4.2.1-pre.621 → 4.3.0
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,4 +1,4 @@
|
|
|
1
|
-
[33m@openmrs/esm-globals:build[0m: cache hit, replaying output [
|
|
1
|
+
[33m@openmrs/esm-globals:build[0m: cache hit, replaying output [2meac6b1319bbdb8d0[0m
|
|
2
2
|
[33m@openmrs/esm-globals:build: [0masset [1m[32mopenmrs-esm-globals.js[39m[22m 3.84 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (name: main) 1 related asset
|
|
3
3
|
[33m@openmrs/esm-globals:build: [0mruntime modules 1.76 KiB 6 modules
|
|
4
4
|
[33m@openmrs/esm-globals:build: [0morphan modules 3.48 KiB [1m[33m[orphan][39m[22m 3 modules
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
[33m@openmrs/esm-globals:build: [0m [1m../../../node_modules/systemjs-webpack-interop/auto-public-path/auto-public-path.js[39m[22m 846 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
9
9
|
[33m@openmrs/esm-globals:build: [0m [1m./src/index.ts + 2 modules[39m[22m 3.54 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
10
10
|
[33m@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
|
-
[33m@openmrs/esm-globals:build: [0mwebpack 5.
|
|
11
|
+
[33m@openmrs/esm-globals:build: [0mwebpack 5.77.0 compiled [1m[32msuccessfully[39m[22m in 14322 ms
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openmrs-esm-globals.js","mappings":"yFAAA,MAAMA,EAAmB,SAEzBC,EAAQ,EAAiB,SAAwBC,GAY7C,GAXGA,IACHA,EAAe,IAUV,IA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O4D,SAAW,SAACC,GACjB,IAAMC,EAAM9D,OAAO+D,eAEnB,GAAID,EAAK,CACP,IAAMxD,EAAIzC,SAASmG,cACnB1D,EAAE2D,WAAWJ,GACbC,EAAII,kBACJJ,EAAIK,SAAS7D,GACbzC,SAASuG,YAAY,QACrBN,EAAII,iBACN,CACF,CACF,C","sources":["webpack://@openmrs/esm-globals/../../../node_modules/systemjs-webpack-interop/auto-public-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","webpack://@openmrs/esm-globals/./src/globals.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) scriptUrl = scripts[scripts.length - 1].src\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","export interface ConnectivityChangedEvent {\n online: boolean;\n}\n\nconst connectivityChangedEventName = \"openmrs:connectivity-changed\";\n\nexport function dispatchConnectivityChanged(online: boolean) {\n window.dispatchEvent(\n new CustomEvent(connectivityChangedEventName, { detail: { online } })\n );\n}\n\n/** @category Offline */\nexport function subscribeConnectivityChanged(\n cb: (ev: ConnectivityChangedEvent) => void\n) {\n const handler = (ev: CustomEvent) => cb(ev.detail);\n window.addEventListener(connectivityChangedEventName, handler);\n return () =>\n window.removeEventListener(connectivityChangedEventName, handler);\n}\n\n/** @category Offline */\nexport function subscribeConnectivity(\n cb: (ev: ConnectivityChangedEvent) => void\n) {\n cb({ online: navigator.onLine });\n return subscribeConnectivityChanged(cb);\n}\n\nexport interface PrecacheStaticDependenciesEvent {}\n\nconst precacheStaticDependenciesEventName =\n \"openmrs:precache-static-dependencies\";\n\nexport function dispatchPrecacheStaticDependencies(\n data: PrecacheStaticDependenciesEvent = {}\n) {\n window.dispatchEvent(\n new CustomEvent(precacheStaticDependenciesEventName, { detail: data })\n );\n}\n\n/** @category Offline */\nexport function subscribePrecacheStaticDependencies(\n cb: (data: PrecacheStaticDependenciesEvent) => void\n) {\n const handler = (ev: CustomEvent) => cb(ev.detail);\n window.addEventListener(precacheStaticDependenciesEventName, handler);\n return () =>\n window.removeEventListener(precacheStaticDependenciesEventName, handler);\n}\n\n/** @category UI */\nexport interface ShowNotificationEvent {\n description: any;\n kind?:\n | \"error\"\n | \"info\"\n | \"info-square\"\n | \"success\"\n | \"warning\"\n | \"warning-alt\";\n title?: string;\n action?: any;\n millis?: number;\n}\n\nexport interface ShowActionableNotificationEvent {\n subtitle: any;\n kind?:\n | \"error\"\n | \"info\"\n | \"info-square\"\n | \"success\"\n | \"warning\"\n | \"warning-alt\";\n title?: string;\n actionButtonLabel: string | any;\n onActionButtonClick: () => void;\n progressActionLabel?: string;\n}\n\n/** @category UI */\nexport interface ShowToastEvent {\n description: any;\n kind?:\n | \"error\"\n | \"info\"\n | \"info-square\"\n | \"success\"\n | \"warning\"\n | \"warning-alt\";\n title?: string;\n millis?: number;\n}\n\nconst notificationShownName = \"openmrs:notification-shown\";\nconst actionableNotificationShownName = \"openmrs:actionable-notification-shown\";\nconst toastShownName = \"openmrs:toast-shown\";\n\nexport function dispatchNotificationShown(data: ShowNotificationEvent) {\n window.dispatchEvent(\n new CustomEvent(notificationShownName, { detail: data })\n );\n}\n\nexport function dispatchActionableNotificationShown(\n data: ShowActionableNotificationEvent\n) {\n window.dispatchEvent(\n new CustomEvent(actionableNotificationShownName, { detail: data })\n );\n}\n\n/** @category UI */\nexport function subscribeNotificationShown(\n cb: (data: ShowNotificationEvent) => void\n) {\n const handler = (ev: CustomEvent) => cb(ev.detail);\n window.addEventListener(notificationShownName, handler);\n return () => window.removeEventListener(notificationShownName, handler);\n}\n\n/** @category UI */\nexport function subscribeActionableNotificationShown(\n cb: (data: ShowActionableNotificationEvent) => void\n) {\n const handler = (ev: CustomEvent) => cb(ev.detail);\n window.addEventListener(actionableNotificationShownName, handler);\n return () =>\n window.removeEventListener(actionableNotificationShownName, handler);\n}\n\n/** @category UI */\nexport function subscribeToastShown(cb: (data: ShowToastEvent) => void) {\n const handler = (ev: CustomEvent) => cb(ev.detail);\n window.addEventListener(toastShownName, handler);\n return () => window.removeEventListener(toastShownName, handler);\n}\n","import type { SpaConfig } from \"./types\";\n\nexport function setupPaths(config: SpaConfig) {\n window.openmrsBase = config.apiUrl;\n window.spaBase = config.spaPath;\n window.spaEnv = config.env || \"production\";\n window.spaVersion = process.env.BUILD_VERSION;\n window.getOpenmrsSpaBase = () => `${window.spaBase}/`;\n}\n\nexport function setupUtils() {\n window.copyText = (source: HTMLElement) => {\n const sel = window.getSelection();\n\n if (sel) {\n const r = document.createRange();\n r.selectNode(source);\n sel.removeAllRanges();\n sel.addRange(r);\n document.execCommand(\"copy\");\n sel.removeAllRanges();\n }\n };\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","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","setupPaths","config","openmrsBase","apiUrl","spaBase","spaPath","spaEnv","env","spaVersion","process","BUILD_VERSION","getOpenmrsSpaBase","setupUtils","copyText","source","sel","getSelection","createRange","selectNode","removeAllRanges","addRange","execCommand"],"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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II,kBACJJ,EAAIK,SAAS7D,GACbzC,SAASuG,YAAY,QACrBN,EAAII,iBACN,CACF,CACF,C","sources":["webpack://@openmrs/esm-globals/../../../node_modules/systemjs-webpack-interop/auto-public-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","webpack://@openmrs/esm-globals/./src/globals.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) scriptUrl = scripts[scripts.length - 1].src\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","export interface ConnectivityChangedEvent {\n online: boolean;\n}\n\nconst connectivityChangedEventName = \"openmrs:connectivity-changed\";\n\nexport function dispatchConnectivityChanged(online: boolean) {\n window.dispatchEvent(\n new CustomEvent(connectivityChangedEventName, { detail: { online } })\n );\n}\n\n/** @category Offline */\nexport function subscribeConnectivityChanged(\n cb: (ev: ConnectivityChangedEvent) => void\n) {\n const handler = (ev: CustomEvent) => cb(ev.detail);\n window.addEventListener(connectivityChangedEventName, handler);\n return () =>\n window.removeEventListener(connectivityChangedEventName, handler);\n}\n\n/** @category Offline */\nexport function subscribeConnectivity(\n cb: (ev: ConnectivityChangedEvent) => void\n) {\n cb({ online: navigator.onLine });\n return subscribeConnectivityChanged(cb);\n}\n\nexport interface PrecacheStaticDependenciesEvent {}\n\nconst precacheStaticDependenciesEventName =\n \"openmrs:precache-static-dependencies\";\n\nexport function dispatchPrecacheStaticDependencies(\n data: PrecacheStaticDependenciesEvent = {}\n) {\n window.dispatchEvent(\n new CustomEvent(precacheStaticDependenciesEventName, { detail: data })\n );\n}\n\n/** @category Offline */\nexport function subscribePrecacheStaticDependencies(\n cb: (data: PrecacheStaticDependenciesEvent) => void\n) {\n const handler = (ev: CustomEvent) => cb(ev.detail);\n window.addEventListener(precacheStaticDependenciesEventName, handler);\n return () =>\n window.removeEventListener(precacheStaticDependenciesEventName, handler);\n}\n\n/** @category UI */\nexport interface ShowNotificationEvent {\n description: any;\n kind?:\n | \"error\"\n | \"info\"\n | \"info-square\"\n | \"success\"\n | \"warning\"\n | \"warning-alt\";\n title?: string;\n action?: any;\n millis?: number;\n}\n\nexport interface ShowActionableNotificationEvent {\n subtitle: any;\n kind?:\n | \"error\"\n | \"info\"\n | \"info-square\"\n | \"success\"\n | \"warning\"\n | \"warning-alt\";\n title?: string;\n actionButtonLabel: string | any;\n onActionButtonClick: () => void;\n progressActionLabel?: string;\n}\n\n/** @category UI */\nexport interface ShowToastEvent {\n description: any;\n kind?:\n | \"error\"\n | \"info\"\n | \"info-square\"\n | \"success\"\n | \"warning\"\n | \"warning-alt\";\n title?: string;\n millis?: number;\n}\n\nconst notificationShownName = \"openmrs:notification-shown\";\nconst actionableNotificationShownName = \"openmrs:actionable-notification-shown\";\nconst toastShownName = \"openmrs:toast-shown\";\n\nexport function dispatchNotificationShown(data: ShowNotificationEvent) {\n window.dispatchEvent(\n new CustomEvent(notificationShownName, { detail: data })\n );\n}\n\nexport function dispatchActionableNotificationShown(\n data: ShowActionableNotificationEvent\n) {\n window.dispatchEvent(\n new CustomEvent(actionableNotificationShownName, { detail: data })\n );\n}\n\n/** @category UI */\nexport function subscribeNotificationShown(\n cb: (data: ShowNotificationEvent) => void\n) {\n const handler = (ev: CustomEvent) => cb(ev.detail);\n window.addEventListener(notificationShownName, handler);\n return () => window.removeEventListener(notificationShownName, handler);\n}\n\n/** @category UI */\nexport function subscribeActionableNotificationShown(\n cb: (data: ShowActionableNotificationEvent) => void\n) {\n const handler = (ev: CustomEvent) => cb(ev.detail);\n window.addEventListener(actionableNotificationShownName, handler);\n return () =>\n window.removeEventListener(actionableNotificationShownName, handler);\n}\n\n/** @category UI */\nexport function subscribeToastShown(cb: (data: ShowToastEvent) => void) {\n const handler = (ev: CustomEvent) => cb(ev.detail);\n window.addEventListener(toastShownName, handler);\n return () => window.removeEventListener(toastShownName, handler);\n}\n","import type { SpaConfig } from \"./types\";\n\nexport function setupPaths(config: SpaConfig) {\n window.openmrsBase = config.apiUrl;\n window.spaBase = config.spaPath;\n window.spaEnv = config.env || \"production\";\n window.spaVersion = process.env.BUILD_VERSION;\n window.getOpenmrsSpaBase = () => `${window.spaBase}/`;\n}\n\nexport function setupUtils() {\n window.copyText = (source: HTMLElement) => {\n const sel = window.getSelection();\n\n if (sel) {\n const r = document.createRange();\n r.selectNode(source);\n sel.removeAllRanges();\n sel.addRange(r);\n document.execCommand(\"copy\");\n sel.removeAllRanges();\n }\n };\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","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","setupPaths","config","openmrsBase","apiUrl","spaBase","spaPath","spaEnv","env","spaVersion","process","BUILD_VERSION","getOpenmrsSpaBase","setupUtils","copyText","source","sel","getSelection","createRange","selectNode","removeAllRanges","addRange","execCommand"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-globals",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"browser": "dist/openmrs-esm-globals.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"single-spa": "^5.9.3"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "839d51d2e28c9965be63d2a671d6e8ceed6ffb9e"
|
|
42
42
|
}
|