@fixefy/fixefy-ui-components 0.0.9 → 0.0.10
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/package.json +71 -64
- package/dist-cjs/FxActionsTray/FxActionsTray.jsx +0 -146
- package/dist-cjs/FxActionsTray/index.js +0 -5
- package/dist-cjs/FxActionsTray/styles/actions_tray.styles.jsx +0 -55
- package/dist-cjs/FxAggregationsBar/FxAggregations.jsx +0 -27
- package/dist-cjs/FxAggregationsBar/helpers/structureReader.jsx +0 -41
- package/dist-cjs/FxAggregationsBar/index.js +0 -5
- package/dist-cjs/FxAggregationsBar/operations/query.js +0 -66
- package/dist-cjs/FxAsyncDropdown/FxAsyncDropdown.jsx +0 -209
- package/dist-cjs/FxAsyncDropdown/helpers/helpers.js +0 -81
- package/dist-cjs/FxAsyncDropdown/index.js +0 -5
- package/dist-cjs/FxAsyncDropdown/styles/dropdown.styles.jsx +0 -130
- package/dist-cjs/FxAvatar/FxAvatar.jsx +0 -34
- package/dist-cjs/FxAvatar/helpers/stringToColor.js +0 -17
- package/dist-cjs/FxAvatar/index.js +0 -5
- package/dist-cjs/FxAvatar/styles/avatar.styles.jsx +0 -75
- package/dist-cjs/FxButton/FxButton.jsx +0 -11
- package/dist-cjs/FxButton/index.js +0 -5
- package/dist-cjs/FxButton/styles/button.styles.jsx +0 -16
- package/dist-cjs/FxChip/FxChip.jsx +0 -14
- package/dist-cjs/FxChip/index.js +0 -5
- package/dist-cjs/FxChip/styles/chip.styles.jsx +0 -48
- package/dist-cjs/FxIcon/FxIcon.jsx +0 -29
- package/dist-cjs/FxIcon/content/dynamic_icon.jsx +0 -7
- package/dist-cjs/FxIcon/content/index.js +0 -7
- package/dist-cjs/FxIcon/content/lazy_icon.jsx +0 -22
- package/dist-cjs/FxIcon/index.js +0 -5
- package/dist-cjs/FxModal/FxModal.jsx +0 -36
- package/dist-cjs/FxModal/index.js +0 -5
- package/dist-cjs/FxModal/styles/modal.style.jsx +0 -34
- package/dist-cjs/FxNotes/FxNotes.jsx +0 -101
- package/dist-cjs/FxNotes/helpers/stringToColor.js +0 -20
- package/dist-cjs/FxNotes/index.js +0 -5
- package/dist-cjs/FxNotes/operations/queries.js +0 -24
- package/dist-cjs/FxNotes/styles/notes.styles.jsx +0 -120
- package/dist-cjs/FxNumberField/FxNumberField.jsx +0 -30
- package/dist-cjs/FxNumberField/index.js +0 -5
- package/dist-cjs/FxNumberField/styles/number_field.styles.js +0 -87
- package/dist-cjs/FxProgressCircle/FxProgressCircle.jsx +0 -28
- package/dist-cjs/FxProgressCircle/index.js +0 -5
- package/dist-cjs/FxProgressCircle/styles/progress_circle.styles.jsx +0 -27
- package/dist-cjs/FxProgressCounter/ProgressCounter.jsx +0 -45
- package/dist-cjs/FxProgressCounter/index.js +0 -5
- package/dist-cjs/FxProgressCounter/styles/progress_counter.styles.js +0 -36
- package/dist-cjs/FxScore/FxScore.jsx +0 -57
- package/dist-cjs/FxScore/index.js +0 -5
- package/dist-cjs/FxScore/styles/score.styles.js +0 -33
- package/dist-cjs/FxShowMore/FxShowMore.jsx +0 -47
- package/dist-cjs/FxShowMore/index.js +0 -5
- package/dist-cjs/FxShowMore/styles/show_more.styles.js +0 -43
- package/dist-cjs/FxSlider/FxSlider.jsx +0 -10
- package/dist-cjs/FxSlider/index.js +0 -5
- package/dist-cjs/FxStatisticsBar/FxStatisticsBar.jsx +0 -95
- package/dist-cjs/FxStatisticsBar/index.js +0 -5
- package/dist-cjs/FxStatisticsBar/styles/statistics.styles.js +0 -33
- package/dist-cjs/FxStatusBar/FxStatusBar.jsx +0 -64
- package/dist-cjs/FxStatusBar/helpers/constants.js +0 -15
- package/dist-cjs/FxStatusBar/index.js +0 -5
- package/dist-cjs/FxStatusBar/styles/statusBar.styles.jsx +0 -39
- package/dist-cjs/FxStyledComponents/index.jsx +0 -102
- package/dist-cjs/FxTag/FxTag.jsx +0 -13
- package/dist-cjs/FxTag/index.js +0 -5
- package/dist-cjs/FxTag/styles/tag.styles.jsx +0 -16
- package/dist-cjs/FxTextField/FxTextField.jsx +0 -62
- package/dist-cjs/FxTextField/index.js +0 -5
- package/dist-cjs/FxTodo/FxTodo.jsx +0 -46
- package/dist-cjs/FxTodo/index.js +0 -5
- package/dist-cjs/FxTodo/styles/todo.styles.jsx +0 -75
- package/dist-cjs/FxWizard/FxWizard.jsx +0 -49
- package/dist-cjs/FxWizard/WizardContext.jsx +0 -86
- package/dist-cjs/FxWizard/index.js +0 -8
- package/dist-cjs/FxWizard/styles/wizard.styles.jsx +0 -17
- package/dist-cjs/index.js +0 -49
- package/dist-cjs/package.json +0 -3
- package/dist-es/FxActionsTray/FxActionsTray.jsx +0 -141
- package/dist-es/FxActionsTray/index.js +0 -1
- package/dist-es/FxActionsTray/styles/actions_tray.styles.jsx +0 -76
- package/dist-es/FxAggregationsBar/FxAggregations.jsx +0 -22
- package/dist-es/FxAggregationsBar/helpers/structureReader.jsx +0 -32
- package/dist-es/FxAggregationsBar/index.js +0 -1
- package/dist-es/FxAggregationsBar/operations/query.js +0 -63
- package/dist-es/FxAsyncDropdown/FxAsyncDropdown.jsx +0 -228
- package/dist-es/FxAsyncDropdown/helpers/helpers.js +0 -77
- package/dist-es/FxAsyncDropdown/index.js +0 -1
- package/dist-es/FxAsyncDropdown/styles/dropdown.styles.jsx +0 -143
- package/dist-es/FxAvatar/FxAvatar.jsx +0 -32
- package/dist-es/FxAvatar/helpers/stringToColor.js +0 -13
- package/dist-es/FxAvatar/index.js +0 -1
- package/dist-es/FxAvatar/styles/avatar.styles.jsx +0 -68
- package/dist-es/FxButton/FxButton.jsx +0 -5
- package/dist-es/FxButton/index.js +0 -1
- package/dist-es/FxButton/styles/button.styles.jsx +0 -13
- package/dist-es/FxChip/FxChip.jsx +0 -9
- package/dist-es/FxChip/index.js +0 -1
- package/dist-es/FxChip/styles/chip.styles.jsx +0 -45
- package/dist-es/FxIcon/FxIcon.jsx +0 -24
- package/dist-es/FxIcon/content/dynamic_icon.jsx +0 -2
- package/dist-es/FxIcon/content/index.js +0 -2
- package/dist-es/FxIcon/content/lazy_icon.jsx +0 -17
- package/dist-es/FxIcon/index.js +0 -1
- package/dist-es/FxModal/FxModal.jsx +0 -30
- package/dist-es/FxModal/index.js +0 -1
- package/dist-es/FxModal/styles/modal.style.jsx +0 -31
- package/dist-es/FxNotes/FxNotes.jsx +0 -102
- package/dist-es/FxNotes/helpers/stringToColor.js +0 -16
- package/dist-es/FxNotes/index.js +0 -1
- package/dist-es/FxNotes/operations/queries.js +0 -20
- package/dist-es/FxNotes/styles/notes.styles.jsx +0 -116
- package/dist-es/FxNumberField/FxNumberField.jsx +0 -25
- package/dist-es/FxNumberField/index.js +0 -1
- package/dist-es/FxNumberField/styles/number_field.styles.js +0 -84
- package/dist-es/FxProgressCircle/FxProgressCircle.jsx +0 -23
- package/dist-es/FxProgressCircle/index.js +0 -1
- package/dist-es/FxProgressCircle/styles/progress_circle.styles.jsx +0 -28
- package/dist-es/FxProgressCounter/ProgressCounter.jsx +0 -38
- package/dist-es/FxProgressCounter/index.js +0 -1
- package/dist-es/FxProgressCounter/styles/progress_counter.styles.js +0 -33
- package/dist-es/FxScore/FxScore.jsx +0 -57
- package/dist-es/FxScore/index.js +0 -1
- package/dist-es/FxScore/styles/score.styles.js +0 -35
- package/dist-es/FxShowMore/FxShowMore.jsx +0 -42
- package/dist-es/FxShowMore/index.js +0 -1
- package/dist-es/FxShowMore/styles/show_more.styles.js +0 -53
- package/dist-es/FxSlider/FxSlider.jsx +0 -5
- package/dist-es/FxSlider/index.js +0 -1
- package/dist-es/FxStatisticsBar/FxStatisticsBar.jsx +0 -91
- package/dist-es/FxStatisticsBar/index.js +0 -1
- package/dist-es/FxStatisticsBar/styles/statistics.styles.js +0 -38
- package/dist-es/FxStatusBar/FxStatusBar.jsx +0 -59
- package/dist-es/FxStatusBar/helpers/constants.js +0 -12
- package/dist-es/FxStatusBar/index.js +0 -1
- package/dist-es/FxStatusBar/styles/statusBar.styles.jsx +0 -39
- package/dist-es/FxStyledComponents/index.jsx +0 -133
- package/dist-es/FxTag/FxTag.jsx +0 -9
- package/dist-es/FxTag/index.js +0 -1
- package/dist-es/FxTag/styles/tag.styles.jsx +0 -23
- package/dist-es/FxTextField/FxTextField.jsx +0 -63
- package/dist-es/FxTextField/index.js +0 -1
- package/dist-es/FxTodo/FxTodo.jsx +0 -41
- package/dist-es/FxTodo/index.js +0 -1
- package/dist-es/FxTodo/styles/todo.styles.jsx +0 -97
- package/dist-es/FxWizard/FxWizard.jsx +0 -46
- package/dist-es/FxWizard/WizardContext.jsx +0 -84
- package/dist-es/FxWizard/index.js +0 -2
- package/dist-es/FxWizard/styles/wizard.styles.jsx +0 -18
- package/dist-es/index.js +0 -22
- package/dist-es/package.json +0 -3
- package/dist-types/FxActionsTray/FxActionsTray.d.ts +0 -3
- package/dist-types/FxActionsTray/index.d.ts +0 -2
- package/dist-types/FxActionsTray/styles/actions_tray.styles.d.ts +0 -8
- package/dist-types/FxAggregationsBar/FxAggregations.d.ts +0 -3
- package/dist-types/FxAggregationsBar/helpers/structureReader.d.ts +0 -1
- package/dist-types/FxAggregationsBar/index.d.ts +0 -2
- package/dist-types/FxAggregationsBar/operations/query.d.ts +0 -1
- package/dist-types/FxAsyncDropdown/FxAsyncDropdown.d.ts +0 -3
- package/dist-types/FxAsyncDropdown/helpers/helpers.d.ts +0 -4
- package/dist-types/FxAsyncDropdown/index.d.ts +0 -2
- package/dist-types/FxAsyncDropdown/styles/dropdown.styles.d.ts +0 -7
- package/dist-types/FxAvatar/FxAvatar.d.ts +0 -3
- package/dist-types/FxAvatar/helpers/stringToColor.d.ts +0 -1
- package/dist-types/FxAvatar/index.d.ts +0 -2
- package/dist-types/FxAvatar/styles/avatar.styles.d.ts +0 -7
- package/dist-types/FxButton/FxButton.d.ts +0 -6
- package/dist-types/FxButton/index.d.ts +0 -2
- package/dist-types/FxButton/styles/button.styles.d.ts +0 -1
- package/dist-types/FxChip/FxChip.d.ts +0 -3
- package/dist-types/FxChip/index.d.ts +0 -2
- package/dist-types/FxChip/styles/chip.styles.d.ts +0 -3
- package/dist-types/FxIcon/FxIcon.d.ts +0 -3
- package/dist-types/FxIcon/content/dynamic_icon.d.ts +0 -5
- package/dist-types/FxIcon/content/index.d.ts +0 -2
- package/dist-types/FxIcon/content/lazy_icon.d.ts +0 -9
- package/dist-types/FxIcon/index.d.ts +0 -2
- package/dist-types/FxModal/FxModal.d.ts +0 -3
- package/dist-types/FxModal/index.d.ts +0 -2
- package/dist-types/FxModal/styles/modal.style.d.ts +0 -4
- package/dist-types/FxNotes/FxNotes.d.ts +0 -3
- package/dist-types/FxNotes/helpers/stringToColor.d.ts +0 -1
- package/dist-types/FxNotes/index.d.ts +0 -2
- package/dist-types/FxNotes/operations/queries.d.ts +0 -1
- package/dist-types/FxNotes/styles/notes.styles.d.ts +0 -13
- package/dist-types/FxNumberField/FxNumberField.d.ts +0 -3
- package/dist-types/FxNumberField/index.d.ts +0 -2
- package/dist-types/FxNumberField/styles/number_field.styles.d.ts +0 -1
- package/dist-types/FxProgressCircle/FxProgressCircle.d.ts +0 -3
- package/dist-types/FxProgressCircle/index.d.ts +0 -2
- package/dist-types/FxProgressCircle/styles/progress_circle.styles.d.ts +0 -5
- package/dist-types/FxProgressCounter/ProgressCounter.d.ts +0 -3
- package/dist-types/FxProgressCounter/index.d.ts +0 -2
- package/dist-types/FxProgressCounter/styles/progress_counter.styles.d.ts +0 -5
- package/dist-types/FxScore/FxScore.d.ts +0 -3
- package/dist-types/FxScore/index.d.ts +0 -2
- package/dist-types/FxScore/styles/score.styles.d.ts +0 -7
- package/dist-types/FxShowMore/FxShowMore.d.ts +0 -3
- package/dist-types/FxShowMore/index.d.ts +0 -2
- package/dist-types/FxShowMore/styles/show_more.styles.d.ts +0 -6
- package/dist-types/FxSlider/FxSlider.d.ts +0 -3
- package/dist-types/FxSlider/index.d.ts +0 -2
- package/dist-types/FxStatisticsBar/FxStatisticsBar.d.ts +0 -3
- package/dist-types/FxStatisticsBar/index.d.ts +0 -2
- package/dist-types/FxStatisticsBar/styles/statistics.styles.d.ts +0 -2
- package/dist-types/FxStatusBar/FxStatusBar.d.ts +0 -3
- package/dist-types/FxStatusBar/helpers/constants.d.ts +0 -12
- package/dist-types/FxStatusBar/index.d.ts +0 -2
- package/dist-types/FxStatusBar/styles/statusBar.styles.d.ts +0 -3
- package/dist-types/FxStyledComponents/index.d.ts +0 -27
- package/dist-types/FxTag/FxTag.d.ts +0 -3
- package/dist-types/FxTag/index.d.ts +0 -2
- package/dist-types/FxTag/styles/tag.styles.d.ts +0 -3
- package/dist-types/FxTextField/FxTextField.d.ts +0 -4
- package/dist-types/FxTextField/index.d.ts +0 -2
- package/dist-types/FxTodo/FxTodo.d.ts +0 -3
- package/dist-types/FxTodo/index.d.ts +0 -2
- package/dist-types/FxTodo/styles/todo.styles.d.ts +0 -8
- package/dist-types/FxWizard/FxWizard.d.ts +0 -3
- package/dist-types/FxWizard/WizardContext.d.ts +0 -6
- package/dist-types/FxWizard/index.d.ts +0 -3
- package/dist-types/FxWizard/styles/wizard.styles.d.ts +0 -2
- package/dist-types/index.d.ts +0 -22
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SliderBar = exports.SliderCircle = exports.Slider = exports.Label = exports.Container = void 0;
|
|
4
|
-
const styles_1 = require("@mui/material/styles");
|
|
5
|
-
exports.Container = (0, styles_1.styled)("div")(({ theme }) => ({
|
|
6
|
-
display: "flex",
|
|
7
|
-
alignItems: "center",
|
|
8
|
-
justifyContent: "center",
|
|
9
|
-
}));
|
|
10
|
-
exports.Label = (0, styles_1.styled)("span")(({ theme }) => (Object.assign(Object.assign({}, theme.typography.body1), { color: theme.palette.typography.title, marginRight: 8 })));
|
|
11
|
-
exports.Slider = (0, styles_1.styled)("svg")(({ theme }) => ({
|
|
12
|
-
display: "block",
|
|
13
|
-
width: 22,
|
|
14
|
-
height: 22,
|
|
15
|
-
transform: "rotate(-90deg)",
|
|
16
|
-
}));
|
|
17
|
-
exports.SliderCircle = (0, styles_1.styled)("circle")(({ theme, color }) => ({
|
|
18
|
-
fill: "transparent",
|
|
19
|
-
stroke: color !== null && color !== void 0 ? color : theme.palette.green2scale.main,
|
|
20
|
-
opacity: 0.1,
|
|
21
|
-
}));
|
|
22
|
-
exports.SliderBar = (0, styles_1.styled)("circle")(({ theme, color }) => ({
|
|
23
|
-
fill: "transparent",
|
|
24
|
-
stroke: color !== null && color !== void 0 ? color : theme.palette.green2scale.main,
|
|
25
|
-
strokeDashoffset: 0,
|
|
26
|
-
strokeDasharray: 0,
|
|
27
|
-
}));
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FxProgressCounter = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
const fxutils_images_1 = require("@fixefy/fxutils.images");
|
|
8
|
-
const progress_counter_styles_1 = require("./styles/progress_counter.styles");
|
|
9
|
-
const image_1 = tslib_1.__importDefault(require("next/image"));
|
|
10
|
-
function FxProgressCounter(_a) {
|
|
11
|
-
var _b, _c;
|
|
12
|
-
var { values, structure, filter } = _a, rest = tslib_1.__rest(_a, ["values", "structure", "filter"]);
|
|
13
|
-
const initialValues = {
|
|
14
|
-
count: (_b = values === null || values === void 0 ? void 0 : values.count) !== null && _b !== void 0 ? _b : 0,
|
|
15
|
-
current: (_c = values === null || values === void 0 ? void 0 : values.current) !== null && _c !== void 0 ? _c : 0,
|
|
16
|
-
};
|
|
17
|
-
const normalizeNumber = (number) => {
|
|
18
|
-
return (number / initialValues.count) * 100;
|
|
19
|
-
};
|
|
20
|
-
return (<progress_counter_styles_1.Container>
|
|
21
|
-
|
|
22
|
-
<material_1.Box position={'relative'} textAlign={'center'} justifyContent={'center'} mt={1.2}>
|
|
23
|
-
<image_1.default alt={'approve'} width={16} height={16} loader={() => (0, fxutils_images_1.imageLoader)({
|
|
24
|
-
root: 'https://cdn-dev.fixefy.me/',
|
|
25
|
-
src: 'invoices/approve-small-white.svg',
|
|
26
|
-
})} src={'invoices/approve-small-white.svg'} onLoad={() => console.log('loaded')} onError={(e) => console.log('error:', e)}/>
|
|
27
|
-
|
|
28
|
-
<material_1.Box mt={0.5}>
|
|
29
|
-
<material_1.Typography fontSize={19} fontWeight={600}>
|
|
30
|
-
{initialValues.current}/{initialValues.count}
|
|
31
|
-
</material_1.Typography>
|
|
32
|
-
</material_1.Box>
|
|
33
|
-
|
|
34
|
-
<material_1.Typography fontSize={11} sx={{ opacity: 0.6 }}>
|
|
35
|
-
Charges
|
|
36
|
-
</material_1.Typography>
|
|
37
|
-
</material_1.Box>
|
|
38
|
-
|
|
39
|
-
<progress_counter_styles_1.ProgressContainer>
|
|
40
|
-
<progress_counter_styles_1.MainBar variant="determinate" value={normalizeNumber(initialValues.current)} color={'inherit'} {...rest}/>
|
|
41
|
-
<progress_counter_styles_1.BackgroundBar variant="determinate" value={initialValues.count > 100 ? 100 : initialValues.count} color={'inherit'} {...rest}/>
|
|
42
|
-
</progress_counter_styles_1.ProgressContainer>
|
|
43
|
-
</progress_counter_styles_1.Container>);
|
|
44
|
-
}
|
|
45
|
-
exports.FxProgressCounter = FxProgressCounter;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FxProgressCounter = void 0;
|
|
4
|
-
var ProgressCounter_1 = require("./ProgressCounter");
|
|
5
|
-
Object.defineProperty(exports, "FxProgressCounter", { enumerable: true, get: function () { return ProgressCounter_1.FxProgressCounter; } });
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Container = exports.ProgressContainer = exports.BackgroundBar = exports.MainBar = exports.BaseProgress = void 0;
|
|
4
|
-
const styles_1 = require("@mui/material/styles");
|
|
5
|
-
const material_1 = require("@mui/material");
|
|
6
|
-
exports.BaseProgress = (0, styles_1.styled)(material_1.LinearProgress)(({ theme }) => ({
|
|
7
|
-
borderRadius: '8px',
|
|
8
|
-
width: '70%',
|
|
9
|
-
position: 'absolute',
|
|
10
|
-
zIndex: 2,
|
|
11
|
-
height: 3,
|
|
12
|
-
}));
|
|
13
|
-
exports.MainBar = (0, styles_1.styled)(exports.BaseProgress)(({ theme }) => ({
|
|
14
|
-
opacity: 1,
|
|
15
|
-
}));
|
|
16
|
-
exports.BackgroundBar = (0, styles_1.styled)(exports.BaseProgress)(({ theme }) => ({
|
|
17
|
-
opacity: 0.2,
|
|
18
|
-
}));
|
|
19
|
-
exports.ProgressContainer = (0, styles_1.styled)(material_1.Box)(({ theme }) => ({
|
|
20
|
-
alignItems: 'center',
|
|
21
|
-
display: 'flex',
|
|
22
|
-
width: '100%',
|
|
23
|
-
margin: '8px 0',
|
|
24
|
-
position: 'relative',
|
|
25
|
-
justifyContent: 'center',
|
|
26
|
-
}));
|
|
27
|
-
exports.Container = (0, styles_1.styled)(material_1.Box)(({ theme }) => ({
|
|
28
|
-
width: 104,
|
|
29
|
-
height: 104,
|
|
30
|
-
minWidth: 104,
|
|
31
|
-
maxWidth: 104,
|
|
32
|
-
borderRadius: 8,
|
|
33
|
-
position: 'relative',
|
|
34
|
-
color: theme.palette.common.white,
|
|
35
|
-
backgroundColor: theme.palette.score.excellent,
|
|
36
|
-
}));
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FxScore = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const graphql_tag_1 = require("graphql-tag");
|
|
7
|
-
const client_1 = require("@apollo/client");
|
|
8
|
-
const score_styles_1 = require("./styles/score.styles");
|
|
9
|
-
const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
|
|
10
|
-
const material_1 = require("@mui/material");
|
|
11
|
-
const FxScore = (_a) => {
|
|
12
|
-
var _b;
|
|
13
|
-
var { value, structure, filter, variant = 'box', hasLabel = true, title: propsTitle = 'score', Sizes: propsSizes = {} } = _a, rest = tslib_1.__rest(_a, ["value", "structure", "filter", "variant", "hasLabel", "title", "Sizes"]);
|
|
14
|
-
const Sizes = Object.assign({ box: {
|
|
15
|
-
boxWidth: 104,
|
|
16
|
-
progressWidth: 68,
|
|
17
|
-
}, circle: { boxWidth: 40, progressWidth: 36 } }, propsSizes);
|
|
18
|
-
const { extended, title } = structure || {};
|
|
19
|
-
const { gql_operation, object_path: objectPath, title_path: titlePath, filter: structureFilter } = extended || {};
|
|
20
|
-
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 }" } ) }';
|
|
21
|
-
let _filter = structureFilter;
|
|
22
|
-
if (filter) {
|
|
23
|
-
_filter = Object.assign(Object.assign({}, _filter), filter);
|
|
24
|
-
}
|
|
25
|
-
const [fetchData, { data, error, loading }] = (0, client_1.useLazyQuery)((0, graphql_tag_1.gql)(gqlOperation));
|
|
26
|
-
(0, react_1.useEffect)(() => {
|
|
27
|
-
if (!value && structure) {
|
|
28
|
-
fetchData({
|
|
29
|
-
variables: {
|
|
30
|
-
where: Object.assign({}, _filter),
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}, []);
|
|
35
|
-
const ScoreValue = data ? data[objectPath] * 100 : value;
|
|
36
|
-
const _classes = (0, score_styles_1.useStyles)({
|
|
37
|
-
scoreColor: (0, fixefy_ui_utils_1.getScoreColor)(ScoreValue || 0),
|
|
38
|
-
variant,
|
|
39
|
-
});
|
|
40
|
-
return loading ? (<material_1.Box className={_classes.container}>
|
|
41
|
-
<material_1.Skeleton animation="wave" variant="circular" width={68} height={68}/>
|
|
42
|
-
</material_1.Box>) : (<material_1.Box className={_classes.container} sx={{
|
|
43
|
-
width: Sizes[variant].boxWidth,
|
|
44
|
-
height: Sizes[variant].boxWidth,
|
|
45
|
-
minWidth: Sizes[variant].boxWidth,
|
|
46
|
-
maxWidth: Sizes[variant].boxWidth,
|
|
47
|
-
borderRadius: variant === 'box' ? '8px' : '50%',
|
|
48
|
-
}}>
|
|
49
|
-
<material_1.CircularProgress size={Sizes[variant].progressWidth} variant="determinate" value={ScoreValue} color="inherit" thickness={2} className={_classes.mainCircle} {...rest}/>
|
|
50
|
-
<material_1.CircularProgress size={Sizes[variant].progressWidth} variant="determinate" value={100} color="inherit" thickness={2} className={_classes.backgroundCircle} {...rest}/>
|
|
51
|
-
<material_1.Box className={_classes.content}>
|
|
52
|
-
<material_1.Typography variant={variant === 'box' ? 'h5' : 'table'} className={_classes.scoreNumber}>{`${(_b = Math.round(Number(ScoreValue))) !== null && _b !== void 0 ? _b : 0}%`}</material_1.Typography>
|
|
53
|
-
{hasLabel && <material_1.Typography className={_classes.scoreText}>{(0, fixefy_ui_utils_1.titleCase)(title !== null && title !== void 0 ? title : propsTitle)}</material_1.Typography>}
|
|
54
|
-
</material_1.Box>
|
|
55
|
-
</material_1.Box>);
|
|
56
|
-
};
|
|
57
|
-
exports.FxScore = FxScore;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useStyles = void 0;
|
|
4
|
-
const styles_1 = require("@mui/styles");
|
|
5
|
-
exports.useStyles = (0, styles_1.makeStyles)((theme) => ({
|
|
6
|
-
container: {
|
|
7
|
-
display: 'flex',
|
|
8
|
-
justifyContent: 'center',
|
|
9
|
-
alignItems: 'center',
|
|
10
|
-
position: 'relative',
|
|
11
|
-
color: theme.palette.common.white,
|
|
12
|
-
backgroundColor: (props) => theme.palette.score[props.scoreColor],
|
|
13
|
-
},
|
|
14
|
-
content: {
|
|
15
|
-
position: 'absolute',
|
|
16
|
-
display: 'flex',
|
|
17
|
-
justifyContent: 'center',
|
|
18
|
-
alignItems: 'center',
|
|
19
|
-
flexDirection: 'column',
|
|
20
|
-
},
|
|
21
|
-
scoreNumber: {
|
|
22
|
-
color: theme.palette.common.white,
|
|
23
|
-
},
|
|
24
|
-
scoreText: Object.assign(Object.assign({}, theme.typography.table), { fontWeight: 400, color: theme.palette.common.white, opacity: 0.6 }),
|
|
25
|
-
mainCircle: {
|
|
26
|
-
position: 'absolute',
|
|
27
|
-
zIndex: 2,
|
|
28
|
-
},
|
|
29
|
-
backgroundCircle: {
|
|
30
|
-
position: 'absolute',
|
|
31
|
-
opacity: 0.2,
|
|
32
|
-
},
|
|
33
|
-
}));
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FxShowMore = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
const show_more_styles_1 = require("./styles/show_more.styles");
|
|
8
|
-
const KeyboardArrowDown_1 = tslib_1.__importDefault(require("@mui/icons-material/KeyboardArrowDown"));
|
|
9
|
-
function FxShowMore({ items, label, children, title }) {
|
|
10
|
-
const [anchorEl, setAnchorEl] = react_1.default.useState(null);
|
|
11
|
-
const handleClick = (event) => {
|
|
12
|
-
setAnchorEl(event.currentTarget);
|
|
13
|
-
};
|
|
14
|
-
const handleClose = () => {
|
|
15
|
-
setAnchorEl(null);
|
|
16
|
-
};
|
|
17
|
-
const open = Boolean(anchorEl);
|
|
18
|
-
const id = open ? 'simple-popover' : undefined;
|
|
19
|
-
return (<show_more_styles_1.ShowMoreWrapper>
|
|
20
|
-
{children}
|
|
21
|
-
|
|
22
|
-
<show_more_styles_1.ShowMoreBtn onClick={handleClick}>
|
|
23
|
-
<show_more_styles_1.ShowMoreIcon isOpen={open}>
|
|
24
|
-
<KeyboardArrowDown_1.default />
|
|
25
|
-
</show_more_styles_1.ShowMoreIcon>
|
|
26
|
-
{title ? title : 'SHOW MORE'}
|
|
27
|
-
</show_more_styles_1.ShowMoreBtn>
|
|
28
|
-
|
|
29
|
-
<show_more_styles_1.StyledPopover id={id} open={open} anchorEl={anchorEl} onClose={handleClose} anchorOrigin={{
|
|
30
|
-
vertical: 'bottom',
|
|
31
|
-
horizontal: 'center',
|
|
32
|
-
}} transformOrigin={{
|
|
33
|
-
vertical: 'top',
|
|
34
|
-
horizontal: 'center',
|
|
35
|
-
}}>
|
|
36
|
-
<show_more_styles_1.StyledLabel>
|
|
37
|
-
{label} ({items.length})
|
|
38
|
-
</show_more_styles_1.StyledLabel>
|
|
39
|
-
<show_more_styles_1.StyledDivider />
|
|
40
|
-
{items === null || items === void 0 ? void 0 : items.map((item, index) => (<div key={index}>
|
|
41
|
-
<material_1.Typography variant="body1">{item}</material_1.Typography>
|
|
42
|
-
{index + 1 !== items.length && <show_more_styles_1.StyledDivider />}
|
|
43
|
-
</div>))}
|
|
44
|
-
</show_more_styles_1.StyledPopover>
|
|
45
|
-
</show_more_styles_1.ShowMoreWrapper>);
|
|
46
|
-
}
|
|
47
|
-
exports.FxShowMore = FxShowMore;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FxShowMore = void 0;
|
|
4
|
-
var FxShowMore_1 = require("./FxShowMore");
|
|
5
|
-
Object.defineProperty(exports, "FxShowMore", { enumerable: true, get: function () { return FxShowMore_1.FxShowMore; } });
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StyledLabel = exports.StyledDivider = exports.StyledPopover = exports.ShowMoreIcon = exports.ShowMoreBtn = exports.ShowMoreWrapper = void 0;
|
|
4
|
-
const styles_1 = require("@mui/material/styles");
|
|
5
|
-
const material_1 = require("@mui/material");
|
|
6
|
-
exports.ShowMoreWrapper = (0, styles_1.styled)(material_1.Box)(({ theme }) => ({
|
|
7
|
-
borderRadius: '8px',
|
|
8
|
-
}));
|
|
9
|
-
exports.ShowMoreBtn = (0, styles_1.styled)(material_1.Button)(({ theme }) => (Object.assign(Object.assign({}, theme.typography.button), { fontWeight: 600, fontSize: 12, textTransform: 'uppercase', color: theme.palette.primary[800], padding: 0, display: 'flex', justifyContent: 'flex-start', alignItems: 'center' })));
|
|
10
|
-
exports.ShowMoreIcon = (0, styles_1.styled)(material_1.Box)(({ theme, isOpen }) => ({
|
|
11
|
-
width: 16,
|
|
12
|
-
height: 16,
|
|
13
|
-
color: theme.palette.primary[800],
|
|
14
|
-
borderRadius: '50%',
|
|
15
|
-
border: '1px solid',
|
|
16
|
-
display: 'flex',
|
|
17
|
-
justifyContent: 'center',
|
|
18
|
-
alignItems: 'center',
|
|
19
|
-
marginRight: 8,
|
|
20
|
-
['& svg']: {
|
|
21
|
-
width: 14,
|
|
22
|
-
height: 14,
|
|
23
|
-
color: theme.palette.primary[800],
|
|
24
|
-
transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
25
|
-
transition: 'all 0.5s',
|
|
26
|
-
},
|
|
27
|
-
}));
|
|
28
|
-
exports.StyledPopover = (0, styles_1.styled)(material_1.Popover)(({ theme }) => ({
|
|
29
|
-
['.MuiPaper-root']: {
|
|
30
|
-
background: theme.palette.common.white,
|
|
31
|
-
boxShadow: '0px 0px 10px rgba(86, 135, 147, 0.3)',
|
|
32
|
-
borderRadius: 8,
|
|
33
|
-
padding: 24,
|
|
34
|
-
marginTop: 8,
|
|
35
|
-
minWidth: 226,
|
|
36
|
-
maxWidth: 328,
|
|
37
|
-
},
|
|
38
|
-
}));
|
|
39
|
-
exports.StyledDivider = (0, styles_1.styled)(material_1.Divider)(({ theme }) => ({
|
|
40
|
-
marginTop: 8,
|
|
41
|
-
marginBottom: 8,
|
|
42
|
-
}));
|
|
43
|
-
exports.StyledLabel = (0, styles_1.styled)(material_1.Typography)(({ theme }) => (Object.assign(Object.assign({}, theme.typography.overLineCaption), { color: '#8B9092' })));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FxSlider = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
function FxSlider(props) {
|
|
8
|
-
return <material_1.Slider {...props}/>;
|
|
9
|
-
}
|
|
10
|
-
exports.FxSlider = FxSlider;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FxStatisticsBar = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const graphql_tag_1 = require("graphql-tag");
|
|
7
|
-
const client_1 = require("@apollo/client");
|
|
8
|
-
const material_1 = require("@mui/material");
|
|
9
|
-
const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
|
|
10
|
-
const fixefy_ui_utils_2 = require("@fixefy/fixefy-ui-utils");
|
|
11
|
-
const statistics_styles_1 = require("./styles/statistics.styles");
|
|
12
|
-
function FxStatisticsBar({ value, type = 'currency', label, structure, collapsed, filter }) {
|
|
13
|
-
const _classes = (0, statistics_styles_1.useStyles)();
|
|
14
|
-
const { extended, input_type, title } = structure || {};
|
|
15
|
-
const { gql_operation, object_path, filter: structurefilter, variables } = extended || {};
|
|
16
|
-
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 }" } ) }';
|
|
17
|
-
let _filter = structurefilter;
|
|
18
|
-
if (filter) {
|
|
19
|
-
_filter = Object.assign(Object.assign({}, _filter), filter);
|
|
20
|
-
}
|
|
21
|
-
const [fetchData, { data, error, loading }] = (0, client_1.useLazyQuery)((0, graphql_tag_1.gql)(gqlOperation));
|
|
22
|
-
const convertValue = (value) => {
|
|
23
|
-
var _a;
|
|
24
|
-
let newValue = '';
|
|
25
|
-
let sign = '';
|
|
26
|
-
if (value < 1000) {
|
|
27
|
-
newValue = value;
|
|
28
|
-
}
|
|
29
|
-
else if (value >= 1000 && value < 1000000) {
|
|
30
|
-
newValue = (value / 1000).toFixed(2);
|
|
31
|
-
sign = 'K';
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
newValue = (value / 1000000).toFixed(2);
|
|
35
|
-
sign = 'M';
|
|
36
|
-
}
|
|
37
|
-
return (new Intl.NumberFormat('en-US', {
|
|
38
|
-
style: 'currency',
|
|
39
|
-
currency: ((_a = (0, fixefy_ui_utils_2.getCurrency)(null)) === null || _a === void 0 ? void 0 : _a.code.toUpperCase()) || 'USD',
|
|
40
|
-
}).format(Number(newValue)) + sign);
|
|
41
|
-
};
|
|
42
|
-
const checkIsCollapsed = () => {
|
|
43
|
-
let collapsedFromStructureIsDefined = false;
|
|
44
|
-
if (variables && variables.collapsed !== undefined && variables.collapsed !== null) {
|
|
45
|
-
collapsedFromStructureIsDefined = true;
|
|
46
|
-
}
|
|
47
|
-
if (collapsedFromStructureIsDefined) {
|
|
48
|
-
return variables.collapsed;
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
return collapsed;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
const getValue = (value) => {
|
|
55
|
-
var _a;
|
|
56
|
-
const statisticsType = (input_type === null || input_type === void 0 ? void 0 : input_type.value) || type;
|
|
57
|
-
switch (statisticsType) {
|
|
58
|
-
case 'percentage': {
|
|
59
|
-
return new Intl.NumberFormat('en-US', {
|
|
60
|
-
style: 'percent',
|
|
61
|
-
}).format(Number(value));
|
|
62
|
-
}
|
|
63
|
-
case 'currency': {
|
|
64
|
-
if (checkIsCollapsed()) {
|
|
65
|
-
return convertValue(value);
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
return new Intl.NumberFormat('en-US', {
|
|
69
|
-
style: 'currency',
|
|
70
|
-
currency: ((_a = (0, fixefy_ui_utils_2.getCurrency)(null)) === null || _a === void 0 ? void 0 : _a.code.toUpperCase()) || 'USD',
|
|
71
|
-
}).format(Number(value));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
(0, react_1.useEffect)(() => {
|
|
77
|
-
if (!value && structure) {
|
|
78
|
-
fetchData({
|
|
79
|
-
variables: {
|
|
80
|
-
where: Object.assign({}, _filter),
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}, []);
|
|
85
|
-
const statisticsTitle = label ? label : title;
|
|
86
|
-
const statisticsValue = data && data[object_path] != null ? getValue(data[object_path]) : getValue(value);
|
|
87
|
-
return loading ? (<material_1.Box sx={{ width: 100 }}>
|
|
88
|
-
<material_1.Skeleton animation="wave" width={100} height={30}/>
|
|
89
|
-
<material_1.Skeleton animation="wave" width={100} height={20}/>
|
|
90
|
-
</material_1.Box>) : (<div className={_classes.container}>
|
|
91
|
-
<span className={(variables === null || variables === void 0 ? void 0 : variables.contrast) ? _classes.contrastValue : _classes.value}>{statisticsValue}</span>
|
|
92
|
-
<span className={(variables === null || variables === void 0 ? void 0 : variables.contrast) ? _classes.contrastLabel : _classes.label}>{(0, fixefy_ui_utils_1.titleCase)(statisticsTitle)}</span>
|
|
93
|
-
</div>);
|
|
94
|
-
}
|
|
95
|
-
exports.FxStatisticsBar = FxStatisticsBar;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FxStatisticsBar = void 0;
|
|
4
|
-
var FxStatisticsBar_1 = require("./FxStatisticsBar");
|
|
5
|
-
Object.defineProperty(exports, "FxStatisticsBar", { enumerable: true, get: function () { return FxStatisticsBar_1.FxStatisticsBar; } });
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useStyles = void 0;
|
|
4
|
-
const styles_1 = require("@mui/styles");
|
|
5
|
-
require("@fixefy/fxutils.page_context");
|
|
6
|
-
exports.useStyles = (0, styles_1.makeStyles)((theme) => ({
|
|
7
|
-
container: {
|
|
8
|
-
display: 'flex',
|
|
9
|
-
alignItems: 'center',
|
|
10
|
-
justifyContent: 'center',
|
|
11
|
-
flexDirection: 'column',
|
|
12
|
-
minHeight: 56,
|
|
13
|
-
},
|
|
14
|
-
contrastLabel: {
|
|
15
|
-
fontWeight: 'normal',
|
|
16
|
-
fontSize: 11,
|
|
17
|
-
lineHeight: '16px',
|
|
18
|
-
letterSpacing: '0.1px',
|
|
19
|
-
opacity: 0.7,
|
|
20
|
-
color: theme.palette.common.white,
|
|
21
|
-
textOverflow: 'ellipsis',
|
|
22
|
-
whiteSpace: 'nowrap',
|
|
23
|
-
},
|
|
24
|
-
contrastValue: {
|
|
25
|
-
fontWeight: 600,
|
|
26
|
-
fontSize: 19,
|
|
27
|
-
lineHeight: '28px',
|
|
28
|
-
letterSpacing: '0.15px',
|
|
29
|
-
color: theme.palette.common.white,
|
|
30
|
-
},
|
|
31
|
-
label: Object.assign(Object.assign({}, theme.typography.table), { color: theme.palette.statistics.label, textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),
|
|
32
|
-
value: Object.assign(Object.assign({}, theme.typography.h5), { color: theme.palette.statistics.value }),
|
|
33
|
-
}));
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FxStatusBar = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
const FxChip_1 = require("../FxChip");
|
|
8
|
-
const constants_1 = require("./helpers/constants");
|
|
9
|
-
const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
|
|
10
|
-
const statusBar_styles_1 = require("./styles/statusBar.styles");
|
|
11
|
-
const FxStatusBar = ({ onChangeStatus, onSearch, defaultStatus, title, options, chipsVariant = 'filled' }) => {
|
|
12
|
-
const [selectedStatus, setSelectedStatus] = (0, react_1.useState)([]);
|
|
13
|
-
const [searchValue, setSearchValue] = (0, react_1.useState)('');
|
|
14
|
-
(0, react_1.useEffect)(() => {
|
|
15
|
-
if (defaultStatus) {
|
|
16
|
-
typeof defaultStatus === 'string' ? setSelectedStatus([defaultStatus]) : setSelectedStatus(defaultStatus);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
setSelectedStatus(['all']);
|
|
20
|
-
}
|
|
21
|
-
}, [defaultStatus]);
|
|
22
|
-
const onStatusClick = (status) => {
|
|
23
|
-
if (status === 'all') {
|
|
24
|
-
setSelectedStatus(() => {
|
|
25
|
-
if (selectedStatus.includes(status)) {
|
|
26
|
-
return [];
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
return ['all'];
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
setSelectedStatus((prevState) => {
|
|
35
|
-
if (selectedStatus.includes(status)) {
|
|
36
|
-
const rv = prevState.filter((_status) => _status !== status && _status !== 'all');
|
|
37
|
-
return rv.length == 0 ? ['all'] : rv;
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
const rv = prevState.filter((_status) => _status !== status && _status !== 'all');
|
|
41
|
-
return [...rv, status];
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
(0, react_1.useEffect)(() => {
|
|
47
|
-
onChangeStatus(selectedStatus);
|
|
48
|
-
}, [selectedStatus]);
|
|
49
|
-
(0, react_1.useEffect)(() => {
|
|
50
|
-
onSearch && onSearch(searchValue);
|
|
51
|
-
}, [searchValue]);
|
|
52
|
-
const __options = options !== null && options !== void 0 ? options : constants_1.statuses;
|
|
53
|
-
return (<statusBar_styles_1.StatusBarCard>
|
|
54
|
-
{title && <statusBar_styles_1.StatusBarTitle style={{ marginRight: '8px' }}>{(0, fixefy_ui_utils_1.titleCase)(title)}</statusBar_styles_1.StatusBarTitle>}
|
|
55
|
-
|
|
56
|
-
<material_1.Stack direction="row" spacing={1}>
|
|
57
|
-
<statusBar_styles_1.StatusChipStyled onClick={() => onStatusClick('all')} label="All" variant={selectedStatus.includes('all') ? 'filled' : 'outlined'}/>
|
|
58
|
-
{Object.keys(__options).map((key, index) => {
|
|
59
|
-
return <FxChip_1.FxChip onClick={() => onStatusClick(__options[key])} key={index} label={(0, fixefy_ui_utils_1.titleCase)(key)} variant={chipsVariant} status={selectedStatus.includes(__options[key]) ? __options[key] : ''}/>;
|
|
60
|
-
})}
|
|
61
|
-
</material_1.Stack>
|
|
62
|
-
</statusBar_styles_1.StatusBarCard>);
|
|
63
|
-
};
|
|
64
|
-
exports.FxStatusBar = FxStatusBar;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.statuses = void 0;
|
|
4
|
-
exports.statuses = {
|
|
5
|
-
Declined: 'declined',
|
|
6
|
-
Pending: 'pending',
|
|
7
|
-
Approved: 'approved',
|
|
8
|
-
Active: 'active',
|
|
9
|
-
Challenge: 'challenged',
|
|
10
|
-
in_review: 'in_review',
|
|
11
|
-
Discrepancy: 'discrepancy',
|
|
12
|
-
no_pricing: 'no_pricing',
|
|
13
|
-
in_progress: 'in_progress',
|
|
14
|
-
Duplicated: 'duplicated',
|
|
15
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FxStatusBar = void 0;
|
|
4
|
-
var FxStatusBar_1 = require("./FxStatusBar");
|
|
5
|
-
Object.defineProperty(exports, "FxStatusBar", { enumerable: true, get: function () { return FxStatusBar_1.FxStatusBar; } });
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StatusChipStyled = exports.StatusBarTitle = exports.StatusBarCard = void 0;
|
|
4
|
-
const styles_1 = require("@mui/material/styles");
|
|
5
|
-
const material_1 = require("@mui/material");
|
|
6
|
-
exports.StatusBarCard = (0, styles_1.styled)(material_1.Box)(({ theme }) => ({
|
|
7
|
-
background: theme.palette.common.white,
|
|
8
|
-
borderRadius: 4,
|
|
9
|
-
padding: 16,
|
|
10
|
-
boxShadow: "0px 0px 10px rgba(86, 135, 147, 0.3)",
|
|
11
|
-
display: "flex",
|
|
12
|
-
alignItems: "center",
|
|
13
|
-
width: "fit-content",
|
|
14
|
-
}));
|
|
15
|
-
exports.StatusBarTitle = (0, styles_1.styled)("span")(({ theme }) => (Object.assign(Object.assign({}, theme.typography.body1), { color: theme.palette.common.black })));
|
|
16
|
-
exports.StatusChipStyled = (0, styles_1.styled)(material_1.Chip)(({ theme, variant }) => {
|
|
17
|
-
let backgroundColor, border, labelColor;
|
|
18
|
-
if (variant === "filled") {
|
|
19
|
-
backgroundColor = theme.palette.primary.light;
|
|
20
|
-
labelColor = theme.palette.common.white;
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
backgroundColor = theme.palette.common.white;
|
|
24
|
-
}
|
|
25
|
-
border = "#F0F0F0";
|
|
26
|
-
return {
|
|
27
|
-
height: 20,
|
|
28
|
-
minWidth: 34,
|
|
29
|
-
maxWidth: 120,
|
|
30
|
-
["& .MuiChip-label"]: {
|
|
31
|
-
fontSize: 9,
|
|
32
|
-
fontWeight: 600,
|
|
33
|
-
lineHeight: "12px",
|
|
34
|
-
color: labelColor ? labelColor : theme.palette["statistics"].label,
|
|
35
|
-
},
|
|
36
|
-
backgroundColor,
|
|
37
|
-
border: `1px solid ${border}`,
|
|
38
|
-
};
|
|
39
|
-
});
|