sag_components 2.0.0-beta145 → 2.0.0-beta147

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
@@ -24328,24 +24328,23 @@ const IconContainer$2 = styled__default["default"].div`
24328
24328
  cursor: pointer;
24329
24329
  `;
24330
24330
 
24331
- const QuickFilterDropdownMultiSelection = _ref => {
24332
- let {
24333
- label,
24334
- labelEmptyValue,
24335
- options,
24336
- selectedValue,
24337
- placeHolder,
24338
- onChange,
24339
- required,
24340
- disabled,
24341
- width,
24342
- error,
24343
- errorMessage,
24344
- labelColor,
24345
- xIconShow,
24346
- checkBoxColor,
24347
- showLabelOnTop
24348
- } = _ref;
24331
+ const QuickFilterDropdownMultiSelection = ({
24332
+ label,
24333
+ labelEmptyValue,
24334
+ options,
24335
+ selectedValue,
24336
+ placeHolder,
24337
+ onChange,
24338
+ required,
24339
+ disabled,
24340
+ width,
24341
+ error,
24342
+ errorMessage,
24343
+ labelColor,
24344
+ xIconShow,
24345
+ checkBoxColor,
24346
+ showLabelOnTop
24347
+ }) => {
24349
24348
  const [isFocused, setIsFocused] = React$1.useState(false);
24350
24349
  const [showOptions, setShowOptions] = React$1.useState(false);
24351
24350
  const [inputValue, setInputValue] = React$1.useState('');
@@ -43462,6 +43461,7 @@ const Tooltip = styled__default["default"].div`
43462
43461
  z-index: 10;
43463
43462
  white-space: nowrap;
43464
43463
  transition: opacity 0.2s;
43464
+ max-height: 600px;
43465
43465
 
43466
43466
  &::after {
43467
43467
  content: '';
@@ -43479,7 +43479,6 @@ const ExpandButtonWrapper = styled__default["default"].div`
43479
43479
  display: flex;
43480
43480
  justify-content: center;
43481
43481
  align-items: center;
43482
-
43483
43482
  &:hover ${Tooltip},
43484
43483
  &:focus-within ${Tooltip} {
43485
43484
  visibility: visible;
@@ -51840,14 +51839,20 @@ var successAnimation = {
51840
51839
  };
51841
51840
 
51842
51841
  const SAMPLE_VENDORS = ["Colgate-Palmolive", "Unilever", "P&G", "Kellog’s", "Coca-Cola Company", "Pepsico", "Colgate-Palmolive", "Unilever", "P&G", "Kellog’s", "Coca-Cola Company", "Pepsico", "Colgate-Palmolive", "Unilever", "P&G", "Kellog’s", "Coca-Cola Company", "Pepsico"];
51843
- const COLLAPSED_COUNT = 7;
51844
51842
  const SuccessScreen = ({
51845
51843
  width = "100%",
51846
51844
  height = "100%",
51847
51845
  packagesCount = 7,
51848
51846
  vendorsCount = 3,
51849
- vendors = SAMPLE_VENDORS
51847
+ vendors = SAMPLE_VENDORS,
51848
+ maxVisibleVendors = 12
51850
51849
  }) => {
51850
+ const [visibleCount, setVisibleCount] = React$1.useState(() => Math.min(vendors.length, maxVisibleVendors));
51851
+ React$1.useEffect(() => {
51852
+ const count = Math.min(maxVisibleVendors, vendors.length);
51853
+ setVisibleCount(count);
51854
+ }, [vendors, maxVisibleVendors]);
51855
+ const hiddenVendors = vendors.slice(visibleCount);
51851
51856
  return /*#__PURE__*/React__default["default"].createElement(SuccessScreenContainer, {
51852
51857
  width: width,
51853
51858
  height: height
@@ -51858,9 +51863,9 @@ const SuccessScreen = ({
51858
51863
  },
51859
51864
  animationData: successAnimation,
51860
51865
  loop: false
51861
- })), /*#__PURE__*/React__default["default"].createElement(SuccessHeader, null, /*#__PURE__*/React__default["default"].createElement(SuccessTitle, null, "Packages", /*#__PURE__*/React__default["default"].createElement("br", null), " Successfully Sent"), /*#__PURE__*/React__default["default"].createElement(SuccessSubtitle, null, /*#__PURE__*/React__default["default"].createElement("b", null, packagesCount), " packages have been sent to", " ", /*#__PURE__*/React__default["default"].createElement("b", null, vendorsCount), " vendors")), /*#__PURE__*/React__default["default"].createElement(DividerLine, null), /*#__PURE__*/React__default["default"].createElement(VendorListWrapper, null, /*#__PURE__*/React__default["default"].createElement(VendorList, null, vendors.slice(0, COLLAPSED_COUNT).map((vendor, idx) => /*#__PURE__*/React__default["default"].createElement(VendorListItem, {
51866
+ })), /*#__PURE__*/React__default["default"].createElement(SuccessHeader, null, /*#__PURE__*/React__default["default"].createElement(SuccessTitle, null, "Packages", /*#__PURE__*/React__default["default"].createElement("br", null), " Successfully Sent"), /*#__PURE__*/React__default["default"].createElement(SuccessSubtitle, null, /*#__PURE__*/React__default["default"].createElement("b", null, packagesCount), " packages have been sent to", " ", /*#__PURE__*/React__default["default"].createElement("b", null, vendorsCount), " vendors")), /*#__PURE__*/React__default["default"].createElement(DividerLine, null), /*#__PURE__*/React__default["default"].createElement(VendorListWrapper, null, /*#__PURE__*/React__default["default"].createElement(VendorList, null, vendors.slice(0, visibleCount).map((vendor, idx) => /*#__PURE__*/React__default["default"].createElement(VendorListItem, {
51862
51867
  key: idx
51863
- }, vendor))), /*#__PURE__*/React__default["default"].createElement(ExpandButtonWrapper, null, /*#__PURE__*/React__default["default"].createElement(ExpandButton, {
51868
+ }, vendor))), hiddenVendors.length > 0 && /*#__PURE__*/React__default["default"].createElement(ExpandButtonWrapper, null, /*#__PURE__*/React__default["default"].createElement(ExpandButton, {
51864
51869
  tabIndex: 0
51865
51870
  }, "\u2022\u2022\u2022"), /*#__PURE__*/React__default["default"].createElement(Tooltip, null, vendors.map((vendor, idx) => /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
51866
51871
  key: idx
@@ -51880,7 +51885,8 @@ const ItemManagerPanel = _ref => {
51880
51885
  setItemAndPackage,
51881
51886
  linkColor = "#212121",
51882
51887
  backgroundColor = 'white',
51883
- buttonTooltipText = "Please fill out all forms before sending."
51888
+ buttonTooltipText = "Please fill out all forms before sending.",
51889
+ maxVisibleVendors = 12
51884
51890
  } = _ref;
51885
51891
  const [screen, setScreen] = React$1.useState("initial");
51886
51892
  const [selectedVendor, setSelectedVendor] = React$1.useState(null);
@@ -52035,7 +52041,8 @@ const ItemManagerPanel = _ref => {
52035
52041
  height: height,
52036
52042
  packagesCount: itemAndPackage.filter(item => item.packages !== null).reduce((acc, item) => acc + (item.packages ? item.packages.length : 0), 0),
52037
52043
  vendorsCount: itemAndPackage.filter(item => item.packages !== null).length.toString(),
52038
- vendors: itemAndPackage.filter(item => item.packages !== null).map(item => item.name)
52044
+ vendors: itemAndPackage.filter(item => item.packages !== null).map(item => item.name),
52045
+ maxVisibleVendors: maxVisibleVendors
52039
52046
  });
52040
52047
  }
52041
52048
  if (screen === "subitemdetail") {
@@ -52264,16 +52271,19 @@ const DropdownList = styled__default["default"].ul`
52264
52271
  top: 110%;
52265
52272
  `}
52266
52273
  `;
52274
+ const SectionDiv = styled__default["default"].div`
52275
+ &:nth-child(2),
52276
+ &:nth-child(4){
52277
+ border-top: 1px solid #e6e2e2ff;
52278
+ padding-top: 16px;
52279
+ }
52280
+ `;
52267
52281
  const SectionTitle = styled__default["default"].li`
52268
52282
  font-size: 14px;
52269
52283
  color: #bdbdbd;
52270
52284
  padding: 12px 12px 0 12px;
52271
52285
  font-weight: 500;
52272
52286
  pointer-events: none;
52273
- &:not(:first-child) {
52274
- border-top: 1px solid #bdbdbd;
52275
- padding-top: 16px;
52276
- }
52277
52287
  `;
52278
52288
  const DropdownItem = styled__default["default"].li`
52279
52289
  padding: 8px 16px;
@@ -52818,9 +52828,9 @@ const OverlayDropdown = _ref => {
52818
52828
  dropdownMaxHeight: dropdownMaxHeight,
52819
52829
  width: width,
52820
52830
  position: dropdownPosition
52821
- }, dataToRender.map((group, groupIndex) => group.items && group.items.length > 0 && /*#__PURE__*/React__default["default"].createElement("div", {
52831
+ }, dataToRender.map((group, groupIndex) => group.items && group.items.length > 0 && /*#__PURE__*/React__default["default"].createElement(SectionDiv, {
52822
52832
  key: group.overlayCode
52823
- }, /*#__PURE__*/React__default["default"].createElement(SectionTitle, null, group.overlayName), group.items.map(item => /*#__PURE__*/React__default["default"].createElement(DropdownItem, {
52833
+ }, (groupIndex === 0 || groupIndex === 3) && /*#__PURE__*/React__default["default"].createElement(SectionTitle, null, group.overlayName), group.items.map(item => /*#__PURE__*/React__default["default"].createElement(DropdownItem, {
52824
52834
  key: item.value,
52825
52835
  selected: item.value === value,
52826
52836
  selectedColor: selectedColor,