sag_components 1.0.682 → 1.0.684

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.
@@ -73,7 +73,7 @@ const BannerEventBox = props => {
73
73
  });
74
74
  setTooltipPos({
75
75
  x: iconBounds.left + iconBounds.width / 2,
76
- y: iconBounds.top / 1.4
76
+ y: iconBounds.top
77
77
  });
78
78
  };
79
79
  const handleItemMouseLeave = () => {
@@ -111,11 +111,14 @@ const DropdownMultiNew = _ref => {
111
111
  var _inputRef$current2;
112
112
  inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
113
113
  }
114
+ onChange({
115
+ newValue: []
116
+ });
114
117
  };
115
118
  const displaySelectedOptions = () => {
116
119
  const content = /*#__PURE__*/_react.default.createElement(_DropdownMultiNew.SelectedOptionsContainer, {
117
120
  className: "SelectedOptionsContainer"
118
- }, selectedOptions.map((option, index) => {
121
+ }, selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.map((option, index) => {
119
122
  var _option$label, _option$label2;
120
123
  return index < 2 ? /*#__PURE__*/_react.default.createElement(_DropdownMultiNew.SelectedOptionItem, {
121
124
  className: "SelectedOptionItem",
@@ -128,7 +131,7 @@ const DropdownMultiNew = _ref => {
128
131
  inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
129
132
  }
130
133
  }
131
- }, option.label && ((_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.length) > 10 ? "".concat((_option$label2 = option.label) === null || _option$label2 === void 0 ? void 0 : _option$label2.substring(0, 10), "... ") : option.label, /*#__PURE__*/_react.default.createElement(_CloseXIcon.CloseXIcon, {
134
+ }, option.label && ((_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.length) > 10 ? "".concat((_option$label2 = option.label) === null || _option$label2 === void 0 ? void 0 : _option$label2.substring(0, 10), "... ") : "".concat(option.label, " "), /*#__PURE__*/_react.default.createElement(_CloseXIcon.CloseXIcon, {
132
135
  width: "8px",
133
136
  height: "8px",
134
137
  fill: "#212121"
@@ -178,8 +181,7 @@ const DropdownMultiNew = _ref => {
178
181
  onClick: handleLabelClick,
179
182
  type: "search",
180
183
  disabled: disabled,
181
- placeholder: placeHolder || 'Type to search...' // {isFocused ? placeHolder || 'Type to search...' : ''}
182
- ,
184
+ placeholder: isFocused ? placeHolder || 'Type to search...' : '',
183
185
  error: error,
184
186
  isFocused: isFocused
185
187
  }) : ' '), selectedOptions.length > 0 && /*#__PURE__*/_react.default.createElement(_DropdownMultiNew.IconContainer, {
@@ -10,20 +10,20 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
10
10
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
11
11
  /* eslint-disable no-nested-ternary */
12
12
  const DropdownWrapper = exports.DropdownWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: center;\n align-items: flex-start;\n width: ", "; \n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 10px;\n"])), props => props.width || '300px');
13
- const Label = exports.Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-size: ", ";\n font-weight: 400;\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px;\n z-index: 2;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: ", ";\n font-family: Poppins; \n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n gap: 4px;\n &:focus {\n border-radius: 12px 12px 0 0 ;\n }\n"])), props => props.isFocused || props.hasValue ? '14px' : '14px', props => props.error ? 'red' : props.disabled ? '#888' : props.labelColor, props => props.isFocused || props.hasValue ? '0px' : '27px', props => props.isFocused || props.hasValue ? '23px' : '10px');
14
- const InputContainer = exports.InputContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n white-space: pre-wrap;\n align-items: center;\n overflow: hidden;\n padding: 0 5px 0 0;\n gap: 4px;\n width: 100%;\n height: 100%; \n box-sizing: border-box;\n background-color: #fff;\n // border: ", " solid ", ";\n border: 1px solid ", ";\n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n outline: none;\n color: ", ";\n \n &:hover {\n border: 1px solid ", ";\n }\n\n &:focus { \n border: 1px solid ", "; \n }\n \n"])), props => props.isFocused ? '2px' : '1px', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor, props => props.disabled ? '#bdbdbd' : props.error ? 'red' : '#B1B1B1', props => props.disabled ? '#888' : '#212121', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor || '#212121', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor || '#212121');
13
+ const Label = exports.Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-size: ", ";\n font-weight: 400;\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px;\n z-index: 2;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: ", ";\n font-family: Poppins; \n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n gap: 4px;\n &:hover {\n cursor: ", ";\n }\n"])), props => props.isFocused || props.hasValue ? '14px' : '14px', props => props.error ? 'red' : props.disabled ? '#888' : props.labelColor, props => props.isFocused || props.hasValue ? '0px' : '27px', props => props.isFocused || props.hasValue ? '23px' : '10px', props => props.disabled ? 'not-allowed' : 'pointer');
14
+ const InputContainer = exports.InputContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n white-space: pre-wrap;\n align-items: center;\n overflow: hidden;\n padding: 0 5px 0 0;\n margin-bottom: 8px;\n gap: 4px;\n width: 100%;\n height: 100%; \n box-sizing: border-box;\n background-color: #fff; \n border: 1px solid ", ";\n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n outline: none;\n color: ", ";\n \n &:hover {\n border: 1px solid ", ";\n cursor: ", ";\n }\n\n &:focus { \n border: 1px solid ", "; \n }\n \n"])), props => props.disabled ? '#bdbdbd' : props.error ? 'red' : '#B1B1B1', props => props.disabled ? '#888' : '#212121', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor || '#212121', props => props.disabled ? 'not-allowed' : 'pointer', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor || '#212121');
15
15
  const InputSubContainer = exports.InputSubContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: column;\n flex-wrap: nowrap; \n align-content: center; \n align-items: flex-start;\n justify-content: center;\n white-space: pre-wrap;\n overflow: hidden;\n padding: 10px 4px 10px 10px;\n width: 100%;\n height: 100%;\n min-height: 53px;\n box-sizing: border-box;\n background-color: #fff; \n border-radius: 12px;\n outline: none;\n color: ", "; \n"])), props => props.disabled ? '#888' : '#212121');
16
16
  const StyledInput = exports.StyledInput = _styledComponents.default.input(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: calc(100% - 20px);\n height: 25px;\n font-family: Poppins;\n font-weight: 400;\n font-size: 14px;\n outline: none; \n color: ", "; \n border: none; \n"])), props => props.disabled ? '#888' : '#212121');
17
- const OptionsContainer = exports.OptionsContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)([" \n margin: 0; \n top: 100%; \n left: 0;\n z-index: 10;\n width: 100%;\n height: 8px;\n background-color: #fff; \n display: ", "; \n"])), props => {
17
+ const OptionsContainer = exports.OptionsContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)([" \n margin: 0; \n top: 100%; \n left: 0;\n z-index: 10;\n width: 100%; \n background-color: #fff; \n display: ", "; \n\n"])), props => {
18
18
  var _props$filteredoption;
19
19
  return props.showoptions && ((_props$filteredoption = props.filteredoptions) === null || _props$filteredoption === void 0 ? void 0 : _props$filteredoption.length) > 0 ? 'block' : 'none';
20
20
  });
21
- const OptionsSubContainer = exports.OptionsSubContainer = _styledComponents.default.ul(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n list-style: none;\n font-weight: 400;\n margin: 0;\n padding: 8px 12px;\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 10;\n width: calc(100% - 23px);\n font-family: Poppins; \n border-radius: 4px; \n background-color: #fff; \n display: ", ";\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);\n"])), props => {
21
+ const OptionsSubContainer = exports.OptionsSubContainer = _styledComponents.default.ul(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n list-style: none;\n font-weight: 400;\n margin: 0;\n padding: 8px 12px;\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 101;\n width: calc(100% - 23px);\n font-family: Poppins; \n border-radius: 4px; \n background-color: #fff; \n display: ", ";\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);\n max-height: 400px;\n overflow: auto;\n"])), props => {
22
22
  var _props$filteredoption2;
23
23
  return props.showoptions && ((_props$filteredoption2 = props.filteredoptions) === null || _props$filteredoption2 === void 0 ? void 0 : _props$filteredoption2.length) > 0 ? 'block' : 'none';
24
24
  });
25
25
  const OptionItem = exports.OptionItem = _styledComponents.default.li(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)([" \n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n gap: 8px;\n padding: 10px;\n cursor: pointer;\n color: #212121;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n transition: background-color 0.3s;\n\n &:hover {\n background-color: #EDF6FF;\n }\n"])));
26
26
  const ErrorMessage = exports.ErrorMessage = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 12px;\n color: red;\n margin-top: 5px;\n"])));
27
- const SelectedOptionsContainer = exports.SelectedOptionsContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n align-items: center;\n white-space: pre-wrap;\n overflow: hidden;\n padding: 0;\n font-weight: 400;\n border-top: none;\n border-radius: 4px; \n background-color: #fff; \n gap: 4px; \n"])));
27
+ const SelectedOptionsContainer = exports.SelectedOptionsContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n align-items: center;\n white-space: pre-wrap;\n overflow: hidden;\n padding: 0;\n font-weight: 400;\n border-top: none;\n border-radius: 4px; \n background-color: #fff; \n gap: 4px; \n"])));
28
28
  const SelectedOptionItem = exports.SelectedOptionItem = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)([" \n display: flex; \n margin: 0;\n flex-wrap: nowrap; \n white-space: pre-wrap;\n overflow: hidden;\n cursor: pointer;\n color: #212121;\n background-color: #E3E4E5;\n border-radius: 4px; \n align-items: center;\n padding: 4px 6px;\n font-size: 12px;\n"])));
29
29
  const IconContainer = exports.IconContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)([" \n display: flex; \n padding: 2px;\n cursor: pointer; \n"])));
