@openmrs/esm-appointments-app 9.2.1-pre.6725 → 9.2.1-pre.6726
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 +19 -15
- package/dist/1064.js +1 -0
- package/dist/1064.js.map +1 -0
- package/dist/3689.js +1 -1
- package/dist/3689.js.LICENSE.txt +6 -0
- package/dist/3689.js.map +1 -1
- package/dist/{3379.js → 5488.js} +1 -1
- package/dist/{3379.js.map → 5488.js.map} +1 -1
- package/dist/5755.js +1 -1
- package/dist/5755.js.map +1 -1
- package/dist/6886.js +1 -0
- package/dist/6886.js.map +1 -0
- package/dist/7368.js +2 -0
- package/dist/{9224.js.LICENSE.txt → 7368.js.LICENSE.txt} +0 -15
- package/dist/7368.js.map +1 -0
- package/dist/8316.js +2 -0
- package/dist/8316.js.LICENSE.txt +14 -0
- package/dist/8316.js.map +1 -0
- package/dist/main.js +1 -2
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-appointments-app.js +1 -1
- package/dist/openmrs-esm-appointments-app.js.buildmanifest.json +185 -191
- package/dist/openmrs-esm-appointments-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/createDashboardLink.tsx +9 -0
- package/src/dashboard.meta.ts +8 -9
- package/src/index.ts +3 -1
- package/dist/3732.js +0 -1
- package/dist/3732.js.map +0 -1
- package/dist/4275.js +0 -2
- package/dist/4275.js.LICENSE.txt +0 -5
- package/dist/4275.js.map +0 -1
- package/dist/717.js +0 -1
- package/dist/717.js.map +0 -1
- package/dist/7698.js +0 -1
- package/dist/7698.js.map +0 -1
- package/dist/9224.js +0 -2
- package/dist/9224.js.map +0 -1
- package/dist/main.js.LICENSE.txt +0 -5
- package/src/createDashboardLink.component.tsx +0 -39
package/dist/main.js.LICENSE.txt
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { ConfigurableLink } from '@openmrs/esm-framework';
|
|
4
|
-
import { BrowserRouter, useLocation } from 'react-router-dom';
|
|
5
|
-
import { useTranslation } from 'react-i18next';
|
|
6
|
-
|
|
7
|
-
export interface DashboardLinkConfig {
|
|
8
|
-
name: string;
|
|
9
|
-
title: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function DashboardExtension({ dashboardLinkConfig }: { dashboardLinkConfig: DashboardLinkConfig }) {
|
|
13
|
-
const { t } = useTranslation();
|
|
14
|
-
const { name } = dashboardLinkConfig;
|
|
15
|
-
const location = useLocation();
|
|
16
|
-
const spaBasePath = `${window.spaBase}/home`;
|
|
17
|
-
|
|
18
|
-
const navLink = useMemo(() => {
|
|
19
|
-
const pathArray = location.pathname.split('/home');
|
|
20
|
-
const lastElement = pathArray[pathArray.length - 1];
|
|
21
|
-
return decodeURIComponent(lastElement);
|
|
22
|
-
}, [location.pathname]);
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<ConfigurableLink
|
|
26
|
-
className={classNames('cds--side-nav__link', {
|
|
27
|
-
'active-left-nav-link': navLink.match(name),
|
|
28
|
-
})}
|
|
29
|
-
to={`${spaBasePath}/${name}`}>
|
|
30
|
-
{t('appointments', 'Appointments')}
|
|
31
|
-
</ConfigurableLink>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const createDashboardLink = (dashboardLinkConfig: DashboardLinkConfig) => () => (
|
|
36
|
-
<BrowserRouter>
|
|
37
|
-
<DashboardExtension dashboardLinkConfig={dashboardLinkConfig} />
|
|
38
|
-
</BrowserRouter>
|
|
39
|
-
);
|