@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.
- package/dist/FxAsyncDropdown/FxAsyncDropdown.js +3 -3
- package/dist/FxDatesProgress/styles/progress.styles.js +1 -1
- package/dist/FxUserImage/FxUserImage.js +2 -2
- package/dist/fixefy-ui-components/src/FxActionsTray/FxActionsTray.js +111 -0
- package/dist/fixefy-ui-components/src/FxActionsTray/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxActionsTray/styles/actionsTray.style.js +114 -0
- package/dist/fixefy-ui-components/src/FxAggregationsBar/FxAggregations.js +41 -0
- package/dist/fixefy-ui-components/src/FxAggregationsBar/helpers/structureReader.js +80 -0
- package/dist/fixefy-ui-components/src/FxAggregationsBar/index.js +22 -0
- package/dist/fixefy-ui-components/src/FxAggregationsBar/operations/query.js +73 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/FxAsyncDropdown.js +500 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/CheckboxIcon.js +44 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/ChipOption.js +35 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/ChosenIcon.js +45 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/DeleteButton.js +37 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/LogoOption.js +101 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/TextOption.js +74 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/index.js +36 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/helpers/helpers.js +233 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/styles/dropdown.styles.js +211 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/types.js +4 -0
- package/dist/fixefy-ui-components/src/FxAvatar/FxAvatar.js +145 -0
- package/dist/fixefy-ui-components/src/FxAvatar/helpers/stringToColor.js +23 -0
- package/dist/fixefy-ui-components/src/FxAvatar/index.js +22 -0
- package/dist/fixefy-ui-components/src/FxAvatar/styles/avatar.styles.js +233 -0
- package/dist/fixefy-ui-components/src/FxButton/FxButton.js +106 -0
- package/dist/fixefy-ui-components/src/FxButton/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxButton/styles/button.styles.js +28 -0
- package/dist/fixefy-ui-components/src/FxButtonModalWithComponent/FxButtonModalWithComponent.js +118 -0
- package/dist/fixefy-ui-components/src/FxButtonModalWithComponent/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxButtonModalWithMenu/FxButtonModalWithMenu.js +126 -0
- package/dist/fixefy-ui-components/src/FxButtonModalWithMenu/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxChip/FxChip.js +75 -0
- package/dist/fixefy-ui-components/src/FxChip/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxChip/styles/chip.styles.js +147 -0
- package/dist/fixefy-ui-components/src/FxDatesProgress/FxDatesProgress.js +126 -0
- package/dist/fixefy-ui-components/src/FxDatesProgress/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxDatesProgress/styles/progress.styles.js +24 -0
- package/dist/fixefy-ui-components/src/FxGeneralModal/FxGeneralModal.js +107 -0
- package/dist/fixefy-ui-components/src/FxGeneralModal/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxGridEmptyState/FxGridEmptyState.js +86 -0
- package/dist/fixefy-ui-components/src/FxGridEmptyState/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxGridError/FxGridError.js +91 -0
- package/dist/fixefy-ui-components/src/FxGridError/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxIcon/FxIcon.js +118 -0
- package/dist/fixefy-ui-components/src/FxIcon/content/dynamic_icon.js +20 -0
- package/dist/fixefy-ui-components/src/FxIcon/content/index.js +20 -0
- package/dist/fixefy-ui-components/src/FxIcon/content/lazy_icon.js +87 -0
- package/dist/fixefy-ui-components/src/FxIcon/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxMenuItemWithIcon/FxMenuItemWithIcon.js +84 -0
- package/dist/fixefy-ui-components/src/FxMenuItemWithIcon/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxModal/FxModal.js +171 -0
- package/dist/fixefy-ui-components/src/FxModal/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxModal/styles/modal.style.js +66 -0
- package/dist/fixefy-ui-components/src/FxNotes/FxNotes.js +216 -0
- package/dist/fixefy-ui-components/src/FxNotes/helpers/stringToColor.js +26 -0
- package/dist/fixefy-ui-components/src/FxNotes/index.js +22 -0
- package/dist/fixefy-ui-components/src/FxNotes/operations/queries.js +35 -0
- package/dist/fixefy-ui-components/src/FxNotes/styles/notes.styles.js +168 -0
- package/dist/fixefy-ui-components/src/FxNumberField/FxNumberField.js +108 -0
- package/dist/fixefy-ui-components/src/FxNumberField/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxNumberField/styles/number_field.styles.js +99 -0
- package/dist/fixefy-ui-components/src/FxObjStaticDropdown/FxObjStaticDropdown.js +548 -0
- package/dist/fixefy-ui-components/src/FxObjStaticDropdown/index.js +25 -0
- package/dist/fixefy-ui-components/src/FxObjStaticDropdown/styles/dropdown.styles.js +211 -0
- package/dist/fixefy-ui-components/src/FxPopper/Popper.js +139 -0
- package/dist/fixefy-ui-components/src/FxPopper/PopperWithOutside.js +116 -0
- package/dist/fixefy-ui-components/src/FxPopper/content/PopperHeader.js +36 -0
- package/dist/fixefy-ui-components/src/FxPopper/content/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxPopper/index.js +24 -0
- package/dist/fixefy-ui-components/src/FxPopper/styles/popper.styles.js +138 -0
- package/dist/fixefy-ui-components/src/FxProgressCircle/FxProgressCircle.js +65 -0
- package/dist/fixefy-ui-components/src/FxProgressCircle/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxProgressCircle/styles/progress_circle.styles.js +106 -0
- package/dist/fixefy-ui-components/src/FxProgressCounter/ProgressCounter.js +168 -0
- package/dist/fixefy-ui-components/src/FxProgressCounter/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxProgressCounter/styles/progress_counter.styles.js +66 -0
- package/dist/fixefy-ui-components/src/FxScore/FxScore.js +215 -0
- package/dist/fixefy-ui-components/src/FxScore/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxScore/styles/score.styles.js +102 -0
- package/dist/fixefy-ui-components/src/FxShowMore/FxShowMore.js +80 -0
- package/dist/fixefy-ui-components/src/FxShowMore/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxShowMore/styles/show_more.styles.js +143 -0
- package/dist/fixefy-ui-components/src/FxSlider/FxSlider.js +49 -0
- package/dist/fixefy-ui-components/src/FxSlider/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxStatisticsBar/FxStatisticsBar.js +198 -0
- package/dist/fixefy-ui-components/src/FxStatisticsBar/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxStatisticsBar/styles/statistics.styles.js +103 -0
- package/dist/fixefy-ui-components/src/FxStatusBar/FxStatusBar.js +149 -0
- package/dist/fixefy-ui-components/src/FxStatusBar/helpers/constants.js +22 -0
- package/dist/fixefy-ui-components/src/FxStatusBar/index.js +22 -0
- package/dist/fixefy-ui-components/src/FxStatusBar/styles/statusBar.styles.js +138 -0
- package/dist/fixefy-ui-components/src/FxStrStaticDropdown/FxStrStaticDropdown.js +382 -0
- package/dist/fixefy-ui-components/src/FxStrStaticDropdown/helpers/helpers.js +22 -0
- package/dist/fixefy-ui-components/src/FxStrStaticDropdown/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxStrStaticDropdown/styles/dropdown.styles.js +190 -0
- package/dist/fixefy-ui-components/src/FxStyledButton/FxStyledButton.js +57 -0
- package/dist/fixefy-ui-components/src/FxStyledButton/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxStyledComponents/index.js +319 -0
- package/dist/fixefy-ui-components/src/FxSwitch/FxSwitch.js +106 -0
- package/dist/fixefy-ui-components/src/FxSwitch/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxSwitch/styles/switch.styles.js +42 -0
- package/dist/fixefy-ui-components/src/FxTabs/FxTabs.js +79 -0
- package/dist/fixefy-ui-components/src/FxTabs/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxTag/FxTag.js +50 -0
- package/dist/fixefy-ui-components/src/FxTag/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxTag/styles/tag.styles.js +106 -0
- package/dist/fixefy-ui-components/src/FxTextField/FxTextField.js +211 -0
- package/dist/fixefy-ui-components/src/FxTextField/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxTodo/FxTodo.js +95 -0
- package/dist/fixefy-ui-components/src/FxTodo/index.js +22 -0
- package/dist/fixefy-ui-components/src/FxTodo/styles/todo.styles.js +183 -0
- package/dist/fixefy-ui-components/src/FxToggleButtons/FxToggleButtons.js +69 -0
- package/dist/fixefy-ui-components/src/FxToggleButtons/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxUserImage/FxUserImage.js +236 -0
- package/dist/fixefy-ui-components/src/FxUserImage/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxWizard/FxWizard.js +50 -0
- package/dist/fixefy-ui-components/src/FxWizard/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxWizard/steps launcher/StepsLauncher.js +52 -0
- package/dist/fixefy-ui-components/src/FxWizard/steps launcher/index.js +18 -0
- package/dist/fixefy-ui-components/src/index.js +277 -0
- package/package.json +4 -5
|
@@ -0,0 +1,65 @@
|
|
|
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' ? `${new Intl.NumberFormat('en-US', {}).format(Number(value))}/${new Intl.NumberFormat('en-US', {}).format(Number(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
|
+
};
|
|
@@ -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
|
+
FxProgressCircle: function() {
|
|
13
|
+
return _FxProgressCircle.FxProgressCircle;
|
|
14
|
+
},
|
|
15
|
+
ProgressCirclePropsType: function() {
|
|
16
|
+
return _FxProgressCircle.ProgressCirclePropsType;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _FxProgressCircle = require("./FxProgressCircle");
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
}));
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "FxProgressCounter", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return FxProgressCounter;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
13
|
+
const _Box = /*#__PURE__*/ _interop_require_default(require("@mui/material/Box"));
|
|
14
|
+
const _Typography = /*#__PURE__*/ _interop_require_default(require("@mui/material/Typography"));
|
|
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 = (n)=>{
|
|
109
|
+
return n / initialValues.count * 100;
|
|
110
|
+
};
|
|
111
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_progress_counterstyles.Container, {
|
|
112
|
+
children: [
|
|
113
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
|
|
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
|
+
src: 'invoices/approve-small-white.svg',
|
|
125
|
+
width: 16
|
|
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)(_Box.default, {
|
|
132
|
+
mt: 0.5,
|
|
133
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Typography.default, {
|
|
134
|
+
fontSize: 19,
|
|
135
|
+
fontWeight: 600,
|
|
136
|
+
children: [
|
|
137
|
+
initialValues.current,
|
|
138
|
+
"/",
|
|
139
|
+
initialValues.count
|
|
140
|
+
]
|
|
141
|
+
})
|
|
142
|
+
}),
|
|
143
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
|
|
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
|
+
}
|
|
@@ -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
|
+
FxProgressCounter: function() {
|
|
13
|
+
return _ProgressCounter.FxProgressCounter;
|
|
14
|
+
},
|
|
15
|
+
ProgressCounterPropsType: function() {
|
|
16
|
+
return _ProgressCounter.ProgressCounterPropsType;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _ProgressCounter = require("./ProgressCounter");
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
BackgroundBar: function() {
|
|
13
|
+
return BackgroundBar;
|
|
14
|
+
},
|
|
15
|
+
BaseProgress: function() {
|
|
16
|
+
return BaseProgress;
|
|
17
|
+
},
|
|
18
|
+
Container: function() {
|
|
19
|
+
return Container;
|
|
20
|
+
},
|
|
21
|
+
MainBar: function() {
|
|
22
|
+
return MainBar;
|
|
23
|
+
},
|
|
24
|
+
ProgressContainer: function() {
|
|
25
|
+
return ProgressContainer;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _styles = require("@mui/material/styles");
|
|
29
|
+
const _LinearProgress = /*#__PURE__*/ _interop_require_default(require("@mui/material/LinearProgress"));
|
|
30
|
+
const _Box = /*#__PURE__*/ _interop_require_default(require("@mui/material/Box"));
|
|
31
|
+
function _interop_require_default(obj) {
|
|
32
|
+
return obj && obj.__esModule ? obj : {
|
|
33
|
+
default: obj
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const BaseProgress = (0, _styles.styled)(_LinearProgress.default)(()=>({
|
|
37
|
+
borderRadius: '8px',
|
|
38
|
+
width: '70%',
|
|
39
|
+
position: 'absolute',
|
|
40
|
+
zIndex: 2,
|
|
41
|
+
height: 3
|
|
42
|
+
}));
|
|
43
|
+
const MainBar = (0, _styles.styled)(BaseProgress)(()=>({
|
|
44
|
+
opacity: 1
|
|
45
|
+
}));
|
|
46
|
+
const BackgroundBar = (0, _styles.styled)(BaseProgress)(()=>({
|
|
47
|
+
opacity: 0.2
|
|
48
|
+
}));
|
|
49
|
+
const ProgressContainer = (0, _styles.styled)(_Box.default)(()=>({
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
display: 'flex',
|
|
52
|
+
width: '100%',
|
|
53
|
+
margin: '8px 0',
|
|
54
|
+
position: 'relative',
|
|
55
|
+
justifyContent: 'center'
|
|
56
|
+
}));
|
|
57
|
+
const Container = (0, _styles.styled)(_Box.default)(({ theme })=>({
|
|
58
|
+
width: 104,
|
|
59
|
+
height: 104,
|
|
60
|
+
minWidth: 104,
|
|
61
|
+
maxWidth: 104,
|
|
62
|
+
borderRadius: 8,
|
|
63
|
+
position: 'relative',
|
|
64
|
+
color: theme.palette.common.white,
|
|
65
|
+
backgroundColor: theme.palette.score.excellent
|
|
66
|
+
}));
|
|
@@ -0,0 +1,215 @@
|
|
|
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 _hooks = require("@apollo/client/react/hooks");
|
|
15
|
+
const _scorestyles = require("./styles/score.styles");
|
|
16
|
+
const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
|
|
17
|
+
const _Box = /*#__PURE__*/ _interop_require_default(require("@mui/material/Box"));
|
|
18
|
+
const _CircularProgress = /*#__PURE__*/ _interop_require_default(require("@mui/material/CircularProgress"));
|
|
19
|
+
const _Skeleton = /*#__PURE__*/ _interop_require_default(require("@mui/material/Skeleton"));
|
|
20
|
+
const _Typography = /*#__PURE__*/ _interop_require_default(require("@mui/material/Typography"));
|
|
21
|
+
function _define_property(obj, key, value) {
|
|
22
|
+
if (key in obj) {
|
|
23
|
+
Object.defineProperty(obj, key, {
|
|
24
|
+
value: value,
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true
|
|
28
|
+
});
|
|
29
|
+
} else {
|
|
30
|
+
obj[key] = value;
|
|
31
|
+
}
|
|
32
|
+
return obj;
|
|
33
|
+
}
|
|
34
|
+
function _interop_require_default(obj) {
|
|
35
|
+
return obj && obj.__esModule ? obj : {
|
|
36
|
+
default: obj
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
40
|
+
if (typeof WeakMap !== "function") return null;
|
|
41
|
+
var cacheBabelInterop = new WeakMap();
|
|
42
|
+
var cacheNodeInterop = new WeakMap();
|
|
43
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
44
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
45
|
+
})(nodeInterop);
|
|
46
|
+
}
|
|
47
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
48
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
49
|
+
return obj;
|
|
50
|
+
}
|
|
51
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
52
|
+
return {
|
|
53
|
+
default: obj
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
57
|
+
if (cache && cache.has(obj)) {
|
|
58
|
+
return cache.get(obj);
|
|
59
|
+
}
|
|
60
|
+
var newObj = {
|
|
61
|
+
__proto__: null
|
|
62
|
+
};
|
|
63
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
64
|
+
for(var key in obj){
|
|
65
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
66
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
67
|
+
if (desc && (desc.get || desc.set)) {
|
|
68
|
+
Object.defineProperty(newObj, key, desc);
|
|
69
|
+
} else {
|
|
70
|
+
newObj[key] = obj[key];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
newObj.default = obj;
|
|
75
|
+
if (cache) {
|
|
76
|
+
cache.set(obj, newObj);
|
|
77
|
+
}
|
|
78
|
+
return newObj;
|
|
79
|
+
}
|
|
80
|
+
function _object_spread(target) {
|
|
81
|
+
for(var i = 1; i < arguments.length; i++){
|
|
82
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
83
|
+
var ownKeys = Object.keys(source);
|
|
84
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
85
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
86
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
ownKeys.forEach(function(key) {
|
|
90
|
+
_define_property(target, key, source[key]);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return target;
|
|
94
|
+
}
|
|
95
|
+
function _object_without_properties(source, excluded) {
|
|
96
|
+
if (source == null) return {};
|
|
97
|
+
var target = _object_without_properties_loose(source, excluded);
|
|
98
|
+
var key, i;
|
|
99
|
+
if (Object.getOwnPropertySymbols) {
|
|
100
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
101
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
102
|
+
key = sourceSymbolKeys[i];
|
|
103
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
104
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
105
|
+
target[key] = source[key];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return target;
|
|
109
|
+
}
|
|
110
|
+
function _object_without_properties_loose(source, excluded) {
|
|
111
|
+
if (source == null) return {};
|
|
112
|
+
var target = {};
|
|
113
|
+
var sourceKeys = Object.keys(source);
|
|
114
|
+
var key, i;
|
|
115
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
116
|
+
key = sourceKeys[i];
|
|
117
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
118
|
+
target[key] = source[key];
|
|
119
|
+
}
|
|
120
|
+
return target;
|
|
121
|
+
}
|
|
122
|
+
const FxScore = (_param)=>{
|
|
123
|
+
var { value, structure, filter, variant = 'box', hasLabel = true, title: propsTitle = 'score', Sizes: propsSizes = {} } = _param, rest = _object_without_properties(_param, [
|
|
124
|
+
"value",
|
|
125
|
+
"structure",
|
|
126
|
+
"filter",
|
|
127
|
+
"variant",
|
|
128
|
+
"hasLabel",
|
|
129
|
+
"title",
|
|
130
|
+
"Sizes"
|
|
131
|
+
]);
|
|
132
|
+
const Sizes = _object_spread({
|
|
133
|
+
box: {
|
|
134
|
+
boxWidth: 104,
|
|
135
|
+
progressWidth: 68
|
|
136
|
+
},
|
|
137
|
+
circle: {
|
|
138
|
+
boxWidth: 40,
|
|
139
|
+
progressWidth: 36
|
|
140
|
+
}
|
|
141
|
+
}, propsSizes);
|
|
142
|
+
const { extended, title } = structure || {};
|
|
143
|
+
const { gql_operation, object_path: objectPath, filter: structureFilter } = extended || {};
|
|
144
|
+
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 }" } ) }';
|
|
145
|
+
let _filter = structureFilter;
|
|
146
|
+
if (filter) {
|
|
147
|
+
_filter = _object_spread({}, _filter, filter);
|
|
148
|
+
}
|
|
149
|
+
const [fetchData, { data, loading }] = (0, _hooks.useLazyQuery)((0, _graphqltag.gql)(gqlOperation));
|
|
150
|
+
(0, _react.useEffect)(()=>{
|
|
151
|
+
if (!value && structure) {
|
|
152
|
+
fetchData({
|
|
153
|
+
variables: {
|
|
154
|
+
where: _object_spread({}, _filter)
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}, []);
|
|
159
|
+
const ScoreValue = data ? data[objectPath] * 100 : value;
|
|
160
|
+
const _classes = (0, _scorestyles.useStyles)({
|
|
161
|
+
scoreColor: (0, _fixefyuiutils.getScoreColor)(ScoreValue || 0),
|
|
162
|
+
variant
|
|
163
|
+
});
|
|
164
|
+
var _Math_round;
|
|
165
|
+
return loading ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Box.default, {
|
|
166
|
+
className: _classes.container,
|
|
167
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Skeleton.default, {
|
|
168
|
+
animation: "wave",
|
|
169
|
+
variant: "circular",
|
|
170
|
+
width: 68,
|
|
171
|
+
height: 68
|
|
172
|
+
})
|
|
173
|
+
}) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
|
|
174
|
+
className: _classes.container,
|
|
175
|
+
sx: {
|
|
176
|
+
width: Sizes[variant].boxWidth,
|
|
177
|
+
height: Sizes[variant].boxWidth,
|
|
178
|
+
minWidth: Sizes[variant].boxWidth,
|
|
179
|
+
maxWidth: Sizes[variant].boxWidth,
|
|
180
|
+
borderRadius: variant === 'box' ? '8px' : '50%'
|
|
181
|
+
},
|
|
182
|
+
children: [
|
|
183
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_CircularProgress.default, _object_spread({
|
|
184
|
+
size: Sizes[variant].progressWidth,
|
|
185
|
+
variant: "determinate",
|
|
186
|
+
value: ScoreValue,
|
|
187
|
+
color: "inherit",
|
|
188
|
+
thickness: 2,
|
|
189
|
+
className: _classes.mainCircle
|
|
190
|
+
}, rest)),
|
|
191
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_CircularProgress.default, _object_spread({
|
|
192
|
+
size: Sizes[variant].progressWidth,
|
|
193
|
+
variant: "determinate",
|
|
194
|
+
value: 100,
|
|
195
|
+
color: "inherit",
|
|
196
|
+
thickness: 2,
|
|
197
|
+
className: _classes.backgroundCircle
|
|
198
|
+
}, rest)),
|
|
199
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
|
|
200
|
+
className: _classes.content,
|
|
201
|
+
children: [
|
|
202
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
|
|
203
|
+
variant: variant === 'box' ? 'h5' : 'table',
|
|
204
|
+
className: _classes.scoreNumber,
|
|
205
|
+
children: `${(_Math_round = Math.round(Number(ScoreValue))) !== null && _Math_round !== void 0 ? _Math_round : 0}%`
|
|
206
|
+
}),
|
|
207
|
+
hasLabel && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
|
|
208
|
+
className: _classes.scoreText,
|
|
209
|
+
children: (0, _fixefyuiutils.titleCase)(title !== null && title !== void 0 ? title : propsTitle)
|
|
210
|
+
})
|
|
211
|
+
]
|
|
212
|
+
})
|
|
213
|
+
]
|
|
214
|
+
});
|
|
215
|
+
};
|
|
@@ -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
|
+
FxScore: function() {
|
|
13
|
+
return _FxScore.FxScore;
|
|
14
|
+
},
|
|
15
|
+
ScorePropsType: function() {
|
|
16
|
+
return _FxScore.ScorePropsType;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _FxScore = require("./FxScore");
|