@@ -105,6 +105,9 @@ const DropdownSingleNew = _ref => {
105
105
  var _inputRef$current5;
106
106
  inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : _inputRef$current5.focus();
107
107
  }
108
+ onChange({
109
+ newValue: []
110
+ });
108
111
  };
109
112
  return /*#__PURE__*/_react.default.createElement(_DropdownSingleNew.DropdownWrapper, {
110
113
  className: "DropdownWrapper",
@@ -148,8 +151,7 @@ const DropdownSingleNew = _ref => {
148
151
  // type="search"
149
152
  ,
150
153
  disabled: disabled,
151
- placeholder: placeHolder || 'Type to search...' // {isFocused ? placeHolder || 'Type to search...' : ''}
152
- ,
154
+ placeholder: isFocused ? placeHolder || 'Type to search...' : '',
153
155
  error: error,
154
156
  isFocused: isFocused
155
157
  })), selectedOptions.length > 0 && /*#__PURE__*/_react.default.createElement(_DropdownSingleNew.IconContainer, {
@@ -9,16 +9,16 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _styledComponents = _interopRequireDefault(require("styled-components"));
10
10
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
11
11
  /* eslint-disable no-nested-ternary */
12
- const DropdownWrapper = exports.DropdownWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: center;\n align-items: flex-start;\n width: ", "; \n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 10px;\n"])), props => props.width || '300px');
13
- const Label = exports.Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-size: ", ";\n font-weight: 400;\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px; \n z-index: 2;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: ", ";\n font-family: Poppins; \n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n gap: 4px;\n &:focus {\n border-radius: 12px 12px 0 0 ;\n }\n"])), props => props.isFocused || props.hasValue ? '14px' : '14px', props => props.error ? 'red' : props.disabled ? '#888' : props.labelColor, props => props.isFocused || props.hasValue ? '0px' : '28px', props => props.isFocused || props.hasValue ? '23px' : '10px');
14
- const InputContainer = exports.InputContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n white-space: pre-wrap;\n align-items: center;\n overflow: hidden;\n padding: 0 5px 0 0;\n gap: 4px;\n width: 100%;\n height: 100%; \n box-sizing: border-box;\n background-color: #fff;\n border: 1px solid ", ";\n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n outline: none;\n color: ", ";\n \n &:hover {\n border: 1px solid ", ";\n }\n\n &:focus { \n border: 1px solid ", "; \n }\n \n"])), props => props.disabled ? '#bdbdbd' : props.error ? 'red' : '#B1B1B1', props => props.disabled ? '#888' : '#212121', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor || '#212121', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor || '#212121');
12
+ const DropdownWrapper = exports.DropdownWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: center;\n align-items: flex-start;\n width: ", "; \n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 10px; \n"])), props => props.width || '300px');
13
+ const Label = exports.Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-size: ", ";\n font-weight: 400;\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px; \n z-index: 2;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: ", ";\n font-family: Poppins; \n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n gap: 4px;\n &:hover {\n cursor: ", ";\n }\n"])), props => props.isFocused || props.hasValue ? '14px' : '14px', props => props.error ? 'red' : props.disabled ? '#888' : props.labelColor, props => props.isFocused || props.hasValue ? '0px' : '28px', props => props.isFocused || props.hasValue ? '23px' : '10px', props => props.disabled ? 'not-allowed' : 'pointer');
14
+ const InputContainer = exports.InputContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n white-space: pre-wrap;\n align-items: center;\n overflow: hidden;\n padding: 0 5px 0 0;\n margin-bottom: 8px;\n gap: 4px;\n width: 100%;\n height: 100%; \n box-sizing: border-box;\n background-color: #fff;\n border: 1px solid ", ";\n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n outline: none;\n color: ", ";\n \n &:hover {\n border: 1px solid ", ";\n cursor: ", ";\n }\n\n &:focus { \n border: 1px solid ", "; \n }\n \n"])), props => props.disabled ? '#bdbdbd' : props.error ? 'red' : '#B1B1B1', props => props.disabled ? '#888' : '#212121', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor || '#212121', props => props.disabled ? 'not-allowed' : 'pointer', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor || '#212121');
15
15
  const InputSubContainer = exports.InputSubContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: column;\n flex-wrap: nowrap; \n align-content: center; \n align-items: flex-start;\n justify-content: center;\n white-space: pre-wrap;\n overflow: hidden;\n padding: 10px 4px 10px 10px;\n width: 100%;\n height: 100%;\n min-height: 53px;\n box-sizing: border-box;\n background-color: #fff; \n border-radius: 12px;\n outline: none;\n color: ", "; \n"])), props => props.disabled ? '#888' : '#212121');
16
16
  const StyledInput = exports.StyledInput = _styledComponents.default.input(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: calc(100% - 10px);\n height: 20px;\n font-family: Poppins;\n font-weight: 400;\n font-size: 14px;\n outline: none; \n color: ", "; \n border: none;\n"])), props => props.disabled ? '#888' : '#212121');
17
- const OptionsContainer = exports.OptionsContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)([" \n margin: 0; \n top: 100%; \n left: 0;\n z-index: 10;\n width: 100%;\n height: 8px;\n background-color: #fff; \n display: ", "; \n"])), props => {
17
+ const OptionsContainer = exports.OptionsContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)([" \n margin: 0; \n top: 100%; \n left: 0;\n z-index: 10;\n width: 100%;\n background-color: #fff; \n display: ", "; \n"])), props => {
18
18
  var _props$filteredoption;
19
19
  return props.showoptions && ((_props$filteredoption = props.filteredoptions) === null || _props$filteredoption === void 0 ? void 0 : _props$filteredoption.length) > 0 ? 'block' : 'none';
20
20
  });
