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.d.ts CHANGED
@@ -1509,7 +1509,7 @@ declare function RangePop(props: any): react_jsx_runtime.JSX.Element;
1509
1509
 
1510
1510
  declare function SearchInput(props: any): react_jsx_runtime.JSX.Element;
1511
1511
 
1512
- declare function ItemManagerPanel({ width, height, disableSection, onSendForms, editMode, disabledSendForms, AllFormsSent, itemAndPackage, setItemAndPackage, linkColor, backgroundColor, buttonTooltipText, }: {
1512
+ declare function ItemManagerPanel({ width, height, disableSection, onSendForms, editMode, disabledSendForms, AllFormsSent, itemAndPackage, setItemAndPackage, linkColor, backgroundColor, buttonTooltipText, maxVisibleVendors }: {
1513
1513
  width?: string;
1514
1514
  height?: string;
1515
1515
  disableSection?: boolean;
@@ -1522,6 +1522,7 @@ declare function ItemManagerPanel({ width, height, disableSection, onSendForms,
1522
1522
  linkColor?: string;
1523
1523
  backgroundColor?: string;
1524
1524
  buttonTooltipText?: string;
1525
+ maxVisibleVendors?: number;
1525
1526
  }): react_jsx_runtime.JSX.Element;
1526
1527
 
1527
1528
  /**
package/dist/index.esm.js CHANGED
@@ -24318,24 +24318,23 @@ const IconContainer$2 = styled.div`
24318
24318
  cursor: pointer;
24319
24319
  `;
24320
24320
 
24321
- const QuickFilterDropdownMultiSelection = _ref => {
24322
- let {
24323
- label,
24324
- labelEmptyValue,
24325
- options,
24326
- selectedValue,
24327
- placeHolder,
24328
- onChange,
24329
- required,
24330
- disabled,
24331
- width,
24332
- error,
24333
- errorMessage,
24334
- labelColor,
24335
- xIconShow,
24336
- checkBoxColor,
24337
- showLabelOnTop
24338
- } = _ref;
24321
+ const QuickFilterDropdownMultiSelection = ({
24322
+ label,
24323
+ labelEmptyValue,
24324
+ options,
24325
+ selectedValue,
24326
+ placeHolder,
24327
+ onChange,
24328
+ required,
24329
+ disabled,
24330
+ width,
24331
+ error,
24332
+ errorMessage,
24333
+ labelColor,
24334
+ xIconShow,
24335
+ checkBoxColor,
24336
+ showLabelOnTop
24337
+ }) => {
24339
24338
  const [isFocused, setIsFocused] = useState(false);
24340
24339
  const [showOptions, setShowOptions] = useState(false);
24341
24340
  const [inputValue, setInputValue] = useState('');
@@ -43452,6 +43451,7 @@ const Tooltip = styled.div`
43452
43451
  z-index: 10;
43453
43452
  white-space: nowrap;
43454
43453
  transition: opacity 0.2s;
43454
+ max-height: 600px;
43455
43455
 
43456
43456
  &::after {
43457
43457
  content: '';
@@ -43469,7 +43469,6 @@ const ExpandButtonWrapper = styled.div`
43469
43469
  display: flex;
43470
43470
  justify-content: center;
43471
43471
  align-items: center;
43472
-
43473
43472
  &:hover ${Tooltip},
43474
43473
  &:focus-within ${Tooltip} {
43475
43474
  visibility: visible;
@@ -51830,14 +51829,20 @@ var successAnimation = {
51830
51829
  };
51831
51830
 
51832
51831
  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"];
51833
- const COLLAPSED_COUNT = 7;
51834
51832
  const SuccessScreen = ({
51835
51833
  width = "100%",
51836
51834
  height = "100%",
51837
51835
  packagesCount = 7,
51838
51836
  vendorsCount = 3,
51839
- vendors = SAMPLE_VENDORS
51837
+ vendors = SAMPLE_VENDORS,
51838
+ maxVisibleVendors = 12
51840
51839
  }) => {
51840
+ const [visibleCount, setVisibleCount] = useState(() => Math.min(vendors.length, maxVisibleVendors));
51841
+ useEffect(() => {
51842
+ const count = Math.min(maxVisibleVendors, vendors.length);
51843
+ setVisibleCount(count);
51844
+ }, [vendors, maxVisibleVendors]);
51845
+ const hiddenVendors = vendors.slice(visibleCount);
51841
51846
  return /*#__PURE__*/React$1.createElement(SuccessScreenContainer, {
51842
51847
  width: width,
51843
51848
  height: height
@@ -51848,9 +51853,9 @@ const SuccessScreen = ({
51848
51853
  },
51849
51854
  animationData: successAnimation,
51850
51855
  loop: false
51851
- })), /*#__PURE__*/React$1.createElement(SuccessHeader, null, /*#__PURE__*/React$1.createElement(SuccessTitle, null, "Packages", /*#__PURE__*/React$1.createElement("br", null), " Successfully Sent"), /*#__PURE__*/React$1.createElement(SuccessSubtitle, null, /*#__PURE__*/React$1.createElement("b", null, packagesCount), " packages have been sent to", " ", /*#__PURE__*/React$1.createElement("b", null, vendorsCount), " vendors")), /*#__PURE__*/React$1.createElement(DividerLine, null), /*#__PURE__*/React$1.createElement(VendorListWrapper, null, /*#__PURE__*/React$1.createElement(VendorList, null, vendors.slice(0, COLLAPSED_COUNT).map((vendor, idx) => /*#__PURE__*/React$1.createElement(VendorListItem, {
51856
+ })), /*#__PURE__*/React$1.createElement(SuccessHeader, null, /*#__PURE__*/React$1.createElement(SuccessTitle, null, "Packages", /*#__PURE__*/React$1.createElement("br", null), " Successfully Sent"), /*#__PURE__*/React$1.createElement(SuccessSubtitle, null, /*#__PURE__*/React$1.createElement("b", null, packagesCount), " packages have been sent to", " ", /*#__PURE__*/React$1.createElement("b", null, vendorsCount), " vendors")), /*#__PURE__*/React$1.createElement(DividerLine, null), /*#__PURE__*/React$1.createElement(VendorListWrapper, null, /*#__PURE__*/React$1.createElement(VendorList, null, vendors.slice(0, visibleCount).map((vendor, idx) => /*#__PURE__*/React$1.createElement(VendorListItem, {
51852
51857
  key: idx
51853
- }, vendor))), /*#__PURE__*/React$1.createElement(ExpandButtonWrapper, null, /*#__PURE__*/React$1.createElement(ExpandButton, {
51858
+ }, vendor))), hiddenVendors.length > 0 && /*#__PURE__*/React$1.createElement(ExpandButtonWrapper, null, /*#__PURE__*/React$1.createElement(ExpandButton, {
51854
51859
  tabIndex: 0
51855
51860
  }, "\u2022\u2022\u2022"), /*#__PURE__*/React$1.createElement(Tooltip, null, vendors.map((vendor, idx) => /*#__PURE__*/React$1.createElement(React$1.Fragment, {
51856
51861
  key: idx
@@ -51870,7 +51875,8 @@ const ItemManagerPanel = _ref => {
51870
51875
  setItemAndPackage,
51871
51876
  linkColor = "#212121",
51872
51877
  backgroundColor = 'white',
51873
- buttonTooltipText = "Please fill out all forms before sending."
51878
+ buttonTooltipText = "Please fill out all forms before sending.",
51879
+ maxVisibleVendors = 12
51874
51880
  } = _ref;
51875
51881
  const [screen, setScreen] = useState("initial");
51876
51882
  const [selectedVendor, setSelectedVendor] = useState(null);
@@ -52025,7 +52031,8 @@ const ItemManagerPanel = _ref => {
52025
52031
  height: height,
52026
52032
  packagesCount: itemAndPackage.filter(item => item.packages !== null).reduce((acc, item) => acc + (item.packages ? item.packages.length : 0), 0),
52027
52033
  vendorsCount: itemAndPackage.filter(item => item.packages !== null).length.toString(),
52028
- vendors: itemAndPackage.filter(item => item.packages !== null).map(item => item.name)
52034
+ vendors: itemAndPackage.filter(item => item.packages !== null).map(item => item.name),
52035
+ maxVisibleVendors: maxVisibleVendors
52029
52036
  });
52030
52037
  }
52031
52038
  if (screen === "subitemdetail") {
@@ -52254,16 +52261,19 @@ const DropdownList = styled.ul`
52254
52261
  top: 110%;
52255
52262
  `}
52256
52263
  `;
52264
+ const SectionDiv = styled.div`
52265
+ &:nth-child(2),
52266
+ &:nth-child(4){
52267
+ border-top: 1px solid #e6e2e2ff;
52268
+ padding-top: 16px;
52269
+ }
52270
+ `;
52257
52271
  const SectionTitle = styled.li`
52258
52272
  font-size: 14px;
52259
52273
  color: #bdbdbd;
52260
52274
  padding: 12px 12px 0 12px;
52261
52275
  font-weight: 500;
52262
52276
  pointer-events: none;
52263
- &:not(:first-child) {
52264
- border-top: 1px solid #bdbdbd;
52265
- padding-top: 16px;
52266
- }
52267
52277
  `;
52268
52278
  const DropdownItem = styled.li`
52269
52279
  padding: 8px 16px;
@@ -52808,9 +52818,9 @@ const OverlayDropdown = _ref => {
52808
52818
  dropdownMaxHeight: dropdownMaxHeight,
52809
52819
  width: width,
52810
52820
  position: dropdownPosition
52811
- }, dataToRender.map((group, groupIndex) => group.items && group.items.length > 0 && /*#__PURE__*/React$1.createElement("div", {
52821
+ }, dataToRender.map((group, groupIndex) => group.items && group.items.length > 0 && /*#__PURE__*/React$1.createElement(SectionDiv, {
52812
52822
  key: group.overlayCode
52813
- }, /*#__PURE__*/React$1.createElement(SectionTitle, null, group.overlayName), group.items.map(item => /*#__PURE__*/React$1.createElement(DropdownItem, {
52823
+ }, (groupIndex === 0 || groupIndex === 3) && /*#__PURE__*/React$1.createElement(SectionTitle, null, group.overlayName), group.items.map(item => /*#__PURE__*/React$1.createElement(DropdownItem, {
52814
52824
  key: item.value,
52815
52825
  selected: item.value === value,
52816
52826
  selectedColor: selectedColor,