@deix/rossini-core 1.0.0 → 1.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deix/rossini-core",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "lib/src/index.js",
5
5
  "type": "commonjs",
6
6
  "repository": {
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
2
  import { ChipProps } from '@mui/material';
3
3
  import { StringTranslation } from '../../../types';
4
- type DeltaType = 'decrease' | 'moderateDecrease' | 'unchanged' | 'moderateIncrease' | 'increase';
5
4
  export interface ImprovementChipProps extends ChipProps {
6
- deltaType: DeltaType;
7
- deltaValue: number;
5
+ currentValue: number;
6
+ previousValue: number;
7
+ stationaryTolerance?: number;
8
+ percentageFormatOptions?: Partial<Intl.NumberFormatOptions>;
8
9
  isIncreasePositive?: boolean;
9
10
  tooltip?: StringTranslation | string;
10
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ImprovementChip.d.ts","sourceRoot":"","sources":["../../../../../src/components/display/StyledValue/ImprovementChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAQ,SAAS,EAAW,MAAM,eAAe,CAAC;AAGzD,OAAO,EAAuB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExE,KAAK,SAAS,GACV,UAAU,GACV,kBAAkB,GAClB,WAAW,GACX,kBAAkB,GAClB,UAAU,CAAC;AAEf,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAAC;CACtC;AA8BD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA0BnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ImprovementChip.d.ts","sourceRoot":"","sources":["../../../../../src/components/display/StyledValue/ImprovementChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAQ,SAAS,EAAW,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAuB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxE,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uBAAuB,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC5D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAAC;CACtC;AAoCD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAkCnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -6,28 +6,50 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = __importDefault(require("react"));
7
7
  const icons_material_1 = require("@mui/icons-material");
8
8
  const material_1 = require("@mui/material");
9
- const utils_1 = require("../../../utils");
10
9
  const types_1 = require("../../../types");
11
- const colorMap = (isIncreasePositive) => ({
12
- decrease: isIncreasePositive ? 'error' : 'success',
13
- moderateDecrease: 'warning',
14
- unchanged: 'info',
15
- moderateIncrease: 'warning',
16
- increase: isIncreasePositive ? 'success' : 'error',
17
- });
18
- const iconMap = (size) => ({
19
- decrease: react_1.default.createElement(icons_material_1.South, { fontSize: size }),
20
- moderateDecrease: react_1.default.createElement(icons_material_1.SouthEast, { fontSize: size }),
21
- unchanged: react_1.default.createElement(icons_material_1.East, { fontSize: size }),
22
- moderateIncrease: react_1.default.createElement(icons_material_1.NorthEast, { fontSize: size }),
23
- increase: react_1.default.createElement(icons_material_1.North, { fontSize: size }),
24
- });
25
- const ImprovementChip = ({ deltaType, deltaValue, isIncreasePositive = true, tooltip, size = 'small', color, }) => {
10
+ const utils_1 = require("../../../utils");
11
+ const getColor = (delta, tol, isIncreasePositive) => {
12
+ if (delta >= tol) {
13
+ switch (isIncreasePositive) {
14
+ case true:
15
+ return 'success';
16
+ case false:
17
+ return 'error';
18
+ }
19
+ }
20
+ else if (delta <= -tol) {
21
+ switch (isIncreasePositive) {
22
+ case true:
23
+ return 'error';
24
+ case false:
25
+ return 'success';
26
+ }
27
+ }
28
+ else {
29
+ return 'info';
30
+ }
31
+ };
32
+ const getIcon = (delta, tol, size) => {
33
+ if (delta >= tol) {
34
+ return react_1.default.createElement(icons_material_1.North, { fontSize: size });
35
+ }
36
+ else if (delta <= -tol) {
37
+ return react_1.default.createElement(icons_material_1.South, { fontSize: size });
38
+ }
39
+ else {
40
+ return react_1.default.createElement(icons_material_1.East, { fontSize: size });
41
+ }
42
+ };
43
+ const ImprovementChip = ({ currentValue, previousValue, stationaryTolerance = 0.01, percentageFormatOptions = {
44
+ style: 'percent',
45
+ minimumFractionDigits: 0,
46
+ maximumFractionDigits: 1,
47
+ }, isIncreasePositive = true, tooltip, size = 'small', color, }) => {
26
48
  const locale = (0, utils_1.useLocale)();
27
- const colors = colorMap(isIncreasePositive);
28
- const icons = iconMap(size);
29
49
  const tooltipString = tooltip && (0, types_1.isStringTranslation)(tooltip) ? tooltip[locale] : tooltip;
50
+ const delta = (currentValue - previousValue) / previousValue;
51
+ const deltaString = delta.toLocaleString(locale, percentageFormatOptions);
30
52
  return (react_1.default.createElement(material_1.Tooltip, { title: tooltipString || '' },
31
- react_1.default.createElement(material_1.Chip, { icon: icons[deltaType], label: `${deltaValue}%`, color: color || colors[deltaType], size: size })));
53
+ react_1.default.createElement(material_1.Chip, { icon: getIcon(delta, stationaryTolerance, size), label: deltaString, color: color || getColor(delta, stationaryTolerance, isIncreasePositive), size: size })));
32
54
  };
33
55
  exports.default = ImprovementChip;
@@ -10,6 +10,7 @@ export interface FetchedValue {
10
10
  }
11
11
  export interface StyledValueProps {
12
12
  value?: number | string | Date | FetchedValue;
13
+ previousValue?: number | string | Date | FetchedValue;
13
14
  formatOptions?: Partial<Intl.DateTimeFormatOptions | Intl.NumberFormatOptions>;
14
15
  caption: string | StringTranslation;
15
16
  details?: string | StringTranslation;
@@ -23,7 +24,7 @@ export interface StyledValueProps {
23
24
  cardProps?: CardProps;
24
25
  loading?: boolean;
25
26
  onCardClick?: (e: React.MouseEvent<HTMLElement>) => void;
26
- improvement?: ImprovementChipProps;
27
+ improvementChipProps?: Pick<Partial<ImprovementChipProps>, 'isIncreasePositive' | 'stationaryTolerance'>;
27
28
  }
28
29
  declare const StyledValue: React.FC<StyledValueProps>;
29
30
  export default StyledValue;
@@ -1 +1 @@
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;AAE1E,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,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,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAkH3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
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,CAC7C,CAAC;CACH;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAuJ3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -9,6 +9,7 @@ const types_1 = require("../../../types");
9
9
  const utils_1 = require("../../../utils");
10
10
  const hooks_1 = require("./hooks");
11
11
  const ImprovementChip_1 = __importDefault(require("./ImprovementChip"));
12
+ const translations_json_1 = __importDefault(require("./translations.json"));
12
13
  const isFetchedValue = (value) => {
13
14
  return value.endpoint !== undefined;
14
15
  };
@@ -16,17 +17,25 @@ const StyledValue = (props) => {
16
17
  const { caption, details, formatOptions = {}, icon, raised = false, framed = false, loading = false, backgroundColor, valueTypographyProps = {
17
18
  variant: 'h3',
18
19
  color: 'primary',
19
- }, captionTypographyProps = { variant: 'subtitle2', color: 'textPrimary' }, detailsTypographyProps = { variant: 'caption', color: 'textSecondary' }, cardProps, onCardClick, improvement, } = props;
20
+ }, captionTypographyProps = { variant: 'subtitle2', color: 'textPrimary' }, detailsTypographyProps = { variant: 'caption', color: 'textSecondary' }, cardProps, onCardClick, improvementChipProps = {
21
+ isIncreasePositive: true,
22
+ stationaryTolerance: 0.01,
23
+ }, } = props;
20
24
  const locale = (0, utils_1.useLocale)();
21
25
  // Value
22
26
  const apiClient = (0, utils_1.useAPI)(props.value && isFetchedValue(props.value) ? props.value.baseURL : undefined);
23
- const { data: value, isLoading } = (0, hooks_1.useValue)(apiClient, props.value);
24
- const numberType = typeof value === 'number';
25
- const stringValue = numberType
26
- ? value?.toLocaleString(undefined, formatOptions)
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)
27
31
  : value && (0, utils_1.isValidDate)(value)