21
- const OptionsSubContainer = exports.OptionsSubContainer = _styledComponents.default.ul(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n list-style: none;\n font-weight: 400;\n margin: 0;\n padding: 8px 12px;\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 10;\n width: calc(100% - 23px);\n font-family: Poppins; \n border-radius: 4px; \n background-color: #fff; \n display: ", ";\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);\n"])), props => {
21
+ const OptionsSubContainer = exports.OptionsSubContainer = _styledComponents.default.ul(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n list-style: none;\n font-weight: 400;\n margin: 0;\n padding: 8px 12px;\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 101;\n width: calc(100% - 23px);\n font-family: Poppins; \n border-radius: 4px; \n background-color: #fff; \n display: ", ";\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);\n max-height: 400px;\n overflow: auto;\n"])), props => {
22
22
  var _props$filteredoption2;
23
23
  return props.showoptions && ((_props$filteredoption2 = props.filteredoptions) === null || _props$filteredoption2 === void 0 ? void 0 : _props$filteredoption2.length) > 0 ? 'block' : 'none';
24
24
  });
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _MenuItemOpenIcon = require("./icons/MenuItemOpenIcon");
10
+ var _MenuItemUpIcon = require("./icons/MenuItemUpIcon");
11
+ var _SpotlightProductIcon = require("./icons/SpotlightProductIcon");
12
+ var _BannersDropdown = require("./BannersDropdown");
13
+ var _EventInfo = require("./EventInfo.style");
14
+ const EventInfo = props => {
15
+ const {
16
+ title,
17
+ subTitle,
18
+ productsData,
19
+ onSpotlightProductClick,
20
+ onClickBannersDropdown
21
+ } = props;
22
+ const [IsProductsListOpen, setIsProductsListOpen] = (0, _react.useState)(false);
23
+ const displayBannersDropdown = () => /*#__PURE__*/_react.default.createElement(_BannersDropdown.BannersDropdown, {
24
+ banners: [{
25
+ checked: true,
26
+ name: 'StopAndShop'
27
+ }, {
28
+ checked: true,
29
+ name: 'FoodLion'
30
+ }, {
31
+ checked: true,
32
+ name: 'GiantFood'
33
+ }, {
34
+ checked: true,
35
+ name: 'TheGiantCompany'
36
+ }, {
37
+ checked: true,
38
+ name: 'Hannaford'
39
+ }],
40
+ onClick: banners => {
41
+ onClickBannersDropdown({
42
+ banners
43
+ });
44
+ }
45
+ });
46
+ return /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoMainContainer, {
47
+ id: "EventInfoMainContainer"
48
+ }, /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoContainer, {
49
+ id: "EventInfoContainer"
50
+ }, /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoTitleContainer, {
51
+ id: "EventInfoTitleContainer"
52
+ }, /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoTitle, {
53
+ id: "EventInfoTitle"
54
+ }, title), /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoSubTitle, {
55
+ id: "EventInfoSubTitle"
56
+ }, "|"), /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoSubTitle, {
57
+ id: "EventInfoSubTitle"
58
+ }, productsData ? productsData === null || productsData === void 0 ? void 0 : productsData.length : ''), displayBannersDropdown()), /*#__PURE__*/_react.default.createElement(_EventInfo.ProductButtonContainer, {
59
+ id: "ProductButtonContainer",
60
+ onClick: () => {
61
+ setIsProductsListOpen(!IsProductsListOpen);
62
+ }
63
+ }, IsProductsListOpen ? /*#__PURE__*/_react.default.createElement(_MenuItemUpIcon.MenuItemUpIcon, {
64
+ color: "#212121"
65
+ }) : /*#__PURE__*/_react.default.createElement(_MenuItemOpenIcon.MenuItemOpenIcon, {
66
+ color: "#212121"
67
+ }))), IsProductsListOpen && /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoContentContainer, {
68
+ id: "EventInfoContentContainer"
69
+ }, /*#__PURE__*/_react.default.createElement(_EventInfo.ProductsTitle, {
70
+ id: "ProductsTitle"
71
+ }, subTitle), productsData === null || productsData === void 0 ? void 0 : productsData.map(item => /*#__PURE__*/_react.default.createElement(_EventInfo.ProductContainer, {
72
+ id: "ProductContainer"
73
+ }, /*#__PURE__*/_react.default.createElement(_EventInfo.Product, {
74
+ id: "Product"
75
+ }, item.label), item.ShowSpotlightProductButton ? /*#__PURE__*/_react.default.createElement(_EventInfo.ProductButtonContainer, {
76
+ id: "ProductButtonContainer",
77
+ background: "#F8CD00",
78
+ onClick: () => {
79
+ onSpotlightProductClick({
80
+ value: item.value,
81
+ label: item.label
82
+ });
83
+ }
84
+ }, /*#__PURE__*/_react.default.createElement(_SpotlightProductIcon.SpotlightProductIcon, null)) : ''))));
85
+ };
86
+ var _default = exports.default = EventInfo;
87
+ EventInfo.defaultProps = {
88
+ title: 'Products Variety',
89
+ subTitle: 'Product Name',
90
+ onSpotlightProductClick: () => {},
91
+ onClickBannersDropdown: () => {}
92
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.ProductsTitle = exports.ProductContainer = exports.ProductButtonContainer = exports.Product = exports.EventInfoTitleContainer = exports.EventInfoTitle = exports.EventInfoSubTitle = exports.EventInfoMainContainer = exports.EventInfoContentContainer = exports.EventInfoContainer = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
9
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
10
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
11
+ const EventInfoMainContainer = exports.EventInfoMainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n margin: 0;\n padding: 10px;\n border-radius: 12px;\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n"])));
12
+ const EventInfoContainer = exports.EventInfoContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0 10px;\n"])));
13
+ const EventInfoTitleContainer = exports.EventInfoTitleContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: 20px;\n line-height: 25px;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 10px;\n gap: 15px;\n"])));
14
+ const EventInfoTitle = exports.EventInfoTitle = _styledComponents.default.h3(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 20px;\n\n margin: 0;\n"])));
15
+ const EventInfoSubTitle = exports.EventInfoSubTitle = _styledComponents.default.h3(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: #757171;\n font-weight: 500;\n font-size: 20px;\n margin: 0;\n"])));
16
+ const EventInfoContentContainer = exports.EventInfoContentContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: 20px;\n line-height: 25px;\n display: flex;\n justify-content: flex-start;\n flex-direction: column;\n align-items: flex-start;\n margin: 10px;\n padding: 10px 20px 20px 50px;\n"])));
17
+ const ProductsTitle = exports.ProductsTitle = _styledComponents.default.h3(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 600;\n font-size: 14px;\n margin: 10px 0;\n"])));
18
+ const ProductContainer = exports.ProductContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n border-bottom: 1px solid #00000010;\n width: 100%;\n gap: 20px;\n"])));
19
+ const Product = exports.Product = _styledComponents.default.h3(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n"])));
20
+ const ProductButtonContainer = exports.ProductButtonContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: ", ";\n border-radius: 12px;\n height: 25px;\n padding: 0 15px;\n user-select: none;\n &:hover {\n background-color: #f0f0f0;\n cursor: pointer;\n }\n gap: 10px;\n"])), props => props.background || '#ffffff');
@@ -1,33 +1,29 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = exports.FilterButton = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
8
+ var _react = _interopRequireDefault(require("react"));
9
9
  var _FilterButton = require("./FilterButton.style");
10
10
  var _FilterIcon = require("./icons/FilterIcon");
11
11
  const FilterButton = props => {
12
12
  const {
13
13
  color,
14
- activeColor,
15
14
  height,
16
15
  buttonText,
17
16
  iconWidth,
18
17
  iconHeight,
19
18
  disabled,
20
- openState,
21
19
  onButtonClick
22
20
  } = props;
23
- const [activeState, setActiveState] = (0, _react.useState)(openState);
24
21
  const onClickHandler = event => {
25
22
  onButtonClick(event);
26
- setActiveState(!activeState);
27
23
  };
28
24
  return /*#__PURE__*/_react.default.createElement(_FilterButton.FilterButtonWrapper, {
29
25
  height: height,
30
- color: activeState ? activeColor : color,
26
+ color: color,
31
27
  disabled: disabled,
32
28
  onClick: event => {
33
29
  onClickHandler(event);
@@ -35,7 +31,7 @@ const FilterButton = props => {
35
31
  }, /*#__PURE__*/_react.default.createElement(_FilterIcon.FilterIcon, {
36
32
  width: iconWidth,
37
33
  height: iconHeight,
38
- color: activeState ? activeColor : color
34
+ color: color
39
35
  }), /*#__PURE__*/_react.default.createElement(_FilterButton.SpanText, null, buttonText));
40
36
  };
41
37
  exports.FilterButton = FilterButton;
@@ -44,10 +40,8 @@ FilterButton.defaultProps = {
44
40
  buttonText: 'Filter',
45
41
  height: '40px',
46
42
  color: '#212121',
47
- activeColor: '#229E38',
48
43
  iconHeight: 12,
49
44
  iconWidth: 12,
50
- openState: false,
51
45
  disabled: false,
52
46
  onButtonClick: () => {}
53
47
  };
@@ -8,5 +8,5 @@ exports.SpanText = exports.FilterButtonWrapper = 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, _templateObject2;
11
- const FilterButtonWrapper = exports.FilterButtonWrapper = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", ";\n font-size: 14px;\n font-weight: 400;\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: center;\n padding: 8px 18px;\n color: ", ";\n border-radius: 8px;\n border: 1px solid ", ";\n background: transparent;\n transition: box-shadow 0.3s ease;\n &:hover, &:focus {\n cursor: pointer;\n box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);\n }\n"])), props => props.height, props => props.color, props => props.color);
11
+ const FilterButtonWrapper = exports.FilterButtonWrapper = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", ";\n font-size: 14px;\n font-weight: 400;\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: center;\n padding: 8px 18px;\n color: ", ";\n border-radius: 8px;\n border: 1px solid #B1B1B1;\n background: transparent;\n transition: box-shadow 0.3s ease;\n &:hover, &:focus {\n cursor: pointer;\n box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);\n }\n"])), props => props.height, props => props.color);
12
12
  const SpanText = exports.SpanText = _styledComponents.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n"])));
@@ -8,8 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _moment = _interopRequireDefault(require("moment"));
11
- var _DropdownMulti = require("./DropdownMulti");
12
- var _Dropdown = require("./Dropdown");
11
+ var _DropdownNew = require("./DropdownNew");
13
12
  var _Button = _interopRequireDefault(require("./Button"));
14
13
  var _RangePicker = _interopRequireDefault(require("./RangePicker"));
15
14
  var _QuarterPicker = _interopRequireDefault(require("./QuarterPicker"));
@@ -59,12 +58,73 @@ const FilterPanel = props => {
59
58
  });
60
59
  setFieldsDataState(newFieldsDataState);
61
60
  }, [fieldsData]);
61
+ const onChangeDropdownMultiHandler = (eventDropdownMulti, item) => {
62
+ var _eventDropdownMulti$n;
63
+ const newSelectedValue = (eventDropdownMulti === null || eventDropdownMulti === void 0 ? void 0 : (_eventDropdownMulti$n = eventDropdownMulti.newValue) === null || _eventDropdownMulti$n === void 0 ? void 0 : _eventDropdownMulti$n.length) > 0 ? eventDropdownMulti === null || eventDropdownMulti === void 0 ? void 0 : eventDropdownMulti.newValue : [];
64
+ const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => itemField.name === item.name ? {
65
+ ...itemField,
66
+ selectedValue: newSelectedValue
67
+ } : itemField);
68
+ setFieldsDataState(newFieldsDataState);
69
+ onItemValueChanged({
70
+ fieldsData: newFieldsDataState,
71
+ changedItem: {
72
+ name: item.name,
73
+ inputType: item.inputType,
74
+ selectedValue: newSelectedValue
75
+ }
76
+ });
77
+ };
78
+ const onChangeDropdownSingleHandler = (eventDropdownSingle, item) => {
79
+ var _eventDropdownSingle$;
80
+ const newSelectedValue = (eventDropdownSingle === null || eventDropdownSingle === void 0 ? void 0 : (_eventDropdownSingle$ = eventDropdownSingle.newValue) === null || _eventDropdownSingle$ === void 0 ? void 0 : _eventDropdownSingle$.length) > 0 ? eventDropdownSingle === null || eventDropdownSingle === void 0 ? void 0 : eventDropdownSingle.newValue : [];
81
+ const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => itemField.name === item.name ? {
82
+ ...itemField,
83
+ selectedValue: newSelectedValue
84
+ } : itemField);
85
+ setFieldsDataState(newFieldsDataState);
86
+ onItemValueChanged({
87
+ fieldsData: newFieldsDataState,
88
+ changedItem: {
89
+ name: item.name,
90
+ inputType: item.inputType,
91
+ selectedValue: newSelectedValue
92
+ }
93
+ });
94
+ };
95
+ const onChangeDropdownPeriodPickerHandler = (eventDropdownPeriodPicker, item) => {
96
+ var _newPeriodPickerSelec3, _item$defaultValueYea3, _newPeriodPickerSelec4, _item$defaultValueYea4, _item$defaultValueYea5;
97
+ const newPeriodPickerSelectedValue = (eventDropdownPeriodPicker === null || eventDropdownPeriodPicker === void 0 ? void 0 : eventDropdownPeriodPicker.newValue) || [];
98
+ const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => {
99
+ var _newPeriodPickerSelec, _item$defaultValueYea, _newPeriodPickerSelec2, _item$defaultValueYea2;
100
+ return itemField.name === item.name ? {
101
+ ...itemField,
102
+ periodPickerSelectedValue: newPeriodPickerSelectedValue,
103
+ ...(((_newPeriodPickerSelec = newPeriodPickerSelectedValue[0]) === null || _newPeriodPickerSelec === void 0 ? void 0 : _newPeriodPickerSelec.value) === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea = item.defaultValueYears) !== null && _item$defaultValueYea !== void 0 && _item$defaultValueYea.value ? {
104
+ inputSubType: 'year'
105
+ } : ''),
106
+ selectedValue: ((_newPeriodPickerSelec2 = newPeriodPickerSelectedValue[0]) === null || _newPeriodPickerSelec2 === void 0 ? void 0 : _newPeriodPickerSelec2.value) === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea2 = item.defaultValueYears) !== null && _item$defaultValueYea2 !== void 0 && _item$defaultValueYea2.value ? [item === null || item === void 0 ? void 0 : item.defaultValueYears] : []
107
+ } : itemField;
108
+ });
109
+ setFieldsDataState(newFieldsDataState);
110
+ onItemValueChanged({
111
+ fieldsData: newFieldsDataState,
112
+ changedItem: {
113
+ name: item.name,
114
+ inputType: item.inputType,
115
+ ...(((_newPeriodPickerSelec3 = newPeriodPickerSelectedValue[0]) === null || _newPeriodPickerSelec3 === void 0 ? void 0 : _newPeriodPickerSelec3.value) === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea3 = item.defaultValueYears) !== null && _item$defaultValueYea3 !== void 0 && _item$defaultValueYea3.value ? {
116
+ inputSubType: 'year'
117
+ } : ''),
118
+ selectedValue: ((_newPeriodPickerSelec4 = newPeriodPickerSelectedValue[0]) === null || _newPeriodPickerSelec4 === void 0 ? void 0 : _newPeriodPickerSelec4.value) === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea4 = item.defaultValueYears) !== null && _item$defaultValueYea4 !== void 0 && _item$defaultValueYea4.value ? item === null || item === void 0 ? void 0 : (_item$defaultValueYea5 = item.defaultValueYears) === null || _item$defaultValueYea5 === void 0 ? void 0 : _item$defaultValueYea5.value : undefined
119
+ }
120
+ });
121
+ };
62
122
  const onClickResetHandler = () => {
63
123
  const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => ({
64
124
  ...itemField,
65
- selectedValue: undefined,
125
+ selectedValue: [],
66
126
  ...(itemField.periodPickerSelectedValue ? {
67
- periodPickerSelectedValue: undefined
127
+ periodPickerSelectedValue: []
68
128
  } : '')
69
129
  }));
