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.js CHANGED
@@ -351,18 +351,18 @@ const SearchIcon = _ref => {
351
351
  };
352
352
 
353
353
  const PlusIcon = ({
354
- width = '17',
354
+ width = '16',
355
355
  height = '17',
356
356
  color = '#212121'
357
357
  }) => /*#__PURE__*/React__default["default"].createElement("svg", {
358
358
  xmlns: "http://www.w3.org/2000/svg",
359
- width: "16",
360
- height: "17",
359
+ width: width,
360
+ height: height,
361
361
  viewBox: "0 0 16 17",
362
362
  fill: "none"
363
363
  }, /*#__PURE__*/React__default["default"].createElement("path", {
364
364
  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",
365
- fill: "#066768"
365
+ fill: color
366
366
  }));
367
367
 
368
368
  const ArrowLeftIcon = ({
@@ -3159,8 +3159,8 @@ const LinkButton = _ref => {
3159
3159
  return /*#__PURE__*/React__default["default"].createElement(IconWrapper$5, {
3160
3160
  className: "PlusIcon"
3161
3161
  }, /*#__PURE__*/React__default["default"].createElement(PlusIcon, {
3162
- height: iconHeight,
3163
- width: iconWidth,
3162
+ height: "16",
3163
+ width: "17",
3164
3164
  color: color
3165
3165
  }));
3166
3166
  case 'options':
@@ -41386,15 +41386,15 @@ var Lottie = function Lottie(props) {
41386
41386
  // Table.jsx
41387
41387
  const Table = /*#__PURE__*/React$1.forwardRef((props, ref) => {
41388
41388
  const {
41389
- width = '100%',
41390
- height = 'auto',
41391
- tableTitle = 'All Events',
41389
+ width = "100%",
41390
+ height = "auto",
41391
+ tableTitle = "All Events",
41392
41392
  data = [],
41393
41393
  counter = 0,
41394
41394
  hideRowsCounter = false,
41395
41395
  onButtonClick = () => {},
41396
- buttonColor = '#066768',
41397
- buttonHoverColor = '#388586',
41396
+ buttonColor = "#066768",
41397
+ buttonHoverColor = "#388586",
41398
41398
  // Updated props for new table structure
41399
41399
  columns = [],
41400
41400
  onRowClick = () => {},
@@ -41403,12 +41403,12 @@ const Table = /*#__PURE__*/React$1.forwardRef((props, ref) => {
41403
41403
  onSelectAll,
41404
41404
  showSideButton = true,
41405
41405
  onSideButtonClick = () => {},
41406
- sideButtonColor = '#066768',
41407
- sideButtonHoverColor = '#388586',
41406
+ sideButtonColor = "#066768",
41407
+ sideButtonHoverColor = "#388586",
41408
41408
  children = null,
41409
- tableBodyHeight = '728px',
41409
+ tableBodyHeight = "728px",
41410
41410
  isLoading = false,
41411
- isLoadingText = 'Loading Events...',
41411
+ isLoadingText = "Loading Events...",
41412
41412
  onLastRowsReached = () => {},
41413
41413
  lastRowsThreshold = 3,
41414
41414
  onSendClick = () => {},
@@ -41421,7 +41421,11 @@ const Table = /*#__PURE__*/React$1.forwardRef((props, ref) => {
41421
41421
  // New props for focus management
41422
41422
  resetTableFocus = false,
41423
41423
  onTableFocusChange = () => {},
41424
- clearFocusOnOutsideClick = true
41424
+ clearFocusOnOutsideClick = true,
41425
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41426
+ isEditMode = false,
41427
+ editRowIndex = -1
41428
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41425
41429
  } = props;
41426
41430
  const scrollWrapperRef = React$1.useRef(null);
41427
41431
  const tableBodyRef = React$1.useRef(null);
@@ -41470,13 +41474,17 @@ const Table = /*#__PURE__*/React$1.forwardRef((props, ref) => {
41470
41474
  }
41471
41475
  }
41472
41476
  };
41473
- scrollWrapper.addEventListener('scroll', handleScroll);
41474
- return () => scrollWrapper.removeEventListener('scroll', handleScroll);
41477
+ scrollWrapper.addEventListener("scroll", handleScroll);
41478
+ return () => scrollWrapper.removeEventListener("scroll", handleScroll);
41475
41479
  }, [onLastRowsReached, data.length, lastRowsThreshold, hasTriggered]);
41476
41480
 
41477
- // Handle outside click to clear focus
41481
+ // Handle outside click to clear focus - UPDATED to respect edit mode
41478
41482
  React$1.useEffect(() => {
41479
- if (!clearFocusOnOutsideClick) return;
41483
+ // if (!clearFocusOnOutsideClick) return;
41484
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41485
+ if (!clearFocusOnOutsideClick || isEditMode) return; // Don't clear focus during edit mode
41486
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41487
+
41480
41488
  const handleOutsideClick = event => {
41481
41489
  if (tableContainerRef.current && !tableContainerRef.current.contains(event.target)) {
41482
41490
  // Click is outside the table container
@@ -41485,15 +41493,18 @@ const Table = /*#__PURE__*/React$1.forwardRef((props, ref) => {
41485
41493
  }
41486
41494
  }
41487
41495
  };
41488
- document.addEventListener('mousedown', handleOutsideClick);
41496
+ document.addEventListener("mousedown", handleOutsideClick);
41489
41497
  return () => {
41490
- document.removeEventListener('mousedown', handleOutsideClick);
41498
+ document.removeEventListener("mousedown", handleOutsideClick);
41491
41499
  };
41492
- }, [clearFocusOnOutsideClick]);
41500
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41501
+ }, [clearFocusOnOutsideClick, isEditMode]); // Added isEditMode to dependency array
41502
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41503
+
41493
41504
  return /*#__PURE__*/React__default["default"].createElement(TableWrapper, {
41494
41505
  width: width,
41495
41506
  height: height
41496
- }, /*#__PURE__*/React__default["default"].createElement(NoInfoFound, null, /*#__PURE__*/React__default["default"].createElement(TableTop, null, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(Title$7, null, tableTitle), !hideRowsCounter && /*#__PURE__*/React__default["default"].createElement(SubTitle, null, data.length === 0 ? 'No Events' : `${counter} Events`)), showSideButton && /*#__PURE__*/React__default["default"].createElement(Button$1, {
41507
+ }, /*#__PURE__*/React__default["default"].createElement(NoInfoFound, null, /*#__PURE__*/React__default["default"].createElement(TableTop, null, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(Title$7, null, tableTitle), !hideRowsCounter && /*#__PURE__*/React__default["default"].createElement(SubTitle, null, data.length === 0 ? "No Events" : `${counter} Events`)), showSideButton && /*#__PURE__*/React__default["default"].createElement(Button$1, {
41497
41508
  height: "45px",
41498
41509
  leftIcon: "Plus",
41499
41510
  text: "New Event",
@@ -41526,6 +41537,11 @@ const Table = /*#__PURE__*/React$1.forwardRef((props, ref) => {
41526
41537
  buttonColor: buttonColor,
41527
41538
  resetFocus: resetTableFocus,
41528
41539
  onFocusChange: handleTableFocusChange
41540
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41541
+ ,
41542
+ isEditMode: isEditMode,
41543
+ editRowIndex: editRowIndex
41544
+ //NEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEWNEW
41529
41545
  })), data.length === 0 && /*#__PURE__*/React__default["default"].createElement(NoEventsParent, null, /*#__PURE__*/React__default["default"].createElement(NoEventsWrapper, null, showNoDataInSearch ? /*#__PURE__*/React__default["default"].createElement(NoDataInSearchIcon, null) : /*#__PURE__*/React__default["default"].createElement(NoEvents, null)), /*#__PURE__*/React__default["default"].createElement(NoEventsMessage, null, showNoDataInSearch ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("strong", null, noDataInSearchTitle), /*#__PURE__*/React__default["default"].createElement("br", null), noDataInSearchMessage) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("strong", null, "You haven't created any events yet"), /*#__PURE__*/React__default["default"].createElement("br", null), "Let's get started and create your first one!")), !showNoDataInSearch && /*#__PURE__*/React__default["default"].createElement(Button$1, {
41530
41546
  height: "45px",
41531
41547
  leftIcon: "Plus",
@@ -41547,7 +41563,7 @@ const Table = /*#__PURE__*/React$1.forwardRef((props, ref) => {
41547
41563
  });
41548
41564
 
41549
41565
  // Add displayName for better debugging
41550
- Table.displayName = 'Table';
41566
+ Table.displayName = "Table";
41551
41567
 
41552
41568
  const Card = styled__default["default"].div`
41553
41569
  background: ${props => props.backgroundColor};
@@ -51208,7 +51224,8 @@ const ItemManagerPanel = _ref => {
51208
51224
  size: "small",
51209
51225
  text: hasVendorsWithPackages() ? "Add Vendor" : "First Vendor",
51210
51226
  type: "primary",
51211
- textColor: linkColor
51227
+ textColor: linkColor,
51228
+ disabled: disableSection
51212
51229
  }))), /*#__PURE__*/React__default["default"].createElement(VendorListWrapper$2, {
51213
51230
  disabled: disableSection,
51214
51231
  headerHeight: headerHeight