@deix/rossini-core 0.4.2 → 0.5.1

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.
Files changed (116) hide show
  1. package/README.md +1 -11
  2. package/lib/package.json +47 -36
  3. package/lib/src/components/buttons/Avatar/Avatar.d.ts.map +1 -1
  4. package/lib/src/components/buttons/Avatar/Avatar.js +59 -31
  5. package/lib/src/components/buttons/LanguageSelect/LanguageSelect.js +39 -34
  6. package/lib/src/components/buttons/ToggleButtonGroup/ToggleButtonGroup.js +37 -13
  7. package/lib/src/components/buttons/index.js +9 -3
  8. package/lib/src/components/display/Accordion/Accordion.d.ts.map +1 -1
  9. package/lib/src/components/display/Accordion/Accordion.js +23 -41
  10. package/lib/src/components/display/StyledValue/ImprovementChip.d.ts +13 -0
  11. package/lib/src/components/display/StyledValue/ImprovementChip.d.ts.map +1 -0
  12. package/lib/src/components/display/StyledValue/ImprovementChip.js +33 -0
  13. package/lib/src/components/display/StyledValue/StyledValue.d.ts +30 -0
  14. package/lib/src/components/display/StyledValue/StyledValue.d.ts.map +1 -0
  15. package/lib/src/components/display/StyledValue/StyledValue.js +67 -0
  16. package/lib/src/components/display/StyledValue/hooks.d.ts +4 -0
  17. package/lib/src/components/display/StyledValue/hooks.d.ts.map +1 -0
  18. package/lib/src/components/display/StyledValue/hooks.js +32 -0
  19. package/lib/src/components/display/index.d.ts +4 -0
  20. package/lib/src/components/display/index.d.ts.map +1 -1
  21. package/lib/src/components/display/index.js +12 -1
  22. package/lib/src/components/index.d.ts +4 -4
  23. package/lib/src/components/index.d.ts.map +1 -1
  24. package/lib/src/components/index.js +16 -4
  25. package/lib/src/components/layout/MinimalLayout/MinimalLayout.d.ts.map +1 -1
  26. package/lib/src/components/layout/MinimalLayout/MinimalLayout.js +28 -36
  27. package/lib/src/components/layout/StandardLayout/StandardLayout.d.ts +5 -0
  28. package/lib/src/components/layout/StandardLayout/StandardLayout.d.ts.map +1 -1
  29. package/lib/src/components/layout/StandardLayout/StandardLayout.js +36 -44
  30. package/lib/src/components/layout/assets/DeixLogo.d.ts +8 -0
  31. package/lib/src/components/layout/assets/DeixLogo.d.ts.map +1 -0
  32. package/lib/src/components/layout/assets/DeixLogo.js +20 -0
  33. package/lib/src/components/layout/assets/DeixLogo.tsx +36 -0
  34. package/lib/src/components/layout/assets/ServerDown.d.ts +8 -0
  35. package/lib/src/components/layout/assets/ServerDown.d.ts.map +1 -0
  36. package/lib/src/components/layout/assets/ServerDown.js +60 -0
  37. package/lib/src/components/layout/assets/ServerDown.tsx +231 -0
  38. package/lib/src/components/layout/components/AppLogo/AppLogo.js +17 -13
  39. package/lib/src/components/layout/components/Footer/Footer.d.ts +11 -4
  40. package/lib/src/components/layout/components/Footer/Footer.d.ts.map +1 -1
  41. package/lib/src/components/layout/components/Footer/Footer.js +34 -71
  42. package/lib/src/components/layout/components/Sidebar/Sidebar.d.ts.map +1 -1
  43. package/lib/src/components/layout/components/Sidebar/Sidebar.js +111 -90
  44. package/lib/src/components/layout/components/Topbar/ElevationScroll.d.ts.map +1 -1
  45. package/lib/src/components/layout/components/Topbar/ElevationScroll.js +11 -7
  46. package/lib/src/components/layout/components/Topbar/Topbar.d.ts +9 -1
  47. package/lib/src/components/layout/components/Topbar/Topbar.d.ts.map +1 -1
  48. package/lib/src/components/layout/components/Topbar/Topbar.js +59 -44
  49. package/lib/src/components/layout/components/Topbar/Topbar.styles.d.ts +2 -2
  50. package/lib/src/components/layout/components/Topbar/Topbar.styles.js +15 -7
  51. package/lib/src/components/layout/components/Topline/TopLine.js +11 -6
  52. package/lib/src/components/layout/index.js +10 -2
  53. package/lib/src/components/progress/CircularLoading/CircularLoading.d.ts +6 -2
  54. package/lib/src/components/progress/CircularLoading/CircularLoading.d.ts.map +1 -1
  55. package/lib/src/components/progress/CircularLoading/CircularLoading.js +15 -9
  56. package/lib/src/components/progress/index.d.ts +1 -2
  57. package/lib/src/components/progress/index.d.ts.map +1 -1
  58. package/lib/src/components/progress/index.js +8 -2
  59. package/lib/src/index.d.ts +3 -3
  60. package/lib/src/index.d.ts.map +1 -1
  61. package/lib/src/index.js +32 -3
  62. package/lib/src/types/api.js +2 -1
  63. package/lib/src/types/index.d.ts +1 -1
  64. package/lib/src/types/index.d.ts.map +1 -1
  65. package/lib/src/types/index.js +5 -1
  66. package/lib/src/types/languages.js +6 -2
  67. package/lib/src/types/palette.d.ts.map +1 -1
  68. package/lib/src/types/palette.js +2 -1
  69. package/lib/src/utils/helpers/colorHelpers.js +16 -11
  70. package/lib/src/utils/helpers/dateHelpers.js +24 -17
  71. package/lib/src/utils/helpers/index.js +17 -3
  72. package/lib/src/utils/helpers/stringHelpers.js +25 -26
  73. package/lib/src/utils/hooks/index.js +14 -4
  74. package/lib/src/utils/hooks/useAPI.d.ts +1 -1
  75. package/lib/src/utils/hooks/useAPI.d.ts.map +1 -1
  76. package/lib/src/utils/hooks/useAPI.js +16 -9
  77. package/lib/src/utils/hooks/useKeycloak.d.ts +1 -1
  78. package/lib/src/utils/hooks/useKeycloak.d.ts.map +1 -1
  79. package/lib/src/utils/hooks/useKeycloak.js +28 -67
  80. package/lib/src/utils/hooks/useLocale.d.ts.map +1 -1
  81. package/lib/src/utils/hooks/useLocale.js +8 -4
  82. package/lib/src/utils/hooks/usePersistedState.d.ts +1 -1
  83. package/lib/src/utils/hooks/usePersistedState.d.ts.map +1 -1
  84. package/lib/src/utils/hooks/usePersistedState.js +21 -15
  85. package/lib/src/utils/index.js +25 -3
  86. package/lib/src/utils/provider/PageProvider.d.ts.map +1 -1
  87. package/lib/src/utils/provider/PageProvider.js +18 -16
  88. package/lib/src/utils/provider/ThemeProvider.js +41 -17
  89. package/lib/src/utils/theme/components/MuiAccordion.js +3 -1
  90. package/lib/src/utils/theme/components/MuiCard.js +3 -1
  91. package/lib/src/utils/theme/components/MuiCardHeader.js +3 -1
  92. package/lib/src/utils/theme/components/MuiFormControl.js +3 -1
  93. package/lib/src/utils/theme/components/MuiGrid.js +3 -1
  94. package/lib/src/utils/theme/components/MuiPaper.js +3 -1
  95. package/lib/src/utils/theme/components/MuiTypography.js +3 -1
  96. package/lib/src/utils/theme/components/index.d.ts +2 -2
  97. package/lib/src/utils/theme/components/index.d.ts.map +1 -1
  98. package/lib/src/utils/theme/components/index.js +21 -15
  99. package/lib/src/utils/theme/createEmotionCache.js +9 -3
  100. package/lib/src/utils/theme/index.d.ts +2 -1
  101. package/lib/src/utils/theme/index.d.ts.map +1 -1
  102. package/lib/src/utils/theme/index.js +73 -17
  103. package/lib/src/utils/theme/palette/index.d.ts.map +1 -1
  104. package/lib/src/utils/theme/palette/index.js +24 -22
  105. package/lib/src/utils/theme/typography.js +4 -2
  106. package/lib/tsconfig.tsbuildinfo +1 -0
  107. package/package.json +47 -36
  108. package/lib/src/components/progress/DotWaveLoading/DotWaveLoading.d.ts +0 -5
  109. package/lib/src/components/progress/DotWaveLoading/DotWaveLoading.d.ts.map +0 -1
  110. package/lib/src/components/progress/DotWaveLoading/DotWaveLoading.js +0 -18
  111. package/lib/src/components/progress/DotWaveLoading/translations.json +0 -8
  112. package/lib/src/components/progress/types.d.ts +0 -5
  113. package/lib/src/components/progress/types.d.ts.map +0 -1
  114. package/lib/src/components/progress/types.js +0 -1
  115. package/lib/src/utils/theme/palette/defaultColors.json +0 -68
  116. package/lib/tsconfig-lib.tsbuildinfo +0 -1
