sag_components 2.0.0-beta142 → 2.0.0-beta144

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
@@ -10317,24 +10317,23 @@ const QuarterPopupPicker = ({
10317
10317
  };
10318
10318
 
10319
10319
  /* eslint-disable import/no-extraneous-dependencies */
10320
- const QuarterPicker = _ref => {
10321
- let {
10322
- availableQuarters,
10323
- // ["Q1-2024"]
10324
- label,
10325
- onChange,
10326
- borderRadius,
10327
- required,
10328
- width,
10329
- height,
10330
- placeholder,
10331
- disabled,
10332
- borderColor,
10333
- borderColorFocus,
10334
- textColor,
10335
- selectedValue,
10336
- startYear
10337
- } = _ref;
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
+ }) => {
10338
10337
  const [isFocused, setIsFocused] = useState(false);
10339
10338
  const [isOpen, setIsOpen] = useState(false);
10340
10339
  const [value, setValue] = useState('');
@@ -10776,23 +10775,22 @@ const MonthPopupPicker = ({
10776
10775
  };
10777
10776
 
10778
10777
  /* eslint-disable import/no-extraneous-dependencies */
10779
- const MonthPicker = _ref => {
10780
- let {
10781
- availableMonths,
10782
- label,
10783
- onChange,
10784
- borderRadius,
10785
- required,
10786
- width,
10787
- height,
10788
- placeholder,
10789
- disabled,
10790
- borderColor,
10791
- borderColorFocus,
10792
- textColor,
10793
- selectedValue,
10794
- startYear
10795
- } = _ref;
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
+ }) => {
10796
10794
  const [isFocused, setIsFocused] = useState(false);
10797
10795
  const [isOpen, setIsOpen] = useState(false);
10798
10796
  const [value, setValue] = useState('');
@@ -23903,22 +23901,21 @@ const DeleteIcon = styled.div`
23903
23901
  position: absolute;
23904
23902
  `;
23905
23903
 
23906
- const QuickFilterDropdownSingle = _ref => {
23907
- let {
23908
- label,
23909
- hoverColor,
23910
- options,
23911
- selectedValue,
23912
- placeHolder,
23913
- onChange,
23914
- disabled,
23915
- width,
23916
- error,
23917
- errorMessage,
23918
- xIconShow,
23919
- labelColor,
23920
- showLabelOnTop
23921
- } = _ref;
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
+ }) => {
23922
23919
  const [isFocused, setIsFocused] = useState(false);
23923
23920
  const [showOptions, setShowOptions] = useState(false);
23924
23921
  const [inputValue, setInputValue] = useState("");
@@ -24315,24 +24312,23 @@ const IconContainer$2 = styled.div`
24315
24312
  cursor: pointer;
24316
24313
  `;
24317
24314
 
24318
- const QuickFilterDropdownMultiSelection = _ref => {
24319
- let {
24320
- label,
24321
- labelEmptyValue,
24322
- options,
24323
- selectedValue,
24324
- placeHolder,
24325
- onChange,
24326
- required,
24327
- disabled,
24328
- width,
24329
- error,
24330
- errorMessage,
24331
- labelColor,
24332
- xIconShow,
24333
- checkBoxColor,
24334
- showLabelOnTop
24335
- } = _ref;
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
+ }) => {
24336
24332
  const [isFocused, setIsFocused] = useState(false);
24337
24333
  const [showOptions, setShowOptions] = useState(false);
24338
24334
  const [inputValue, setInputValue] = useState('');
@@ -35564,9 +35560,9 @@ const ToggleSlider = styled.span`
35564
35560
  }
35565
35561
  `;
35566
35562
 
35567
- /**
35568
- * ToggleSwitch component for on/off states.
35569
- * Supports small/large sizes and disabled state.
35563
+ /**
35564
+ * ToggleSwitch component for on/off states.
35565
+ * Supports small/large sizes and disabled state.
35570
35566
  */
35571
35567
  function ToggleSwitch(_ref) {
35572
35568
  let {
@@ -38677,7 +38673,8 @@ const TableBody = ({
38677
38673
  buttonColor,
38678
38674
  onDeleteClick,
38679
38675
  selectedColor,
38680
- resetFocus = false,
38676
+ resetFocusIndex,
38677
+ changeFocusIndex,
38681
38678
  onFocusChange,
38682
38679
  indexToShimmer = 0,
38683
38680
  onCommentSave = () => {},
@@ -38688,24 +38685,16 @@ const TableBody = ({
38688
38685
  const [isCommentModalOpen, setIsCommentModalOpen] = useState(false);
38689
38686
  const [currentCommentRow, setCurrentCommentRow] = useState(null); // Track which row is being edited
38690
38687
 
38691
- // Expose methods to parent components via ref (if ref is provided)
38692
- // useImperativeHandle(ref, () => ({
38693
- // clearFocus: () => setFocusedRowIndex(null),
38694
- // getFocusedRowIndex: () => focusedRowIndex
38695
- // }), [focusedRowIndex]);
38696
-
38697
38688
  useEffect(() => {
38698
- if (resetFocus) {
38689
+ if (resetFocusIndex) {
38699
38690
  setFocusedRowIndex(null);
38700
38691
  }
38701
- }, [resetFocus]);
38702
-
38703
- // Notify parent of focus changes
38704
- // useEffect(() => {
38705
- // if (onFocusChange) {
38706
- // onFocusChange(focusedRowIndex);
38707
- // }
38708
- // }, [focusedRowIndex, onFocusChange]);
38692
+ }, [resetFocusIndex]);
38693
+ useEffect(() => {
38694
+ if (changeFocusIndex) {
38695
+ setFocusedRowIndex(changeFocusIndex);
38696
+ }
38697
+ }, [changeFocusIndex]);
38709
38698
 
38710
38699
  // Handle row click for focus state
38711
38700
  const handleRowClick = (row, rowIndex) => {
@@ -42228,8 +42217,8 @@ const Table = props => {
42228
42217
  noDataInSearchTitle = "No Results Found",
42229
42218
  noDataInSearchMessage = "Try to refine your query and search again",
42230
42219
  indexToShimmer = -1,
42231
- // New props for focus management
42232
- resetTableFocus = false,
42220
+ resetFocusIndex,
42221
+ changeFocusIndex,
42233
42222
  onTableFocusChange = () => {},
42234
42223
  clearFocusOnOutsideClick = true,
42235
42224
  // NEW: Props for edit mode focus management
@@ -42349,7 +42338,8 @@ const Table = props => {
42349
42338
  onDeleteClick: onDeleteClick,
42350
42339
  onCommentSave: handleCommentSave,
42351
42340
  buttonColor: buttonColor,
42352
- resetFocus: resetTableFocus,
42341
+ resetFocusIndex: resetFocusIndex,
42342
+ changeFocusIndex: changeFocusIndex,
42353
42343
  onFocusChange: handleTableFocusChange
42354
42344
  })), data.length === 0 && /*#__PURE__*/React$1.createElement(NoEventsParent, null, /*#__PURE__*/React$1.createElement(NoEventsWrapper, null, showNoDataInSearch ? /*#__PURE__*/React$1.createElement(NoDataInSearchIcon, null) : /*#__PURE__*/React$1.createElement(NoEvents, null)), /*#__PURE__*/React$1.createElement(NoEventsMessage, null, showNoDataInSearch ? /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("strong", null, noDataInSearchTitle), /*#__PURE__*/React$1.createElement("br", null), noDataInSearchMessage) : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("strong", null, "You haven't created any events yet"), /*#__PURE__*/React$1.createElement("br", null), "Let's get started and create your first one!")), !showNoDataInSearch && /*#__PURE__*/React$1.createElement(Button$1, {
42355
42345
  height: "45px",