sag_components 1.0.604 → 1.0.606
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.
|
@@ -26,11 +26,15 @@ const FilterPanel = props => {
|
|
|
26
26
|
onResetClick,
|
|
27
27
|
onItemValueChanged,
|
|
28
28
|
width,
|
|
29
|
-
height
|
|
29
|
+
height,
|
|
30
|
+
disableOKButton
|
|
30
31
|
} = props;
|
|
31
32
|
const [FieldsDataState, setFieldsDataState] = (0, _react.useState)(fieldsData);
|
|
32
33
|
const [Reset, setReset] = (0, _react.useState)(false);
|
|
33
34
|
const [PeriodPickerSelectedValue, setPeriodPickerSelectedValue] = (0, _react.useState)('');
|
|
35
|
+
(0, _react.useEffect)(() => {
|
|
36
|
+
setFieldsDataState(fieldsData);
|
|
37
|
+
}, [fieldsData]);
|
|
34
38
|
const onClickResetHandler = () => {
|
|
35
39
|
const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => ({
|
|
36
40
|
...itemField,
|
|
@@ -376,7 +380,7 @@ const FilterPanel = props => {
|
|
|
376
380
|
width: "74px",
|
|
377
381
|
fontSize: "14px",
|
|
378
382
|
fontWeight: "500",
|
|
379
|
-
disabled:
|
|
383
|
+
disabled: disableOKButton,
|
|
380
384
|
onClick: () => onOkClick({
|
|
381
385
|
eventName: 'onOkClick',
|
|
382
386
|
fieldsData: FieldsDataState,
|
|
@@ -412,5 +416,6 @@ FilterPanel.defaultProps = {
|
|
|
412
416
|
borderColor: '#066768',
|
|
413
417
|
onOkClick: () => {},
|
|
414
418
|
onResetClick: () => {},
|
|
415
|
-
onItemValueChanged: () => {}
|
|
419
|
+
onItemValueChanged: () => {},
|
|
420
|
+
disableOKButton: false
|
|
416
421
|
};
|
|
@@ -24,7 +24,6 @@ const SagButton = props => {
|
|
|
24
24
|
} = props;
|
|
25
25
|
const [clicked, setClicked] = (0, _react.useState)(false);
|
|
26
26
|
const handleButtonClick = event => {
|
|
27
|
-
console.log("clicked", clicked);
|
|
28
27
|
setClicked(true);
|
|
29
28
|
onClick(event);
|
|
30
29
|
setTimeout(() => {
|
|
@@ -37,7 +36,7 @@ const SagButton = props => {
|
|
|
37
36
|
id: "ButtonContainer"
|
|
38
37
|
}, /*#__PURE__*/_react.default.createElement(_SagButton.Button, {
|
|
39
38
|
id: "Button",
|
|
40
|
-
className: clicked ?
|
|
39
|
+
className: clicked ? 'button-clicked' : '',
|
|
41
40
|
onClick: !disabled ? handleButtonClick : null,
|
|
42
41
|
width: width,
|
|
43
42
|
height: height,
|
|
@@ -55,13 +54,16 @@ const SagButton = props => {
|
|
|
55
54
|
};
|
|
56
55
|
var _default = exports.default = SagButton;
|
|
57
56
|
SagButton.defaultProps = {
|
|
58
|
-
text:
|
|
59
|
-
textColor:
|
|
60
|
-
onClickColor:
|
|
61
|
-
backgroundColor:
|
|
62
|
-
fontSize:
|
|
57
|
+
text: '',
|
|
58
|
+
textColor: '#1B30AA',
|
|
59
|
+
onClickColor: '#1B30AA',
|
|
60
|
+
backgroundColor: '#ffffff',
|
|
61
|
+
fontSize: '14px',
|
|
63
62
|
disabled: false,
|
|
64
|
-
width:
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
width: '100%',
|
|
64
|
+
height: '50px',
|
|
65
|
+
radius: '12px',
|
|
66
|
+
onClick: () => {},
|
|
67
|
+
fontWeight: '500',
|
|
68
|
+
borderColor: '#1B30AA'
|
|
67
69
|
};
|
|
@@ -9,5 +9,5 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3;
|
|
11
11
|
const ButtonContainer = exports.ButtonContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n"])));
|
|
12
|
-
const Button = exports.Button = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n //padding: 14px 10px;\n align-items: center;\n justify-content: center;\n align-content: center;\n flex-wrap: wrap;\n overflow: hidden;\n width: ", ";\n height: ", ";\n border: ", "; \n border-radius: ", ";\n background-color: ", ";\n box-sizing: border-box;\n &:hover {\n background-color: ", ";\n cursor: ", ";\n }\n &.button-clicked {\n background-color: ", ";\n color: white;\n padding: 10px 10px;\n //border-radius: 5px;\n cursor: pointer;\n // display: inline-block;\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n transition: background-color 0.3s, color 0.3s;\n }\n"])), props => props.width, props => props.height, props => "1px solid ".concat(props.borderColor), props => props.radius, props => props.disabled ?
|
|
13
|
-
const Label = exports.Label = _styledComponents.default.label(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-weight: ", ";\n color: ", ";\n pointer-events: none;\n font-size: ", ";\n
|
|
12
|
+
const Button = exports.Button = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n //padding: 14px 10px;\n align-items: center;\n justify-content: center;\n align-content: center;\n flex-wrap: wrap;\n overflow: hidden;\n width: ", ";\n height: ", ";\n border: ", "; \n border-radius: ", ";\n background-color: ", ";\n box-sizing: border-box;\n &:hover {\n background-color: ", ";\n cursor: ", ";\n }\n &.button-clicked {\n background-color: ", ";\n color: white;\n padding: 10px 10px;\n //border-radius: 5px;\n cursor: pointer;\n // display: inline-block;\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n transition: background-color 0.3s, color 0.3s;\n }\n"])), props => props.width, props => props.height, props => "1px solid ".concat(props.borderColor), props => props.radius, props => props.disabled ? '#c5c5c5' : props.backgroundColor, props => props.disabled ? '#c5c5c5' : '#f0f0f0', props => !props.disabled ? 'pointer' : 'default', props => props.onClickColor);
|
|
13
|
+
const Label = exports.Label = _styledComponents.default.label(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-weight: ", ";\n color: ", ";\n pointer-events: none;\n font-size: ", ";\n user-select: none;\n"])), props => props.fontWeight, props => props.textColor, props => props.fontSize);
|