@openmrs/esm-home-app 4.1.1-pre.206 → 4.1.1-pre.211
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
|
@@ -7,7 +7,7 @@ assets by chunk 448 KiB (id hint: vendors)
|
|
|
7
7
|
asset [1m[32mmain.js[39m[22m 6.58 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (name: main)
|
|
8
8
|
asset [1m[32m784.js[39m[22m 6.45 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m 1 related asset
|
|
9
9
|
asset [1m[32mopenmrs-esm-home-app.js[39m[22m 6.35 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (name: @openmrs/esm-home-app)
|
|
10
|
-
asset [1m[32m361.js[39m[22m 6.
|
|
10
|
+
asset [1m[32m361.js[39m[22m 6.04 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m
|
|
11
11
|
asset [1m[32mopenmrs-esm-home-app.js.buildmanifest.json[39m[22m 5.93 KiB [1m[32m[emitted][39m[22m
|
|
12
12
|
asset [1m[32m904.js[39m[22m 4.04 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m
|
|
13
13
|
asset [1m[32m91.js[39m[22m 2.63 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m
|
|
@@ -17,8 +17,8 @@ asset [1m[32m319.js[39m[22m 287 bytes [1m[32m[emitted][39m[22m [1m[32m
|
|
|
17
17
|
asset [1m[32m679.js[39m[22m 254 bytes [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m
|
|
18
18
|
runtime modules 37.1 KiB 28 modules
|
|
19
19
|
orphan modules 165 KiB [1m[33m[orphan][39m[22m 10 modules
|
|
20
|
-
built modules
|
|
21
|
-
javascript modules
|
|
20
|
+
built modules 615 KiB (javascript) 126 bytes (share-init) 126 bytes (consume-shared) [1m[33m[built][39m[22m
|
|
21
|
+
javascript modules 614 KiB 32 modules
|
|
22
22
|
provide-module modules 126 bytes
|
|
23
23
|
[1mprovide shared module (default) @openmrs/esm-framework@4.0.3-pre.434 = ../../node_modules/@openmrs/esm-framework/src/internal.ts[39m[22m 42 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
24
24
|
+ 2 modules
|
|
@@ -36,4 +36,4 @@ This can impact web performance.
|
|
|
36
36
|
Assets:
|
|
37
37
|
858.js (397 KiB)[39m[22m
|
|
38
38
|
|
|
39
|
-
webpack 5.75.0 compiled with [1m[33m1 warning[39m[22m in
|
|
39
|
+
webpack 5.75.0 compiled with [1m[33m1 warning[39m[22m in 13218 ms
|
package/dist/361.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_openmrs_esm_home_app=self.webpackChunk_openmrs_esm_home_app||[]).push([[361],{795:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(601),o=n.n(a),r=n(609),s=n.n(r)()(o());s.push([e.id,".-esm-home__dashboard-view__dashboardView___nFcbS{background-color:#fff}",""]),s.locals={dashboardView:"-esm-home__dashboard-view__dashboardView___nFcbS"};const i=s},137:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(601),o=n.n(a),r=n(609),s=n.n(r)()(o());s.push([e.id,".-esm-home__home-dashboard__dashboardContainer___P4IFK{display:flex;flex-direction:column;margin:0;height:calc(100vh - 3rem);margin-left:16rem;background-color:#fff}.-esm-home__home-dashboard__dashboardContainer___P4IFK li{display:flex}.-esm-home__home-dashboard__dashboardContainer___P4IFK a{width:100%}li::marker{font-size:0px}.-esm-home__home-dashboard__logoSection___mKcOF{display:flex;justify-content:center}",""]),s.locals={dashboardContainer:"-esm-home__home-dashboard__dashboardContainer___P4IFK",logoSection:"-esm-home__home-dashboard__logoSection___mKcOF"};const i=s},609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",a=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),a&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),a&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,a,o,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(a)for(var i=0;i<this.length;i++){var c=this[i][0];null!=c&&(s[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);a&&s[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},601:e=>{e.exports=function(e){return e[1]}},354:e=>{var t=[];function n(e){for(var n=-1,a=0;a<t.length;a++)if(t[a].identifier===e){n=a;break}return n}function a(e,a){for(var r={},s=[],i=0;i<e.length;i++){var c=e[i],l=a.base?c[0]+a.base:c[0],d=r[l]||0,u="".concat(l," ").concat(d);r[l]=d+1;var m=n(u),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==m)t[m].references++,t[m].updater(h);else{var f=o(h,a);a.byIndex=i,t.splice(i,0,{identifier:u,updater:f,references:1})}s.push(u)}return s}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var r=a(e=e||[],o=o||{});return function(e){e=e||[];for(var s=0;s<r.length;s++){var i=n(r[s]);t[i].references--}for(var c=a(e,o),l=0;l<r.length;l++){var d=n(r[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=c}}},378:e=>{var t={};e.exports=function(e,n){var a=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(n)}},154:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},993:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},583:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var a="";n.supports&&(a+="@supports (".concat(n.supports,") {")),n.media&&(a+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(a+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),a+=n.css,o&&(a+="}"),n.media&&(a+="}"),n.supports&&(a+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},141:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},361:(e,t,n)=>{n.r(t),n.d(t,{default:()=>
|
|
1
|
+
"use strict";(self.webpackChunk_openmrs_esm_home_app=self.webpackChunk_openmrs_esm_home_app||[]).push([[361],{795:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(601),o=n.n(a),r=n(609),s=n.n(r)()(o());s.push([e.id,".-esm-home__dashboard-view__dashboardView___nFcbS{background-color:#fff}",""]),s.locals={dashboardView:"-esm-home__dashboard-view__dashboardView___nFcbS"};const i=s},137:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(601),o=n.n(a),r=n(609),s=n.n(r)()(o());s.push([e.id,".-esm-home__home-dashboard__dashboardContainer___P4IFK{display:flex;flex-direction:column;margin:0;height:calc(100vh - 3rem);margin-left:16rem;background-color:#fff}.-esm-home__home-dashboard__dashboardContainer___P4IFK li{display:flex}.-esm-home__home-dashboard__dashboardContainer___P4IFK a{width:100%}li::marker{font-size:0px}.-esm-home__home-dashboard__logoSection___mKcOF{display:flex;justify-content:center}",""]),s.locals={dashboardContainer:"-esm-home__home-dashboard__dashboardContainer___P4IFK",logoSection:"-esm-home__home-dashboard__logoSection___mKcOF"};const i=s},609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",a=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),a&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),a&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,a,o,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(a)for(var i=0;i<this.length;i++){var c=this[i][0];null!=c&&(s[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);a&&s[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},601:e=>{e.exports=function(e){return e[1]}},354:e=>{var t=[];function n(e){for(var n=-1,a=0;a<t.length;a++)if(t[a].identifier===e){n=a;break}return n}function a(e,a){for(var r={},s=[],i=0;i<e.length;i++){var c=e[i],l=a.base?c[0]+a.base:c[0],d=r[l]||0,u="".concat(l," ").concat(d);r[l]=d+1;var m=n(u),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==m)t[m].references++,t[m].updater(h);else{var f=o(h,a);a.byIndex=i,t.splice(i,0,{identifier:u,updater:f,references:1})}s.push(u)}return s}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var r=a(e=e||[],o=o||{});return function(e){e=e||[];for(var s=0;s<r.length;s++){var i=n(r[s]);t[i].references--}for(var c=a(e,o),l=0;l<r.length;l++){var d=n(r[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=c}}},378:e=>{var t={};e.exports=function(e,n){var a=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(n)}},154:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},993:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},583:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var a="";n.supports&&(a+="@supports (".concat(n.supports,") {")),n.media&&(a+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(a+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),a+=n.css,o&&(a+="}"),n.media&&(a+="}"),n.supports&&(a+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},141:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},361:(e,t,n)=>{n.r(t),n.d(t,{default:()=>k});var a=n(268),o=n.n(a),r=n(744),s=n(906),i=n(354),c=n.n(i),l=n(583),d=n.n(l),u=n(378),m=n.n(u),h=n(993),f=n.n(h),p=n(154),_=n.n(p),v=n(141),b=n.n(v),y=n(795),g={};g.styleTagTransform=b(),g.setAttributes=f(),g.insert=m().bind(null,"head"),g.domAPI=d(),g.insertStyleElement=_(),c()(y.Z,g);const E=y.Z&&y.Z.locals?y.Z.locals:void 0,x=function(e){var t=e.dashboardSlot,n=e.title;return o().createElement(s.ExtensionSlot,{className:E.dashboardView,extensionSlotName:t,state:{dashboardTitle:n}})};var w=n(137),S={};S.styleTagTransform=b(),S.setAttributes=f(),S.insert=m().bind(null,"head"),S.domAPI=d(),S.insertStyleElement=_(),c()(w.Z,S);const C=w.Z&&w.Z.locals?w.Z.locals:void 0;function T(){var e,t=(0,r.useParams)(),n=(0,s.useExtensionStore)(),a=(0,s.useLayoutType)(),i=(null===(e=n.slots["homepage-dashboard-slot"])||void 0===e?void 0:e.assignedExtensions.map((function(e){return e.meta})).filter((function(e){return Object.keys(e).length})))||[],c=i.find((function(e){return e.name===(null==t?void 0:t.dashboard)}))||i[0];return o().createElement("section",{className:(0,s.isDesktop)(a)&&C.dashboardContainer},(0,s.isDesktop)(a)&&o().createElement(s.ExtensionSlot,{name:"home-sidebar-slot",key:a}),o().createElement(x,{title:null==c?void 0:c.name,dashboardSlot:null==c?void 0:c.slot}))}const k=function(){var e=window.spaBase;return(0,a.useEffect)((function(){return(0,s.setLeftNav)({name:"homepage-dashboard-slot",basePath:e}),function(){return(0,s.unsetLeftNav)("homepage-dashboard-slot")}}),[e]),o().createElement(r.BrowserRouter,{basename:window.spaBase},o().createElement("main",{className:"omrs-main-content"},o().createElement(r.Routes,null,o().createElement(r.Route,{path:"/home",element:o().createElement(T,null)}),o().createElement(r.Route,{path:"/home/:dashboard/*",element:o().createElement(T,null)}))))}}}]);
|
|
@@ -121,9 +121,9 @@
|
|
|
121
121
|
"initial": false,
|
|
122
122
|
"entry": false,
|
|
123
123
|
"recorded": false,
|
|
124
|
-
"size":
|
|
124
|
+
"size": 16246,
|
|
125
125
|
"sizes": {
|
|
126
|
-
"javascript":
|
|
126
|
+
"javascript": 16246
|
|
127
127
|
},
|
|
128
128
|
"names": [],
|
|
129
129
|
"idHints": [],
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"361.js"
|
|
136
136
|
],
|
|
137
137
|
"auxiliaryFiles": [],
|
|
138
|
-
"hash": "
|
|
138
|
+
"hash": "bc7f38a3504545999e5c",
|
|
139
139
|
"childrenByOrder": {}
|
|
140
140
|
},
|
|
141
141
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-home-app",
|
|
3
|
-
"version": "4.1.1-pre.
|
|
3
|
+
"version": "4.1.1-pre.211",
|
|
4
4
|
"description": "Homepage microfrontend for the OpenMRS SPA",
|
|
5
5
|
"browser": "dist/openmrs-esm-home-app.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"react-i18next": "11.x",
|
|
46
46
|
"react-router-dom": "6.x"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "983d7d4444e2a6c1fd041fddb9d20bb8e2fcaf11"
|
|
49
49
|
}
|
package/src/root.component.tsx
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import { BrowserRouter, Route, Routes
|
|
2
|
+
import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
|
3
3
|
import { setLeftNav, unsetLeftNav } from '@openmrs/esm-framework';
|
|
4
4
|
import HomeDashboard from './dashboard/home-dashboard.component';
|
|
5
5
|
|
|
6
|
-
function FilteredDashboard() {
|
|
7
|
-
const { dashboard } = useParams();
|
|
8
|
-
const navigate = useNavigate();
|
|
9
|
-
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
const knownDashboards = ['appointments', 'service-queues', 'patient-lists'];
|
|
12
|
-
|
|
13
|
-
if (!knownDashboards.includes(dashboard)) {
|
|
14
|
-
navigate('/home');
|
|
15
|
-
}
|
|
16
|
-
}, [dashboard, navigate]);
|
|
17
|
-
|
|
18
|
-
return <HomeDashboard />;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
6
|
const Root: React.FC = () => {
|
|
22
7
|
const spaBasePath = window.spaBase;
|
|
23
8
|
|
|
@@ -31,7 +16,7 @@ const Root: React.FC = () => {
|
|
|
31
16
|
<main className="omrs-main-content">
|
|
32
17
|
<Routes>
|
|
33
18
|
<Route path="/home" element={<HomeDashboard />} />
|
|
34
|
-
<Route path="/home/:dashboard/*" element={<
|
|
19
|
+
<Route path="/home/:dashboard/*" element={<HomeDashboard />} />
|
|
35
20
|
</Routes>
|
|
36
21
|
</main>
|
|
37
22
|
</BrowserRouter>
|