70
130
  setFieldsDataState(newFieldsDataState);
@@ -79,17 +139,37 @@ const FilterPanel = props => {
79
139
  const currentYear = (0, _moment.default)().year();
80
140
  const previousYear = (0, _moment.default)().subtract(1, 'years').year();
81
141
  const yearsArray = [{
82
- value: previousYear,
83
- label: previousYear
142
+ value: "".concat(previousYear),
143
+ label: "".concat(previousYear)
84
144
  }, {
85
- value: currentYear,
86
- label: currentYear
145
+ value: "".concat(currentYear),
146
+ label: "".concat(currentYear)
87
147
  }];
88
148
  return yearsArray;
89
149
  };
150
+ const onChangeDropdownYearHandler = (eventDropdownYear, item) => {
151
+ const newSelectedValue = (eventDropdownYear === null || eventDropdownYear === void 0 ? void 0 : eventDropdownYear.newValue) || [];
152
+ const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => itemField.name === item.name ? {
153
+ ...itemField,
154
+ inputSubType: (newSelectedValue === null || newSelectedValue === void 0 ? void 0 : newSelectedValue.length) > 0 ? 'year' : undefined,
155
+ selectedValue: newSelectedValue
156
+ } : itemField);
157
+ setFieldsDataState(newFieldsDataState);
158
+ onItemValueChanged({
159
+ fieldsData: newFieldsDataState,
160
+ changedItem: {
161
+ name: item.name,
162
+ inputType: item.inputType,
163
+ inputSubType: (newSelectedValue === null || newSelectedValue === void 0 ? void 0 : newSelectedValue.length) > 0 ? 'year' : undefined,
164
+ selectedValue: (newSelectedValue === null || newSelectedValue === void 0 ? void 0 : newSelectedValue.length) > 0 ? newSelectedValue[0].value : undefined
165
+ }
166
+ });
167
+ };
90
168
  const displayPeriodPickerContent = item => {
169
+ var _item$periodPickerSel, _item$periodPickerSel2;
91
170
  let content;
92
- switch (item.periodPickerSelectedValue) {
171
+ const currentValue = item.periodPickerSelectedValue && ((_item$periodPickerSel = item.periodPickerSelectedValue) === null || _item$periodPickerSel === void 0 ? void 0 : _item$periodPickerSel.length) > 0 ? (_item$periodPickerSel2 = item.periodPickerSelectedValue[0]) === null || _item$periodPickerSel2 === void 0 ? void 0 : _item$periodPickerSel2.value : '';
172
+ switch (currentValue) {
93
173
  case 'date':
94
174
  content = /*#__PURE__*/_react.default.createElement(_FilterPanel.DatePickerContainer, {
95
175
  className: "DatePickerContainer"
@@ -193,46 +273,23 @@ const FilterPanel = props => {
193
273
  });
194
274
  break;
195
275
  case 'year':
196
- content = /*#__PURE__*/_react.default.createElement(_Dropdown.Dropdown, {
197
- className: "Dropdown",
276
+ content = /*#__PURE__*/_react.default.createElement(_DropdownNew.DropdownNew, {
277
+ className: "Dropdown_Year",
198
278
  name: ''.concat(item.name, '_Year'),
199
- reset: Reset,
200
- showPopupIcon: true,
201
- allowedInput: "all",
202
- dropdownListfontSize: "14px",
279
+ isMulti: false,
280
+ placeHolder: "Select Year ...",
281
+ label: "Year",
282
+ labelEmptyValue: "Year",
203
283
  labelColor: borderColor,
204
- limitTagsOnMultiSelect: 2,
205
- onInputChange: () => {},
206
- shape: "round",
207
- size: "large",
208
- text: "Year",
209
- value: item.selectedValue || undefined,
284
+ checkBoxColor: okButtonBackgroundColor,
210
285
  required: item.required,
211
- placeHolder: "Select Year ...",
212
- placeHolderFontSize: "14px",
213
- onChange: eventDropdown => {
214
- var _eventDropdown$newVal, _eventDropdown$newVal2;
215
- const selectedValue = eventDropdown !== null && eventDropdown !== void 0 && (_eventDropdown$newVal = eventDropdown.newValue) !== null && _eventDropdown$newVal !== void 0 && _eventDropdown$newVal.value ? "".concat(eventDropdown === null || eventDropdown === void 0 ? void 0 : (_eventDropdown$newVal2 = eventDropdown.newValue) === null || _eventDropdown$newVal2 === void 0 ? void 0 : _eventDropdown$newVal2.value) : undefined;
216
- const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => itemField.name === item.name ? {
217
- ...itemField,
218
- inputSubType: selectedValue ? 'year' : undefined,
219
- selectedValue: selectedValue ? "".concat(selectedValue) : undefined
220
- } : itemField);
221
- setFieldsDataState(newFieldsDataState);
222
- onItemValueChanged({
223
- fieldsData: newFieldsDataState,
224
- changedItem: {
225
- name: item.name,
226
- inputType: item.inputType,
227
- inputSubType: 'year',
228
- selectedValue: selectedValue ? "".concat(selectedValue) : undefined
229
- }
230
- });
231
- },
286
+ disabled: item.disabled,
287
+ error: false,
288
+ errorMessage: "",
289
+ selectedValue: item.selectedValue || [item.defaultValueYears] || [],
290
+ onChange: eventDropdownYear => onChangeDropdownYearHandler(eventDropdownYear, item),
232
291
  options: getYearsArray(),
233
- defaultValue: item.defaultValueYears || undefined,
234
- width: "100%",
235
- height: "55px"
292
+ width: "100%"
236
293
  });
237
294
  break;
238
295
  default:
@@ -254,92 +311,42 @@ const FilterPanel = props => {
254
311
  let content;
255
312
  switch (item.inputType) {
256
313
  case 'dropdown':
257
- content = /*#__PURE__*/_react.default.createElement(_Dropdown.Dropdown, {
258
- className: "Dropdown",
314
+ content = /*#__PURE__*/_react.default.createElement(_DropdownNew.DropdownNew, {
315
+ className: "Dropdown_Single",
259
316
  name: item.name,
260
- defaultValue: () => {
261
- var _item$defaultValue, _item$defaultValue2;
262
- if (!(item !== null && item !== void 0 && item.defaultValue)) return '';
263
- const newValue = {
264
- id: "".concat(item === null || item === void 0 ? void 0 : (_item$defaultValue = item.defaultValue) === null || _item$defaultValue === void 0 ? void 0 : _item$defaultValue.value),
265
- label: "".concat(item === null || item === void 0 ? void 0 : (_item$defaultValue2 = item.defaultValue) === null || _item$defaultValue2 === void 0 ? void 0 : _item$defaultValue2.label)
266
- };
267
- return newValue;
268
- },
269
- reset: Reset,
270
- showPopupIcon: true,
271
- allowedInput: "all",
272
- dropdownListfontSize: "14px",
317
+ isMulti: false,
318
+ placeHolder: item.placeHolder,
319
+ label: item.label,
320
+ labelEmptyValue: item.labelEmptyValue,
273
321
  labelColor: borderColor,
274
- limitTagsOnMultiSelect: 2,
275
- onInputChange: () => {},
276
- shape: "round",
277
- size: "large",
278
- text: !item.selectedValue ? item.labelEmptyValue || item.label : item.label,
279
- value: item.selectedValue || undefined,
322
+ checkBoxColor: okButtonBackgroundColor,
280
323
  required: item.required,
281
324
  disabled: item.disabled,
282
- placeHolder: item.placeHolder,
283
- placeHolderFontSize: "14px",
284
- onChange: eventDropdown => {
285
- var _eventDropdown$newVal3, _eventDropdown$newVal4;
286
- const selectedValue = eventDropdown !== null && eventDropdown !== void 0 && (_eventDropdown$newVal3 = eventDropdown.newValue) !== null && _eventDropdown$newVal3 !== void 0 && _eventDropdown$newVal3.value ? "".concat(eventDropdown === null || eventDropdown === void 0 ? void 0 : (_eventDropdown$newVal4 = eventDropdown.newValue) === null || _eventDropdown$newVal4 === void 0 ? void 0 : _eventDropdown$newVal4.value) : undefined;
287
- const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => itemField.name === item.name ? {
288
- ...itemField,
289
- selectedValue: selectedValue ? "".concat(selectedValue) : undefined
290
- } : itemField);
291
- setFieldsDataState(newFieldsDataState);
292
- onItemValueChanged({
293
- fieldsData: newFieldsDataState,
294
- changedItem: {
295
- name: item.name,
296
- inputType: item.inputType,
297
- selectedValue: selectedValue ? "".concat(selectedValue) : undefined
298
- }
299
- });
300
- },
301
- options: item.dropdownOptions && item.dropdownOptions.length > 0 ? item.dropdownOptions : [],
325
+ error: false,
326
+ errorMessage: "",
327
+ selectedValue: item.selectedValue || item.defaultValue || [],
328
+ onChange: eventDropdown => onChangeDropdownSingleHandler(eventDropdown, item),
329
+ options: item.dropdownOptions || [],
302
330
  width: "100%"
303
331
  });
304
332
  break;
305
333
  case 'dropdownMulti':
306
- content = /*#__PURE__*/_react.default.createElement(_DropdownMulti.DropdownMulti, {
307
- className: "DropdownMulti",
334
+ content = /*#__PURE__*/_react.default.createElement(_DropdownNew.DropdownNew, {
335
+ className: "Dropdown_Multi",
308
336
  name: item.name,
309
- reset: Reset,
310
- dropdownMultiMaxWidth: FieldsContainerWidth ? "".concat(FieldsContainerWidth === null || FieldsContainerWidth === void 0 ? void 0 : FieldsContainerWidth.toString(), "px") : undefined,
311
- showPopupIcon: false,
312
- allowedInput: "all",
313
- dropdownListfontSize: "14px",
337
+ isMulti: true,
338
+ placeHolder: item.placeHolder,
339
+ label: item.label,
340
+ labelEmptyValue: item.labelEmptyValue,
314
341
  labelColor: borderColor,
315
- limitTagsOnMultiSelect: 2,
316
- onInputChange: () => {},
317
- shape: "round",
318
- size: "large",
319
- text: !item.selectedValue ? item.labelEmptyValue || item.label : item.label,
320
- value: item.selectedValue || undefined,
342
+ checkBoxColor: okButtonBackgroundColor,
321
343
  required: item.required,
322
344
  disabled: item.disabled,
323
- placeHolder: item.placeHolder,
324
- placeHolderFontSize: "14px",
325
- onChange: eventDropdownMulti => {
326
- var _eventDropdownMulti$n;
327
- const selectedValue = "".concat(eventDropdownMulti === null || eventDropdownMulti === void 0 ? void 0 : (_eventDropdownMulti$n = eventDropdownMulti.newValue) === null || _eventDropdownMulti$n === void 0 ? void 0 : _eventDropdownMulti$n.map(selectedItem => "".concat(selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.value)));
328
- const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => itemField.name === item.name ? {
329
- ...itemField,
330
- selectedValue: "".concat(selectedValue)
331
- } : itemField);
332
- setFieldsDataState(newFieldsDataState);
333
- onItemValueChanged({
334
- fieldsData: newFieldsDataState,
335
- changedItem: {
336
- name: item.name,
337
- inputType: item.inputType,
338
- selectedValue: "".concat(selectedValue)
339
- }
340
- });
341
- },
342
- options: item.dropdownOptions && item.dropdownOptions.length > 0 ? item.dropdownOptions : [],
345
+ error: false,
346
+ errorMessage: "",
347
+ selectedValue: item.selectedValue || item.defaultValue || [],
348
+ onChange: eventDropdownMulti => onChangeDropdownMultiHandler(eventDropdownMulti, item),
349
+ options: item.dropdownOptions || [],
343
350
  width: "100%"
344
351
  });
345
352
  break;
@@ -376,52 +383,22 @@ const FilterPanel = props => {
376
383
  case 'periodpicker':
377
384
  content = /*#__PURE__*/_react.default.createElement(_FilterPanel.PeriodPickerContainer, {
378
385
  className: "PeriodPickerContainer"
379
- }, /*#__PURE__*/_react.default.createElement(_Dropdown.Dropdown, {
380
- className: "Dropdown",
386
+ }, /*#__PURE__*/_react.default.createElement(_DropdownNew.DropdownNew, {
387
+ className: "Dropdown_PeriodPicker",
381
388
  name: item.name,
382
- reset: Reset,
383
- showPopupIcon: false,
384
- allowedInput: "all",
385
- dropdownListfontSize: "14px",
389
+ isMulti: false,
390
+ placeHolder: item.placeHolder,
391
+ label: item.label,
392
+ labelEmptyValue: item.labelEmptyValue,
386
393
  labelColor: borderColor,
387
- limitTagsOnMultiSelect: 2,
388
- onInputChange: () => {},
389
- shape: "round",
390
- size: "large",
391
- text: !item.periodPickerSelectedValue ? item.labelEmptyValue || item.label : item.label,
392
- value: item.selectedValue || undefined,
394
+ checkBoxColor: okButtonBackgroundColor,
393
395
  required: item.required,
394
396
  disabled: item.disabled,
395
- placeHolder: item.placeHolder,
396
- placeHolderFontSize: "14px",
397
- onChange: eventDropdownPeriodPicker => {
398
- var _eventDropdownPeriodP, _eventDropdownPeriodP2, _item$defaultValueYea4, _item$defaultValueYea5, _item$defaultValueYea6;
399
- const newPeriodPickerSelectedValue = eventDropdownPeriodPicker !== null && eventDropdownPeriodPicker !== void 0 && (_eventDropdownPeriodP = eventDropdownPeriodPicker.newValue) !== null && _eventDropdownPeriodP !== void 0 && _eventDropdownPeriodP.value ? "".concat(eventDropdownPeriodPicker === null || eventDropdownPeriodPicker === void 0 ? void 0 : (_eventDropdownPeriodP2 = eventDropdownPeriodPicker.newValue) === null || _eventDropdownPeriodP2 === void 0 ? void 0 : _eventDropdownPeriodP2.value) : undefined;
400
- const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => {
401
- var _item$defaultValueYea, _item$defaultValueYea2, _item$defaultValueYea3;
402
- return itemField.name === item.name ? {
403
- ...itemField,
404
- periodPickerSelectedValue: newPeriodPickerSelectedValue ? "".concat(newPeriodPickerSelectedValue) : undefined,
405
- ...(newPeriodPickerSelectedValue === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea = item.defaultValueYears) !== null && _item$defaultValueYea !== void 0 && _item$defaultValueYea.value ? {
406
- inputSubType: 'year'
407
- } : ''),
408
- selectedValue: newPeriodPickerSelectedValue === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea2 = item.defaultValueYears) !== null && _item$defaultValueYea2 !== void 0 && _item$defaultValueYea2.value ? item === null || item === void 0 ? void 0 : (_item$defaultValueYea3 = item.defaultValueYears) === null || _item$defaultValueYea3 === void 0 ? void 0 : _item$defaultValueYea3.value : undefined
409
- } : itemField;
410
- });
411
- setFieldsDataState(newFieldsDataState);
412
- onItemValueChanged({
413
- fieldsData: newFieldsDataState,
414
- changedItem: {
415
- name: item.name,
416
- inputType: item.inputType,
417
- ...(newPeriodPickerSelectedValue === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea4 = item.defaultValueYears) !== null && _item$defaultValueYea4 !== void 0 && _item$defaultValueYea4.value ? {
418
- inputSubType: 'year'
419
- } : ''),
420
- selectedValue: newPeriodPickerSelectedValue === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea5 = item.defaultValueYears) !== null && _item$defaultValueYea5 !== void 0 && _item$defaultValueYea5.value ? item === null || item === void 0 ? void 0 : (_item$defaultValueYea6 = item.defaultValueYears) === null || _item$defaultValueYea6 === void 0 ? void 0 : _item$defaultValueYea6.value : undefined
421
- }
422
- });
423
- },
424
- options: item.dropdownOptions && item.dropdownOptions.length > 0 ? item.dropdownOptions : [],
397
+ error: false,
398
+ errorMessage: "",
399
+ selectedValue: item.periodPickerSelectedValue || [],
400
+ onChange: eventDropdownPeriodPicker => onChangeDropdownPeriodPickerHandler(eventDropdownPeriodPicker, item),
401
+ options: item.dropdownOptions || [],
425
402
  width: "100%"
426
403
  }), displayPeriodPickerContent(item));
427
404
  break;
@@ -31,7 +31,9 @@ const Input = _ref => {
31
31
  labelColor,
32
32
  leftIcon,
33
33
  rightIcon,
34
- password
34
+ password,
35
+ leftIconOnClick,
36
+ rightIconOnClick
35
37
  } = _ref;
36
38
  const [isFocused, setIsFocused] = (0, _react.useState)(false);
37
39
  const [inputValue, setInputValue] = (0, _react.useState)('');
@@ -71,13 +73,25 @@ const Input = _ref => {
71
73
  onBlur();
72
74
  setIsFocused(false);
73
75
  };
76
+ const leftIconOnClickHandler = () => {
77
+ if (disabled) return;
78
+ leftIconOnClick({
79
+ leftIconOnClick: leftIcon
80
+ });
81
+ };
82
+ const rightIconOnClickHandler = () => {
83
+ if (disabled) return;
84
+ rightIconOnClick({
85
+ rightIconOnClick: rightIcon
86
+ });
87
+ };
74
88
  const getLeftIcon = () => {
75
89
  if (!leftIcon || leftIcon === 'none') return '';
76
- return (0, _IconsHandler.getIcon)(leftIcon, '14px', '14px', error ? 'red' : labelColor, disabled, 'pointer');
90
+ return (0, _IconsHandler.getIcon)(leftIcon, '14px', '14px', error ? 'red' : labelColor, disabled, 'pointer', leftIconOnClickHandler);
77
91
  };
78
92
  const getRightIcon = () => {
79
93
  if (!rightIcon || rightIcon === 'none') return '';
80
- return (0, _IconsHandler.getIcon)(rightIcon, '14px', '14px', error ? 'red' : labelColor, disabled, 'pointer');
94
+ return (0, _IconsHandler.getIcon)(rightIcon, '14px', '14px', error ? 'red' : labelColor, disabled, 'pointer', rightIconOnClickHandler);
81
95
  };
82
96
  const toggleShowPassword = () => {
83
97
  setShowPassword(!showPassword);
@@ -87,7 +101,7 @@ const Input = _ref => {
87
101
  if (showPassword) {
88
102
  return /*#__PURE__*/_react.default.createElement(_Input.IconWrapper, {
89
103
  className: "passwordEyeSlash",
90
- pointer: "cursor",
104
+ disabled: disabled,
91
105
  onClick: toggleShowPassword
92
106
  }, /*#__PURE__*/_react.default.createElement(_fa.FaEyeSlash, {
93
107
  onClick: toggleShowPassword,
@@ -98,13 +112,16 @@ const Input = _ref => {
98
112
  };
99
113
  return /*#__PURE__*/_react.default.createElement(_Input.MainContainer, {
100
114
  className: "MainContainer",
101
- width: width
115
+ width: width,
116
+ size: size,
117
+ disabled: disabled
102
118
  }, /*#__PURE__*/_react.default.createElement(_Input.InputContainer, {
103
119
  className: "InputContainer",
104
120
  labelColor: labelColor,
105
121
  disabled: disabled,
106
122
  error: error,
107
- isFocused: isFocused
123
+ isFocused: isFocused,
124
+ size: size
108
125
  }, getLeftIcon(), /*#__PURE__*/_react.default.createElement(_Input.InputSubContainer, {
109
126
  className: "InputSubContainer",
110
127
  ref: containerRef,
@@ -161,6 +178,9 @@ Input.defaultProps = {
161
178
  selectedValue: '',
162
179
  leftIcon: 'none',
163
180
  rightIcon: 'none',
181
+ leftIconOnClick: () => {},
182
+ rightIconOnClick: () => {},
183
+ onBlur: () => {},
164
184
  password: false
165
185
  };
166
186
  var _default = exports.default = Input;
@@ -9,10 +9,10 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _styledComponents = _interopRequireDefault(require("styled-components"));
10
10
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
11
11
  /* eslint-disable no-nested-ternary */
12
- const MainContainer = exports.MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: center;\n align-items: flex-start;\n width: ", "; \n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 10px;\n padding: 0;\n"])), props => props.width || '300px');
13
- const Label = exports.Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-size: ", ";\n font-weight: 400;\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px; \n z-index: 2;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: ", ";\n font-family: Poppins; \n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n max-height: 16px;\n gap: 4px;\n &:focus {\n border-radius: 12px 12px 0 0 ;\n }\n"])), props => props.isFocused || props.hasValue ? '14px' : '14px', props => props.error ? 'red' : props.disabled ? '#D0D0D0' : props.labelColor, props => props.isFocused || props.hasValue ? '0px' : props.size === 'medium' ? '27px' : '17px', props => props.isFocused || props.hasValue ? '23px' : props.leftIcon && props.leftIcon !== 'none' ? '42px' : '16px');
14
- const InputContainer = exports.InputContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n white-space: pre-wrap;\n align-items: center;\n overflow: hidden;\n padding: 0 16px;\n gap: 14px;\n width: 100%;\n height: 100%; \n box-sizing: border-box;\n background-color: #fff;\n border: 1px solid ", ";\n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n outline: none;\n color: ", ";\n \n &:hover {\n border: 1px solid ", ";\n }\n\n &:focus { \n border: 1px solid ", "; \n }\n \n"])), props => props.disabled ? '#D0D0D0' : props.error ? 'red' : '#B1B1B1', props => props.disabled ? '#D0D0D0' : '#212121', props => props.disabled ? '#D0D0D0' : props.error ? 'red' : props.labelColor || '#212121', props => props.disabled ? '#D0D0D0' : props.error ? 'red' : props.labelColor || '#212121');
15
- const InputSubContainer = exports.InputSubContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: column;\n flex-wrap: nowrap; \n align-content: center; \n align-items: flex-start;\n justify-content: center;\n white-space: pre-wrap;\n overflow: hidden;\n padding: 5px 0;\n width: 100%;\n height: 100%;\n min-height: ", ";\n box-sizing: border-box;\n background-color: #fff; \n border-radius: 12px;\n outline: none;\n color: ", "; \n"])), props => props.size === 'medium' ? '52px' : '32px', props => props.disabled ? '#D0D0D0' : '#212121');
16
- const StyledInput = exports.StyledInput = _styledComponents.default.input(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: calc(100% - 10px);\n height: 20px;\n font-family: Poppins;\n font-weight: 400;\n font-size: 14px;\n outline: none; \n color: ", "; \n background-color: #fff; \n border: none;\n"])), props => props.disabled ? '#D0D0D0' : '#212121');
12
+ const MainContainer = exports.MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: center;\n align-items: flex-start;\n width: ", "; \n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: ", "; \n padding: 0;\n cursor: ", ";\n"])), props => props.width || '300px', props => props.size === 'small' ? '8px' : '12px', props => props.disabled ? 'not-allowed' : 'default');
13
+ const Label = exports.Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-size: ", ";\n font-weight: 400;\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px; \n z-index: 2;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: ", ";\n font-family: Poppins; \n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n max-height: 16px;\n gap: 4px;\n &:hover {\n cursor: ", ";\n }\n"])), props => props.isFocused || props.hasValue ? '14px' : '14px', props => props.error ? 'red' : props.disabled ? '#D0D0D0' : props.labelColor, props => props.isFocused || props.hasValue ? '0px' : props.size === 'medium' ? '27px' : '17px', props => props.isFocused || props.hasValue ? '23px' : props.leftIcon && props.leftIcon !== 'none' ? '42px' : '16px', props => props.disabled ? 'not-allowed' : 'pointer');
14
+ const InputContainer = exports.InputContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n white-space: pre-wrap;\n align-items: center;\n overflow: hidden;\n padding: 0 16px;\n gap: 14px;\n width: 100%;\n height: 100%; \n box-sizing: border-box;\n background-color: #fff;\n border: 1px solid ", ";\n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: ", "; \n outline: none;\n color: ", ";\n \n &:hover {\n border: 1px solid ", ";\n }\n\n &:focus { \n border: 1px solid ", "; \n }\n \n"])), props => props.disabled ? '#D0D0D0' : props.error ? 'red' : '#B1B1B1', props => props.size === 'small' ? '8px' : '12px', props => props.disabled ? '#D0D0D0' : '#212121', props => props.disabled ? '#D0D0D0' : props.error ? 'red' : props.labelColor || '#212121', props => props.disabled ? '#D0D0D0' : props.error ? 'red' : props.labelColor || '#212121');
15
+ const InputSubContainer = exports.InputSubContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: column;\n flex-wrap: nowrap; \n align-content: center; \n align-items: flex-start;\n justify-content: center;\n white-space: pre-wrap;\n overflow: hidden;\n padding: 5px 0;\n width: 100%;\n height: 100%;\n min-height: ", ";\n box-sizing: border-box;\n background-color: #fff; \n border-radius: ", "; \n outline: none;\n color: ", "; \n cursor: ", ";\n"])), props => props.size === 'medium' ? '52px' : '32px', props => props.size === 'small' ? '8px' : '12px', props => props.disabled ? '#D0D0D0' : '#212121', props => props.disabled ? 'not-allowed' : 'pointer');
16
+ const StyledInput = exports.StyledInput = _styledComponents.default.input(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: calc(100% - 10px);\n height: 20px;\n font-family: Poppins;\n font-weight: 400;\n font-size: 14px;\n outline: none; \n color: ", "; \n background-color: #fff; \n border: none;\n cursor: ", ";\n"])), props => props.disabled ? '#D0D0D0' : '#212121', props => props.disabled ? 'not-allowed' : 'pointer');
17
17
  const ErrorMessage = exports.ErrorMessage = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 12px;\n color: red;\n margin-top: 5px;\n max-width: ", ";\n"])), props => props.width || '300px');
18
- const IconWrapper = exports.IconWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n align-content: center; \n padding: 2px; \n &:hover{\n cursor: pointer;\n }\n"])));
18
+ const IconWrapper = exports.IconWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n align-content: center; \n padding: 2px; \n &:hover{ \n cursor: ", ";\n }\n"])), props => props.disabled ? 'not-allowed' : 'pointer');
@@ -27,101 +27,121 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
27
27
  return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
28
28
  className: "FilterIcon",
29
29
  pointer: pointer,
30
+ disabled: disabled,
30
31
  onClick: callBackOnClick
31
32
  }, /*#__PURE__*/_react.default.createElement(_FilterIcon.FilterIcon, {
32
33
  height: newIconHeight,
33
34
  width: newIconWidth,
34
- color: newColor
35
+ color: newColor,
36
+ onClick: callBackOnClick
35
37
  }));
36
38
  case 'options':
37
39
  return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
38
40
  className: "OptionsIcon",
39
41
  pointer: pointer,
42
+ disabled: disabled,
40
43
  onClick: callBackOnClick
41
44
  }, /*#__PURE__*/_react.default.createElement(_OptionsIcon.OptionsIcon, {
42
45
  height: newIconHeight,
43
46
  width: newIconWidth,
44
- color: newColor
47
+ color: newColor,
48
+ onClick: callBackOnClick
45
49
  }));
46
50
  case 'download':
47
51
  return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
48
52
  className: "DownloadIcon",
49
53
  pointer: pointer,
54
+ disabled: disabled,
50
55
  onClick: callBackOnClick
51
56
  }, /*#__PURE__*/_react.default.createElement(_DownloadIcon.DownloadIcon, {
52
57
  height: newIconHeight,
53
58
  width: newIconWidth,
54
- color: newColor
59
+ color: newColor,
60
+ onClick: callBackOnClick
55
61
  }));
56
62
  case 'document':
57
63
  return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
58
64
  className: "DocumentIcon",
59
65
  pointer: pointer,
66
+ disabled: disabled,
60
67
  onClick: callBackOnClick
61
68
  }, /*#__PURE__*/_react.default.createElement(_DocumentIcon.DocumentIcon, {
62
69
  height: newIconHeight,
63
70
  width: newIconWidth,
64
- color: newColor
71
+ color: newColor,
72
+ onClick: callBackOnClick
65
73
  }));
66
74
  case 'fly':
67
75
  return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
68
76
  className: "FlyIcon",
69
77
  pointer: pointer,
78
+ disabled: disabled,
70
79
  onClick: callBackOnClick
71
80
  }, /*#__PURE__*/_react.default.createElement(_FlyIcon.FlyIcon, {
72
81
  height: newIconHeight,
73
82
  width: newIconWidth,
74
- color: newColor
83
+ color: newColor,
84
+ onClick: callBackOnClick
75
85
  }));
76
86
  case 'bell':
77
87
  return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
78
88
  className: "BellIcon",
79
89
  pointer: pointer,
90
+ disabled: disabled,
80
91
  onClick: callBackOnClick
81
92
  }, /*#__PURE__*/_react.default.createElement(_BellIcon.BellIcon, {
82
93
  height: newIconHeight,
83
94
  width: newIconWidth,
84
- color: newColor
95
+ color: newColor,
96
+ onClick: callBackOnClick
85
97
  }));
86
98
  case 'maintenance':
87
99
  return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
88
100
  className: "MaintenanceIcon",
89
101
  pointer: pointer,
102
+ disabled: disabled,
90
103
  onClick: callBackOnClick
91
104
  }, /*#__PURE__*/_react.default.createElement(_MaintenanceIcon.MaintenanceIcon, {
92
105
  height: newIconHeight,
93
106
  width: newIconWidth,
94
- color: newColor
107
+ color: newColor,
108
+ onClick: callBackOnClick
95
109
  }));
96
110
  case 'exit':
97
111
  return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
98
112
  className: "ExitIcon",
99
113
  pointer: pointer,
114
+ disabled: disabled,
100
115
  onClick: callBackOnClick
101
116
  }, /*#__PURE__*/_react.default.createElement(_ExitIcon.ExitIcon, {
102
117
  height: newIconHeight,
103
118
  width: newIconWidth,
104
- color: newColor
119
+ color: newColor,
120
+ onClick: callBackOnClick
105
121
  }));
106
122
  case 'eye':
107
123
  return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
108
124
  className: "EyeIcon",
109
125
  pointer: pointer,
126
+ disabled: disabled,
110
127
  onClick: callBackOnClick
111
128
  }, /*#__PURE__*/_react.default.createElement(_EyeIcon.EyeIcon, {
112
129
  height: newIconHeight,
113
130
  width: newIconWidth,
114
- color: newColor
131
+ color: newColor,
132
+ onClick: callBackOnClick
115
133
  }));
116
134
  case 'search':
117
135
  return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
118
136
  className: "SearchIcon",
119
137
  pointer: pointer,
138
+ disabled: disabled,
120
139
  onClick: callBackOnClick
121
140
  }, /*#__PURE__*/_react.default.createElement(_SearchIcon.SearchIcon, {
122
141
  height: newIconHeight,
123
142
  width: newIconWidth,
124
- color: newColor
143
+ color: newColor,
144
+ onClick: callBackOnClick
125
145
  }));
126
146
  default:
127
147
  return '';
@@ -9,4 +9,4 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _styledComponents = _interopRequireDefault(require("styled-components"));
10
10
  var _templateObject;
11
11
  // eslint-disable-next-line import/prefer-default-export
12
- const IconWrapper = exports.IconWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n align-content: center; \n padding: 2px;\n cursor: ", ";\n"])), props => props.pointer || 'default');
12
+ const IconWrapper = exports.IconWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n align-content: center; \n padding: 2px;\n cursor: ", ";\n"])), props => props.disabled ? 'not-allowed' : props.pointer || 'default');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.682",
3
+ "version": "1.0.684",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {