@fixefy/fixefy-ui-components 0.3.73 → 0.3.75

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