@@ -0,0 +1,231 @@
1
+ import React from 'react';
2
+
3
+ interface SizeProps {
4
+ width?: number;
5
+ height?: number;
6
+ }
7
+
8
+ const ServerDown: React.FC<SizeProps> = ({ width = 1120, height = 700 }) => {
9
+ return (
10
+ <svg width={width} height={height} viewBox='0 0 1119.60911 699'>
11
+ <circle cx='292.60911' cy='213' r='213' fill='#f2f2f2' />
12
+ <path
13
+ d='M31.39089,151.64237c0,77.49789,48.6181,140.20819,108.70073,140.20819'
14
+ transform='translate(-31.39089 -100.5)'
15
+ fill='#2f2e41'
16
+ />
17
+ <path
18
+ d='M140.09162,291.85056c0-78.36865,54.255-141.78356,121.30372-141.78356'
19
+ transform='translate(-31.39089 -100.5)'
20
+ fill='#c13302'
21
+ />
22
+ <path
23
+ d='M70.77521,158.66768c0,73.61476,31.00285,133.18288,69.31641,133.18288'
24
+ transform='translate(-31.39089 -100.5)'
25
+ fill='#c13302'
26
+ />
27
+ <path
28
+ d='M140.09162,291.85056c0-100.13772,62.7103-181.16788,140.20819-181.16788'
29
+ transform='translate(-31.39089 -100.5)'
30
+ fill='#2f2e41'
31
+ />
32
+ <path
33
+ 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'
34
+ transform='translate(-31.39089 -100.5)'
35
+ fill='#a8a8a8'
36
+ />
37
+ <path
38
+ 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'
39
+ transform='translate(-31.39089 -100.5)'
40
+ opacity='0.2'
41
+ />
42
+ <ellipse
43
+ cx='198.60911'
44
+ cy='424.5'
45
+ rx='187'
46
+ ry='25.43993'
47
+ fill='#3f3d56'
48
+ />
49
+ <ellipse cx='198.60911' cy='424.5' rx='157' ry='21.35866' opacity='0.1' />
50
+ <ellipse cx='836.60911' cy='660.5' rx='283' ry='38.5' fill='#3f3d56' />
51
+ <ellipse
52
+ cx='310.60911'
53
+ cy='645.5'
54
+ rx='170'
55
+ ry='23.12721'
56
+ fill='#3f3d56'
57
+ />
58
+ <path
59
+ d='M494,726.5c90,23,263-30,282-90'
60
+ transform='translate(-31.39089 -100.5)'
61
+ fill='none'
62
+ stroke='#2f2e41'
63
+ strokeMiterlimit='10'
64
+ strokeWidth='2'
65
+ />
66
+ <path
67
+ d='M341,359.5s130-36,138,80-107,149-17,172'
68
+ transform='translate(-31.39089 -100.5)'
69
+ fill='none'
70
+ stroke='#2f2e41'
71
+ strokeMiterlimit='10'
72
+ strokeWidth='2'
73
+ />
74
+ <path
75
+ d='M215.40233,637.78332s39.0723-10.82,41.47675,24.04449-32.15951,44.78287-5.10946,51.69566'
76
+ transform='translate(-31.39089 -100.5)'
77
+ fill='none'
78
+ stroke='#2f2e41'
79
+ strokeMiterlimit='10'
80
+ strokeWidth='2'
81
+ />
82
+ <path
83
+ 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'
84
+ transform='translate(-31.39089 -100.5)'
85
+ fill='#2f2e41'
86
+ />
87
+ <path
88
+ 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'
89
+ transform='translate(-31.39089 -100.5)'
90
+ opacity='0.1'
91
+ />
92
+ <rect
93
+ x='578.43291'
94
+ y='212.68859'
95
+ width='513.25314'
96
+ height='357.51989'
97
+ rx='18.04568'
98
+ fill='#2f2e41'
99
+ />
100
+ <rect
101
+ x='595.70294'
102
+ y='231.77652'
103
+ width='478.71308'
104
+ height='267.83694'
105
+ fill='#3f3d56'
106
+ />
107
+ <circle cx='835.05948' cy='223.29299' r='3.02983' fill='#f2f2f2' />
108
+ <path
109
+ 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'
110
+ transform='translate(-31.39089 -100.5)'
111
+ fill='#2f2e41'
112
+ />
113
+ <polygon
114
+ 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'
115
+ fill='#2f2e41'
116
+ />
117
+ <path
118
+ 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'
119
+ transform='translate(-31.39089 -100.5)'
120
+ fill='#2f2e41'
121
+ />
122
+ <path
123
+ 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'
124
+ transform='translate(-31.39089 -100.5)'
125
+ opacity='0.1'
126
+ />
127
+ <ellipse
128
+ cx='1066.53846'
129
+ cy='654.13477'
130
+ rx='7.87756'
131
+ ry='2.42386'
132
+ fill='#f2f2f2'
133
+ />
134
+ <circle cx='835.05948' cy='545.66686' r='11.51335' fill='#f2f2f2' />
135
+ <polygon
136
+ 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'
137
+ opacity='0.1'
138
+ />
139
+ <rect x='108.60911' y='159' width='208' height='242' fill='#2f2e41' />
140
+ <rect x='87.60911' y='135' width='250' height='86' fill='#3f3d56' />
141
+ <rect x='87.60911' y='237' width='250' height='86' fill='#3f3d56' />
142
+ <rect x='87.60911' y='339' width='250' height='86' fill='#3f3d56' />
143
+ <rect
144
+ x='271.60911'
145
+ y='150'
146
+ width='16'
147
+ height='16'
148
+ fill='#c13302'
149
+ opacity='0.4'
150
+ />
151
+ <rect
152
+ x='294.60911'
153
+ y='150'
154
+ width='16'
155
+ height='16'
156
+ fill='#c13302'
157
+ opacity='0.8'
158
+ />
159
+ <rect x='317.60911' y='150' width='16' height='16' fill='#c13302' />
160
+ <rect
161
+ x='271.60911'
162
+ y='251'
163
+ width='16'
164
+ height='16'
165
+ fill='#c13302'
166
+ opacity='0.4'
167
+ />
168
+ <rect
169
+ x='294.60911'
170
+ y='251'
171
+ width='16'
172
+ height='16'
173
+ fill='#c13302'
174
+ opacity='0.8'
175
+ />
176
+ <rect x='317.60911' y='251' width='16' height='16' fill='#c13302' />
177
+ <rect
178
+ x='271.60911'
179
+ y='352'
180
+ width='16'
181
+ height='16'
182
+ fill='#c13302'
183
+ opacity='0.4'
184
+ />
185
+ <rect
186
+ x='294.60911'
187
+ y='352'
188
+ width='16'
189
+ height='16'
190
+ fill='#c13302'
191
+ opacity='0.8'
192
+ />
193
+ <rect x='317.60911' y='352' width='16' height='16' fill='#c13302' />
194
+ <circle cx='316.60911' cy='538' r='79' fill='#2f2e41' />
195
+ <rect x='280.60911' y='600' width='24' height='43' fill='#2f2e41' />
196
+ <rect x='328.60911' y='600' width='24' height='43' fill='#2f2e41' />
197
+ <ellipse cx='300.60911' cy='643.5' rx='20' ry='7.5' fill='#2f2e41' />
198
+ <ellipse cx='348.60911' cy='642.5' rx='20' ry='7.5' fill='#2f2e41' />
199
+ <circle cx='318.60911' cy='518' r='27' fill='#fff' />
200
+ <circle cx='318.60911' cy='518' r='9' fill='#3f3d56' />
201
+ <path
202
+ 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'
203
+ transform='translate(-31.39089 -100.5)'
204
+ fill='#c13302'
205
+ />
206
+ <ellipse
207
+ cx='417.21511'
208
+ cy='611.34365'
209
+ rx='39.5'
210
+ ry='12.40027'
211
+ transform='translate(-238.28665 112.98044) rotate(-23.17116)'
212
+ fill='#2f2e41'
213
+ />
214
+ <ellipse
215
+ cx='269.21511'
216
+ cy='664.34365'
217
+ rx='39.5'
218
+ ry='12.40027'
219
+ transform='translate(-271.07969 59.02084) rotate(-23.17116)'
220
+ fill='#2f2e41'
221
+ />
222
+ <path
223
+ 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'
224
+ transform='translate(-31.39089 -100.5)'
225
+ fill='#fff'
226
+ />
227
+ </svg>
228
+ );
229
+ };
230
+
231
+ export default ServerDown;
@@ -1,20 +1,24 @@
1
- import React from 'react';
2
- import Image from 'next/image';
3
- import { Typography } from '@mui/material';
4
- import { useTheme } from '@mui/material/styles';
5
- import packageInfo from '../../../../../package.json';
6
- var AppLogo = function (_a) {
7
- var _b = _a.name, name = _b === void 0 ? packageInfo.name.charAt(0).toUpperCase() + packageInfo.name.slice(1) : _b, open = _a.open, logoSource = _a.logoSource;
8
- var muiTheme = useTheme();
9
- return (React.createElement("div", { style: {
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: {
10
14
  display: 'flex',
11
15
  flexWrap: 'wrap',
12
16
  alignItems: 'center',
13
17
  justifyContent: 'center',
14
18
  } },
15
- logoSource && (React.createElement(Image, { src: logoSource, alt: 'logo', width: 36, height: 36 })),
16
- open && (React.createElement(React.Fragment, null,
17
- React.createElement(Typography, { variant: 'h4', sx: {
19
+ logoSource && (react_1.default.createElement(image_1.default, { src: logoSource, alt: 'logo', width: 36, height: 36 })),
20
+ open && (react_1.default.createElement(react_1.default.Fragment, null,
21
+ react_1.default.createElement(material_1.Typography, { variant: 'h4', sx: {
18
22
  background: muiTheme.palette.gradient.main,
19
23
  backgroundClip: 'text',
20
24
  WebkitBackgroundClip: 'text',
@@ -22,4 +26,4 @@ var AppLogo = function (_a) {
22
26
  marginLeft: '8px',
23
27
  } }, name)))));
24
28
  };
25
- export default AppLogo;
29
+ exports.default = AppLogo;
@@ -1,10 +1,13 @@
1
- import React from 'react';
2
- import { ImageProps } from 'next/image';
1
+ import React, { ReactNode } from 'react';
2
+ interface ApplicationInfo {
3
+ name: string;
4
+ version: string;
5
+ }
3
6
  export interface FooterProps {
4
7
  /**
5
- * Logo image source.
8
+ * Logo.
6
9
  */
7
- logoSource?: ImageProps['src'];
10
+ logo?: ReactNode;
8
11
  /**
9
12
  * Text to be shown next to the logo.
10
13
  */
@@ -13,6 +16,10 @@ export interface FooterProps {
13
16
  * Link to be rerouted to when the text is clicked.
14
17
  */
15
18
  textURL?: string;
19
+ /**
20
+ * The UI info (name and version)
21
+ */
22
+ uiInfo?: ApplicationInfo;
16
23
  /**
17
24
  * The URL for the backend API. This will send a request to /info for the name and version of the API and show this information. If this is not provided or if the fetch fails nothing is shown in the footer.
18
25
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/components/Footer/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAc,EAAE,UAAU,EAAmB,MAAM,YAAY,CAAC;AAchE,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;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,CA+EjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
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,CAkFjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,74 +1,37 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
36
4
  };
37
- import React from 'react';
38
- import Image from 'next/image';
39
- import { Box, Typography, useTheme } from '@mui/material';
40
- import { useQuery } from 'react-query';
41
- import packageInfo from '../../../../../package.json';
42
- import { useAPI } from '../../../../utils';
43
- import deixLogo from '../../assets/deix_logo_symbol_minimal.svg';
44
- var Footer = function (_a) {
45
- var _b = _a.logoSource, logoSource = _b === void 0 ? deixLogo : _b, _c = _a.text, text = _c === void 0 ? 'Deix Srl' : _c, _d = _a.textURL, textURL = _d === void 0 ? 'https://deixsrl.com' : _d, apiURL = _a.apiURL, children = _a.children;
46
- var muiTheme = useTheme();
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)
47
15
  // Get API info (name and version) from backend
48
- var apiClient = useAPI(apiURL);
49
- var getAPIInfo = function () { return __awaiter(void 0, void 0, void 0, function () {
50
- var data;
51
- return __generator(this, function (_a) {
52
- switch (_a.label) {
53
- case 0: return [4 /*yield*/, apiClient.get('info')];
54
- case 1:
55
- data = (_a.sent()).data;
56
- return [2 /*return*/, data];
57
- }
58
- });
59
- }); };
60
- var apiInfo = useQuery('api-info', getAPIInfo, {
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, {
61
24
  keepPreviousData: true,
62
25
  staleTime: Infinity,
63
26
  cacheTime: Infinity,
64
- }).data;
65
- return (React.createElement(Box, { sx: {
27
+ });
28
+ return (react_1.default.createElement(material_1.Box, { sx: {
66
29
  display: 'flex',
67
30
  flexDirection: 'column',
68
31
  background: muiTheme.palette.background.default,
69
32
  } },
70
- React.createElement(React.Fragment, null,
71
- React.createElement("div", { style: {
33
+ react_1.default.createElement(react_1.default.Fragment, null,
34
+ react_1.default.createElement("div", { style: {
72
35
  display: 'flex',
73
36
  flexWrap: 'wrap',
74
37
  justifyContent: 'center',
@@ -76,26 +39,26 @@ var Footer = function (_a) {
76
39
  width: '100%',
77
40
  textAlign: 'center',
78
41
  } },
79
- logoSource && (React.createElement(Image, { src: logoSource, alt: 'Logo', width: 14, height: 14 })),
80
- React.createElement(Typography, { variant: 'caption', style: {
42
+ logo && logo,
43
+ react_1.default.createElement(material_1.Typography, { variant: 'caption', style: {
81
44
  alignSelf: 'center',
82
45
  color: muiTheme.palette.text.secondary,
83
46
  marginLeft: '5px',
84
47
  } },
85
- React.createElement("a", { href: textURL, target: '_blank', rel: 'noreferrer', style: {
48
+ react_1.default.createElement("a", { href: textURL, target: '_blank', rel: 'noreferrer', style: {
86
49
  textDecoration: 'none',
87
50
  color: muiTheme.palette.text.secondary,
88
51
  } }, text))),
89
- React.createElement(Typography, { variant: 'caption', style: {
52
+ react_1.default.createElement(material_1.Typography, { variant: 'caption', style: {
90
53
  alignSelf: 'center',
91
54
  color: muiTheme.palette.text.secondary,
92
55
  marginLeft: '5px',
93
56
  } },
94
- packageInfo.name,
95
- " v",
96
- packageInfo.version,
57
+ uiInfo.name,
58
+ " ",
59
+ uiInfo.version,
97
60
  ' ',
98
- apiInfo ? "(".concat(apiInfo.name, " ").concat(apiInfo.version, ")") : ''),
61
+ apiInfo ? `(${apiInfo.name} ${apiInfo.version})` : ''),
99
62
  children)));
100
63
  };
101
- export default Footer;
64
+ exports.default = Footer;
@@ -1 +1 @@
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;AAChE,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,CAyVnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
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,CA0VnC,CAAC;AAEF,eAAe,OAAO,CAAC"}