@fixefy/fixefy-ui-components 0.3.74 → 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 +11 -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,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "FxProgressCircle", {
6
- enumerable: true,
7
- get: function() {
8
- return FxProgressCircle;
9
- }
10
- });
11
- const _jsxruntime = require("react/jsx-runtime");
12
- const _react = /*#__PURE__*/ _interop_require_default(require("react"));
13
- const _progress_circlestyles = require("./styles/progress_circle.styles");
14
- function _interop_require_default(obj) {
15
- return obj && obj.__esModule ? obj : {
16
- default: obj
17
- };
18
- }
19
- const FxProgressCircle = ({ radius = 70, border = 70, value, hasLabel = true, max = 100, color, type = 'progress' })=>{
20
- const _value = value ? value / max : 0;
21
- const p = 2 * Math.PI * (radius - border / 2);
22
- const strokeWidth = border;
23
- const strokeDashoffset = p * (1 - _value);
24
- const strokeDasharray = p;
25
- const label = type === 'progress' ? `${value}/${max}` : `${value.toFixed()}%`;
26
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_progress_circlestyles.Container, {
27
- children: [
28
- hasLabel && type === 'progress' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_progress_circlestyles.Label, {
29
- children: label
30
- }),
31
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_progress_circlestyles.Slider, {
32
- // ref={(potar) => (potar = potar)}
33
- viewBox: `0 0 ${radius * 2} ${radius * 2}`,
34
- children: [
35
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_progress_circlestyles.SliderCircle, {
36
- style: {
37
- strokeWidth
38
- },
39
- r: radius - border / 2,
40
- cx: radius,
41
- cy: radius,
42
- color: color
43
- }),
44
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_progress_circlestyles.SliderBar, {
45
- style: {
46
- strokeWidth,
47
- strokeDashoffset,
48
- strokeDasharray
49
- },
50
- r: radius - border / 2,
51
- cx: radius,
52
- cy: radius,
53
- color: color
54
- })
55
- ]
56
- }),
57
- hasLabel && type === 'percentage' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_progress_circlestyles.Label, {
58
- sx: {
59
- ml: 1
60
- },
61
- children: label
62
- })
63
- ]
64
- });
65
- };
@@ -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
- FxProgressCircle: function() {
13
- return _FxProgressCircle.FxProgressCircle;
14
- },
15
- ProgressCirclePropsType: function() {
16
- return _FxProgressCircle.ProgressCirclePropsType;
17
- }
18
- });
19
- const _FxProgressCircle = require("./FxProgressCircle");
@@ -1,106 +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
- Container: function() {
13
- return Container;
14
- },
15
- Label: function() {
16
- return Label;
17
- },
18
- Slider: function() {
19
- return Slider;
20
- },
21
- SliderBar: function() {
22
- return SliderBar;
23
- },
24
- SliderCircle: function() {
25
- return SliderCircle;
26
- }
27
- });
28
- const _styles = require("@mui/material/styles");
29
- function _define_property(obj, key, value) {
30
- if (key in obj) {
31
- Object.defineProperty(obj, key, {
32
- value: value,
33
- enumerable: true,
34
- configurable: true,
35
- writable: true
36
- });
37
- } else {
38
- obj[key] = value;
39
- }
40
- return obj;
41
- }
42
- function _object_spread(target) {
43
- for(var i = 1; i < arguments.length; i++){
44
- var source = arguments[i] != null ? arguments[i] : {};
45
- var ownKeys = Object.keys(source);
46
- if (typeof Object.getOwnPropertySymbols === "function") {
47
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
48
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
49
- }));
50
- }
51
- ownKeys.forEach(function(key) {
52
- _define_property(target, key, source[key]);
53
- });
54
- }
55
- return target;
56
- }
57
- function ownKeys(object, enumerableOnly) {
58
- var keys = Object.keys(object);
59
- if (Object.getOwnPropertySymbols) {
60
- var symbols = Object.getOwnPropertySymbols(object);
61
- if (enumerableOnly) {
62
- symbols = symbols.filter(function(sym) {
63
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
64
- });
65
- }
66
- keys.push.apply(keys, symbols);
67
- }
68
- return keys;
69
- }
70
- function _object_spread_props(target, source) {
71
- source = source != null ? source : {};
72
- if (Object.getOwnPropertyDescriptors) {
73
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
74
- } else {
75
- ownKeys(Object(source)).forEach(function(key) {
76
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
77
- });
78
- }
79
- return target;
80
- }
81
- const Container = (0, _styles.styled)("div")(({})=>({
82
- display: "flex",
83
- alignItems: "center",
84
- justifyContent: "center"
85
- }));
86
- const Label = (0, _styles.styled)("span")(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.body1), {
87
- color: theme.palette.typography.title,
88
- marginRight: 8
89
- }));
90
- const Slider = (0, _styles.styled)("svg")(({})=>({
91
- display: "block",
92
- width: 22,
93
- height: 22,
94
- transform: "rotate(-90deg)"
95
- }));
96
- const SliderCircle = (0, _styles.styled)("circle")(({ theme, color })=>({
97
- fill: "transparent",
98
- stroke: color !== null && color !== void 0 ? color : theme.palette.green2scale.main,
99
- opacity: 0.1
100
- }));
101
- const SliderBar = (0, _styles.styled)("circle")(({ theme, color })=>({
102
- fill: "transparent",
103
- stroke: color !== null && color !== void 0 ? color : theme.palette.green2scale.main,
104
- strokeDashoffset: 0,
105
- strokeDasharray: 0
106
- }));
@@ -1,168 +0,0 @@
1
- // @ts-nocheck
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "FxProgressCounter", {
7
- enumerable: true,
8
- get: function() {
9
- return FxProgressCounter;
10
- }
11
- });
12
- const _jsxruntime = require("react/jsx-runtime");
13
- const _react = /*#__PURE__*/ _interop_require_default(require("react"));
14
- const _material = require("@mui/material");
15
- const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
16
- const _progress_counterstyles = require("./styles/progress_counter.styles");
17
- const _image = /*#__PURE__*/ _interop_require_default(require("next/image"));
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 _interop_require_default(obj) {
32
- return obj && obj.__esModule ? obj : {
33
- default: obj
34
- };
35
- }
36
- function _object_spread(target) {
37
- for(var i = 1; i < arguments.length; i++){
38
- var source = arguments[i] != null ? arguments[i] : {};
39
- var ownKeys = Object.keys(source);
40
- if (typeof Object.getOwnPropertySymbols === "function") {
41
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
42
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
43
- }));
44
- }
45
- ownKeys.forEach(function(key) {
46
- _define_property(target, key, source[key]);
47
- });
48
- }
49
- return target;
50
- }
51
- function _object_without_properties(source, excluded) {
52
- if (source == null) return {};
53
- var target = _object_without_properties_loose(source, excluded);
54
- var key, i;
55
- if (Object.getOwnPropertySymbols) {
56
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
57
- for(i = 0; i < sourceSymbolKeys.length; i++){
58
- key = sourceSymbolKeys[i];
59
- if (excluded.indexOf(key) >= 0) continue;
60
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
61
- target[key] = source[key];
62
- }
63
- }
64
- return target;
65
- }
66
- function _object_without_properties_loose(source, excluded) {
67
- if (source == null) return {};
68
- var target = {};
69
- var sourceKeys = Object.keys(source);
70
- var key, i;
71
- for(i = 0; i < sourceKeys.length; i++){
72
- key = sourceKeys[i];
73
- if (excluded.indexOf(key) >= 0) continue;
74
- target[key] = source[key];
75
- }
76
- return target;
77
- }
78
- function FxProgressCounter(_param) {
79
- var { values, structure, filter } = _param, rest = _object_without_properties(_param, [
80
- "values",
81
- "structure",
82
- "filter"
83
- ]);
84
- var _values_count, _values_current;
85
- // const { extended, title } = structure ?? {};
86
- // const {
87
- // gql_operation,
88
- // object_path: objectPath,
89
- // title_path: titlePath,
90
- // filter: structureFilter,
91
- // } = extended ?? {};
92
- const initialValues = {
93
- count: (_values_count = values === null || values === void 0 ? void 0 : values.count) !== null && _values_count !== void 0 ? _values_count : 0,
94
- current: (_values_current = values === null || values === void 0 ? void 0 : values.current) !== null && _values_current !== void 0 ? _values_current : 0
95
- };
96
- // let _filter = structureFilter;
97
- // if (filter) {
98
- // _filter = {
99
- // ..._filter,
100
- // ...filter,
101
- // };
102
- // }
103
- // const { data, error, loading } = useQuery(gql(gql_operation), {
104
- // variables: {
105
- // where: { ..._filter },
106
- // },
107
- // });
108
- const normalizeNumber = (number)=>{
109
- return number / initialValues.count * 100;
110
- };
111
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_progress_counterstyles.Container, {
112
- children: [
113
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
114
- position: 'relative',
115
- textAlign: 'center',
116
- justifyContent: 'center',
117
- mt: 1.2,
118
- children: [
119
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_image.default, {
120
- alt: 'approve',
121
- width: 16,
122
- height: 16,
123
- loader: ()=>(0, _fixefyuiutils.imageLoader)({
124
- root: 'https://cdn-dev.fixefy.me/',
125
- src: 'invoices/approve-small-white.svg'
126
- }),
127
- src: 'invoices/approve-small-white.svg',
128
- onLoad: ()=>console.log('loaded'),
129
- onError: (e)=>console.log('error:', e)
130
- }),
131
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
132
- mt: 0.5,
133
- children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Typography, {
134
- fontSize: 19,
135
- fontWeight: 600,
136
- children: [
137
- initialValues.current,
138
- "/",
139
- initialValues.count
140
- ]
141
- })
142
- }),
143
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
144
- fontSize: 11,
145
- sx: {
146
- opacity: 0.6
147
- },
148
- children: "Charges"
149
- })
150
- ]
151
- }),
152
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_progress_counterstyles.ProgressContainer, {
153
- children: [
154
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_progress_counterstyles.MainBar, _object_spread({
155
- variant: "determinate",
156
- value: normalizeNumber(initialValues.current),
157
- color: 'inherit'
158
- }, rest)),
159
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_progress_counterstyles.BackgroundBar, _object_spread({
160
- variant: "determinate",
161
- value: initialValues.count > 100 ? 100 : initialValues.count,
162
- color: 'inherit'
163
- }, rest))
164
- ]
165
- })
166
- ]
167
- });
168
- }
@@ -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
- FxProgressCounter: function() {
13
- return _ProgressCounter.FxProgressCounter;
14
- },
15
- ProgressCounterPropsType: function() {
16
- return _ProgressCounter.ProgressCounterPropsType;
17
- }
18
- });
19
- const _ProgressCounter = require("./ProgressCounter");
@@ -1,61 +0,0 @@
1
- // @ts-nocheck
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
- BackgroundBar: function() {
14
- return BackgroundBar;
15
- },
16
- BaseProgress: function() {
17
- return BaseProgress;
18
- },
19
- Container: function() {
20
- return Container;
21
- },
22
- MainBar: function() {
23
- return MainBar;
24
- },
25
- ProgressContainer: function() {
26
- return ProgressContainer;
27
- }
28
- });
29
- const _styles = require("@mui/material/styles");
30
- const _material = require("@mui/material");
31
- const BaseProgress = (0, _styles.styled)(_material.LinearProgress)(({ theme })=>({
32
- borderRadius: '8px',
33
- width: '70%',
34
- position: 'absolute',
35
- zIndex: 2,
36
- height: 3
37
- }));
38
- const MainBar = (0, _styles.styled)(BaseProgress)(({ theme })=>({
39
- opacity: 1
40
- }));
41
- const BackgroundBar = (0, _styles.styled)(BaseProgress)(({ theme })=>({
42
- opacity: 0.2
43
- }));
44
- const ProgressContainer = (0, _styles.styled)(_material.Box)(({ theme })=>({
45
- alignItems: 'center',
46
- display: 'flex',
47
- width: '100%',
48
- margin: '8px 0',
49
- position: 'relative',
50
- justifyContent: 'center'
51
- }));
52
- const Container = (0, _styles.styled)(_material.Box)(({ theme })=>({
53
- width: 104,
54
- height: 104,
55
- minWidth: 104,
56
- maxWidth: 104,
57
- borderRadius: 8,
58
- position: 'relative',
59
- color: theme.palette.common.white,
60
- backgroundColor: theme.palette.score.excellent
61
- }));
@@ -1,207 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "FxScore", {
6
- enumerable: true,
7
- get: function() {
8
- return FxScore;
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 _scorestyles = require("./styles/score.styles");
16
- const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
17
- const _material = require("@mui/material");
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 _object_without_properties(source, excluded) {
88
- if (source == null) return {};
89
- var target = _object_without_properties_loose(source, excluded);
90
- var key, i;
91
- if (Object.getOwnPropertySymbols) {
92
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
93
- for(i = 0; i < sourceSymbolKeys.length; i++){
94
- key = sourceSymbolKeys[i];
95
- if (excluded.indexOf(key) >= 0) continue;
96
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
97
- target[key] = source[key];
98
- }
99
- }
100
- return target;
101
- }
102
- function _object_without_properties_loose(source, excluded) {
103
- if (source == null) return {};
104
- var target = {};
105
- var sourceKeys = Object.keys(source);
106
- var key, i;
107
- for(i = 0; i < sourceKeys.length; i++){
108
- key = sourceKeys[i];
109
- if (excluded.indexOf(key) >= 0) continue;
110
- target[key] = source[key];
111
- }
112
- return target;
113
- }
114
- const FxScore = (_param)=>{
115
- var { value, structure, filter, variant = 'box', hasLabel = true, title: propsTitle = 'score', Sizes: propsSizes = {} } = _param, rest = _object_without_properties(_param, [
116
- "value",
117
- "structure",
118
- "filter",
119
- "variant",
120
- "hasLabel",
121
- "title",
122
- "Sizes"
123
- ]);
124
- const Sizes = _object_spread({
125
- box: {
126
- boxWidth: 104,
127
- progressWidth: 68
128
- },
129
- circle: {
130
- boxWidth: 40,
131
- progressWidth: 36
132
- }
133
- }, propsSizes);
134
- const { extended, title } = structure || {};
135
- const { gql_operation, object_path: objectPath, filter: structureFilter } = extended || {};
136
- 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 }" } ) }';
137
- let _filter = structureFilter;
138
- if (filter) {
139
- _filter = _object_spread({}, _filter, filter);
140
- }
141
- const [fetchData, { data, loading }] = (0, _client.useLazyQuery)((0, _graphqltag.gql)(gqlOperation));
142
- (0, _react.useEffect)(()=>{
143
- if (!value && structure) {
144
- fetchData({
145
- variables: {
146
- where: _object_spread({}, _filter)
147
- }
148
- });
149
- }
150
- }, []);
151
- const ScoreValue = data ? data[objectPath] * 100 : value;
152
- const _classes = (0, _scorestyles.useStyles)({
153
- scoreColor: (0, _fixefyuiutils.getScoreColor)(ScoreValue || 0),
154
- variant
155
- });
156
- var _Math_round;
157
- return loading ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
158
- className: _classes.container,
159
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Skeleton, {
160
- animation: "wave",
161
- variant: "circular",
162
- width: 68,
163
- height: 68
164
- })
165
- }) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
166
- className: _classes.container,
167
- sx: {
168
- width: Sizes[variant].boxWidth,
169
- height: Sizes[variant].boxWidth,
170
- minWidth: Sizes[variant].boxWidth,
171
- maxWidth: Sizes[variant].boxWidth,
172
- borderRadius: variant === 'box' ? '8px' : '50%'
173
- },
174
- children: [
175
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.CircularProgress, _object_spread({
176
- size: Sizes[variant].progressWidth,
177
- variant: "determinate",
178
- value: ScoreValue,
179
- color: "inherit",
180
- thickness: 2,
181
- className: _classes.mainCircle
182
- }, rest)),
183
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.CircularProgress, _object_spread({
184
- size: Sizes[variant].progressWidth,
185
- variant: "determinate",
186
- value: 100,
187
- color: "inherit",
188
- thickness: 2,
189
- className: _classes.backgroundCircle
190
- }, rest)),
191
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
192
- className: _classes.content,
193
- children: [
194
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
195
- variant: variant === 'box' ? 'h5' : 'table',
196
- className: _classes.scoreNumber,
197
- children: `${(_Math_round = Math.round(Number(ScoreValue))) !== null && _Math_round !== void 0 ? _Math_round : 0}%`
198
- }),
199
- hasLabel && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
200
- className: _classes.scoreText,
201
- children: (0, _fixefyuiutils.titleCase)(title !== null && title !== void 0 ? title : propsTitle)
202
- })
203
- ]
204
- })
205
- ]
206
- });
207
- };
@@ -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
- FxScore: function() {
13
- return _FxScore.FxScore;
14
- },
15
- ScorePropsType: function() {
16
- return _FxScore.ScorePropsType;
17
- }
18
- });
19
- const _FxScore = require("./FxScore");