@fixefy/fixefy-ui-components 0.3.108 → 0.3.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/FxAsyncDropdown/FxAsyncDropdown.js +3 -3
- package/dist/FxDatesProgress/styles/progress.styles.js +1 -1
- package/dist/FxUserImage/FxUserImage.js +2 -2
- package/dist/fixefy-ui-components/src/FxActionsTray/FxActionsTray.js +111 -0
- package/dist/fixefy-ui-components/src/FxActionsTray/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxActionsTray/styles/actionsTray.style.js +114 -0
- package/dist/fixefy-ui-components/src/FxAggregationsBar/FxAggregations.js +41 -0
- package/dist/fixefy-ui-components/src/FxAggregationsBar/helpers/structureReader.js +80 -0
- package/dist/fixefy-ui-components/src/FxAggregationsBar/index.js +22 -0
- package/dist/fixefy-ui-components/src/FxAggregationsBar/operations/query.js +73 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/FxAsyncDropdown.js +500 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/CheckboxIcon.js +44 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/ChipOption.js +35 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/ChosenIcon.js +45 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/DeleteButton.js +37 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/LogoOption.js +101 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/TextOption.js +74 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/index.js +36 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/helpers/helpers.js +233 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/styles/dropdown.styles.js +211 -0
- package/dist/fixefy-ui-components/src/FxAsyncDropdown/types.js +4 -0
- package/dist/fixefy-ui-components/src/FxAvatar/FxAvatar.js +145 -0
- package/dist/fixefy-ui-components/src/FxAvatar/helpers/stringToColor.js +23 -0
- package/dist/fixefy-ui-components/src/FxAvatar/index.js +22 -0
- package/dist/fixefy-ui-components/src/FxAvatar/styles/avatar.styles.js +233 -0
- package/dist/fixefy-ui-components/src/FxButton/FxButton.js +106 -0
- package/dist/fixefy-ui-components/src/FxButton/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxButton/styles/button.styles.js +28 -0
- package/dist/fixefy-ui-components/src/FxButtonModalWithComponent/FxButtonModalWithComponent.js +118 -0
- package/dist/fixefy-ui-components/src/FxButtonModalWithComponent/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxButtonModalWithMenu/FxButtonModalWithMenu.js +126 -0
- package/dist/fixefy-ui-components/src/FxButtonModalWithMenu/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxChip/FxChip.js +75 -0
- package/dist/fixefy-ui-components/src/FxChip/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxChip/styles/chip.styles.js +147 -0
- package/dist/fixefy-ui-components/src/FxDatesProgress/FxDatesProgress.js +126 -0
- package/dist/fixefy-ui-components/src/FxDatesProgress/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxDatesProgress/styles/progress.styles.js +24 -0
- package/dist/fixefy-ui-components/src/FxGeneralModal/FxGeneralModal.js +107 -0
- package/dist/fixefy-ui-components/src/FxGeneralModal/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxGridEmptyState/FxGridEmptyState.js +86 -0
- package/dist/fixefy-ui-components/src/FxGridEmptyState/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxGridError/FxGridError.js +91 -0
- package/dist/fixefy-ui-components/src/FxGridError/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxIcon/FxIcon.js +118 -0
- package/dist/fixefy-ui-components/src/FxIcon/content/dynamic_icon.js +20 -0
- package/dist/fixefy-ui-components/src/FxIcon/content/index.js +20 -0
- package/dist/fixefy-ui-components/src/FxIcon/content/lazy_icon.js +87 -0
- package/dist/fixefy-ui-components/src/FxIcon/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxMenuItemWithIcon/FxMenuItemWithIcon.js +84 -0
- package/dist/fixefy-ui-components/src/FxMenuItemWithIcon/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxModal/FxModal.js +171 -0
- package/dist/fixefy-ui-components/src/FxModal/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxModal/styles/modal.style.js +66 -0
- package/dist/fixefy-ui-components/src/FxNotes/FxNotes.js +216 -0
- package/dist/fixefy-ui-components/src/FxNotes/helpers/stringToColor.js +26 -0
- package/dist/fixefy-ui-components/src/FxNotes/index.js +22 -0
- package/dist/fixefy-ui-components/src/FxNotes/operations/queries.js +35 -0
- package/dist/fixefy-ui-components/src/FxNotes/styles/notes.styles.js +168 -0
- package/dist/fixefy-ui-components/src/FxNumberField/FxNumberField.js +108 -0
- package/dist/fixefy-ui-components/src/FxNumberField/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxNumberField/styles/number_field.styles.js +99 -0
- package/dist/fixefy-ui-components/src/FxObjStaticDropdown/FxObjStaticDropdown.js +548 -0
- package/dist/fixefy-ui-components/src/FxObjStaticDropdown/index.js +25 -0
- package/dist/fixefy-ui-components/src/FxObjStaticDropdown/styles/dropdown.styles.js +211 -0
- package/dist/fixefy-ui-components/src/FxPopper/Popper.js +139 -0
- package/dist/fixefy-ui-components/src/FxPopper/PopperWithOutside.js +116 -0
- package/dist/fixefy-ui-components/src/FxPopper/content/PopperHeader.js +36 -0
- package/dist/fixefy-ui-components/src/FxPopper/content/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxPopper/index.js +24 -0
- package/dist/fixefy-ui-components/src/FxPopper/styles/popper.styles.js +138 -0
- package/dist/fixefy-ui-components/src/FxProgressCircle/FxProgressCircle.js +65 -0
- package/dist/fixefy-ui-components/src/FxProgressCircle/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxProgressCircle/styles/progress_circle.styles.js +106 -0
- package/dist/fixefy-ui-components/src/FxProgressCounter/ProgressCounter.js +168 -0
- package/dist/fixefy-ui-components/src/FxProgressCounter/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxProgressCounter/styles/progress_counter.styles.js +66 -0
- package/dist/fixefy-ui-components/src/FxScore/FxScore.js +215 -0
- package/dist/fixefy-ui-components/src/FxScore/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxScore/styles/score.styles.js +102 -0
- package/dist/fixefy-ui-components/src/FxShowMore/FxShowMore.js +80 -0
- package/dist/fixefy-ui-components/src/FxShowMore/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxShowMore/styles/show_more.styles.js +143 -0
- package/dist/fixefy-ui-components/src/FxSlider/FxSlider.js +49 -0
- package/dist/fixefy-ui-components/src/FxSlider/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxStatisticsBar/FxStatisticsBar.js +198 -0
- package/dist/fixefy-ui-components/src/FxStatisticsBar/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxStatisticsBar/styles/statistics.styles.js +103 -0
- package/dist/fixefy-ui-components/src/FxStatusBar/FxStatusBar.js +149 -0
- package/dist/fixefy-ui-components/src/FxStatusBar/helpers/constants.js +22 -0
- package/dist/fixefy-ui-components/src/FxStatusBar/index.js +22 -0
- package/dist/fixefy-ui-components/src/FxStatusBar/styles/statusBar.styles.js +138 -0
- package/dist/fixefy-ui-components/src/FxStrStaticDropdown/FxStrStaticDropdown.js +382 -0
- package/dist/fixefy-ui-components/src/FxStrStaticDropdown/helpers/helpers.js +22 -0
- package/dist/fixefy-ui-components/src/FxStrStaticDropdown/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxStrStaticDropdown/styles/dropdown.styles.js +190 -0
- package/dist/fixefy-ui-components/src/FxStyledButton/FxStyledButton.js +57 -0
- package/dist/fixefy-ui-components/src/FxStyledButton/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxStyledComponents/index.js +319 -0
- package/dist/fixefy-ui-components/src/FxSwitch/FxSwitch.js +106 -0
- package/dist/fixefy-ui-components/src/FxSwitch/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxSwitch/styles/switch.styles.js +42 -0
- package/dist/fixefy-ui-components/src/FxTabs/FxTabs.js +79 -0
- package/dist/fixefy-ui-components/src/FxTabs/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxTag/FxTag.js +50 -0
- package/dist/fixefy-ui-components/src/FxTag/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxTag/styles/tag.styles.js +106 -0
- package/dist/fixefy-ui-components/src/FxTextField/FxTextField.js +211 -0
- package/dist/fixefy-ui-components/src/FxTextField/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxTodo/FxTodo.js +95 -0
- package/dist/fixefy-ui-components/src/FxTodo/index.js +22 -0
- package/dist/fixefy-ui-components/src/FxTodo/styles/todo.styles.js +183 -0
- package/dist/fixefy-ui-components/src/FxToggleButtons/FxToggleButtons.js +69 -0
- package/dist/fixefy-ui-components/src/FxToggleButtons/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxUserImage/FxUserImage.js +236 -0
- package/dist/fixefy-ui-components/src/FxUserImage/index.js +11 -0
- package/dist/fixefy-ui-components/src/FxWizard/FxWizard.js +50 -0
- package/dist/fixefy-ui-components/src/FxWizard/index.js +19 -0
- package/dist/fixefy-ui-components/src/FxWizard/steps launcher/StepsLauncher.js +52 -0
- package/dist/fixefy-ui-components/src/FxWizard/steps launcher/index.js +18 -0
- package/dist/fixefy-ui-components/src/index.js +277 -0
- package/package.json +4 -5
|
@@ -19,7 +19,7 @@ const _graphqltag = require("graphql-tag");
|
|
|
19
19
|
const _dropdownstyles = require("./styles/dropdown.styles");
|
|
20
20
|
const _helpers = require("./helpers/helpers");
|
|
21
21
|
const _hooks = require("@apollo/client/react/hooks");
|
|
22
|
-
const
|
|
22
|
+
const _fixefycookies = require("@fixefy/fixefy-cookies");
|
|
23
23
|
const _components = require("./components");
|
|
24
24
|
function _define_property(obj, key, value) {
|
|
25
25
|
if (key in obj) {
|
|
@@ -126,8 +126,8 @@ const FxAsyncDropdown = (props)=>{
|
|
|
126
126
|
const { method_name } = variables !== null && variables !== void 0 ? variables : {};
|
|
127
127
|
var _fetcher_queryOptions_variables;
|
|
128
128
|
const { where, sort } = (_fetcher_queryOptions_variables = fetcher.queryOptions.variables) !== null && _fetcher_queryOptions_variables !== void 0 ? _fetcher_queryOptions_variables : {};
|
|
129
|
-
var
|
|
130
|
-
const { ws } = (
|
|
129
|
+
var _CookieHelper_getAll;
|
|
130
|
+
const { ws } = (_CookieHelper_getAll = _fixefycookies.CookieHelper.getAll(null)) !== null && _CookieHelper_getAll !== void 0 ? _CookieHelper_getAll : {};
|
|
131
131
|
const isLocal = fetcher === null || fetcher === void 0 ? void 0 : (_fetcher_query = fetcher.query) === null || _fetcher_query === void 0 ? void 0 : _fetcher_query.loc;
|
|
132
132
|
const gqlQuery = isLocal ? fetcher.query.loc.source.body : fetcher.query;
|
|
133
133
|
const [defaultValueWhere, setDefaultValueWhere] = (0, _react.useState)(where);
|
|
@@ -19,6 +19,6 @@ const Progress = (0, _styles.styled)(_LinearProgress.default)(({ theme })=>({
|
|
|
19
19
|
borderRadius: '20px',
|
|
20
20
|
backgroundColor: '#E7EEF0',
|
|
21
21
|
'& .MuiLinearProgress-barColorPrimary': {
|
|
22
|
-
backgroundColor: theme.palette.primary['
|
|
22
|
+
backgroundColor: theme.palette.primary['300']
|
|
23
23
|
}
|
|
24
24
|
}));
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "FxUserImage", {
|
|
|
11
11
|
const _jsxruntime = require("react/jsx-runtime");
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
13
13
|
const _image = /*#__PURE__*/ _interop_require_default(require("next/image"));
|
|
14
|
-
const
|
|
14
|
+
const _fixefycookies = require("@fixefy/fixefy-cookies");
|
|
15
15
|
const _FxIcon = require("../FxIcon");
|
|
16
16
|
const _nexts3upload = require("@fixefy/next-s3-upload");
|
|
17
17
|
const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
|
|
@@ -153,7 +153,7 @@ const FxUserImage = ({ bucketAddress, user, loading, setLoading, assetUrl })=>{
|
|
|
153
153
|
const fetchFiles = function() {
|
|
154
154
|
var _ref = _async_to_generator(function*() {
|
|
155
155
|
setLoading(true);
|
|
156
|
-
const { ws, user } =
|
|
156
|
+
const { ws, user } = _fixefycookies.CookieHelper.getAll(null);
|
|
157
157
|
let { workspaces } = JSON.parse(user);
|
|
158
158
|
if (typeof workspaces === 'string') {
|
|
159
159
|
workspaces = JSON.parse(workspaces);
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "FxActionsTray", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return FxActionsTray;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
13
|
+
const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
|
|
14
|
+
const _actionsTraystyle = require("./styles/actionsTray.style");
|
|
15
|
+
const _Box = /*#__PURE__*/ _interop_require_default(require("@mui/material/Box"));
|
|
16
|
+
const _Divider = /*#__PURE__*/ _interop_require_default(require("@mui/material/Divider"));
|
|
17
|
+
const _Paper = /*#__PURE__*/ _interop_require_default(require("@mui/material/Paper"));
|
|
18
|
+
const _Slide = /*#__PURE__*/ _interop_require_default(require("@mui/material/Slide"));
|
|
19
|
+
const _Typography = /*#__PURE__*/ _interop_require_default(require("@mui/material/Typography"));
|
|
20
|
+
const _Button = /*#__PURE__*/ _interop_require_default(require("@mui/material/Button"));
|
|
21
|
+
const _pluralize = /*#__PURE__*/ _interop_require_default(require("pluralize"));
|
|
22
|
+
const _FxIcon = require("../FxIcon");
|
|
23
|
+
function _interop_require_default(obj) {
|
|
24
|
+
return obj && obj.__esModule ? obj : {
|
|
25
|
+
default: obj
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const FxActionsTray = ({ assetUrl, ctx, entityType = 'item', show = false, actions = [], onClose, onClick })=>{
|
|
29
|
+
const { classes } = (0, _actionsTraystyle.useStyles)();
|
|
30
|
+
const { selection = [], selectAll, ultraSelectAll, totalCount } = ctx;
|
|
31
|
+
const selectedCount = selectAll === true && ultraSelectAll === true ? totalCount : selection.length;
|
|
32
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
33
|
+
className: classes.container,
|
|
34
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Slide.default, {
|
|
35
|
+
direction: "up",
|
|
36
|
+
in: show,
|
|
37
|
+
mountOnEnter: true,
|
|
38
|
+
unmountOnExit: true,
|
|
39
|
+
timeout: 400,
|
|
40
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Paper.default, {
|
|
41
|
+
elevation: 4,
|
|
42
|
+
className: classes.paper,
|
|
43
|
+
children: [
|
|
44
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
45
|
+
className: classes.selected,
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
|
|
48
|
+
sx: {
|
|
49
|
+
fontWeight: 700,
|
|
50
|
+
marginRight: '7px'
|
|
51
|
+
},
|
|
52
|
+
children: selectedCount
|
|
53
|
+
}),
|
|
54
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
|
|
55
|
+
children: `${(0, _pluralize.default)(entityType, selectedCount)} selected`
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
}),
|
|
59
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Divider.default, {
|
|
60
|
+
className: classes.divider,
|
|
61
|
+
orientation: "vertical"
|
|
62
|
+
}),
|
|
63
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
64
|
+
className: classes.actions,
|
|
65
|
+
children: actions.map((action, index)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(ActionButton, {
|
|
66
|
+
assetUrl: assetUrl,
|
|
67
|
+
title: action.title,
|
|
68
|
+
name: action.name,
|
|
69
|
+
icon: action.extended.icon,
|
|
70
|
+
classes: classes,
|
|
71
|
+
onClick: onClick
|
|
72
|
+
}, index))
|
|
73
|
+
}),
|
|
74
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Divider.default, {
|
|
75
|
+
className: classes.divider,
|
|
76
|
+
orientation: "vertical"
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
79
|
+
className: classes.close,
|
|
80
|
+
onClick: onClose,
|
|
81
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
|
|
82
|
+
textAlign: 'center',
|
|
83
|
+
children: (0, _fixefyuiutils.titleCase)('close')
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
const ActionButton = ({ assetUrl, title, name, icon, classes, onClick })=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Button.default, {
|
|
92
|
+
id: name,
|
|
93
|
+
className: classes.actionButton,
|
|
94
|
+
title: (0, _fixefyuiutils.titleCase)(title),
|
|
95
|
+
onClick: (event)=>onClick(event, name),
|
|
96
|
+
children: [
|
|
97
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Box.default, {
|
|
98
|
+
width: '16px',
|
|
99
|
+
height: '16px',
|
|
100
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
101
|
+
width: 16,
|
|
102
|
+
height: 16,
|
|
103
|
+
icon: `actions/${icon}.svg`,
|
|
104
|
+
assetUrl: assetUrl
|
|
105
|
+
})
|
|
106
|
+
}),
|
|
107
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
|
|
108
|
+
children: (0, _fixefyuiutils.titleCase)(title)
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "FxActionsTray", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _FxActionsTray.FxActionsTray;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _FxActionsTray = require("./FxActionsTray");
|
|
@@ -0,0 +1,114 @@
|
|
|
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 _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
|
|
12
|
+
const useStyles = (0, _fixefyuiutils.makeStyles)()((theme)=>({
|
|
13
|
+
container: {
|
|
14
|
+
position: 'fixed',
|
|
15
|
+
top: '80%',
|
|
16
|
+
left: '50%',
|
|
17
|
+
width: 'max-content'
|
|
18
|
+
},
|
|
19
|
+
approveButton: {
|
|
20
|
+
['&:hover']: {
|
|
21
|
+
background: 'none'
|
|
22
|
+
},
|
|
23
|
+
['& p']: {
|
|
24
|
+
color: '#78B000'
|
|
25
|
+
},
|
|
26
|
+
['& svg']: {
|
|
27
|
+
color: '#78B000'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
paper: {
|
|
31
|
+
display: 'flex',
|
|
32
|
+
padding: '16px 24px',
|
|
33
|
+
borderRadius: '8px',
|
|
34
|
+
backgroundColor: theme.palette.background.default,
|
|
35
|
+
boxShadow: '0px 0px 10px rgba(86, 135, 147, 0.2)',
|
|
36
|
+
position: 'relative',
|
|
37
|
+
zIndex: 10000,
|
|
38
|
+
justifyContent: 'space-between',
|
|
39
|
+
left: '-50%',
|
|
40
|
+
overflow: 'hidden',
|
|
41
|
+
//@ts-ignore
|
|
42
|
+
border: `1px solid ${theme.palette.primary['100']}`
|
|
43
|
+
},
|
|
44
|
+
selected: {
|
|
45
|
+
display: 'flex',
|
|
46
|
+
marginRight: '24px',
|
|
47
|
+
['& p']: {
|
|
48
|
+
fontSize: '12px',
|
|
49
|
+
lineHeight: '16px'
|
|
50
|
+
},
|
|
51
|
+
alignItems: 'center'
|
|
52
|
+
},
|
|
53
|
+
divider: {
|
|
54
|
+
height: '40px',
|
|
55
|
+
margin: 'auto 0px',
|
|
56
|
+
border: `solid 1px ${theme['palette'].greyscale.contrastText}`
|
|
57
|
+
},
|
|
58
|
+
actions: {
|
|
59
|
+
margin: '0 24px',
|
|
60
|
+
display: 'flex',
|
|
61
|
+
flexDirection: 'row',
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
justifyContent: 'center',
|
|
64
|
+
gap: '20px'
|
|
65
|
+
},
|
|
66
|
+
close: {
|
|
67
|
+
width: '90px',
|
|
68
|
+
height: '60px',
|
|
69
|
+
borderRadius: 0,
|
|
70
|
+
['& p']: {
|
|
71
|
+
fontSize: '12px',
|
|
72
|
+
fontWeight: 700
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
actionButton: {
|
|
76
|
+
display: 'flex',
|
|
77
|
+
justifyContent: 'center',
|
|
78
|
+
alignItems: 'center',
|
|
79
|
+
padding: '8px 16px',
|
|
80
|
+
gap: '4px',
|
|
81
|
+
//@ts-ignore
|
|
82
|
+
border: `1px solid ${theme.palette.primary['500']}`,
|
|
83
|
+
borderRadius: '100px',
|
|
84
|
+
position: 'relative',
|
|
85
|
+
['& p']: {
|
|
86
|
+
fontSize: '12px',
|
|
87
|
+
fontWeight: 600,
|
|
88
|
+
textAlign: 'center',
|
|
89
|
+
//@ts-ignore
|
|
90
|
+
color: theme.palette.primary['500']
|
|
91
|
+
},
|
|
92
|
+
['&#approve']: {
|
|
93
|
+
backgroundColor: theme.palette.colors.green1,
|
|
94
|
+
borderColor: theme.palette.colors.green1,
|
|
95
|
+
['& p']: {
|
|
96
|
+
color: theme.palette.common.white
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
['&#challenge']: {
|
|
100
|
+
backgroundColor: theme.palette.colors.orange,
|
|
101
|
+
borderColor: theme.palette.colors.orange,
|
|
102
|
+
['& p']: {
|
|
103
|
+
color: theme.palette.common.white
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
['&#decline']: {
|
|
107
|
+
backgroundColor: theme.palette.colors.red,
|
|
108
|
+
borderColor: theme.palette.colors.red,
|
|
109
|
+
['& p']: {
|
|
110
|
+
color: theme.palette.common.white
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}));
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "FxAggregationsBar", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return FxAggregationsBar;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
13
|
+
const _Stack = /*#__PURE__*/ _interop_require_default(require("@mui/material/Stack"));
|
|
14
|
+
const _structureReader = require("./helpers/structureReader");
|
|
15
|
+
function _interop_require_default(obj) {
|
|
16
|
+
return obj && obj.__esModule ? obj : {
|
|
17
|
+
default: obj
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const FxAggregationsBar = (props)=>{
|
|
21
|
+
const { structure, minWidth, mb, filter, initialValues } = props;
|
|
22
|
+
const { children, extended } = structure;
|
|
23
|
+
const { variables } = extended;
|
|
24
|
+
const { collapsed } = variables;
|
|
25
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Stack.default, {
|
|
26
|
+
direction: "row",
|
|
27
|
+
spacing: 1.5,
|
|
28
|
+
sx: {
|
|
29
|
+
mb: mb ? mb : 0,
|
|
30
|
+
['& div']: {
|
|
31
|
+
minWidth: minWidth
|
|
32
|
+
},
|
|
33
|
+
['& > span']: {
|
|
34
|
+
minWidth: minWidth
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
children: children.map((child)=>{
|
|
38
|
+
return (0, _structureReader.structureReader)(child, filter, collapsed, initialValues);
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "structureReader", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return structureReader;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
13
|
+
const _Box = /*#__PURE__*/ _interop_require_default(require("@mui/material/Box"));
|
|
14
|
+
const _Stack = /*#__PURE__*/ _interop_require_default(require("@mui/material/Stack"));
|
|
15
|
+
const _Divider = /*#__PURE__*/ _interop_require_default(require("@mui/material/Divider"));
|
|
16
|
+
const _FxScore = require("../../FxScore");
|
|
17
|
+
const _FxStatisticsBar = require("../../FxStatisticsBar");
|
|
18
|
+
const _FxProgressCounter = require("../../FxProgressCounter");
|
|
19
|
+
function _interop_require_default(obj) {
|
|
20
|
+
return obj && obj.__esModule ? obj : {
|
|
21
|
+
default: obj
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const structureReader = (structure, filter, collapsed, initialValues)=>{
|
|
25
|
+
const { extended, type } = structure;
|
|
26
|
+
switch(type){
|
|
27
|
+
case 'aggregations_primary_container':
|
|
28
|
+
return structure.children.map((child, index)=>{
|
|
29
|
+
var _child_input_type, _child_input_type1, _extended_variables;
|
|
30
|
+
return ((_child_input_type = child.input_type) === null || _child_input_type === void 0 ? void 0 : _child_input_type.value) === 'percentage' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxScore.FxScore, {
|
|
31
|
+
structure: child,
|
|
32
|
+
filter: filter,
|
|
33
|
+
value: initialValues === null || initialValues === void 0 ? void 0 : initialValues.score
|
|
34
|
+
}, index) : ((_child_input_type1 = child.input_type) === null || _child_input_type1 === void 0 ? void 0 : _child_input_type1.value) === 'progress' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxProgressCounter.FxProgressCounter, {
|
|
35
|
+
structure: child,
|
|
36
|
+
filter: filter,
|
|
37
|
+
values: initialValues
|
|
38
|
+
}, index) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_Box.default, {
|
|
39
|
+
sx: {
|
|
40
|
+
display: 'flex',
|
|
41
|
+
justifyContent: 'center',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
width: 'fit-content',
|
|
44
|
+
padding: 2,
|
|
45
|
+
borderRadius: 2,
|
|
46
|
+
backgroundColor: (extended === null || extended === void 0 ? void 0 : (_extended_variables = extended.variables) === null || _extended_variables === void 0 ? void 0 : _extended_variables.bg) || '#FFFFFF'
|
|
47
|
+
},
|
|
48
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxStatisticsBar.FxStatisticsBar, {
|
|
49
|
+
structure: child,
|
|
50
|
+
filter: filter,
|
|
51
|
+
collapsed: collapsed,
|
|
52
|
+
value: initialValues ? initialValues[child.extended.object_path] : null
|
|
53
|
+
}, index)
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
case 'aggregations_secondary_container':
|
|
57
|
+
var _extended_variables;
|
|
58
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Stack.default, {
|
|
59
|
+
direction: "row",
|
|
60
|
+
divider: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Divider.default, {
|
|
61
|
+
orientation: "vertical",
|
|
62
|
+
flexItem: true
|
|
63
|
+
}),
|
|
64
|
+
spacing: 2,
|
|
65
|
+
sx: {
|
|
66
|
+
backgroundColor: (extended === null || extended === void 0 ? void 0 : (_extended_variables = extended.variables) === null || _extended_variables === void 0 ? void 0 : _extended_variables.bg) || '#FFFFFF',
|
|
67
|
+
borderRadius: '8px',
|
|
68
|
+
padding: '24px 16px'
|
|
69
|
+
},
|
|
70
|
+
children: structure.children.map((child, index)=>{
|
|
71
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxStatisticsBar.FxStatisticsBar, {
|
|
72
|
+
structure: child,
|
|
73
|
+
filter: filter,
|
|
74
|
+
collapsed: collapsed,
|
|
75
|
+
value: initialValues ? initialValues[child.extended.object_path] : null
|
|
76
|
+
}, index);
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
AggreationsBarPropsType: function() {
|
|
13
|
+
return _FxAggregations.AggreationsBarPropsType;
|
|
14
|
+
},
|
|
15
|
+
AggregationsDataPropsType: function() {
|
|
16
|
+
return _FxAggregations.AggregationsDataPropsType;
|
|
17
|
+
},
|
|
18
|
+
FxAggregationsBar: function() {
|
|
19
|
+
return _FxAggregations.FxAggregationsBar;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const _FxAggregations = require("./FxAggregations");
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "STRUCTURES", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return STRUCTURES;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _graphqltag = require("graphql-tag");
|
|
12
|
+
const STRUCTURES = (0, _graphqltag.gql)`
|
|
13
|
+
query STRUCTURES {
|
|
14
|
+
structure(where: { name: "aggregations_invoice" }) {
|
|
15
|
+
_id
|
|
16
|
+
bundle_name
|
|
17
|
+
name
|
|
18
|
+
title
|
|
19
|
+
type
|
|
20
|
+
input_type {
|
|
21
|
+
name
|
|
22
|
+
value
|
|
23
|
+
}
|
|
24
|
+
readable_id
|
|
25
|
+
extended {
|
|
26
|
+
format
|
|
27
|
+
gql_operation
|
|
28
|
+
title_path
|
|
29
|
+
object_path
|
|
30
|
+
filter
|
|
31
|
+
variables
|
|
32
|
+
}
|
|
33
|
+
children(sort: { index: 1 }) {
|
|
34
|
+
_id
|
|
35
|
+
name
|
|
36
|
+
title
|
|
37
|
+
type
|
|
38
|
+
input_type {
|
|
39
|
+
name
|
|
40
|
+
value
|
|
41
|
+
}
|
|
42
|
+
readable_id
|
|
43
|
+
extended {
|
|
44
|
+
format
|
|
45
|
+
gql_operation
|
|
46
|
+
title_path
|
|
47
|
+
object_path
|
|
48
|
+
filter
|
|
49
|
+
variables
|
|
50
|
+
}
|
|
51
|
+
children(sort: { index: 1 }) {
|
|
52
|
+
_id
|
|
53
|
+
name
|
|
54
|
+
title
|
|
55
|
+
type
|
|
56
|
+
input_type {
|
|
57
|
+
name
|
|
58
|
+
value
|
|
59
|
+
}
|
|
60
|
+
readable_id
|
|
61
|
+
extended {
|
|
62
|
+
format
|
|
63
|
+
gql_operation
|
|
64
|
+
title_path
|
|
65
|
+
object_path
|
|
66
|
+
filter
|
|
67
|
+
variables
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`;
|