sag_components 2.0.0-beta215 → 2.0.0-beta217

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
@@ -10580,24 +10580,23 @@ const QuarterPopupPicker = ({
10580
10580
  };
10581
10581
 
10582
10582
  /* eslint-disable import/no-extraneous-dependencies */
10583
- const QuarterPicker = _ref => {
10584
- let {
10585
- availableQuarters,
10586
- // ["Q1-2024"]
10587
- label,
10588
- onChange,
10589
- borderRadius,
10590
- required,
10591
- width,
10592
- height,
10593
- placeholder,
10594
- disabled,
10595
- borderColor,
10596
- borderColorFocus,
10597
- textColor,
10598
- selectedValue,
10599
- startYear
10600
- } = _ref;
10583
+ const QuarterPicker = ({
10584
+ availableQuarters,
10585
+ // ["Q1-2024"]
10586
+ label,
10587
+ onChange,
10588
+ borderRadius,
10589
+ required,
10590
+ width,
10591
+ height,
10592
+ placeholder,
10593
+ disabled,
10594
+ borderColor,
10595
+ borderColorFocus,
10596
+ textColor,
10597
+ selectedValue,
10598
+ startYear
10599
+ }) => {
10601
10600
  const [isFocused, setIsFocused] = useState(false);
10602
10601
  const [isOpen, setIsOpen] = useState(false);
10603
10602
  const [value, setValue] = useState('');
@@ -11039,23 +11038,22 @@ const MonthPopupPicker = ({
11039
11038
  };
11040
11039
 
11041
11040
  /* eslint-disable import/no-extraneous-dependencies */
11042
- const MonthPicker = _ref => {
11043
- let {
11044
- availableMonths,
11045
- label,
11046
- onChange,
11047
- borderRadius,
11048
- required,
11049
- width,
11050
- height,
11051
- placeholder,
11052
- disabled,
11053
- borderColor,
11054
- borderColorFocus,
11055
- textColor,
11056
- selectedValue,
11057
- startYear
11058
- } = _ref;
11041
+ const MonthPicker = ({
11042
+ availableMonths,
11043
+ label,
11044
+ onChange,
11045
+ borderRadius,
11046
+ required,
11047
+ width,
11048
+ height,
11049
+ placeholder,
11050
+ disabled,
11051
+ borderColor,
11052
+ borderColorFocus,
11053
+ textColor,
11054
+ selectedValue,
11055
+ startYear
11056
+ }) => {
11059
11057
  const [isFocused, setIsFocused] = useState(false);
11060
11058
  const [isOpen, setIsOpen] = useState(false);
11061
11059
  const [value, setValue] = useState('');
@@ -24166,22 +24164,21 @@ const DeleteIcon = styled.div`
24166
24164
  position: absolute;
24167
24165
  `;
24168
24166
 
24169
- const QuickFilterDropdownSingle = _ref => {
24170
- let {
24171
- label,
24172
- hoverColor,
24173
- options,
24174
- selectedValue,
24175
- placeHolder,
24176
- onChange,
24177
- disabled,
24178
- width,
24179
- error,
24180
- errorMessage,
24181
- xIconShow,
24182
- labelColor,
24183
- showLabelOnTop
24184
- } = _ref;
24167
+ const QuickFilterDropdownSingle = ({
24168
+ label,
24169
+ hoverColor,
24170
+ options,
24171
+ selectedValue,
24172
+ placeHolder,
24173
+ onChange,
24174
+ disabled,
24175
+ width,
24176
+ error,
24177
+ errorMessage,
24178
+ xIconShow,
24179
+ labelColor,
24180
+ showLabelOnTop
24181
+ }) => {
24185
24182
  const [isFocused, setIsFocused] = useState(false);
24186
24183
  const [showOptions, setShowOptions] = useState(false);
24187
24184
  const [inputValue, setInputValue] = useState("");
@@ -24638,26 +24635,25 @@ const IconContainer$2 = styled.div`
24638
24635
  cursor: pointer;
24639
24636
  `;
24640
24637
 
24641
- const QuickFilterDropdownMultiSelection = _ref => {
24642
- let {
24643
- label,
24644
- labelEmptyValue,
24645
- options,
24646
- selectedValue,
24647
- placeHolder,
24648
- onChange,
24649
- required,
24650
- disabled,
24651
- width,
24652
- height,
24653
- error,
24654
- errorMessage,
24655
- labelColor,
24656
- xIconShow,
24657
- checkBoxColor,
24658
- showLabelOnTop,
24659
- dropdownHeight
24660
- } = _ref;
24638
+ const QuickFilterDropdownMultiSelection = ({
24639
+ label,
24640
+ labelEmptyValue,
24641
+ options,
24642
+ selectedValue,
24643
+ placeHolder,
24644
+ onChange,
24645
+ required,
24646
+ disabled,
24647
+ width,
24648
+ height,
24649
+ error,
24650
+ errorMessage,
24651
+ labelColor,
24652
+ xIconShow,
24653
+ checkBoxColor,
24654
+ showLabelOnTop,
24655
+ dropdownHeight
24656
+ }) => {
24661
24657
  const [isFocused, setIsFocused] = useState(false);
24662
24658
  const [showOptions, setShowOptions] = useState(false);
24663
24659
  const [inputValue, setInputValue] = useState('');
@@ -36141,9 +36137,9 @@ const ToggleSlider = styled.span`
36141
36137
  }
36142
36138
  `;
36143
36139
 
36144
- /**
36145
- * ToggleSwitch component for on/off states.
36146
- * Supports small/large sizes and disabled state.
36140
+ /**
36141
+ * ToggleSwitch component for on/off states.
36142
+ * Supports small/large sizes and disabled state.
36147
36143
  */
36148
36144
  function ToggleSwitch(_ref) {
36149
36145
  let {
@@ -38755,6 +38751,7 @@ const TableHeader = ({
38755
38751
  const showColumnFilter = column => {
38756
38752
  const {
38757
38753
  key,
38754
+ doubleColumn,
38758
38755
  title,
38759
38756
  filterOptions,
38760
38757
  freeTextFilter,
@@ -38771,7 +38768,12 @@ const TableHeader = ({
38771
38768
  inputType: "text",
38772
38769
  placeholder: column.key === 'EventCode' ? 'Enter Event ID' : 'Search..',
38773
38770
  fieldHeight: "40px",
38774
- onTyping: () => {},
38771
+ onTyping: value => {
38772
+ setFilterState(prev => ({
38773
+ ...prev,
38774
+ [key]: value
38775
+ }));
38776
+ },
38775
38777
  onReset: () => {
38776
38778
  setFilterState(prev => ({
38777
38779
  ...prev,
@@ -38814,6 +38816,7 @@ const TableHeader = ({
38814
38816
  color: "#066768",
38815
38817
  isAsc: true,
38816
38818
  list: filterOptions,
38819
+ doubleColumn: doubleColumn,
38817
38820
  menuName: title,
38818
38821
  selectedAttributes: filterSelections[key] || {},
38819
38822
  onCheck: event => handleFilterSelectionChange(key, event),
@@ -40197,7 +40200,7 @@ const TableBody = /*#__PURE__*/forwardRef(({
40197
40200
 
40198
40201
  // Handle shimmer effect changes
40199
40202
  useEffect(() => {
40200
- if (indexToShimmer >= 0 && indexToShimmer !== shimmerRowIndex) {
40203
+ if (indexToShimmer >= 0) {
40201
40204
  setShimmerRowIndex(indexToShimmer);
40202
40205
  setShimmerStartTime(Date.now());
40203
40206
 
@@ -40207,8 +40210,11 @@ const TableBody = /*#__PURE__*/forwardRef(({
40207
40210
  setShimmerStartTime(null);
40208
40211
  }, 5000);
40209
40212
  return () => clearTimeout(timeout);
40213
+ } else if (indexToShimmer === -1) {
40214
+ setShimmerRowIndex(-1);
40215
+ setShimmerStartTime(null);
40210
40216
  }
40211
- }, [indexToShimmer, shimmerRowIndex]);
40217
+ }, [indexToShimmer]);
40212
40218
 
40213
40219
  // Expose methods to parent component via ref
40214
40220
  useImperativeHandle(ref, () => ({
@@ -40802,7 +40808,7 @@ const TableBody = /*#__PURE__*/forwardRef(({
40802
40808
  key: row.id || `row-${rowIndex}`
40803
40809
  }, /*#__PURE__*/React$1.createElement(TableRow, {
40804
40810
  "data-row-index": rowIndex,
40805
- className: indexToShimmer === rowIndex ? "shimmer-row" : "",
40811
+ className: shimmerRowIndex === rowIndex ? "shimmer-row" : "",
40806
40812
  isFocused: focusedRowIndex === rowIndex,
40807
40813
  selectedColor: selectedColor,
40808
40814
  onMouseEnter: () => setHoveredRowIndex(rowIndex),
@@ -45534,7 +45540,8 @@ const NewSubitem = ({
45534
45540
  onBack,
45535
45541
  addNewPackage,
45536
45542
  updateExistingPackage,
45537
- componentText = "Scale"
45543
+ componentText = "Scale",
45544
+ itemAndPackage
45538
45545
  }) => {
45539
45546
  const [negotiatedBrands, setNegotiatedBrands] = useState("");
45540
45547
  const [negotiatedComponent, setNegotiatedComponent] = useState(componentText);
@@ -45549,7 +45556,9 @@ const NewSubitem = ({
45549
45556
  }, [packageObject]);
45550
45557
  useEffect(() => {
45551
45558
  if (packageObject && packageObject.brands === negotiatedBrands) return;
45552
- setIsPackageDuplicated(vendor.packages.some(pkg => pkg.brands === negotiatedBrands));
45559
+ setIsPackageDuplicated(itemAndPackage.some(obj => {
45560
+ obj.name === vendor && obj.packages.some(pkg => pkg.brands === negotiatedBrands);
45561
+ }));
45553
45562
  setIsApplyEnabled(negotiatedBrands.trim().length > 2 && vendor.packages.some(pkg => pkg.brands === negotiatedBrands) === false);
45554
45563
  }, [negotiatedBrands]);
45555
45564
  return /*#__PURE__*/React$1.createElement(NewSubitemContainer, null, /*#__PURE__*/React$1.createElement(Header, null, /*#__PURE__*/React$1.createElement(BackButton, {