@j2inn/fin5-ui-utils 6.0.5-beta.0 → 6.1.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/README.md +5 -5
- package/dist/fantomProps/createFin5Props/index.d.ts +12 -12
- package/dist/fantomProps/createFin5Props/index.js +146 -146
- package/dist/fantomProps/createFin5Props/runCreateFin5Props.d.ts +2 -2
- package/dist/fantomProps/createFin5Props/runCreateFin5Props.js +16 -16
- package/dist/fantomProps/fantomPropsToObject.d.ts +8 -8
- package/dist/fantomProps/fantomPropsToObject.js +183 -183
- package/dist/fantomProps/generateJsonFromFantomPropsFile.d.ts +4 -4
- package/dist/fantomProps/generateJsonFromFantomPropsFile.js +41 -41
- package/dist/fantomProps/localePropsToJson.d.ts +1 -1
- package/dist/fantomProps/localePropsToJson.js +50 -50
- package/dist/fantomProps/readFantomPropsFile.d.ts +5 -5
- package/dist/fantomProps/readFantomPropsFile.js +65 -66
- package/dist/fantomProps/readFantomPropsFile.js.map +1 -1
- package/dist/fin5Top/fin5FileUpload.d.ts +24 -24
- package/dist/fin5Top/fin5FileUpload.js +51 -51
- package/dist/fin5Top/fin5Top.d.ts +124 -124
- package/dist/fin5Top/fin5Top.js +53 -53
- package/dist/fin5Top/finEdge2Cloud.d.ts +6 -6
- package/dist/fin5Top/finEdge2Cloud.js +15 -15
- package/dist/fin5Top/getFin5BinUrl.d.ts +2 -2
- package/dist/fin5Top/getFin5BinUrl.js +9 -9
- package/dist/fin5Top/openFin5Alarm.d.ts +22 -22
- package/dist/fin5Top/openFin5Alarm.js +23 -23
- package/dist/fin5Top/openFin5Historian.d.ts +3 -3
- package/dist/fin5Top/openFin5Historian.js +19 -19
- package/dist/fin5Top/useFin5AppURLHashParameter.d.ts +18 -18
- package/dist/fin5Top/useFin5AppURLHashParameter.js +133 -133
- package/dist/index.d.ts +35 -35
- package/dist/index.js +69 -69
- package/dist/jobs/jobUtils.d.ts +14 -14
- package/dist/jobs/jobUtils.js +15 -15
- package/dist/react/app/Fin5AppContainer.d.ts +36 -36
- package/dist/react/app/Fin5AppContainer.js +145 -102
- package/dist/react/app/Fin5AppContainer.js.map +1 -1
- package/dist/react/app/Fin5AppRootStore.d.ts +40 -40
- package/dist/react/app/Fin5AppRootStore.js +90 -69
- package/dist/react/app/Fin5AppRootStore.js.map +1 -1
- package/dist/react/components/ErrorBoundary.d.ts +57 -57
- package/dist/react/components/ErrorBoundary.js +150 -150
- package/dist/react/components/ErrorDisplayer.d.ts +19 -19
- package/dist/react/components/ErrorDisplayer.js +36 -36
- package/dist/react/components/Loader.d.ts +9 -9
- package/dist/react/components/Loader.js +17 -17
- package/dist/react/components/LoadingSpinner.d.ts +2 -2
- package/dist/react/components/LoadingSpinner.js +27 -27
- package/dist/react/components/RecordImage.d.ts +20 -20
- package/dist/react/components/RecordImage.js +51 -51
- package/dist/react/components/charts/QRCode.d.ts +25 -25
- package/dist/react/components/charts/QRCode.js +82 -82
- package/dist/react/components/charts/line-bar/Chart.d.ts +166 -166
- package/dist/react/components/charts/line-bar/Chart.js +442 -442
- package/dist/react/components/charts/line-bar/HGridChart.d.ts +58 -58
- package/dist/react/components/charts/line-bar/HGridChart.js +285 -285
- package/dist/react/components/charts/pie/PieChart.d.ts +94 -94
- package/dist/react/components/charts/pie/PieChart.js +204 -204
- package/dist/react/components/charts/pie/SimplePieChart.d.ts +21 -21
- package/dist/react/components/charts/pie/SimplePieChart.js +55 -55
- package/dist/react/components/graphics/GraphicViewer.d.ts +10 -10
- package/dist/react/components/graphics/GraphicViewer.js +29 -29
- package/dist/react/components/graphics/GraphicsTabViewer.d.ts +17 -17
- package/dist/react/components/graphics/GraphicsTabViewer.js +90 -90
- package/dist/react/components/makeCustomElement.d.ts +16 -16
- package/dist/react/components/makeCustomElement.js +150 -150
- package/dist/react/components/navigation/BasicLayout.d.ts +41 -41
- package/dist/react/components/navigation/BasicLayout.js +155 -155
- package/dist/react/components/navigation/HeaderSiderLayout.d.ts +13 -13
- package/dist/react/components/navigation/HeaderSiderLayout.js +110 -110
- package/dist/react/components/navigation/MenuPage.d.ts +37 -37
- package/dist/react/components/navigation/MenuPage.js +36 -36
- package/dist/react/components/navigation/MenuTrigger.d.ts +9 -9
- package/dist/react/components/navigation/MenuTrigger.js +33 -33
- package/dist/react/components/navigation/ReactRouterHeaderSiderLayout.d.ts +11 -11
- package/dist/react/components/navigation/ReactRouterHeaderSiderLayout.js +25 -25
- package/dist/react/components/navigation/ReactRouterLayout.d.ts +46 -46
- package/dist/react/components/navigation/ReactRouterLayout.js +132 -132
- package/dist/react/components/navigation/customRouting/Router.d.ts +12 -12
- package/dist/react/components/navigation/customRouting/Router.js +45 -45
- package/dist/react/components/navigation/customRouting/RouterLayout.d.ts +11 -11
- package/dist/react/components/navigation/customRouting/RouterLayout.js +61 -61
- package/dist/react/components/resolvable/configurationForm/ConfigurationForm.d.ts +27 -27
- package/dist/react/components/resolvable/configurationForm/ConfigurationForm.js +95 -95
- package/dist/react/components/resolvable/configurationForm/ConfigurationFormEntry.d.ts +16 -16
- package/dist/react/components/resolvable/configurationForm/ConfigurationFormEntry.js +88 -88
- package/dist/react/components/resolvable/configurationForm/getSectionDefault.d.ts +16 -16
- package/dist/react/components/resolvable/configurationForm/getSectionDefault.js +99 -99
- package/dist/react/hooks/useFin5BinUrl.d.ts +6 -6
- package/dist/react/hooks/useFin5BinUrl.js +15 -15
- package/dist/react/hooks/useFin5ColorScheme.d.ts +2 -2
- package/dist/react/hooks/useFin5ColorScheme.js +49 -49
- package/dist/react/hooks/useScreenSize.d.ts +7 -7
- package/dist/react/hooks/useScreenSize.js +31 -31
- package/dist_es/fantomProps/createFin5Props/index.d.ts +12 -12
- package/dist_es/fantomProps/createFin5Props/index.js +140 -140
- package/dist_es/fantomProps/createFin5Props/runCreateFin5Props.d.ts +2 -2
- package/dist_es/fantomProps/createFin5Props/runCreateFin5Props.js +11 -11
- package/dist_es/fantomProps/fantomPropsToObject.d.ts +8 -8
- package/dist_es/fantomProps/fantomPropsToObject.js +178 -178
- package/dist_es/fantomProps/generateJsonFromFantomPropsFile.d.ts +4 -4
- package/dist_es/fantomProps/generateJsonFromFantomPropsFile.js +12 -12
- package/dist_es/fantomProps/localePropsToJson.d.ts +1 -1
- package/dist_es/fantomProps/localePropsToJson.js +21 -21
- package/dist_es/fantomProps/readFantomPropsFile.d.ts +5 -5
- package/dist_es/fantomProps/readFantomPropsFile.js +39 -40
- package/dist_es/fantomProps/readFantomPropsFile.js.map +1 -1
- package/dist_es/fin5Top/fin5FileUpload.d.ts +24 -24
- package/dist_es/fin5Top/fin5FileUpload.js +47 -47
- package/dist_es/fin5Top/fin5Top.d.ts +124 -124
- package/dist_es/fin5Top/fin5Top.js +49 -49
- package/dist_es/fin5Top/finEdge2Cloud.d.ts +6 -6
- package/dist_es/fin5Top/finEdge2Cloud.js +11 -11
- package/dist_es/fin5Top/getFin5BinUrl.d.ts +2 -2
- package/dist_es/fin5Top/getFin5BinUrl.js +5 -5
- package/dist_es/fin5Top/openFin5Alarm.d.ts +22 -22
- package/dist_es/fin5Top/openFin5Alarm.js +19 -19
- package/dist_es/fin5Top/openFin5Historian.d.ts +3 -3
- package/dist_es/fin5Top/openFin5Historian.js +15 -15
- package/dist_es/fin5Top/useFin5AppURLHashParameter.d.ts +18 -18
- package/dist_es/fin5Top/useFin5AppURLHashParameter.js +124 -124
- package/dist_es/index.d.ts +35 -35
- package/dist_es/index.js +53 -53
- package/dist_es/jobs/jobUtils.d.ts +14 -14
- package/dist_es/jobs/jobUtils.js +9 -9
- package/dist_es/react/app/Fin5AppContainer.d.ts +36 -36
- package/dist_es/react/app/Fin5AppContainer.js +116 -73
- package/dist_es/react/app/Fin5AppContainer.js.map +1 -1
- package/dist_es/react/app/Fin5AppRootStore.d.ts +40 -40
- package/dist_es/react/app/Fin5AppRootStore.js +86 -65
- package/dist_es/react/app/Fin5AppRootStore.js.map +1 -1
- package/dist_es/react/components/ErrorBoundary.d.ts +57 -57
- package/dist_es/react/components/ErrorBoundary.js +123 -123
- package/dist_es/react/components/ErrorDisplayer.d.ts +19 -19
- package/dist_es/react/components/ErrorDisplayer.js +28 -28
- package/dist_es/react/components/Loader.d.ts +9 -9
- package/dist_es/react/components/Loader.js +12 -12
- package/dist_es/react/components/LoadingSpinner.d.ts +2 -2
- package/dist_es/react/components/LoadingSpinner.js +20 -20
- package/dist_es/react/components/RecordImage.d.ts +20 -20
- package/dist_es/react/components/RecordImage.js +24 -24
- package/dist_es/react/components/charts/QRCode.d.ts +25 -25
- package/dist_es/react/components/charts/QRCode.js +52 -52
- package/dist_es/react/components/charts/line-bar/Chart.d.ts +166 -166
- package/dist_es/react/components/charts/line-bar/Chart.js +415 -415
- package/dist_es/react/components/charts/line-bar/HGridChart.d.ts +58 -58
- package/dist_es/react/components/charts/line-bar/HGridChart.js +250 -250
- package/dist_es/react/components/charts/pie/PieChart.d.ts +94 -94
- package/dist_es/react/components/charts/pie/PieChart.js +177 -177
- package/dist_es/react/components/charts/pie/SimplePieChart.d.ts +21 -21
- package/dist_es/react/components/charts/pie/SimplePieChart.js +25 -25
- package/dist_es/react/components/graphics/GraphicViewer.d.ts +10 -10
- package/dist_es/react/components/graphics/GraphicViewer.js +22 -22
- package/dist_es/react/components/graphics/GraphicsTabViewer.d.ts +17 -17
- package/dist_es/react/components/graphics/GraphicsTabViewer.js +60 -60
- package/dist_es/react/components/makeCustomElement.d.ts +16 -16
- package/dist_es/react/components/makeCustomElement.js +142 -142
- package/dist_es/react/components/navigation/BasicLayout.d.ts +41 -41
- package/dist_es/react/components/navigation/BasicLayout.js +124 -124
- package/dist_es/react/components/navigation/HeaderSiderLayout.d.ts +13 -13
- package/dist_es/react/components/navigation/HeaderSiderLayout.js +80 -80
- package/dist_es/react/components/navigation/MenuPage.d.ts +37 -37
- package/dist_es/react/components/navigation/MenuPage.js +30 -30
- package/dist_es/react/components/navigation/MenuTrigger.d.ts +9 -9
- package/dist_es/react/components/navigation/MenuTrigger.js +28 -28
- package/dist_es/react/components/navigation/ReactRouterHeaderSiderLayout.d.ts +11 -11
- package/dist_es/react/components/navigation/ReactRouterHeaderSiderLayout.js +18 -18
- package/dist_es/react/components/navigation/ReactRouterLayout.d.ts +46 -46
- package/dist_es/react/components/navigation/ReactRouterLayout.js +99 -99
- package/dist_es/react/components/navigation/customRouting/Router.d.ts +12 -12
- package/dist_es/react/components/navigation/customRouting/Router.js +18 -18
- package/dist_es/react/components/navigation/customRouting/RouterLayout.d.ts +11 -11
- package/dist_es/react/components/navigation/customRouting/RouterLayout.js +34 -34
- package/dist_es/react/components/resolvable/configurationForm/ConfigurationForm.d.ts +27 -27
- package/dist_es/react/components/resolvable/configurationForm/ConfigurationForm.js +64 -64
- package/dist_es/react/components/resolvable/configurationForm/ConfigurationFormEntry.d.ts +16 -16
- package/dist_es/react/components/resolvable/configurationForm/ConfigurationFormEntry.js +58 -58
- package/dist_es/react/components/resolvable/configurationForm/getSectionDefault.d.ts +16 -16
- package/dist_es/react/components/resolvable/configurationForm/getSectionDefault.js +94 -94
- package/dist_es/react/hooks/useFin5BinUrl.d.ts +6 -6
- package/dist_es/react/hooks/useFin5BinUrl.js +11 -11
- package/dist_es/react/hooks/useFin5ColorScheme.d.ts +2 -2
- package/dist_es/react/hooks/useFin5ColorScheme.js +45 -45
- package/dist_es/react/hooks/useScreenSize.d.ts +7 -7
- package/dist_es/react/hooks/useScreenSize.js +27 -27
- package/package.json +1 -1
- package/dist_es/react/app/Fin5AppContainer.jsx +0 -82
- package/dist_es/react/app/Fin5AppContainer.jsx.map +0 -1
- package/dist_es/react/components/ErrorBoundary.jsx +0 -150
- package/dist_es/react/components/ErrorBoundary.jsx.map +0 -1
- package/dist_es/react/components/ErrorDisplayer.jsx +0 -36
- package/dist_es/react/components/ErrorDisplayer.jsx.map +0 -1
- package/dist_es/react/components/Loader.jsx +0 -13
- package/dist_es/react/components/Loader.jsx.map +0 -1
- package/dist_es/react/components/LoadingSpinner.jsx +0 -22
- package/dist_es/react/components/LoadingSpinner.jsx.map +0 -1
- package/dist_es/react/components/charts/line-bar/ZincGridChart.d.ts +0 -12
- package/dist_es/react/components/charts/line-bar/ZincGridChart.js +0 -17
- package/dist_es/react/components/charts/line-bar/ZincGridChart.js.map +0 -1
- package/dist_es/react/components/graphics/GraphicViewer.jsx +0 -23
- package/dist_es/react/components/graphics/GraphicViewer.jsx.map +0 -1
- package/dist_es/react/components/graphics/GraphicsTabViewer.jsx +0 -63
- package/dist_es/react/components/graphics/GraphicsTabViewer.jsx.map +0 -1
- package/dist_es/react/components/navigation/BasicLayout.jsx +0 -133
- package/dist_es/react/components/navigation/BasicLayout.jsx.map +0 -1
- package/dist_es/react/components/navigation/MenuPage.jsx +0 -31
- package/dist_es/react/components/navigation/MenuPage.jsx.map +0 -1
- package/dist_es/react/components/navigation/Router.d.ts +0 -12
- package/dist_es/react/components/navigation/Router.js +0 -19
- package/dist_es/react/components/navigation/Router.js.map +0 -1
- package/dist_es/react/components/navigation/Router.jsx +0 -19
- package/dist_es/react/components/navigation/Router.jsx.map +0 -1
- package/dist_es/react/components/navigation/react-router/BasicLayout.d.ts +0 -23
- package/dist_es/react/components/navigation/react-router/BasicLayout.js +0 -82
- package/dist_es/react/components/navigation/react-router/BasicLayout.js.map +0 -1
- package/dist_es/react/components/navigation/react-router/ReactRouterBasicLayout.d.ts +0 -24
- package/dist_es/react/components/navigation/react-router/ReactRouterBasicLayout.js +0 -82
- package/dist_es/react/components/navigation/react-router/ReactRouterBasicLayout.js.map +0 -1
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2022, J2 Innovations. All Rights Reserved
|
|
3
|
-
*/
|
|
4
|
-
import { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons';
|
|
5
|
-
import { Button, Layout, Menu } from '@j2inn/ui';
|
|
6
|
-
import classNames from 'classnames';
|
|
7
|
-
import React, { useEffect, useMemo, useState } from 'react';
|
|
8
|
-
import { createUseStyles } from 'react-jss';
|
|
9
|
-
import { ErrorDisplayer } from '../ErrorDisplayer';
|
|
10
|
-
import { findPageByName } from './MenuPage';
|
|
11
|
-
import { Router } from './Router';
|
|
12
|
-
const HEADER_HEIGHT = 45;
|
|
13
|
-
const useStyles = createUseStyles((theme) => {
|
|
14
|
-
return {
|
|
15
|
-
header: {
|
|
16
|
-
position: 'fixed',
|
|
17
|
-
width: '100%',
|
|
18
|
-
zIndex: 1000,
|
|
19
|
-
padding: 0,
|
|
20
|
-
height: HEADER_HEIGHT,
|
|
21
|
-
lineHeight: '45px',
|
|
22
|
-
},
|
|
23
|
-
sider: {
|
|
24
|
-
overflow: 'auto',
|
|
25
|
-
height: '100vh',
|
|
26
|
-
position: 'fixed',
|
|
27
|
-
left: 0,
|
|
28
|
-
top: 0,
|
|
29
|
-
bottom: 0,
|
|
30
|
-
zIndex: 999,
|
|
31
|
-
paddingTop: ({ isMobile }) => isMobile ? HEADER_HEIGHT : 0,
|
|
32
|
-
},
|
|
33
|
-
menuTrigger: {
|
|
34
|
-
width: 45,
|
|
35
|
-
height: '100%',
|
|
36
|
-
textAlign: 'center',
|
|
37
|
-
fontSize: 18,
|
|
38
|
-
cursor: 'pointer',
|
|
39
|
-
transition: 'color 0.3s ease-in-out',
|
|
40
|
-
backgroundColor: 'transparent',
|
|
41
|
-
color: 'white',
|
|
42
|
-
'&:hover': {
|
|
43
|
-
color: theme.linkActiveColor,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
content: ({ isMobile, compactSider, siderWidth = 200, }) => ({
|
|
47
|
-
paddingLeft: isMobile ? 0 : compactSider ? 45 : siderWidth,
|
|
48
|
-
paddingTop: isMobile ? HEADER_HEIGHT : 0,
|
|
49
|
-
}),
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
// Workaround j2inn/ui exporting problem
|
|
53
|
-
const Header = Layout.Header;
|
|
54
|
-
const Sider = Layout.Sider;
|
|
55
|
-
const Content = Layout.Content;
|
|
56
|
-
/**
|
|
57
|
-
* Copy the array and recursively remove pages having the `showInMenu` flag set to false.
|
|
58
|
-
* @param pages
|
|
59
|
-
* @returns
|
|
60
|
-
*/
|
|
61
|
-
const getMenuPages = (pages) => {
|
|
62
|
-
const menuPages = [];
|
|
63
|
-
pages.forEach((page) => {
|
|
64
|
-
const show = page.showInMenu == null || page.showInMenu;
|
|
65
|
-
if (show) {
|
|
66
|
-
const copiedPage = Object.assign({}, page);
|
|
67
|
-
if (copiedPage.children) {
|
|
68
|
-
const filteredChildren = getMenuPages(copiedPage.children);
|
|
69
|
-
copiedPage.children = filteredChildren.length
|
|
70
|
-
? filteredChildren
|
|
71
|
-
: undefined;
|
|
72
|
-
}
|
|
73
|
-
menuPages.push(copiedPage);
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
return menuPages;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Basic layout that combines menu and routing into one.
|
|
80
|
-
*/
|
|
81
|
-
export const BasicLayout = ({ pages = [], defaultPage = pages?.[0].key ?? '', onPageChange, compactSider, layoutProps, mobileHeaderProps, siderProps, contentProps, menuProps, page, }) => {
|
|
82
|
-
const [currentPage, setCurrentPage] = useState(page ?? defaultPage);
|
|
83
|
-
useEffect(() => {
|
|
84
|
-
if (page) {
|
|
85
|
-
setCurrentPage(page);
|
|
86
|
-
}
|
|
87
|
-
}, [page]);
|
|
88
|
-
// Fire onChange
|
|
89
|
-
useEffect(() => {
|
|
90
|
-
onPageChange?.(currentPage);
|
|
91
|
-
}, [currentPage]);
|
|
92
|
-
// manage mobile navigation
|
|
93
|
-
const [isMobile, setIsMobile] = useState(false);
|
|
94
|
-
const [hiddenSider, setHiddenSider] = useState(false);
|
|
95
|
-
const siderWidth = siderProps?.width;
|
|
96
|
-
const classes = useStyles({ isMobile, compactSider, siderWidth });
|
|
97
|
-
const menuPages = useMemo(() => getMenuPages(pages), [pages]);
|
|
98
|
-
return (<Layout hasSider {...layoutProps}>
|
|
99
|
-
{isMobile && (<Header {...mobileHeaderProps} className={classNames(classes.header, mobileHeaderProps?.className)}>
|
|
100
|
-
{hiddenSider ? (<MenuUnfoldOutlined className={classes.menuTrigger} onClick={() => {
|
|
101
|
-
setHiddenSider(!hiddenSider);
|
|
102
|
-
}}/>) : (<MenuFoldOutlined className={classes.menuTrigger} onClick={() => {
|
|
103
|
-
setHiddenSider(!hiddenSider);
|
|
104
|
-
}}/>)}
|
|
105
|
-
</Header>)}
|
|
106
|
-
<Sider {...siderProps} className={classNames(classes.sider, siderProps?.className)} breakpoint='md' onBreakpoint={(broken) => {
|
|
107
|
-
setIsMobile(broken);
|
|
108
|
-
setHiddenSider(true);
|
|
109
|
-
}} collapsed={(isMobile && hiddenSider) || compactSider} collapsedWidth={isMobile && hiddenSider
|
|
110
|
-
? 0
|
|
111
|
-
: compactSider
|
|
112
|
-
? HEADER_HEIGHT
|
|
113
|
-
: 0} trigger={null}>
|
|
114
|
-
<Menu {...menuProps} items={menuPages} selectedKeys={[currentPage]} onSelect={({ key }) => {
|
|
115
|
-
if (!hiddenSider) {
|
|
116
|
-
setHiddenSider(true);
|
|
117
|
-
}
|
|
118
|
-
const page = findPageByName(pages, key);
|
|
119
|
-
if (page?.component) {
|
|
120
|
-
setCurrentPage(key);
|
|
121
|
-
}
|
|
122
|
-
}}/>
|
|
123
|
-
</Sider>
|
|
124
|
-
<Content {...contentProps} className={classNames(classes.content, contentProps?.className)}>
|
|
125
|
-
<Router pages={pages} currentPage={currentPage} fallbackComponent={<ErrorDisplayer error={new Error('Page Not Found')} extra={[
|
|
126
|
-
<Button type='primary' key='refresh' onClick={() => setCurrentPage(defaultPage)}>
|
|
127
|
-
Go Home
|
|
128
|
-
</Button>,
|
|
129
|
-
]}/>}/>
|
|
130
|
-
</Content>
|
|
131
|
-
</Layout>);
|
|
132
|
-
};
|
|
133
|
-
//# sourceMappingURL=BasicLayout.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BasicLayout.jsx","sourceRoot":"","sources":["../../../../src/react/components/nav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C,CACjB,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAC5B,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;YACrB,IAAI,CAAC,WAAW,EAAE;gBACjB,cAAc,CAAC,IAAI,CAAC,CAAA;aACpB;YACD,MAAM,IAAI,GAAG,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;YACvC,IAAI,IAAI,EAAE,SAAS,EAAE;gBACpB,cAAc,CAAC,GAAG,CAAC,CAAA;aACnB;QACF,CAAC,CAAC,EAEJ;GAAA,EAAE,KAAK,CACP;GAAA,CAAC,OAAO,CACP,IAAI,YAAY,CAAC,CACjB,SAAS,CAAC,CAAC,UAAU,CACpB,OAAO,CAAC,OAAO,EACf,YAAY,EAAE,SAAS,CACvB,CAAC,CACF;IAAA,CAAC,MAAM,CACN,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,iBAAiB,CAAC,CACjB,CAAC,cAAc,CACd,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC,CACnC,KAAK,CAAC,CAAC;gBACN,CAAC,MAAM,CACN,IAAI,CAAC,SAAS,CACd,GAAG,CAAC,SAAS,CACb,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAC3C;;QACD,EAAE,MAAM,CAAC;aACT,CAAC,EACD,CACF,EAEH;GAAA,EAAE,OAAO,CACV;EAAA,EAAE,MAAM,CAAC,CACT,CAAA;AACF,CAAC,CAAA"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2022, J2 Innovations. All Rights Reserved
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Retrieve a specific page or subPage from a root page list
|
|
6
|
-
* @param name the name of the searched page
|
|
7
|
-
* @param pages the list of root pages
|
|
8
|
-
*/
|
|
9
|
-
export function findPageByName(pages, name) {
|
|
10
|
-
return pageTreeToPageList(pages).find((page) => page.key === name && !page.disabled);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Expands the list of pages to include all the subpages
|
|
14
|
-
*/
|
|
15
|
-
export function pageTreeToPageList(pages) {
|
|
16
|
-
return pages.flatMap((page) => getAllSubPages(page));
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Recursively get all the subPages of a root page
|
|
20
|
-
* @param page root page
|
|
21
|
-
* @returns the whole tree of subPages as a list
|
|
22
|
-
*/
|
|
23
|
-
export function getAllSubPages(page) {
|
|
24
|
-
if (page.children) {
|
|
25
|
-
return [page].concat(...page.children.map((subPage) => getAllSubPages(subPage)));
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
return [page];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=MenuPage.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MenuPage.jsx","sourceRoot":"","sources":["../../../../src/react/components/navigation/MenuPage.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAyBH;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC7B,KAAU,EACV,IAAa;IAEb,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC,IAAI,CACpC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAC7C,CAAA;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAqB,KAAU;IAChE,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAS,CAAC,CAAC,CAAA;AAC1D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAqB,IAAO;IACzD,IAAI,IAAI,CAAC,QAAQ,EAAE;QAClB,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CACnB,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,cAAc,CAAC,OAAY,CAAC,CAAC,CAC/D,CAAA;KACD;SAAM;QACN,OAAO,CAAC,IAAI,CAAC,CAAA;KACb;AACF,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
-
import { MenuPage } from './MenuPage';
|
|
3
|
-
export interface RouterProps<T extends MenuPage> {
|
|
4
|
-
pages?: T[];
|
|
5
|
-
currentPage: string;
|
|
6
|
-
onPageChange?: (selectedPage?: T) => void;
|
|
7
|
-
fallbackComponent?: ReactElement;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Renders the currently selected page from a tree of pages
|
|
11
|
-
*/
|
|
12
|
-
export declare function Router<T extends MenuPage>({ pages, currentPage, onPageChange, fallbackComponent, }: PropsWithChildren<RouterProps<T>>): JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2022, J2 Innovations. All Rights Reserved
|
|
3
|
-
*/
|
|
4
|
-
import React, { Suspense, useEffect, useMemo, } from 'react';
|
|
5
|
-
import { LoadingSpinner } from '../LoadingSpinner';
|
|
6
|
-
import { findPageByName } from './MenuPage';
|
|
7
|
-
/**
|
|
8
|
-
* Renders the currently selected page from a tree of pages
|
|
9
|
-
*/
|
|
10
|
-
export function Router({ pages = [], currentPage, onPageChange, fallbackComponent, }) {
|
|
11
|
-
const page = useMemo(() => findPageByName(pages, currentPage), [pages, currentPage]);
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
onPageChange?.(page);
|
|
14
|
-
}, [page]);
|
|
15
|
-
return page?.component ? (React.createElement(Suspense, { fallback: React.createElement(LoadingSpinner, null) }, React.createElement(page.component, page?.props))) : (fallbackComponent ?? React.createElement("div", null,
|
|
16
|
-
currentPage,
|
|
17
|
-
" page not found"));
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=Router.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Router.js","sourceRoot":"","sources":["../../../../src/react/components/navigation/Router.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,EAGb,QAAQ,EACR,SAAS,EACT,OAAO,GACP,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAY,MAAM,YAAY,CAAA;AASrD;;GAEG;AACH,MAAM,UAAU,MAAM,CAAqB,EAC1C,KAAK,GAAG,EAAE,EACV,WAAW,EACX,YAAY,EACZ,iBAAiB,GACkB;IACnC,MAAM,IAAI,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,WAAW,CAAC,EACxC,CAAC,KAAK,EAAE,WAAW,CAAC,CACpB,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACd,YAAY,EAAE,CAAC,IAAI,CAAC,CAAA;IACrB,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;IAEV,OAAO,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CACxB,oBAAC,QAAQ,IAAC,QAAQ,EAAE,oBAAC,cAAc,OAAG,IACpC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC,CACvC,CACX,CAAC,CAAC,CAAC,CACH,iBAAiB,IAAI;QAAM,WAAW;0BAAsB,CAC5D,CAAA;AACF,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2022, J2 Innovations. All Rights Reserved
|
|
3
|
-
*/
|
|
4
|
-
import React, { Suspense, useEffect, useMemo, } from 'react';
|
|
5
|
-
import { LoadingSpinner } from '../LoadingSpinner';
|
|
6
|
-
import { findPageByName } from './MenuPage';
|
|
7
|
-
/**
|
|
8
|
-
* Renders the currently selected page from a tree of pages
|
|
9
|
-
*/
|
|
10
|
-
export function Router({ pages = [], currentPage, onPageChange, fallbackComponent, }) {
|
|
11
|
-
const page = useMemo(() => findPageByName(pages, currentPage), [pages, currentPage]);
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
onPageChange?.(page);
|
|
14
|
-
}, [page]);
|
|
15
|
-
return page?.component ? (<Suspense fallback={<LoadingSpinner />}>
|
|
16
|
-
{React.createElement(page.component, page?.props)}
|
|
17
|
-
</Suspense>) : (fallbackComponent ?? <div>{currentPage} page not found</div>);
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=Router.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Router.jsx","sourceRoot":"","sources":["../../../../src/react/components/navigation/Router.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,EAGb,QAAQ,EACR,SAAS,EACT,OAAO,GACP,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAY,MAAM,YAAY,CAAA;AASrD;;GAEG;AACH,MAAM,UAAU,MAAM,CAAqB,EAC1C,KAAK,GAAG,EAAE,EACV,WAAW,EACX,YAAY,EACZ,iBAAiB,GACkB;IACnC,MAAM,IAAI,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,WAAW,CAAC,EACxC,CAAC,KAAK,EAAE,WAAW,CAAC,CACpB,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACd,YAAY,EAAE,CAAC,IAAI,CAAC,CAAA;IACrB,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;IAEV,OAAO,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CACxB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,AAAD,EAAG,CAAC,CACtC;GAAA,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC,CAClD;EAAA,EAAE,QAAQ,CAAC,CACX,CAAC,CAAC,CAAC,CACH,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,CAAE,eAAc,EAAE,GAAG,CAAC,CAC5D,CAAA;AACF,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Location } from '@remix-run/router';
|
|
2
|
-
import { LayoutProps, MenuProps, SiderProps } from 'antd';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { MenuPage } from '../MenuPage';
|
|
5
|
-
export interface BasicLayoutProps {
|
|
6
|
-
pages?: MenuPage[];
|
|
7
|
-
compactSider?: boolean;
|
|
8
|
-
layoutProps?: LayoutProps;
|
|
9
|
-
mobileHeaderProps?: LayoutProps;
|
|
10
|
-
siderProps?: SiderProps;
|
|
11
|
-
contentProps?: LayoutProps;
|
|
12
|
-
menuProps?: Omit<MenuProps, 'items' | 'selectedKeys' | 'onSelect'>;
|
|
13
|
-
isSelectedRoute?: (page: MenuPage, location: Location) => boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* This hook can be used with react-router/BasicLayout,
|
|
17
|
-
* to ensure FIN5 URL is aligned with the internal frame URL.
|
|
18
|
-
*/
|
|
19
|
-
export declare const useLocationUpdate: () => void;
|
|
20
|
-
/**
|
|
21
|
-
* Basic layout that uses React Router.
|
|
22
|
-
*/
|
|
23
|
-
export declare const BasicLayout: React.FC<BasicLayoutProps>;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2023, J2 Innovations. All Rights Reserved
|
|
3
|
-
*/
|
|
4
|
-
import { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons';
|
|
5
|
-
import { Layout, Menu } from '@j2inn/ui';
|
|
6
|
-
import classNames from 'classnames';
|
|
7
|
-
import { IN_IFRAME, fin5SkipHashUpdate, getFin5HashFrameParameters, getTopLocation, } from 'fin5Top/useFin5AppURLHashParameter';
|
|
8
|
-
import React, { useEffect, useMemo, useState } from 'react';
|
|
9
|
-
import { Outlet, useLocation, useNavigate } from 'react-router';
|
|
10
|
-
import { HEADER_HEIGHT, getMenuPages, useStyles } from '../BasicLayout';
|
|
11
|
-
import { pageTreeToPageList } from '../MenuPage';
|
|
12
|
-
// Workaround j2inn/ui exporting problem
|
|
13
|
-
const Header = Layout.Header;
|
|
14
|
-
const Sider = Layout.Sider;
|
|
15
|
-
const Content = Layout.Content;
|
|
16
|
-
/**
|
|
17
|
-
* This hook can be used with react-router/BasicLayout,
|
|
18
|
-
* to ensure FIN5 URL is aligned with the internal frame URL.
|
|
19
|
-
*/
|
|
20
|
-
export const useLocationUpdate = () => {
|
|
21
|
-
const location = useLocation();
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
console.debug('Location changed', location);
|
|
24
|
-
const hash = location.pathname;
|
|
25
|
-
const queryParams = location.search;
|
|
26
|
-
if (IN_IFRAME) {
|
|
27
|
-
fin5SkipHashUpdate()?.then(() => {
|
|
28
|
-
const frameParameters = getFin5HashFrameParameters();
|
|
29
|
-
frameParameters.set('url', frameParameters.get('url')?.split('#')[0] +
|
|
30
|
-
'#' +
|
|
31
|
-
hash +
|
|
32
|
-
queryParams);
|
|
33
|
-
getTopLocation().hash = `#${getTopLocation().hash.slice(1).split('?')[0]}?${frameParameters.toString()}`;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}, [location]);
|
|
37
|
-
};
|
|
38
|
-
const useSelectedRoutes = (pages, isSelectedRoute = (page, location) => location.pathname.includes(`/${page.key}`)) => {
|
|
39
|
-
const location = useLocation();
|
|
40
|
-
return useMemo(() => {
|
|
41
|
-
const flatPages = pageTreeToPageList(pages);
|
|
42
|
-
return flatPages
|
|
43
|
-
.filter((page) => isSelectedRoute(page, location))
|
|
44
|
-
.map((page) => page.key);
|
|
45
|
-
}, [location, pages]);
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Basic layout that uses React Router.
|
|
49
|
-
*/
|
|
50
|
-
export const BasicLayout = ({ pages = [], compactSider, layoutProps, mobileHeaderProps, siderProps, contentProps, menuProps, isSelectedRoute, }) => {
|
|
51
|
-
const navigate = useNavigate();
|
|
52
|
-
const selectedRoutes = useSelectedRoutes(pages, isSelectedRoute);
|
|
53
|
-
// manage mobile navigation
|
|
54
|
-
const [isMobile, setIsMobile] = useState(false);
|
|
55
|
-
const [hiddenSider, setHiddenSider] = useState(false);
|
|
56
|
-
const siderWidth = siderProps?.width;
|
|
57
|
-
const classes = useStyles({ isMobile, compactSider, siderWidth });
|
|
58
|
-
const menuPages = useMemo(() => getMenuPages(pages), [pages]);
|
|
59
|
-
return (React.createElement(Layout, { hasSider: true, ...layoutProps },
|
|
60
|
-
isMobile && (React.createElement(Header, { ...mobileHeaderProps, className: classNames(classes.header, mobileHeaderProps?.className) }, hiddenSider ? (React.createElement(MenuUnfoldOutlined, { className: classes.menuTrigger, onClick: () => {
|
|
61
|
-
setHiddenSider(!hiddenSider);
|
|
62
|
-
} })) : (React.createElement(MenuFoldOutlined, { className: classes.menuTrigger, onClick: () => {
|
|
63
|
-
setHiddenSider(!hiddenSider);
|
|
64
|
-
} })))),
|
|
65
|
-
React.createElement(Sider, { ...siderProps, className: classNames(classes.sider, siderProps?.className), breakpoint: 'md', onBreakpoint: (broken) => {
|
|
66
|
-
setIsMobile(broken);
|
|
67
|
-
setHiddenSider(true);
|
|
68
|
-
}, collapsed: (isMobile && hiddenSider) || compactSider, collapsedWidth: isMobile && hiddenSider
|
|
69
|
-
? 0
|
|
70
|
-
: compactSider
|
|
71
|
-
? HEADER_HEIGHT
|
|
72
|
-
: 0, trigger: null },
|
|
73
|
-
React.createElement(Menu, { ...menuProps, items: menuPages, selectedKeys: selectedRoutes, onSelect: ({ key }) => {
|
|
74
|
-
if (!hiddenSider) {
|
|
75
|
-
setHiddenSider(true);
|
|
76
|
-
}
|
|
77
|
-
navigate(key);
|
|
78
|
-
} })),
|
|
79
|
-
React.createElement(Content, { ...contentProps, className: classNames(classes.content, contentProps?.className) },
|
|
80
|
-
React.createElement(Outlet, null))));
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=BasicLayout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BasicLayout.js","sourceRoot":"","sources":["../../../../../src/react/components/navigation/react-router/BasicLayout.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACxE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGxC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EACN,SAAS,EACT,kBAAkB,EAClB,0BAA0B,EAC1B,cAAc,GACd,MAAM,oCAAoC,CAAA;AAC3C,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACvE,OAAO,EAAY,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAE1D,wCAAwC;AACxC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAiC,CAAA;AACvD,MAAM,KAAK,GAAG,MAAM,CAAC,KAA+B,CAAA;AACpD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAmC,CAAA;AAa1D;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACrC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,SAAS,CAAC,GAAG,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAA;QAC3C,MAAM,IAAI,GAAG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AC,CAAC,WAAW,CAAC,CAAA;YAC7B,CAAC,GACA,CACF,CACO,CACT;QACD,oBAAC,KAAK,OACD,UAAU,EACd,SAAS,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,CAAC,EAC3D,UAAU,EAAC,IAAI,EACf,YAAY,EAAE,CAAC,MAAe,EAAE,EAAE;gBACjC,WAAW,CAAC,MAAM,CAAC,CAAA;gBACnB,cAAc,CAAC,IAAI,CAAC,CAAA;YACrB,CAAC,EACD,SAAS,EAAE,CAAC,QAAQ,IAAI,WAAW,CAAC,IAAI,YAAY,EACpD,cAAc,EACb,QAAQ,IAAI,WAAW;gBACtB,CAAC,CAAC,CAAC;gBACH,CAAC,CAAC,YAAY;oBACd,CAAC,CAAC,aAAa;oBACf,CAAC,CAAC,CAAC,EAEL,OAAO,EAAE,IAAI;YACb,oBAAC,IAAI,OACA,SAAS,EACb,KAAK,EAAE,SAAS,EAChB,YAAY,EAAE,cAAc,EAC5B,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;oBACrB,IAAI,CAAC,WAAW,EAAE;wBACjB,cAAc,CAAC,IAAI,CAAC,CAAA;qBACpB;oBACD,QAAQ,CAAC,GAAG,CAAC,CAAA;gBACd,CAAC,GACA,CACK;QACR,oBAAC,OAAO,OACH,YAAY,EAChB,SAAS,EAAE,UAAU,CACpB,OAAO,CAAC,OAAO,EACf,YAAY,EAAE,SAAS,CACvB;YACD,oBAAC,MAAM,OAAG,CACD,CACF,CACT,CAAA;AACF,CAAC,CAAA"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Location } from '@remix-run/router';
|
|
2
|
-
import { LayoutProps, MenuProps, SiderProps } from 'antd';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { MenuPage } from '../MenuPage';
|
|
5
|
-
export interface ReactRouterBasicLayoutProps {
|
|
6
|
-
pages?: MenuPage[];
|
|
7
|
-
defaultPage?: string;
|
|
8
|
-
compactSider?: boolean;
|
|
9
|
-
layoutProps?: LayoutProps;
|
|
10
|
-
mobileHeaderProps?: LayoutProps;
|
|
11
|
-
siderProps?: SiderProps;
|
|
12
|
-
contentProps?: LayoutProps;
|
|
13
|
-
menuProps?: Omit<MenuProps, 'items' | 'selectedKeys' | 'onSelect'>;
|
|
14
|
-
isSelectedRoute?: (page: MenuPage, location: Location) => boolean;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* This hook can be used with react-router/BasicLayout,
|
|
18
|
-
* to ensure FIN5 URL is aligned with the internal frame URL.
|
|
19
|
-
*/
|
|
20
|
-
export declare const useLocationUpdate: () => void;
|
|
21
|
-
/**
|
|
22
|
-
* Basic layout that uses React Router.
|
|
23
|
-
*/
|
|
24
|
-
export declare const ReactRouterBasicLayout: React.FC<ReactRouterBasicLayoutProps>;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2023, J2 Innovations. All Rights Reserved
|
|
3
|
-
*/
|
|
4
|
-
import { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons';
|
|
5
|
-
import { Layout, Menu } from '@j2inn/ui';
|
|
6
|
-
import classNames from 'classnames';
|
|
7
|
-
import React, { useEffect, useMemo, useState } from 'react';
|
|
8
|
-
import { Outlet, useLocation, useNavigate } from 'react-router';
|
|
9
|
-
import { IN_IFRAME, fin5SkipHashUpdate, getFin5HashFrameParameters, getTopLocation, } from '../../../../fin5Top/useFin5AppURLHashParameter';
|
|
10
|
-
import { HEADER_HEIGHT, getMenuPages, useStyles } from '../BasicLayout';
|
|
11
|
-
import { pageTreeToPageList } from '../MenuPage';
|
|
12
|
-
// Workaround j2inn/ui exporting problem
|
|
13
|
-
const Header = Layout.Header;
|
|
14
|
-
const Sider = Layout.Sider;
|
|
15
|
-
const Content = Layout.Content;
|
|
16
|
-
/**
|
|
17
|
-
* This hook can be used with react-router/BasicLayout,
|
|
18
|
-
* to ensure FIN5 URL is aligned with the internal frame URL.
|
|
19
|
-
*/
|
|
20
|
-
export const useLocationUpdate = () => {
|
|
21
|
-
const location = useLocation();
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
console.debug('Location changed', location);
|
|
24
|
-
const hash = location.pathname;
|
|
25
|
-
const queryParams = location.search;
|
|
26
|
-
if (IN_IFRAME) {
|
|
27
|
-
fin5SkipHashUpdate()?.then(() => {
|
|
28
|
-
const frameParameters = getFin5HashFrameParameters();
|
|
29
|
-
frameParameters.set('url', frameParameters.get('url')?.split('#')[0] +
|
|
30
|
-
'#' +
|
|
31
|
-
hash +
|
|
32
|
-
queryParams);
|
|
33
|
-
getTopLocation().hash = `#${getTopLocation().hash.slice(1).split('?')[0]}?${frameParameters.toString()}`;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}, [location]);
|
|
37
|
-
};
|
|
38
|
-
const useSelectedRoutes = (pages, isSelectedRoute = (page, location) => location.pathname.includes(`/${page.key}`)) => {
|
|
39
|
-
const location = useLocation();
|
|
40
|
-
return useMemo(() => {
|
|
41
|
-
const flatPages = pageTreeToPageList(pages);
|
|
42
|
-
return flatPages
|
|
43
|
-
.filter((page) => isSelectedRoute(page, location))
|
|
44
|
-
.map((page) => page.key);
|
|
45
|
-
}, [location, pages]);
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Basic layout that uses React Router.
|
|
49
|
-
*/
|
|
50
|
-
export const ReactRouterBasicLayout = ({ pages = [], defaultPage, compactSider, layoutProps, mobileHeaderProps, siderProps, contentProps, menuProps, isSelectedRoute, }) => {
|
|
51
|
-
const navigate = useNavigate();
|
|
52
|
-
const selectedRoutes = useSelectedRoutes(pages, isSelectedRoute);
|
|
53
|
-
// manage mobile navigation
|
|
54
|
-
const [isMobile, setIsMobile] = useState(false);
|
|
55
|
-
const [hiddenSider, setHiddenSider] = useState(false);
|
|
56
|
-
const siderWidth = siderProps?.width;
|
|
57
|
-
const classes = useStyles({ isMobile, compactSider, siderWidth });
|
|
58
|
-
const menuPages = useMemo(() => getMenuPages(pages), [pages]);
|
|
59
|
-
return (React.createElement(Layout, { hasSider: true, ...layoutProps },
|
|
60
|
-
isMobile && (React.createElement(Header, { ...mobileHeaderProps, className: classNames(classes.header, mobileHeaderProps?.className) }, hiddenSider ? (React.createElement(MenuUnfoldOutlined, { className: classes.menuTrigger, onClick: () => {
|
|
61
|
-
setHiddenSider(!hiddenSider);
|
|
62
|
-
} })) : (React.createElement(MenuFoldOutlined, { className: classes.menuTrigger, onClick: () => {
|
|
63
|
-
setHiddenSider(!hiddenSider);
|
|
64
|
-
} })))),
|
|
65
|
-
React.createElement(Sider, { ...siderProps, className: classNames(classes.sider, siderProps?.className), breakpoint: 'md', onBreakpoint: (broken) => {
|
|
66
|
-
setIsMobile(broken);
|
|
67
|
-
setHiddenSider(true);
|
|
68
|
-
}, collapsed: (isMobile && hiddenSider) || compactSider, collapsedWidth: isMobile && hiddenSider
|
|
69
|
-
? 0
|
|
70
|
-
: compactSider
|
|
71
|
-
? HEADER_HEIGHT
|
|
72
|
-
: 0, trigger: null },
|
|
73
|
-
React.createElement(Menu, { ...menuProps, defaultSelectedKeys: defaultPage ? [defaultPage] : undefined, items: menuPages, selectedKeys: selectedRoutes, onSelect: ({ key }) => {
|
|
74
|
-
if (!hiddenSider) {
|
|
75
|
-
setHiddenSider(true);
|
|
76
|
-
}
|
|
77
|
-
navigate(key);
|
|
78
|
-
} })),
|
|
79
|
-
React.createElement(Content, { ...contentProps, className: classNames(classes.content, contentProps?.className) },
|
|
80
|
-
React.createElement(Outlet, null))));
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=ReactRouterBasicLayout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReactRouterBasicLayout.js","sourceRoot":"","sources":["../../../../../src/react/components/navigation/react-router/ReactRouterBasicLayout.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,mBA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