@deix/rossini-core 1.0.9 → 2.0.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/lib/components/buttons/Avatar/Avatar.d.ts.map +1 -0
- package/lib/components/buttons/Avatar/Avatar.js +49 -0
- package/lib/components/buttons/LanguageSelect/LanguageSelect.d.ts.map +1 -0
- package/lib/components/buttons/LanguageSelect/LanguageSelect.js +57 -0
- package/lib/components/buttons/ToggleButtonGroup/ToggleButtonGroup.d.ts.map +1 -0
- package/lib/components/buttons/ToggleButtonGroup/ToggleButtonGroup.js +18 -0
- package/lib/components/buttons/index.d.ts.map +1 -0
- package/lib/components/buttons/index.js +3 -0
- package/lib/components/display/Accordion/Accordion.d.ts.map +1 -0
- package/lib/components/display/Accordion/Accordion.js +22 -0
- package/lib/components/display/StyledValue/ImprovementChip.d.ts.map +1 -0
- package/lib/components/display/StyledValue/ImprovementChip.js +62 -0
- package/lib/components/display/StyledValue/StyledValue.d.ts.map +1 -0
- package/lib/components/display/StyledValue/StyledValue.js +84 -0
- package/lib/components/display/StyledValue/hooks.d.ts +6 -0
- package/lib/components/display/StyledValue/hooks.d.ts.map +1 -0
- package/lib/{src/components → components}/display/StyledValue/hooks.js +4 -7
- package/lib/components/display/index.d.ts.map +1 -0
- package/lib/components/display/index.js +3 -0
- package/lib/components/i18n/Link.d.ts +9 -0
- package/lib/components/i18n/Link.d.ts.map +1 -0
- package/lib/components/i18n/Link.js +20 -0
- package/lib/components/i18n/index.d.ts +3 -0
- package/lib/components/i18n/index.d.ts.map +1 -0
- package/lib/components/i18n/index.js +1 -0
- package/lib/{src/components → components}/index.d.ts +4 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +6 -0
- package/lib/components/layout/MinimalLayout/MinimalLayout.d.ts.map +1 -0
- package/lib/components/layout/MinimalLayout/MinimalLayout.js +59 -0
- package/lib/{src/components/layout/StandardLayout → components/layout/MinimalLayout}/translations.json +1 -0
- package/lib/components/layout/StandardLayout/StandardLayout.d.ts.map +1 -0
- package/lib/components/layout/StandardLayout/StandardLayout.js +72 -0
- package/lib/{src/components/layout/MinimalLayout → components/layout/StandardLayout}/translations.json +1 -0
- package/lib/components/layout/assets/DeixLogo.d.ts.map +1 -0
- package/lib/components/layout/assets/DeixLogo.js +15 -0
- package/lib/components/layout/assets/ServerDown.d.ts.map +1 -0
- package/lib/components/layout/assets/ServerDown.js +55 -0
- package/lib/components/layout/components/AppLogo/AppLogo.d.ts.map +1 -0
- package/lib/components/layout/components/AppLogo/AppLogo.js +25 -0
- package/lib/components/layout/components/Footer/Footer.d.ts.map +1 -0
- package/lib/components/layout/components/Footer/Footer.js +59 -0
- package/lib/components/layout/components/Sidebar/Sidebar.d.ts.map +1 -0
- package/lib/components/layout/components/Sidebar/Sidebar.js +237 -0
- package/lib/components/layout/components/Topbar/ElevationScroll.d.ts.map +1 -0
- package/lib/components/layout/components/Topbar/ElevationScroll.js +13 -0
- package/lib/components/layout/components/Topbar/Topbar.d.ts.map +1 -0
- package/lib/components/layout/components/Topbar/Topbar.js +38 -0
- package/lib/{src/components → components}/layout/components/Topbar/translations.json +4 -0
- package/lib/components/layout/components/Topline/TopLine.d.ts.map +1 -0
- package/lib/components/layout/components/Topline/TopLine.js +14 -0
- package/lib/components/layout/index.d.ts.map +1 -0
- package/lib/components/layout/index.js +2 -0
- package/lib/components/progress/CircularLoading/CircularLoading.d.ts.map +1 -0
- package/lib/components/progress/CircularLoading/CircularLoading.js +19 -0
- package/lib/components/progress/index.d.ts.map +1 -0
- package/lib/components/progress/index.js +1 -0
- package/lib/{src/utils → components}/provider/PageProvider.d.ts +1 -3
- package/lib/components/provider/PageProvider.d.ts.map +1 -0
- package/lib/components/provider/PageProvider.js +9 -0
- package/lib/components/provider/ThemeProvider.d.ts +15 -0
- package/lib/components/provider/ThemeProvider.d.ts.map +1 -0
- package/lib/components/provider/ThemeProvider.js +36 -0
- package/lib/components/provider/index.d.ts +3 -0
- package/lib/components/provider/index.d.ts.map +1 -0
- package/lib/components/provider/index.js +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +3 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/{src/types → types}/api.d.ts +1 -1
- package/lib/types/api.d.ts.map +1 -0
- package/lib/types/api.js +1 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +1 -0
- package/lib/{src/types → types}/languages.d.ts +2 -1
- package/lib/types/languages.d.ts.map +1 -0
- package/lib/types/languages.js +15 -0
- package/lib/{src/types → types}/palette.d.ts +2 -1
- package/lib/types/palette.d.ts.map +1 -0
- package/lib/types/palette.js +1 -0
- package/lib/utils/helpers/colorHelpers.d.ts.map +1 -0
- package/lib/{src/utils → utils}/helpers/colorHelpers.js +6 -13
- package/lib/utils/helpers/dateHelpers.d.ts.map +1 -0
- package/lib/{src/utils → utils}/helpers/dateHelpers.js +5 -12
- package/lib/utils/helpers/index.d.ts +4 -0
- package/lib/utils/helpers/index.d.ts.map +1 -0
- package/lib/{src/utils/helpers/index.d.ts → utils/helpers/index.js} +1 -2
- package/lib/{src/utils → utils}/helpers/stringHelpers.d.ts +1 -0
- package/lib/utils/helpers/stringHelpers.d.ts.map +1 -0
- package/lib/utils/helpers/stringHelpers.js +40 -0
- package/lib/{src/utils → utils}/hooks/index.d.ts +1 -0
- package/lib/utils/hooks/index.d.ts.map +1 -0
- package/lib/utils/hooks/index.js +5 -0
- package/lib/utils/hooks/useAPI.d.ts.map +1 -0
- package/lib/utils/hooks/useAPI.js +18 -0
- package/lib/utils/hooks/useLocale.d.ts.map +1 -0
- package/lib/utils/hooks/useLocale.js +9 -0
- package/lib/utils/hooks/usePathname.d.ts +2 -0
- package/lib/utils/hooks/usePathname.d.ts.map +1 -0
- package/lib/utils/hooks/usePathname.js +7 -0
- package/lib/{src/utils → utils}/hooks/usePersistedState.d.ts +2 -1
- package/lib/utils/hooks/usePersistedState.d.ts.map +1 -0
- package/lib/{src/utils → utils}/hooks/usePersistedState.js +18 -20
- package/lib/{src/utils → utils}/hooks/useUserInfo.d.ts +2 -1
- package/lib/utils/hooks/useUserInfo.d.ts.map +1 -0
- package/lib/utils/hooks/useUserInfo.js +25 -0
- package/lib/utils/index.d.ts +5 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +3 -0
- package/lib/utils/middleware/createI18nMiddleware.d.ts +8 -0
- package/lib/utils/middleware/createI18nMiddleware.d.ts.map +1 -0
- package/lib/utils/middleware/createI18nMiddleware.js +35 -0
- package/lib/utils/theme/components/MuiAccordion.d.ts.map +1 -0
- package/lib/{src/utils → utils}/theme/components/MuiAccordion.js +1 -3
- package/lib/utils/theme/components/MuiCard.d.ts.map +1 -0
- package/lib/{src/utils → utils}/theme/components/MuiCard.js +1 -3
- package/lib/utils/theme/components/MuiCardHeader.d.ts.map +1 -0
- package/lib/{src/utils → utils}/theme/components/MuiCardHeader.js +1 -3
- package/lib/utils/theme/components/MuiFormControl.d.ts.map +1 -0
- package/lib/utils/theme/components/MuiFormControl.js +6 -0
- package/lib/utils/theme/components/MuiGrid.d.ts.map +1 -0
- package/lib/utils/theme/components/MuiGrid.js +5 -0
- package/lib/utils/theme/components/MuiPaper.d.ts.map +1 -0
- package/lib/{src/utils → utils}/theme/components/MuiPaper.js +1 -3
- package/lib/utils/theme/components/MuiTypography.d.ts.map +1 -0
- package/lib/utils/theme/components/MuiTypography.js +5 -0
- package/lib/utils/theme/components/index.d.ts.map +1 -0
- package/lib/utils/theme/components/index.js +17 -0
- package/lib/utils/theme/index.d.ts.map +1 -0
- package/lib/utils/theme/index.js +56 -0
- package/lib/{src/utils → utils}/theme/palette/index.d.ts +2 -2
- package/lib/utils/theme/palette/index.d.ts.map +1 -0
- package/lib/utils/theme/palette/index.js +96 -0
- package/lib/utils/theme/typography.d.ts.map +1 -0
- package/lib/{src/utils → utils}/theme/typography.js +1 -3
- package/package.json +50 -42
- package/lib/package.json +0 -85
- package/lib/src/components/buttons/Avatar/Avatar.d.ts.map +0 -1
- package/lib/src/components/buttons/Avatar/Avatar.js +0 -78
- package/lib/src/components/buttons/LanguageSelect/LanguageSelect.d.ts.map +0 -1
- package/lib/src/components/buttons/LanguageSelect/LanguageSelect.js +0 -58
- package/lib/src/components/buttons/ToggleButtonGroup/ToggleButtonGroup.d.ts.map +0 -1
- package/lib/src/components/buttons/ToggleButtonGroup/ToggleButtonGroup.js +0 -44
- package/lib/src/components/buttons/index.d.ts.map +0 -1
- package/lib/src/components/buttons/index.js +0 -9
- package/lib/src/components/display/Accordion/Accordion.d.ts.map +0 -1
- package/lib/src/components/display/Accordion/Accordion.js +0 -26
- package/lib/src/components/display/StyledValue/ImprovementChip.d.ts.map +0 -1
- package/lib/src/components/display/StyledValue/ImprovementChip.js +0 -66
- package/lib/src/components/display/StyledValue/StyledValue.d.ts.map +0 -1
- package/lib/src/components/display/StyledValue/StyledValue.js +0 -86
- package/lib/src/components/display/StyledValue/hooks.d.ts +0 -4
- package/lib/src/components/display/StyledValue/hooks.d.ts.map +0 -1
- package/lib/src/components/display/index.d.ts.map +0 -1
- package/lib/src/components/display/index.js +0 -12
- package/lib/src/components/index.d.ts.map +0 -1
- package/lib/src/components/index.js +0 -16
- package/lib/src/components/layout/MinimalLayout/MinimalLayout.d.ts.map +0 -1
- package/lib/src/components/layout/MinimalLayout/MinimalLayout.js +0 -64
- package/lib/src/components/layout/StandardLayout/StandardLayout.d.ts.map +0 -1
- package/lib/src/components/layout/StandardLayout/StandardLayout.js +0 -74
- package/lib/src/components/layout/assets/DeixLogo.d.ts.map +0 -1
- package/lib/src/components/layout/assets/DeixLogo.js +0 -20
- package/lib/src/components/layout/assets/ServerDown.d.ts.map +0 -1
- package/lib/src/components/layout/assets/ServerDown.js +0 -60
- package/lib/src/components/layout/components/AppLogo/AppLogo.d.ts.map +0 -1
- package/lib/src/components/layout/components/AppLogo/AppLogo.js +0 -30
- package/lib/src/components/layout/components/Footer/Footer.d.ts.map +0 -1
- package/lib/src/components/layout/components/Footer/Footer.js +0 -64
- package/lib/src/components/layout/components/Sidebar/Sidebar.d.ts.map +0 -1
- package/lib/src/components/layout/components/Sidebar/Sidebar.js +0 -237
- package/lib/src/components/layout/components/Topbar/ElevationScroll.d.ts.map +0 -1
- package/lib/src/components/layout/components/Topbar/ElevationScroll.js +0 -17
- package/lib/src/components/layout/components/Topbar/Topbar.d.ts.map +0 -1
- package/lib/src/components/layout/components/Topbar/Topbar.js +0 -61
- package/lib/src/components/layout/components/Topbar/Topbar.styles.d.ts +0 -18
- package/lib/src/components/layout/components/Topbar/Topbar.styles.d.ts.map +0 -1
- package/lib/src/components/layout/components/Topbar/Topbar.styles.js +0 -16
- package/lib/src/components/layout/components/Topline/TopLine.d.ts.map +0 -1
- package/lib/src/components/layout/components/Topline/TopLine.js +0 -18
- package/lib/src/components/layout/index.d.ts.map +0 -1
- package/lib/src/components/layout/index.js +0 -10
- package/lib/src/components/progress/CircularLoading/CircularLoading.d.ts.map +0 -1
- package/lib/src/components/progress/CircularLoading/CircularLoading.js +0 -22
- package/lib/src/components/progress/index.d.ts.map +0 -1
- package/lib/src/components/progress/index.js +0 -8
- package/lib/src/index.d.ts +0 -7
- package/lib/src/index.d.ts.map +0 -1
- package/lib/src/index.js +0 -32
- package/lib/src/types/api.d.ts.map +0 -1
- package/lib/src/types/api.js +0 -2
- package/lib/src/types/index.d.ts.map +0 -1
- package/lib/src/types/index.js +0 -5
- package/lib/src/types/languages.d.ts.map +0 -1
- package/lib/src/types/languages.js +0 -18
- package/lib/src/types/palette.d.ts.map +0 -1
- package/lib/src/types/palette.js +0 -2
- package/lib/src/utils/helpers/colorHelpers.d.ts.map +0 -1
- package/lib/src/utils/helpers/dateHelpers.d.ts.map +0 -1
- package/lib/src/utils/helpers/index.d.ts.map +0 -1
- package/lib/src/utils/helpers/index.js +0 -17
- package/lib/src/utils/helpers/stringHelpers.d.ts.map +0 -1
- package/lib/src/utils/helpers/stringHelpers.js +0 -39
- package/lib/src/utils/hooks/index.d.ts.map +0 -1
- package/lib/src/utils/hooks/index.js +0 -14
- package/lib/src/utils/hooks/useAPI.d.ts.map +0 -1
- package/lib/src/utils/hooks/useAPI.js +0 -23
- package/lib/src/utils/hooks/useLocale.d.ts.map +0 -1
- package/lib/src/utils/hooks/useLocale.js +0 -13
- package/lib/src/utils/hooks/usePersistedState.d.ts.map +0 -1
- package/lib/src/utils/hooks/useUserInfo.d.ts.map +0 -1
- package/lib/src/utils/hooks/useUserInfo.js +0 -32
- package/lib/src/utils/index.d.ts +0 -5
- package/lib/src/utils/index.d.ts.map +0 -1
- package/lib/src/utils/index.js +0 -25
- package/lib/src/utils/provider/PageProvider.d.ts.map +0 -1
- package/lib/src/utils/provider/PageProvider.js +0 -19
- package/lib/src/utils/provider/ThemeProvider.d.ts +0 -9
- package/lib/src/utils/provider/ThemeProvider.d.ts.map +0 -1
- package/lib/src/utils/provider/ThemeProvider.js +0 -47
- package/lib/src/utils/theme/components/MuiAccordion.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiCard.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiCardHeader.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiFormControl.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiFormControl.js +0 -8
- package/lib/src/utils/theme/components/MuiGrid.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiGrid.js +0 -7
- package/lib/src/utils/theme/components/MuiPaper.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiTypography.d.ts.map +0 -1
- package/lib/src/utils/theme/components/MuiTypography.js +0 -7
- package/lib/src/utils/theme/components/index.d.ts.map +0 -1
- package/lib/src/utils/theme/components/index.js +0 -22
- package/lib/src/utils/theme/createEmotionCache.d.ts +0 -2
- package/lib/src/utils/theme/createEmotionCache.d.ts.map +0 -1
- package/lib/src/utils/theme/createEmotionCache.js +0 -11
- package/lib/src/utils/theme/index.d.ts.map +0 -1
- package/lib/src/utils/theme/index.js +0 -85
- package/lib/src/utils/theme/palette/index.d.ts.map +0 -1
- package/lib/src/utils/theme/palette/index.js +0 -100
- package/lib/src/utils/theme/typography.d.ts.map +0 -1
- /package/lib/{src/components → components}/buttons/Avatar/Avatar.d.ts +0 -0
- /package/lib/{src/components → components}/buttons/LanguageSelect/LanguageSelect.d.ts +0 -0
- /package/lib/{src/components → components}/buttons/LanguageSelect/translations.json +0 -0
- /package/lib/{src/components → components}/buttons/ToggleButtonGroup/ToggleButtonGroup.d.ts +0 -0
- /package/lib/{src/components → components}/buttons/index.d.ts +0 -0
- /package/lib/{src/components → components}/display/Accordion/Accordion.d.ts +0 -0
- /package/lib/{src/components → components}/display/StyledValue/ImprovementChip.d.ts +0 -0
- /package/lib/{src/components → components}/display/StyledValue/StyledValue.d.ts +0 -0
- /package/lib/{src/components → components}/display/StyledValue/translations.json +0 -0
- /package/lib/{src/components → components}/display/index.d.ts +0 -0
- /package/lib/{src/components → components}/layout/MinimalLayout/MinimalLayout.d.ts +0 -0
- /package/lib/{src/components → components}/layout/StandardLayout/StandardLayout.d.ts +0 -0
- /package/lib/{src/components → components}/layout/assets/DeixLogo.d.ts +0 -0
- /package/lib/{src/components → components}/layout/assets/DeixLogo.tsx +0 -0
- /package/lib/{src/components → components}/layout/assets/ServerDown.d.ts +0 -0
- /package/lib/{src/components → components}/layout/assets/ServerDown.tsx +0 -0
- /package/lib/{src/components → components}/layout/assets/deix_logo_symbol_minimal.svg +0 -0
- /package/lib/{src/components → components}/layout/assets/undraw_server_down.svg +0 -0
- /package/lib/{src/components → components}/layout/components/AppLogo/AppLogo.d.ts +0 -0
- /package/lib/{src/components → components}/layout/components/Footer/Footer.d.ts +0 -0
- /package/lib/{src/components → components}/layout/components/Sidebar/Sidebar.d.ts +0 -0
- /package/lib/{src/components → components}/layout/components/Topbar/ElevationScroll.d.ts +0 -0
- /package/lib/{src/components → components}/layout/components/Topbar/Topbar.d.ts +0 -0
- /package/lib/{src/components → components}/layout/components/Topline/TopLine.d.ts +0 -0
- /package/lib/{src/components → components}/layout/index.d.ts +0 -0
- /package/lib/{src/components → components}/progress/CircularLoading/CircularLoading.d.ts +0 -0
- /package/lib/{src/components → components}/progress/CircularLoading/translations.json +0 -0
- /package/lib/{src/components → components}/progress/index.d.ts +0 -0
- /package/lib/{src/types → types}/index.d.ts +0 -0
- /package/lib/{src/utils → utils}/helpers/colorHelpers.d.ts +0 -0
- /package/lib/{src/utils → utils}/helpers/dateHelpers.d.ts +0 -0
- /package/lib/{src/utils → utils}/hooks/useAPI.d.ts +0 -0
- /package/lib/{src/utils → utils}/hooks/useLocale.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiAccordion.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiCard.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiCardHeader.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiFormControl.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiGrid.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiPaper.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/MuiTypography.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/components/index.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/index.d.ts +0 -0
- /package/lib/{src/utils → utils}/theme/typography.d.ts +0 -0
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
8
|
-
const NewReleasesOutlined_1 = __importDefault(require("@mui/icons-material/NewReleasesOutlined"));
|
|
9
|
-
const material_1 = require("@mui/material");
|
|
10
|
-
const types_1 = require("../../../types");
|
|
11
|
-
const utils_1 = require("../../../utils");
|
|
12
|
-
const getColor = (delta, tol, isIncreasePositive) => {
|
|
13
|
-
if (delta === undefined) {
|
|
14
|
-
return 'success';
|
|
15
|
-
}
|
|
16
|
-
else if (delta >= tol) {
|
|
17
|
-
switch (isIncreasePositive) {
|
|
18
|
-
case true:
|
|
19
|
-
return 'success';
|
|
20
|
-
case false:
|
|
21
|
-
return 'error';
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
else if (delta <= -tol) {
|
|
25
|
-
switch (isIncreasePositive) {
|
|
26
|
-
case true:
|
|
27
|
-
return 'error';
|
|
28
|
-
case false:
|
|
29
|
-
return 'success';
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
return 'info';
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const getIcon = (delta, tol, size) => {
|
|
37
|
-
if (delta === undefined) {
|
|
38
|
-
return react_1.default.createElement(NewReleasesOutlined_1.default, { fontSize: size });
|
|
39
|
-
}
|
|
40
|
-
else if (delta >= tol) {
|
|
41
|
-
return react_1.default.createElement(icons_material_1.North, { fontSize: size });
|
|
42
|
-
}
|
|
43
|
-
else if (delta <= -tol) {
|
|
44
|
-
return react_1.default.createElement(icons_material_1.South, { fontSize: size });
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
return react_1.default.createElement(icons_material_1.East, { fontSize: size });
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
const ImprovementChip = ({ currentValue, previousValue, stationaryTolerance = 0.01, percentageFormatOptions = {
|
|
51
|
-
style: 'percent',
|
|
52
|
-
minimumFractionDigits: 0,
|
|
53
|
-
maximumFractionDigits: 1,
|
|
54
|
-
}, isIncreasePositive = true, tooltip, size = 'small', color, }) => {
|
|
55
|
-
const locale = (0, utils_1.useLocale)();
|
|
56
|
-
const tooltipString = tooltip && (0, types_1.isStringTranslation)(tooltip) ? tooltip[locale] : tooltip;
|
|
57
|
-
const delta = previousValue !== 0
|
|
58
|
-
? (currentValue - previousValue) / previousValue
|
|
59
|
-
: undefined;
|
|
60
|
-
const deltaString = delta
|
|
61
|
-
? delta.toLocaleString(locale, percentageFormatOptions)
|
|
62
|
-
: 'NEW';
|
|
63
|
-
return (react_1.default.createElement(material_1.Tooltip, { title: tooltipString || '' },
|
|
64
|
-
react_1.default.createElement(material_1.Chip, { icon: getIcon(delta, stationaryTolerance, size), label: deltaString, color: color || getColor(delta, stationaryTolerance, isIncreasePositive), size: size })));
|
|
65
|
-
};
|
|
66
|
-
exports.default = ImprovementChip;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StyledValue.d.ts","sourceRoot":"","sources":["../../../../../src/components/display/StyledValue/StyledValue.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAIL,SAAS,EAIT,eAAe,EAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAuB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxE,OAAwB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG1E,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAMD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,YAAY,CAAC;IAC9C,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,YAAY,CAAC;IACtD,aAAa,CAAC,EAAE,OAAO,CACrB,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,mBAAmB,CACtD,CAAC;IACF,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC;IACrC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,eAAe,CAAC;IACvC,sBAAsB,CAAC,EAAE,eAAe,CAAC;IACzC,sBAAsB,CAAC,EAAE,eAAe,CAAC;IACzC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACzD,oBAAoB,CAAC,EAAE,IAAI,CACzB,OAAO,CAAC,oBAAoB,CAAC,EAC7B,oBAAoB,GAAG,qBAAqB,GAAG,OAAO,CACvD,CAAC;CACH;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6I3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const types_1 = require("../../../types");
|
|
9
|
-
const utils_1 = require("../../../utils");
|
|
10
|
-
const hooks_1 = require("./hooks");
|
|
11
|
-
const ImprovementChip_1 = __importDefault(require("./ImprovementChip"));
|
|
12
|
-
const translations_json_1 = __importDefault(require("./translations.json"));
|
|
13
|
-
const isFetchedValue = (value) => {
|
|
14
|
-
return value.endpoint !== undefined;
|
|
15
|
-
};
|
|
16
|
-
const StyledValue = (props) => {
|
|
17
|
-
const { caption, details, formatOptions = {}, icon, raised = false, framed = false, loading = false, backgroundColor, valueTypographyProps = {
|
|
18
|
-
variant: 'h3',
|
|
19
|
-
color: 'primary',
|
|
20
|
-
}, captionTypographyProps = { variant: 'subtitle2', color: 'textPrimary' }, detailsTypographyProps = { variant: 'caption', color: 'textSecondary' }, cardProps, onCardClick, improvementChipProps = {
|
|
21
|
-
isIncreasePositive: true,
|
|
22
|
-
stationaryTolerance: 0.01,
|
|
23
|
-
}, } = props;
|
|
24
|
-
const locale = (0, utils_1.useLocale)();
|
|
25
|
-
// Value
|
|
26
|
-
const apiClient = (0, utils_1.useAPI)(props.value && isFetchedValue(props.value) ? props.value.baseURL : undefined);
|
|
27
|
-
const { data: value, isLoading: isLoadingValue } = (0, hooks_1.useValue)(apiClient, props.value);
|
|
28
|
-
const { data: previousValue, isLoading: isLoadingPreviousValue } = (0, hooks_1.useValue)(apiClient, props.previousValue);
|
|
29
|
-
const stringValue = typeof value === 'number'
|
|
30
|
-
? value?.toLocaleString(locale, formatOptions)
|
|
31
|
-
: value && (0, utils_1.isValidDate)(value)
|
|
32
|
-
? new Date(value)?.toLocaleString(locale, formatOptions)
|
|
33
|
-
: value;
|
|
34
|
-
const stringPreviousValue = typeof previousValue === 'number'
|
|
35
|
-
? previousValue?.toLocaleString(locale, formatOptions)
|
|
36
|
-
: previousValue && (0, utils_1.isValidDate)(previousValue)
|
|
37
|
-
? new Date(previousValue)?.toLocaleString(locale, formatOptions)
|
|
38
|
-
: previousValue;
|
|
39
|
-
const captionString = (0, types_1.isStringTranslation)(caption)
|
|
40
|
-
? caption[locale]
|
|
41
|
-
: caption;
|
|
42
|
-
const detailsString = details && (0, types_1.isStringTranslation)(details) ? details[locale] : details;
|
|
43
|
-
const cardStyle = {};
|
|
44
|
-
if (!framed) {
|
|
45
|
-
cardStyle['border'] = 'none';
|
|
46
|
-
cardStyle['boxShadow'] = 'none';
|
|
47
|
-
}
|
|
48
|
-
return (react_1.default.createElement(material_1.Card, { ...cardProps, raised: raised, sx: {
|
|
49
|
-
...cardStyle,
|
|
50
|
-
backgroundColor,
|
|
51
|
-
height: '100%',
|
|
52
|
-
p: 0,
|
|
53
|
-
'&:last-child': {
|
|
54
|
-
paddingBottom: 0,
|
|
55
|
-
},
|
|
56
|
-
} },
|
|
57
|
-
react_1.default.createElement(material_1.CardActionArea, { onClick: onCardClick, sx: {
|
|
58
|
-
p: 2,
|
|
59
|
-
'&:last-child': {
|
|
60
|
-
paddingBottom: 2,
|
|
61
|
-
},
|
|
62
|
-
} },
|
|
63
|
-
react_1.default.createElement(material_1.Box, { sx: {
|
|
64
|
-
display: 'flex',
|
|
65
|
-
alignItems: 'center',
|
|
66
|
-
flexWrap: 'wrap',
|
|
67
|
-
flexDirection: 'row',
|
|
68
|
-
justifyContent: 'space-between',
|
|
69
|
-
} },
|
|
70
|
-
icon && react_1.default.createElement(material_1.Box, { sx: { marginRight: 2 } }, icon),
|
|
71
|
-
react_1.default.createElement(material_1.Box, { sx: {
|
|
72
|
-
width: '90%',
|
|
73
|
-
display: 'flex',
|
|
74
|
-
flexWrap: 'wrap',
|
|
75
|
-
flexDirection: 'row-reverse',
|
|
76
|
-
justifyContent: 'space-between',
|
|
77
|
-
alignItems: 'center',
|
|
78
|
-
} },
|
|
79
|
-
previousValue !== undefined &&
|
|
80
|
-
previousValue !== null &&
|
|
81
|
-
stringPreviousValue && (react_1.default.createElement(ImprovementChip_1.default, { currentValue: value, previousValue: previousValue, tooltip: `${stringPreviousValue} ${translations_json_1.default['tooltipPreviousPeriod'][locale]}`, ...improvementChipProps })),
|
|
82
|
-
react_1.default.createElement(material_1.Typography, { ...valueTypographyProps }, loading || isLoadingValue || value === undefined ? (react_1.default.createElement(material_1.Skeleton, null)) : (stringValue)))),
|
|
83
|
-
react_1.default.createElement(material_1.Typography, { ...captionTypographyProps }, captionString),
|
|
84
|
-
details && (react_1.default.createElement(material_1.Typography, { ...detailsTypographyProps }, detailsString)))));
|
|
85
|
-
};
|
|
86
|
-
exports.default = StyledValue;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance } from 'axios';
|
|
2
|
-
import { FetchedValue } from './StyledValue';
|
|
3
|
-
export declare const useValue: (apiClient?: AxiosInstance, value?: number | Date | string | FetchedValue) => import("react-query").UseQueryResult<string | number | Date | undefined, unknown>;
|
|
4
|
-
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../src/components/display/StyledValue/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AA2B7C,eAAO,MAAM,QAAQ,eACP,aAAa,UACjB,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,YAAY,sFAM3C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/display/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC3E,YAAY,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACnE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.StyledValue = exports.ImprovementChip = exports.Accordion = void 0;
|
|
7
|
-
var Accordion_1 = require("./Accordion/Accordion");
|
|
8
|
-
Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return __importDefault(Accordion_1).default; } });
|
|
9
|
-
var ImprovementChip_1 = require("./StyledValue/ImprovementChip");
|
|
10
|
-
Object.defineProperty(exports, "ImprovementChip", { enumerable: true, get: function () { return __importDefault(ImprovementChip_1).default; } });
|
|
11
|
-
var StyledValue_1 = require("./StyledValue/StyledValue");
|
|
12
|
-
Object.defineProperty(exports, "StyledValue", { enumerable: true, get: function () { return __importDefault(StyledValue_1).default; } });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACtE,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACpE,YAAY,EACV,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzD,YAAY,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,YAAY,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CircularLoading = exports.StandardLayout = exports.MinimalLayout = exports.ImprovementChip = exports.StyledValue = exports.Accordion = exports.ToggleButtonGroup = exports.LanguageSelect = exports.Avatar = void 0;
|
|
4
|
-
var buttons_1 = require("./buttons");
|
|
5
|
-
Object.defineProperty(exports, "Avatar", { enumerable: true, get: function () { return buttons_1.Avatar; } });
|
|
6
|
-
Object.defineProperty(exports, "LanguageSelect", { enumerable: true, get: function () { return buttons_1.LanguageSelect; } });
|
|
7
|
-
Object.defineProperty(exports, "ToggleButtonGroup", { enumerable: true, get: function () { return buttons_1.ToggleButtonGroup; } });
|
|
8
|
-
var display_1 = require("./display");
|
|
9
|
-
Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return display_1.Accordion; } });
|
|
10
|
-
Object.defineProperty(exports, "StyledValue", { enumerable: true, get: function () { return display_1.StyledValue; } });
|
|
11
|
-
Object.defineProperty(exports, "ImprovementChip", { enumerable: true, get: function () { return display_1.ImprovementChip; } });
|
|
12
|
-
var layout_1 = require("./layout");
|
|
13
|
-
Object.defineProperty(exports, "MinimalLayout", { enumerable: true, get: function () { return layout_1.MinimalLayout; } });
|
|
14
|
-
Object.defineProperty(exports, "StandardLayout", { enumerable: true, get: function () { return layout_1.StandardLayout; } });
|
|
15
|
-
var progress_1 = require("./progress");
|
|
16
|
-
Object.defineProperty(exports, "CircularLoading", { enumerable: true, get: function () { return progress_1.CircularLoading; } });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MinimalLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/MinimalLayout/MinimalLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASzC,OAAe,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAIlE,UAAU,kBAAkB;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiF/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const router_1 = require("next/router");
|
|
9
|
-
const progress_1 = require("../../progress");
|
|
10
|
-
const ServerDown_1 = __importDefault(require("../assets/ServerDown"));
|
|
11
|
-
const Footer_1 = __importDefault(require("../components/Footer/Footer"));
|
|
12
|
-
const TopLine_1 = __importDefault(require("../components/Topline/TopLine"));
|
|
13
|
-
const translations_json_1 = __importDefault(require("./translations.json"));
|
|
14
|
-
const MinimalLayout = ({ isLoading, isError, error, footer, children, }) => {
|
|
15
|
-
const theme = (0, material_1.useTheme)();
|
|
16
|
-
const router = (0, router_1.useRouter)();
|
|
17
|
-
const locale = router.locale || 'en';
|
|
18
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
19
|
-
react_1.default.createElement(TopLine_1.default, null),
|
|
20
|
-
react_1.default.createElement(material_1.Box, { sx: {
|
|
21
|
-
display: 'flex',
|
|
22
|
-
flexDirection: 'column',
|
|
23
|
-
paddingBottom: '10px',
|
|
24
|
-
minHeight: '100vh',
|
|
25
|
-
width: '100%',
|
|
26
|
-
background: theme.palette.background.default,
|
|
27
|
-
} },
|
|
28
|
-
isLoading && react_1.default.createElement(progress_1.CircularLoading, { locale: locale }),
|
|
29
|
-
!isLoading && isError && (react_1.default.createElement(material_1.Box, { sx: {
|
|
30
|
-
flexGrow: 1,
|
|
31
|
-
maxWidth: '100%',
|
|
32
|
-
overflowX: 'hidden',
|
|
33
|
-
paddingTop: '10px',
|
|
34
|
-
paddingBottom: '10px',
|
|
35
|
-
paddingLeft: '27px',
|
|
36
|
-
paddingRight: '27px',
|
|
37
|
-
} },
|
|
38
|
-
react_1.default.createElement("div", { style: {
|
|
39
|
-
display: 'flex',
|
|
40
|
-
flexDirection: 'column',
|
|
41
|
-
justifyContent: 'center',
|
|
42
|
-
alignItems: 'center',
|
|
43
|
-
height: '100vh',
|
|
44
|
-
} },
|
|
45
|
-
react_1.default.createElement(ServerDown_1.default, { width: 300, height: 300 }),
|
|
46
|
-
react_1.default.createElement(material_1.Typography, { variant: 'h4', color: 'error', align: 'center' }, translations_json_1.default['errorPageLoad'][locale]),
|
|
47
|
-
error && (react_1.default.createElement(material_1.Typography, { variant: 'body1', color: 'error', align: 'center' },
|
|
48
|
-
"Error: ",
|
|
49
|
-
error.message))))),
|
|
50
|
-
!isLoading && (react_1.default.createElement(material_1.Box, { sx: {
|
|
51
|
-
flexGrow: 1,
|
|
52
|
-
// display: 'flex',
|
|
53
|
-
// flexDirection: 'column',
|
|
54
|
-
// height: '100%',
|
|
55
|
-
maxWidth: '100%',
|
|
56
|
-
overflowX: 'hidden',
|
|
57
|
-
paddingTop: '10px',
|
|
58
|
-
paddingBottom: '10px',
|
|
59
|
-
paddingLeft: '27px',
|
|
60
|
-
paddingRight: '27px',
|
|
61
|
-
} }, children)),
|
|
62
|
-
react_1.default.createElement(Footer_1.default, { ...footer }))));
|
|
63
|
-
};
|
|
64
|
-
exports.default = MinimalLayout;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StandardLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/StandardLayout/StandardLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYzC,OAAgB,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAe,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAgB,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAIrE,OAAO,EAAE,QAAQ,EAAU,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D,UAAU,mBAAmB;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAiHjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const router_1 = require("next/router");
|
|
9
|
-
const progress_1 = require("../../progress");
|
|
10
|
-
const AppLogo_1 = __importDefault(require("../components/AppLogo/AppLogo"));
|
|
11
|
-
const Footer_1 = __importDefault(require("../components/Footer/Footer"));
|
|
12
|
-
const Sidebar_1 = __importDefault(require("../components/Sidebar/Sidebar"));
|
|
13
|
-
const Topbar_1 = __importDefault(require("../components/Topbar/Topbar"));
|
|
14
|
-
const TopLine_1 = __importDefault(require("../components/Topline/TopLine"));
|
|
15
|
-
const utils_1 = require("../../../utils");
|
|
16
|
-
const ServerDown_1 = __importDefault(require("../assets/ServerDown"));
|
|
17
|
-
const translations_json_1 = __importDefault(require("./translations.json"));
|
|
18
|
-
const StandardLayout = ({ isLoading, isError, error, appLogo, footer, sidebarLinks = [], avatar, languages, children, }) => {
|
|
19
|
-
const theme = (0, material_1.useTheme)();
|
|
20
|
-
const router = (0, router_1.useRouter)();
|
|
21
|
-
const locale = router.locale || 'en';
|
|
22
|
-
// Get if we are dealing with mobile client
|
|
23
|
-
const isMobile = !(0, material_1.useMediaQuery)(theme.breakpoints.up('lg'));
|
|
24
|
-
// Persist user preference about the sidebar
|
|
25
|
-
const [sidebarOpen, setSidebarOpen] = (0, utils_1.usePersistedState)('sidebarOpen', isMobile ? false : true);
|
|
26
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
27
|
-
sidebarLinks && sidebarLinks.length > 0 && (react_1.default.createElement(Sidebar_1.default, { links: sidebarLinks, onClose: () => setSidebarOpen(false), open: sidebarOpen, isMobile: isMobile, logo: appLogo ? react_1.default.createElement(AppLogo_1.default, { ...appLogo, open: sidebarOpen }) : react_1.default.createElement(react_1.default.Fragment, null), locale: locale })),
|
|
28
|
-
react_1.default.createElement(material_1.Box, { sx: {
|
|
29
|
-
display: 'flex',
|
|
30
|
-
flexDirection: 'column',
|
|
31
|
-
paddingBottom: '10px',
|
|
32
|
-
minHeight: '100vh',
|
|
33
|
-
width: '100%',
|
|
34
|
-
background: theme.palette.background.default,
|
|
35
|
-
} },
|
|
36
|
-
react_1.default.createElement(TopLine_1.default, null),
|
|
37
|
-
react_1.default.createElement(Topbar_1.default, { hasSidebar: sidebarLinks && sidebarLinks.length > 0, onSidebarClose: () => setSidebarOpen(false), onSidebarOpen: () => setSidebarOpen(true), open: sidebarOpen, locale: locale, languages: languages, avatar: avatar }),
|
|
38
|
-
isLoading && react_1.default.createElement(progress_1.CircularLoading, { locale: locale }),
|
|
39
|
-
!isLoading && isError && (react_1.default.createElement(material_1.Box, { sx: {
|
|
40
|
-
flexGrow: 1,
|
|
41
|
-
// display: 'flex',
|
|
42
|
-
// flexDirection: 'column',
|
|
43
|
-
// height: '100%',
|
|
44
|
-
maxWidth: '100%',
|
|
45
|
-
overflowX: 'hidden',
|
|
46
|
-
paddingTop: '10px',
|
|
47
|
-
paddingBottom: '10px',
|
|
48
|
-
paddingLeft: '27px',
|
|
49
|
-
paddingRight: '27px',
|
|
50
|
-
} },
|
|
51
|
-
react_1.default.createElement("div", { style: {
|
|
52
|
-
display: 'flex',
|
|
53
|
-
flexDirection: 'column',
|
|
54
|
-
justifyContent: 'center',
|
|
55
|
-
alignItems: 'center',
|
|
56
|
-
height: '100vh',
|
|
57
|
-
} },
|
|
58
|
-
react_1.default.createElement(ServerDown_1.default, { width: 300, height: 300 }),
|
|
59
|
-
react_1.default.createElement(material_1.Typography, { variant: 'h4', color: 'error', align: 'center' }, translations_json_1.default['errorPageLoad'][locale]),
|
|
60
|
-
error && (react_1.default.createElement(material_1.Typography, { variant: 'body1', color: 'error', align: 'center' },
|
|
61
|
-
"Error: ",
|
|
62
|
-
error.message))))),
|
|
63
|
-
!isLoading && (react_1.default.createElement(material_1.Box, { sx: {
|
|
64
|
-
// flexGrow: 1,
|
|
65
|
-
maxWidth: '100%',
|
|
66
|
-
overflowX: 'hidden',
|
|
67
|
-
paddingTop: '10px',
|
|
68
|
-
paddingBottom: '10px',
|
|
69
|
-
paddingLeft: '27px',
|
|
70
|
-
paddingRight: '27px',
|
|
71
|
-
} }, children)),
|
|
72
|
-
react_1.default.createElement(Footer_1.default, { ...footer }))));
|
|
73
|
-
};
|
|
74
|
-
exports.default = StandardLayout;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeixLogo.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/assets/DeixLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,SAAS;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA0BjC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const DeixLogo = ({ width = 14, height = 14 }) => {
|
|
8
|
-
return (react_1.default.createElement("svg", { width: width, height: height, version: '1.1', viewBox: '0 0 65.057 65.039' },
|
|
9
|
-
react_1.default.createElement("g", { transform: 'translate(-20.345 -128.17)' },
|
|
10
|
-
react_1.default.createElement("g", { transform: 'translate(149.84 124)', fill: '#c13302', fillRule: 'evenodd' },
|
|
11
|
-
react_1.default.createElement("circle", { cx: '-114.55', cy: '19.115', r: '2.451' }),
|
|
12
|
-
react_1.default.createElement("path", { d: 'm-114.55 4.1682a14.947 14.947 0 0 0-14.947 14.947 14.947 14.947 0 0 0 14.947 14.947 14.947 14.947 0 0 0 8.2698-2.5063l-5.5201-5.5201a7.4498 7.4498 0 0 1-2.7497 0.52917 7.4498 7.4498 0 0 1-7.4502-7.4497 7.4498 7.4498 0 0 1 7.4502-7.4502 7.4498 7.4498 0 0 1 7.4497 7.4502 7.4498 7.4498 0 0 1-0.52916 2.7492l5.5206 5.5206a14.947 14.947 0 0 0 2.5063-8.2698 14.947 14.947 0 0 0-14.947-14.947z' }),
|
|
13
|
-
react_1.default.createElement("circle", { transform: 'scale(-1,1)', cx: '79.388', cy: '19.115', r: '2.451' }),
|
|
14
|
-
react_1.default.createElement("path", { d: 'm-79.388 4.1682a14.947 14.947 0 0 1 14.947 14.947 14.947 14.947 0 0 1-14.947 14.947 14.947 14.947 0 0 1-8.2698-2.5063l5.5201-5.5201a7.4498 7.4498 0 0 0 2.7497 0.52917 7.4498 7.4498 0 0 0 7.4502-7.4497 7.4498 7.4498 0 0 0-7.4502-7.4502 7.4498 7.4498 0 0 0-7.4497 7.4502 7.4498 7.4498 0 0 0 0.52917 2.7492l-5.5206 5.5206a14.947 14.947 0 0 1-2.5063-8.2698 14.947 14.947 0 0 1 14.947-14.947z' }),
|
|
15
|
-
react_1.default.createElement("circle", { transform: 'scale(1,-1)', cx: '-114.55', cy: '-54.26', r: '2.451' }),
|
|
16
|
-
react_1.default.createElement("path", { d: 'm-114.55 69.207a14.947 14.947 0 0 1-14.947-14.947 14.947 14.947 0 0 1 14.947-14.947 14.947 14.947 0 0 1 8.2698 2.5063l-5.5201 5.5201a7.4498 7.4498 0 0 0-2.7497-0.52917 7.4498 7.4498 0 0 0-7.4502 7.4497 7.4498 7.4498 0 0 0 7.4502 7.4502 7.4498 7.4498 0 0 0 7.4497-7.4502 7.4498 7.4498 0 0 0-0.52917-2.7492l5.5206-5.5206a14.947 14.947 0 0 1 2.5063 8.2698 14.947 14.947 0 0 1-14.947 14.947z' }),
|
|
17
|
-
react_1.default.createElement("path", { transform: 'scale(-1)', d: 'm81.839-54.26a2.451 2.451 0 0 1-2.451 2.451 2.451 2.451 0 0 1-2.451-2.451 2.451 2.451 0 0 1 2.451-2.451 2.451 2.451 0 0 1 2.451 2.451z', strokeWidth: '.098039' }),
|
|
18
|
-
react_1.default.createElement("path", { d: 'm-79.388 69.207a14.947 14.947 0 0 0 14.947-14.947 14.947 14.947 0 0 0-14.947-14.947 14.947 14.947 0 0 0-8.2698 2.5063l5.5201 5.5201a7.4498 7.4498 0 0 1 2.7497-0.52917 7.4498 7.4498 0 0 1 7.4502 7.4497 7.4498 7.4498 0 0 1-7.4502 7.4502 7.4498 7.4498 0 0 1-7.4497-7.4502 7.4498 7.4498 0 0 1 0.52917-2.7492l-5.5206-5.5206a14.947 14.947 0 0 0-2.5063 8.2698 14.947 14.947 0 0 0 14.947 14.947z' })))));
|
|
19
|
-
};
|
|
20
|
-
exports.default = DeixLogo;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServerDown.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/assets/ServerDown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,SAAS;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA6NnC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const ServerDown = ({ width = 1120, height = 700 }) => {
|
|
8
|
-
return (react_1.default.createElement("svg", { width: width, height: height, viewBox: '0 0 1119.60911 699' },
|
|
9
|
-
react_1.default.createElement("circle", { cx: '292.60911', cy: '213', r: '213', fill: '#f2f2f2' }),
|
|
10
|
-
react_1.default.createElement("path", { d: 'M31.39089,151.64237c0,77.49789,48.6181,140.20819,108.70073,140.20819', transform: 'translate(-31.39089 -100.5)', fill: '#2f2e41' }),
|
|
11
|
-
react_1.default.createElement("path", { d: 'M140.09162,291.85056c0-78.36865,54.255-141.78356,121.30372-141.78356', transform: 'translate(-31.39089 -100.5)', fill: '#c13302' }),
|
|
12
|
-
react_1.default.createElement("path", { d: 'M70.77521,158.66768c0,73.61476,31.00285,133.18288,69.31641,133.18288', transform: 'translate(-31.39089 -100.5)', fill: '#c13302' }),
|
|
13
|
-
react_1.default.createElement("path", { d: 'M140.09162,291.85056c0-100.13772,62.7103-181.16788,140.20819-181.16788', transform: 'translate(-31.39089 -100.5)', fill: '#2f2e41' }),
|
|
14
|
-
react_1.default.createElement("path", { d: 'M117.22379,292.83905s15.41555-.47479,20.06141-3.783,23.713-7.2585,24.86553-1.95278,23.16671,26.38821,5.76263,26.5286-40.43935-2.711-45.07627-5.53549S117.22379,292.83905,117.22379,292.83905Z', transform: 'translate(-31.39089 -100.5)', fill: '#a8a8a8' }),
|
|
15
|
-
react_1.default.createElement("path", { d: 'M168.224,311.78489c-17.40408.14042-40.43933-2.71094-45.07626-5.53548-3.53126-2.151-4.93843-9.86945-5.40926-13.43043-.32607.014-.51463.02-.51463.02s.97638,12.43276,5.61331,15.2573,27.67217,5.67589,45.07626,5.53547c5.02386-.04052,6.7592-1.82793,6.66391-4.47526C173.87935,310.756,171.96329,311.75474,168.224,311.78489Z', transform: 'translate(-31.39089 -100.5)', opacity: '0.2' }),
|
|
16
|
-
react_1.default.createElement("ellipse", { cx: '198.60911', cy: '424.5', rx: '187', ry: '25.43993', fill: '#3f3d56' }),
|
|
17
|
-
react_1.default.createElement("ellipse", { cx: '198.60911', cy: '424.5', rx: '157', ry: '21.35866', opacity: '0.1' }),
|
|
18
|
-
react_1.default.createElement("ellipse", { cx: '836.60911', cy: '660.5', rx: '283', ry: '38.5', fill: '#3f3d56' }),
|
|
19
|
-
react_1.default.createElement("ellipse", { cx: '310.60911', cy: '645.5', rx: '170', ry: '23.12721', fill: '#3f3d56' }),
|
|
20
|
-
react_1.default.createElement("path", { d: 'M494,726.5c90,23,263-30,282-90', transform: 'translate(-31.39089 -100.5)', fill: 'none', stroke: '#2f2e41', strokeMiterlimit: '10', strokeWidth: '2' }),
|
|
21
|
-
react_1.default.createElement("path", { d: 'M341,359.5s130-36,138,80-107,149-17,172', transform: 'translate(-31.39089 -100.5)', fill: 'none', stroke: '#2f2e41', strokeMiterlimit: '10', strokeWidth: '2' }),
|
|
22
|
-
react_1.default.createElement("path", { d: 'M215.40233,637.78332s39.0723-10.82,41.47675,24.04449-32.15951,44.78287-5.10946,51.69566', transform: 'translate(-31.39089 -100.5)', fill: 'none', stroke: '#2f2e41', strokeMiterlimit: '10', strokeWidth: '2' }),
|
|
23
|
-
react_1.default.createElement("path", { d: 'M810.09554,663.73988,802.218,714.03505s-38.78182,20.60284-11.51335,21.20881,155.73324,0,155.73324,0,24.84461,0-14.54318-21.81478l-7.87756-52.719Z', transform: 'translate(-31.39089 -100.5)', fill: '#2f2e41' }),
|
|
24
|
-
react_1.default.createElement("path", { d: 'M785.21906,734.69812c6.193-5.51039,16.9989-11.252,16.9989-11.252l7.87756-50.2952,113.9216.10717,7.87756,49.582c9.185,5.08711,14.8749,8.987,18.20362,11.97818,5.05882-1.15422,10.58716-5.44353-18.20362-21.38921l-7.87756-52.719-113.9216,3.02983L802.218,714.03506S769.62985,731.34968,785.21906,734.69812Z', transform: 'translate(-31.39089 -100.5)', opacity: '0.1' }),
|
|
25
|
-
react_1.default.createElement("rect", { x: '578.43291', y: '212.68859', width: '513.25314', height: '357.51989', rx: '18.04568', fill: '#2f2e41' }),
|
|
26
|
-
react_1.default.createElement("rect", { x: '595.70294', y: '231.77652', width: '478.71308', height: '267.83694', fill: '#3f3d56' }),
|
|
27
|
-
react_1.default.createElement("circle", { cx: '835.05948', cy: '223.29299', r: '3.02983', fill: '#f2f2f2' }),
|
|
28
|
-
react_1.default.createElement("path", { d: 'M1123.07694,621.32226V652.6628a18.04341,18.04341,0,0,1-18.04568,18.04568H627.86949A18.04341,18.04341,0,0,1,609.8238,652.6628V621.32226Z', transform: 'translate(-31.39089 -100.5)', fill: '#2f2e41' }),
|
|
29
|
-
react_1.default.createElement("polygon", { points: '968.978 667.466 968.978 673.526 642.968 673.526 642.968 668.678 643.417 667.466 651.452 645.651 962.312 645.651 968.978 667.466', fill: '#2f2e41' }),
|
|
30
|
-
react_1.default.createElement("path", { d: 'M1125.828,762.03359c-.59383,2.539-2.83591,5.21743-7.90178,7.75032-18.179,9.08949-55.1429-2.42386-55.1429-2.42386s-28.4804-4.84773-28.4804-17.573a22.72457,22.72457,0,0,1,2.49658-1.48459c7.64294-4.04351,32.98449-14.02122,77.9177.42248a18.73921,18.73921,0,0,1,8.54106,5.59715C1125.07908,756.45353,1126.50669,759.15715,1125.828,762.03359Z', transform: 'translate(-31.39089 -100.5)', fill: '#2f2e41' }),
|
|
31
|
-
react_1.default.createElement("path", { d: 'M1125.828,762.03359c-22.251,8.526-42.0843,9.1622-62.43871-4.975-10.26507-7.12617-19.59089-8.88955-26.58979-8.75618,7.64294-4.04351,32.98449-14.02122,77.9177.42248a18.73921,18.73921,0,0,1,8.54106,5.59715C1125.07908,756.45353,1126.50669,759.15715,1125.828,762.03359Z', transform: 'translate(-31.39089 -100.5)', opacity: '0.1' }),
|
|
32
|
-
react_1.default.createElement("ellipse", { cx: '1066.53846', cy: '654.13477', rx: '7.87756', ry: '2.42386', fill: '#f2f2f2' }),
|
|
33
|
-
react_1.default.createElement("circle", { cx: '835.05948', cy: '545.66686', r: '11.51335', fill: '#f2f2f2' }),
|
|
34
|
-
react_1.default.createElement("polygon", { points: '968.978 667.466 968.978 673.526 642.968 673.526 642.968 668.678 643.417 667.466 968.978 667.466', opacity: '0.1' }),
|
|
35
|
-
react_1.default.createElement("rect", { x: '108.60911', y: '159', width: '208', height: '242', fill: '#2f2e41' }),
|
|
36
|
-
react_1.default.createElement("rect", { x: '87.60911', y: '135', width: '250', height: '86', fill: '#3f3d56' }),
|
|
37
|
-
react_1.default.createElement("rect", { x: '87.60911', y: '237', width: '250', height: '86', fill: '#3f3d56' }),
|
|
38
|
-
react_1.default.createElement("rect", { x: '87.60911', y: '339', width: '250', height: '86', fill: '#3f3d56' }),
|
|
39
|
-
react_1.default.createElement("rect", { x: '271.60911', y: '150', width: '16', height: '16', fill: '#c13302', opacity: '0.4' }),
|
|
40
|
-
react_1.default.createElement("rect", { x: '294.60911', y: '150', width: '16', height: '16', fill: '#c13302', opacity: '0.8' }),
|
|
41
|
-
react_1.default.createElement("rect", { x: '317.60911', y: '150', width: '16', height: '16', fill: '#c13302' }),
|
|
42
|
-
react_1.default.createElement("rect", { x: '271.60911', y: '251', width: '16', height: '16', fill: '#c13302', opacity: '0.4' }),
|
|
43
|
-
react_1.default.createElement("rect", { x: '294.60911', y: '251', width: '16', height: '16', fill: '#c13302', opacity: '0.8' }),
|
|
44
|
-
react_1.default.createElement("rect", { x: '317.60911', y: '251', width: '16', height: '16', fill: '#c13302' }),
|
|
45
|
-
react_1.default.createElement("rect", { x: '271.60911', y: '352', width: '16', height: '16', fill: '#c13302', opacity: '0.4' }),
|
|
46
|
-
react_1.default.createElement("rect", { x: '294.60911', y: '352', width: '16', height: '16', fill: '#c13302', opacity: '0.8' }),
|
|
47
|
-
react_1.default.createElement("rect", { x: '317.60911', y: '352', width: '16', height: '16', fill: '#c13302' }),
|
|
48
|
-
react_1.default.createElement("circle", { cx: '316.60911', cy: '538', r: '79', fill: '#2f2e41' }),
|
|
49
|
-
react_1.default.createElement("rect", { x: '280.60911', y: '600', width: '24', height: '43', fill: '#2f2e41' }),
|
|
50
|
-
react_1.default.createElement("rect", { x: '328.60911', y: '600', width: '24', height: '43', fill: '#2f2e41' }),
|
|
51
|
-
react_1.default.createElement("ellipse", { cx: '300.60911', cy: '643.5', rx: '20', ry: '7.5', fill: '#2f2e41' }),
|
|
52
|
-
react_1.default.createElement("ellipse", { cx: '348.60911', cy: '642.5', rx: '20', ry: '7.5', fill: '#2f2e41' }),
|
|
53
|
-
react_1.default.createElement("circle", { cx: '318.60911', cy: '518', r: '27', fill: '#fff' }),
|
|
54
|
-
react_1.default.createElement("circle", { cx: '318.60911', cy: '518', r: '9', fill: '#3f3d56' }),
|
|
55
|
-
react_1.default.createElement("path", { d: 'M271.36733,565.03228c-6.37889-28.56758,14.01185-57.43392,45.544-64.47477s62.2651,10.41,68.644,38.9776-14.51861,39.10379-46.05075,46.14464S277.74622,593.59986,271.36733,565.03228Z', transform: 'translate(-31.39089 -100.5)', fill: '#c13302' }),
|
|
56
|
-
react_1.default.createElement("ellipse", { cx: '417.21511', cy: '611.34365', rx: '39.5', ry: '12.40027', transform: 'translate(-238.28665 112.98044) rotate(-23.17116)', fill: '#2f2e41' }),
|
|
57
|
-
react_1.default.createElement("ellipse", { cx: '269.21511', cy: '664.34365', rx: '39.5', ry: '12.40027', transform: 'translate(-271.07969 59.02084) rotate(-23.17116)', fill: '#2f2e41' }),
|
|
58
|
-
react_1.default.createElement("path", { d: 'M394,661.5c0,7.732-19.90861,23-42,23s-43-14.268-43-22,20.90861-6,43-6S394,653.768,394,661.5Z', transform: 'translate(-31.39089 -100.5)', fill: '#fff' })));
|
|
59
|
-
};
|
|
60
|
-
exports.default = ServerDown;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppLogo.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/components/AppLogo/AppLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAM/C,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;CAChC;AACD,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAsCnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const image_1 = __importDefault(require("next/image"));
|
|
8
|
-
const material_1 = require("@mui/material");
|
|
9
|
-
const material_2 = require("@mui/material");
|
|
10
|
-
const package_json_1 = __importDefault(require("../../../../../package.json"));
|
|
11
|
-
const AppLogo = ({ name = package_json_1.default.name.charAt(0).toUpperCase() + package_json_1.default.name.slice(1), open, logoSource, }) => {
|
|
12
|
-
const muiTheme = (0, material_2.useTheme)();
|
|
13
|
-
return (react_1.default.createElement("div", { style: {
|
|
14
|
-
display: 'flex',
|
|
15
|
-
flexWrap: 'wrap',
|
|
16
|
-
alignItems: 'center',
|
|
17
|
-
justifyContent: 'center',
|
|
18
|
-
marginBottom: 4,
|
|
19
|
-
} },
|
|
20
|
-
logoSource && (react_1.default.createElement(image_1.default, { src: logoSource, alt: 'logo', width: 36, height: 36 })),
|
|
21
|
-
open && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
22
|
-
react_1.default.createElement(material_1.Typography, { variant: 'h4', sx: {
|
|
23
|
-
background: muiTheme.palette.gradient.main,
|
|
24
|
-
backgroundClip: 'text',
|
|
25
|
-
WebkitBackgroundClip: 'text',
|
|
26
|
-
WebkitTextFillColor: 'transparent',
|
|
27
|
-
marginLeft: '8px',
|
|
28
|
-
} }, name)))));
|
|
29
|
-
};
|
|
30
|
-
exports.default = AppLogo;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/components/Footer/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASzC,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA6EjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const react_query_1 = require("react-query");
|
|
9
|
-
const package_json_1 = __importDefault(require("../../../../../package.json"));
|
|
10
|
-
const index_1 = require("../../../../utils/index");
|
|
11
|
-
const DeixLogo_1 = __importDefault(require("../../assets/DeixLogo"));
|
|
12
|
-
const Footer = ({ logo = react_1.default.createElement(DeixLogo_1.default, null), text = 'Deix Srl', textURL = 'https://deixsrl.com', uiInfo = { name: package_json_1.default.name, version: `v${package_json_1.default.version}` }, apiURL, children, }) => {
|
|
13
|
-
const muiTheme = (0, material_1.useTheme)();
|
|
14
|
-
// Get App Info (name and version)
|
|
15
|
-
// Get API info (name and version) from backend
|
|
16
|
-
const apiClient = (0, index_1.useAPI)(apiURL);
|
|
17
|
-
const getAPIInfo = async () => {
|
|
18
|
-
if (apiClient) {
|
|
19
|
-
const { data } = await apiClient.get('info');
|
|
20
|
-
return data;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const { data: apiInfo } = (0, react_query_1.useQuery)('api-info', getAPIInfo, {
|
|
24
|
-
keepPreviousData: true,
|
|
25
|
-
staleTime: Infinity,
|
|
26
|
-
cacheTime: Infinity,
|
|
27
|
-
});
|
|
28
|
-
return (react_1.default.createElement("footer", { style: { marginTop: 'auto' } },
|
|
29
|
-
react_1.default.createElement(material_1.Box, { sx: {
|
|
30
|
-
display: 'flex',
|
|
31
|
-
flexDirection: 'column',
|
|
32
|
-
background: muiTheme.palette.background.default,
|
|
33
|
-
width: '100%',
|
|
34
|
-
} },
|
|
35
|
-
react_1.default.createElement(react_1.default.Fragment, null,
|
|
36
|
-
react_1.default.createElement("div", { style: {
|
|
37
|
-
display: 'flex',
|
|
38
|
-
flexWrap: 'wrap',
|
|
39
|
-
justifyContent: 'center',
|
|
40
|
-
alignItems: 'center',
|
|
41
|
-
width: '100%',
|
|
42
|
-
textAlign: 'center',
|
|
43
|
-
paddingBottom: 1,
|
|
44
|
-
} },
|
|
45
|
-
logo && logo,
|
|
46
|
-
react_1.default.createElement(material_1.Typography, { variant: 'caption', style: {
|
|
47
|
-
alignSelf: 'center',
|
|
48
|
-
color: muiTheme.palette.text.secondary,
|
|
49
|
-
marginLeft: '5px',
|
|
50
|
-
} },
|
|
51
|
-
react_1.default.createElement("a", { href: textURL, target: '_blank', rel: 'noreferrer', style: {
|
|
52
|
-
textDecoration: 'none',
|
|
53
|
-
color: muiTheme.palette.text.secondary,
|
|
54
|
-
} }, text),
|
|
55
|
-
' ',
|
|
56
|
-
"| ",
|
|
57
|
-
uiInfo.name,
|
|
58
|
-
" ",
|
|
59
|
-
uiInfo.version,
|
|
60
|
-
' ',
|
|
61
|
-
apiInfo ? `(${apiInfo.name} ${apiInfo.version})` : '')),
|
|
62
|
-
children))));
|
|
63
|
-
};
|
|
64
|
-
exports.default = Footer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/components/Sidebar/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAY,MAAM,OAAO,CAAC;AAuBtD,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAEhE,OAAO,EAEL,MAAM,EACN,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAAC;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,YAAY,CAAC;IAC9C;;OAEG;IACH,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;CAC1B;AACD,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA6VnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|