@fixefy/fixefy-ui-components 0.3.31 → 0.3.34
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/FxActionButton/FxActionButton.d.ts +7 -0
- package/dist/FxActionButton/FxActionButton.js +82 -0
- package/dist/FxActionButton/index.d.ts +1 -0
- package/dist/FxActionButton/index.js +11 -0
- package/dist/FxActionsTray/styles/actions_tray.styles.d.ts +8 -0
- package/dist/FxActionsTray/styles/actions_tray.styles.js +159 -0
- package/dist/FxButtonModalWithComponent/FxButtonModalWithComponent.d.ts +3 -2
- package/dist/FxButtonModalWithComponent/FxButtonModalWithComponent.js +3 -2
- package/dist/FxFilterActionButton/FxFilterActionButton.d.ts +7 -0
- package/dist/FxFilterActionButton/FxFilterActionButton.js +82 -0
- package/dist/FxFilterActionButton/index.d.ts +1 -0
- package/dist/FxFilterActionButton/index.js +11 -0
- package/dist/FxFilterSortButton/FxFilterSortButton.d.ts +7 -0
- package/dist/FxFilterSortButton/FxFilterSortButton.js +82 -0
- package/dist/FxFilterSortButton/index.d.ts +1 -0
- package/dist/FxFilterSortButton/index.js +11 -0
- package/dist/FxModalWithButton/FxModalWithButton.d.ts +10 -0
- package/dist/FxModalWithButton/FxModalWithButton.js +131 -0
- package/dist/FxModalWithButton/index.d.ts +1 -0
- package/dist/FxModalWithButton/index.js +11 -0
- package/dist/FxModalWithComponent/FxModalWithComponent.d.ts +11 -0
- package/dist/FxModalWithComponent/FxModalWithComponent.js +102 -0
- package/dist/FxModalWithComponent/index.d.ts +1 -0
- package/dist/FxModalWithComponent/index.js +11 -0
- package/dist/FxModalWithMenu/FxModalWithMenu.d.ts +14 -0
- package/dist/FxModalWithMenu/FxModalWithMenu.js +114 -0
- package/dist/FxModalWithMenu/index.d.ts +1 -0
- package/dist/FxModalWithMenu/index.js +11 -0
- package/dist/FxPopper/styles/makeStyles.d.ts +16 -0
- package/dist/FxPopper/styles/makeStyles.js +23 -0
- package/dist/FxWizard/FxWizard/FxWizard.d.ts +6 -0
- package/dist/FxWizard/FxWizard/FxWizard.js +42 -0
- package/dist/FxWizard/FxWizard/index.d.ts +2 -0
- package/dist/FxWizard/FxWizard/index.js +19 -0
- package/dist/FxWizard/FxWizard/utils/envHelpers.d.ts +1 -0
- package/dist/FxWizard/FxWizard/utils/envHelpers.js +35 -0
- package/dist/FxWizard/FxWizard/utils/index.d.ts +1 -0
- package/dist/FxWizard/FxWizard/utils/index.js +18 -0
- package/dist/FxWizard/pages/wizard/[step].d.ts +9 -0
- package/dist/FxWizard/pages/wizard/[step].js +112 -0
- package/dist/FxWizard/pages/wizard/index.d.ts +1 -0
- package/dist/FxWizard/pages/wizard/index.js +18 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -4
- package/dist/src/FxActionsTray/FxActionsTray.js +351 -0
- package/dist/src/FxActionsTray/index.js +19 -0
- package/dist/src/FxActionsTray/styles/actions_tray.styles.js +159 -0
- package/dist/src/FxAggregationsBar/FxAggregations.js +41 -0
- package/dist/src/FxAggregationsBar/helpers/structureReader.js +78 -0
- package/dist/src/FxAggregationsBar/index.js +22 -0
- package/dist/src/FxAggregationsBar/operations/query.js +73 -0
- package/dist/src/FxAsyncDropdown/FxAsyncDropdown.js +628 -0
- package/dist/src/FxAsyncDropdown/helpers/helpers.js +161 -0
- package/dist/src/FxAsyncDropdown/index.js +25 -0
- package/dist/src/FxAsyncDropdown/styles/dropdown.styles.js +228 -0
- package/dist/src/FxAvatar/FxAvatar.js +145 -0
- package/dist/src/FxAvatar/helpers/stringToColor.js +23 -0
- package/dist/src/FxAvatar/index.js +22 -0
- package/dist/src/FxAvatar/styles/avatar.styles.js +192 -0
- package/dist/src/FxButton/FxButton.js +106 -0
- package/dist/src/FxButton/index.js +19 -0
- package/dist/src/FxButton/styles/button.styles.js +23 -0
- package/dist/src/FxChip/FxChip.js +45 -0
- package/dist/src/FxChip/index.js +19 -0
- package/dist/src/FxChip/styles/chip.styles.js +61 -0
- package/dist/src/FxFilterSortButton/FxFilterSortButton.js +82 -0
- package/dist/src/FxFilterSortButton/index.js +11 -0
- package/dist/src/FxIcon/FxIcon.js +107 -0
- package/dist/src/FxIcon/content/dynamic_icon.js +20 -0
- package/dist/src/FxIcon/content/index.js +20 -0
- package/dist/src/FxIcon/content/lazy_icon.js +137 -0
- package/dist/{FxCheckbox → src/FxIcon}/index.js +3 -3
- package/dist/src/FxModal/FxModal.js +170 -0
- package/dist/src/FxModal/index.js +19 -0
- package/dist/src/FxModal/styles/modal.style.js +59 -0
- package/dist/src/FxModalWithButton/FxModalWithButton.js +94 -0
- package/dist/src/FxModalWithButton/index.js +11 -0
- package/dist/src/FxNotes/FxNotes.js +216 -0
- package/dist/src/FxNotes/helpers/stringToColor.js +26 -0
- package/dist/src/FxNotes/index.js +22 -0
- package/dist/src/FxNotes/operations/queries.js +35 -0
- package/dist/src/FxNotes/styles/notes.styles.js +168 -0
- package/dist/src/FxNumberField/FxNumberField.js +109 -0
- package/dist/src/FxNumberField/index.js +19 -0
- package/dist/src/FxNumberField/styles/number_field.styles.js +94 -0
- package/dist/src/FxProgressCircle/FxProgressCircle.js +65 -0
- package/dist/src/FxProgressCircle/index.js +19 -0
- package/dist/src/FxProgressCircle/styles/progress_circle.styles.js +106 -0
- package/dist/src/FxProgressCounter/ProgressCounter.js +168 -0
- package/dist/src/FxProgressCounter/index.js +19 -0
- package/dist/src/FxProgressCounter/styles/progress_counter.styles.js +61 -0
- package/dist/src/FxScore/FxScore.js +207 -0
- package/dist/src/FxScore/index.js +19 -0
- package/dist/src/FxScore/styles/score.styles.js +97 -0
- package/dist/src/FxShowMore/FxShowMore.js +80 -0
- package/dist/src/FxShowMore/index.js +19 -0
- package/dist/src/FxShowMore/styles/show_more.styles.js +134 -0
- package/dist/src/FxSlider/FxSlider.js +49 -0
- package/dist/src/FxSlider/index.js +19 -0
- package/dist/src/FxStatisticsBar/FxStatisticsBar.js +191 -0
- package/dist/src/FxStatisticsBar/index.js +19 -0
- package/dist/src/FxStatisticsBar/styles/statistics.styles.js +98 -0
- package/dist/src/FxStatusBar/FxStatusBar.js +143 -0
- package/dist/src/FxStatusBar/helpers/constants.js +22 -0
- package/dist/src/FxStatusBar/index.js +22 -0
- package/dist/src/FxStatusBar/styles/statusBar.styles.js +131 -0
- package/dist/src/FxStyledComponents/index.js +310 -0
- package/dist/src/FxTag/FxTag.js +41 -0
- package/dist/src/FxTag/index.js +19 -0
- package/dist/src/FxTag/styles/tag.styles.js +100 -0
- package/dist/src/FxTextField/FxTextField.js +208 -0
- package/dist/src/FxTextField/index.js +19 -0
- package/dist/src/FxTodo/FxTodo.js +95 -0
- package/dist/src/FxTodo/index.js +22 -0
- package/dist/src/FxTodo/styles/todo.styles.js +183 -0
- package/dist/src/index.js +215 -0
- package/package.json +1 -1
- package/dist/FxCheckbox/FxCheckbox.d.ts +0 -9
- package/dist/FxCheckbox/FxCheckbox.js +0 -76
- package/dist/FxCheckbox/index.d.ts +0 -1
|
@@ -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' ? `${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
|
+
};
|
|
@@ -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
|
+
// @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
|
+
}
|
|
@@ -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,61 @@
|
|
|
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
|
+
}));
|
|
@@ -0,0 +1,207 @@
|
|
|
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
|
+
};
|
|
@@ -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");
|