sag_components 1.0.375 → 1.0.377

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.
Files changed (98) hide show
  1. package/.history/.env_20231001120549 +0 -0
  2. package/.history/.env_20231001120613 +1 -0
  3. package/.history/.env_20231003143620 +1 -0
  4. package/.history/.eslintrc_20230928112617.js +26 -0
  5. package/.history/.eslintrc_20230928130534.js +27 -0
  6. package/.history/.eslintrc_20230928133400.js +28 -0
  7. package/.history/.eslintrc_20230928133404.js +28 -0
  8. package/.history/.eslintrc_20230928133416.js +28 -0
  9. package/.history/.eslintrc_20230928133419.js +28 -0
  10. package/.history/.eslintrc_20230928133432.js +28 -0
  11. package/.history/.eslintrc_20230928133439.js +28 -0
  12. package/.history/.eslintrc_20230928133458.js +29 -0
  13. package/.history/.eslintrc_20230928133500.js +28 -0
  14. package/.history/.eslintrc_20230928134009.js +28 -0
  15. package/.history/.eslintrc_20230928135318.js +34 -0
  16. package/.history/.eslintrc_20230928135321.js +34 -0
  17. package/.history/.eslintrc_20230928135323.js +34 -0
  18. package/.history/.eslintrc_20230928135332.js +34 -0
  19. package/.history/.eslintrc_20230928135333.js +34 -0
  20. package/.history/.eslintrc_20230928135352.js +29 -0
  21. package/.history/.eslintrc_20230928135353.js +29 -0
  22. package/.history/.eslintrc_20230928135355.js +29 -0
  23. package/.history/.eslintrc_20230928135408.js +29 -0
  24. package/.history/.eslintrc_20230928135538.js +30 -0
  25. package/.history/.eslintrc_20230928135539.js +30 -0
  26. package/.history/.eslintrc_20230928135543.js +30 -0
  27. package/.history/.gitignore_20230921093332 +119 -0
  28. package/.history/.gitignore_20230921111638 +120 -0
  29. package/.history/.gitignore_20230921111650 +120 -0
  30. package/.history/.gitignore_20230921111810 +121 -0
  31. package/.history/package-lock_20231114111138.json +47810 -0
  32. package/.history/package-lock_20231114111158.json +47802 -0
  33. package/.history/package_20231029152422.json +82 -0
  34. package/.history/package_20231029153420.json +82 -0
  35. package/.history/package_20231029154416.json +82 -0
  36. package/.history/package_20231030094127.json +82 -0
  37. package/.history/package_20231030114707.json +82 -0
  38. package/.history/package_20231030130704.json +82 -0
  39. package/.history/package_20231030132422.json +82 -0
  40. package/.history/package_20231030134051.json +82 -0
  41. package/.history/package_20231030142913.json +82 -0
  42. package/.history/package_20231030143556.json +82 -0
  43. package/.history/package_20231030144210.json +82 -0
  44. package/.history/package_20231101113942.json +82 -0
  45. package/.history/package_20231101114544.json +82 -0
  46. package/.history/package_20231101151518.json +82 -0
  47. package/.history/package_20231101154501.json +82 -0
  48. package/.history/package_20231101155811.json +82 -0
  49. package/.history/package_20231101160235.json +82 -0
  50. package/.history/package_20231101160406.json +82 -0
  51. package/.history/package_20231101161325.json +82 -0
  52. package/.history/package_20231101161333.json +82 -0
  53. package/.history/package_20231102123623.json +82 -0
  54. package/.history/package_20231102125741.json +82 -0
  55. package/.history/package_20231102130857.json +82 -0
  56. package/.history/package_20231102132227.json +82 -0
  57. package/.history/package_20231102142340.json +82 -0
  58. package/.history/package_20231102143256.json +82 -0
  59. package/.history/package_20231105153539.json +82 -0
  60. package/.history/package_20231105154332.json +82 -0
  61. package/.history/package_20231105171201.json +82 -0
  62. package/.history/package_20231106123849.json +82 -0
  63. package/.history/package_20231107170638.json +82 -0
  64. package/.history/package_20231109103647.json +82 -0
  65. package/.history/package_20231109103911.json +82 -0
  66. package/.history/package_20231109105426.json +82 -0
  67. package/.history/package_20231109132014.json +82 -0
  68. package/.history/package_20231109132115.json +82 -0
  69. package/.history/package_20231114100517.json +82 -0
  70. package/.history/package_20231114100859.json +82 -0
  71. package/.history/package_20231114101553.json +82 -0
  72. package/.history/package_20231114102545.json +82 -0
  73. package/.history/package_20231114111208.json +83 -0
  74. package/.history/package_20231114111515.json +83 -0
  75. package/.history/package_20231114112931.json +83 -0
  76. package/.history/package_20231114113014.json +83 -0
  77. package/.history/package_20231114113155.json +83 -0
  78. package/.history/package_20231114124318.json +83 -0
  79. package/.history/package_20231114125107.json +83 -0
  80. package/.history/package_20231114125510.json +83 -0
  81. package/.history/package_20231114132634.json +83 -0
  82. package/.history/package_20231116165815.json +83 -0
  83. package/.history/package_20231116165916.json +83 -0
  84. package/.history/package_20231119113637.json +83 -0
  85. package/.history/package_20231120100907.json +83 -0
  86. package/.history/package_20231121151523.json +77 -0
  87. package/.history/package_20231121155513.json +77 -0
  88. package/.history/package_20231121162434.json +77 -0
  89. package/.history/package_20231122100718.json +77 -0
  90. package/.history/package_20231128125149.json +82 -0
  91. package/.history/package_20231128125208.json +82 -0
  92. package/dist/stories/components/Dropdown.js +139 -159
  93. package/dist/stories/components/IconButton.js +18 -17
  94. package/dist/stories/components/IconButton.style.js +6 -6
  95. package/dist/stories/components/ReportTable.js +2 -2
  96. package/dist/stories/components/TotalBenchmarkAreachart.style.js +2 -2
  97. package/dist/stories/components/icons/BellIcon.js +3 -4
  98. package/package.json +1 -1
