sag_components 2.0.0-beta122 → 2.0.0-beta124
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 +23 -18
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +23 -18
- package/dist/index.js.map +1 -1
- package/dist/types/components/ItemManagerPanel/NewItemList/NewItemList.style.d.ts +1 -1
- package/dist/types/components/ItemManagerPanel/NewSubitem/NewSubitem.d.ts +1 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -41583,9 +41583,13 @@ const VendorSelectionContainer = styled(Card)`
|
|
|
41583
41583
|
overflow: hidden;
|
|
41584
41584
|
font-family: 'Poppins', sans-serif;
|
|
41585
41585
|
`;
|
|
41586
|
+
const VendorHeader$1 = styled.div`
|
|
41587
|
+
padding: 12px 16px 20px;
|
|
41588
|
+
text-align: left;
|
|
41589
|
+
color: #212121;
|
|
41590
|
+
`;
|
|
41586
41591
|
const VendorSelectionTitle = styled.h5`
|
|
41587
41592
|
text-align: left;
|
|
41588
|
-
color: #212121;
|
|
41589
41593
|
margin: 0 0 16px;
|
|
41590
41594
|
font-size: 18px;
|
|
41591
41595
|
padding-left: 6px;
|
|
@@ -41593,14 +41597,9 @@ const VendorSelectionTitle = styled.h5`
|
|
|
41593
41597
|
`;
|
|
41594
41598
|
const VendorBackTitle = styled.span`
|
|
41595
41599
|
margin-left: 4px;
|
|
41596
|
-
color: #212121;
|
|
41597
41600
|
font-size: 16px;
|
|
41598
41601
|
font-weight: 400;
|
|
41599
41602
|
`;
|
|
41600
|
-
const VendorHeader$1 = styled.div`
|
|
41601
|
-
padding: 12px 16px 20px;
|
|
41602
|
-
text-align: left;
|
|
41603
|
-
`;
|
|
41604
41603
|
const VendorRoute = styled.div`
|
|
41605
41604
|
display: flex;
|
|
41606
41605
|
align-items: center;
|
|
@@ -41612,7 +41611,6 @@ const VendorBackButton = styled.button`
|
|
|
41612
41611
|
border: none;
|
|
41613
41612
|
background: none;
|
|
41614
41613
|
font-size: 22px;
|
|
41615
|
-
color: #212121;
|
|
41616
41614
|
cursor: pointer;
|
|
41617
41615
|
`;
|
|
41618
41616
|
const VendorSearch = styled.input`
|
|
@@ -41626,7 +41624,7 @@ const VendorSearch = styled.input`
|
|
|
41626
41624
|
outline: none;
|
|
41627
41625
|
`;
|
|
41628
41626
|
const VendorSearchResult = styled.span`
|
|
41629
|
-
|
|
41627
|
+
display: block;
|
|
41630
41628
|
font-size: 16px;
|
|
41631
41629
|
font-weight: 400;
|
|
41632
41630
|
height: 20px;
|
|
@@ -41742,10 +41740,10 @@ const NewItemList = ({
|
|
|
41742
41740
|
}), /*#__PURE__*/React$1.createElement(VendorSearchResult, null, search !== "" ? `${filteredItems.length === 0 ? "No" : filteredItems.length} Vendors Found` : " ")), /*#__PURE__*/React$1.createElement(VendorListWrapper$1, {
|
|
41743
41741
|
headerHeight: headerHeight
|
|
41744
41742
|
}, /*#__PURE__*/React$1.createElement(VendorList$1, null, filteredItems.map((item, idx) => /*#__PURE__*/React$1.createElement(VendorItem, {
|
|
41743
|
+
key: idx,
|
|
41745
41744
|
onClick: e => {
|
|
41746
41745
|
if (onVendorClick) onVendorClick(item);
|
|
41747
|
-
}
|
|
41748
|
-
key: idx
|
|
41746
|
+
}
|
|
41749
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)))))));
|
|
41750
41748
|
};
|
|
41751
41749
|
|
|
@@ -42148,8 +42146,7 @@ const NewSubitem = ({
|
|
|
42148
42146
|
packageObject,
|
|
42149
42147
|
vendor,
|
|
42150
42148
|
onBack,
|
|
42151
|
-
addNewPackage
|
|
42152
|
-
linkColor
|
|
42149
|
+
addNewPackage
|
|
42153
42150
|
}) => {
|
|
42154
42151
|
const [negotiatedBrands, setNegotiatedBrands] = useState("");
|
|
42155
42152
|
const [negotiatedComponent, setNegotiatedComponent] = useState("Scale");
|
|
@@ -42170,7 +42167,8 @@ const NewSubitem = ({
|
|
|
42170
42167
|
rightIcon: "none",
|
|
42171
42168
|
size: "small",
|
|
42172
42169
|
text: "Cancel",
|
|
42173
|
-
type: "secondary"
|
|
42170
|
+
type: "secondary",
|
|
42171
|
+
borderRadius: "8px"
|
|
42174
42172
|
}), /*#__PURE__*/React$1.createElement(Button$1, {
|
|
42175
42173
|
leftIcon: "none",
|
|
42176
42174
|
onClick: () => {
|
|
@@ -42181,8 +42179,11 @@ const NewSubitem = ({
|
|
|
42181
42179
|
disabled: !isApplyEnabled,
|
|
42182
42180
|
text: "Apply",
|
|
42183
42181
|
type: "primary",
|
|
42184
|
-
|
|
42185
|
-
|
|
42182
|
+
borderRadius: "8px",
|
|
42183
|
+
borderColor: "#066768",
|
|
42184
|
+
backgroundColor: "#066768",
|
|
42185
|
+
hoverBackgroundColor: "#388586",
|
|
42186
|
+
hoverBorderColor: "#388586"
|
|
42186
42187
|
})), /*#__PURE__*/React$1.createElement(Divider, null), /*#__PURE__*/React$1.createElement("form", null, /*#__PURE__*/React$1.createElement(NegotiatedContainer, null, /*#__PURE__*/React$1.createElement(AddNegotiatedBrand, null, "Add Negotiated Brand/s ", /*#__PURE__*/React$1.createElement("span", {
|
|
42187
42188
|
style: {
|
|
42188
42189
|
color: "red"
|
|
@@ -50857,8 +50858,10 @@ const ItemManagerPanel = _ref => {
|
|
|
50857
50858
|
setHeaderHeight(headerRef.current.offsetHeight);
|
|
50858
50859
|
}
|
|
50859
50860
|
}, []);
|
|
50861
|
+
const hasVendorsWithPackages = () => {
|
|
50862
|
+
return itemAndPackage.some(item => item.packages !== null && Array.isArray(item.packages) && item.packages.length > 0);
|
|
50863
|
+
};
|
|
50860
50864
|
const handleVendorClick = vendor => {
|
|
50861
|
-
// console.log("Vendor clicked:", vendor);
|
|
50862
50865
|
setSelectedVendor(vendor);
|
|
50863
50866
|
setScreen("subitem");
|
|
50864
50867
|
};
|
|
@@ -51040,7 +51043,7 @@ const ItemManagerPanel = _ref => {
|
|
|
51040
51043
|
onClick: () => setScreen("list"),
|
|
51041
51044
|
rightIcon: "none",
|
|
51042
51045
|
size: "small",
|
|
51043
|
-
text: "First Vendor",
|
|
51046
|
+
text: hasVendorsWithPackages() ? "Add Vendor" : "First Vendor",
|
|
51044
51047
|
type: "primary",
|
|
51045
51048
|
textColor: linkColor
|
|
51046
51049
|
}))), /*#__PURE__*/React$1.createElement(VendorListWrapper$2, {
|
|
@@ -51052,7 +51055,9 @@ const ItemManagerPanel = _ref => {
|
|
|
51052
51055
|
onClick: e => {
|
|
51053
51056
|
handleVendorClick(item);
|
|
51054
51057
|
}
|
|
51055
|
-
}, /*#__PURE__*/React$1.createElement(VendorNameAndPackagesContainer$1, null, /*#__PURE__*/React$1.createElement(VendorName$2, null, item.name), item.packages.length === 0 && /*#__PURE__*/React$1.createElement(Subtitle$1, null, "No Packages"), item.packages.length > 0 && /*#__PURE__*/React$1.createElement(Subtitle$1, null, item.packages.length, "
|
|
51058
|
+
}, /*#__PURE__*/React$1.createElement(VendorNameAndPackagesContainer$1, null, /*#__PURE__*/React$1.createElement(VendorName$2, null, item.name), item.packages.length === 0 && /*#__PURE__*/React$1.createElement(Subtitle$1, null, "No Packages"), item.packages.length > 0 && /*#__PURE__*/React$1.createElement(Subtitle$1, null, item.packages.length, " Package", item.packages.length !== 1 ? 's' : '',
|
|
51059
|
+
// Check if all packages have a status
|
|
51060
|
+
item.packages.every(pkg => pkg.hasOwnProperty('status') && pkg.status != null && pkg.status !== undefined && pkg.status !== '') ? ' Sent' : '')), /*#__PURE__*/React$1.createElement(VendorChevron$1, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null))), /*#__PURE__*/React$1.createElement(Trash$1, {
|
|
51056
51061
|
className: "trash-icon",
|
|
51057
51062
|
onClick: () => {
|
|
51058
51063
|
onDeleteVendor(item);
|