@openmrs/esm-home-app 3.1.0 → 3.1.1-pre.70
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/dist/212.openmrs-esm-home-app.js +2 -0
- package/dist/212.openmrs-esm-home-app.js.map +1 -0
- package/dist/314.openmrs-esm-home-app.js +2 -0
- package/dist/314.openmrs-esm-home-app.js.map +1 -0
- package/dist/319.openmrs-esm-home-app.js +1 -0
- package/dist/347.openmrs-esm-home-app.js +2 -0
- package/dist/347.openmrs-esm-home-app.js.map +1 -0
- package/dist/410.openmrs-esm-home-app.js +2 -0
- package/dist/410.openmrs-esm-home-app.js.map +1 -0
- package/dist/574.openmrs-esm-home-app.js +1 -0
- package/dist/663.openmrs-esm-home-app.js +2 -0
- package/dist/663.openmrs-esm-home-app.js.map +1 -0
- package/dist/779.openmrs-esm-home-app.js +2 -0
- package/dist/779.openmrs-esm-home-app.js.map +1 -0
- package/dist/898.openmrs-esm-home-app.js +2 -0
- package/dist/898.openmrs-esm-home-app.js.map +1 -0
- package/dist/990.openmrs-esm-home-app.js +2 -0
- package/dist/990.openmrs-esm-home-app.js.map +1 -0
- package/dist/openmrs-esm-home-app.js +1 -1
- package/dist/openmrs-esm-home-app.js.buildmanifest.json +256 -0
- package/dist/openmrs-esm-home-app.js.map +1 -1
- package/package.json +5 -6
- package/src/dashboard/home-dashboard.component.css +6 -0
- package/src/dashboard/home-dashboard.component.tsx +7 -16
- package/src/dashboard/home-dashboard.test.tsx +0 -23
- package/src/index.ts +8 -1
- package/src/openmrs-esm-home-schema.ts +7 -0
- package/src/refapp-links/active-visits.tsx +4 -6
- package/src/refapp-links/appointment-scheduling.tsx +2 -6
- package/src/refapp-links/capture-vitals.tsx +4 -6
- package/src/refapp-links/configure-metadata.tsx +2 -6
- package/src/refapp-links/data-management.tsx +2 -6
- package/src/refapp-links/reports.tsx +2 -2
- package/src/refapp-links/system-administration.tsx +4 -6
- package/src/root.component.tsx +0 -6
- package/src/types.ts +0 -28
- package/webpack.config.js +1 -79
- package/dist/1.openmrs-esm-home-app.js +0 -7
- package/dist/1.openmrs-esm-home-app.js.map +0 -1
- package/dist/10.openmrs-esm-home-app.js +0 -2
- package/dist/10.openmrs-esm-home-app.js.map +0 -1
- package/dist/11.openmrs-esm-home-app.js +0 -2
- package/dist/11.openmrs-esm-home-app.js.map +0 -1
- package/dist/2.openmrs-esm-home-app.js +0 -2
- package/dist/2.openmrs-esm-home-app.js.map +0 -1
- package/dist/3.openmrs-esm-home-app.js +0 -2
- package/dist/3.openmrs-esm-home-app.js.map +0 -1
- package/dist/4.openmrs-esm-home-app.js +0 -2
- package/dist/4.openmrs-esm-home-app.js.map +0 -1
- package/dist/5.openmrs-esm-home-app.js +0 -2
- package/dist/5.openmrs-esm-home-app.js.map +0 -1
- package/dist/6.openmrs-esm-home-app.js +0 -2
- package/dist/6.openmrs-esm-home-app.js.map +0 -1
- package/dist/7.openmrs-esm-home-app.js +0 -2
- package/dist/7.openmrs-esm-home-app.js.map +0 -1
- package/dist/8.openmrs-esm-home-app.js +0 -2
- package/dist/8.openmrs-esm-home-app.js.map +0 -1
- package/dist/9.openmrs-esm-home-app.js +0 -2
- package/dist/9.openmrs-esm-home-app.js.map +0 -1
- package/src/patient-search/empty-data-illustration.component.tsx +0 -41
- package/src/patient-search/patient-search.component.tsx +0 -161
- package/src/patient-search/patient-search.resource.tsx +0 -7
- package/src/patient-search/patient-search.scss +0 -65
- package/src/patient-search/patient-search.test.tsx +0 -104
- package/src/patient-search-result/patient-search-result.component.css +0 -87
- package/src/patient-search-result/patient-search-result.component.tsx +0 -56
- package/src/patient-search-result/patient-search-result.scss +0 -43
- package/src/patient-search-result/patient-search-result.test.tsx +0 -60
- package/src/refapp-links/refapp-link.tsx +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@openmrs/esm-framework\"","webpack:///./translations lazy nonrecursive .json$","webpack:///./node_modules/systemjs-webpack-interop/src/public-path-system-resolve.js","webpack:///./src/set-public-path.ts","webpack:///./src/openmrs-esm-home-schema.ts","webpack:///./src/index.ts","webpack:///external \"react\"","webpack:///external \"carbon-components\"","webpack:///external \"react-router-dom\"","webpack:///external \"react-i18next\"","webpack:///external \"dayjs\""],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","0","__webpack_require__","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice","s","__WEBPACK_EXTERNAL_MODULE__0__","map","webpackAsyncContext","req","then","code","ids","id","keys","systemjsModuleName","rootDirectoryLevel","trim","Number","isInteger","moduleUrl","System","urlString","url","URL","pathname","numDirsProcessed","index","fullUrl","href","resolveDirectory","setPublicPath","esmHomeSchema","buttons","enabled","_type","Type","Boolean","_default","_description","list","Array","_elements","label","String","link","_validators","validators","isUrl","requiredPrivilege","spa","search","patientResultUrl","isUrlWithTemplateParameters","backendDependencies","importTranslation","require","setupOpenMRS","options","featureName","moduleName","defineConfigSchema","registerBreadcrumbs","path","spaBase","title","pages","load","getAsyncLifecycle","route","online","canSearch","offline","extensions","slot","__WEBPACK_EXTERNAL_MODULE__5__","__WEBPACK_EXTERNAL_MODULE__6__","__WEBPACK_EXTERNAL_MODULE__7__","__WEBPACK_EXTERNAL_MODULE__8__","__WEBPACK_EXTERNAL_MODULE__9__"],"mappings":"uSACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAA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AOD,QAAU8I,G,cCAjB7I,EAAOD,QAAU+I","file":"openmrs-esm-home-app.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"\" + chunkId + \".openmrs-esm-home-app.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp_openmrs_esm_home\"] = window[\"webpackJsonp_openmrs_esm_home\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","var map = {\n\t\"./en.json\": [\n\t\t10,\n\t\t10\n\t],\n\t\"./es.json\": [\n\t\t11,\n\t\t11\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 2;\nmodule.exports = webpackAsyncContext;","export function setPublicPath(systemjsModuleName, rootDirectoryLevel) {\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 !Number.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 let 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 const url = new URL(urlString);\n const pathname = new URL(urlString).pathname;\n let numDirsProcessed = 0,\n index = pathname.length;\n while (numDirsProcessed !== rootDirectoryLevel && index >= 0) {\n const 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 fullUrl\n );\n }\n\n url.pathname = url.pathname.slice(0, index + 1);\n\n return url.href;\n}\n","import { setPublicPath } from 'systemjs-webpack-interop';\n\nsetPublicPath('@openmrs/esm-home-app');\n","import { Type, validators } from '@openmrs/esm-framework';\n\nexport const esmHomeSchema = {\n buttons: {\n enabled: {\n _type: Type.Boolean,\n _default: true,\n _description: 'Whether to show big buttons on the home page (including extensions)',\n },\n list: {\n _type: Type.Array,\n _elements: {\n label: { _type: Type.String },\n link: {\n _type: Type.String,\n _validators: [validators.isUrl],\n },\n requiredPrivilege: {\n _type: Type.String,\n },\n spa: {\n _type: Type.Boolean,\n _default: false,\n },\n },\n _default: [],\n _description: 'Custom buttons to add, which will come after the button extensions',\n },\n },\n search: {\n patientResultUrl: {\n _default: '${openmrsSpaBase}/patient/${patientUuid}/chart',\n _description: 'Where clicking a patient result takes the user. Accepts template parameter ${patientUuid}',\n _validators: [validators.isUrlWithTemplateParameters(['patientUuid'])],\n },\n },\n};\n","import { registerBreadcrumbs, defineConfigSchema, getAsyncLifecycle } from '@openmrs/esm-framework';\nimport { esmHomeSchema } from './openmrs-esm-home-schema';\n\nconst backendDependencies = {\n 'webservices.rest': '2.24.0',\n};\n\nconst importTranslation = require.context('../translations', false, /.json$/, 'lazy');\n\nfunction setupOpenMRS() {\n const moduleName = '@openmrs/esm-home-app';\n const pageName = 'home';\n\n const options = {\n featureName: pageName,\n moduleName,\n };\n\n defineConfigSchema(moduleName, esmHomeSchema);\n\n registerBreadcrumbs([\n {\n path: `${window.spaBase}/${pageName}`,\n title: 'Home',\n },\n ]);\n\n return {\n pages: [\n {\n load: getAsyncLifecycle(() => import('./root.component'), options),\n route: pageName,\n online: {\n canSearch: true,\n },\n offline: {\n canSearch: false,\n },\n },\n ],\n extensions: [\n {\n id: 'active-visits-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/active-visits'), options),\n online: true,\n offline: true,\n },\n {\n id: 'capture-vitals-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/capture-vitals'), options),\n online: true,\n offline: false,\n },\n {\n id: 'appointment-scheduling-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/appointment-scheduling'), options),\n online: true,\n offline: false,\n },\n {\n id: 'reports-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/reports'), options),\n online: true,\n offline: false,\n },\n {\n id: 'data-management-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/data-management'), options),\n online: true,\n offline: false,\n },\n {\n id: 'configure-metadata-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/configure-metadata'), options),\n online: true,\n offline: false,\n },\n {\n id: 'system-administration-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/system-administration'), options),\n online: true,\n offline: false,\n },\n ],\n };\n}\n\nexport { backendDependencies, importTranslation, setupOpenMRS };\n","module.exports = __WEBPACK_EXTERNAL_MODULE__5__;","module.exports = __WEBPACK_EXTERNAL_MODULE__6__;","module.exports = __WEBPACK_EXTERNAL_MODULE__7__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8__;","module.exports = __WEBPACK_EXTERNAL_MODULE__9__;"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"openmrs-esm-home-app.js","mappings":"moBAAIA,EACAC,E,iBCDJ,MAAMC,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,K,cCuDND,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,GAOpCI,OA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AkB,IAAM,8BAA6CV,GAC3EiB,UAAW,kCACXL,QAAQ,EACRE,SAAS,GAEX,CACEnI,GAAI,6BACJqI,KAAM,gBACNP,MAAMC,EAAAA,EAAAA,oBAAkB,IAAM,8BAAgDV,GAC9EiB,UAAW,qCACXL,QAAQ,EACRE,SAAS,O","sources":["webpack://@openmrs/esm-home-app/webpack/runtime/load script","webpack://@openmrs/esm-home-app/../../node_modules/systemjs-webpack-interop/auto-public-path/auto-public-path.js","webpack://@openmrs/esm-home-app/../../node_modules/systemjs-webpack-interop/public-path.js","webpack://@openmrs/esm-home-app//home/runner/work/openmrs-esm-home/openmrs-esm-home/packages/esm-home-app/translations|lazy|nonrecursive|/.json$/","webpack://@openmrs/esm-home-app/external \"@openmrs/esm-framework\"","webpack://@openmrs/esm-home-app/external \"react\"","webpack://@openmrs/esm-home-app/external \"react-i18next\"","webpack://@openmrs/esm-home-app/external \"react-router-dom\"","webpack://@openmrs/esm-home-app/webpack/bootstrap","webpack://@openmrs/esm-home-app/webpack/runtime/__system_context__","webpack://@openmrs/esm-home-app/webpack/runtime/compat get default export","webpack://@openmrs/esm-home-app/webpack/runtime/define property getters","webpack://@openmrs/esm-home-app/webpack/runtime/ensure chunk","webpack://@openmrs/esm-home-app/webpack/runtime/get javascript chunk filename","webpack://@openmrs/esm-home-app/webpack/runtime/hasOwnProperty shorthand","webpack://@openmrs/esm-home-app/webpack/runtime/make namespace object","webpack://@openmrs/esm-home-app/webpack/runtime/publicPath","webpack://@openmrs/esm-home-app/webpack/runtime/jsonp chunk loading","webpack://@openmrs/esm-home-app/../../node_modules/systemjs-webpack-interop/auto-public-path/1.js","webpack://@openmrs/esm-home-app/./src/openmrs-esm-home-schema.ts","webpack://@openmrs/esm-home-app/./src/index.ts"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"@openmrs/esm-home-app:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","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","var map = {\n\t\"./en.json\": [\n\t\t574,\n\t\t574\n\t],\n\t\"./es.json\": [\n\t\t319,\n\t\t319\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = 979;\nmodule.exports = webpackAsyncContext;","module.exports = __WEBPACK_EXTERNAL_MODULE__512__;","module.exports = __WEBPACK_EXTERNAL_MODULE__297__;","module.exports = __WEBPACK_EXTERNAL_MODULE__789__;","module.exports = __WEBPACK_EXTERNAL_MODULE__146__;","// 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\tid: moduleId,\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// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.y = __system_context__;","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\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__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".openmrs-esm-home-app.js\";\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};","__webpack_require__.p = \"\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunk_openmrs_esm_home_app\"] = self[\"webpackChunk_openmrs_esm_home_app\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","const autoPublicPath = require(\"./auto-public-path\").autoPublicPath;\n\nautoPublicPath(1);\n","import { Type, validators } from '@openmrs/esm-framework';\n\nexport const esmHomeSchema = {\n buttons: {\n enabled: {\n _type: Type.Boolean,\n _default: true,\n _description: 'Whether to show big buttons on the home page (including extensions)',\n },\n list: {\n _type: Type.Array,\n _elements: {\n label: { _type: Type.String },\n link: {\n _type: Type.String,\n _validators: [validators.isUrl],\n },\n requiredPrivilege: {\n _type: Type.String,\n },\n spa: {\n _type: Type.Boolean,\n _default: false,\n },\n },\n _default: [],\n _description: 'Custom buttons to add, which will come after the button extensions',\n },\n },\n search: {\n patientResultUrl: {\n _default: '${openmrsSpaBase}/patient/${patientUuid}/chart',\n _description: 'Where clicking a patient result takes the user. Accepts template parameter ${patientUuid}',\n _validators: [validators.isUrlWithTemplateParameters(['patientUuid'])],\n },\n },\n widgets: {\n enabled: {\n _type: Type.Boolean,\n _default: true,\n _description: 'Whether to show widgets on the home page (including extensions)',\n },\n },\n};\n","import { registerBreadcrumbs, defineConfigSchema, getAsyncLifecycle } from '@openmrs/esm-framework';\nimport { esmHomeSchema } from './openmrs-esm-home-schema';\n\nconst backendDependencies = {\n 'webservices.rest': '^2.24.0',\n};\n\nconst importTranslation = require.context('../translations', false, /.json$/, 'lazy');\n\nfunction setupOpenMRS() {\n const moduleName = '@openmrs/esm-home-app';\n const pageName = 'home';\n\n const options = {\n featureName: pageName,\n moduleName,\n };\n\n defineConfigSchema(moduleName, esmHomeSchema);\n\n registerBreadcrumbs([\n {\n path: `${window.spaBase}/${pageName}`,\n title: 'Home',\n },\n ]);\n\n return {\n pages: [\n {\n load: getAsyncLifecycle(() => import('./root.component'), options),\n route: pageName,\n online: {\n canSearch: true,\n },\n offline: {\n canSearch: false,\n },\n },\n ],\n extensions: [\n {\n id: 'active-visits-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/active-visits'), options),\n privilege: 'App: coreapps.activeVisits',\n online: true,\n offline: true,\n },\n {\n id: 'capture-vitals-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/capture-vitals'), options),\n privilege: 'App: referenceapplication.vitals',\n online: true,\n offline: false,\n },\n {\n id: 'appointment-scheduling-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/appointment-scheduling'), options),\n privilege: 'App: appointmentschedulingui.home',\n online: true,\n offline: false,\n },\n {\n id: 'reports-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/reports'), options),\n privilege: 'View Reports',\n online: true,\n offline: false,\n },\n {\n id: 'data-management-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/data-management'), options),\n privilege: 'App: coreapps.dataManagement',\n online: true,\n offline: false,\n },\n {\n id: 'configure-metadata-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/configure-metadata'), options),\n privilege: 'App: coreapps.configuremetadata',\n online: true,\n offline: false,\n },\n {\n id: 'system-administration-link',\n slot: 'app-menu-slot',\n load: getAsyncLifecycle(() => import('./refapp-links/system-administration'), options),\n privilege: 'App: coreapps.systemAdministration',\n online: true,\n offline: false,\n },\n ],\n };\n}\n\nexport { backendDependencies, importTranslation, setupOpenMRS };\n"],"names":["inProgress","dataWebpackPrefix","resolveDirectory","exports","rootDirLevel","meta","url","console","error","Error","urlString","rootDirectoryLevel","a","document","createElement","href","pathname","numDirsProcessed","index","length","finalPath","slice","protocol","host","Number","isInteger","map","webpackAsyncContext","req","__webpack_require__","o","Promise","resolve","then","e","code","ids","id","keys","Object","module","__WEBPACK_EXTERNAL_MODULE__512__","__WEBPACK_EXTERNAL_MODULE__297__","__WEBPACK_EXTERNAL_MODULE__789__","__WEBPACK_EXTERNAL_MODULE__146__","__webpack_module_cache__","moduleId","cachedModule","undefined","__webpack_modules__","m","y","__system_context__","n","getter","__esModule","d","definition","key","defineProperty","enumerable","get","f","chunkId","all","reduce","promises","u","obj","prop","prototype","hasOwnProperty","call","l","done","push","script","needAttach","scripts","getElementsByTagName","i","s","getAttribute","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","fn","setTimeout","bind","type","target","head","appendChild","r","Symbol","toStringTag","value","p","installedChunks","j","installedChunkData","promise","reject","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self","autoPublicPath","esmHomeSchema","buttons","enabled","_type","Type","_default","_description","list","_elements","label","link","_validators","validators","requiredPrivilege","spa","search","patientResultUrl","widgets","backendDependencies","importTranslation","require","setupOpenMRS","moduleName","pageName","options","featureName","defineConfigSchema","registerBreadcrumbs","path","window","spaBase","title","pages","load","getAsyncLifecycle","route","online","canSearch","offline","extensions","slot","privilege"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-home-app",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1-pre.70",
|
|
4
4
|
"description": "Homepage microfrontend for the OpenMRS SPA",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"browser": "dist/openmrs-esm-home-app.js",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
7
|
"license": "MPL-2.0",
|
|
8
8
|
"homepage": "https://github.com/openmrs/openmrs-esm-home#readme",
|
|
9
9
|
"scripts": {
|
|
@@ -40,8 +40,7 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@carbon/icons-react": "^10.18.0",
|
|
42
42
|
"carbon-components-react": "^7.25.0",
|
|
43
|
-
"lodash-es": "^4.17.15"
|
|
44
|
-
"systemjs-webpack-interop": "^1.2.1"
|
|
43
|
+
"lodash-es": "^4.17.15"
|
|
45
44
|
},
|
|
46
45
|
"peerDependencies": {
|
|
47
46
|
"@openmrs/esm-framework": "3.x",
|
|
@@ -53,5 +52,5 @@
|
|
|
53
52
|
"react-router-dom": "5.x",
|
|
54
53
|
"rxjs": "6.x"
|
|
55
54
|
},
|
|
56
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "32035cd7f09e83f372a2b49f32c6ce9b11464a6c"
|
|
57
56
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { match } from 'react-router-dom';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { useConfig,
|
|
4
|
+
import { useConfig, ExtensionSlot, Extension } from '@openmrs/esm-framework';
|
|
5
5
|
import DashboardButton from '../dashboard-button/dashboard-button.component';
|
|
6
6
|
import styles from './home-dashboard.component.css';
|
|
7
7
|
|
|
@@ -18,20 +18,6 @@ export default function HomeDashboard({ match, canSearch }: HomeDashboardProps)
|
|
|
18
18
|
<>
|
|
19
19
|
<div className={styles.homeDashboard}>
|
|
20
20
|
<section className={styles.mainSection}>
|
|
21
|
-
<UserHasAccess privilege="View Patients">
|
|
22
|
-
<div className={styles.searchLinkArea}>
|
|
23
|
-
{canSearch && (
|
|
24
|
-
<Link
|
|
25
|
-
to={match.url + '/patient-search'}
|
|
26
|
-
className={`omrs-link omrs-outlined-action omrs-rounded ${styles.dashboardLink}`}>
|
|
27
|
-
<svg className="omrs-icon" fill="var(--omrs-color-interaction)">
|
|
28
|
-
<use xlinkHref="#omrs-icon-search" />
|
|
29
|
-
</svg>
|
|
30
|
-
<span className={styles.label}>{t('patientSearchPrompt', 'Search for patient')}</span>
|
|
31
|
-
</Link>
|
|
32
|
-
)}
|
|
33
|
-
</div>
|
|
34
|
-
</UserHasAccess>
|
|
35
21
|
{config.buttons.enabled && (
|
|
36
22
|
<div className={styles.buttonArea}>
|
|
37
23
|
<ExtensionSlot extensionSlotName="homepage-dashboard-slot">
|
|
@@ -44,6 +30,11 @@ export default function HomeDashboard({ match, canSearch }: HomeDashboardProps)
|
|
|
44
30
|
))}
|
|
45
31
|
</div>
|
|
46
32
|
)}
|
|
33
|
+
{config.widgets.enabled && (
|
|
34
|
+
<div className={styles.widgetsArea}>
|
|
35
|
+
<ExtensionSlot extensionSlotName="homepage-widgets-slot" />
|
|
36
|
+
</div>
|
|
37
|
+
)}
|
|
47
38
|
</section>
|
|
48
39
|
</div>
|
|
49
40
|
<section className={styles.logoSection}>
|
|
@@ -15,13 +15,6 @@ it('renders without failing', () => {
|
|
|
15
15
|
renderHome();
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
it('directs to patient search on click', () => {
|
|
19
|
-
const wrapper = renderHome();
|
|
20
|
-
const patientSearchLink = wrapper.getByText(/Search for patient/i);
|
|
21
|
-
fireEvent.click(patientSearchLink);
|
|
22
|
-
expect(wrapper.history.location.pathname).toEqual('/patient-search');
|
|
23
|
-
});
|
|
24
|
-
|
|
25
18
|
it('renders buttons declared in config', () => {
|
|
26
19
|
(mockUseConfig as jest.MockedFunction<any>).mockReturnValue({
|
|
27
20
|
buttons: {
|
|
@@ -39,22 +32,6 @@ it('renders buttons declared in config', () => {
|
|
|
39
32
|
expect(fooButton).not.toBeNull();
|
|
40
33
|
});
|
|
41
34
|
|
|
42
|
-
it('clicking buttons takes user to the right places', async () => {
|
|
43
|
-
(mockUseConfig as jest.MockedFunction<any>).mockReturnValue({
|
|
44
|
-
buttons: {
|
|
45
|
-
enabled: true,
|
|
46
|
-
list: [
|
|
47
|
-
{
|
|
48
|
-
label: 'Foo',
|
|
49
|
-
link: '/some/route',
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
const { getByText, history } = renderHome();
|
|
55
|
-
expect(getByText('Foo').closest('a')).toHaveAttribute('href', '/some/route');
|
|
56
|
-
});
|
|
57
|
-
|
|
58
35
|
it('renders selectively based on privileges', () => {
|
|
59
36
|
(mockUserHasAccessReact as any).mockImplementation((props) => {
|
|
60
37
|
if (['View Patients', 'Can Foo'].includes(props.privilege)) {
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { registerBreadcrumbs, defineConfigSchema, getAsyncLifecycle } from '@ope
|
|
|
2
2
|
import { esmHomeSchema } from './openmrs-esm-home-schema';
|
|
3
3
|
|
|
4
4
|
const backendDependencies = {
|
|
5
|
-
'webservices.rest': '2.24.0',
|
|
5
|
+
'webservices.rest': '^2.24.0',
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
const importTranslation = require.context('../translations', false, /.json$/, 'lazy');
|
|
@@ -43,6 +43,7 @@ function setupOpenMRS() {
|
|
|
43
43
|
id: 'active-visits-link',
|
|
44
44
|
slot: 'app-menu-slot',
|
|
45
45
|
load: getAsyncLifecycle(() => import('./refapp-links/active-visits'), options),
|
|
46
|
+
privilege: 'App: coreapps.activeVisits',
|
|
46
47
|
online: true,
|
|
47
48
|
offline: true,
|
|
48
49
|
},
|
|
@@ -50,6 +51,7 @@ function setupOpenMRS() {
|
|
|
50
51
|
id: 'capture-vitals-link',
|
|
51
52
|
slot: 'app-menu-slot',
|
|
52
53
|
load: getAsyncLifecycle(() => import('./refapp-links/capture-vitals'), options),
|
|
54
|
+
privilege: 'App: referenceapplication.vitals',
|
|
53
55
|
online: true,
|
|
54
56
|
offline: false,
|
|
55
57
|
},
|
|
@@ -57,6 +59,7 @@ function setupOpenMRS() {
|
|
|
57
59
|
id: 'appointment-scheduling-link',
|
|
58
60
|
slot: 'app-menu-slot',
|
|
59
61
|
load: getAsyncLifecycle(() => import('./refapp-links/appointment-scheduling'), options),
|
|
62
|
+
privilege: 'App: appointmentschedulingui.home',
|
|
60
63
|
online: true,
|
|
61
64
|
offline: false,
|
|
62
65
|
},
|
|
@@ -64,6 +67,7 @@ function setupOpenMRS() {
|
|
|
64
67
|
id: 'reports-link',
|
|
65
68
|
slot: 'app-menu-slot',
|
|
66
69
|
load: getAsyncLifecycle(() => import('./refapp-links/reports'), options),
|
|
70
|
+
privilege: 'View Reports',
|
|
67
71
|
online: true,
|
|
68
72
|
offline: false,
|
|
69
73
|
},
|
|
@@ -71,6 +75,7 @@ function setupOpenMRS() {
|
|
|
71
75
|
id: 'data-management-link',
|
|
72
76
|
slot: 'app-menu-slot',
|
|
73
77
|
load: getAsyncLifecycle(() => import('./refapp-links/data-management'), options),
|
|
78
|
+
privilege: 'App: coreapps.dataManagement',
|
|
74
79
|
online: true,
|
|
75
80
|
offline: false,
|
|
76
81
|
},
|
|
@@ -78,6 +83,7 @@ function setupOpenMRS() {
|
|
|
78
83
|
id: 'configure-metadata-link',
|
|
79
84
|
slot: 'app-menu-slot',
|
|
80
85
|
load: getAsyncLifecycle(() => import('./refapp-links/configure-metadata'), options),
|
|
86
|
+
privilege: 'App: coreapps.configuremetadata',
|
|
81
87
|
online: true,
|
|
82
88
|
offline: false,
|
|
83
89
|
},
|
|
@@ -85,6 +91,7 @@ function setupOpenMRS() {
|
|
|
85
91
|
id: 'system-administration-link',
|
|
86
92
|
slot: 'app-menu-slot',
|
|
87
93
|
load: getAsyncLifecycle(() => import('./refapp-links/system-administration'), options),
|
|
94
|
+
privilege: 'App: coreapps.systemAdministration',
|
|
88
95
|
online: true,
|
|
89
96
|
offline: false,
|
|
90
97
|
},
|
|
@@ -34,4 +34,11 @@ export const esmHomeSchema = {
|
|
|
34
34
|
_validators: [validators.isUrlWithTemplateParameters(['patientUuid'])],
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
|
+
widgets: {
|
|
38
|
+
enabled: {
|
|
39
|
+
_type: Type.Boolean,
|
|
40
|
+
_default: true,
|
|
41
|
+
_description: 'Whether to show widgets on the home page (including extensions)',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
37
44
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
3
3
|
|
|
4
4
|
export default function ActiveVisits() {
|
|
5
5
|
return (
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
privilege="App: coreapps.activeVisits"
|
|
10
|
-
/>
|
|
6
|
+
<ConfigurableLink to="${openmrsBase}/coreapps/activeVisits.page?app=coreapps.activeVisits">
|
|
7
|
+
Active Visits
|
|
8
|
+
</ConfigurableLink>
|
|
11
9
|
);
|
|
12
10
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
3
3
|
|
|
4
4
|
export default function AppointmentScheduling() {
|
|
5
5
|
return (
|
|
6
|
-
<
|
|
7
|
-
label="Appointment Scheduling"
|
|
8
|
-
to="${openmrsBase}/appointmentschedulingui/home.page"
|
|
9
|
-
privilege="App: appointmentschedulingui.home"
|
|
10
|
-
/>
|
|
6
|
+
<ConfigurableLink to="${openmrsBase}/appointmentschedulingui/home.page">Appointment Scheduling</ConfigurableLink>
|
|
11
7
|
);
|
|
12
8
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
3
3
|
|
|
4
4
|
export default function CaptureVitals() {
|
|
5
5
|
return (
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
privilege="App: referenceapplication.vitals"
|
|
10
|
-
/>
|
|
6
|
+
<ConfigurableLink to="${openmrsBase}/coreapps/findpatient/findPatient.page?app=referenceapplication.vitals">
|
|
7
|
+
Capture Vitals
|
|
8
|
+
</ConfigurableLink>
|
|
11
9
|
);
|
|
12
10
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
3
3
|
|
|
4
4
|
export default function ConfigureMetadata() {
|
|
5
5
|
return (
|
|
6
|
-
<
|
|
7
|
-
label="Configure Metadata"
|
|
8
|
-
to="${openmrsBase}/adminui/metadata/configureMetadata.page"
|
|
9
|
-
privilege="App: coreapps.configuremetadata"
|
|
10
|
-
/>
|
|
6
|
+
<ConfigurableLink to="${openmrsBase}/adminui/metadata/configureMetadata.page">Configure Metadata</ConfigurableLink>
|
|
11
7
|
);
|
|
12
8
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
3
3
|
|
|
4
4
|
export default function DataManagement() {
|
|
5
5
|
return (
|
|
6
|
-
<
|
|
7
|
-
label="Data Management"
|
|
8
|
-
to="${openmrsBase}/coreapps/datamanagement/dataManagement.page"
|
|
9
|
-
privilege="App: coreapps.dataManagement"
|
|
10
|
-
/>
|
|
6
|
+
<ConfigurableLink to="${openmrsBase}/coreapps/datamanagement/dataManagement.page">Data Management</ConfigurableLink>
|
|
11
7
|
);
|
|
12
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
3
3
|
|
|
4
4
|
export default function Reports() {
|
|
5
|
-
return <
|
|
5
|
+
return <ConfigurableLink to="${openmrsBase}/reportingui/reportsapp/home.page">Reports</ConfigurableLink>;
|
|
6
6
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
3
3
|
|
|
4
4
|
export default function SystemAdministration() {
|
|
5
5
|
return (
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
privilege="App: coreapps.systemAdministration"
|
|
10
|
-
/>
|
|
6
|
+
<ConfigurableLink to="${openmrsBase}/coreapps/systemadministration/systemAdministration.page">
|
|
7
|
+
System Administration
|
|
8
|
+
</ConfigurableLink>
|
|
11
9
|
);
|
|
12
10
|
}
|
package/src/root.component.tsx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BrowserRouter, Redirect, Route } from 'react-router-dom';
|
|
3
3
|
import HomeDashboard from './dashboard/home-dashboard.component';
|
|
4
|
-
import PatientSearch from './patient-search/patient-search.component';
|
|
5
4
|
|
|
6
5
|
interface RootProps {
|
|
7
6
|
canSearch: boolean;
|
|
@@ -11,11 +10,6 @@ const Root: React.FC<RootProps> = ({ canSearch = true }) => (
|
|
|
11
10
|
<BrowserRouter basename={window.spaBase}>
|
|
12
11
|
<main className="omrs-main-content">
|
|
13
12
|
<Route path="/home" exact component={(props) => <HomeDashboard canSearch={canSearch} {...props} />} />
|
|
14
|
-
{canSearch ? (
|
|
15
|
-
<Route path="/home/patient-search" component={PatientSearch} />
|
|
16
|
-
) : (
|
|
17
|
-
<Redirect from="/home/patient-search" to="/home" />
|
|
18
|
-
)}
|
|
19
13
|
</main>
|
|
20
14
|
</BrowserRouter>
|
|
21
15
|
);
|
package/src/types.ts
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export interface SearchedPatient {
|
|
2
|
-
patientId: number;
|
|
3
|
-
uuid: string;
|
|
4
|
-
identifiers: Array<Identifier>;
|
|
5
|
-
person: {
|
|
6
|
-
age: number;
|
|
7
|
-
birthdate: string;
|
|
8
|
-
display: string;
|
|
9
|
-
gender: string;
|
|
10
|
-
};
|
|
11
|
-
display: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface Identifier {
|
|
15
|
-
display: string;
|
|
16
|
-
uuid: string;
|
|
17
|
-
identifier: string;
|
|
18
|
-
identifierType: {
|
|
19
|
-
uuid: string;
|
|
20
|
-
display: string;
|
|
21
|
-
};
|
|
22
|
-
location: {
|
|
23
|
-
uuid: string;
|
|
24
|
-
display: string;
|
|
25
|
-
};
|
|
26
|
-
preferred: boolean;
|
|
27
|
-
voided: boolean;
|
|
28
|
-
}
|
package/webpack.config.js
CHANGED
|
@@ -1,79 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const { resolve } = require("path");
|
|
3
|
-
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
|
4
|
-
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
|
|
5
|
-
|
|
6
|
-
const { peerDependencies } = require("./package.json");
|
|
7
|
-
|
|
8
|
-
const cssLoader = {
|
|
9
|
-
loader: "css-loader",
|
|
10
|
-
|
|
11
|
-
options: {
|
|
12
|
-
modules: {
|
|
13
|
-
localIdentName: "esm-home__[name]__[local]___[hash:base64:5]"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
module.exports = env => ({
|
|
19
|
-
entry: [
|
|
20
|
-
resolve(__dirname, "src/set-public-path.ts"),
|
|
21
|
-
resolve(__dirname, "src/index.ts")
|
|
22
|
-
],
|
|
23
|
-
output: {
|
|
24
|
-
filename: "openmrs-esm-home-app.js",
|
|
25
|
-
libraryTarget: "system",
|
|
26
|
-
path: resolve(__dirname, "dist"),
|
|
27
|
-
jsonpFunction: "webpackJsonp_openmrs_esm_home"
|
|
28
|
-
},
|
|
29
|
-
module: {
|
|
30
|
-
rules: [
|
|
31
|
-
{
|
|
32
|
-
parser: {
|
|
33
|
-
system: false
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
test: /\.m?(js|ts|tsx)$/,
|
|
38
|
-
exclude: /(node_modules|bower_components)/,
|
|
39
|
-
use: {
|
|
40
|
-
loader: "babel-loader"
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
test: /\.css$/,
|
|
45
|
-
use: ["style-loader", cssLoader]
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
test: /\.s[ac]ss$/i,
|
|
49
|
-
use: ["style-loader", cssLoader, "sass-loader"]
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
test: /\.(png|jpe?g)$/i,
|
|
53
|
-
use: [
|
|
54
|
-
{
|
|
55
|
-
loader: "file-loader"
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
},
|
|
61
|
-
devtool: "sourcemap",
|
|
62
|
-
devServer: {
|
|
63
|
-
headers: {
|
|
64
|
-
"Access-Control-Allow-Origin": "*"
|
|
65
|
-
},
|
|
66
|
-
disableHostCheck: true
|
|
67
|
-
},
|
|
68
|
-
externals: Object.keys(peerDependencies),
|
|
69
|
-
plugins: [
|
|
70
|
-
new ForkTsCheckerWebpackPlugin(),
|
|
71
|
-
new CleanWebpackPlugin(),
|
|
72
|
-
new BundleAnalyzerPlugin({
|
|
73
|
-
analyzerMode: env && env.analyze ? "server" : "disabled"
|
|
74
|
-
})
|
|
75
|
-
],
|
|
76
|
-
resolve: {
|
|
77
|
-
extensions: [".tsx", ".ts", ".jsx", ".js"]
|
|
78
|
-
}
|
|
79
|
-
});
|
|
1
|
+
module.exports = require('openmrs/default-webpack-config');
|