sag_components 2.0.0-beta144 → 2.0.0-beta145

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -23,6 +23,7 @@ const ButtonContainer$3 = styled.div`
23
23
  align-content: center;
24
24
  width: ${props => props.width};
25
25
  height: ${props => props.height};
26
+ min-width: ${props => props.minWidth};
26
27
  `;
27
28
  const ButtonItem = styled.div`
28
29
  display: flex;
@@ -62,7 +63,7 @@ const Label$b = styled.label`
62
63
  pointer-events: none;
63
64
  user-select: none;
64
65
  `;
65
- const IconWrapper$6 = styled.div`
66
+ const IconWrapper$5 = styled.div`
66
67
  display: flex;
67
68
  align-items: center;
68
69
  justify-content: center;
@@ -488,6 +489,7 @@ const Button$1 = props => {
488
489
  size = "small",
489
490
  height = "",
490
491
  width = "",
492
+ minWidth = "unset",
491
493
  disabled = false,
492
494
  textColor = "",
493
495
  backgroundColor = "",
@@ -536,7 +538,7 @@ const Button$1 = props => {
536
538
  color: disabled ? disabledTextColor || "#B1B1B1" : hover ? hoverTextColor || (type === "secondary" ? "#229E38" : "#ffffff") : textColor || (type === "secondary" ? "#212121" : "#ffffff"),
537
539
  fill: disabled ? disabledTextColor || "#B1B1B1" : hover ? hoverTextColor || (type === "secondary" ? "#229E38" : "#ffffff") : textColor || (type === "secondary" ? "#212121" : "#ffffff")
538
540
  };
539
- return /*#__PURE__*/React$1.createElement(IconWrapper$6, null, /*#__PURE__*/React$1.createElement(IconComponent, iconProps));
541
+ return /*#__PURE__*/React$1.createElement(IconWrapper$5, null, /*#__PURE__*/React$1.createElement(IconComponent, iconProps));
540
542
  };
541
543
  const commonProps = {
542
544
  width: width || null,
@@ -557,7 +559,8 @@ const Button$1 = props => {
557
559
  return /*#__PURE__*/React$1.createElement(ButtonContainer$3, {
558
560
  className: "ButtonContainer",
559
561
  width: commonProps.width,
560
- height: commonProps.height
562
+ height: commonProps.height,
563
+ minWidth: minWidth
561
564
  }, isSubmitButton ? /*#__PURE__*/React$1.createElement(InputCommit, _extends$1({
562
565
  className: clicked ? "InputCommit-clicked" : "InputCommit",
563
566
  value: text,
@@ -3014,7 +3017,7 @@ const Label$a = styled.label`
3014
3017
  user-select: none;
3015
3018
  pointer-events: none;
3016
3019
  `;
3017
- const IconWrapper$5 = styled.div`
3020
+ const IconWrapper$4 = styled.div`
3018
3021
  display: flex;
3019
3022
  align-items: center;
3020
3023
  justify-content: center;
@@ -3138,7 +3141,7 @@ const LinkButton = _ref => {
3138
3141
  const color = disabled ? '#B1B1B1' : newTextColor;
3139
3142
  switch (icon.toLowerCase()) {
3140
3143
  case 'filter':
3141
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3144
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3142
3145
  className: "FilterIcon"
3143
3146
  }, /*#__PURE__*/React$1.createElement(FilterIcon$1, {
3144
3147
  height: iconHeight,
@@ -3146,7 +3149,7 @@ const LinkButton = _ref => {
3146
3149
  color: color
3147
3150
  }));
3148
3151
  case 'plus':
3149
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3152
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3150
3153
  className: "PlusIcon"
3151
3154
  }, /*#__PURE__*/React$1.createElement(PlusIcon, {
3152
3155
  height: "16",
@@ -3154,7 +3157,7 @@ const LinkButton = _ref => {
3154
3157
  color: color
3155
3158
  }));
3156
3159
  case 'options':
3157
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3160
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3158
3161
  className: "OptionsIcon"
3159
3162
  }, /*#__PURE__*/React$1.createElement(OptionsIcon, {
3160
3163
  height: iconHeight,
@@ -3162,7 +3165,7 @@ const LinkButton = _ref => {
3162
3165
  color: color
3163
3166
  }));
3164
3167
  case 'download':
3165
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3168
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3166
3169
  className: "DownloadIcon"
3167
3170
  }, /*#__PURE__*/React$1.createElement(DownloadIcon, {
3168
3171
  height: iconHeight,
@@ -3170,7 +3173,7 @@ const LinkButton = _ref => {
3170
3173
  color: color
3171
3174
  }));
3172
3175
  case 'document':
3173
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3176
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3174
3177
  className: "DocumentIcon"
3175
3178
  }, /*#__PURE__*/React$1.createElement(DocumentIcon, {
3176
3179
  height: iconHeight,
@@ -3178,7 +3181,7 @@ const LinkButton = _ref => {
3178
3181
  color: color
3179
3182
  }));
3180
3183
  case 'fly':
3181
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3184
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3182
3185
  className: "FlyIcon"
3183
3186
  }, /*#__PURE__*/React$1.createElement(FlyIcon, {
3184
3187
  height: iconHeight,
@@ -3186,7 +3189,7 @@ const LinkButton = _ref => {
3186
3189
  color: color
3187
3190
  }));
3188
3191
  case 'bell':
3189
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3192
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3190
3193
  className: "BellIcon"
3191
3194
  }, /*#__PURE__*/React$1.createElement(BellIcon, {
3192
3195
  height: iconHeight,
@@ -3194,7 +3197,7 @@ const LinkButton = _ref => {
3194
3197
  color: color
3195
3198
  }));
3196
3199
  case 'maintenance':
3197
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3200
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3198
3201
  className: "MaintenanceIcon"
3199
3202
  }, /*#__PURE__*/React$1.createElement(MaintenanceIcon, {
3200
3203
  height: iconHeight,
@@ -3202,7 +3205,7 @@ const LinkButton = _ref => {
3202
3205
  color: color
3203
3206
  }));
3204
3207
  case 'exit':
3205
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3208
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3206
3209
  className: "ExitIcon"
3207
3210
  }, /*#__PURE__*/React$1.createElement(ExitIcon, {
3208
3211
  height: iconHeight,
@@ -3210,7 +3213,7 @@ const LinkButton = _ref => {
3210
3213
  color: color
3211
3214
  }));
3212
3215
  case 'eye':
3213
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3216
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3214
3217
  className: "EyeIcon"
3215
3218
  }, /*#__PURE__*/React$1.createElement(EyeIcon, {
3216
3219
  height: iconHeight,
@@ -3218,7 +3221,7 @@ const LinkButton = _ref => {
3218
3221
  color: color
3219
3222
  }));
3220
3223
  case 'arrowdown':
3221
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3224
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3222
3225
  className: "ArrowDownIcon"
3223
3226
  }, /*#__PURE__*/React$1.createElement(MenuItemOpenIcon, {
3224
3227
  height: iconHeight,
@@ -3226,7 +3229,7 @@ const LinkButton = _ref => {
3226
3229
  color: color
3227
3230
  }));
3228
3231
  case 'arrowright':
3229
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3232
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3230
3233
  className: "ArrowRightIcon"
3231
3234
  }, /*#__PURE__*/React$1.createElement(MenuItemRightIcon, {
3232
3235
  height: iconHeight,
@@ -3234,7 +3237,7 @@ const LinkButton = _ref => {
3234
3237
  color: color
3235
3238
  }));
3236
3239
  case 'select':
3237
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3240
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3238
3241
  className: "SelectRightIcon"
3239
3242
  }, /*#__PURE__*/React$1.createElement(ArrowSelectIcon, {
3240
3243
  height: "16px",
@@ -3242,7 +3245,7 @@ const LinkButton = _ref => {
3242
3245
  color: color
3243
3246
  }));
3244
3247
  case 'info':
3245
- return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3248
+ return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3246
3249
  className: "InfoIcon"
3247
3250
  }, /*#__PURE__*/React$1.createElement(InfoIcon, {
3248
3251
  height: iconHeight,
@@ -3532,7 +3535,7 @@ const TextFieldContainer = styled.div`
3532
3535
  position: relative;
