@fixefy/fixefy-ui-components 0.0.7 → 0.0.9

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 (123) hide show
  1. package/dist-cjs/{ActionsTray/ActionsTray.jsx → FxActionsTray/FxActionsTray.jsx} +3 -3
  2. package/dist-cjs/FxActionsTray/index.js +5 -0
  3. package/dist-cjs/{AggregationsBar/Aggregations.jsx → FxAggregationsBar/FxAggregations.jsx} +3 -3
  4. package/dist-cjs/{AggregationsBar → FxAggregationsBar}/helpers/structureReader.jsx +5 -5
  5. package/dist-cjs/FxAggregationsBar/index.js +5 -0
  6. package/dist-cjs/{AsyncDropdown/AsyncDropdown.jsx → FxAsyncDropdown/FxAsyncDropdown.jsx} +2 -2
  7. package/dist-cjs/FxAsyncDropdown/index.js +5 -0
  8. package/dist-cjs/FxIcon/index.js +2 -2
  9. package/dist-cjs/FxNumberField/index.js +2 -2
  10. package/dist-cjs/FxProgressCircle/FxProgressCircle.jsx +3 -3
  11. package/dist-cjs/FxProgressCircle/index.js +2 -2
  12. package/dist-cjs/{Score/Score.jsx → FxScore/FxScore.jsx} +3 -3
  13. package/dist-cjs/FxScore/index.js +5 -0
  14. package/dist-cjs/FxShowMore/FxShowMore.jsx +3 -3
  15. package/dist-cjs/FxShowMore/index.js +2 -2
  16. package/dist-cjs/FxSlider/FxSlider.jsx +3 -3
  17. package/dist-cjs/FxSlider/index.js +2 -2
  18. package/dist-cjs/{StatisticsBar/StatisticsBar.jsx → FxStatisticsBar/FxStatisticsBar.jsx} +3 -3
  19. package/dist-cjs/FxStatisticsBar/index.js +5 -0
  20. package/dist-cjs/FxStatusBar/FxStatusBar.jsx +3 -3
  21. package/dist-cjs/FxStatusBar/index.js +2 -2
  22. package/dist-cjs/FxStyledComponents/index.jsx +102 -0
  23. package/dist-cjs/{Tag/Tag.jsx → FxTag/FxTag.jsx} +3 -3
  24. package/dist-cjs/FxTag/index.js +5 -0
  25. package/dist-cjs/FxWizard/FxWizard.jsx +3 -3
  26. package/dist-cjs/FxWizard/WizardContext.jsx +1 -1
  27. package/dist-cjs/FxWizard/index.js +2 -2
  28. package/dist-cjs/index.js +37 -7
  29. package/dist-es/{ActionsTray/ActionsTray.jsx → FxActionsTray/FxActionsTray.jsx} +1 -1
  30. package/dist-es/FxActionsTray/index.js +1 -0
  31. package/dist-es/{AggregationsBar/Aggregations.jsx → FxAggregationsBar/FxAggregations.jsx} +1 -1
  32. package/dist-es/{AggregationsBar → FxAggregationsBar}/helpers/structureReader.jsx +5 -5
  33. package/dist-es/FxAggregationsBar/index.js +1 -0
  34. package/dist-es/{AsyncDropdown/AsyncDropdown.jsx → FxAsyncDropdown/FxAsyncDropdown.jsx} +1 -1
  35. package/dist-es/FxAsyncDropdown/index.js +1 -0
  36. package/dist-es/FxIcon/index.js +1 -1
  37. package/dist-es/FxNumberField/index.js +1 -1
  38. package/dist-es/FxProgressCircle/FxProgressCircle.jsx +1 -1
  39. package/dist-es/FxProgressCircle/index.js +1 -1
  40. package/dist-es/{Score/Score.jsx → FxScore/FxScore.jsx} +1 -1
  41. package/dist-es/FxScore/index.js +1 -0
  42. package/dist-es/FxShowMore/FxShowMore.jsx +1 -1
  43. package/dist-es/FxShowMore/index.js +1 -1
  44. package/dist-es/FxSlider/FxSlider.jsx +1 -1
  45. package/dist-es/FxSlider/index.js +1 -1
  46. package/dist-es/{StatisticsBar/StatisticsBar.jsx → FxStatisticsBar/FxStatisticsBar.jsx} +1 -1
  47. package/dist-es/FxStatisticsBar/index.js +1 -0
  48. package/dist-es/FxStatusBar/FxStatusBar.jsx +1 -1
  49. package/dist-es/FxStatusBar/index.js +1 -1
  50. package/dist-es/FxStyledComponents/index.jsx +133 -0
  51. package/dist-es/{Tag/Tag.jsx → FxTag/FxTag.jsx} +1 -1
  52. package/dist-es/FxTag/index.js +1 -0
  53. package/dist-es/FxWizard/FxWizard.jsx +1 -1
  54. package/dist-es/FxWizard/WizardContext.jsx +2 -2
  55. package/dist-es/FxWizard/index.js +2 -2
  56. package/dist-es/index.js +17 -3
  57. package/dist-types/FxActionsTray/FxActionsTray.d.ts +3 -0
  58. package/dist-types/{ActionsTray → FxActionsTray}/index.d.ts +1 -1
  59. package/dist-types/FxAggregationsBar/FxAggregations.d.ts +3 -0
  60. package/dist-types/{AggregationsBar → FxAggregationsBar}/index.d.ts +1 -1
  61. package/dist-types/FxAsyncDropdown/FxAsyncDropdown.d.ts +3 -0
  62. package/dist-types/{AsyncDropdown → FxAsyncDropdown}/index.d.ts +1 -1
  63. package/dist-types/FxIcon/index.d.ts +2 -1
  64. package/dist-types/FxNumberField/index.d.ts +1 -1
  65. package/dist-types/FxProgressCircle/FxProgressCircle.d.ts +1 -1
  66. package/dist-types/FxProgressCircle/index.d.ts +1 -1
  67. package/dist-types/FxScore/FxScore.d.ts +3 -0
  68. package/dist-types/{Score → FxScore}/index.d.ts +1 -1
  69. package/dist-types/FxShowMore/FxShowMore.d.ts +1 -1
  70. package/dist-types/FxShowMore/index.d.ts +1 -1
  71. package/dist-types/FxSlider/FxSlider.d.ts +1 -1
  72. package/dist-types/FxSlider/index.d.ts +1 -1
  73. package/dist-types/FxStatisticsBar/FxStatisticsBar.d.ts +3 -0
  74. package/dist-types/{StatisticsBar → FxStatisticsBar}/index.d.ts +1 -1
  75. package/dist-types/FxStatusBar/FxStatusBar.d.ts +2 -2
  76. package/dist-types/FxStatusBar/index.d.ts +2 -1
  77. package/dist-types/FxStyledComponents/index.d.ts +27 -0
  78. package/dist-types/FxTag/FxTag.d.ts +3 -0
  79. package/dist-types/{Tag → FxTag}/index.d.ts +1 -1
  80. package/dist-types/FxWizard/FxWizard.d.ts +1 -1
  81. package/dist-types/FxWizard/index.d.ts +3 -3
  82. package/dist-types/index.d.ts +17 -4
  83. package/package.json +2 -2
  84. package/dist-cjs/ActionsTray/index.js +0 -5
  85. package/dist-cjs/AggregationsBar/index.js +0 -5
  86. package/dist-cjs/AsyncDropdown/index.js +0 -5
  87. package/dist-cjs/Score/index.js +0 -5
  88. package/dist-cjs/StatisticsBar/index.js +0 -5
  89. package/dist-cjs/Tag/index.js +0 -5
  90. package/dist-es/ActionsTray/index.js +0 -1
  91. package/dist-es/AggregationsBar/index.js +0 -1
  92. package/dist-es/AsyncDropdown/index.js +0 -1
  93. package/dist-es/Score/index.js +0 -1
  94. package/dist-es/StatisticsBar/index.js +0 -1
  95. package/dist-es/Tag/index.js +0 -1
  96. package/dist-types/ActionsTray/ActionsTray.d.ts +0 -3
  97. package/dist-types/AggregationsBar/Aggregations.d.ts +0 -3
  98. package/dist-types/AsyncDropdown/AsyncDropdown.d.ts +0 -3
  99. package/dist-types/Score/Score.d.ts +0 -3
  100. package/dist-types/StatisticsBar/StatisticsBar.d.ts +0 -3
  101. package/dist-types/Tag/Tag.d.ts +0 -3
  102. /package/dist-cjs/{ActionsTray → FxActionsTray}/styles/actions_tray.styles.jsx +0 -0
  103. /package/dist-cjs/{AggregationsBar → FxAggregationsBar}/operations/query.js +0 -0
  104. /package/dist-cjs/{AsyncDropdown → FxAsyncDropdown}/helpers/helpers.js +0 -0
  105. /package/dist-cjs/{AsyncDropdown → FxAsyncDropdown}/styles/dropdown.styles.jsx +0 -0
  106. /package/dist-cjs/{Score → FxScore}/styles/score.styles.js +0 -0
  107. /package/dist-cjs/{StatisticsBar → FxStatisticsBar}/styles/statistics.styles.js +0 -0
  108. /package/dist-cjs/{Tag → FxTag}/styles/tag.styles.jsx +0 -0
  109. /package/dist-es/{ActionsTray → FxActionsTray}/styles/actions_tray.styles.jsx +0 -0
  110. /package/dist-es/{AggregationsBar → FxAggregationsBar}/operations/query.js +0 -0
  111. /package/dist-es/{AsyncDropdown → FxAsyncDropdown}/helpers/helpers.js +0 -0
  112. /package/dist-es/{AsyncDropdown → FxAsyncDropdown}/styles/dropdown.styles.jsx +0 -0
  113. /package/dist-es/{Score → FxScore}/styles/score.styles.js +0 -0
  114. /package/dist-es/{StatisticsBar → FxStatisticsBar}/styles/statistics.styles.js +0 -0
  115. /package/dist-es/{Tag → FxTag}/styles/tag.styles.jsx +0 -0
  116. /package/dist-types/{ActionsTray → FxActionsTray}/styles/actions_tray.styles.d.ts +0 -0
  117. /package/dist-types/{AggregationsBar → FxAggregationsBar}/helpers/structureReader.d.ts +0 -0
  118. /package/dist-types/{AggregationsBar → FxAggregationsBar}/operations/query.d.ts +0 -0
  119. /package/dist-types/{AsyncDropdown → FxAsyncDropdown}/helpers/helpers.d.ts +0 -0
  120. /package/dist-types/{AsyncDropdown → FxAsyncDropdown}/styles/dropdown.styles.d.ts +0 -0
  121. /package/dist-types/{Score → FxScore}/styles/score.styles.d.ts +0 -0
  122. /package/dist-types/{StatisticsBar → FxStatisticsBar}/styles/statistics.styles.d.ts +0 -0
  123. /package/dist-types/{Tag → FxTag}/styles/tag.styles.d.ts +0 -0
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActionsTray = void 0;
3
+ exports.FxActionsTray = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const image_1 = tslib_1.__importDefault(require("next/image"));
7
7
  const material_1 = require("@mui/material");
