sag_components 2.0.0-beta118 → 2.0.0-beta119

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
@@ -41469,12 +41469,15 @@ styled.input`
41469
41469
  font-size: 15px;
41470
41470
  outline: none;
41471
41471
  `;
41472
- const VendorList$2 = styled.div`
41473
- flex: 1;
41474
- overflow-y: auto;
41475
- padding: 0 0 8px 0;
41472
+ const VendorListWrapper$2 = styled.div`
41473
+ height: calc(100% - ${props => props.headerHeight}px);
41474
+ background: #fff;
41475
+ width: 100%;
41476
+ overflow: auto;
41476
41477
  border-radius: 0 0 8px 8px;
41477
41478
  `;
41479
+ const VendorList$2 = styled.div`
41480
+ `;
41478
41481
  const VendorItem$1 = styled.div`
41479
41482
  display: flex;
41480
41483
  align-items: center;
@@ -41631,13 +41634,15 @@ const VendorNameAndPackagesContainer = styled.div`
41631
41634
  margin-left: 52px;
41632
41635
  flex-direction: column;
41633
41636
  `;
41634
- const VendorList$1 = styled.div`
41637
+ const VendorListWrapper$1 = styled.div`
41635
41638
  height: calc(100% - ${props => props.headerHeight}px);
41636
- overflow-y: auto;
41637
41639
  background: #fff;
41638
41640
  width: 100%;
41641
+ overflow: auto;
41639
41642
  border-radius: 0 0 8px 8px;
41640
41643
  `;
41644
+ const VendorList$1 = styled.div`
41645
+ `;
41641
41646
  const VendorItem = styled.div`
41642
41647
  display: flex;
41643
41648
  align-items: center;
@@ -41732,14 +41737,14 @@ const NewItemList = ({
41732
41737
  placeholder: "Search",
41733
41738
  value: search,
41734
41739
  onChange: e => setSearch(e.target.value)
41735
- }), /*#__PURE__*/React$1.createElement(VendorSearchResult, null, search !== "" ? `${filteredItems.length === 0 ? "No" : filteredItems.length} Vendors Found` : " ")), /*#__PURE__*/React$1.createElement(VendorList$1, {
41740
+ }), /*#__PURE__*/React$1.createElement(VendorSearchResult, null, search !== "" ? `${filteredItems.length === 0 ? "No" : filteredItems.length} Vendors Found` : " ")), /*#__PURE__*/React$1.createElement(VendorListWrapper$1, {
41736
41741
  headerHeight: headerHeight
41737
- }, filteredItems.map((item, idx) => /*#__PURE__*/React$1.createElement(VendorItem, {
41742
+ }, /*#__PURE__*/React$1.createElement(VendorList$1, null, filteredItems.map((item, idx) => /*#__PURE__*/React$1.createElement(VendorItem, {
41738
41743
  onClick: e => {
41739
41744
  if (onVendorClick) onVendorClick(item);
41740
41745
  },
41741
41746
  key: idx
41742
- }, /*#__PURE__*/React$1.createElement(VendorNameAndPackagesContainer, null, /*#__PURE__*/React$1.createElement(VendorName$1, null, highlightMatch(item.name, searchLower)), item.packages && /*#__PURE__*/React$1.createElement(VendorPackages, null, `0/${item.packages.length} Packages Sent`)), /*#__PURE__*/React$1.createElement(VendorChevron, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null))))));
41747
+ }, /*#__PURE__*/React$1.createElement(VendorNameAndPackagesContainer, null, /*#__PURE__*/React$1.createElement(VendorName$1, null, highlightMatch(item.name, searchLower)), item.packages && /*#__PURE__*/React$1.createElement(VendorPackages, null, `0/${item.packages.length} Packages Sent`)), /*#__PURE__*/React$1.createElement(VendorChevron, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null)))))));
41743
41748
  };
41744
41749
 
41745
41750
  const NewSubitemContainer$1 = styled(Card)`
@@ -50842,6 +50847,13 @@ const ItemManagerPanel = _ref => {
50842
50847
  const [selectedVendor, setSelectedVendor] = useState(null);
50843
50848
  const [selectedPackage, setSelectedPackage] = useState(null);
50844
50849
  const [isEditingExisting, setIsEditingExisting] = useState(false);
50850
+ const [headerHeight, setHeaderHeight] = useState(0);
50851
+ const headerRef = useRef(null);
50852
+ useEffect(() => {
50853
+ if (headerRef.current) {
50854
+ setHeaderHeight(headerRef.current.offsetHeight);
50855
+ }
50856
+ }, []);
50845
50857
  const handleVendorClick = vendor => {
50846
50858
  // console.log("Vendor clicked:", vendor);
50847
50859
  setSelectedVendor(vendor);
@@ -51026,7 +51038,9 @@ const ItemManagerPanel = _ref => {
51026
51038
  text: "First Vendor",
51027
51039
  type: "primary",
51028
51040
  textColor: linkColor
51029
- })), /*#__PURE__*/React$1.createElement(VendorList$2, null, itemAndPackage.filter(item => item.packages !== null).map((item, idx) => /*#__PURE__*/React$1.createElement(VendorItem$1, {
51041
+ })), /*#__PURE__*/React$1.createElement(VendorListWrapper$2, {
51042
+ headerHeight: headerHeight
51043
+ }, /*#__PURE__*/React$1.createElement(VendorList$2, null, itemAndPackage.filter(item => item.packages !== null).map((item, idx) => /*#__PURE__*/React$1.createElement(VendorItem$1, {
51030
51044
  key: idx
51031
51045
  }, /*#__PURE__*/React$1.createElement(DotContainer, null, item.packages.length === 0 && /*#__PURE__*/React$1.createElement(RedDot, null)), /*#__PURE__*/React$1.createElement(LineContainer, {
51032
51046
  onClick: e => {
@@ -51045,7 +51059,7 @@ const ItemManagerPanel = _ref => {
51045
51059
  xmlns: "http://www.w3.org/2000/svg"
51046
51060
  }, /*#__PURE__*/React$1.createElement("path", {
51047
51061
  d: "M1 16C1 17.1 1.9 18 3 18H11C12.1 18 13 17.1 13 16V4H1V16ZM14 1H10.5L9.5 0H4.5L3.5 1H0V3H14V1Z"
51048
- })))))));
51062
+ }))))))));
51049
51063
  }
51050
51064
  };
51051
51065