@fixefy/fixefy-ui-components 0.0.6 → 0.0.8
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-cjs/{ActionsTray/ActionsTray.jsx → FxActionsTray/FxActionsTray.jsx} +3 -3
- package/dist-cjs/FxActionsTray/index.js +5 -0
- package/dist-cjs/{AggregationsBar/Aggregations.jsx → FxAggregationsBar/FxAggregations.jsx} +3 -3
- package/dist-cjs/{AggregationsBar → FxAggregationsBar}/helpers/structureReader.jsx +5 -5
- package/dist-cjs/FxAggregationsBar/index.js +5 -0
- package/dist-cjs/{AsyncDropdown/AsyncDropdown.jsx → FxAsyncDropdown/FxAsyncDropdown.jsx} +2 -2
- package/dist-cjs/FxAsyncDropdown/index.js +5 -0
- package/dist-cjs/FxIcon/index.js +2 -2
- package/dist-cjs/FxNumberField/index.js +2 -2
- package/dist-cjs/FxProgressCircle/FxProgressCircle.jsx +3 -3
- package/dist-cjs/FxProgressCircle/index.js +2 -2
- package/dist-cjs/{Score/Score.jsx → FxScore/FxScore.jsx} +3 -3
- package/dist-cjs/FxScore/index.js +5 -0
- package/dist-cjs/FxShowMore/FxShowMore.jsx +3 -3
- package/dist-cjs/FxShowMore/index.js +2 -2
- package/dist-cjs/FxSlider/FxSlider.jsx +3 -3
- package/dist-cjs/FxSlider/index.js +2 -2
- package/dist-cjs/{StatisticsBar/StatisticsBar.jsx → FxStatisticsBar/FxStatisticsBar.jsx} +3 -3
- package/dist-cjs/FxStatisticsBar/index.js +5 -0
- package/dist-cjs/FxStatusBar/FxStatusBar.jsx +64 -0
- package/dist-cjs/FxStatusBar/helpers/constants.js +15 -0
- package/dist-cjs/FxStatusBar/index.js +5 -0
- package/dist-cjs/FxStatusBar/styles/statusBar.styles.jsx +39 -0
- package/dist-cjs/{Tag/Tag.jsx → FxTag/FxTag.jsx} +3 -3
- package/dist-cjs/FxTag/index.js +5 -0
- package/dist-cjs/FxTextField/FxTextField.jsx +62 -0
- package/dist-cjs/FxTextField/index.js +5 -0
- package/dist-cjs/FxTodo/FxTodo.jsx +46 -0
- package/dist-cjs/FxTodo/index.js +5 -0
- package/dist-cjs/FxTodo/styles/todo.styles.jsx +75 -0
- package/dist-cjs/FxWizard/FxWizard.jsx +49 -0
- package/dist-cjs/FxWizard/WizardContext.jsx +86 -0
- package/dist-cjs/FxWizard/index.js +8 -0
- package/dist-cjs/FxWizard/styles/wizard.styles.jsx +17 -0
- package/dist-cjs/index.js +35 -7
- package/dist-es/{ActionsTray/ActionsTray.jsx → FxActionsTray/FxActionsTray.jsx} +1 -1
- package/dist-es/FxActionsTray/index.js +1 -0
- package/dist-es/{AggregationsBar/Aggregations.jsx → FxAggregationsBar/FxAggregations.jsx} +1 -1
- package/dist-es/{AggregationsBar → FxAggregationsBar}/helpers/structureReader.jsx +5 -5
- package/dist-es/FxAggregationsBar/index.js +1 -0
- package/dist-es/{AsyncDropdown/AsyncDropdown.jsx → FxAsyncDropdown/FxAsyncDropdown.jsx} +1 -1
- package/dist-es/FxAsyncDropdown/index.js +1 -0
- package/dist-es/FxIcon/index.js +1 -1
- package/dist-es/FxNumberField/index.js +1 -1
- package/dist-es/FxProgressCircle/FxProgressCircle.jsx +1 -1
- package/dist-es/FxProgressCircle/index.js +1 -1
- package/dist-es/{Score/Score.jsx → FxScore/FxScore.jsx} +1 -1
- package/dist-es/FxScore/index.js +1 -0
- package/dist-es/FxShowMore/FxShowMore.jsx +1 -1
- package/dist-es/FxShowMore/index.js +1 -1
- package/dist-es/FxSlider/FxSlider.jsx +1 -1
- package/dist-es/FxSlider/index.js +1 -1
- package/dist-es/{StatisticsBar/StatisticsBar.jsx → FxStatisticsBar/FxStatisticsBar.jsx} +1 -1
- package/dist-es/FxStatisticsBar/index.js +1 -0
- package/dist-es/FxStatusBar/FxStatusBar.jsx +59 -0
- package/dist-es/FxStatusBar/helpers/constants.js +12 -0
- package/dist-es/FxStatusBar/index.js +1 -0
- package/dist-es/FxStatusBar/styles/statusBar.styles.jsx +39 -0
- package/dist-es/{Tag/Tag.jsx → FxTag/FxTag.jsx} +1 -1
- package/dist-es/FxTag/index.js +1 -0
- package/dist-es/FxTextField/FxTextField.jsx +63 -0
- package/dist-es/FxTextField/index.js +1 -0
- package/dist-es/FxTodo/FxTodo.jsx +41 -0
- package/dist-es/FxTodo/index.js +1 -0
- package/dist-es/FxTodo/styles/todo.styles.jsx +97 -0
- package/dist-es/FxWizard/FxWizard.jsx +46 -0
- package/dist-es/FxWizard/WizardContext.jsx +84 -0
- package/dist-es/FxWizard/index.js +2 -0
- package/dist-es/FxWizard/styles/wizard.styles.jsx +18 -0
- package/dist-es/index.js +16 -3
- package/dist-types/FxActionsTray/FxActionsTray.d.ts +3 -0
- package/dist-types/{ActionsTray → FxActionsTray}/index.d.ts +1 -1
- package/dist-types/FxAggregationsBar/FxAggregations.d.ts +3 -0
- package/dist-types/{AggregationsBar → FxAggregationsBar}/index.d.ts +1 -1
- package/dist-types/FxAsyncDropdown/FxAsyncDropdown.d.ts +3 -0
- package/dist-types/{AsyncDropdown → FxAsyncDropdown}/index.d.ts +1 -1
- package/dist-types/FxIcon/index.d.ts +2 -1
- package/dist-types/FxNumberField/index.d.ts +1 -1
- package/dist-types/FxProgressCircle/FxProgressCircle.d.ts +1 -1
- package/dist-types/FxProgressCircle/index.d.ts +1 -1
- package/dist-types/FxScore/FxScore.d.ts +3 -0
- package/dist-types/{Score → FxScore}/index.d.ts +1 -1
- package/dist-types/FxShowMore/FxShowMore.d.ts +1 -1
- package/dist-types/FxShowMore/index.d.ts +1 -1
- package/dist-types/FxSlider/FxSlider.d.ts +1 -1
- package/dist-types/FxSlider/index.d.ts +1 -1
- package/dist-types/FxStatisticsBar/FxStatisticsBar.d.ts +3 -0
- package/dist-types/{StatisticsBar → FxStatisticsBar}/index.d.ts +1 -1
- package/dist-types/FxStatusBar/FxStatusBar.d.ts +3 -0
- package/dist-types/FxStatusBar/helpers/constants.d.ts +12 -0
- package/dist-types/FxStatusBar/index.d.ts +2 -0
- package/dist-types/FxStatusBar/styles/statusBar.styles.d.ts +3 -0
- package/dist-types/FxTag/FxTag.d.ts +3 -0
- package/dist-types/{Tag → FxTag}/index.d.ts +1 -1
- package/dist-types/FxTextField/FxTextField.d.ts +4 -0
- package/dist-types/FxTextField/index.d.ts +2 -0
- package/dist-types/FxTodo/FxTodo.d.ts +3 -0
- package/dist-types/FxTodo/index.d.ts +2 -0
- package/dist-types/FxTodo/styles/todo.styles.d.ts +8 -0
- package/dist-types/FxWizard/FxWizard.d.ts +3 -0
- package/dist-types/FxWizard/WizardContext.d.ts +6 -0
- package/dist-types/FxWizard/index.d.ts +3 -0
- package/dist-types/FxWizard/styles/wizard.styles.d.ts +2 -0
- package/dist-types/index.d.ts +16 -4
- package/package.json +3 -2
- package/dist-cjs/ActionsTray/index.js +0 -5
- package/dist-cjs/AggregationsBar/index.js +0 -5
- package/dist-cjs/AsyncDropdown/index.js +0 -5
- package/dist-cjs/Score/index.js +0 -5
- package/dist-cjs/StatisticsBar/index.js +0 -5
- package/dist-cjs/Tag/index.js +0 -5
- package/dist-es/ActionsTray/index.js +0 -1
- package/dist-es/AggregationsBar/index.js +0 -1
- package/dist-es/AsyncDropdown/index.js +0 -1
- package/dist-es/Score/index.js +0 -1
- package/dist-es/StatisticsBar/index.js +0 -1
- package/dist-es/Tag/index.js +0 -1
- package/dist-types/ActionsTray/ActionsTray.d.ts +0 -3
- package/dist-types/AggregationsBar/Aggregations.d.ts +0 -3
- package/dist-types/AsyncDropdown/AsyncDropdown.d.ts +0 -3
- package/dist-types/Score/Score.d.ts +0 -3
- package/dist-types/StatisticsBar/StatisticsBar.d.ts +0 -3
- package/dist-types/Tag/Tag.d.ts +0 -3
- /package/dist-cjs/{ActionsTray → FxActionsTray}/styles/actions_tray.styles.jsx +0 -0
- /package/dist-cjs/{AggregationsBar → FxAggregationsBar}/operations/query.js +0 -0
- /package/dist-cjs/{AsyncDropdown → FxAsyncDropdown}/helpers/helpers.js +0 -0
- /package/dist-cjs/{AsyncDropdown → FxAsyncDropdown}/styles/dropdown.styles.jsx +0 -0
- /package/dist-cjs/{Score → FxScore}/styles/score.styles.js +0 -0
- /package/dist-cjs/{StatisticsBar → FxStatisticsBar}/styles/statistics.styles.js +0 -0
- /package/dist-cjs/{Tag → FxTag}/styles/tag.styles.jsx +0 -0
- /package/dist-es/{ActionsTray → FxActionsTray}/styles/actions_tray.styles.jsx +0 -0
- /package/dist-es/{AggregationsBar → FxAggregationsBar}/operations/query.js +0 -0
- /package/dist-es/{AsyncDropdown → FxAsyncDropdown}/helpers/helpers.js +0 -0
- /package/dist-es/{AsyncDropdown → FxAsyncDropdown}/styles/dropdown.styles.jsx +0 -0
- /package/dist-es/{Score → FxScore}/styles/score.styles.js +0 -0
- /package/dist-es/{StatisticsBar → FxStatisticsBar}/styles/statistics.styles.js +0 -0
- /package/dist-es/{Tag → FxTag}/styles/tag.styles.jsx +0 -0
- /package/dist-types/{ActionsTray → FxActionsTray}/styles/actions_tray.styles.d.ts +0 -0
- /package/dist-types/{AggregationsBar → FxAggregationsBar}/helpers/structureReader.d.ts +0 -0
- /package/dist-types/{AggregationsBar → FxAggregationsBar}/operations/query.d.ts +0 -0
- /package/dist-types/{AsyncDropdown → FxAsyncDropdown}/helpers/helpers.d.ts +0 -0
- /package/dist-types/{AsyncDropdown → FxAsyncDropdown}/styles/dropdown.styles.d.ts +0 -0
- /package/dist-types/{Score → FxScore}/styles/score.styles.d.ts +0 -0
- /package/dist-types/{StatisticsBar → FxStatisticsBar}/styles/statistics.styles.d.ts +0 -0
- /package/dist-types/{Tag → FxTag}/styles/tag.styles.d.ts +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxActionsTray = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const image_1 = tslib_1.__importDefault(require("next/image"));
|
|
7
7
|
const material_1 = require("@mui/material");
|
|
8
8
|
const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
|
|
9
9
|
const actions_tray_styles_1 = require("./styles/actions_tray.styles");
|
|
10
|
-
function
|
|
10
|
+
function FxActionsTray({ type, onApprove, onChallenge, onClick, show, onClose, chargesCount, container, direction = 'up' }) {
|
|
11
11
|
const renderActions = () => {
|
|
12
12
|
switch (type) {
|
|
13
13
|
case 'approved':
|
|
@@ -42,7 +42,7 @@ function ActionsTray({ type, onApprove, onChallenge, onClick, show, onClose, cha
|
|
|
42
42
|
</material_1.Slide>
|
|
43
43
|
</div>);
|
|
44
44
|
}
|
|
45
|
-
exports.
|
|
45
|
+
exports.FxActionsTray = FxActionsTray;
|
|
46
46
|
const ChallengeActions = ({ onChallenge, onApprove }) => {
|
|
47
47
|
return (<>
|
|
48
48
|
<actions_tray_styles_1.ActionBtn onClick={onChallenge} type="low">
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FxActionsTray = void 0;
|
|
4
|
+
var FxActionsTray_1 = require("./FxActionsTray");
|
|
5
|
+
Object.defineProperty(exports, "FxActionsTray", { enumerable: true, get: function () { return FxActionsTray_1.FxActionsTray; } });
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxAggregationsBar = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const Stack_1 = tslib_1.__importDefault(require("@mui/material/Stack"));
|
|
7
7
|
const structureReader_1 = require("./helpers/structureReader");
|
|
8
|
-
const
|
|
8
|
+
const FxAggregationsBar = (props) => {
|
|
9
9
|
const { structure, minWidth, mb, filter, initialValues } = props;
|
|
10
10
|
const { children, extended } = structure;
|
|
11
11
|
const { variables } = extended;
|
|
@@ -24,4 +24,4 @@ const AggregationsBar = (props) => {
|
|
|
24
24
|
})}
|
|
25
25
|
</Stack_1.default>);
|
|
26
26
|
};
|
|
27
|
-
exports.
|
|
27
|
+
exports.FxAggregationsBar = FxAggregationsBar;
|
|
@@ -4,8 +4,8 @@ exports.structureReader = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const FxScore_1 = require("../../FxScore");
|
|
8
|
+
const FxStatisticsBar_1 = require("../../FxStatisticsBar");
|
|
9
9
|
const FxProgressCounter_1 = require("../../FxProgressCounter");
|
|
10
10
|
const structureReader = (structure, filter, collapsed, initialValues) => {
|
|
11
11
|
var _a;
|
|
@@ -14,7 +14,7 @@ const structureReader = (structure, filter, collapsed, initialValues) => {
|
|
|
14
14
|
case 'aggregations_primary_container':
|
|
15
15
|
return structure.children.map((child, index) => {
|
|
16
16
|
var _a, _b, _c;
|
|
17
|
-
return ((_a = child.input_type) === null || _a === void 0 ? void 0 : _a.value) === 'percentage' ? (<
|
|
17
|
+
return ((_a = child.input_type) === null || _a === void 0 ? void 0 : _a.value) === 'percentage' ? (<FxScore_1.FxScore structure={child} key={index} filter={filter} value={initialValues === null || initialValues === void 0 ? void 0 : initialValues.score}/>) : ((_b = child.input_type) === null || _b === void 0 ? void 0 : _b.value) === 'progress' ? (<FxProgressCounter_1.FxProgressCounter structure={child} filter={filter} key={index} values={initialValues}/>) : (<material_1.Box sx={{
|
|
18
18
|
display: 'flex',
|
|
19
19
|
justifyContent: 'center',
|
|
20
20
|
alignItems: 'center',
|
|
@@ -23,7 +23,7 @@ const structureReader = (structure, filter, collapsed, initialValues) => {
|
|
|
23
23
|
borderRadius: 2,
|
|
24
24
|
backgroundColor: ((_c = extended === null || extended === void 0 ? void 0 : extended.variables) === null || _c === void 0 ? void 0 : _c.bg) || '#FFFFFF',
|
|
25
25
|
}}>
|
|
26
|
-
<
|
|
26
|
+
<FxStatisticsBar_1.FxStatisticsBar structure={child} key={index} filter={filter} collapsed={collapsed} value={initialValues ? initialValues[child.extended.object_path] : null}/>
|
|
27
27
|
</material_1.Box>);
|
|
28
28
|
});
|
|
29
29
|
case 'aggregations_secondary_container':
|
|
@@ -33,7 +33,7 @@ const structureReader = (structure, filter, collapsed, initialValues) => {
|
|
|
33
33
|
padding: '24px 16px',
|
|
34
34
|
}}>
|
|
35
35
|
{structure.children.map((child, index) => {
|
|
36
|
-
return <
|
|
36
|
+
return <FxStatisticsBar_1.FxStatisticsBar structure={child} key={index} filter={filter} collapsed={collapsed} value={initialValues ? initialValues[child.extended.object_path] : null}/>;
|
|
37
37
|
})}
|
|
38
38
|
</material_1.Stack>);
|
|
39
39
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FxAggregationsBar = void 0;
|
|
4
|
+
var FxAggregations_1 = require("./FxAggregations");
|
|
5
|
+
Object.defineProperty(exports, "FxAggregationsBar", { enumerable: true, get: function () { return FxAggregations_1.FxAggregationsBar; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxAsyncDropdown = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
6
6
|
const icons_material_1 = require("@mui/icons-material");
|
|
@@ -12,7 +12,7 @@ const material_1 = require("@mui/material");
|
|
|
12
12
|
const dropdown_styles_1 = require("./styles/dropdown.styles");
|
|
13
13
|
const icon = <icons_material_1.CheckBoxOutlineBlank fontSize="small"/>;
|
|
14
14
|
const checkedIcon = <icons_material_1.CheckBox fontSize="small"/>;
|
|
15
|
-
exports.
|
|
15
|
+
exports.FxAsyncDropdown = react_1.default.forwardRef((props, parentRef) => {
|
|
16
16
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
17
17
|
const ref = (0, react_1.useRef)(null);
|
|
18
18
|
const theme = (0, material_1.useTheme)();
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FxAsyncDropdown = void 0;
|
|
4
|
+
var FxAsyncDropdown_1 = require("./FxAsyncDropdown");
|
|
5
|
+
Object.defineProperty(exports, "FxAsyncDropdown", { enumerable: true, get: function () { return FxAsyncDropdown_1.FxAsyncDropdown; } });
|
package/dist-cjs/FxIcon/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxIcon = void 0;
|
|
4
4
|
var FxIcon_1 = require("./FxIcon");
|
|
5
|
-
Object.defineProperty(exports, "
|
|
5
|
+
Object.defineProperty(exports, "FxIcon", { enumerable: true, get: function () { return FxIcon_1.FxIcon; } });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxNumberField = void 0;
|
|
4
4
|
var FxNumberField_1 = require("./FxNumberField");
|
|
5
|
-
Object.defineProperty(exports, "
|
|
5
|
+
Object.defineProperty(exports, "FxNumberField", { enumerable: true, get: function () { return FxNumberField_1.FxNumberField; } });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxProgressCircle = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const progress_circle_styles_1 = require("./styles/progress_circle.styles");
|
|
7
|
-
function
|
|
7
|
+
function FxProgressCircle({ radius = 70, border = 70, value, hasLabel = true, max = 100, color, type = 'progress' }) {
|
|
8
8
|
const _value = value ? value / max : 0;
|
|
9
9
|
const p = 2 * Math.PI * (radius - border / 2);
|
|
10
10
|
const strokeWidth = border;
|
|
@@ -25,4 +25,4 @@ function ProgressCircle({ radius = 70, border = 70, value, hasLabel = true, max
|
|
|
25
25
|
{hasLabel && type === 'percentage' && <progress_circle_styles_1.Label sx={{ ml: 1 }}>{label}</progress_circle_styles_1.Label>}
|
|
26
26
|
</progress_circle_styles_1.Container>);
|
|
27
27
|
}
|
|
28
|
-
exports.
|
|
28
|
+
exports.FxProgressCircle = FxProgressCircle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxProgressCircle = void 0;
|
|
4
4
|
var FxProgressCircle_1 = require("./FxProgressCircle");
|
|
5
|
-
Object.defineProperty(exports, "
|
|
5
|
+
Object.defineProperty(exports, "FxProgressCircle", { enumerable: true, get: function () { return FxProgressCircle_1.FxProgressCircle; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxScore = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const graphql_tag_1 = require("graphql-tag");
|
|
@@ -8,7 +8,7 @@ const client_1 = require("@apollo/client");
|
|
|
8
8
|
const score_styles_1 = require("./styles/score.styles");
|
|
9
9
|
const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
|
|
10
10
|
const material_1 = require("@mui/material");
|
|
11
|
-
const
|
|
11
|
+
const FxScore = (_a) => {
|
|
12
12
|
var _b;
|
|
13
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
14
|
const Sizes = Object.assign({ box: {
|
|
@@ -54,4 +54,4 @@ const Score = (_a) => {
|
|
|
54
54
|
</material_1.Box>
|
|
55
55
|
</material_1.Box>);
|
|
56
56
|
};
|
|
57
|
-
exports.
|
|
57
|
+
exports.FxScore = FxScore;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxShowMore = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
7
7
|
const show_more_styles_1 = require("./styles/show_more.styles");
|
|
8
8
|
const KeyboardArrowDown_1 = tslib_1.__importDefault(require("@mui/icons-material/KeyboardArrowDown"));
|
|
9
|
-
function
|
|
9
|
+
function FxShowMore({ items, label, children, title }) {
|
|
10
10
|
const [anchorEl, setAnchorEl] = react_1.default.useState(null);
|
|
11
11
|
const handleClick = (event) => {
|
|
12
12
|
setAnchorEl(event.currentTarget);
|
|
@@ -44,4 +44,4 @@ function ShowMore({ items, label, children, title }) {
|
|
|
44
44
|
</show_more_styles_1.StyledPopover>
|
|
45
45
|
</show_more_styles_1.ShowMoreWrapper>);
|
|
46
46
|
}
|
|
47
|
-
exports.
|
|
47
|
+
exports.FxShowMore = FxShowMore;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxShowMore = void 0;
|
|
4
4
|
var FxShowMore_1 = require("./FxShowMore");
|
|
5
|
-
Object.defineProperty(exports, "
|
|
5
|
+
Object.defineProperty(exports, "FxShowMore", { enumerable: true, get: function () { return FxShowMore_1.FxShowMore; } });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxSlider = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
7
|
-
function
|
|
7
|
+
function FxSlider(props) {
|
|
8
8
|
return <material_1.Slider {...props}/>;
|
|
9
9
|
}
|
|
10
|
-
exports.
|
|
10
|
+
exports.FxSlider = FxSlider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxSlider = void 0;
|
|
4
4
|
var FxSlider_1 = require("./FxSlider");
|
|
5
|
-
Object.defineProperty(exports, "
|
|
5
|
+
Object.defineProperty(exports, "FxSlider", { enumerable: true, get: function () { return FxSlider_1.FxSlider; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxStatisticsBar = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const graphql_tag_1 = require("graphql-tag");
|
|
@@ -9,7 +9,7 @@ const material_1 = require("@mui/material");
|
|
|
9
9
|
const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
|
|
10
10
|
const fixefy_ui_utils_2 = require("@fixefy/fixefy-ui-utils");
|
|
11
11
|
const statistics_styles_1 = require("./styles/statistics.styles");
|
|
12
|
-
function
|
|
12
|
+
function FxStatisticsBar({ value, type = 'currency', label, structure, collapsed, filter }) {
|
|
13
13
|
const _classes = (0, statistics_styles_1.useStyles)();
|
|
14
14
|
const { extended, input_type, title } = structure || {};
|
|
15
15
|
const { gql_operation, object_path, filter: structurefilter, variables } = extended || {};
|
|
@@ -92,4 +92,4 @@ function StatisticsBar({ value, type = 'currency', label, structure, collapsed,
|
|
|
92
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
93
|
</div>);
|
|
94
94
|
}
|
|
95
|
-
exports.
|
|
95
|
+
exports.FxStatisticsBar = FxStatisticsBar;
|
|
@@ -0,0 +1,5 @@
|
|
|
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; } });
|
|
@@ -0,0 +1,64 @@
|
|
|
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;
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
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; } });
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FxTag = void 0;
|
|
4
4
|
const material_1 = require("@mui/material");
|
|
5
5
|
const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils/");
|
|
6
6
|
const tag_styles_1 = require("./styles/tag.styles");
|
|
7
|
-
const
|
|
7
|
+
const FxTag = ({ name, count = 0 }) => (<material_1.Box display="flex" alignItems="center" justifyContent="center" sx={{ maxWidth: 'fit-content', mb: 1 }}>
|
|
8
8
|
<tag_styles_1.StyledTag name={name}>
|
|
9
9
|
<tag_styles_1.StyledLabel>{(0, fixefy_ui_utils_1.titleCase)(name)}</tag_styles_1.StyledLabel>
|
|
10
10
|
</tag_styles_1.StyledTag>
|
|
11
11
|
<tag_styles_1.StyledCount name={name}>{count}</tag_styles_1.StyledCount>
|
|
12
12
|
</material_1.Box>);
|
|
13
|
-
exports.
|
|
13
|
+
exports.FxTag = FxTag;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FxTextField = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const ErrorRounded_1 = tslib_1.__importDefault(require("@mui/icons-material/ErrorRounded"));
|
|
9
|
+
const FxTextField = ({ autoFocus, droppedItem, defaultValue = '', onChange, structure, endAdornment, startAdornment, required, helperText, error = false, errorText, disabled }) => {
|
|
10
|
+
const [value, setValue] = (0, react_1.useState)(defaultValue);
|
|
11
|
+
const { input_type, extended: { placeholder, title_path }, title, } = structure;
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
if (droppedItem) {
|
|
14
|
+
const { item, type } = droppedItem;
|
|
15
|
+
setValue(item[title_path]);
|
|
16
|
+
}
|
|
17
|
+
}, [droppedItem]);
|
|
18
|
+
const _onChange = (e) => {
|
|
19
|
+
onChange && onChange(e);
|
|
20
|
+
setValue(e.target.value);
|
|
21
|
+
};
|
|
22
|
+
return (<material_1.FormControl variant="standard" error={error}>
|
|
23
|
+
{title && (<material_1.InputLabel shrink htmlFor={title} sx={(theme) => (Object.assign(Object.assign(Object.assign({ color: theme.palette.greyscale.light, '&.Mui-focused': {
|
|
24
|
+
color: theme.palette.greyscale.light,
|
|
25
|
+
} }, (disabled && { opacity: '0.3' })), { '&.Mui-error': { color: theme.palette.greyscale.light } }), (required && {
|
|
26
|
+
'&:before': {
|
|
27
|
+
content: "'*'",
|
|
28
|
+
color: theme.palette.redscale.main,
|
|
29
|
+
display: 'inline-block',
|
|
30
|
+
marginRight: '5px',
|
|
31
|
+
},
|
|
32
|
+
})))}>
|
|
33
|
+
{(0, fixefy_ui_utils_1.titleCase)(title)}
|
|
34
|
+
</material_1.InputLabel>)}
|
|
35
|
+
<material_1.InputBase endAdornment={endAdornment} startAdornment={startAdornment} id={title} autoFocus={autoFocus ? autoFocus : false} placeholder={(0, fixefy_ui_utils_1.titleCase)(placeholder)} onChange={_onChange} type={input_type && input_type.value} value={value} error={error}/>
|
|
36
|
+
{error && errorText ? (<material_1.FormHelperText sx={(theme) => ({
|
|
37
|
+
'&.Mui-error': {
|
|
38
|
+
color: theme.palette.redscale.main,
|
|
39
|
+
},
|
|
40
|
+
display: 'grid',
|
|
41
|
+
gridAutoFlow: 'column',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
justifyContent: 'left',
|
|
44
|
+
columnGap: theme.spacing(0.6),
|
|
45
|
+
fontSize: '11px',
|
|
46
|
+
})}>
|
|
47
|
+
<ErrorRounded_1.default sx={(theme) => ({
|
|
48
|
+
color: theme.palette.redscale.main,
|
|
49
|
+
width: 10,
|
|
50
|
+
height: 10,
|
|
51
|
+
})}/>
|
|
52
|
+
{(0, fixefy_ui_utils_1.titleCase)(errorText)}
|
|
53
|
+
</material_1.FormHelperText>) : (<material_1.FormHelperText sx={(theme) => ({
|
|
54
|
+
color: theme.palette.greyscale.light,
|
|
55
|
+
fontSize: '11px',
|
|
56
|
+
})}>
|
|
57
|
+
{helperText}
|
|
58
|
+
</material_1.FormHelperText>)}
|
|
59
|
+
</material_1.FormControl>);
|
|
60
|
+
};
|
|
61
|
+
exports.FxTextField = FxTextField;
|
|
62
|
+
exports.default = exports.FxTextField;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FxTextField = void 0;
|
|
4
|
+
var FxTextField_1 = require("./FxTextField");
|
|
5
|
+
Object.defineProperty(exports, "FxTextField", { enumerable: true, get: function () { return FxTextField_1.FxTextField; } });
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FxTodo = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const image_1 = tslib_1.__importDefault(require("next/image"));
|
|
7
|
+
const FxAvatar_1 = require("../FxAvatar");
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils");
|
|
10
|
+
const todo_styles_1 = require("./styles/todo.styles");
|
|
11
|
+
function FxTodo({ todo }) {
|
|
12
|
+
return (<todo_styles_1.TodoCard>
|
|
13
|
+
<todo_styles_1.TodoCardHeader>
|
|
14
|
+
<todo_styles_1.TodoCardPriority priority={todo.priority}>
|
|
15
|
+
<image_1.default alt={todo.title} width={16} height={16} loader={() => (0, fixefy_ui_utils_1.imageLoader)({
|
|
16
|
+
root: 'https://cdn-dev.fixefy.me/',
|
|
17
|
+
src: 'invoices/severity_low.svg',
|
|
18
|
+
})} src={`invoices/severity_${todo.priority}.svg`} onLoad={() => console.log('loaded')} onError={(e) => console.log('error:', e)}/>
|
|
19
|
+
|
|
20
|
+
{(0, fixefy_ui_utils_1.titleCase)(todo.priority)}
|
|
21
|
+
</todo_styles_1.TodoCardPriority>
|
|
22
|
+
{todo.isNew && <todo_styles_1.TodoCardTag>New</todo_styles_1.TodoCardTag>}
|
|
23
|
+
</todo_styles_1.TodoCardHeader>
|
|
24
|
+
<todo_styles_1.TodoCardContent>
|
|
25
|
+
<p>{(0, fixefy_ui_utils_1.titleCase)(todo.title)}</p>
|
|
26
|
+
<span>{(0, fixefy_ui_utils_1.titleCase)(todo.description)}</span>
|
|
27
|
+
{todo.actionTitle && (<todo_styles_1.TodoCardContentButton size="small" onClick={todo.action ? todo.action : () => { }}>
|
|
28
|
+
{todo.actionTitle}
|
|
29
|
+
</todo_styles_1.TodoCardContentButton>)}
|
|
30
|
+
</todo_styles_1.TodoCardContent>
|
|
31
|
+
<material_1.Divider sx={{ mb: '16px' }}/>
|
|
32
|
+
<todo_styles_1.TodoCardFooter>
|
|
33
|
+
<todo_styles_1.TodoCardFooterDueDate>
|
|
34
|
+
<span>Due Date</span>
|
|
35
|
+
<p>
|
|
36
|
+
{(0, fixefy_ui_utils_1.normalizeTimestamp)(todo.created_date, {
|
|
37
|
+
dateOnly: true,
|
|
38
|
+
format: 'dd.mm.yyyy',
|
|
39
|
+
})}
|
|
40
|
+
</p>
|
|
41
|
+
</todo_styles_1.TodoCardFooterDueDate>
|
|
42
|
+
<FxAvatar_1.FxAvatar max={4} isEditable={todo.isUserEditable} users={todo.users}/>
|
|
43
|
+
</todo_styles_1.TodoCardFooter>
|
|
44
|
+
</todo_styles_1.TodoCard>);
|
|
45
|
+
}
|
|
46
|
+
exports.FxTodo = FxTodo;
|