@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,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.commonStart = exports.stringToColor = exports.toTitleCase = exports.snakeToCamel = exports.camelToSnake = void 0;
|
|
4
|
-
const camelToSnake = (inputString) => inputString.replace(/[\w]([A-Z])/g, (m) => `${m[0]}-${m[1]}`).toLowerCase();
|
|
5
|
-
exports.camelToSnake = camelToSnake;
|
|
6
|
-
const snakeToCamel = (inputString) => inputString.replace(/([-_][a-z])/g, (subStr) => subStr.toUpperCase().replace('-', '').replace('_', ''));
|
|
7
|
-
exports.snakeToCamel = snakeToCamel;
|
|
8
|
-
const toTitleCase = (inputString, sep = '_') => inputString
|
|
9
|
-
.split(sep)
|
|
10
|
-
.map((word) => word[0].toUpperCase() + word.slice(1).toLowerCase())
|
|
11
|
-
.join(' ');
|
|
12
|
-
exports.toTitleCase = toTitleCase;
|
|
13
|
-
const stringToColor = (string) => {
|
|
14
|
-
let hash = 0;
|
|
15
|
-
let i;
|
|
16
|
-
/* eslint-disable no-bitwise */
|
|
17
|
-
for (i = 0; i < string.length; i += 1) {
|
|
18
|
-
hash = string.charCodeAt(i) + ((hash << 5) - hash);
|
|
19
|
-
}
|
|
20
|
-
let color = '#';
|
|
21
|
-
for (i = 0; i < 3; i += 1) {
|
|
22
|
-
const value = (hash >> (i * 8)) & 0xff;
|
|
23
|
-
color += `00${value.toString(16)}`.slice(-2);
|
|
24
|
-
}
|
|
25
|
-
/* eslint-enable no-bitwise */
|
|
26
|
-
return color;
|
|
27
|
-
};
|
|
28
|
-
exports.stringToColor = stringToColor;
|
|
29
|
-
const commonStart = (strings) => {
|
|
30
|
-
const sortedList = strings.slice().sort();
|
|
31
|
-
const first = sortedList[0];
|
|
32
|
-
const last = sortedList[sortedList.length - 1];
|
|
33
|
-
let i = 0;
|
|
34
|
-
while (i < first.length && first.charAt(i) === last.charAt(i)) {
|
|
35
|
-
i++;
|
|
36
|
-
}
|
|
37
|
-
return first.substring(0, i);
|
|
38
|
-
};
|
|
39
|
-
exports.commonStart = commonStart;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,14 +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.usePersistedState = exports.useLocale = exports.useUserInfo = exports.useAPI = void 0;
|
|
7
|
-
var useAPI_1 = require("./useAPI");
|
|
8
|
-
Object.defineProperty(exports, "useAPI", { enumerable: true, get: function () { return __importDefault(useAPI_1).default; } });
|
|
9
|
-
var useUserInfo_1 = require("./useUserInfo");
|
|
10
|
-
Object.defineProperty(exports, "useUserInfo", { enumerable: true, get: function () { return useUserInfo_1.useUserInfo; } });
|
|
11
|
-
var useLocale_1 = require("./useLocale");
|
|
12
|
-
Object.defineProperty(exports, "useLocale", { enumerable: true, get: function () { return useLocale_1.useLocale; } });
|
|
13
|
-
var usePersistedState_1 = require("./usePersistedState");
|
|
14
|
-
Object.defineProperty(exports, "usePersistedState", { enumerable: true, get: function () { return __importDefault(usePersistedState_1).default; } });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAPI.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/useAPI.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE7C;;;;;GAKG;AACH,QAAA,MAAM,MAAM,aAAc,MAAM,KAAG,aAAa,GAAG,SASlD,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,23 +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 axios_1 = __importDefault(require("axios"));
|
|
7
|
-
/**
|
|
8
|
-
* Create an Axios instance.
|
|
9
|
-
*
|
|
10
|
-
* @param {string} baseURL the API address.
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
const useAPI = (baseURL) => {
|
|
14
|
-
if (baseURL) {
|
|
15
|
-
return axios_1.default.create({
|
|
16
|
-
baseURL,
|
|
17
|
-
headers: {
|
|
18
|
-
Accept: 'application/json',
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
exports.default = useAPI;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/useLocale.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,SAAS,QAAO,MAK5B,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useLocale = void 0;
|
|
4
|
-
const router_1 = require("next/router");
|
|
5
|
-
/**
|
|
6
|
-
* Gets the internationalization locale
|
|
7
|
-
*/
|
|
8
|
-
const useLocale = () => {
|
|
9
|
-
const router = (0, router_1.useRouter)();
|
|
10
|
-
const locale = router.locale || 'en';
|
|
11
|
-
return locale;
|
|
12
|
-
};
|
|
13
|
-
exports.useLocale = useLocale;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePersistedState.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/usePersistedState.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,iBAAS,iBAAiB,CAAC,CAAC,EAC1B,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,CAAC,EACf,OAAO,GAAE,OAAO,GAAG,SAAmB,GACrC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,CAwDzB;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUserInfo.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/useUserInfo.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAqBD,eAAO,MAAM,WAAW,+DAKpB,CAAC"}
|
|
@@ -1,32 +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.useUserInfo = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const react_query_1 = require("react-query");
|
|
9
|
-
const getUserInfo = async () => {
|
|
10
|
-
const fetch = axios_1.default
|
|
11
|
-
.get('/oauth2/userinfo')
|
|
12
|
-
.then((result) => {
|
|
13
|
-
console.log('User Info', result.data);
|
|
14
|
-
return result.data;
|
|
15
|
-
})
|
|
16
|
-
.catch((err) => {
|
|
17
|
-
console.error('Could not get user info');
|
|
18
|
-
console.error(err);
|
|
19
|
-
return {
|
|
20
|
-
email: '',
|
|
21
|
-
user: 'anonymous',
|
|
22
|
-
preferredUsername: 'anonymous',
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
return await fetch;
|
|
26
|
-
};
|
|
27
|
-
const useUserInfo = () => (0, react_query_1.useQuery)('user-info', () => getUserInfo(), {
|
|
28
|
-
keepPreviousData: true,
|
|
29
|
-
staleTime: Infinity,
|
|
30
|
-
cacheTime: Infinity,
|
|
31
|
-
});
|
|
32
|
-
exports.useUserInfo = useUserInfo;
|
package/lib/src/utils/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { camelToSnake, colorToRgb, commonStart, dateDiff, getTextColor, getTimeStr, hexToRgb, isValidDate, stringToColor, toLocalStandardDateString, toTitleCase, } from './helpers';
|
|
2
|
-
export { useAPI, useLocale, usePersistedState, useUserInfo } from './hooks';
|
|
3
|
-
export type { UserInfo } from './hooks';
|
|
4
|
-
export { default as PageProvider } from './provider/PageProvider';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,WAAW,EACX,aAAa,EACb,yBAAyB,EACzB,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC5E,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC"}
|
package/lib/src/utils/index.js
DELETED
|
@@ -1,25 +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.PageProvider = exports.useUserInfo = exports.usePersistedState = exports.useLocale = exports.useAPI = exports.toTitleCase = exports.toLocalStandardDateString = exports.stringToColor = exports.isValidDate = exports.hexToRgb = exports.getTimeStr = exports.getTextColor = exports.dateDiff = exports.commonStart = exports.colorToRgb = exports.camelToSnake = void 0;
|
|
7
|
-
var helpers_1 = require("./helpers");
|
|
8
|
-
Object.defineProperty(exports, "camelToSnake", { enumerable: true, get: function () { return helpers_1.camelToSnake; } });
|
|
9
|
-
Object.defineProperty(exports, "colorToRgb", { enumerable: true, get: function () { return helpers_1.colorToRgb; } });
|
|
10
|
-
Object.defineProperty(exports, "commonStart", { enumerable: true, get: function () { return helpers_1.commonStart; } });
|
|
11
|
-
Object.defineProperty(exports, "dateDiff", { enumerable: true, get: function () { return helpers_1.dateDiff; } });
|
|
12
|
-
Object.defineProperty(exports, "getTextColor", { enumerable: true, get: function () { return helpers_1.getTextColor; } });
|
|
13
|
-
Object.defineProperty(exports, "getTimeStr", { enumerable: true, get: function () { return helpers_1.getTimeStr; } });
|
|
14
|
-
Object.defineProperty(exports, "hexToRgb", { enumerable: true, get: function () { return helpers_1.hexToRgb; } });
|
|
15
|
-
Object.defineProperty(exports, "isValidDate", { enumerable: true, get: function () { return helpers_1.isValidDate; } });
|
|
16
|
-
Object.defineProperty(exports, "stringToColor", { enumerable: true, get: function () { return helpers_1.stringToColor; } });
|
|
17
|
-
Object.defineProperty(exports, "toLocalStandardDateString", { enumerable: true, get: function () { return helpers_1.toLocalStandardDateString; } });
|
|
18
|
-
Object.defineProperty(exports, "toTitleCase", { enumerable: true, get: function () { return helpers_1.toTitleCase; } });
|
|
19
|
-
var hooks_1 = require("./hooks");
|
|
20
|
-
Object.defineProperty(exports, "useAPI", { enumerable: true, get: function () { return hooks_1.useAPI; } });
|
|
21
|
-
Object.defineProperty(exports, "useLocale", { enumerable: true, get: function () { return hooks_1.useLocale; } });
|
|
22
|
-
Object.defineProperty(exports, "usePersistedState", { enumerable: true, get: function () { return hooks_1.usePersistedState; } });
|
|
23
|
-
Object.defineProperty(exports, "useUserInfo", { enumerable: true, get: function () { return hooks_1.useUserInfo; } });
|
|
24
|
-
var PageProvider_1 = require("./provider/PageProvider");
|
|
25
|
-
Object.defineProperty(exports, "PageProvider", { enumerable: true, get: function () { return __importDefault(PageProvider_1).default; } });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageProvider.d.ts","sourceRoot":"","sources":["../../../../src/utils/provider/PageProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAiB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAQ/C,UAAU,iBAAiB;IACzB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,WAAW,CAAC,EAAE,cAAc,CAAC;CAC9B;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAgB7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,19 +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 next_themes_1 = require("next-themes");
|
|
8
|
-
const head_1 = __importDefault(require("next/head"));
|
|
9
|
-
const react_2 = require("@emotion/react");
|
|
10
|
-
const createEmotionCache_1 = __importDefault(require("../theme/createEmotionCache"));
|
|
11
|
-
const ThemeProvider_1 = __importDefault(require("./ThemeProvider"));
|
|
12
|
-
// Client-side cache, shared for the whole session of the user in the browser.
|
|
13
|
-
const clientSideEmotionCache = (0, createEmotionCache_1.default)();
|
|
14
|
-
const PageProvider = ({ children, emotionCache = clientSideEmotionCache, lightPalette, darkPalette, }) => (react_1.default.createElement(next_themes_1.ThemeProvider, null,
|
|
15
|
-
react_1.default.createElement(react_2.CacheProvider, { value: emotionCache },
|
|
16
|
-
react_1.default.createElement(head_1.default, null,
|
|
17
|
-
react_1.default.createElement("meta", { name: 'viewport', content: 'initial-scale=1, width=device-width' })),
|
|
18
|
-
react_1.default.createElement(ThemeProvider_1.default, { lightPalette: lightPalette, darkPalette: darkPalette }, children))));
|
|
19
|
-
exports.default = PageProvider;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PaletteOptions } from '@mui/material';
|
|
3
|
-
declare const ThemeProvider: React.FC<{
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
lightPalette?: PaletteOptions;
|
|
6
|
-
darkPalette?: PaletteOptions;
|
|
7
|
-
}>;
|
|
8
|
-
export default ThemeProvider;
|
|
9
|
-
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/utils/provider/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,EAGL,cAAc,EAEf,MAAM,eAAe,CAAC;AAMvB,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,WAAW,CAAC,EAAE,cAAc,CAAC;CAC9B,CA8BA,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const react_1 = __importStar(require("react"));
|
|
27
|
-
const next_themes_1 = require("next-themes");
|
|
28
|
-
const material_1 = require("@mui/material");
|
|
29
|
-
const useLocale_1 = require("../hooks/useLocale");
|
|
30
|
-
const theme_1 = require("../theme");
|
|
31
|
-
const ThemeProvider = ({ children, lightPalette, darkPalette }) => {
|
|
32
|
-
// Dark/Light Mode
|
|
33
|
-
const { resolvedTheme } = (0, next_themes_1.useTheme)();
|
|
34
|
-
const [currentTheme, setCurrentTheme] = (0, react_1.useState)((0, theme_1.adaptiveTheme)('light', 'en', lightPalette, darkPalette));
|
|
35
|
-
// Locale
|
|
36
|
-
const locale = (0, useLocale_1.useLocale)();
|
|
37
|
-
(0, react_1.useEffect)(() => {
|
|
38
|
-
if (resolvedTheme) {
|
|
39
|
-
setCurrentTheme((0, theme_1.adaptiveTheme)(resolvedTheme, locale, lightPalette, darkPalette));
|
|
40
|
-
}
|
|
41
|
-
}, [lightPalette, darkPalette, resolvedTheme, locale]);
|
|
42
|
-
return (react_1.default.createElement(material_1.ThemeProvider, { theme: currentTheme },
|
|
43
|
-
react_1.default.createElement(material_1.CssBaseline, null),
|
|
44
|
-
react_1.default.createElement(material_1.GlobalStyles, { styles: theme_1.globalStyles }),
|
|
45
|
-
children));
|
|
46
|
-
};
|
|
47
|
-
exports.default = ThemeProvider;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MuiAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/utils/theme/components/MuiAccordion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,wBAmBE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MuiCard.d.ts","sourceRoot":"","sources":["../../../../../src/utils/theme/components/MuiCard.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wBASE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MuiCardHeader.d.ts","sourceRoot":"","sources":["../../../../../src/utils/theme/components/MuiCardHeader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wBAcE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MuiFormControl.d.ts","sourceRoot":"","sources":["../../../../../src/utils/theme/components/MuiFormControl.ts"],"names":[],"mappings":";;;;;;AAAA,wBAKE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MuiGrid.d.ts","sourceRoot":"","sources":["../../../../../src/utils/theme/components/MuiGrid.ts"],"names":[],"mappings":";;;;;AAAA,wBAIE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MuiPaper.d.ts","sourceRoot":"","sources":["../../../../../src/utils/theme/components/MuiPaper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wBAeE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MuiTypography.d.ts","sourceRoot":"","sources":["../../../../../src/utils/theme/components/MuiTypography.ts"],"names":[],"mappings":";;;;;AAAA,wBAIE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/theme/components/index.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQf,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,22 +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 MuiAccordion_1 = __importDefault(require("./MuiAccordion"));
|
|
7
|
-
const MuiCard_1 = __importDefault(require("./MuiCard"));
|
|
8
|
-
const MuiCardHeader_1 = __importDefault(require("./MuiCardHeader"));
|
|
9
|
-
const MuiFormControl_1 = __importDefault(require("./MuiFormControl"));
|
|
10
|
-
const MuiGrid_1 = __importDefault(require("./MuiGrid"));
|
|
11
|
-
const MuiPaper_1 = __importDefault(require("./MuiPaper"));
|
|
12
|
-
const MuiTypography_1 = __importDefault(require("./MuiTypography"));
|
|
13
|
-
const components = {
|
|
14
|
-
MuiAccordion: MuiAccordion_1.default,
|
|
15
|
-
MuiCard: MuiCard_1.default,
|
|
16
|
-
MuiCardHeader: MuiCardHeader_1.default,
|
|
17
|
-
MuiFormControl: MuiFormControl_1.default,
|
|
18
|
-
MuiGrid: MuiGrid_1.default,
|
|
19
|
-
MuiPaper: MuiPaper_1.default,
|
|
20
|
-
MuiTypography: MuiTypography_1.default,
|
|
21
|
-
};
|
|
22
|
-
exports.default = components;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createEmotionCache.d.ts","sourceRoot":"","sources":["../../../../src/utils/theme/createEmotionCache.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,kBAAkB,0CAEzC"}
|
|
@@ -1,11 +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 cache_1 = __importDefault(require("@emotion/cache"));
|
|
7
|
-
// prepend: true moves MUI styles to the top of the <head> so they're loaded first.
|
|
8
|
-
function createEmotionCache() {
|
|
9
|
-
return (0, cache_1.default)({ key: 'css', prepend: true });
|
|
10
|
-
}
|
|
11
|
-
exports.default = createEmotionCache;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAe,KAAK,EAAgB,MAAM,sBAAsB,CAAC;AAIxE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAmB,YAAY,EAAE,MAAM,WAAW,CAAC;AAc1D,eAAO,MAAM,aAAa,SAClB,YAAY,UACV,MAAM,iBACC,cAAc,gBACf,cAAc,KAC3B,KAWF,CAAC;AAEF,eAAO,MAAM,YAAY,2CA8BxB,CAAC"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.globalStyles = exports.adaptiveTheme = void 0;
|
|
30
|
-
const styles_1 = require("@mui/material/styles");
|
|
31
|
-
const locales = __importStar(require("@mui/material/locale"));
|
|
32
|
-
const system_1 = require("@mui/system");
|
|
33
|
-
const components_1 = __importDefault(require("./components"));
|
|
34
|
-
const palette_1 = require("./palette");
|
|
35
|
-
const typography_1 = __importDefault(require("./typography"));
|
|
36
|
-
const localeMapping = {
|
|
37
|
-
en: 'enUS',
|
|
38
|
-
fr: 'frFR',
|
|
39
|
-
de: 'deDE',
|
|
40
|
-
it: 'itIT',
|
|
41
|
-
};
|
|
42
|
-
const adaptiveTheme = (mode, locale, lightPalette, darkPalette) => {
|
|
43
|
-
const theme = {
|
|
44
|
-
palette: (0, palette_1.adaptivePalette)(mode, lightPalette, darkPalette),
|
|
45
|
-
typography: typography_1.default,
|
|
46
|
-
components: components_1.default,
|
|
47
|
-
zIndex: {
|
|
48
|
-
appBar: 1200,
|
|
49
|
-
drawer: 1100,
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
return (0, styles_1.createTheme)(theme, locales[localeMapping[locale]]);
|
|
53
|
-
};
|
|
54
|
-
exports.adaptiveTheme = adaptiveTheme;
|
|
55
|
-
exports.globalStyles = (0, system_1.css) `
|
|
56
|
-
:root {
|
|
57
|
-
display: flex;
|
|
58
|
-
}
|
|
59
|
-
body {
|
|
60
|
-
width: 100%;
|
|
61
|
-
}
|
|
62
|
-
a {
|
|
63
|
-
text-decoration: none;
|
|
64
|
-
}
|
|
65
|
-
html {
|
|
66
|
-
height: 100%;
|
|
67
|
-
-webkit-font-smoothing: antialiased;
|
|
68
|
-
-moz-osx-font-smoothing: grayscale;
|
|
69
|
-
}
|
|
70
|
-
#__next {
|
|
71
|
-
width: 100%;
|
|
72
|
-
height: 100%;
|
|
73
|
-
margin: 0px;
|
|
74
|
-
padding: 0px;
|
|
75
|
-
box-sizing: border-box;
|
|
76
|
-
display: flex;
|
|
77
|
-
overflow-y: auto;
|
|
78
|
-
// /* hide scrollbar for IE, Edge and Firefox */
|
|
79
|
-
// -ms-overflow-style: none;
|
|
80
|
-
// scrollbar-width: none;
|
|
81
|
-
}
|
|
82
|
-
// ::-webkit-scrollbar {
|
|
83
|
-
// display: none;
|
|
84
|
-
// }
|
|
85
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/theme/palette/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;AAE/D,eAAO,MAAM,aAAa,EAAE,YAAsB,CAAC;AAEnD,eAAO,MAAM,mBAAmB,EAAE,cA2CjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAyChC,CAAC;AAEF,eAAO,MAAM,eAAe,SACpB,YAAY,iBACH,cAAc,gBACf,cAAc,KAC3B,cAQF,CAAC"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.adaptivePalette = exports.defaultDarkPalette = exports.defaultLightPalette = exports.DEFAULT_THEME = void 0;
|
|
4
|
-
exports.DEFAULT_THEME = "light";
|
|
5
|
-
exports.defaultLightPalette = {
|
|
6
|
-
mode: "light",
|
|
7
|
-
gradient: {
|
|
8
|
-
main: `linear-gradient(90deg, #008080, #00283D)`,
|
|
9
|
-
},
|
|
10
|
-
primary: {
|
|
11
|
-
main: "#008080",
|
|
12
|
-
},
|
|
13
|
-
secondary: {
|
|
14
|
-
main: "#E2634E",
|
|
15
|
-
},
|
|
16
|
-
success: {
|
|
17
|
-
main: "#26B540",
|
|
18
|
-
},
|
|
19
|
-
info: {
|
|
20
|
-
main: "#2466F4",
|
|
21
|
-
},
|
|
22
|
-
warning: {
|
|
23
|
-
main: "#EA8A04",
|
|
24
|
-
},
|
|
25
|
-
error: {
|
|
26
|
-
main: "#D3343F",
|
|
27
|
-
},
|
|
28
|
-
background: {
|
|
29
|
-
default: "#fafafa",
|
|
30
|
-
paper: "#ffffff",
|
|
31
|
-
},
|
|
32
|
-
text: {
|
|
33
|
-
secondary: "rgba(0,0,0,0.54)",
|
|
34
|
-
primary: "rgba(0,0,0,0.87)",
|
|
35
|
-
disabled: "rgba(0,0,0,0.38)",
|
|
36
|
-
},
|
|
37
|
-
divider: "rgba(0,0,0,0.12)",
|
|
38
|
-
linkNotActive: {
|
|
39
|
-
main: "#afafaf",
|
|
40
|
-
},
|
|
41
|
-
sidebar: {
|
|
42
|
-
main: "#fafafa",
|
|
43
|
-
contrastText: "#008080",
|
|
44
|
-
light: "#afafaf",
|
|
45
|
-
dark: "#00283D",
|
|
46
|
-
},
|
|
47
|
-
topbar: { main: "#fafafa", contrastText: "#008080" },
|
|
48
|
-
};
|
|
49
|
-
exports.defaultDarkPalette = {
|
|
50
|
-
mode: "dark",
|
|
51
|
-
gradient: {
|
|
52
|
-
main: `linear-gradient(90deg, #2CB2A7, #C6F8E7)`,
|
|
53
|
-
},
|
|
54
|
-
primary: {
|
|
55
|
-
main: "#2CB2A7",
|
|
56
|
-
},
|
|
57
|
-
secondary: {
|
|
58
|
-
main: "#E2634E",
|
|
59
|
-
},
|
|
60
|
-
success: {
|
|
61
|
-
main: "#26B540",
|
|
62
|
-
},
|
|
63
|
-
info: {
|
|
64
|
-
main: "#2466F4",
|
|
65
|
-
},
|
|
66
|
-
warning: {
|
|
67
|
-
main: "#EA8A04",
|
|
68
|
-
},
|
|
69
|
-
error: {
|
|
70
|
-
main: "#D3343F",
|
|
71
|
-
},
|
|
72
|
-
background: {
|
|
73
|
-
default: "#303030",
|
|
74
|
-
paper: "#424242",
|
|
75
|
-
},
|
|
76
|
-
text: {
|
|
77
|
-
primary: "#ffffff",
|
|
78
|
-
secondary: "rgba(255,255,255,0.7)",
|
|
79
|
-
disabled: "rgba(255,255,255,0.5)",
|
|
80
|
-
},
|
|
81
|
-
divider: "rgba(255,255,255,0.12)",
|
|
82
|
-
linkNotActive: { main: "#afafaf" },
|
|
83
|
-
sidebar: {
|
|
84
|
-
main: "#303030",
|
|
85
|
-
contrastText: "#2CB2A7",
|
|
86
|
-
dark: "#000000",
|
|
87
|
-
light: "#afafaf",
|
|
88
|
-
},
|
|
89
|
-
topbar: { main: "#303030", contrastText: "#ffffff" },
|
|
90
|
-
};
|
|
91
|
-
const adaptivePalette = (mode, lightPalette, darkPalette) => {
|
|
92
|
-
let light = exports.defaultLightPalette;
|
|
93
|
-
let dark = exports.defaultDarkPalette;
|
|
94
|
-
if (lightPalette !== undefined && darkPalette !== undefined) {
|
|
95
|
-
light = lightPalette;
|
|
96
|
-
dark = darkPalette;
|
|
97
|
-
}
|
|
98
|
-
return mode === "light" ? light : dark;
|
|
99
|
-
};
|
|
100
|
-
exports.adaptivePalette = adaptivePalette;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../../src/utils/theme/typography.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEV,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|