3533
3536
  width: ${props => props.width};
3534
3537
  `;
3535
- const IconWrapper$4 = styled.div`
3538
+ const IconWrapper$3 = styled.div`
3536
3539
  position: absolute;
3537
3540
  top: 50%;
3538
3541
  transform: translateY(-50%);
@@ -3576,7 +3579,7 @@ const SearchInput = props => {
3576
3579
  return /*#__PURE__*/React$1.createElement(TextFieldContainer, {
3577
3580
  className: className,
3578
3581
  width: width
3579
- }, /*#__PURE__*/React$1.createElement(IconWrapper$4, {
3582
+ }, /*#__PURE__*/React$1.createElement(IconWrapper$3, {
3580
3583
  position: position
3581
3584
  }, /*#__PURE__*/React$1.createElement(SearchIcon, {
3582
3585
  color: iconColor
@@ -10317,23 +10320,24 @@ const QuarterPopupPicker = ({
10317
10320
  };
10318
10321
 
10319
10322
  /* eslint-disable import/no-extraneous-dependencies */
10320
- const QuarterPicker = ({
10321
- availableQuarters,
10322
- // ["Q1-2024"]
10323
- label,
10324
- onChange,
10325
- borderRadius,
10326
- required,
10327
- width,
10328
- height,
10329
- placeholder,
10330
- disabled,
10331
- borderColor,
10332
- borderColorFocus,
10333
- textColor,
10334
- selectedValue,
10335
- startYear
10336
- }) => {
10323
+ const QuarterPicker = _ref => {
10324
+ let {
10325
+ availableQuarters,
10326
+ // ["Q1-2024"]
10327
+ label,
10328
+ onChange,
10329
+ borderRadius,
10330
+ required,
10331
+ width,
10332
+ height,
10333
+ placeholder,
10334
+ disabled,
10335
+ borderColor,
10336
+ borderColorFocus,
10337
+ textColor,
10338
+ selectedValue,
10339
+ startYear
10340
+ } = _ref;
10337
10341
  const [isFocused, setIsFocused] = useState(false);
10338
10342
  const [isOpen, setIsOpen] = useState(false);
10339
10343
  const [value, setValue] = useState('');
@@ -10775,22 +10779,23 @@ const MonthPopupPicker = ({
10775
10779
  };
10776
10780
 
10777
10781
  /* eslint-disable import/no-extraneous-dependencies */
10778
- const MonthPicker = ({
10779
- availableMonths,
10780
- label,
10781
- onChange,
10782
- borderRadius,
10783
- required,
10784
- width,
10785
- height,
10786
- placeholder,
10787
- disabled,
10788
- borderColor,
10789
- borderColorFocus,
10790
- textColor,
10791
- selectedValue,
10792
- startYear
10793
- }) => {
10782
+ const MonthPicker = _ref => {
10783
+ let {
10784
+ availableMonths,
10785
+ label,
10786
+ onChange,
10787
+ borderRadius,
10788
+ required,
10789
+ width,
10790
+ height,
10791
+ placeholder,
10792
+ disabled,
10793
+ borderColor,
10794
+ borderColorFocus,
10795
+ textColor,
10796
+ selectedValue,
10797
+ startYear
10798
+ } = _ref;
10794
10799
  const [isFocused, setIsFocused] = useState(false);
10795
10800
  const [isOpen, setIsOpen] = useState(false);
10796
10801
  const [value, setValue] = useState('');
@@ -13074,11 +13079,11 @@ const ModalHeader$2 = styled.div`
13074
13079
  justify-content: space-between;
13075
13080
  margin-bottom: 32px;
13076
13081
  `;
13077
- const ModalBody$2 = styled.div`
13082
+ const ModalBody$1 = styled.div`
13078
13083
  ${scrollableStyles$a}
13079
13084
  max-height: 80vh;
13080
13085
  `;
13081
- const ModalTitle$3 = styled.h5`
13086
+ const ModalTitle$2 = styled.h5`
13082
13087
  font-family: 'Poppins', sans-serif;
13083
13088
  font-size: 32px;
13084
13089
  font-weight: 500;
@@ -13110,12 +13115,12 @@ const DialogOverlay$1 = props => {
13110
13115
  };
13111
13116
  return /*#__PURE__*/React.createElement(ModalWrapper$1, {
13112
13117
  className: className
13113
- }, /*#__PURE__*/React.createElement(Modal$1, null, /*#__PURE__*/React.createElement(ModalHeader$2, null, /*#__PURE__*/React.createElement(ModalTitle$3, null, title), /*#__PURE__*/React.createElement(ModalClose, {
13118
+ }, /*#__PURE__*/React.createElement(Modal$1, null, /*#__PURE__*/React.createElement(ModalHeader$2, null, /*#__PURE__*/React.createElement(ModalTitle$2, null, title), /*#__PURE__*/React.createElement(ModalClose, {
13114
13119
  type: "button",
13115
13120
  onClick: closeModal
13116
13121
  }, /*#__PURE__*/React.createElement(CloseXIcon, {
13117
13122
  fill: "white"
13118
- }))), /*#__PURE__*/React.createElement(ModalBody$2, {
13123
+ }))), /*#__PURE__*/React.createElement(ModalBody$1, {
13119
13124
  id: "modalBody"
13120
13125
  }, children)));
13121
13126
  };
@@ -23901,21 +23906,22 @@ const DeleteIcon = styled.div`
23901
23906
  position: absolute;
23902
23907
  `;
23903
23908
 