8
8
  const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
9
9
  const actions_tray_styles_1 = require("./styles/actions_tray.styles");
10
- function ActionsTray({ type, onApprove, onChallenge, onClick, show, onClose, chargesCount, container, direction = 'up' }) {
10
+ function FxActionsTray({ type, onApprove, onChallenge, onClick, show, onClose, chargesCount, container, direction = 'up' }) {
11
11
  const renderActions = () => {
12
12
  switch (type) {
13
13
  case 'approved':
@@ -42,7 +42,7 @@ function ActionsTray({ type, onApprove, onChallenge, onClick, show, onClose, cha
42
42
  </material_1.Slide>
43
43
  </div>);
44
44
  }
45
- exports.ActionsTray = ActionsTray;
45
+ exports.FxActionsTray = FxActionsTray;
46
46
  const ChallengeActions = ({ onChallenge, onApprove }) => {
47
47
  return (<>
48
48
  <actions_tray_styles_1.ActionBtn onClick={onChallenge} type="low">
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FxActionsTray = void 0;
4
+ var FxActionsTray_1 = require("./FxActionsTray");
5
+ Object.defineProperty(exports, "FxActionsTray", { enumerable: true, get: function () { return FxActionsTray_1.FxActionsTray; } });
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AggregationsBar = void 0;
3
+ exports.FxAggregationsBar = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const Stack_1 = tslib_1.__importDefault(require("@mui/material/Stack"));
7
7
  const structureReader_1 = require("./helpers/structureReader");
8
- const AggregationsBar = (props) => {
8
+ const FxAggregationsBar = (props) => {
9
9
  const { structure, minWidth, mb, filter, initialValues } = props;
10
10
  const { children, extended } = structure;
11
11
  const { variables } = extended;
@@ -24,4 +24,4 @@ const AggregationsBar = (props) => {
24
24
  })}
25
25
  </Stack_1.default>);
26
26
  };
27
- exports.AggregationsBar = AggregationsBar;
27
+ exports.FxAggregationsBar = FxAggregationsBar;
@@ -4,8 +4,8 @@ exports.structureReader = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const material_1 = require("@mui/material");
7
- const Score_1 = require("../../Score");
8
- const StatisticsBar_1 = require("../../StatisticsBar");
7
+ const FxScore_1 = require("../../FxScore");
8
+ const FxStatisticsBar_1 = require("../../FxStatisticsBar");
9
9
  const FxProgressCounter_1 = require("../../FxProgressCounter");
10
10
  const structureReader = (structure, filter, collapsed, initialValues) => {
11
11
  var _a;
@@ -14,7 +14,7 @@ const structureReader = (structure, filter, collapsed, initialValues) => {
14
14
  case 'aggregations_primary_container':
15
15
  return structure.children.map((child, index) => {
16
16
  var _a, _b, _c;
17
- return ((_a = child.input_type) === null || _a === void 0 ? void 0 : _a.value) === 'percentage' ? (<Score_1.Score structure={child} key={index} filter={filter} value={initialValues === null || initialValues === void 0 ? void 0 : initialValues.score}/>) : ((_b = child.input_type) === null || _b === void 0 ? void 0 : _b.value) === 'progress' ? (<FxProgressCounter_1.FxProgressCounter structure={child} filter={filter} key={index} values={initialValues}/>) : (<material_1.Box sx={{
17
+ return ((_a = child.input_type) === null || _a === void 0 ? void 0 : _a.value) === 'percentage' ? (<FxScore_1.FxScore structure={child} key={index} filter={filter} value={initialValues === null || initialValues === void 0 ? void 0 : initialValues.score}/>) : ((_b = child.input_type) === null || _b === void 0 ? void 0 : _b.value) === 'progress' ? (<FxProgressCounter_1.FxProgressCounter structure={child} filter={filter} key={index} values={initialValues}/>) : (<material_1.Box sx={{
18
18
  display: 'flex',
19
19
  justifyContent: 'center',
20
20
  alignItems: 'center',
@@ -23,7 +23,7 @@ const structureReader = (structure, filter, collapsed, initialValues) => {
23
23
  borderRadius: 2,
24
24
  backgroundColor: ((_c = extended === null || extended === void 0 ? void 0 : extended.variables) === null || _c === void 0 ? void 0 : _c.bg) || '#FFFFFF',
25
25
  }}>
26
- <StatisticsBar_1.StatisticsBar structure={child} key={index} filter={filter} collapsed={collapsed} value={initialValues ? initialValues[child.extended.object_path] : null}/>
26
+ <FxStatisticsBar_1.FxStatisticsBar structure={child} key={index} filter={filter} collapsed={collapsed} value={initialValues ? initialValues[child.extended.object_path] : null}/>
27
27
  </material_1.Box>);
28
28
  });
29
29
  case 'aggregations_secondary_container':
@@ -33,7 +33,7 @@ const structureReader = (structure, filter, collapsed, initialValues) => {
33
33
  padding: '24px 16px',
34
34
  }}>
35
35
  {structure.children.map((child, index) => {
36
- return <StatisticsBar_1.StatisticsBar structure={child} key={index} filter={filter} collapsed={collapsed} value={initialValues ? initialValues[child.extended.object_path] : null}/>;
36
+ return <FxStatisticsBar_1.FxStatisticsBar structure={child} key={index} filter={filter} collapsed={collapsed} value={initialValues ? initialValues[child.extended.object_path] : null}/>;
37
37
  })}
38
38
  </material_1.Stack>);
39
39
  }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FxAggregationsBar = void 0;
4
+ var FxAggregations_1 = require("./FxAggregations");
5
+ Object.defineProperty(exports, "FxAggregationsBar", { enumerable: true, get: function () { return FxAggregations_1.FxAggregationsBar; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AsyncDropdown = void 0;
3
+ exports.FxAsyncDropdown = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const lodash_1 = tslib_1.__importDefault(require("lodash"));
6
6
  const icons_material_1 = require("@mui/icons-material");
@@ -12,7 +12,7 @@ const material_1 = require("@mui/material");
12
12
  const dropdown_styles_1 = require("./styles/dropdown.styles");
13
13
  const icon = <icons_material_1.CheckBoxOutlineBlank fontSize="small"/>;
14
14
  const checkedIcon = <icons_material_1.CheckBox fontSize="small"/>;
15
- exports.AsyncDropdown = react_1.default.forwardRef((props, parentRef) => {
15
+ exports.FxAsyncDropdown = react_1.default.forwardRef((props, parentRef) => {
16
16
  var _a, _b, _c, _d, _e, _f, _g;
17
17
  const ref = (0, react_1.useRef)(null);
18
18
  const theme = (0, material_1.useTheme)();
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FxAsyncDropdown = void 0;
4
+ var FxAsyncDropdown_1 = require("./FxAsyncDropdown");
5
+ Object.defineProperty(exports, "FxAsyncDropdown", { enumerable: true, get: function () { return FxAsyncDropdown_1.FxAsyncDropdown; } });
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Icon = void 0;
3
+ exports.FxIcon = void 0;
4
4
  var FxIcon_1 = require("./FxIcon");
5
- Object.defineProperty(exports, "Icon", { enumerable: true, get: function () { return FxIcon_1.FxIcon; } });
5
+ Object.defineProperty(exports, "FxIcon", { enumerable: true, get: function () { return FxIcon_1.FxIcon; } });
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Numberfield = void 0;
3
+ exports.FxNumberField = void 0;
4
4
  var FxNumberField_1 = require("./FxNumberField");
5
- Object.defineProperty(exports, "Numberfield", { enumerable: true, get: function () { return FxNumberField_1.FxNumberField; } });
5
+ Object.defineProperty(exports, "FxNumberField", { enumerable: true, get: function () { return FxNumberField_1.FxNumberField; } });
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProgressCircle = void 0;
3
+ exports.FxProgressCircle = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const progress_circle_styles_1 = require("./styles/progress_circle.styles");
7
- function ProgressCircle({ radius = 70, border = 70, value, hasLabel = true, max = 100, color, type = 'progress' }) {
7
+ function FxProgressCircle({ radius = 70, border = 70, value, hasLabel = true, max = 100, color, type = 'progress' }) {
8
8
  const _value = value ? value / max : 0;
9
9
  const p = 2 * Math.PI * (radius - border / 2);
10
10
  const strokeWidth = border;
@@ -25,4 +25,4 @@ function ProgressCircle({ radius = 70, border = 70, value, hasLabel = true, max
25
25
  {hasLabel && type === 'percentage' && <progress_circle_styles_1.Label sx={{ ml: 1 }}>{label}</progress_circle_styles_1.Label>}
26
26
  </progress_circle_styles_1.Container>);
27
27
  }
28
- exports.ProgressCircle = ProgressCircle;
28
+ exports.FxProgressCircle = FxProgressCircle;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProgressCircle = void 0;
3
+ exports.FxProgressCircle = void 0;
4
4
  var FxProgressCircle_1 = require("./FxProgressCircle");
5
- Object.defineProperty(exports, "ProgressCircle", { enumerable: true, get: function () { return FxProgressCircle_1.ProgressCircle; } });
5
+ Object.defineProperty(exports, "FxProgressCircle", { enumerable: true, get: function () { return FxProgressCircle_1.FxProgressCircle; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Score = void 0;
3
+ exports.FxScore = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const graphql_tag_1 = require("graphql-tag");
@@ -8,7 +8,7 @@ const client_1 = require("@apollo/client");
8
8
  const score_styles_1 = require("./styles/score.styles");
9
9
  const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
10
10
  const material_1 = require("@mui/material");
11
- const Score = (_a) => {
11
+ const FxScore = (_a) => {
12
12
  var _b;
13
13
  var { value, structure, filter, variant = 'box', hasLabel = true, title: propsTitle = 'score', Sizes: propsSizes = {} } = _a, rest = tslib_1.__rest(_a, ["value", "structure", "filter", "variant", "hasLabel", "title", "Sizes"]);
14
14
  const Sizes = Object.assign({ box: {
@@ -54,4 +54,4 @@ const Score = (_a) => {
54
54
  </material_1.Box>
55
55
  </material_1.Box>);
56
56
  };
57
- exports.Score = Score;
57
+ exports.FxScore = FxScore;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FxScore = void 0;
4
+ var FxScore_1 = require("./FxScore");
5
+ Object.defineProperty(exports, "FxScore", { enumerable: true, get: function () { return FxScore_1.FxScore; } });
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShowMore = void 0;
3
+ exports.FxShowMore = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const material_1 = require("@mui/material");
7
7
  const show_more_styles_1 = require("./styles/show_more.styles");
8
8
  const KeyboardArrowDown_1 = tslib_1.__importDefault(require("@mui/icons-material/KeyboardArrowDown"));
9
- function ShowMore({ items, label, children, title }) {
9
+ function FxShowMore({ items, label, children, title }) {
10
10
  const [anchorEl, setAnchorEl] = react_1.default.useState(null);
11
11
  const handleClick = (event) => {
12
12
  setAnchorEl(event.currentTarget);
@@ -44,4 +44,4 @@ function ShowMore({ items, label, children, title }) {
44
44
  </show_more_styles_1.StyledPopover>
45
45
  </show_more_styles_1.ShowMoreWrapper>);
46
46
  }
47
- exports.ShowMore = ShowMore;
47
+ exports.FxShowMore = FxShowMore;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShowMore = void 0;
3
+ exports.FxShowMore = void 0;
4
4
  var FxShowMore_1 = require("./FxShowMore");
5
- Object.defineProperty(exports, "ShowMore", { enumerable: true, get: function () { return FxShowMore_1.ShowMore; } });
5
+ Object.defineProperty(exports, "FxShowMore", { enumerable: true, get: function () { return FxShowMore_1.FxShowMore; } });
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Slider = void 0;
3
+ exports.FxSlider = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const material_1 = require("@mui/material");
7
- function Slider(props) {
7
+ function FxSlider(props) {
8
8
  return <material_1.Slider {...props}/>;
9
9
  }
10
- exports.Slider = Slider;
10
+ exports.FxSlider = FxSlider;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Slider = void 0;
3
+ exports.FxSlider = void 0;
4
4
  var FxSlider_1 = require("./FxSlider");
5
- Object.defineProperty(exports, "Slider", { enumerable: true, get: function () { return FxSlider_1.Slider; } });
5
+ Object.defineProperty(exports, "FxSlider", { enumerable: true, get: function () { return FxSlider_1.FxSlider; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StatisticsBar = void 0;
3
+ exports.FxStatisticsBar = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const graphql_tag_1 = require("graphql-tag");
@@ -9,7 +9,7 @@ const material_1 = require("@mui/material");
9
9
  const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
10
10
  const fixefy_ui_utils_2 = require("@fixefy/fixefy-ui-utils");
11
11
  const statistics_styles_1 = require("./styles/statistics.styles");
12
- function StatisticsBar({ value, type = 'currency', label, structure, collapsed, filter }) {
12
+ function FxStatisticsBar({ value, type = 'currency', label, structure, collapsed, filter }) {
13
13
  const _classes = (0, statistics_styles_1.useStyles)();
14
14
  const { extended, input_type, title } = structure || {};
15
15
  const { gql_operation, object_path, filter: structurefilter, variables } = extended || {};
@@ -92,4 +92,4 @@ function StatisticsBar({ value, type = 'currency', label, structure, collapsed,
92
92
  <span className={(variables === null || variables === void 0 ? void 0 : variables.contrast) ? _classes.contrastLabel : _classes.label}>{(0, fixefy_ui_utils_1.titleCase)(statisticsTitle)}</span>
93
93
  </div>);
94
94
  }
95
- exports.StatisticsBar = StatisticsBar;
95
+ exports.FxStatisticsBar = FxStatisticsBar;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FxStatisticsBar = void 0;
4
+ var FxStatisticsBar_1 = require("./FxStatisticsBar");
5
+ Object.defineProperty(exports, "FxStatisticsBar", { enumerable: true, get: function () { return FxStatisticsBar_1.FxStatisticsBar; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StatusBar = void 0;
3
+ exports.FxStatusBar = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const material_1 = require("@mui/material");
@@ -8,7 +8,7 @@ const FxChip_1 = require("../FxChip");
8
8
  const constants_1 = require("./helpers/constants");
9
9
  const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
10
10
  const statusBar_styles_1 = require("./styles/statusBar.styles");
11
- const StatusBar = ({ onChangeStatus, onSearch, defaultStatus, title, options, chipsVariant = 'filled' }) => {
11
+ const FxStatusBar = ({ onChangeStatus, onSearch, defaultStatus, title, options, chipsVariant = 'filled' }) => {
12
12
  const [selectedStatus, setSelectedStatus] = (0, react_1.useState)([]);
13
13
  const [searchValue, setSearchValue] = (0, react_1.useState)('');
14
14
  (0, react_1.useEffect)(() => {
@@ -61,4 +61,4 @@ const StatusBar = ({ onChangeStatus, onSearch, defaultStatus, title, options, ch
61
61
  </material_1.Stack>
62
62
  </statusBar_styles_1.StatusBarCard>);
63
63
  };
64
- exports.StatusBar = StatusBar;
64
+ exports.FxStatusBar = FxStatusBar;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StatusBar = void 0;
3
+ exports.FxStatusBar = void 0;
4
4
  var FxStatusBar_1 = require("./FxStatusBar");
5
- Object.defineProperty(exports, "StatusBar", { enumerable: true, get: function () { return FxStatusBar_1.StatusBar; } });
5
+ Object.defineProperty(exports, "FxStatusBar", { enumerable: true, get: function () { return FxStatusBar_1.FxStatusBar; } });
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Bars = exports.DataWrapper = exports.ShowMoreContainer = exports.ShowMore = exports.Text = exports.Link = exports.PageTitle = exports.Value = exports.BoldValue = exports.Label = exports.PageHeader = exports.Card = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importStar(require("react"));
6
+ const styles_1 = require("@mui/material/styles");
7
+ const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
8
+ const material_1 = require("@mui/material");
9
+ exports.Card = (0, styles_1.styled)(material_1.Paper)(({ theme }) => ({
10
+ borderRadius: 8,
11
+ padding: 16,
12
+ overflow: 'hidden',
13
+ position: 'relative',
14
+ }));
15
+ exports.PageHeader = (0, styles_1.styled)(material_1.Box)(({ theme }) => ({
16
+ backgroundColor: '#E2EEF1',
17
+ width: '100%',
18
+ height: 220,
19
+ padding: 32,
20
+ }));
21
+ exports.Label = (0, styles_1.styled)(material_1.Typography)(({ theme }) => (Object.assign(Object.assign({}, theme.typography.overLineCaption), { color: theme.palette.statistics.label })));
22
+ exports.BoldValue = (0, styles_1.styled)(material_1.Typography)(({ theme }) => (Object.assign(Object.assign({}, theme.typography.subtitle2), { fontWeight: 700, lineHeight: '16px', color: theme.palette.typography.title })));
23
+ exports.Value = (0, styles_1.styled)(material_1.Typography)(({ theme }) => (Object.assign(Object.assign({}, theme.typography.body1), { fontFamily: theme.typography.fontFamily, lineHeight: '20px', color: theme.palette.typography.title })));
24
+ exports.PageTitle = (0, styles_1.styled)(material_1.Typography)(({ theme }) => (Object.assign(Object.assign({}, theme.typography.h4), { color: theme.palette.common.black })));
25
+ exports.Link = (0, styles_1.styled)(material_1.Link)(({ theme }) => (Object.assign(Object.assign({}, theme.typography.body1), { lineHeight: '20px', fontStyle: 'italic', color: theme.palette.primary[500], cursor: 'pointer', textDecoration: 'none' })));
26
+ exports.Text = (0, styles_1.styled)(material_1.Typography)(({ theme }) => (Object.assign(Object.assign({}, theme.typography.body1), { color: theme.palette.typography.title, textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden' })));
27
+ exports.ShowMore = (0, styles_1.styled)(material_1.Typography)(({ theme }) => (Object.assign(Object.assign({}, theme.typography.body1), { color: theme.palette.primary['500'], fontWeight: 600, fontSize: '12px', letterSpacing: '0.5px', lineHeight: '24px', cursor: 'pointer' })));
28
+ exports.ShowMoreContainer = (0, styles_1.styled)(material_1.Grid)(({ theme }) => ({
29
+ backgroundColor: theme.palette.common.white,
30
+ width: '100%',
31
+ display: 'flex',
32
+ justifyContent: 'center',
33
+ cursor: 'pointer',
34
+ }));
35
+ const DataWrapper = ({ values = [], title, icon, columns = 4, cardStyle = {}, wrapperStyle = {} }) => {
36
+ const normalizedValues = values.length % columns !== 0 ? [...values, ...new Array(columns - (values.length % columns))] : values;
37
+ const last4Items = normalizedValues.splice(-columns);
38
+ const containerColumns = columns === 5 ? 10 : 12;
39
+ return (<material_1.Box sx={Object.assign({}, wrapperStyle)}>
40
+ {(title || icon) && (<material_1.Box display="flex" alignItems="center" sx={{ ml: 2, mb: 1 }}>
41
+ {icon && icon}
42
+ {title && <exports.BoldValue sx={{ ml: 1 }}>{(0, fixefy_ui_utils_1.titleCase)(title)}</exports.BoldValue>}
43
+ </material_1.Box>)}
44
+ <exports.Card elevation={0} sx={Object.assign({ padding: 0, border: `1px solid #F0F0F0` }, cardStyle)}>
45
+ <material_1.Grid container columns={containerColumns}>
46
+ {normalizedValues.map((value, index) => {
47
+ return (<material_1.Grid sx={{
48
+ minHeight: 74,
49
+ padding: 2,
50
+ borderRight: value && (index + 1) % columns !== 0 && `1px solid #F0F0F0`,
51
+ borderBottom: value && `1px solid #F0F0F0`,
52
+ display: 'flex',
53
+ alignItems: 'center',
54
+ }} item key={index} xs={containerColumns / columns}>
55
+ {value && react_1.default.cloneElement(value)}
56
+ </material_1.Grid>);
57
+ })}
58
+ {last4Items.map((value, index) => {
59
+ return (<material_1.Grid sx={{
60
+ minHeight: 74,
61
+ padding: 2,
62
+ borderRight: value && (index + 1) % columns !== 0 && `1px solid #F0F0F0`,
63
+ display: 'flex',
64
+ alignItems: 'center',
65
+ }} item key={index} xs={containerColumns / columns}>
66
+ {value && react_1.default.cloneElement(value)}
67
+ </material_1.Grid>);
68
+ })}
69
+ </material_1.Grid>
70
+ </exports.Card>
71
+ </material_1.Box>);
72
+ };
73
+ exports.DataWrapper = DataWrapper;
74
+ const Bars = ({ fields }) => {
75
+ const max = (0, react_1.useMemo)(() => {
76
+ return fields.reduce((total, acc) => {
77
+ return acc.value > total ? acc.value : total;
78
+ }, 0);
79
+ }, [fields]);
80
+ const calculateTheValue = (value) => {
81
+ const calculatedValue = (value * 24) / max;
82
+ if (calculatedValue > 0 && calculatedValue < 2) {
83
+ return 2;
84
+ }
85
+ if (calculatedValue < 1) {
86
+ return 1;
87
+ }
88
+ return calculatedValue;
89
+ };
90
+ return (<div style={{ display: 'flex', alignItems: 'flex-end' }}>
91
+ {fields.map((field, index) => {
92
+ return (<div key={index} style={{
93
+ width: 8,
94
+ borderRadius: '0.75px',
95
+ height: calculateTheValue(field.value),
96
+ backgroundColor: field.color,
97
+ marginRight: 2,
98
+ }}/>);
99
+ })}
100
+ </div>);
101
+ };
102
+ exports.Bars = Bars;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Tag = void 0;
3
+ exports.FxTag = void 0;
4
4
  const material_1 = require("@mui/material");
5
5
  const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils/");
6
6
  const tag_styles_1 = require("./styles/tag.styles");
7
- const Tag = ({ name, count = 0 }) => (<material_1.Box display="flex" alignItems="center" justifyContent="center" sx={{ maxWidth: 'fit-content', mb: 1 }}>
7
+ const FxTag = ({ name, count = 0 }) => (<material_1.Box display="flex" alignItems="center" justifyContent="center" sx={{ maxWidth: 'fit-content', mb: 1 }}>
8
8
  <tag_styles_1.StyledTag name={name}>
9
9
  <tag_styles_1.StyledLabel>{(0, fixefy_ui_utils_1.titleCase)(name)}</tag_styles_1.StyledLabel>
10
10
  </tag_styles_1.StyledTag>
11
11
  <tag_styles_1.StyledCount name={name}>{count}</tag_styles_1.StyledCount>
12
12
  </material_1.Box>);
13
- exports.Tag = Tag;
13
+ exports.FxTag = FxTag;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FxTag = void 0;
4
+ var FxTag_1 = require("./FxTag");
5
+ Object.defineProperty(exports, "FxTag", { enumerable: true, get: function () { return FxTag_1.FxTag; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Wizard = void 0;
3
+ exports.FxWizard = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const material_1 = require("@mui/material");
@@ -35,7 +35,7 @@ const Animations = {
35
35
  },
36
36
  },
37
37
  };
38
- function Wizard(_a) {
38
+ function FxWizard(_a) {
39
39
  var { open, content = [], currentPage = 0, reverse = false, onCancel, title, actions, icon, componentStyles, divider = true } = _a, rest = tslib_1.__rest(_a, ["open", "content", "currentPage", "reverse", "onCancel", "title", "actions", "icon", "componentStyles", "divider"]);
40
40
  const transitions = (0, web_1.useTransition)(content[currentPage], Object.assign(Object.assign({}, Animations[reverse ? 'leftToRight' : 'rightToLeft']), { keys: null }));
41
41
  return (<wizard_styles_1.StyledModal {...rest} title={title} actions={actions} icon={icon} isOpen={Boolean(open)} isIconTitleInline onClose={(e) => onCancel(e, '')}>
@@ -46,4 +46,4 @@ function Wizard(_a) {
46
46
  {divider && <material_1.Divider sx={{ mb: '8px', mt: '32px' }}/>}
47
47
  </wizard_styles_1.StyledModal>);
48
48
  }
49
- exports.Wizard = Wizard;
49
+ exports.FxWizard = FxWizard;
@@ -80,7 +80,7 @@ const WizardContextProvider = ({ children }) => {
80
80
  };
81
81
  return (<exports.WizardContext.Provider value={_state}>
82
82
  {children}
83
- <FxWizard_1.Wizard {...modalProps} componentStyles={componentStyles} currentPage={currentPage} reverse={reverse} open={open} onCancel={onCancel} content={content}/>
83
+ <FxWizard_1.FxWizard {...modalProps} componentStyles={componentStyles} currentPage={currentPage} reverse={reverse} open={open} onCancel={onCancel} content={content}/>
84
84
  </exports.WizardContext.Provider>);
85
85
  };
86
86
  exports.WizardContextProvider = WizardContextProvider;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WizardContextProvider = exports.WizardContext = exports.Wizard = void 0;
3
+ exports.WizardContextProvider = exports.WizardContext = exports.FxWizard = void 0;
4
4
  var FxWizard_1 = require("./FxWizard");
5
- Object.defineProperty(exports, "Wizard", { enumerable: true, get: function () { return FxWizard_1.Wizard; } });
5
+ Object.defineProperty(exports, "FxWizard", { enumerable: true, get: function () { return FxWizard_1.FxWizard; } });
6
6
  var WizardContext_1 = require("./WizardContext");
7
7
  Object.defineProperty(exports, "WizardContext", { enumerable: true, get: function () { return WizardContext_1.WizardContext; } });
8
8
  Object.defineProperty(exports, "WizardContextProvider", { enumerable: true, get: function () { return WizardContext_1.WizardContextProvider; } });
package/dist-cjs/index.js CHANGED
@@ -1,19 +1,49 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Tag = exports.FxProgressCounter = exports.FxModal = exports.FxChip = exports.FxButton = exports.FxAvatar = exports.AsyncDropdown = exports.AggregationsBar = void 0;
4
- var AggregationsBar_1 = require("./AggregationsBar");
5
- Object.defineProperty(exports, "AggregationsBar", { enumerable: true, get: function () { return AggregationsBar_1.AggregationsBar; } });
6
- var AsyncDropdown_1 = require("./AsyncDropdown");
7
- Object.defineProperty(exports, "AsyncDropdown", { enumerable: true, get: function () { return AsyncDropdown_1.AsyncDropdown; } });
3
+ exports.WizardContextProvider = exports.WizardContext = exports.FxWizard = exports.FxTodo = exports.FxTextField = exports.FxTag = exports.FxStatusBar = exports.FxStatisticsBar = exports.FxSlider = exports.FxShowMore = exports.FxScore = exports.FxProgressCounter = exports.FxProgressCircle = exports.FxNumberField = exports.FxNotes = exports.FxModal = exports.FxIcon = exports.FxChip = exports.FxButton = exports.FxAvatar = exports.FxAsyncDropdown = exports.FxAggregationsBar = exports.FxActionsTray = void 0;
4
+ const tslib_1 = require("tslib");
5
+ var FxActionsTray_1 = require("./FxActionsTray");
6
+ Object.defineProperty(exports, "FxActionsTray", { enumerable: true, get: function () { return FxActionsTray_1.FxActionsTray; } });
7
+ var FxAggregationsBar_1 = require("./FxAggregationsBar");
8
+ Object.defineProperty(exports, "FxAggregationsBar", { enumerable: true, get: function () { return FxAggregationsBar_1.FxAggregationsBar; } });
9
+ var FxAsyncDropdown_1 = require("./FxAsyncDropdown");
10
+ Object.defineProperty(exports, "FxAsyncDropdown", { enumerable: true, get: function () { return FxAsyncDropdown_1.FxAsyncDropdown; } });
8
11
  var FxAvatar_1 = require("./FxAvatar");
9
12
  Object.defineProperty(exports, "FxAvatar", { enumerable: true, get: function () { return FxAvatar_1.FxAvatar; } });
10
13
  var FxButton_1 = require("./FxButton");
11
14
  Object.defineProperty(exports, "FxButton", { enumerable: true, get: function () { return FxButton_1.FxButton; } });
12
15
  var FxChip_1 = require("./FxChip");
13
16
  Object.defineProperty(exports, "FxChip", { enumerable: true, get: function () { return FxChip_1.FxChip; } });
17
+ var FxIcon_1 = require("./FxIcon");
18
+ Object.defineProperty(exports, "FxIcon", { enumerable: true, get: function () { return FxIcon_1.FxIcon; } });
14
19
  var FxModal_1 = require("./FxModal");
15
20
  Object.defineProperty(exports, "FxModal", { enumerable: true, get: function () { return FxModal_1.FxModal; } });
21
+ var FxNotes_1 = require("./FxNotes");
22
+ Object.defineProperty(exports, "FxNotes", { enumerable: true, get: function () { return FxNotes_1.FxNotes; } });
23
+ var FxNumberField_1 = require("./FxNumberField");
24
+ Object.defineProperty(exports, "FxNumberField", { enumerable: true, get: function () { return FxNumberField_1.FxNumberField; } });
25
+ var FxProgressCircle_1 = require("./FxProgressCircle");
26
+ Object.defineProperty(exports, "FxProgressCircle", { enumerable: true, get: function () { return FxProgressCircle_1.FxProgressCircle; } });
16
27
  var FxProgressCounter_1 = require("./FxProgressCounter");
17
28
  Object.defineProperty(exports, "FxProgressCounter", { enumerable: true, get: function () { return FxProgressCounter_1.FxProgressCounter; } });
18
- var Tag_1 = require("./Tag/");
19
- Object.defineProperty(exports, "Tag", { enumerable: true, get: function () { return Tag_1.Tag; } });
29
+ var FxScore_1 = require("./FxScore");
30
+ Object.defineProperty(exports, "FxScore", { enumerable: true, get: function () { return FxScore_1.FxScore; } });
31
+ var FxShowMore_1 = require("./FxShowMore");
32
+ Object.defineProperty(exports, "FxShowMore", { enumerable: true, get: function () { return FxShowMore_1.FxShowMore; } });
33
+ var FxSlider_1 = require("./FxSlider");
34
+ Object.defineProperty(exports, "FxSlider", { enumerable: true, get: function () { return FxSlider_1.FxSlider; } });
35
+ var FxStatisticsBar_1 = require("./FxStatisticsBar");
36
+ Object.defineProperty(exports, "FxStatisticsBar", { enumerable: true, get: function () { return FxStatisticsBar_1.FxStatisticsBar; } });
37
+ var FxStatusBar_1 = require("./FxStatusBar");
38
+ Object.defineProperty(exports, "FxStatusBar", { enumerable: true, get: function () { return FxStatusBar_1.FxStatusBar; } });
39
+ var FxTag_1 = require("./FxTag");
40
+ Object.defineProperty(exports, "FxTag", { enumerable: true, get: function () { return FxTag_1.FxTag; } });
41
+ var FxTextField_1 = require("./FxTextField");
42
+ Object.defineProperty(exports, "FxTextField", { enumerable: true, get: function () { return FxTextField_1.FxTextField; } });
43
+ var FxTodo_1 = require("./FxTodo");
44
+ Object.defineProperty(exports, "FxTodo", { enumerable: true, get: function () { return FxTodo_1.FxTodo; } });
45
+ var FxWizard_1 = require("./FxWizard");
46
+ Object.defineProperty(exports, "FxWizard", { enumerable: true, get: function () { return FxWizard_1.FxWizard; } });
47
+ Object.defineProperty(exports, "WizardContext", { enumerable: true, get: function () { return FxWizard_1.WizardContext; } });
48
+ Object.defineProperty(exports, "WizardContextProvider", { enumerable: true, get: function () { return FxWizard_1.WizardContextProvider; } });
49
+ tslib_1.__exportStar(require("./FxStyledComponents"), exports);
@@ -3,7 +3,7 @@ import Image from 'next/image';
3
3
  import { Slide } from '@mui/material';
4
4
  import { imageLoader } from '@fixefy/fixefy-ui-utils';
5
5
  import { ActionBtn, ActionTitle, ChargesCount, ChargesTitle, Close, Container, Divider, TitleWrapper } from './styles/actions_tray.styles';
6
- export function ActionsTray({ type, onApprove, onChallenge, onClick, show, onClose, chargesCount, container, direction = 'up' }) {
6
+ export function FxActionsTray({ type, onApprove, onChallenge, onClick, show, onClose, chargesCount, container, direction = 'up' }) {
7
7
  const renderActions = () => {
8
8
  switch (type) {
9
9
  case 'approved':
@@ -0,0 +1 @@
1
+ export { FxActionsTray } from './FxActionsTray';
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import Stack from '@mui/material/Stack';
3
3
  import { structureReader } from './helpers/structureReader';
4
- export const AggregationsBar = (props) => {
4
+ export const FxAggregationsBar = (props) => {
5
5
  const { structure, minWidth, mb, filter, initialValues } = props;
6
6
  const { children, extended } = structure;
7
7
  const { variables } = extended;
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  import { Box, Stack, Divider } from '@mui/material';
3
- import { Score } from '../../Score';
4
- import { StatisticsBar } from '../../StatisticsBar';
3
+ import { FxScore } from '../../FxScore';
4
+ import { FxStatisticsBar } from '../../FxStatisticsBar';
5
5
  import { FxProgressCounter } from '../../FxProgressCounter';
6
6
  export const structureReader = (structure, filter, collapsed, initialValues) => {
7
7
  const { extended, type } = structure;
8
8
  switch (type) {
9
9
  case 'aggregations_primary_container':
10
- return structure.children.map((child, index) => child.input_type?.value === 'percentage' ? (<Score structure={child} key={index} filter={filter} value={initialValues?.score}/>) : child.input_type?.value === 'progress' ? (<FxProgressCounter structure={child} filter={filter} key={index} values={initialValues}/>) : (<Box sx={{
10
+ return structure.children.map((child, index) => child.input_type?.value === 'percentage' ? (<FxScore structure={child} key={index} filter={filter} value={initialValues?.score}/>) : child.input_type?.value === 'progress' ? (<FxProgressCounter structure={child} filter={filter} key={index} values={initialValues}/>) : (<Box sx={{
11
11
  display: 'flex',
12
12
  justifyContent: 'center',
13
13
  alignItems: 'center',
@@ -16,7 +16,7 @@ export const structureReader = (structure, filter, collapsed, initialValues) =>
16
16
  borderRadius: 2,
17
17
  backgroundColor: extended?.variables?.bg || '#FFFFFF',
18
18
  }}>
19
- <StatisticsBar structure={child} key={index} filter={filter} collapsed={collapsed} value={initialValues ? initialValues[child.extended.object_path] : null}/>
19
+ <FxStatisticsBar structure={child} key={index} filter={filter} collapsed={collapsed} value={initialValues ? initialValues[child.extended.object_path] : null}/>
20
20
  </Box>));
21
21
  case 'aggregations_secondary_container':
22
22
  return (<Stack direction="row" divider={<Divider orientation="vertical" flexItem/>} spacing={2} sx={{
@@ -25,7 +25,7 @@ export const structureReader = (structure, filter, collapsed, initialValues) =>
25
25
  padding: '24px 16px',
26
26
  }}>
27
27
  {structure.children.map((child, index) => {
28
- return <StatisticsBar structure={child} key={index} filter={filter} collapsed={collapsed} value={initialValues ? initialValues[child.extended.object_path] : null}/>;
28
+ return <FxStatisticsBar structure={child} key={index} filter={filter} collapsed={collapsed} value={initialValues ? initialValues[child.extended.object_path] : null}/>;
29
29
  })}
30
30
  </Stack>);
31
31
  }
@@ -0,0 +1 @@
1
+ export { FxAggregationsBar } from './FxAggregations';