sag_components 2.0.0-beta134 → 2.0.0-beta135

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
@@ -41376,15 +41376,15 @@ var Lottie = function Lottie(props) {
41376
41376
  // Table.jsx
41377
41377
  const Table = /*#__PURE__*/forwardRef((props, ref) => {
41378
41378
  const {
41379
- width = "100%",
41380
- height = "auto",
41381
- tableTitle = "All Events",
41379
+ width = '100%',
41380
+ height = 'auto',
41381
+ tableTitle = 'All Events',
41382
41382
  data = [],
41383
41383
  counter = 0,
41384
41384
  hideRowsCounter = false,
41385
41385
  onButtonClick = () => {},
41386
- buttonColor = "#066768",
41387
- buttonHoverColor = "#388586",
41386
+ buttonColor = '#066768',
41387
+ buttonHoverColor = '#388586',
41388
41388
  // Updated props for new table structure
41389
41389
  columns = [],
41390
41390
  onRowClick = () => {},
@@ -41393,12 +41393,12 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
41393
41393
  onSelectAll,
41394
41394
  showSideButton = true,
41395
41395
  onSideButtonClick = () => {},
41396
- sideButtonColor = "#066768",
41397
- sideButtonHoverColor = "#388586",
41396
+ sideButtonColor = '#066768',
41397
+ sideButtonHoverColor = '#388586',
41398
41398
  children = null,
41399
- tableBodyHeight = "728px",
41399
+ tableBodyHeight = '728px',
41400
41400
  isLoading = false,
41401
- isLoadingText = "Loading Events...",
41401
+ isLoadingText = 'Loading Events...',
41402
41402
  onLastRowsReached = () => {},
41403
41403
  lastRowsThreshold = 3,
41404
41404
  onSendClick = () => {},
@@ -41412,10 +41412,9 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
41412
41412
  resetTableFocus = false,
41413
41413
  onTableFocusChange = () => {},
41414
41414
  clearFocusOnOutsideClick = true,
41415
- //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41415
+ // NEW: Props for edit mode focus management
41416
41416
  isEditMode = false,
41417
41417
  editRowIndex = -1
41418
- //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41419
41418
  } = props;
41420
41419
  const scrollWrapperRef = useRef(null);
41421
41420
  const tableBodyRef = useRef(null);
@@ -41464,16 +41463,13 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
41464
41463
  }
41465
41464
  }
41466
41465
  };
41467
- scrollWrapper.addEventListener("scroll", handleScroll);
41468
- return () => scrollWrapper.removeEventListener("scroll", handleScroll);
41466
+ scrollWrapper.addEventListener('scroll', handleScroll);
41467
+ return () => scrollWrapper.removeEventListener('scroll', handleScroll);
41469
41468
  }, [onLastRowsReached, data.length, lastRowsThreshold, hasTriggered]);
41470
41469
 
41471
41470
  // Handle outside click to clear focus - UPDATED to respect edit mode
41472
41471
  useEffect(() => {
41473
- // if (!clearFocusOnOutsideClick) return;
41474
- //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41475
41472
  if (!clearFocusOnOutsideClick || isEditMode) return; // Don't clear focus during edit mode
41476
- //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41477
41473
 
41478
41474
  const handleOutsideClick = event => {
41479
41475
  if (tableContainerRef.current && !tableContainerRef.current.contains(event.target)) {
@@ -41483,18 +41479,16 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
41483
41479
  }
41484
41480
  }
41485
41481
  };
41486
- document.addEventListener("mousedown", handleOutsideClick);
41482
+ document.addEventListener('mousedown', handleOutsideClick);
41487
41483
  return () => {
41488
- document.removeEventListener("mousedown", handleOutsideClick);
41484
+ document.removeEventListener('mousedown', handleOutsideClick);
41489
41485
  };
41490
- //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41491
41486
  }, [clearFocusOnOutsideClick, isEditMode]); // Added isEditMode to dependency array
41492
- //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41493
41487
 
41494
41488
  return /*#__PURE__*/React$1.createElement(TableWrapper, {
41495
41489
  width: width,
41496
41490
  height: height
41497
- }, /*#__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, {
41491
+ }, /*#__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, {
41498
41492
  height: "45px",
41499
41493
  leftIcon: "Plus",
41500
41494
  text: "New Event",
@@ -41527,11 +41521,6 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
41527
41521
  buttonColor: buttonColor,
41528
41522
  resetFocus: resetTableFocus,
41529
41523
  onFocusChange: handleTableFocusChange
41530
- //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41531
- ,
41532
- isEditMode: isEditMode,
41533
- editRowIndex: editRowIndex
41534
- //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41535
41524
  })), 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, {
41536
41525
  height: "45px",
41537
41526
  leftIcon: "Plus",
@@ -41553,7 +41542,7 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
41553
41542
  });
41554
41543
 
41555
41544
  // Add displayName for better debugging
41556
- Table.displayName = "Table";
41545
+ Table.displayName = 'Table';
41557
41546
 
41558
41547
  const Card = styled.div`
41559
41548
  background: ${props => props.backgroundColor};