28
- ? new Date(value)?.toLocaleString(undefined, formatOptions)
32
+ ? new Date(value)?.toLocaleString(locale, formatOptions)
29
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;
30
39
  const captionString = (0, types_1.isStringTranslation)(caption)
31
40
  ? caption[locale]
32
41
  : caption;
@@ -51,17 +60,31 @@ const StyledValue = (props) => {
51
60
  paddingBottom: 2,
52
61
  },
53
62
  } },
54
- react_1.default.createElement(material_1.Grid, { container: true, spacing: 1, alignItems: 'center' },
55
- icon && (react_1.default.createElement(material_1.Grid, { item: true, xs: 4 }, icon)),
56
- react_1.default.createElement(material_1.Grid, { item: true, xs: icon ? 8 : 12 },
57
- react_1.default.createElement(material_1.Grid, { container: true, spacing: 0 },
58
- react_1.default.createElement(material_1.Grid, { item: true, xs: 12 },
59
- react_1.default.createElement(material_1.Box, { sx: { display: 'flex', justifyContent: 'space-between' } },
60
- react_1.default.createElement(material_1.Typography, { ...valueTypographyProps }, loading || isLoading || value === undefined ? (react_1.default.createElement(material_1.Skeleton, null)) : (stringValue)),
61
- improvement && react_1.default.createElement(ImprovementChip_1.default, { ...improvement }))),
62
- react_1.default.createElement(material_1.Grid, { item: true, xs: 12 },
63
- react_1.default.createElement(material_1.Typography, { ...captionTypographyProps }, captionString)),
64
- details && (react_1.default.createElement(material_1.Grid, { item: true, xs: 12 },
65
- react_1.default.createElement(material_1.Typography, { ...detailsTypographyProps }, detailsString)))))))));
63
+ react_1.default.createElement(material_1.Box, { sx: {
64
+ display: 'flex',
65
+ alignItems: 'center',
66
+ width: '100%',
67
+ } },
68
+ icon && react_1.default.createElement(material_1.Box, { sx: { marginRight: 2, width: '10%' } }, icon),
69
+ react_1.default.createElement(material_1.Box, { sx: {
70
+ width: '90%',
71
+ display: 'flex',
72
+ flexDirection: { xs: 'column', md: 'row' },
73
+ justifyContent: 'space-between',
74
+ } },
75
+ react_1.default.createElement(material_1.Box, { sx: {
76
+ width: { xs: '100%', md: '60%' },
77
+ display: 'flex',
78
+ justifyContent: { xs: 'flex-end', md: 'flex-start' },
79
+ } },
80
+ react_1.default.createElement(material_1.Typography, { ...valueTypographyProps }, loading || isLoadingValue || value === undefined ? (react_1.default.createElement(material_1.Skeleton, null)) : (stringValue))),
81
+ previousValue && stringPreviousValue && (react_1.default.createElement(material_1.Box, { sx: {
82
+ width: { xs: '100%', md: '40%' },
83
+ display: 'flex',
84
+ justifyContent: 'flex-end',
85
+ } },
86
+ react_1.default.createElement(ImprovementChip_1.default, { currentValue: value, previousValue: previousValue, tooltip: `${stringPreviousValue} ${translations_json_1.default['tooltipPreviousPeriod'][locale]}`, ...improvementChipProps }))))),
87
+ react_1.default.createElement(material_1.Typography, { ...captionTypographyProps }, captionString),
88
+ details && (react_1.default.createElement(material_1.Typography, { ...detailsTypographyProps }, detailsString)))));
66
89
  };
67
90
  exports.default = StyledValue;
@@ -0,0 +1,9 @@
1
+ {
2
+ "tooltipPreviousPeriod": {
3
+ "de": "in der Vorperiode",
4
+ "en": "during previous period",
5
+ "fr": "pendant la période précédente",
6
+ "it": "nel periodo precedente",
7
+ "es": "en el periodo anterior"
8
+ }
9
+ }
@@ -1 +1 @@
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,CA8E/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
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"}
@@ -49,6 +49,9 @@ const MinimalLayout = ({ isLoading, isError, error, footer, children, }) => {
49
49
  error.message))))),
50
50
  !isLoading && (react_1.default.createElement(material_1.Box, { sx: {
51
51
  flexGrow: 1,
52
+ // display: 'flex',
53
+ // flexDirection: 'column',
54
+ // height: '100%',
52
55
  maxWidth: '100%',
53
56
  overflowX: 'hidden',
54
57
  paddingTop: '10px',
@@ -1 +1 @@
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,CA8GjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
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"}
@@ -24,7 +24,6 @@ const StandardLayout = ({ isLoading, isError, error, appLogo, footer, sidebarLin
24
24
  // Persist user preference about the sidebar
25
25
  const [sidebarOpen, setSidebarOpen] = (0, utils_1.usePersistedState)('sidebarOpen', isMobile ? false : true);
26
26
  return (react_1.default.createElement(react_1.default.Fragment, null,
27
- react_1.default.createElement(TopLine_1.default, null),
28
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 })),
29
28
  react_1.default.createElement(material_1.Box, { sx: {
30
29
  display: 'flex',
@@ -34,10 +33,14 @@ const StandardLayout = ({ isLoading, isError, error, appLogo, footer, sidebarLin
34
33
  width: '100%',
35
34
  background: theme.palette.background.default,
36
35
  } },
36
+ react_1.default.createElement(TopLine_1.default, null),
37
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
38
  isLoading && react_1.default.createElement(progress_1.CircularLoading, { locale: locale }),
39
39
  !isLoading && isError && (react_1.default.createElement(material_1.Box, { sx: {
40
40
  flexGrow: 1,
41
+ // display: 'flex',
42
+ // flexDirection: 'column',
43
+ // height: '100%',
41
44
  maxWidth: '100%',
42
45
  overflowX: 'hidden',
43
46
  paddingTop: '10px',