@@ -33,7 +33,7 @@ var checkedIcon = /*#__PURE__*/_react.default.createElement(_CheckBox.default, {
33
33
  */
34
34
  var Dropdown = exports.Dropdown = function Dropdown(_ref) {
35
35
  var _ref$width = _ref.width,
36
- width = _ref$width === void 0 ? "100%" : _ref$width,
36
+ width = _ref$width === void 0 ? '100%' : _ref$width,
37
37
  size = _ref.size,
38
38
  text = _ref.text,
39
39
  shape = _ref.shape,
@@ -46,23 +46,18 @@ var Dropdown = exports.Dropdown = function Dropdown(_ref) {
46
46
  onChange = _ref.onChange,
47
47
  onInputChange = _ref.onInputChange,
48
48
  _ref$labelColor = _ref.labelColor,
49
- labelColor = _ref$labelColor === void 0 ? "#1B30AA" : _ref$labelColor,
49
+ labelColor = _ref$labelColor === void 0 ? '#1B30AA' : _ref$labelColor,
50
50
  required = _ref.required,
51
51
  inputRef = _ref.inputRef,
52
52
  defaultValue = _ref.defaultValue,
53
53
  _ref$allowedInput = _ref.allowedInput,
54
- allowedInput = _ref$allowedInput === void 0 ? "all" : _ref$allowedInput,
54
+ allowedInput = _ref$allowedInput === void 0 ? 'all' : _ref$allowedInput,
55
55
  _ref$reset = _ref.reset,
56
56
  reset = _ref$reset === void 0 ? false : _ref$reset,
57
57
  _ref$disableClearable = _ref.disableClearable,
58
58
  disableClearable = _ref$disableClearable === void 0 ? false : _ref$disableClearable,
59
59
  _ref$disabled = _ref.disabled,
60
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
61
- _ref$dropdownListfont = _ref.dropdownListfontSize,
62
- dropdownListfontSize = _ref$dropdownListfont === void 0 ? "14px" : _ref$dropdownListfont,
63
- _ref$placeHolderFontS = _ref.placeHolderFontSize,
64
- placeHolderFontSize = _ref$placeHolderFontS === void 0 ? "14px" : _ref$placeHolderFontS,
65
- filterOptionsMultiSelect = _ref.filterOptionsMultiSelect;
60
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled;
66
61
  /**
67
62
  * SAG Dropdown
68
63
  */
@@ -71,13 +66,16 @@ var Dropdown = exports.Dropdown = function Dropdown(_ref) {
71
66
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
72
67
  currentInputValue = _useState2[0],
73
68
  setCurrentInputValue = _useState2[1];
74
- var _useState3 = (0, _react.useState)(filterOptionsMultiSelect ? filterOptionsMultiSelect : undefined),
69
+ var _useState3 = (0, _react.useState)(null),
75
70
  _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
76
- filterMultiSelectState = _useState4[0],
77
- setFilterMultiSelectState = _useState4[1];
78
- (0, _react.useEffect)(function () {
79
- setFilterMultiSelectState(filterOptionsMultiSelect);
80
- }, [filterOptionsMultiSelect]);
71
+ currentOption = _useState4[0],
72
+ setCurrentOption = _useState4[1];
73
+ // const [defaultValueSetFlag, setDefaultValueSetFlag] = useState(false);
74
+
75
+ // useEffect(() => {
76
+ // reset ? setDefaultValueSetFlag(false) : null;
77
+ // }, [reset]);
78
+
81
79
  (0, _react.useEffect)(function () {
82
80
  var delayDebounceFn = setTimeout(function () {
83
81
  onInputChange(currentInputValue);
@@ -91,114 +89,60 @@ var Dropdown = exports.Dropdown = function Dropdown(_ref) {
91
89
  MuiFormLabel: {
92
90
  styleOverrides: {
93
91
  asterisk: {
94
- color: "#db3131"
92
+ color: '#db3131'
95
93
  }
96
94
  }
97
95
  }
98
96
  }
99
97
  });
100
98
 
101
- // Single Text Style
102
- var getTextFieldStyleSingle = function getTextFieldStyleSingle() {
103
- if (shape === "round") {
99
+ // defines shape: squire or round
100
+ var getTextFieldStyle = function getTextFieldStyle() {
101
+ if (shape === 'round') {
104
102
  // round
105
103
  return {
106
- "& .MuiOutlinedInput-root": {
107
- borderRadius: "12px",
104
+ '& .MuiOutlinedInput-root': {
105
+ borderRadius: '12px',
108
106
  legend: {
109
- marginLeft: "10px"
107
+ marginLeft: '10px'
110
108
  }
111
109
  },
112
- "& .MuiAutocomplete-inputRoot": {
113
- paddingLeft: "10px !important",
114
- borderRadius: "12px",
110
+ '& .MuiAutocomplete-inputRoot': {
111
+ paddingLeft: '10px !important',
112
+ borderRadius: '12px',
115
113
  // This matches the specificity of the default styles at https://github.com/mui-org/material-ui/blob/v4.11.3/packages/material-ui-lab/src/Autocomplete/Autocomplete.js#L90
116
114
  '&[class*="MuiOutlinedInput-root"] .MuiAutocomplete-input:first-of-type': {
117
115
  // Default left padding is 6px
118
- paddingLeft: "10px"
116
+ paddingLeft: '10px'
119
117
  },
120
- "& .MuiOutlinedInput-notchedOutline": {
121
- borderColor: "#E7E7E7"
118
+ '& .MuiOutlinedInput-notchedOutline': {
119
+ borderColor: '#E7E7E7'
122
120
  },
123
- "&:hover .MuiOutlinedInput-notchedOutline": {
124
- borderColor: disabled ? "#E7E7E7" : labelColor
121
+ '&:hover .MuiOutlinedInput-notchedOutline': {
122
+ borderColor: disabled ? '#E7E7E7' : labelColor
125
123
  },
126
- "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
127
- borderColor: disabled ? "#E7E7E7" : labelColor
124
+ '&.Mui-focused .MuiOutlinedInput-notchedOutline': {
125
+ borderColor: disabled ? '#E7E7E7' : labelColor
128
126
  }
129
127
  },
130
- "& .MuiInputLabel-outlined:not(.MuiInputLabel-shrink)": {
128
+ '& .MuiInputLabel-outlined:not(.MuiInputLabel-shrink)': {
131
129
  // Default transform is "translate(14px, 20px) scale(1)""
132
130
  // This lines up the label with the initial cursor position in the input
133
131
  // after changing its padding-left.
134
- transform: "translate(14px, 18px) scale(1);",
135
- fontSize: "14px",
136
- color: disabled ? "#E7E7E7" : currentInputValue && currentInputValue.length > 0 ? "#212121" : "#757575"
132
+ transform: 'translate(14px, 18px) scale(1);',
133
+ fontSize: '14px',
134
+ color: disabled ? '#E7E7E7' : currentInputValue && currentInputValue.length > 0 ? '#212121' : '#757575'
137
135
  },
138
- "& .MuiInputLabel-outlined": {
139
- paddingLeft: "10px",
140
- color: disabled ? "#E7E7E7" : labelColor,
141
- fontSize: "18px"
136
+ '& .MuiInputLabel-outlined': {
137
+ paddingLeft: '10px',
138
+ color: disabled ? '#E7E7E7' : labelColor,
139
+ fontSize: '18px'
142
140
  },
143
- "& .MuiInputLabel-shrink": {
144
- marginLeft: "1px",
145
- paddingLeft: "4px",
146
- paddingRight: "6px",
147
- background: "white"
148
- }
149
- };
150
- }
151
- // square
152
- return null;
153
- };
154
-
155
- // ---------------------------- Multi Text Style -----------------------------------------
156
- var getTextFieldStyleMulti = function getTextFieldStyleMulti() {
157
- if (shape === "round") {
158
- // round
159
- return {
160
- "& .MuiOutlinedInput-root": {
161
- borderRadius: "12px",
162
- legend: {
163
- marginLeft: "10px"
164
- }
165
- },
166
- "& .MuiAutocomplete-inputRoot": {
167
- paddingLeft: "10px !important",
168
- borderRadius: "12px",
169
- // This matches the specificity of the default styles at https://github.com/mui-org/material-ui/blob/v4.11.3/packages/material-ui-lab/src/Autocomplete/Autocomplete.js#L90
170
- '&[class*="MuiOutlinedInput-root"] .MuiAutocomplete-input:first-of-type': {
171
- // Default left padding is 6px
172
- paddingLeft: "10px"
173
- },
174
- "& .MuiOutlinedInput-notchedOutline": {
175
- borderColor: "#E7E7E7"
176
- },
177
- "&:hover .MuiOutlinedInput-notchedOutline": {
178
- borderColor: disabled ? "#E7E7E7" : labelColor
179
- },
180
- "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
181
- borderColor: disabled ? "#E7E7E7" : labelColor
182
- }
183
- },
184
- "& .MuiInputLabel-outlined:not(.MuiInputLabel-shrink)": {
185
- // Default transform is "translate(14px, 20px) scale(1)""
186
- // This lines up the label with the initial cursor position in the input
187
- // after changing its padding-left.
188
- transform: "translate(14px, 18px) scale(1);",
189
- fontSize: "14px",
190
- color: disabled ? "#E7E7E7" : currentInputValue && currentInputValue.length > 0 ? "#212121" : "#757575"
191
- },
192
- "& .MuiInputLabel-outlined": {
193
- paddingLeft: "10px",
194
- color: disabled ? "#E7E7E7" : labelColor,
195
- fontSize: "18px"
196
- },
197
- "& .MuiInputLabel-shrink": {
198
- marginLeft: "1px",
199
- paddingLeft: "4px",
200
- paddingRight: "6px",
201
- background: "white"
141
+ '& .MuiInputLabel-shrink': {
142
+ marginLeft: '1px',
143
+ paddingLeft: '4px',
144
+ paddingRight: '6px',
145
+ background: 'white'
202
146
  }
203
147
  };
204
148
  }
@@ -212,34 +156,45 @@ var Dropdown = exports.Dropdown = function Dropdown(_ref) {
212
156
  });
213
157
  };
214
158
  var onChangeHandler = function onChangeHandler(event, newValue) {
215
- setFilterMultiSelectState(newValue);
159
+ setCurrentOption({
160
+ syntheticBaseEvent: event,
161
+ newValue: newValue
162
+ });
163
+ // setDefaultValueSetFlag(true);
216
164
  onChange({
217
165
  syntheticBaseEvent: event,
218
166
  newValue: newValue
219
167
  });
220
168
  };
169
+ var getOptionByLabel = function getOptionByLabel(label) {
170
+ if (!label) return null;
171
+ if (!options) return null;
172
+ var foundOption = options.find(function (item) {
173
+ return item.label === label;
174
+ });
175
+ if (!foundOption) return null;
176
+ return foundOption;
177
+ };
221
178
  var isInputAllowed = function isInputAllowed(inputChar) {
222
179
  var NUMERIC_REGEX = /^[0-9-]+$/;
223
180
  var ALPHA_REGEX = /^[a-zA-Z]+$/;
224
181
  var ALPHA_NUMERIC_REGEX = /^[a-zA-Z0-9-]+$/;
225
182
  switch (allowedInput) {
226
- case "all":
183
+ case 'all':
227
184
  return true;
228
- case "alpha":
185
+ case 'alpha':
229
186
  if (ALPHA_REGEX.test(inputChar)) return true;
230
187
  return false;
231
- case "numeric":
188
+ case 'numeric':
232
189
  if (NUMERIC_REGEX.test(inputChar)) return true;
233
190
  return false;
234
- case "alphaNumeric":
191
+ case 'alphaNumeric':
235
192
  if (ALPHA_NUMERIC_REGEX.test(inputChar)) return true;
236
193
  return false;
237
194
  default:
238
195
  return true;
239
196
  }
240
197
  };
241
-
242
- // --------------------------------------- DROPDOWN SINGLE --------------------------------
243
198
  var getAutocompleteSingle = function getAutocompleteSingle() {
244
199
  return /*#__PURE__*/_react.default.createElement(_styles.ThemeProvider, {
245
200
  theme: theme
@@ -256,9 +211,10 @@ var Dropdown = exports.Dropdown = function Dropdown(_ref) {
256
211
  disableClearable: disableClearable,
257
212
  defaultValue: defaultValue,
258
213
  id: "combo-box",
259
- options: options
260
- // sx={{ width }}
261
- ,
214
+ options: options,
215
+ sx: {
216
+ width: width
217
+ },
262
218
  popupIcon: showPopupIcon ? /*#__PURE__*/_react.default.createElement(_ArrowDropDownIcon.ArrowDropDownIcon, {
263
219
  width: "0.5em",
264
220
  height: "0.5em"
@@ -275,40 +231,45 @@ var Dropdown = exports.Dropdown = function Dropdown(_ref) {
275
231
  label: text,
276
232
  inputRef: inputRef || null,
277
233
  size: size,
278
- sx: getTextFieldStyleSingle(),
234
+ sx: getTextFieldStyle(),
279
235
  placeholder: placeHolder,
280
236
  InputProps: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, params.InputProps), {}, {
281
237
  style: {
282
- fontSize: placeHolderFontSize,
283
- fontFamily: "Poppins"
238
+ fontSize: '14px',
239
+ fontFamily: 'Poppins'
284
240
  },
285
241
  startAdornment: showSearchIcon ? /*#__PURE__*/_react.default.createElement(_InputAdornment.default, {
286
242
  position: "start"
287
243
  }, /*#__PURE__*/_react.default.createElement(_Search.default, {
288
244
  fontSize: "medium"
289
245
  })) : null
290
- })
246
+ }),
247
+ InputLabelProps: {
248
+ style: {
249
+ // color: labelColor,
250
+ // fontSize: "14px",
251
+ fontFamily: 'Poppins'
252
+ }
253
+ }
291
254
  }));
292
255
  },
293
256
  ListboxProps: {
294
257
  style: {
295
- fontSize: dropdownListfontSize,
296
- //default: 14px
297
- fontFamily: "Poppins"
258
+ fontSize: '14px',
259
+ fontFamily: 'Poppins'
298
260
  }
299
261
  }
300
262
  }));
301
263
  };
302
-
303
- // --------------------------------------- DROPDOWN MULTI --------------------------------
304
264
  var getAutocompleteMulti = function getAutocompleteMulti() {
305
265
  return /*#__PURE__*/_react.default.createElement(_styles.ThemeProvider, {
306
266
  theme: theme
307
267
  }, /*#__PURE__*/_react.default.createElement(_Autocomplete.default, {
308
268
  key: reset,
309
- defaultValue: defaultValue
310
- //style={{ width }}
311
- ,
269
+ defaultValue: defaultValue,
270
+ style: {
271
+ width: width
272
+ },
312
273
  onChange: function onChange(event, newValue) {
313
274
  onChangeHandler(event, newValue);
314
275
  },
@@ -319,7 +280,6 @@ var Dropdown = exports.Dropdown = function Dropdown(_ref) {
319
280
  limitTags: limitTagsOnMultiSelect,
320
281
  id: "checkboxes-tags",
321
282
  options: options,
322
- value: filterMultiSelectState,
323
283
  disabled: disabled,
324
284
  disableCloseOnSelect: true,
325
285
  disableClearable: disableClearable,
@@ -335,54 +295,74 @@ var Dropdown = exports.Dropdown = function Dropdown(_ref) {
335
295
  return /*#__PURE__*/_react.default.createElement("li", props, /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
336
296
  icon: icon,
337
297
  checkedIcon: checkedIcon,
338
- checked: isOptionChecked(option) //{selected}
298
+ style: {
299
+ marginRight: 8,
300
+ fontSize: '14px',
301
+ fontFamily: 'Poppins'
302
+ },
303
+ checked: selected
339
304
  }), option.label);
340
305
  },
341
306
  renderInput: function renderInput(params) {
342
- return (
343
- /*#__PURE__*/
344
- //showSearchIcon &&
345
- _react.default.createElement(_TextField.default, Object.assign({}, params, {
346
- label: text,
347
- size: size,
348
- sx: getTextFieldStyleMulti(),
349
- placeholder: placeHolder,
350
- InputProps: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, params.InputProps), {}, {
351
- style: {
352
- fontSize: placeHolderFontSize,
353
- fontFamily: "Poppins"
354
- }
355
- }),
356
- onKeyDown: function onKeyDown(event) {
357
- if (!isInputAllowed(event.key)) {
358
- event.preventDefault();
359
- }
307
+ return showSearchIcon && (!currentOption || currentOption && currentOption.length === 0) ? /*#__PURE__*/_react.default.createElement(_TextField.default, Object.assign({}, params, {
308
+ label: text,
309
+ size: size,
310
+ sx: getTextFieldStyle(),
311
+ placeholder: placeHolder,
312
+ onKeyDown: function onKeyDown(event) {
313
+ if (!isInputAllowed(event.key)) {
314
+ event.preventDefault();
315
+ }
316
+ },
317
+ inputRef: inputRef || null,
318
+ required: required,
319
+ InputProps: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, params.InputProps), {}, {
320
+ style: {
321
+ fontSize: '14px',
322
+ fontFamily: 'Poppins'
360
323
  },
361
- inputRef: inputRef || null,
362
- required: required
363
- }))
364
- );
324
+ startAdornment: /*#__PURE__*/_react.default.createElement(_InputAdornment.default, {
325
+ position: "start"
326
+ }, /*#__PURE__*/_react.default.createElement(_Search.default, {
327
+ fontSize: "medium"
328
+ }))
329
+ }),
330
+ InputLabelProps: {
331
+ style: {
332
+ // color: labelColor,
333
+ fontSize: '16px',
334
+ fontFamily: 'Poppins'
335
+ }
336
+ }
337
+ })) : /*#__PURE__*/_react.default.createElement(_TextField.default, Object.assign({}, params, {
338
+ label: text,
339
+ size: size,
340
+ sx: getTextFieldStyle(),
341
+ placeholder: placeHolder,
342
+ onKeyDown: function onKeyDown(event) {
343
+ if (!isInputAllowed(event.key)) {
344
+ event.preventDefault();
345
+ }
346
+ },
347
+ inputRef: inputRef || null,
348
+ required: required,
349
+ InputLabelProps: {
350
+ style: {
351
+ // color: labelColor,
352
+ fontSize: '16px',
353
+ fontFamily: 'Poppins'
354
+ }
355
+ }
356
+ }));
365
357
  },
366
358
  ListboxProps: {
367
359
  style: {
368
- fontSize: dropdownListfontSize,
369
- //default: 14px
370
- fontFamily: "Poppins"
360
+ fontSize: '14px',
361
+ fontFamily: 'Poppins'
371
362
  }
372
363
  }
373
364
  }));
374
365
  };
375
- var isOptionChecked = function isOptionChecked(option) {
376
- if (filterMultiSelectState && filterMultiSelectState !== null && filterMultiSelectState !== void 0 && filterMultiSelectState.map(function (itemFilter) {
377
- return itemFilter.label;
378
- }).includes(option.label)) {
379
- return true;
380
- } else {
381
- return false;
382
- }
383
- };
384
-
385
- // --------------------------------- MAIN -------------------------------------
386
366
  return /*#__PURE__*/_react.default.createElement(_Dropdown.DropdownContainer, {
387
367
  width: width
388
368
  }, multiSelect ? getAutocompleteMulti() : getAutocompleteSingle());
@@ -15,11 +15,12 @@ var _ExitIcon = require("./icons/ExitIcon");
15
15
  var _FlyIcon = require("./icons/FlyIcon");
16
16
  var _MaintenanceIcon = require("./icons/MaintenanceIcon");
17
17
  var _EyeIcon = require("./icons/EyeIcon");
18
- var _IconButtonStyle = require("./IconButton.style.js");
19
- var _excluded = ["iconName", "width", "height", "disabled", "onClick"];
20
- /*IconButton*/
18
+ var _IconButton = require("./IconButton.style");
19
+ var _excluded = ["buttonText", "iconName", "width", "height", "disabled", "onClick"];
20
+ /* IconButton */
21
21
  var IconButton = exports.IconButton = function IconButton(_ref) {
22
- var iconName = _ref.iconName,
22
+ var buttonText = _ref.buttonText,
23
+ iconName = _ref.iconName,
23
24
  _ref$width = _ref.width,
24
25
  width = _ref$width === void 0 ? 30 : _ref$width,
25
26
  _ref$height = _ref.height,
@@ -34,38 +35,38 @@ var IconButton = exports.IconButton = function IconButton(_ref) {
34
35
  setMouseDownPressed = _useState2[1];
35
36
  var getIcon = function getIcon(iconName, iconHeight, iconWidth) {
36
37
  switch (iconName) {
37
- case "download":
38
+ case 'download':
38
39
  return /*#__PURE__*/_react.default.createElement(_DownloadIcon.DownloadIcon, {
39
40
  height: iconHeight,
40
41
  width: iconWidth
41
42
  });
42
- case "fly":
43
+ case 'fly':
43
44
  return /*#__PURE__*/_react.default.createElement(_FlyIcon.FlyIcon, {
44
45
  height: iconHeight,
45
46
  width: iconWidth
46
47
  });
47
- case "bell":
48
+ case 'bell':
48
49
  return /*#__PURE__*/_react.default.createElement(_BellIcon.BellIcon, {
49
50
  height: iconHeight,
50
51
  width: iconWidth
51
52
  });
52
- case "maintenance":
53
+ case 'maintenance':
53
54
  return /*#__PURE__*/_react.default.createElement(_MaintenanceIcon.MaintenanceIcon, {
54
55
  height: iconHeight,
55
56
  width: iconWidth
56
57
  });
57
- case "exit":
58
+ case 'exit':
58
59
  return /*#__PURE__*/_react.default.createElement(_ExitIcon.ExitIcon, {
59
60
  height: iconHeight,
60
61
  width: iconWidth
61
62
  });
62
- case "eye":
63
+ case 'eye':
63
64
  return /*#__PURE__*/_react.default.createElement(_EyeIcon.EyeIcon, {
64
65
  height: iconHeight,
65
66
  width: iconWidth
66
67
  });
67
68
  default:
68
- return "";
69
+ return '';
69
70
  }
70
71
  };
71
72
  var onMouseDownHandler = function onMouseDownHandler() {
@@ -82,18 +83,18 @@ var IconButton = exports.IconButton = function IconButton(_ref) {
82
83
  setMouseDownPressed(false);
83
84
  };
84
85
  var getClassNameExtention = function getClassNameExtention() {
85
- if (disabled) return "disabled";
86
- if (mouseDownPressed) return "mouseDownPressed";
87
- return "";
86
+ if (disabled) return 'disabled';
87
+ if (mouseDownPressed) return 'mouseDownPressed';
88
+ return '';
88
89
  };
89
90
  var onClickHandler = function onClickHandler(event) {
90
91
  if (disabled) return;
91
92
  onClick(event);
92
93
  };
93
- return /*#__PURE__*/_react.default.createElement(_IconButtonStyle.ControlsContainer, {
94
+ return /*#__PURE__*/_react.default.createElement(_IconButton.ControlsContainer, {
94
95
  height: height,
95
96
  width: width
96
- }, /*#__PURE__*/_react.default.createElement(_IconButtonStyle.ControlsSubContainer, {
97
+ }, /*#__PURE__*/_react.default.createElement(_IconButton.ControlsSubContainer, {
97
98
  className: getClassNameExtention(),
98
99
  height: height,
99
100
  width: width,
@@ -103,6 +104,6 @@ var IconButton = exports.IconButton = function IconButton(_ref) {
103
104
  onClick: function onClick(event) {
104
105
  onClickHandler(event);
105
106
  }
106
- }, /*#__PURE__*/_react.default.createElement(_IconButtonStyle.IconButtonContainer, null, getIcon(iconName, height, width))));
107
+ }, (buttonText !== '' || buttonText !== undefined) && /*#__PURE__*/_react.default.createElement(_IconButton.SpanText, null, buttonText), getIcon(iconName, height, width)));
107
108
  };
108
109
  var _default = exports.default = IconButton;
@@ -4,14 +4,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.IconButtonContainer = exports.ControlsSubContainer = exports.ControlsContainer = void 0;
7
+ exports.SpanText = exports.ControlsSubContainer = exports.ControlsContainer = 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, _templateObject3;
11
- var ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n \n display: flex;\n //border: 1px solid green;\n border-radius: 100px;\n width: ", ";\n height: ", ";\n\n"])), function (props) {
12
- return props.width.toString().concat("", "px");
11
+ var ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n border-radius: 100px;\n width: ", ";\n height: ", ";\n"])), function (props) {
12
+ return props.width.toString().concat('', 'px');
13
13
  }, function (props) {
14
- return props.height.toString().concat("", "px");
14
+ return props.height.toString().concat('', 'px');
15
15
  });
16
- var ControlsSubContainer = exports.ControlsSubContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 2px 0 2px; \n border-radius: 100px;\n //border: 1px solid blue;\n &:hover {\n cursor: pointer;\n background-color: #e7f0ff;\n }\n &.disabled {\n background-color: #ccc;\n }\n &.mouseDownPressed {\n margin: 1px 0 1px; \n box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);\n }\n"])));
17
- var IconButtonContainer = exports.IconButtonContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n align-items: stretch;\n width: 95%;\n height: 95%;\n //border: 1px solid red;\n border-radius: 100px;\n"])));
16
+ var ControlsSubContainer = exports.ControlsSubContainer = _styledComponents.default.button(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 2px 0 2px; \n border: none;\n background: transparent;\n &:hover {\n cursor: pointer;\n background-color: #e7f0ff;\n }\n &.disabled {\n background-color: #ccc;\n }\n &.mouseDownPressed {\n margin: 1px 0 1px; \n box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);\n }\n"])));
17
+ var SpanText = exports.SpanText = _styledComponents.default.span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n"])));
@@ -34,6 +34,7 @@ var ReportTable = exports.ReportTable = function ReportTable(props) {
34
34
  color: "#1B30AA"
35
35
  }), /*#__PURE__*/_react.default.createElement(_ReportTable.InfoText, null, "Download table to get the full data")));
36
36
  };
37
+ var _default = exports.default = ReportTable;
37
38
  ReportTable.defaultProps = {
38
39
  tableData: {
39
40
  columnsHeadings: [{
@@ -72,5 +73,4 @@ ReportTable.defaultProps = {
72
73
  }]
73
74
  },
74
75
  maxColumnsNumber: 3
75
- };
76
- var _default = exports.default = ReportTable;
76
+ };
@@ -15,8 +15,8 @@ var ControlsContainer = exports.ControlsContainer = _styledComponents.default.di
15
15
  }, function (props) {
16
16
  return props.height;
17
17
  });
18
- var Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: column;\n justify-content: space-between;\n background: #ffffff;\n border-radius: 12px;\n"])));
19
- var AreaChartContainer = exports.AreaChartContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n"])));
18
+ var Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background: #ffffff;\n border-radius: 12px;\n flex-basis: 100%;\n"])));
19
+ var AreaChartContainer = exports.AreaChartContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 50%;\n"])));
20
20
  var TooltipDiv = exports.TooltipDiv = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 5px;\n background: #ffffff;\n border-radius: 5px;\n padding: 8px 12px;\n display: grid;\n"])));
21
21
  var TooltipLabel = exports.TooltipLabel = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-size: 14px;\n font-weight: 400;\n line-height: normal;\n width: fit-content;\n"])));
22
22
  var TooltipTitle = exports.TooltipTitle = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-size: 14px;\n font-weight: 600;\n line-height: normal;\n"])));
@@ -7,11 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = exports.BellIcon = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var BellIcon = exports.BellIcon = function BellIcon(_ref) {
10
- var clicked = _ref.clicked,
11
- _ref$width = _ref.width,
12
- width = _ref$width === void 0 ? "8" : _ref$width,
10
+ var _ref$width = _ref.width,
11
+ width = _ref$width === void 0 ? '8' : _ref$width,
13
12
  _ref$height = _ref.height,
14
- height = _ref$height === void 0 ? "9" : _ref$height;
13
+ height = _ref$height === void 0 ? '9' : _ref$height;
15
14
  return /*#__PURE__*/_react.default.createElement("svg", {
16
15
  width: width,
17
16
  height: height,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.375",
3
+ "version": "1.0.377",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {