sag_components 1.0.396 → 1.0.398
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/index.js +1 -1
- package/dist/stories/components/Benchmark.js +23 -20
- package/dist/stories/components/Benchmark.style.js +5 -35
- package/dist/stories/components/Button.js +35 -30
- package/dist/stories/components/Button.style.js +1 -3
- package/dist/stories/components/CheckBox.js +22 -35
- package/dist/stories/components/CheckBox.style.js +4 -12
- package/dist/stories/components/CheckBoxButton.js +27 -45
- package/dist/stories/components/CheckBoxButton.style.js +4 -20
- package/dist/stories/components/CodeEditor.js +5 -3
- package/dist/stories/components/CodeEditor.style.js +1 -1
- package/dist/stories/components/CollapseData.js +34 -42
- package/dist/stories/components/CollapseData.style.js +11 -17
- package/dist/stories/components/CommonFunctions.js +13 -10
- package/dist/stories/components/Datepicker.js +22 -27
- package/dist/stories/components/Datepicker.style.js +1 -3
- package/dist/stories/components/Dropdown.js +94 -112
- package/dist/stories/components/Dropdown.style.js +1 -3
- package/dist/stories/components/DropdownMulti.js +123 -145
- package/dist/stories/components/DropdownMulti.style.js +1 -3
- package/dist/stories/components/FilterContainer.js +7 -7
- package/dist/stories/components/FilterContainer.style.js +3 -3
- package/dist/stories/components/IconButton.js +58 -27
- package/dist/stories/components/IconButton.style.js +8 -13
- package/dist/stories/components/KpiFilter.js +223 -186
- package/dist/stories/components/KpiFilter.style.js +16 -16
- package/dist/stories/components/ListBox.js +50 -67
- package/dist/stories/components/ListBox.style.js +4 -12
- package/dist/stories/components/Modal.js +6 -4
- package/dist/stories/components/Modal.style.js +5 -5
- package/dist/stories/components/ModalTotalBenchmark.js +48 -46
- package/dist/stories/components/ModalTotalCost.js +66 -68
- package/dist/stories/components/NoDataFoundMessage.js +5 -2
- package/dist/stories/components/NoDataFoundMessage.style.js +3 -3
- package/dist/stories/components/OneColumnContainer.js +30 -38
- package/dist/stories/components/OneColumnContainer.style.js +7 -23
- package/dist/stories/components/PerformanceAnalytics.js +142 -156
- package/dist/stories/components/PerformanceAnalytics.style.js +15 -25
- package/dist/stories/components/PerformanceAnalyticsLegend.js +25 -26
- package/dist/stories/components/PerformanceAnalyticsLegend.style.js +6 -16
- package/dist/stories/components/PerformanceAnalyticsOneColumn.js +119 -123
- package/dist/stories/components/PerformanceAnalyticsOneColumn.style.js +13 -23
- package/dist/stories/components/PerformanceAnalyticsTotals.js +26 -27
- package/dist/stories/components/PerformanceAnalyticsTotals.style.js +10 -18
- package/dist/stories/components/ReportTable.js +15 -18
- package/dist/stories/components/ReportTable.style.js +8 -14
- package/dist/stories/components/SegmentedButton.js +63 -68
- package/dist/stories/components/SegmentedButton.style.js +6 -16
- package/dist/stories/components/TextField.js +37 -52
- package/dist/stories/components/TextField.style.js +1 -3
- package/dist/stories/components/TitleDescription.js +39 -42
- package/dist/stories/components/TitleDescription.style.js +26 -50
- package/dist/stories/components/Tooltip.js +6 -11
- package/dist/stories/components/Tooltip.style.js +3 -3
- package/dist/stories/components/TotalBenchmark.js +54 -58
- package/dist/stories/components/TotalBenchmark.style.js +11 -17
- package/dist/stories/components/TotalBenchmarkAreachart.js +55 -58
- package/dist/stories/components/TotalBenchmarkAreachart.style.js +14 -20
- package/dist/stories/components/TotalBenchmarkArrows.js +48 -53
- package/dist/stories/components/TotalBenchmarkArrows.style.js +14 -20
- package/dist/stories/components/TotalBenchmarkBarchart.js +45 -51
- package/dist/stories/components/TotalBenchmarkBarchart.style.js +10 -16
- package/dist/stories/components/TotalDoughnutChart.js +60 -64
- package/dist/stories/components/TotalDoughnutChart.style.js +19 -29
- package/dist/stories/components/TspanTooltip.js +6 -8
- package/dist/stories/components/TspanTooltip.style.js +3 -7
- package/dist/stories/components/icons/ArrowDownIcon.js +7 -6
- package/dist/stories/components/icons/ArrowDropDownIcon.js +7 -6
- package/dist/stories/components/icons/ArrowUpIcon.js +7 -6
- package/dist/stories/components/icons/BellIcon.js +6 -5
- package/dist/stories/components/icons/CalendarIcon.js +7 -6
- package/dist/stories/components/icons/CheckBoxButtonCheckedIcon.js +8 -8
- package/dist/stories/components/icons/CheckBoxCheckedIcon.js +8 -8
- package/dist/stories/components/icons/CheckBoxNotCheckedIcon.js +8 -8
- package/dist/stories/components/icons/ClockIcon.js +7 -6
- package/dist/stories/components/icons/ComboBoxArrowDownIcon.js +8 -8
- package/dist/stories/components/icons/ComboBoxArrowUpIcon.js +8 -8
- package/dist/stories/components/icons/DocumentIcon.js +7 -7
- package/dist/stories/components/icons/DownloadIcon.js +7 -7
- package/dist/stories/components/icons/ExitIcon.js +7 -6
- package/dist/stories/components/icons/EyeIcon.js +7 -6
- package/dist/stories/components/icons/FlyIcon.js +7 -6
- package/dist/stories/components/icons/FoodLionIcon.js +7 -6
- package/dist/stories/components/icons/GiantFoodIcon.js +7 -6
- package/dist/stories/components/icons/HannafordIcon.js +7 -6
- package/dist/stories/components/icons/InfoIcon.js +8 -8
- package/dist/stories/components/icons/LegendUnionIcon.js +7 -7
- package/dist/stories/components/icons/MaintenanceIcon.js +7 -6
- package/dist/stories/components/icons/NoDataFoundIcon.js +6 -5
- package/dist/stories/components/icons/ShoppingCartIcon.js +7 -6
- package/dist/stories/components/icons/StopAndShopIcon.js +7 -6
- package/dist/stories/components/icons/TheGiantCompanyIcon.js +7 -6
- package/dist/stories/utils/ComponentFactory.js +4 -2
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
5
5
|
var _client = _interopRequireDefault(require("react-dom/client"));
|
|
6
6
|
require("./index.css");
|
|
7
7
|
var _App = _interopRequireDefault(require("./App"));
|
|
8
|
-
|
|
8
|
+
const root = _client.default.createRoot(document.getElementById('root'));
|
|
9
9
|
root.render( /*#__PURE__*/_react.default.createElement(_react.default.StrictMode, null, /*#__PURE__*/_react.default.createElement(_App.default, null)));
|
|
10
10
|
|
|
11
11
|
// If you want to start measuring performance in your app, pass a function
|
|
@@ -10,28 +10,30 @@ var _Benchmark = require("./Benchmark.style");
|
|
|
10
10
|
var _CommonFunctions = require("./CommonFunctions");
|
|
11
11
|
var _Tooltip = _interopRequireDefault(require("./Tooltip"));
|
|
12
12
|
/* Benchmark */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
const Benchmark = props => {
|
|
14
|
+
const {
|
|
15
|
+
totalValue,
|
|
16
|
+
currentValue,
|
|
17
|
+
benchmarkValue,
|
|
18
|
+
width,
|
|
19
|
+
height,
|
|
20
|
+
color,
|
|
21
|
+
linearGradientColor,
|
|
22
|
+
underAvarageColor,
|
|
23
|
+
linearGradientUnderAvarageColor,
|
|
24
|
+
backgroundColor,
|
|
25
|
+
tooltipLabel,
|
|
26
|
+
tooltipDirection
|
|
27
|
+
} = props;
|
|
28
|
+
const getCurrentValueRectangleWidth = () => {
|
|
27
29
|
if (!totalValue) return 0;
|
|
28
30
|
if (currentValue > totalValue) return width;
|
|
29
31
|
return currentValue / totalValue * width;
|
|
30
32
|
};
|
|
31
|
-
|
|
33
|
+
const getUnderAvarageColor = () => {
|
|
32
34
|
if (!totalValue) return backgroundColor;
|
|
33
35
|
if (currentValue > totalValue) return color;
|
|
34
|
-
|
|
36
|
+
let benchmarkCurrentValue;
|
|
35
37
|
if (!benchmarkValue) {
|
|
36
38
|
benchmarkCurrentValue = 0.5;
|
|
37
39
|
} else if (benchmarkValue > totalValue) {
|
|
@@ -47,10 +49,10 @@ var Benchmark = exports.Benchmark = function Benchmark(props) {
|
|
|
47
49
|
}
|
|
48
50
|
return color;
|
|
49
51
|
};
|
|
50
|
-
|
|
52
|
+
const getUnderAvaragelinearGradientColor = () => {
|
|
51
53
|
if (!totalValue) return backgroundColor;
|
|
52
54
|
if (currentValue > totalValue) return linearGradientColor;
|
|
53
|
-
|
|
55
|
+
let benchmarkCurrentValue;
|
|
54
56
|
if (!benchmarkValue) {
|
|
55
57
|
benchmarkCurrentValue = 0.5;
|
|
56
58
|
} else if (benchmarkValue > totalValue) {
|
|
@@ -66,7 +68,7 @@ var Benchmark = exports.Benchmark = function Benchmark(props) {
|
|
|
66
68
|
}
|
|
67
69
|
return linearGradientColor;
|
|
68
70
|
};
|
|
69
|
-
|
|
71
|
+
const getBenchmarkLeft = () => {
|
|
70
72
|
if (!benchmarkValue) {
|
|
71
73
|
return width / 2;
|
|
72
74
|
}
|
|
@@ -75,7 +77,7 @@ var Benchmark = exports.Benchmark = function Benchmark(props) {
|
|
|
75
77
|
}
|
|
76
78
|
return width * (benchmarkValue / totalValue);
|
|
77
79
|
};
|
|
78
|
-
|
|
80
|
+
const getTooltipText = () => {
|
|
79
81
|
var _getFormattedValue, _getFormattedUnits;
|
|
80
82
|
return /*#__PURE__*/_react.default.createElement("h4", null, tooltipLabel, tooltipLabel ? ': ' : '', (_getFormattedValue = (0, _CommonFunctions.getFormattedValue)(benchmarkValue)) === null || _getFormattedValue === void 0 ? void 0 : _getFormattedValue.toString(), (_getFormattedUnits = (0, _CommonFunctions.getFormattedUnits)(benchmarkValue)) === null || _getFormattedUnits === void 0 ? void 0 : _getFormattedUnits.toString());
|
|
81
83
|
};
|
|
@@ -110,6 +112,7 @@ var Benchmark = exports.Benchmark = function Benchmark(props) {
|
|
|
110
112
|
left: getBenchmarkLeft()
|
|
111
113
|
}))));
|
|
112
114
|
};
|
|
115
|
+
exports.Benchmark = Benchmark;
|
|
113
116
|
var _default = exports.default = Benchmark;
|
|
114
117
|
Benchmark.defaultProps = {
|
|
115
118
|
totalValue: 100,
|
|
@@ -8,38 +8,8 @@ exports.CurrentValueRectangle = exports.ControlsContainer = exports.Controls = e
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n border-radius: 100px;\n width: ", ";\n height: ", ";\n //background: #ffffff;\n //border: 1px solid blue;\n"])), function (props) {
|
|
17
|
-
return props.width.toString().concat('', 'px');
|
|
18
|
-
}, function (props) {
|
|
19
|
-
return props.height.toString().concat('', 'px');
|
|
20
|
-
});
|
|
21
|
-
var BackgroundValueRectangle = exports.BackgroundValueRectangle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: ", ";\n height: ", ";\n top: 0px;\n left: 0px;\n border-radius: 100px;\n background: ", ";\n //border: 1px solid orange;\n"])), function (props) {
|
|
22
|
-
return props.width.toString().concat('', 'px');
|
|
23
|
-
}, function (props) {
|
|
24
|
-
return props.height.toString().concat('', 'px');
|
|
25
|
-
}, function (props) {
|
|
26
|
-
return props.color;
|
|
27
|
-
});
|
|
28
|
-
var CurrentValueRectangle = exports.CurrentValueRectangle = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: ", ";\n height: ", ";\n top: 0px;\n left: 0px;\n border-radius: 100px;\n background: linear-gradient(\n 90deg,\n ", " 0%,\n ", " 100%\n );\n //border: 1px solid green;\n"])), function (props) {
|
|
29
|
-
return props.width.toString().concat('', 'px');
|
|
30
|
-
}, function (props) {
|
|
31
|
-
return props.height.toString().concat('', 'px');
|
|
32
|
-
}, function (props) {
|
|
33
|
-
return props.lineargradientcolor;
|
|
34
|
-
}, function (props) {
|
|
35
|
-
return props.color;
|
|
36
|
-
});
|
|
37
|
-
var AvarageDelimiter = exports.AvarageDelimiter = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n height: ", ";\n width: ", ";\n top: ", ";\n left: ", ";\n border: 1px solid #212121;\n"])), function (props) {
|
|
38
|
-
return props.height.toString().concat('', 'px');
|
|
39
|
-
}, function (props) {
|
|
40
|
-
return props.width.toString().concat('', 'px');
|
|
41
|
-
}, function (props) {
|
|
42
|
-
return props.top.toString().concat('', 'px');
|
|
43
|
-
}, function (props) {
|
|
44
|
-
return props.left.toString().concat('', 'px');
|
|
45
|
-
});
|
|
11
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: relative;\n margin: 0px 0 0px;\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n width: ", ";\n height: ", ";\n //box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);\n border-radius: 100px;\n //border: 1px solid red;\n align-items: center;\n"])), props => props.width.toString().concat('', 'px'), props => props.height.toString().concat('', 'px'));
|
|
12
|
+
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n border-radius: 100px;\n width: ", ";\n height: ", ";\n //background: #ffffff;\n //border: 1px solid blue;\n"])), props => props.width.toString().concat('', 'px'), props => props.height.toString().concat('', 'px'));
|
|
13
|
+
const BackgroundValueRectangle = exports.BackgroundValueRectangle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: ", ";\n height: ", ";\n top: 0px;\n left: 0px;\n border-radius: 100px;\n background: ", ";\n //border: 1px solid orange;\n"])), props => props.width.toString().concat('', 'px'), props => props.height.toString().concat('', 'px'), props => props.color);
|
|
14
|
+
const CurrentValueRectangle = exports.CurrentValueRectangle = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: ", ";\n height: ", ";\n top: 0px;\n left: 0px;\n border-radius: 100px;\n background: linear-gradient(\n 90deg,\n ", " 0%,\n ", " 100%\n );\n //border: 1px solid green;\n"])), props => props.width.toString().concat('', 'px'), props => props.height.toString().concat('', 'px'), props => props.lineargradientcolor, props => props.color);
|
|
15
|
+
const AvarageDelimiter = exports.AvarageDelimiter = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n height: ", ";\n width: ", ";\n top: ", ";\n left: ", ";\n border: 1px solid #212121;\n"])), props => props.height.toString().concat('', 'px'), props => props.width.toString().concat('', 'px'), props => props.top.toString().concat('', 'px'), props => props.left.toString().concat('', 'px'));
|
|
@@ -10,25 +10,27 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
11
11
|
var _styles = require("@mui/material/styles");
|
|
12
12
|
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
13
|
+
const Button = props => {
|
|
14
|
+
const {
|
|
15
|
+
text,
|
|
16
|
+
type,
|
|
17
|
+
fontFamily,
|
|
18
|
+
fontSize,
|
|
19
|
+
shape,
|
|
20
|
+
size,
|
|
21
|
+
height,
|
|
22
|
+
width,
|
|
23
|
+
disabled,
|
|
24
|
+
radius,
|
|
25
|
+
textColor,
|
|
26
|
+
backgroundColor,
|
|
27
|
+
borderColor,
|
|
28
|
+
hoverTextColor,
|
|
29
|
+
hoverBackgroundColor,
|
|
30
|
+
hoverBorderColor,
|
|
31
|
+
onClick
|
|
32
|
+
} = props;
|
|
33
|
+
const getTextColor = () => {
|
|
32
34
|
if (!textColor || textColor === '' || textColor === 'none') {
|
|
33
35
|
// default when parameter was not set
|
|
34
36
|
if (shape === 'contained') {
|
|
@@ -38,16 +40,18 @@ var Button = exports.Button = function Button(props) {
|
|
|
38
40
|
}
|
|
39
41
|
return textColor;
|
|
40
42
|
};
|
|
41
|
-
|
|
43
|
+
const theme = (0, _styles.createTheme)({
|
|
42
44
|
typography: {
|
|
43
|
-
fontFamily
|
|
44
|
-
fontSize
|
|
45
|
+
fontFamily,
|
|
46
|
+
fontSize
|
|
45
47
|
},
|
|
46
48
|
components: {
|
|
47
49
|
MuiButton: {
|
|
48
50
|
styleOverrides: {
|
|
49
|
-
root:
|
|
50
|
-
|
|
51
|
+
root: _ref => {
|
|
52
|
+
let {
|
|
53
|
+
ownerState
|
|
54
|
+
} = _ref;
|
|
51
55
|
return {
|
|
52
56
|
'&:hover': {
|
|
53
57
|
backgroundColor: hoverBackgroundColor,
|
|
@@ -77,19 +81,20 @@ var Button = exports.Button = function Button(props) {
|
|
|
77
81
|
color: getTextColor(),
|
|
78
82
|
// shape === "contained" ? "white" : "black",
|
|
79
83
|
backgroundColor: {
|
|
80
|
-
backgroundColor
|
|
84
|
+
backgroundColor
|
|
81
85
|
},
|
|
82
|
-
borderColor
|
|
83
|
-
fontFamily
|
|
86
|
+
borderColor,
|
|
87
|
+
fontFamily
|
|
84
88
|
},
|
|
85
89
|
variant: shape,
|
|
86
90
|
size: size,
|
|
87
91
|
disabled: !!disabled,
|
|
88
|
-
onClick:
|
|
89
|
-
|
|
92
|
+
onClick: event => {
|
|
93
|
+
onClick(event);
|
|
90
94
|
}
|
|
91
95
|
}, text)));
|
|
92
96
|
};
|
|
97
|
+
exports.Button = Button;
|
|
93
98
|
var _default = exports.default = Button;
|
|
94
99
|
Button.defaultProps = {
|
|
95
100
|
text: '',
|
|
@@ -108,5 +113,5 @@ Button.defaultProps = {
|
|
|
108
113
|
hoverTextColor: '',
|
|
109
114
|
hoverBackgroundColor: '',
|
|
110
115
|
hoverBorderColor: '#212121',
|
|
111
|
-
onClick:
|
|
116
|
+
onClick: () => {}
|
|
112
117
|
};
|
|
@@ -8,6 +8,4 @@ exports.DropdownContainer = void 0;
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject;
|
|
11
|
-
|
|
12
|
-
return props.width;
|
|
13
|
-
});
|
|
11
|
+
const DropdownContainer = exports.DropdownContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: ", "; \n text-align: left; \n position: relative; \n align-items: center;\n justify-content: center;\n"])), props => props.width);
|
|
@@ -1,46 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = exports.CheckBox = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
9
|
var _CheckBoxCheckedIcon = require("./icons/CheckBoxCheckedIcon");
|
|
13
10
|
var _CheckBoxNotCheckedIcon = require("./icons/CheckBoxNotCheckedIcon");
|
|
14
11
|
var _CheckBoxStyle = require("./CheckBox.style.js");
|
|
15
|
-
var _excluded = ["label", "checked", "disabled", "width", "height", "iconSize", "fontSize", "colorChecked", "colorUnchecked", "colorDisabled", "onClick"];
|
|
16
12
|
/*CheckBox*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
checked =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
colorUnchecked = _ref$colorUnchecked === void 0 ? "#212121" : _ref$colorUnchecked,
|
|
35
|
-
_ref$colorDisabled = _ref.colorDisabled,
|
|
36
|
-
colorDisabled = _ref$colorDisabled === void 0 ? "#D0D0D0" : _ref$colorDisabled,
|
|
37
|
-
_onClick = _ref.onClick,
|
|
38
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
39
|
-
var _useState = (0, _react.useState)(checked),
|
|
40
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
41
|
-
checkedState = _useState2[0],
|
|
42
|
-
setCheckedState = _useState2[1];
|
|
43
|
-
(0, _react.useEffect)(function () {
|
|
13
|
+
const CheckBox = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
label,
|
|
16
|
+
checked = false,
|
|
17
|
+
disabled = false,
|
|
18
|
+
width = "100px",
|
|
19
|
+
height = "14px",
|
|
20
|
+
iconSize = "14px",
|
|
21
|
+
fontSize = "14px",
|
|
22
|
+
colorChecked = "#1B30AA",
|
|
23
|
+
colorUnchecked = "#212121",
|
|
24
|
+
colorDisabled = "#D0D0D0",
|
|
25
|
+
onClick,
|
|
26
|
+
...props
|
|
27
|
+
} = _ref;
|
|
28
|
+
const [checkedState, setCheckedState] = (0, _react.useState)(checked);
|
|
29
|
+
(0, _react.useEffect)(() => {
|
|
44
30
|
setCheckedState(checked);
|
|
45
31
|
}, [checked]);
|
|
46
32
|
return /*#__PURE__*/_react.default.createElement(_CheckBoxStyle.ControlsContainer, {
|
|
@@ -53,10 +39,10 @@ var CheckBox = exports.CheckBox = function CheckBox(_ref) {
|
|
|
53
39
|
}, checkedState ? /*#__PURE__*/_react.default.createElement(_CheckBoxStyle.CheckBoxIconContainer, {
|
|
54
40
|
id: "CheckBoxIconContainer",
|
|
55
41
|
disabled: disabled,
|
|
56
|
-
onClick:
|
|
42
|
+
onClick: () => {
|
|
57
43
|
if (!disabled) {
|
|
58
44
|
setCheckedState(false);
|
|
59
|
-
|
|
45
|
+
onClick({
|
|
60
46
|
label: label,
|
|
61
47
|
checked: false
|
|
62
48
|
});
|
|
@@ -69,9 +55,9 @@ var CheckBox = exports.CheckBox = function CheckBox(_ref) {
|
|
|
69
55
|
})) : /*#__PURE__*/_react.default.createElement(_CheckBoxStyle.CheckBoxIconContainer, {
|
|
70
56
|
id: "CheckBoxIconContainer",
|
|
71
57
|
disabled: disabled,
|
|
72
|
-
onClick:
|
|
58
|
+
onClick: () => {
|
|
73
59
|
if (!disabled) {
|
|
74
|
-
|
|
60
|
+
onClick({
|
|
75
61
|
label: label,
|
|
76
62
|
checked: true
|
|
77
63
|
});
|
|
@@ -86,4 +72,5 @@ var CheckBox = exports.CheckBox = function CheckBox(_ref) {
|
|
|
86
72
|
id: "Label"
|
|
87
73
|
}, label)));
|
|
88
74
|
};
|
|
75
|
+
exports.CheckBox = CheckBox;
|
|
89
76
|
var _default = exports.default = CheckBox;
|
|
@@ -8,15 +8,7 @@ exports.Label = exports.ControlsContainer = exports.Controls = exports.CheckBoxI
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, function (props) {
|
|
16
|
-
return props.fontSize;
|
|
17
|
-
});
|
|
18
|
-
var Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex; \n align-items: center;\n"])));
|
|
19
|
-
var Label = exports.Label = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 0 10px 0 10px;\n white-space: nowrap;\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])));
|
|
20
|
-
var CheckBoxIconContainer = exports.CheckBoxIconContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin: 0;\n cursor: ", ";\n"])), function (props) {
|
|
21
|
-
return props.disabled ? 'default' : 'pointer';
|
|
22
|
-
});
|
|
11
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n height: ", ";\n width: ", ";\n font-size: ", ";\n font-family: Poppins;\n margin: 0;\n"])), props => props.height, props => props.width, props => props.fontSize);
|
|
12
|
+
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex; \n align-items: center;\n"])));
|
|
13
|
+
const Label = exports.Label = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 0 10px 0 10px;\n white-space: nowrap;\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])));
|
|
14
|
+
const CheckBoxIconContainer = exports.CheckBoxIconContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin: 0;\n cursor: ", ";\n"])), props => props.disabled ? 'default' : 'pointer');
|
|
@@ -1,56 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = exports.CheckBoxButton = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
9
|
var _CheckBoxButtonCheckedIcon = require("./icons/CheckBoxButtonCheckedIcon");
|
|
13
10
|
var _CheckBoxButton = require("./CheckBoxButton.style");
|
|
14
|
-
var _excluded = ["label", "displayLabel", "checked", "disabled", "showIconInCheckBoxButtons", "width", "height", "iconSize", "fontSize", "iconColor", "borderColor", "borderRadius", "textColorChecked", "textColorUnchecked", "backgroundColorChecked", "backgroundColorUnchecked", "onClick"];
|
|
15
11
|
/* CheckBoxButton */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
checked =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
_ref$textColorChecked = _ref.textColorChecked,
|
|
40
|
-
textColorChecked = _ref$textColorChecked === void 0 ? '#212121' : _ref$textColorChecked,
|
|
41
|
-
_ref$textColorUncheck = _ref.textColorUnchecked,
|
|
42
|
-
textColorUnchecked = _ref$textColorUncheck === void 0 ? '#212121' : _ref$textColorUncheck,
|
|
43
|
-
_ref$backgroundColorC = _ref.backgroundColorChecked,
|
|
44
|
-
backgroundColorChecked = _ref$backgroundColorC === void 0 ? '#E9F1FF' : _ref$backgroundColorC,
|
|
45
|
-
_ref$backgroundColorU = _ref.backgroundColorUnchecked,
|
|
46
|
-
backgroundColorUnchecked = _ref$backgroundColorU === void 0 ? '#F2F2F2' : _ref$backgroundColorU,
|
|
47
|
-
_onClick = _ref.onClick,
|
|
48
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
49
|
-
var _useState = (0, _react.useState)(checked),
|
|
50
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
51
|
-
checkedState = _useState2[0],
|
|
52
|
-
setCheckedState = _useState2[1];
|
|
53
|
-
(0, _react.useEffect)(function () {
|
|
12
|
+
const CheckBoxButton = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
label,
|
|
15
|
+
displayLabel,
|
|
16
|
+
checked = false,
|
|
17
|
+
disabled = false,
|
|
18
|
+
showIconInCheckBoxButtons = true,
|
|
19
|
+
width = '100px',
|
|
20
|
+
height = '14px',
|
|
21
|
+
iconSize = '12px',
|
|
22
|
+
fontSize = '14px',
|
|
23
|
+
iconColor = '#1B30AA',
|
|
24
|
+
borderColor = '#1B30AA',
|
|
25
|
+
borderRadius = '12px',
|
|
26
|
+
textColorChecked = '#212121',
|
|
27
|
+
textColorUnchecked = '#212121',
|
|
28
|
+
backgroundColorChecked = '#E9F1FF',
|
|
29
|
+
backgroundColorUnchecked = '#F2F2F2',
|
|
30
|
+
onClick,
|
|
31
|
+
...props
|
|
32
|
+
} = _ref;
|
|
33
|
+
const [checkedState, setCheckedState] = (0, _react.useState)(checked);
|
|
34
|
+
(0, _react.useEffect)(() => {
|
|
54
35
|
setCheckedState(checked);
|
|
55
36
|
}, [checked]);
|
|
56
37
|
return /*#__PURE__*/_react.default.createElement(_CheckBoxButton.ControlsContainer, {
|
|
@@ -64,11 +45,11 @@ var CheckBoxButton = exports.CheckBoxButton = function CheckBoxButton(_ref) {
|
|
|
64
45
|
borderRadius: borderRadius,
|
|
65
46
|
backgroundColor: checkedState ? backgroundColorChecked : backgroundColorUnchecked,
|
|
66
47
|
borderColor: disabled ? backgroundColorChecked : checkedState ? borderColor : backgroundColorUnchecked,
|
|
67
|
-
onClick:
|
|
48
|
+
onClick: () => {
|
|
68
49
|
if (!disabled) {
|
|
69
50
|
setCheckedState(!checkedState);
|
|
70
|
-
|
|
71
|
-
label
|
|
51
|
+
onClick({
|
|
52
|
+
label,
|
|
72
53
|
checked: !checkedState
|
|
73
54
|
});
|
|
74
55
|
}
|
|
@@ -84,4 +65,5 @@ var CheckBoxButton = exports.CheckBoxButton = function CheckBoxButton(_ref) {
|
|
|
84
65
|
textColor: disabled ? '#B1B1B1' : checkedState ? textColorChecked : textColorUnchecked
|
|
85
66
|
}, displayLabel ? displayLabel : label)));
|
|
86
67
|
};
|
|
68
|
+
exports.CheckBoxButton = CheckBoxButton;
|
|
87
69
|
var _default = exports.default = CheckBoxButton;
|
|
@@ -8,23 +8,7 @@ exports.Label = exports.ControlsContainer = exports.Controls = exports.CheckBoxB
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, function (props) {
|
|
16
|
-
return props.fontSize;
|
|
17
|
-
});
|
|
18
|
-
var Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n border-radius: ", ";\n background: ", ";\n border: 1px solid ", ";\n cursor: ", ";\n"])), function (props) {
|
|
19
|
-
return props.borderRadius;
|
|
20
|
-
}, function (props) {
|
|
21
|
-
return props.backgroundColor;
|
|
22
|
-
}, function (props) {
|
|
23
|
-
return props.borderColor;
|
|
24
|
-
}, function (props) {
|
|
25
|
-
return props.disabled ? "default" : "pointer";
|
|
26
|
-
});
|
|
27
|
-
var Label = exports.Label = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 0 10px 0 10px;\n color: ", ";\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])), function (props) {
|
|
28
|
-
return props.textColor;
|
|
29
|
-
});
|
|
30
|
-
var CheckBoxButtonIconContainer = exports.CheckBoxButtonIconContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin: 0 0 0 10px;\n"])));
|
|
11
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n height: ", ";\n width: ", ";\n font-size: ", ";\n font-family: Poppins;\n margin: 0;\n"])), props => props.height, props => props.width, props => props.fontSize);
|
|
12
|
+
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n border-radius: ", ";\n background: ", ";\n border: 1px solid ", ";\n cursor: ", ";\n"])), props => props.borderRadius, props => props.backgroundColor, props => props.borderColor, props => props.disabled ? "default" : "pointer");
|
|
13
|
+
const Label = exports.Label = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 0 10px 0 10px;\n color: ", ";\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])), props => props.textColor);
|
|
14
|
+
const CheckBoxButtonIconContainer = exports.CheckBoxButtonIconContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin: 0 0 0 10px;\n"])));
|
|
@@ -13,9 +13,11 @@ require("ace-builds/src-noconflict/ext-language_tools");
|
|
|
13
13
|
require("ace-builds/src-noconflict/snippets/mysql");
|
|
14
14
|
// CodeEditor.js
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const CodeEditor = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
value,
|
|
19
|
+
onChange
|
|
20
|
+
} = _ref;
|
|
19
21
|
return /*#__PURE__*/_react.default.createElement(_reactAce.default, {
|
|
20
22
|
style: {
|
|
21
23
|
height: '300px',
|
|
@@ -9,4 +9,4 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _reactAce = _interopRequireDefault(require("react-ace"));
|
|
11
11
|
var _templateObject;
|
|
12
|
-
|
|
12
|
+
const AceEditorContent = exports.AceEditorContent = (0, _styledComponents.default)(_reactAce.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 400px;\n"])));
|