sag_components 2.0.0-beta132 → 2.0.0-beta134

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
@@ -341,18 +341,18 @@ const SearchIcon = _ref => {
341
341
  };
342
342
 
343
343
  const PlusIcon = ({
344
- width = '17',
344
+ width = '16',
345
345
  height = '17',
346
346
  color = '#212121'
347
347
  }) => /*#__PURE__*/React$1.createElement("svg", {
348
348
  xmlns: "http://www.w3.org/2000/svg",
349
- width: "16",
350
- height: "17",
349
+ width: width,
350
+ height: height,
351
351
  viewBox: "0 0 16 17",
352
352
  fill: "none"
353
353
  }, /*#__PURE__*/React$1.createElement("path", {
354
354
  d: "M8.71875 2.28125V7.90625H14.3438C14.8008 7.90625 15.1875 8.29297 15.1875 8.75C15.1875 9.24219 14.8008 9.59375 14.3438 9.59375H8.71875V15.2188C8.71875 15.7109 8.33203 16.0625 7.875 16.0625C7.38281 16.0625 7.03125 15.7109 7.03125 15.2188V9.59375H1.40625C0.914062 9.59375 0.5625 9.24219 0.5625 8.75C0.5625 8.29297 0.914062 7.90625 1.40625 7.90625H7.03125V2.28125C7.03125 1.82422 7.38281 1.4375 7.875 1.4375C8.33203 1.4375 8.71875 1.82422 8.71875 2.28125Z",
355
- fill: "#066768"
355
+ fill: color
356
356
  }));
357
357
 
358
358
  const ArrowLeftIcon = ({
@@ -3149,8 +3149,8 @@ const LinkButton = _ref => {
3149
3149
  return /*#__PURE__*/React$1.createElement(IconWrapper$5, {
3150
3150
  className: "PlusIcon"
3151
3151
  }, /*#__PURE__*/React$1.createElement(PlusIcon, {
3152
- height: iconHeight,
3153
- width: iconWidth,
3152
+ height: "16",
3153
+ width: "17",
3154
3154
  color: color
3155
3155
  }));
3156
3156
  case 'options':
@@ -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 = () => {},
@@ -41411,7 +41411,11 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
41411
41411
  // New props for focus management
41412
41412
  resetTableFocus = false,
41413
41413
  onTableFocusChange = () => {},
41414
- clearFocusOnOutsideClick = true
41414
+ clearFocusOnOutsideClick = true,
41415
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41416
+ isEditMode = false,
41417
+ editRowIndex = -1
41418
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41415
41419
  } = props;
41416
41420
  const scrollWrapperRef = useRef(null);
41417
41421
  const tableBodyRef = useRef(null);
@@ -41460,13 +41464,17 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
41460
41464
  }
41461
41465
  }
41462
41466
  };
41463
- scrollWrapper.addEventListener('scroll', handleScroll);
41464
- return () => scrollWrapper.removeEventListener('scroll', handleScroll);
41467
+ scrollWrapper.addEventListener("scroll", handleScroll);
41468
+ return () => scrollWrapper.removeEventListener("scroll", handleScroll);
41465
41469
  }, [onLastRowsReached, data.length, lastRowsThreshold, hasTriggered]);
41466
41470
 
41467
- // Handle outside click to clear focus
41471
+ // Handle outside click to clear focus - UPDATED to respect edit mode
41468
41472
  useEffect(() => {
41469
- if (!clearFocusOnOutsideClick) return;
41473
+ // if (!clearFocusOnOutsideClick) return;
41474
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41475
+ if (!clearFocusOnOutsideClick || isEditMode) return; // Don't clear focus during edit mode
41476
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41477
+
41470
41478
  const handleOutsideClick = event => {
41471
41479
  if (tableContainerRef.current && !tableContainerRef.current.contains(event.target)) {
41472
41480
  // Click is outside the table container
@@ -41475,15 +41483,18 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
41475
41483
  }
41476
41484
  }
41477
41485
  };
41478
- document.addEventListener('mousedown', handleOutsideClick);
41486
+ document.addEventListener("mousedown", handleOutsideClick);
41479
41487
  return () => {
41480
- document.removeEventListener('mousedown', handleOutsideClick);
41488
+ document.removeEventListener("mousedown", handleOutsideClick);
41481
41489
  };
41482
- }, [clearFocusOnOutsideClick]);
41490
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41491
+ }, [clearFocusOnOutsideClick, isEditMode]); // Added isEditMode to dependency array
41492
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41493
+
41483
41494
  return /*#__PURE__*/React$1.createElement(TableWrapper, {
41484
41495
  width: width,
41485
41496
  height: height
41486
- }, /*#__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, {
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, {
41487
41498
  height: "45px",
41488
41499
  leftIcon: "Plus",
41489
41500
  text: "New Event",
@@ -41516,6 +41527,11 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
41516
41527
  buttonColor: buttonColor,
41517
41528
  resetFocus: resetTableFocus,
41518
41529
  onFocusChange: handleTableFocusChange
41530
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41531
+ ,
41532
+ isEditMode: isEditMode,
41533
+ editRowIndex: editRowIndex
41534
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41519
41535
  })), 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, {
41520
41536
  height: "45px",
41521
41537
  leftIcon: "Plus",
@@ -41537,7 +41553,7 @@ const Table = /*#__PURE__*/forwardRef((props, ref) => {
41537
41553
  });
41538
41554
 
41539
41555
  // Add displayName for better debugging
41540
- Table.displayName = 'Table';
41556
+ Table.displayName = "Table";
41541
41557
 
41542
41558
  const Card = styled.div`
41543
41559
  background: ${props => props.backgroundColor};
@@ -51198,7 +51214,8 @@ const ItemManagerPanel = _ref => {
51198
51214
  size: "small",
51199
51215
  text: hasVendorsWithPackages() ? "Add Vendor" : "First Vendor",
51200
51216
  type: "primary",
51201
- textColor: linkColor
51217
+ textColor: linkColor,
51218
+ disabled: disableSection
51202
51219
  }))), /*#__PURE__*/React$1.createElement(VendorListWrapper$2, {
51203
51220
  disabled: disableSection,
51204
51221
  headerHeight: headerHeight