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