@fixefy/fixefy-ui-components 0.3.108 → 0.3.110

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/FxAsyncDropdown/FxAsyncDropdown.js +3 -3
  2. package/dist/FxDatesProgress/styles/progress.styles.js +1 -1
  3. package/dist/FxUserImage/FxUserImage.js +2 -2
  4. package/dist/fixefy-ui-components/src/FxActionsTray/FxActionsTray.js +111 -0
  5. package/dist/fixefy-ui-components/src/FxActionsTray/index.js +11 -0
  6. package/dist/fixefy-ui-components/src/FxActionsTray/styles/actionsTray.style.js +114 -0
  7. package/dist/fixefy-ui-components/src/FxAggregationsBar/FxAggregations.js +41 -0
  8. package/dist/fixefy-ui-components/src/FxAggregationsBar/helpers/structureReader.js +80 -0
  9. package/dist/fixefy-ui-components/src/FxAggregationsBar/index.js +22 -0
  10. package/dist/fixefy-ui-components/src/FxAggregationsBar/operations/query.js +73 -0
  11. package/dist/fixefy-ui-components/src/FxAsyncDropdown/FxAsyncDropdown.js +500 -0
  12. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/CheckboxIcon.js +44 -0
  13. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/ChipOption.js +35 -0
  14. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/ChosenIcon.js +45 -0
  15. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/DeleteButton.js +37 -0
  16. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/LogoOption.js +101 -0
  17. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/TextOption.js +74 -0
  18. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/index.js +36 -0
  19. package/dist/fixefy-ui-components/src/FxAsyncDropdown/helpers/helpers.js +233 -0
  20. package/dist/fixefy-ui-components/src/FxAsyncDropdown/index.js +11 -0
  21. package/dist/fixefy-ui-components/src/FxAsyncDropdown/styles/dropdown.styles.js +211 -0
  22. package/dist/fixefy-ui-components/src/FxAsyncDropdown/types.js +4 -0
  23. package/dist/fixefy-ui-components/src/FxAvatar/FxAvatar.js +145 -0
  24. package/dist/fixefy-ui-components/src/FxAvatar/helpers/stringToColor.js +23 -0
  25. package/dist/fixefy-ui-components/src/FxAvatar/index.js +22 -0
  26. package/dist/fixefy-ui-components/src/FxAvatar/styles/avatar.styles.js +233 -0
  27. package/dist/fixefy-ui-components/src/FxButton/FxButton.js +106 -0
  28. package/dist/fixefy-ui-components/src/FxButton/index.js +19 -0
  29. package/dist/fixefy-ui-components/src/FxButton/styles/button.styles.js +28 -0
  30. package/dist/fixefy-ui-components/src/FxButtonModalWithComponent/FxButtonModalWithComponent.js +118 -0
  31. package/dist/fixefy-ui-components/src/FxButtonModalWithComponent/index.js +11 -0
  32. package/dist/fixefy-ui-components/src/FxButtonModalWithMenu/FxButtonModalWithMenu.js +126 -0
  33. package/dist/fixefy-ui-components/src/FxButtonModalWithMenu/index.js +11 -0
  34. package/dist/fixefy-ui-components/src/FxChip/FxChip.js +75 -0
  35. package/dist/fixefy-ui-components/src/FxChip/index.js +19 -0
  36. package/dist/fixefy-ui-components/src/FxChip/styles/chip.styles.js +147 -0
  37. package/dist/fixefy-ui-components/src/FxDatesProgress/FxDatesProgress.js +126 -0
  38. package/dist/fixefy-ui-components/src/FxDatesProgress/index.js +11 -0
  39. package/dist/fixefy-ui-components/src/FxDatesProgress/styles/progress.styles.js +24 -0
  40. package/dist/fixefy-ui-components/src/FxGeneralModal/FxGeneralModal.js +107 -0
  41. package/dist/fixefy-ui-components/src/FxGeneralModal/index.js +11 -0
  42. package/dist/fixefy-ui-components/src/FxGridEmptyState/FxGridEmptyState.js +86 -0
  43. package/dist/fixefy-ui-components/src/FxGridEmptyState/index.js +11 -0
  44. package/dist/fixefy-ui-components/src/FxGridError/FxGridError.js +91 -0
  45. package/dist/fixefy-ui-components/src/FxGridError/index.js +11 -0
  46. package/dist/fixefy-ui-components/src/FxIcon/FxIcon.js +118 -0
  47. package/dist/fixefy-ui-components/src/FxIcon/content/dynamic_icon.js +20 -0
  48. package/dist/fixefy-ui-components/src/FxIcon/content/index.js +20 -0
  49. package/dist/fixefy-ui-components/src/FxIcon/content/lazy_icon.js +87 -0
  50. package/dist/fixefy-ui-components/src/FxIcon/index.js +11 -0
  51. package/dist/fixefy-ui-components/src/FxMenuItemWithIcon/FxMenuItemWithIcon.js +84 -0
  52. package/dist/fixefy-ui-components/src/FxMenuItemWithIcon/index.js +11 -0
  53. package/dist/fixefy-ui-components/src/FxModal/FxModal.js +171 -0
  54. package/dist/fixefy-ui-components/src/FxModal/index.js +19 -0
  55. package/dist/fixefy-ui-components/src/FxModal/styles/modal.style.js +66 -0
  56. package/dist/fixefy-ui-components/src/FxNotes/FxNotes.js +216 -0
  57. package/dist/fixefy-ui-components/src/FxNotes/helpers/stringToColor.js +26 -0
  58. package/dist/fixefy-ui-components/src/FxNotes/index.js +22 -0
  59. package/dist/fixefy-ui-components/src/FxNotes/operations/queries.js +35 -0
  60. package/dist/fixefy-ui-components/src/FxNotes/styles/notes.styles.js +168 -0
  61. package/dist/fixefy-ui-components/src/FxNumberField/FxNumberField.js +108 -0
  62. package/dist/fixefy-ui-components/src/FxNumberField/index.js +19 -0
  63. package/dist/fixefy-ui-components/src/FxNumberField/styles/number_field.styles.js +99 -0
  64. package/dist/fixefy-ui-components/src/FxObjStaticDropdown/FxObjStaticDropdown.js +548 -0
  65. package/dist/fixefy-ui-components/src/FxObjStaticDropdown/index.js +25 -0
  66. package/dist/fixefy-ui-components/src/FxObjStaticDropdown/styles/dropdown.styles.js +211 -0
  67. package/dist/fixefy-ui-components/src/FxPopper/Popper.js +139 -0
  68. package/dist/fixefy-ui-components/src/FxPopper/PopperWithOutside.js +116 -0
  69. package/dist/fixefy-ui-components/src/FxPopper/content/PopperHeader.js +36 -0
  70. package/dist/fixefy-ui-components/src/FxPopper/content/index.js +11 -0
  71. package/dist/fixefy-ui-components/src/FxPopper/index.js +24 -0
  72. package/dist/fixefy-ui-components/src/FxPopper/styles/popper.styles.js +138 -0
  73. package/dist/fixefy-ui-components/src/FxProgressCircle/FxProgressCircle.js +65 -0
  74. package/dist/fixefy-ui-components/src/FxProgressCircle/index.js +19 -0
  75. package/dist/fixefy-ui-components/src/FxProgressCircle/styles/progress_circle.styles.js +106 -0
  76. package/dist/fixefy-ui-components/src/FxProgressCounter/ProgressCounter.js +168 -0
  77. package/dist/fixefy-ui-components/src/FxProgressCounter/index.js +19 -0
  78. package/dist/fixefy-ui-components/src/FxProgressCounter/styles/progress_counter.styles.js +66 -0
  79. package/dist/fixefy-ui-components/src/FxScore/FxScore.js +215 -0
  80. package/dist/fixefy-ui-components/src/FxScore/index.js +19 -0
  81. package/dist/fixefy-ui-components/src/FxScore/styles/score.styles.js +102 -0
  82. package/dist/fixefy-ui-components/src/FxShowMore/FxShowMore.js +80 -0
  83. package/dist/fixefy-ui-components/src/FxShowMore/index.js +19 -0
  84. package/dist/fixefy-ui-components/src/FxShowMore/styles/show_more.styles.js +143 -0
  85. package/dist/fixefy-ui-components/src/FxSlider/FxSlider.js +49 -0
  86. package/dist/fixefy-ui-components/src/FxSlider/index.js +19 -0
  87. package/dist/fixefy-ui-components/src/FxStatisticsBar/FxStatisticsBar.js +198 -0
  88. package/dist/fixefy-ui-components/src/FxStatisticsBar/index.js +19 -0
  89. package/dist/fixefy-ui-components/src/FxStatisticsBar/styles/statistics.styles.js +103 -0
  90. package/dist/fixefy-ui-components/src/FxStatusBar/FxStatusBar.js +149 -0
  91. package/dist/fixefy-ui-components/src/FxStatusBar/helpers/constants.js +22 -0
  92. package/dist/fixefy-ui-components/src/FxStatusBar/index.js +22 -0
  93. package/dist/fixefy-ui-components/src/FxStatusBar/styles/statusBar.styles.js +138 -0
  94. package/dist/fixefy-ui-components/src/FxStrStaticDropdown/FxStrStaticDropdown.js +382 -0
  95. package/dist/fixefy-ui-components/src/FxStrStaticDropdown/helpers/helpers.js +22 -0
  96. package/dist/fixefy-ui-components/src/FxStrStaticDropdown/index.js +11 -0
  97. package/dist/fixefy-ui-components/src/FxStrStaticDropdown/styles/dropdown.styles.js +190 -0
  98. package/dist/fixefy-ui-components/src/FxStyledButton/FxStyledButton.js +57 -0
  99. package/dist/fixefy-ui-components/src/FxStyledButton/index.js +11 -0
  100. package/dist/fixefy-ui-components/src/FxStyledComponents/index.js +319 -0
  101. package/dist/fixefy-ui-components/src/FxSwitch/FxSwitch.js +106 -0
  102. package/dist/fixefy-ui-components/src/FxSwitch/index.js +19 -0
  103. package/dist/fixefy-ui-components/src/FxSwitch/styles/switch.styles.js +42 -0
  104. package/dist/fixefy-ui-components/src/FxTabs/FxTabs.js +79 -0
  105. package/dist/fixefy-ui-components/src/FxTabs/index.js +11 -0
  106. package/dist/fixefy-ui-components/src/FxTag/FxTag.js +50 -0
  107. package/dist/fixefy-ui-components/src/FxTag/index.js +19 -0
  108. package/dist/fixefy-ui-components/src/FxTag/styles/tag.styles.js +106 -0
  109. package/dist/fixefy-ui-components/src/FxTextField/FxTextField.js +211 -0
  110. package/dist/fixefy-ui-components/src/FxTextField/index.js +19 -0
  111. package/dist/fixefy-ui-components/src/FxTodo/FxTodo.js +95 -0
  112. package/dist/fixefy-ui-components/src/FxTodo/index.js +22 -0
  113. package/dist/fixefy-ui-components/src/FxTodo/styles/todo.styles.js +183 -0
  114. package/dist/fixefy-ui-components/src/FxToggleButtons/FxToggleButtons.js +69 -0
  115. package/dist/fixefy-ui-components/src/FxToggleButtons/index.js +11 -0
  116. package/dist/fixefy-ui-components/src/FxUserImage/FxUserImage.js +236 -0
  117. package/dist/fixefy-ui-components/src/FxUserImage/index.js +11 -0
  118. package/dist/fixefy-ui-components/src/FxWizard/FxWizard.js +50 -0
  119. package/dist/fixefy-ui-components/src/FxWizard/index.js +19 -0
  120. package/dist/fixefy-ui-components/src/FxWizard/steps launcher/StepsLauncher.js +52 -0
  121. package/dist/fixefy-ui-components/src/FxWizard/steps launcher/index.js +18 -0
  122. package/dist/fixefy-ui-components/src/index.js +277 -0
  123. package/package.json +4 -5
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useStyles", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return useStyles;
9
+ }
10
+ });
11
+ const _makeStyles = /*#__PURE__*/ _interop_require_default(require("@mui/styles/makeStyles"));
12
+ function _define_property(obj, key, value) {
13
+ if (key in obj) {
14
+ Object.defineProperty(obj, key, {
15
+ value: value,
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true
19
+ });
20
+ } else {
21
+ obj[key] = value;
22
+ }
23
+ return obj;
24
+ }
25
+ function _interop_require_default(obj) {
26
+ return obj && obj.__esModule ? obj : {
27
+ default: obj
28
+ };
29
+ }
30
+ function _object_spread(target) {
31
+ for(var i = 1; i < arguments.length; i++){
32
+ var source = arguments[i] != null ? arguments[i] : {};
33
+ var ownKeys = Object.keys(source);
34
+ if (typeof Object.getOwnPropertySymbols === "function") {
35
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
36
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
37
+ }));
38
+ }
39
+ ownKeys.forEach(function(key) {
40
+ _define_property(target, key, source[key]);
41
+ });
42
+ }
43
+ return target;
44
+ }
45
+ function ownKeys(object, enumerableOnly) {
46
+ var keys = Object.keys(object);
47
+ if (Object.getOwnPropertySymbols) {
48
+ var symbols = Object.getOwnPropertySymbols(object);
49
+ if (enumerableOnly) {
50
+ symbols = symbols.filter(function(sym) {
51
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
52
+ });
53
+ }
54
+ keys.push.apply(keys, symbols);
55
+ }
56
+ return keys;
57
+ }
58
+ function _object_spread_props(target, source) {
59
+ source = source != null ? source : {};
60
+ if (Object.getOwnPropertyDescriptors) {
61
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
62
+ } else {
63
+ ownKeys(Object(source)).forEach(function(key) {
64
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
65
+ });
66
+ }
67
+ return target;
68
+ }
69
+ const useStyles = (0, _makeStyles.default)((theme)=>({
70
+ container: {
71
+ display: 'flex',
72
+ justifyContent: 'center',
73
+ alignItems: 'center',
74
+ position: 'relative',
75
+ color: theme.palette.common.white,
76
+ backgroundColor: (props)=>theme.palette.score[props.scoreColor]
77
+ },
78
+ content: {
79
+ position: 'absolute',
80
+ display: 'flex',
81
+ justifyContent: 'center',
82
+ alignItems: 'center',
83
+ flexDirection: 'column'
84
+ },
85
+ scoreNumber: {
86
+ color: theme.palette.common.white,
87
+ fontWeight: 700
88
+ },
89
+ scoreText: _object_spread_props(_object_spread({}, theme.typography.table), {
90
+ fontWeight: 400,
91
+ color: theme.palette.common.white,
92
+ opacity: 0.6
93
+ }),
94
+ mainCircle: {
95
+ position: 'absolute',
96
+ zIndex: 2
97
+ },
98
+ backgroundCircle: {
99
+ position: 'absolute',
100
+ opacity: 0.2
101
+ }
102
+ }));
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxShowMore", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return FxShowMore;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
13
+ const _Typography = /*#__PURE__*/ _interop_require_default(require("@mui/material/Typography"));
14
+ const _show_morestyles = require("./styles/show_more.styles");
15
+ const _KeyboardArrowDown = /*#__PURE__*/ _interop_require_default(require("@mui/icons-material/KeyboardArrowDown"));
16
+ function _interop_require_default(obj) {
17
+ return obj && obj.__esModule ? obj : {
18
+ default: obj
19
+ };
20
+ }
21
+ function FxShowMore({ items, label, children, title }) {
22
+ const [anchorEl, setAnchorEl] = _react.default.useState(null);
23
+ const handleClick = (event)=>{
24
+ setAnchorEl(event.currentTarget);
25
+ };
26
+ const handleClose = ()=>{
27
+ setAnchorEl(null);
28
+ };
29
+ const open = Boolean(anchorEl);
30
+ const id = open ? 'simple-popover' : undefined;
31
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_show_morestyles.ShowMoreWrapper, {
32
+ children: [
33
+ children,
34
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_show_morestyles.ShowMoreBtn, {
35
+ onClick: handleClick,
36
+ children: [
37
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_show_morestyles.ShowMoreIcon, {
38
+ isOpen: open,
39
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_KeyboardArrowDown.default, {})
40
+ }),
41
+ title ? title : 'SHOW MORE'
42
+ ]
43
+ }),
44
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_show_morestyles.StyledPopover, {
45
+ id: id,
46
+ open: open,
47
+ anchorEl: anchorEl,
48
+ onClose: handleClose,
49
+ anchorOrigin: {
50
+ vertical: 'bottom',
51
+ horizontal: 'center'
52
+ },
53
+ transformOrigin: {
54
+ vertical: 'top',
55
+ horizontal: 'center'
56
+ },
57
+ children: [
58
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_show_morestyles.StyledLabel, {
59
+ children: [
60
+ label,
61
+ " (",
62
+ items.length,
63
+ ")"
64
+ ]
65
+ }),
66
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_show_morestyles.StyledDivider, {}),
67
+ items === null || items === void 0 ? void 0 : items.map((item, index)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
68
+ children: [
69
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
70
+ variant: "body1",
71
+ children: item
72
+ }),
73
+ index + 1 !== items.length && /*#__PURE__*/ (0, _jsxruntime.jsx)(_show_morestyles.StyledDivider, {})
74
+ ]
75
+ }, index))
76
+ ]
77
+ })
78
+ ]
79
+ });
80
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ FxShowMore: function() {
13
+ return _FxShowMore.FxShowMore;
14
+ },
15
+ ShowMorePropsType: function() {
16
+ return _FxShowMore.ShowMorePropsType;
17
+ }
18
+ });
19
+ const _FxShowMore = require("./FxShowMore");
@@ -0,0 +1,143 @@
1
+ // import React from 'react'
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ function _export(target, all) {
7
+ for(var name in all)Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ ShowMoreBtn: function() {
14
+ return ShowMoreBtn;
15
+ },
16
+ ShowMoreIcon: function() {
17
+ return ShowMoreIcon;
18
+ },
19
+ ShowMoreWrapper: function() {
20
+ return ShowMoreWrapper;
21
+ },
22
+ StyledDivider: function() {
23
+ return StyledDivider;
24
+ },
25
+ StyledLabel: function() {
26
+ return StyledLabel;
27
+ },
28
+ StyledPopover: function() {
29
+ return StyledPopover;
30
+ }
31
+ });
32
+ const _styles = require("@mui/material/styles");
33
+ const _Box = /*#__PURE__*/ _interop_require_default(require("@mui/material/Box"));
34
+ const _Popover = /*#__PURE__*/ _interop_require_default(require("@mui/material/Popover"));
35
+ const _Divider = /*#__PURE__*/ _interop_require_default(require("@mui/material/Divider"));
36
+ const _Typography = /*#__PURE__*/ _interop_require_default(require("@mui/material/Typography"));
37
+ const _Button = /*#__PURE__*/ _interop_require_default(require("@mui/material/Button"));
38
+ function _define_property(obj, key, value) {
39
+ if (key in obj) {
40
+ Object.defineProperty(obj, key, {
41
+ value: value,
42
+ enumerable: true,
43
+ configurable: true,
44
+ writable: true
45
+ });
46
+ } else {
47
+ obj[key] = value;
48
+ }
49
+ return obj;
50
+ }
51
+ function _interop_require_default(obj) {
52
+ return obj && obj.__esModule ? obj : {
53
+ default: obj
54
+ };
55
+ }
56
+ function _object_spread(target) {
57
+ for(var i = 1; i < arguments.length; i++){
58
+ var source = arguments[i] != null ? arguments[i] : {};
59
+ var ownKeys = Object.keys(source);
60
+ if (typeof Object.getOwnPropertySymbols === "function") {
61
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
62
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
63
+ }));
64
+ }
65
+ ownKeys.forEach(function(key) {
66
+ _define_property(target, key, source[key]);
67
+ });
68
+ }
69
+ return target;
70
+ }
71
+ function ownKeys(object, enumerableOnly) {
72
+ var keys = Object.keys(object);
73
+ if (Object.getOwnPropertySymbols) {
74
+ var symbols = Object.getOwnPropertySymbols(object);
75
+ if (enumerableOnly) {
76
+ symbols = symbols.filter(function(sym) {
77
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
78
+ });
79
+ }
80
+ keys.push.apply(keys, symbols);
81
+ }
82
+ return keys;
83
+ }
84
+ function _object_spread_props(target, source) {
85
+ source = source != null ? source : {};
86
+ if (Object.getOwnPropertyDescriptors) {
87
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
88
+ } else {
89
+ ownKeys(Object(source)).forEach(function(key) {
90
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
91
+ });
92
+ }
93
+ return target;
94
+ }
95
+ const ShowMoreWrapper = (0, _styles.styled)(_Box.default)(({})=>({
96
+ borderRadius: '8px'
97
+ }));
98
+ const ShowMoreBtn = (0, _styles.styled)(_Button.default)(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.button), {
99
+ fontWeight: 600,
100
+ fontSize: 12,
101
+ textTransform: 'uppercase',
102
+ color: theme.palette.primary[800],
103
+ padding: 0,
104
+ display: 'flex',
105
+ justifyContent: 'flex-start',
106
+ alignItems: 'center'
107
+ }));
108
+ const ShowMoreIcon = (0, _styles.styled)(_Box.default)(({ theme, isOpen })=>({
109
+ width: 16,
110
+ height: 16,
111
+ color: theme.palette.primary[800],
112
+ borderRadius: '50%',
113
+ border: '1px solid',
114
+ display: 'flex',
115
+ justifyContent: 'center',
116
+ alignItems: 'center',
117
+ marginRight: 8,
118
+ ['& svg']: {
119
+ width: 14,
120
+ height: 14,
121
+ color: theme.palette.primary[800],
122
+ transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)',
123
+ transition: 'all 0.5s'
124
+ }
125
+ }));
126
+ const StyledPopover = (0, _styles.styled)(_Popover.default)(({ theme })=>({
127
+ ['.MuiPaper-root']: {
128
+ background: theme.palette.common.white,
129
+ boxShadow: '0px 0px 10px rgba(86, 135, 147, 0.3)',
130
+ borderRadius: 8,
131
+ padding: 24,
132
+ marginTop: 8,
133
+ minWidth: 226,
134
+ maxWidth: 328
135
+ }
136
+ }));
137
+ const StyledDivider = (0, _styles.styled)(_Divider.default)(({})=>({
138
+ marginTop: 8,
139
+ marginBottom: 8
140
+ }));
141
+ const StyledLabel = (0, _styles.styled)(_Typography.default)(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.overLineCaption), {
142
+ color: '#8B9092'
143
+ }));
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxSlider", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return FxSlider;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
13
+ const _Slider = /*#__PURE__*/ _interop_require_default(require("@mui/material/Slider"));
14
+ function _define_property(obj, key, value) {
15
+ if (key in obj) {
16
+ Object.defineProperty(obj, key, {
17
+ value: value,
18
+ enumerable: true,
19
+ configurable: true,
20
+ writable: true
21
+ });
22
+ } else {
23
+ obj[key] = value;
24
+ }
25
+ return obj;
26
+ }
27
+ function _interop_require_default(obj) {
28
+ return obj && obj.__esModule ? obj : {
29
+ default: obj
30
+ };
31
+ }
32
+ function _object_spread(target) {
33
+ for(var i = 1; i < arguments.length; i++){
34
+ var source = arguments[i] != null ? arguments[i] : {};
35
+ var ownKeys = Object.keys(source);
36
+ if (typeof Object.getOwnPropertySymbols === "function") {
37
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
38
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
39
+ }));
40
+ }
41
+ ownKeys.forEach(function(key) {
42
+ _define_property(target, key, source[key]);
43
+ });
44
+ }
45
+ return target;
46
+ }
47
+ function FxSlider(props) {
48
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Slider.default, _object_spread({}, props));
49
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ FxSlider: function() {
13
+ return _FxSlider.FxSlider;
14
+ },
15
+ SliderPropsType: function() {
16
+ return _FxSlider.SliderPropsType;
17
+ }
18
+ });
19
+ const _FxSlider = require("./FxSlider");
@@ -0,0 +1,198 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxStatisticsBar", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return FxStatisticsBar;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
13
+ const _graphqltag = require("graphql-tag");
14
+ const _hooks = require("@apollo/client/react/hooks");
15
+ const _Box = /*#__PURE__*/ _interop_require_default(require("@mui/material/Box"));
16
+ const _Skeleton = /*#__PURE__*/ _interop_require_default(require("@mui/material/Skeleton"));
17
+ const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
18
+ const _statisticsstyles = require("./styles/statistics.styles");
19
+ function _define_property(obj, key, value) {
20
+ if (key in obj) {
21
+ Object.defineProperty(obj, key, {
22
+ value: value,
23
+ enumerable: true,
24
+ configurable: true,
25
+ writable: true
26
+ });
27
+ } else {
28
+ obj[key] = value;
29
+ }
30
+ return obj;
31
+ }
32
+ function _interop_require_default(obj) {
33
+ return obj && obj.__esModule ? obj : {
34
+ default: obj
35
+ };
36
+ }
37
+ function _getRequireWildcardCache(nodeInterop) {
38
+ if (typeof WeakMap !== "function") return null;
39
+ var cacheBabelInterop = new WeakMap();
40
+ var cacheNodeInterop = new WeakMap();
41
+ return (_getRequireWildcardCache = function(nodeInterop) {
42
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
43
+ })(nodeInterop);
44
+ }
45
+ function _interop_require_wildcard(obj, nodeInterop) {
46
+ if (!nodeInterop && obj && obj.__esModule) {
47
+ return obj;
48
+ }
49
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
50
+ return {
51
+ default: obj
52
+ };
53
+ }
54
+ var cache = _getRequireWildcardCache(nodeInterop);
55
+ if (cache && cache.has(obj)) {
56
+ return cache.get(obj);
57
+ }
58
+ var newObj = {
59
+ __proto__: null
60
+ };
61
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
62
+ for(var key in obj){
63
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
64
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
65
+ if (desc && (desc.get || desc.set)) {
66
+ Object.defineProperty(newObj, key, desc);
67
+ } else {
68
+ newObj[key] = obj[key];
69
+ }
70
+ }
71
+ }
72
+ newObj.default = obj;
73
+ if (cache) {
74
+ cache.set(obj, newObj);
75
+ }
76
+ return newObj;
77
+ }
78
+ function _object_spread(target) {
79
+ for(var i = 1; i < arguments.length; i++){
80
+ var source = arguments[i] != null ? arguments[i] : {};
81
+ var ownKeys = Object.keys(source);
82
+ if (typeof Object.getOwnPropertySymbols === "function") {
83
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
84
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
85
+ }));
86
+ }
87
+ ownKeys.forEach(function(key) {
88
+ _define_property(target, key, source[key]);
89
+ });
90
+ }
91
+ return target;
92
+ }
93
+ function FxStatisticsBar({ value, type = 'currency', label, structure, collapsed, filter }) {
94
+ const _classes = (0, _statisticsstyles.useStyles)();
95
+ const { extended, input_type, title } = structure || {};
96
+ const { gql_operation, object_path, filter: structurefilter, variables } = extended || {};
97
+ const gqlOperation = gql_operation !== null && gql_operation !== void 0 ? gql_operation : 'query GET_SCORE($where: Json) { score: chargesAvg( where: $where data: { fields: ["score"], fragment: "{ score }" } ) }';
98
+ let _filter = structurefilter;
99
+ if (filter) {
100
+ _filter = _object_spread({}, _filter, filter);
101
+ }
102
+ const [fetchData, { data, loading }] = (0, _hooks.useLazyQuery)((0, _graphqltag.gql)(gqlOperation));
103
+ const convertValue = (value)=>{
104
+ var _getCurrency;
105
+ let newValue = '';
106
+ let sign = '';
107
+ if (value < 1000) {
108
+ newValue = value;
109
+ } else if (value >= 1000 && value < 1000000) {
110
+ newValue = (value / 1000).toFixed(2);
111
+ sign = 'K';
112
+ } else {
113
+ newValue = (value / 1000000).toFixed(2);
114
+ sign = 'M';
115
+ }
116
+ return new Intl.NumberFormat('en-US', {
117
+ style: 'currency',
118
+ currency: ((_getCurrency = (0, _fixefyuiutils.getCurrency)(null)) === null || _getCurrency === void 0 ? void 0 : _getCurrency.code.toUpperCase()) || 'USD'
119
+ }).format(Number(newValue)) + sign;
120
+ };
121
+ const checkIsCollapsed = ()=>{
122
+ let collapsedFromStructureIsDefined = false;
123
+ if (variables && variables.collapsed !== undefined && variables.collapsed !== null) {
124
+ collapsedFromStructureIsDefined = true;
125
+ }
126
+ if (collapsedFromStructureIsDefined) {
127
+ return variables.collapsed;
128
+ } else {
129
+ return collapsed;
130
+ }
131
+ };
132
+ const getValue = (value)=>{
133
+ const statisticsType = (input_type === null || input_type === void 0 ? void 0 : input_type.value) || type;
134
+ switch(statisticsType){
135
+ case 'percentage':
136
+ {
137
+ return value + '%';
138
+ // return new Intl.NumberFormat('en-US', {
139
+ // style: 'percent',
140
+ // }).format(Number(value))
141
+ }
142
+ case 'currency':
143
+ {
144
+ if (checkIsCollapsed()) {
145
+ return convertValue(value);
146
+ } else {
147
+ var _getCurrency;
148
+ return new Intl.NumberFormat('en-US', {
149
+ style: 'currency',
150
+ currency: ((_getCurrency = (0, _fixefyuiutils.getCurrency)(null)) === null || _getCurrency === void 0 ? void 0 : _getCurrency.code.toUpperCase()) || 'USD'
151
+ }).format(Number(value));
152
+ }
153
+ }
154
+ default:
155
+ return value;
156
+ }
157
+ };
158
+ (0, _react.useEffect)(()=>{
159
+ if (!value && structure) {
160
+ fetchData({
161
+ variables: {
162
+ where: _object_spread({}, _filter)
163
+ }
164
+ });
165
+ }
166
+ }, []);
167
+ const statisticsTitle = label ? label : title;
168
+ const statisticsValue = data && data[object_path] != null ? getValue(data[object_path]) : getValue(value);
169
+ return loading ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
170
+ sx: {
171
+ width: 100
172
+ },
173
+ children: [
174
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_Skeleton.default, {
175
+ animation: "wave",
176
+ width: 100,
177
+ height: 30
178
+ }),
179
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_Skeleton.default, {
180
+ animation: "wave",
181
+ width: 100,
182
+ height: 20
183
+ })
184
+ ]
185
+ }) : /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
186
+ className: _classes.container,
187
+ children: [
188
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
189
+ className: (variables === null || variables === void 0 ? void 0 : variables.contrast) ? _classes.contrastValue : _classes.value,
190
+ children: statisticsValue
191
+ }),
192
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
193
+ className: (variables === null || variables === void 0 ? void 0 : variables.contrast) ? _classes.contrastLabel : _classes.label,
194
+ children: (0, _fixefyuiutils.titleCase)(statisticsTitle)
195
+ })
196
+ ]
197
+ });
198
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ FxStatisticsBar: function() {
13
+ return _FxStatisticsBar.FxStatisticsBar;
14
+ },
15
+ StatisticsPropsType: function() {
16
+ return _FxStatisticsBar.StatisticsPropsType;
17
+ }
18
+ });
19
+ const _FxStatisticsBar = require("./FxStatisticsBar");