23904
- const QuickFilterDropdownSingle = ({
23905
- label,
23906
- hoverColor,
23907
- options,
23908
- selectedValue,
23909
- placeHolder,
23910
- onChange,
23911
- disabled,
23912
- width,
23913
- error,
23914
- errorMessage,
23915
- xIconShow,
23916
- labelColor,
23917
- showLabelOnTop
23918
- }) => {
23909
+ const QuickFilterDropdownSingle = _ref => {
23910
+ let {
23911
+ label,
23912
+ hoverColor,
23913
+ options,
23914
+ selectedValue,
23915
+ placeHolder,
23916
+ onChange,
23917
+ disabled,
23918
+ width,
23919
+ error,
23920
+ errorMessage,
23921
+ xIconShow,
23922
+ labelColor,
23923
+ showLabelOnTop
23924
+ } = _ref;
23919
23925
  const [isFocused, setIsFocused] = useState(false);
23920
23926
  const [showOptions, setShowOptions] = useState(false);
23921
23927
  const [inputValue, setInputValue] = useState("");
@@ -24312,23 +24318,24 @@ const IconContainer$2 = styled.div`
24312
24318
  cursor: pointer;
24313
24319
  `;
24314
24320
 
24315
- const QuickFilterDropdownMultiSelection = ({
24316
- label,
24317
- labelEmptyValue,
24318
- options,
24319
- selectedValue,
24320
- placeHolder,
24321
- onChange,
24322
- required,
24323
- disabled,
24324
- width,
24325
- error,
24326
- errorMessage,
24327
- labelColor,
24328
- xIconShow,
24329
- checkBoxColor,
24330
- showLabelOnTop
24331
- }) => {
24321
+ const QuickFilterDropdownMultiSelection = _ref => {
24322
+ let {
24323
+ label,
24324
+ labelEmptyValue,
24325
+ options,
24326
+ selectedValue,
24327
+ placeHolder,
24328
+ onChange,
24329
+ required,
24330
+ disabled,
24331
+ width,
24332
+ error,
24333
+ errorMessage,
24334
+ labelColor,
24335
+ xIconShow,
24336
+ checkBoxColor,
24337
+ showLabelOnTop
24338
+ } = _ref;
24332
24339
  const [isFocused, setIsFocused] = useState(false);
24333
24340
  const [showOptions, setShowOptions] = useState(false);
24334
24341
  const [inputValue, setInputValue] = useState('');
@@ -27205,7 +27212,7 @@ const scrollableStyles$6 = `
27205
27212
  }
27206
27213
  `;
27207
27214
  const MainContainer$1 = styled.div``;
27208
- const ModalOverlay$2 = styled.div`
27215
+ const ModalOverlay$1 = styled.div`
27209
27216
  position: fixed;
27210
27217
  z-index: 100;
27211
27218
  top: 0;
@@ -27447,7 +27454,7 @@ const PopupCharts = props => {
27447
27454
  }, displayChart(item)));
27448
27455
  return /*#__PURE__*/React$1.createElement(MainContainer$1, {
27449
27456
  id: "MainContainer"
27450
- }, IsPopupChartsOpen && /*#__PURE__*/React$1.createElement(ModalOverlay$2, {
27457
+ }, IsPopupChartsOpen && /*#__PURE__*/React$1.createElement(ModalOverlay$1, {
27451
27458
  id: "ModalOverlay",
27452
27459
  className: "modal-overlay"
27453
27460
  }, /*#__PURE__*/React$1.createElement(ModalContent$2, {
@@ -33829,7 +33836,7 @@ const Header$3 = styled.div`
33829
33836
  align-items: flex-start;
33830
33837
  }
33831
33838
  `;
33832
- const CloseButton$2 = styled.button`
33839
+ const CloseButton$1 = styled.button`
33833
33840
  position: absolute;
33834
33841
  top: -10px;
33835
33842
  right: 0px;
@@ -34030,7 +34037,7 @@ const InsightsCarousel = _ref => {
34030
34037
  $titleColor: titleColor
34031
34038
  }, /*#__PURE__*/React$1.cloneElement(icon, {
34032
34039
  fill: iconColor
34033
- }), title), /*#__PURE__*/React$1.createElement(CloseButton$2, {
34040
+ }), title), /*#__PURE__*/React$1.createElement(CloseButton$1, {
34034
34041
  onClick: () => onClose?.({
34035
34042
  label: "closeCarousel"
34036
34043
  }),
@@ -34355,12 +34362,12 @@ const ModalButtons = styled.div`
34355
34362
  display: flex;
34356
34363
  gap: 10px;
34357
34364
  `;
34358
- const ModalTitle$2 = styled.h3`
34365
+ const ModalTitle$1 = styled.h3`
34359
34366
  margin: 0;
34360
34367
  font-size: 24px;
34361
34368
  font-weight: 500;
34362
34369
  `;
34363
- const ModalBody$1 = styled.div`
34370
+ const ModalBody = styled.div`
34364
34371
  width: 100%;
34365
34372
  height: 100%;
34366
34373
  `;
@@ -34413,7 +34420,7 @@ const ModalWithOverlay = props => {
34413
34420
  }
34414
34421
  }, /*#__PURE__*/React$1.createElement(ModalHeader$1, {
34415
34422
  className: "modal-header"
34416
- }, /*#__PURE__*/React$1.createElement(ModalTitle$2, null, title), /*#__PURE__*/React$1.createElement(ModalButtons, {
34423
+ }, /*#__PURE__*/React$1.createElement(ModalTitle$1, null, title), /*#__PURE__*/React$1.createElement(ModalButtons, {
34417
34424
  className: "modal-buttons"
34418
34425
  }, showCancelButton && /*#__PURE__*/React$1.createElement(Button$1, {
34419
34426
  size: "medium",
@@ -34460,7 +34467,7 @@ const ModalWithOverlay = props => {
34460
34467
  backgroundColor: okButtonColor,
34461
34468
  hoverBorderColor: okButtonHoverBackgroundColor,
34462
34469
  hoverBackgroundColor: okButtonHoverBackgroundColor
34463
- })))), /*#__PURE__*/React$1.createElement(ModalBody$1, {
34470
+ })))), /*#__PURE__*/React$1.createElement(ModalBody, {
34464
34471
  className: "modal-body"
34465
34472
  }, children)));
34466
34473
  };
@@ -35035,7 +35042,7 @@ function FaEyeSlash (props) {
35035
35042
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 640 512"},"child":[{"tag":"path","attr":{"d":"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},"child":[]}]})(props);
35036
35043
  }
35037
35044
 
35038
- const IconWrapper$3 = styled.div`
35045
+ const IconWrapper$2 = styled.div`
35039
35046
  display: flex;
35040
35047
  align-items: center;
35041
35048
  justify-content: center;
@@ -35051,7 +35058,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
35051
35058
  const newColor = disabled ? '#D0D0D0' : color || '#212121';
35052
35059
  switch (icon.toLowerCase()) {
35053
35060
  case 'filter':
35054
- return /*#__PURE__*/React$1.createElement(IconWrapper$3, {
35061
+ return /*#__PURE__*/React$1.createElement(IconWrapper$2, {
35055
35062
  className: "FilterIcon",
35056
35063
  pointer: pointer,
35057
35064
  disabled: disabled,
@@ -35063,7 +35070,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
35063
35070
  onClick: callBackOnClick
35064
35071
  }));
35065
35072
  case 'options':
35066
- return /*#__PURE__*/React$1.createElement(IconWrapper$3, {
35073
+ return /*#__PURE__*/React$1.createElement(IconWrapper$2, {
35067
35074
  className: "OptionsIcon",
35068
35075
  pointer: pointer,
35069
35076
  disabled: disabled,
@@ -35075,7 +35082,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
35075
35082
  onClick: callBackOnClick
35076
35083
  }));
35077
35084
  case 'download':
35078
- return /*#__PURE__*/React$1.createElement(IconWrapper$3, {
35085
+ return /*#__PURE__*/React$1.createElement(IconWrapper$2, {
35079
35086
  className: "DownloadIcon",
35080
35087
  pointer: pointer,
35081
35088
  disabled: disabled,
@@ -35087,7 +35094,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
35087
35094
  onClick: callBackOnClick
35088
35095
  }));
35089
35096
  case 'document':
35090
- return /*#__PURE__*/React$1.createElement(IconWrapper$3, {
35097
+ return /*#__PURE__*/React$1.createElement(IconWrapper$2, {
35091
35098
  className: "DocumentIcon",
35092
35099
  pointer: pointer,
35093
35100
  disabled: disabled,
@@ -35099,7 +35106,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
35099
35106
  onClick: callBackOnClick
35100
35107
  }));
35101
35108
  case 'fly':
35102
- return /*#__PURE__*/React$1.createElement(IconWrapper$3, {
35109
+ return /*#__PURE__*/React$1.createElement(IconWrapper$2, {
35103
35110
  className: "FlyIcon",
35104
35111
  pointer: pointer,
35105
35112
  disabled: disabled,
@@ -35111,7 +35118,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
35111
35118
  onClick: callBackOnClick
35112
35119
  }));
35113
35120
  case 'bell':
35114
- return /*#__PURE__*/React$1.createElement(IconWrapper$3, {
35121
+ return /*#__PURE__*/React$1.createElement(IconWrapper$2, {
35115
35122
  className: "BellIcon",
35116
35123
  pointer: pointer,
35117
35124
  disabled: disabled,
@@ -35123,7 +35130,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
35123
35130
  onClick: callBackOnClick
35124
35131
  }));
35125
35132
  case 'maintenance':
35126
- return /*#__PURE__*/React$1.createElement(IconWrapper$3, {
35133
+ return /*#__PURE__*/React$1.createElement(IconWrapper$2, {
35127
35134
  className: "MaintenanceIcon",
35128
35135
  pointer: pointer,
35129
35136
  disabled: disabled,
@@ -35135,7 +35142,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
35135
35142
  onClick: callBackOnClick
35136
35143
  }));
35137
35144
  case 'exit':
35138
- return /*#__PURE__*/React$1.createElement(IconWrapper$3, {
35145
+ return /*#__PURE__*/React$1.createElement(IconWrapper$2, {
35139
35146
  className: "ExitIcon",
35140
35147
  pointer: pointer,
35141
35148
  disabled: disabled,
@@ -35147,7 +35154,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
35147
35154
  onClick: callBackOnClick
35148
35155
  }));
35149
35156
  case 'eye':
35150
- return /*#__PURE__*/React$1.createElement(IconWrapper$3, {
35157
+ return /*#__PURE__*/React$1.createElement(IconWrapper$2, {
35151
35158
  className: "EyeIcon",
35152
35159
  pointer: pointer,
35153
35160
  disabled: disabled,
@@ -35159,7 +35166,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
35159
35166
  onClick: callBackOnClick
35160
35167
  }));
35161
35168
  case 'search':
35162
- return /*#__PURE__*/React$1.createElement(IconWrapper$3, {
35169
+ return /*#__PURE__*/React$1.createElement(IconWrapper$2, {
35163
35170
  className: "SearchIcon",
35164
35171
  pointer: pointer,
35165
35172
  disabled: disabled,
@@ -35284,7 +35291,7 @@ const ErrorMessage = styled.div`
35284
35291
  margin-top: 5px;
35285
35292
  max-width: ${props => props.width || '300px'};
35286
35293
  `;
35287
- const IconWrapper$2 = styled.div`
35294
+ const IconWrapper$1 = styled.div`
35288
35295
  display: flex;
35289
35296
  align-items: center;
35290
35297
  justify-content: center;
@@ -35379,7 +35386,7 @@ const Input$2 = _ref => {
35379
35386
  const getPasswordIcon = () => {
35380
35387
  if (!password) return '';
35381
35388
  if (showPassword) {
35382
- return /*#__PURE__*/React$1.createElement(IconWrapper$2, {
35389
+ return /*#__PURE__*/React$1.createElement(IconWrapper$1, {
35383
35390
  className: "passwordEyeSlash",
35384
35391
  disabled: disabled,
35385
35392
  onClick: toggleShowPassword
@@ -35560,9 +35567,9 @@ const ToggleSlider = styled.span`
35560
35567
  }
35561
35568
  `;
35562
35569
 
35563
- /**
35564
- * ToggleSwitch component for on/off states.
35565
- * Supports small/large sizes and disabled state.
35570
+ /**
35571
+ * ToggleSwitch component for on/off states.
35572
+ * Supports small/large sizes and disabled state.
35566
35573
  */
35567
35574
  function ToggleSwitch(_ref) {
35568
35575
  let {
@@ -35596,7 +35603,7 @@ ToggleSwitch.propTypes = {
35596
35603
  const TableWrapper$1 = styled.div`
35597
35604
  width: ${props => props.width};
35598
35605
  height: ${props => props.height};
35599
- padding: 20px;
35606
+ padding: ${props => props.padding};
35600
35607
  background-color: #fff;
35601
35608
  box-sizing: border-box;
35602
35609
  position: relative;
@@ -35631,6 +35638,7 @@ const ContainerTable = props => {
35631
35638
  columnsWidths = [430, 105, 210, 175, 148, 185, 104, 104, 140, 50, 50],
35632
35639
  standardCellSkeletonHeight = 22,
35633
35640
  isLoading = true,
35641
+ padding = '20px',
35634
35642
  children
35635
35643
  } = props;
35636
35644
  const TableWrapperRef = useRef(null);
@@ -35663,7 +35671,8 @@ const ContainerTable = props => {
35663
35671
  return /*#__PURE__*/React$1.createElement(TableWrapper$1, {
35664
35672
  ref: TableWrapperRef,
35665
35673
  width: width,
35666
- height: height
35674
+ height: height,
35675
+ padding: padding
35667
35676
  }, isLoading ? /*#__PURE__*/React$1.createElement(SkeletonTheme, {
35668
35677
  baseColor: "#EAEAEA",
35669
35678
  highlightColor: "#F5F5F5"
@@ -36278,7 +36287,7 @@ const scrollableStyles$1 = `
36278
36287
  const TableWrapper = styled.div`
36279
36288
  width: ${props => props.width};
36280
36289
  height: ${props => props.height};
36281
- background-color: #fff;
36290
+ background-color: ${props => props.backgroundColor};
36282
36291
  box-sizing: border-box;
36283
36292
  font-family: 'Poppins', sans-serif;
36284
36293
  `;
@@ -38303,84 +38312,20 @@ const DisabledTrashIconWrapper = styled.div`
38303
38312
  color: #d9d9d9;
38304
38313
  }
38305
38314
  `;
38306
-
38307
- // CommentModal.styles.js
38308
- const ModalOverlay$1 = styled.div`
38309
- position: fixed;
38310
- top: 0;
38311
- left: 0;
38312
- right: 0;
38313
- bottom: 0;
38314
- background-color: rgba(0, 0, 0, 0.5);
38315
- display: flex;
38316
- align-items: center;
38317
- justify-content: center;
38318
- z-index: 1000;
38319
- `;
38320
- const ModalContent = styled.div`
38321
- background: white;
38322
- border-radius: 12px;
38323
- width: 90%;
38324
- max-width: 500px;
38325
- max-height: 400px;
38326
- display: flex;
38327
- flex-direction: column;
38328
- box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
38329
- animation: slideUp 0.3s ease-out;
38330
-
38331
- @keyframes slideUp {
38332
- from {
38333
- opacity: 0;
38334
- transform: translateY(20px) scale(0.95);
38335
- }
38336
- to {
38337
- opacity: 1;
38338
- transform: translateY(0) scale(1);
38339
- }
38340
- }
38341
- `;
38342
- const ModalHeader = styled.div`
38343
- display: flex;
38344
- justify-content: space-between;
38345
- align-items: center;
38346
- padding: 12px 24px;
38347
- border-bottom: 1px solid #D9D9D9;
38348
- flex-shrink: 0;
38349
- `;
38350
- const ModalTitle$1 = styled.h5`
38351
- font-family: "Poppins", sans-serif;
38352
- font-size: 18px;
38353
- font-weight: 600;
38354
- color: #212121;
38355
- margin: 0;
38356
- `;
38357
- const CloseButton$1 = styled.button`
38358
- background: none;
38359
- border: none;
38360
- padding: 8px;
38361
- cursor: pointer;
38362
- color: #6b7280;
38363
- border-radius: 6px;
38364
- transition: all 0.2s ease;
38365
- display: flex;
38366
- align-items: center;
38367
- justify-content: center;
38368
-
38369
- &:hover {
38370
- background-color: #f3f4f6;
38371
- color: #374151;
38372
- }
38373
-
38374
- &:active {
38375
- transform: scale(0.95);
38376
- }
38315
+ const StatusCell = styled.div`
38316
+ font-size: 12px;
38317
+ font-weight: 500;
38318
+ display: flex;
38319
+ align-items: center;
38320
+ gap: 6px;
38321
+ color: ${props => props.color || "#000"};
38377
38322
  `;
38378
- const ModalBody = styled.div`
38379
- padding: 20px 24px 24px;
38380
- flex: 1;
38381
- display: flex;
38382
- flex-direction: column;
38383
- overflow: hidden;
38323
+ const StatusCellCircle = styled.div`
38324
+ width: 8px;
38325
+ height: 8px;
38326
+ border-radius: 50%;
38327
+ border: 1px solid white;
38328
+ background-color: ${props => props.backgroundColor};
38384
38329
  `;
38385
38330
  const TextareaWrapper = styled.div`
38386
38331
  position: relative;
@@ -38465,121 +38410,141 @@ const CharacterCount = styled.div`
38465
38410
  text-align: right;
38466
38411
  transition: color 0.2s ease;
38467
38412
  `;
38468
- const ModalBottom = styled.div`
38469
- padding: 16px 24px;
38470
- border-top: 1px solid #D9D9D9;
38413
+
38414
+ // MessageBox.styles.js
38415
+ const ModalOverlay = styled.div`
38416
+ position: fixed;
38417
+ top: 0;
38418
+ left: 0;
38419
+ width: 100%;
38420
+ height: 100%;
38421
+ background-color: rgba(0, 0, 0, 0.5);
38422
+ display: flex;
38423
+ justify-content: center;
38424
+ align-items: center;
38425
+ z-index: 1000;
38426
+ font-family: 'Poppins', sans-serif;
38427
+ `;
38428
+ const ModalContainer = styled.div`
38429
+ background-color: white;
38430
+ border-radius: 12px;
38431
+ width: ${props => props.$width || '400px'};
38432
+ height: ${props => props.$height || 'auto'};
38433
+ position: relative;
38434
+ font-family: 'Poppins', sans-serif;
38435
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
38436
+ `;
38437
+ const CloseButton = styled.button`
38438
+ background: none;
38439
+ border: none;
38440
+ padding: 8px;
38441
+ cursor: pointer;
38442
+ color: #6b7280;
38443
+ border-radius: 6px;
38444
+ transition: all 0.2s ease;
38471
38445
  display: flex;
38472
- gap: 16px;
38473
- justify-content: flex-end;
38474
38446
  align-items: center;
38475
- `;
38447
+ justify-content: center;
38476
38448
 
38477
- const CommentModal = props => {
38478
- const {
38479
- isOpen,
38480
- onClose,
38481
- onSave,
38482
- maxLength = 150,
38483
- color = "#066768",
38484
- saveButtonHoverColor = "#388586",
38485
- initialValue = ''
38486
- } = props;
38487
- const [commentText, setCommentText] = useState('');
38488
- const [isFocused, setIsFocused] = useState(false);
38489
- const [hasUserInteracted, setHasUserInteracted] = useState(false); // Track if user has started typing
38490
- const [hasInitialValue, setHasInitialValue] = useState(false); // Track if there was initial text
38449
+ &:hover {
38450
+ background-color: #f3f4f6;
38451
+ color: #374151;
38452
+ }
38491
38453
 
38492
- // Update comment text when modal opens with initial value
38493
- useEffect(() => {
38494
- if (isOpen) {
38495
- const initialText = initialValue || '';
38496
- setCommentText(initialText);
38497
- setHasInitialValue(Boolean(initialText.trim())); // Check if there's actual content
38498
- setHasUserInteracted(false); // Reset interaction state
38499
- }
38500
- }, [isOpen, initialValue]);
38454
+ &:active {
38455
+ transform: scale(0.95);
38456
+ }
38457
+ `;
38458
+ const ModalHeader = styled.div`
38459
+ display: flex;
38460
+ justify-content: space-between;
38461
+ align-items: center;
38462
+ padding: 12px 24px;
38463
+ flex-shrink: 0;
38464
+ `;
38465
+ const ModalTitle = styled.h5`
38466
+ font-family: "Poppins", sans-serif;
38467
+ font-size: 18px;
38468
+ font-weight: 600;
38469
+ color: #212121;
38470
+ margin: 0;
38471
+ `;
38472
+ const ModalContent = styled.div`
38473
+ padding: 24px;
38474
+ border-top: ${props => props.showBorders ? '1px solid #D9D9D9' : 'none'};
38475
+ border-bottom: ${props => props.showBorders ? '1px solid #D9D9D9' : 'none'};
38476
+ `;
38477
+ const ButtonContainer$1 = styled.div`
38478
+ display: flex;
38479
+ gap: 16px;
38480
+ justify-content: flex-end;
38481
+ padding: 16px 24px;
38482
+ `;
38483
+
38484
+ // MessageBox.jsx
38485
+ const MessageBox = _ref => {
38486
+ let {
38487
+ isOpen = true,
38488
+ isDisabled = false,
38489
+ onClose = () => {},
38490
+ onConfirm = () => {},
38491
+ title = "Title",
38492
+ primaryText = "Confirm",
38493
+ secondaryText = "Cancel",
38494
+ width = "400px",
38495
+ height = "auto",
38496
+ color = "#F00021",
38497
+ hoverColor = "#ff7875",
38498
+ secondaryColor = "#ffffff",
38499
+ seperateSectionBorder = false,
38500
+ children
38501
+ } = _ref;
38501
38502
  if (!isOpen) return null;
38502
- const handleTextChange = e => {
38503
- const text = e.target.value;
38504
- if (text.length <= maxLength) {
38505
- setCommentText(text);
38506
- if (!hasUserInteracted) {
38507
- setHasUserInteracted(true); // Mark that user has started interacting
38508
- }
38509
- }
38510
- };
38511
38503
  const handleOverlayClick = e => {
38512
38504
  if (e.target === e.currentTarget) {
38513
38505
  onClose();
38514
38506
  }
38515
38507
  };
38516
- const handleSave = () => {
38517
- if (onSave) {
38518
- onSave(commentText);
38519
- }
38520
- // Don't clear the text here - let the parent handle closing
38521
- };
38522
- const handleClose = () => {
38523
- setCommentText('');
38524
- setHasUserInteracted(false);
38525
- setHasInitialValue(false);
38526
- onClose();
38527
- };
38528
- const handleFocus = () => {
38529
- setIsFocused(true);
38530
- };
38531
- const handleBlur = () => {
38532
- setIsFocused(false);
38533
- };
38534
-
38535
- // Determine if save button should be enabled
38536
- const isSaveEnabled = hasUserInteracted && (commentText.length > 0 || hasInitialValue);
38537
- return /*#__PURE__*/React$1.createElement(ModalOverlay$1, {
38508
+ return /*#__PURE__*/React$1.createElement(ModalOverlay, {
38538
38509
  onClick: handleOverlayClick
38539
- }, /*#__PURE__*/React$1.createElement(ModalContent, null, /*#__PURE__*/React$1.createElement(ModalHeader, null, /*#__PURE__*/React$1.createElement(ModalTitle$1, null, "Add Comment"), /*#__PURE__*/React$1.createElement(CloseButton$1, {
38540
- onClick: handleClose
38541
- }, /*#__PURE__*/React$1.createElement("svg", {
38542
- width: "24",
38543
- height: "24",
38544
- viewBox: "0 0 24 24",
38545
- fill: "none"
38546
- }, /*#__PURE__*/React$1.createElement("path", {
38547
- d: "M18 6L6 18M6 6l12 12",
38548
- stroke: "currentColor",
38549
- strokeWidth: "2",
38550
- strokeLinecap: "round",
38551
- strokeLinejoin: "round"
38552
- })))), /*#__PURE__*/React$1.createElement(ModalBody, null, /*#__PURE__*/React$1.createElement(TextareaWrapper, null, (commentText.length > 0 || isFocused) && /*#__PURE__*/React$1.createElement(TextareaLabel, {
38553
- color: color
38554
- }, "Comment"), /*#__PURE__*/React$1.createElement(CommentTextarea, {
38555
- value: commentText,
38556
- onChange: handleTextChange,
38557
- placeholder: "Type a Comment...",
38558
- maxLength: maxLength,
38559
- color: color,
38560
- $hasValue: commentText.length > 0,
38561
- onBlur: handleBlur,
38562
- onFocus: handleFocus
38563
- }), /*#__PURE__*/React$1.createElement(CharacterCount, null, commentText.length, "/", maxLength))), /*#__PURE__*/React$1.createElement(ModalBottom, null, /*#__PURE__*/React$1.createElement(Button$1, {
38564
- text: "Cancel",
38565
- type: "secondary",
38510
+ }, /*#__PURE__*/React$1.createElement(ModalContainer, {
38511
+ $width: width,
38512
+ $height: height
38513
+ }, /*#__PURE__*/React$1.createElement(ModalHeader, null, /*#__PURE__*/React$1.createElement(ModalTitle, null, title), /*#__PURE__*/React$1.createElement(CloseButton, {
38514
+ onClick: onClose
38515
+ }, /*#__PURE__*/React$1.createElement(CloseXIcon, null))), /*#__PURE__*/React$1.createElement(ModalContent, {
38516
+ showBorders: seperateSectionBorder
38517
+ }, children), /*#__PURE__*/React$1.createElement(ButtonContainer$1, null, /*#__PURE__*/React$1.createElement(Button$1, {
38518
+ text: secondaryText,
38566
38519
  size: "medium",
38567
- borderColor: "#D3D3D3",
38568
- hoverTextColor: "#212121",
38569
- hoverBackgroundColor: "#E6F0F0",
38570
- hoverBorderColor: "#D3D3D3",
38571
- onClick: handleClose
38520
+ borderColor: "#B1B1B1",
38521
+ hoverTextColor: color,
38522
+ hoverBackgroundColor: secondaryColor,
38523
+ hoverBorderColor: color,
38524
+ textColor: "#212121",
38525
+ backgroundColor: "white",
38526
+ disabledTextColor: "",
38527
+ disabledBackgroundColor: "",
38528
+ disabledBorderColor: "",
38529
+ width: "auto",
38530
+ minWidth: "60px",
38531
+ onClick: onClose
38572
38532
  }), /*#__PURE__*/React$1.createElement(Button$1, {
38573
- text: "Save",
38533
+ text: primaryText,
38574
38534
  size: "medium",
38575
- disabled: !isSaveEnabled,
38576
- hoverTextColor: "#ffffff",
38577
- disabledTextColor: "#ffffff",
38578
- borderColor: color,
38579
38535
  backgroundColor: color,
38580
- hoverBorderColor: saveButtonHoverColor,
38581
- hoverBackgroundColor: saveButtonHoverColor,
38582
- onClick: handleSave
38536
+ textColor: "white",
38537
+ borderColor: color,
38538
+ hoverTextColor: "white",
38539
+ hoverBackgroundColor: hoverColor,
38540
+ hoverBorderColor: hoverColor,
38541
+ disabled: isDisabled,
38542
+ disabledTextColor: "white",
38543
+ disabledBackgroundColor: "#E9E9E9",
38544
+ disabledBorderColor: "#E9E9E9",
38545
+ width: "auto",
38546
+ minWidth: "60px",
38547
+ onClick: onConfirm
38583
38548
  }))));
38584
38549
  };
38585
38550
 
@@ -38671,20 +38636,48 @@ const TableBody = ({
38671
38636
  onRowClick,
38672
38637
  onSendClick,
38673
38638
  buttonColor,
38674
- onDeleteClick,
38639
+ buttonHoverColor,
38675
38640
  selectedColor,
38641
+ onDeleteClick,
38676
38642
  resetFocusIndex,
38677
38643
  changeFocusIndex,
38678
38644
  onFocusChange,
38679
38645
  indexToShimmer = 0,
38646
+ statuses = [{
38647
+ status: 'Pending',
38648
+ palette: ['#F5C9A7', '#8B4513']
38649
+ }, {
38650
+ status: 'Received',
38651
+ palette: ['#B9D5D5', '#2F4F4F']
38652
+ }, {
38653
+ status: 'Approved',
38654
+ palette: ['#BEDDC3', '#2D5016']
38655
+ }, {
38656
+ status: 'Cancelled',
38657
+ palette: ['#EBA6AF', '#8B1538']
38658
+ }],
38680
38659
  onCommentSave = () => {},
38660
+ commentTextLimit = 150,
38681
38661
  ref = null
38682
38662
  }) => {
38683
38663
  const [hoveredRowIndex, setHoveredRowIndex] = useState(null);
38684
38664
  const [focusedRowIndex, setFocusedRowIndex] = useState(null);
38685
38665
  const [isCommentModalOpen, setIsCommentModalOpen] = useState(false);
38686
- const [currentCommentRow, setCurrentCommentRow] = useState(null); // Track which row is being edited
38666
+ const [currentCommentRow, setCurrentCommentRow] = useState(null);
38687
38667
 
38668
+ // TextArea logic states
38669
+ const [commentText, setCommentText] = useState('');
38670
+ const [isFocused, setIsFocused] = useState(false);
38671
+ const [hasUserInteracted, setHasUserInteracted] = useState(false);
38672
+ const [hasInitialValue, setHasInitialValue] = useState(false);
38673
+ useEffect(() => {
38674
+ if (isCommentModalOpen && currentCommentRow !== null) {
38675
+ const initialText = data[currentCommentRow]?.Comments || '';
38676
+ setCommentText(initialText);
38677
+ setHasInitialValue(Boolean(initialText.trim()));
38678
+ setHasUserInteracted(false);
38679
+ }
38680
+ }, [isCommentModalOpen, currentCommentRow, data]);
38688
38681
  useEffect(() => {
38689
38682
  if (resetFocusIndex) {
38690
38683
  setFocusedRowIndex(null);
@@ -38704,21 +38697,43 @@ const TableBody = ({
38704
38697
  }
38705
38698
  };
38706
38699
 
38700
+ // TextArea handlers
38701
+ const handleTextChange = e => {
38702
+ const text = e.target.value;
38703
+ if (text.length <= commentTextLimit) {
38704
+ setCommentText(text);
38705
+ if (!hasUserInteracted) {
38706
+ setHasUserInteracted(true);
38707
+ }
38708
+ }
38709
+ };
38710
+ const handleFocus = () => {
38711
+ setIsFocused(true);
38712
+ };
38713
+ const handleBlur = () => {
38714
+ setIsFocused(false);
38715
+ };
38716
+
38707
38717
  // Handle comment save
38708
- const handleCommentSave = commentText => {
38718
+ const handleCommentSave = () => {
38709
38719
  if (currentCommentRow !== null) {
38710
38720
  onCommentSave(currentCommentRow, commentText);
38711
38721
  }
38712
- setCurrentCommentRow(null);
38713
- setIsCommentModalOpen(false);
38722
+ handleCommentModalClose();
38714
38723
  };
38715
38724
 
38716
38725
  // Handle comment modal close
38717
38726
  const handleCommentModalClose = () => {
38727
+ setCommentText('');
38728
+ setHasUserInteracted(false);
38729
+ setHasInitialValue(false);
38718
38730
  setCurrentCommentRow(null);
38719
38731
  setIsCommentModalOpen(false);
38720
38732
  };
38721
38733
 
38734
+ // Determine if save button should be enabled
38735
+ const isSaveEnabled = hasUserInteracted && (commentText.length > 0 || hasInitialValue);
38736
+
38722
38737
  // Function to calculate tooltip height based on text length
38723
38738
  const calculateTooltipOffset = (text, isRegularCell = false) => {
38724
38739
  if (!text) return {
@@ -38854,12 +38869,20 @@ const TableBody = ({
38854
38869
  }), /*#__PURE__*/React$1.createElement("span", null, "All Sent"));
38855
38870
  }
38856
38871
  return value;
38872
+ case 'status':
38873
+ const statusObj = statuses.find(status => status.status === value) || {};
38874
+ const [palette0, palette1] = statusObj.palette;
38875
+ return /*#__PURE__*/React$1.createElement(StatusCell, {
38876
+ color: palette1
38877
+ }, /*#__PURE__*/React$1.createElement(StatusCellCircle, {
38878
+ backgroundColor: palette0
38879
+ }), /*#__PURE__*/React$1.createElement("span", null, value));
38857
38880
  case 'comments':
38858
- const commentText = value || '';
38859
- const hasComments = commentText.trim().length > 0;
38881
+ const commentTextValue = value || '';
38882
+ const hasComments = commentTextValue.trim().length > 0;
38860
38883
 
38861
38884
  // Truncate tooltip text if longer than 150 characters
38862
- const commentTooltipText = commentText.length > 150 ? commentText.substring(0, 147) + '...' : commentText;
38885
+ const commentTooltipText = commentTextValue.length > 150 ? commentTextValue.substring(0, 147) + '...' : commentTextValue;
38863
38886
  return /*#__PURE__*/React$1.createElement(CommentIconWrapper, {
38864
38887
  $buttonColor: buttonColor,
38865
38888
  ref: el => {
@@ -38895,7 +38918,7 @@ const TableBody = ({
38895
38918
  }
38896
38919
  }, /*#__PURE__*/React$1.createElement(CommentIcon, {
38897
38920
  showCircle: hasComments,
38898
- circleColor: "#066768"
38921
+ circleColor: buttonColor
38899
38922
  }));
38900
38923
  case 'trash':
38901
38924
  // Only show trash icon when row is hovered
@@ -38942,7 +38965,7 @@ const TableBody = ({
38942
38965
  el.style.setProperty('--tooltip-left', `${rect.left}px`);
38943
38966
  el.style.setProperty('--tooltip-width', `${rect.width}px`);
38944
38967
  el.style.setProperty('--tooltip-offset', `${offset}px`);
38945
- el.style.setProperty('--tooltip-height', `${height}px`);
38968
+ el.style.setProperty('--tooltip-height', `${offset}px`);
38946
38969
  el.setAttribute('data-tooltip', trashTooltipText);
38947
38970
  }
38948
38971
  }
@@ -38994,12 +39017,31 @@ const TableBody = ({
38994
39017
  $minWidth: column.minWidth,
38995
39018
  $maxWidth: column.maxWidth
38996
39019
  }, formattedValue);
38997
- })))), /*#__PURE__*/React$1.createElement(CommentModal, {
39020
+ })))), /*#__PURE__*/React$1.createElement(MessageBox, {
39021
+ title: "Add Comment",
38998
39022
  isOpen: isCommentModalOpen,
38999
39023
  onClose: handleCommentModalClose,
39000
- onSave: handleCommentSave,
39001
- initialValue: currentCommentRow !== null ? data[currentCommentRow]?.Comments || '' : ''
39002
- }));
39024
+ onConfirm: handleCommentSave,
39025
+ isDisabled: !isSaveEnabled,
39026
+ seperateSectionBorder: true,
39027
+ color: buttonColor,
39028
+ hoverColor: buttonHoverColor,
39029
+ secondaryColor: "#E6F0F0",
39030
+ primaryText: "Save",
39031
+ secondaryText: "Cancel",
39032
+ width: "550px"
39033
+ }, /*#__PURE__*/React$1.createElement(TextareaWrapper, null, (commentText.length > 0 || isFocused) && /*#__PURE__*/React$1.createElement(TextareaLabel, {
39034
+ color: buttonColor
39035
+ }, "Comment"), /*#__PURE__*/React$1.createElement(CommentTextarea, {
39036
+ value: commentText,
39037
+ onChange: handleTextChange,
39038
+ placeholder: "Type a Comment...",
39039
+ maxLength: commentTextLimit,
39040
+ color: buttonColor,
39041
+ $hasValue: commentText.length > 0,
39042
+ onBlur: handleBlur,
39043
+ onFocus: handleFocus
39044
+ }), /*#__PURE__*/React$1.createElement(CharacterCount, null, commentText.length, "/", commentTextLimit))));
39003
39045
  };
39004
39046
  TableBody.propTypes = {
39005
39047
  columns: PropTypes.array.isRequired,
@@ -39012,6 +39054,7 @@ TableBody.propTypes = {
39012
39054
  onFocusChange: PropTypes.func,
39013
39055
  indexToShimmer: PropTypes.number,
39014
39056
  onCommentSave: PropTypes.func,
39057
+ commentTextLimit: PropTypes.number,
39015
39058
  ref: PropTypes.object
39016
39059
  };
39017
39060
  TableBody.displayName = 'TableBody';
@@ -42188,6 +42231,7 @@ const Table = props => {
42188
42231
  width = '100%',
42189
42232
  height = 'auto',
42190
42233
  tableTitle = 'All Events',
42234
+ tableBackground = '#FFFFFF',
42191
42235
  data = [],
42192
42236
  counter = 0,
42193
42237
  hideRowsCounter = false,
@@ -42304,7 +42348,8 @@ const Table = props => {
42304
42348
 
42305
42349
  return /*#__PURE__*/React$1.createElement(TableWrapper, {
42306
42350
  width: width,
42307
- height: height
42351
+ height: height,
42352
+ backgroundColor: tableBackground
42308
42353
  }, /*#__PURE__*/React$1.createElement(NoInfoFound, null, /*#__PURE__*/React$1.createElement(TableTop, null, /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(Title$7, null, tableTitle), !hideRowsCounter && /*#__PURE__*/React$1.createElement(SubTitle, null, data.length === 0 ? 'No Events' : `${counter} Events`)), showSideButton && /*#__PURE__*/React$1.createElement(Button$1, {
42309
42354
  height: "45px",
42310
42355
  leftIcon: "Plus",
@@ -42338,6 +42383,7 @@ const Table = props => {
42338
42383
  onDeleteClick: onDeleteClick,
42339
42384
  onCommentSave: handleCommentSave,
42340
42385
  buttonColor: buttonColor,
42386
+ buttonHoverColor: buttonHoverColor,
42341
42387
  resetFocusIndex: resetFocusIndex,
42342
42388
  changeFocusIndex: changeFocusIndex,
42343
42389
  onFocusChange: handleTableFocusChange
@@ -42490,7 +42536,7 @@ const LineContainer = styled.div`
42490
42536
  align-items: center;
42491
42537
  width: 100%;
42492
42538
  `;
42493
- const ButtonContainer$1 = styled.div`
42539
+ const ButtonContainer = styled.div`
42494
42540
  .ButtonContainer {
42495
42541
  label {
42496
42542
  white-space: nowrap;
@@ -52016,7 +52062,7 @@ const ItemManagerPanel = _ref => {
52016
52062
  backgroundColor: backgroundColor
52017
52063
  }, /*#__PURE__*/React$1.createElement(VendorHeader$2, {
52018
52064
  ref: headerRef
52019
- }, /*#__PURE__*/React$1.createElement(Container$1, null, /*#__PURE__*/React$1.createElement(TitleContainer, null, /*#__PURE__*/React$1.createElement(SectionTitle$1, null, "Vendors"), /*#__PURE__*/React$1.createElement(SubtitleContainer, null, /*#__PURE__*/React$1.createElement(Subtitle$1, null, itemAndPackage.filter(item => item.packages !== null).length.toString(), " ", "Vendors", " "), /*#__PURE__*/React$1.createElement("span", null, "\xB7"), /*#__PURE__*/React$1.createElement(Subtitle$1, null, itemAndPackage.filter(item => item.packages !== null).reduce((acc, item) => acc + (item.packages ? item.packages.length : 0), 0), " ", "Packages"))), editMode && /*#__PURE__*/React$1.createElement(ButtonContainer$1, null, /*#__PURE__*/React$1.createElement(CustomTooltip, {
52065
+ }, /*#__PURE__*/React$1.createElement(Container$1, null, /*#__PURE__*/React$1.createElement(TitleContainer, null, /*#__PURE__*/React$1.createElement(SectionTitle$1, null, "Vendors"), /*#__PURE__*/React$1.createElement(SubtitleContainer, null, /*#__PURE__*/React$1.createElement(Subtitle$1, null, itemAndPackage.filter(item => item.packages !== null).length.toString(), " ", "Vendors", " "), /*#__PURE__*/React$1.createElement("span", null, "\xB7"), /*#__PURE__*/React$1.createElement(Subtitle$1, null, itemAndPackage.filter(item => item.packages !== null).reduce((acc, item) => acc + (item.packages ? item.packages.length : 0), 0), " ", "Packages"))), editMode && /*#__PURE__*/React$1.createElement(ButtonContainer, null, /*#__PURE__*/React$1.createElement(CustomTooltip, {
52020
52066
  hideTooltip: !disabledSendForms,
52021
52067
  content: buttonTooltipText,
52022
52068
  topFactor: 2,
@@ -52813,184 +52859,6 @@ const OverlayDropdown = _ref => {
52813
52859
  }));
52814
52860
  };
52815
52861
 
52816
- // MessageBox.styles.js
52817
- const ModalOverlay = styled.div`
52818
- position: fixed;
52819
- top: 0;
52820
- left: 0;
52821
- width: 100%;
52822
- height: 100%;
52823
- background-color: rgba(0, 0, 0, 0.5);
52824
- display: flex;
52825
- justify-content: center;
52826
- align-items: center;
52827
- z-index: 1000;
52828
- font-family: 'Poppins', sans-serif;
52829
- `;
52830
- const ModalContainer = styled.div`
52831
- background-color: white;
52832
- border-radius: 12px;
52833
- padding: 16px 24px 24px 24px;
52834
- width: ${props => props.$width || '400px'};
52835
- height: ${props => props.$height || 'auto'};
52836
- max-width: 90vw;
52837
- position: relative;
52838
- font-family: 'Poppins', sans-serif;
52839
- box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
52840
- `;
52841
- const CloseButton = styled.button`
52842
- position: absolute;
52843
- top: 16px;
52844
- right: 16px;
52845
- background: none;
52846
- border: none;
52847
- font-size: 20px;
52848
- color: #666;
52849
- cursor: pointer;
52850
- width: 24px;
52851
- height: 24px;
52852
- display: flex;
52853
- align-items: center;
52854
- justify-content: center;
52855
- font-family: 'Poppins', sans-serif;
52856
-
52857
- &:hover {
52858
- color: #333;
52859
- }
52860
- `;
52861
- const ModalTitle = styled.h2`
52862
- font-family: 'Poppins', sans-serif;
52863
- font-size: 18px;
52864
- font-weight: 700;
52865
- color: #212121;
52866
- margin: 0 0 16px 0;
52867
- padding-right: 32px;
52868
- `;
52869
- const MessageContainer = styled.div`
52870
- display: flex;
52871
- align-items: flex-start;
52872
- gap: 12px;
52873
- //margin-bottom: 5px;
52874
- `;
52875
- const IconWrapper$1 = styled.div`
52876
- margin-top: 1px;
52877
- `;
52878
- const MessageTitle = styled.h3`
52879
- font-family: 'Poppins', sans-serif;
52880
- font-size: 16px;
52881
- font-weight: 700;
52882
- color: #212121;
52883
- margin: 0 0 8px 0;
52884
- `;
52885
- const MessageMessage = styled.p`
52886
- font-family: 'Poppins', sans-serif;
52887
- font-size: 16px;
52888
- font-weight: 400;
52889
- color: #212121;
52890
- margin: 0;
52891
- line-height: 1.5;
52892
- `;
52893
- const ButtonContainer = styled.div`
52894
- display: flex;
52895
- gap: 12px;
52896
- justify-content: flex-end;
52897
- margin-top: 24px;
52898
- `;
52899
-
52900
- // eslint-disable-next-line react/prop-types
52901
- const ExclamationMarkIcon = _ref => {
52902
- let {
52903
- color = '#FF3949',
52904
- width = '16',
52905
- height = '16'
52906
- } = _ref;
52907
- return /*#__PURE__*/React$1.createElement("svg", {
52908
- width: width,
52909
- height: height,
52910
- viewBox: "0 0 16 16",
52911
- fill: "none",
52912
- xmlns: "http://www.w3.org/2000/svg"
52913
- }, /*#__PURE__*/React$1.createElement("path", {
52914
- d: "M8.01562 1.5C5.67188 1.5 3.54688 2.75 2.35938 4.75C1.20312 6.78125 1.20312 9.25 2.35938 11.25C3.54688 13.2812 5.67188 14.5 8.01562 14.5C10.3281 14.5 12.4531 13.2812 13.6406 11.25C14.7969 9.25 14.7969 6.78125 13.6406 4.75C12.4531 2.75 10.3281 1.5 8.01562 1.5ZM8.01562 16C5.14062 16 2.51562 14.5 1.07812 12C-0.359375 9.53125 -0.359375 6.5 1.07812 4C2.51562 1.53125 5.14062 0 8.01562 0C10.8594 0 13.4844 1.53125 14.9219 4C16.3594 6.5 16.3594 9.53125 14.9219 12C13.4844 14.5 10.8594 16 8.01562 16ZM8.01562 4C8.42188 4 8.76562 4.34375 8.76562 4.75V8.25C8.76562 8.6875 8.42188 9 8.01562 9C7.57812 9 7.26562 8.6875 7.26562 8.25V4.75C7.26562 4.34375 7.57812 4 8.01562 4ZM9.01562 11C9.01562 11.5625 8.54688 12 8.01562 12C7.45312 12 7.01562 11.5625 7.01562 11C7.01562 10.4688 7.45312 10 8.01562 10C8.54688 10 9.01562 10.4688 9.01562 11Z",
52915
- fill: color
52916
- }));
52917
- };
52918
-
52919
- // MessageBox.jsx
52920
- const MessageBox = _ref => {
52921
- let {
52922
- isOpen = true,
52923
- onClose = () => {},
52924
- onConfirm = () => {},
52925
- title = "Title",
52926
- messageTitle = "",
52927
- messageText = "",
52928
- cancelText = "Cancel",
52929
- confirmText = "Confirm",
52930
- width = "400px",
52931
- height = "auto"
52932
- } = _ref;
52933
- if (!isOpen) return null;
52934
- const handleOverlayClick = e => {
52935
- if (e.target === e.currentTarget) {
52936
- onClose();
52937
- }
52938
- };
52939
-
52940
- // Function to calculate button width based on text length
52941
- const calculateButtonWidth = text => {
52942
- // Approximate character width for Poppins 14px font
52943
- const avgCharWidth = 8; // pixels per character
52944
- const padding = 24; // left + right padding
52945
- const minWidth = 60; // minimum button width
52946
-
52947
- const calculatedWidth = text.length * avgCharWidth + padding;
52948
- return Math.max(calculatedWidth, minWidth);
52949
- };
52950
- return /*#__PURE__*/React$1.createElement(ModalOverlay, {
52951
- onClick: handleOverlayClick
52952
- }, /*#__PURE__*/React$1.createElement(ModalContainer, {
52953
- $width: width,
52954
- $height: height
52955
- }, /*#__PURE__*/React$1.createElement(CloseButton, {
52956
- onClick: onClose
52957
- }, /*#__PURE__*/React$1.createElement(CloseXIcon, {
52958
- width: "22",
52959
- height: "22"
52960
- })), /*#__PURE__*/React$1.createElement(ModalTitle, null, title), /*#__PURE__*/React$1.createElement(MessageContainer, null, /*#__PURE__*/React$1.createElement(IconWrapper$1, null, /*#__PURE__*/React$1.createElement(ExclamationMarkIcon, {
52961
- color: "#F00021",
52962
- width: "16",
52963
- height: "16"
52964
- })), /*#__PURE__*/React$1.createElement(MessageTitle, null, messageTitle)), /*#__PURE__*/React$1.createElement(MessageContainer, null, /*#__PURE__*/React$1.createElement(MessageMessage, null, messageText)), /*#__PURE__*/React$1.createElement(ButtonContainer, null, /*#__PURE__*/React$1.createElement(Button$1, {
52965
- text: cancelText,
52966
- borderRadius: "12px",
52967
- textColor: "#212121",
52968
- borderColor: "#B1B1B1",
52969
- backgroundColor: "#FFF",
52970
- hoverTextColor: "#212121",
52971
- hoverBackgroundColor: "#FFF",
52972
- hoverBorderColor: "#F00021",
52973
- disabledTextColor: "",
52974
- disabledBackgroundColor: "",
52975
- disabledBorderColor: "",
52976
- width: calculateButtonWidth(cancelText),
52977
- height: "45px",
52978
- onClick: onClose
52979
- }), /*#__PURE__*/React$1.createElement(Button$1, {
52980
- text: confirmText,
52981
- borderRadius: "12px",
52982
- backgroundColor: "#F00021",
52983
- textColor: "#FFF",
52984
- borderColor: "#F00021",
52985
- hoverTextColor: "#FFF",
52986
- hoverBackgroundColor: "#ff7875",
52987
- hoverBorderColor: "#ff7875",
52988
- width: calculateButtonWidth(confirmText),
52989
- height: "45px",
52990
- onClick: onConfirm
52991
- }))));
52992
- };
52993
-
52994
52862
  // ToasterMessageBox.styles.js
52995
52863
 
52996
52864
  // Helper function to convert hex to rgba