sag_components 2.0.0-beta152 → 2.0.0-beta154
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 +2 -1
- package/dist/index.esm.js +45 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +45 -4
- package/dist/index.js.map +1 -1
- package/dist/types/components/ItemManagerPanel/ItemManagerPanel.d.ts +2 -1
- package/dist/types/components/ItemManagerPanel/ItemManagerPanel.stories.d.ts +10 -0
- package/dist/types/icons/UploadIcon.d.ts +7 -0
- package/package.json +1 -1
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, maxVisibleVendors }: {
|
|
1512
|
+
declare function ItemManagerPanel({ width, height, disableSection, onSendForms, editMode, disabledSendForms, AllFormsSent, itemAndPackage, setItemAndPackage, linkColor, backgroundColor, buttonTooltipText, trashTooltipText, 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
|
+
trashTooltipText?: string;
|
|
1525
1526
|
maxVisibleVendors?: number;
|
|
1526
1527
|
}): react_jsx_runtime.JSX.Element;
|
|
1527
1528
|
|
package/dist/index.esm.js
CHANGED
|
@@ -3099,6 +3099,25 @@ const InfoIcon = _ref => {
|
|
|
3099
3099
|
}));
|
|
3100
3100
|
};
|
|
3101
3101
|
|
|
3102
|
+
const UploadIcon = _ref => {
|
|
3103
|
+
let {
|
|
3104
|
+
clicked,
|
|
3105
|
+
color = '#757575',
|
|
3106
|
+
width = '18',
|
|
3107
|
+
height = '18'
|
|
3108
|
+
} = _ref;
|
|
3109
|
+
return /*#__PURE__*/React$1.createElement("svg", {
|
|
3110
|
+
width: width,
|
|
3111
|
+
height: height,
|
|
3112
|
+
viewBox: "0 0 16 16",
|
|
3113
|
+
fill: "none",
|
|
3114
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
3115
|
+
}, /*#__PURE__*/React$1.createElement("path", {
|
|
3116
|
+
d: "M9.3125 1.65625C9.3125 1.30078 9.58594 1 9.96875 1H14.3164C14.6992 1 14.9727 1.30078 14.9727 1.65625V6.03125C14.9727 6.41406 14.6992 6.6875 14.3164 6.6875C13.9609 6.6875 13.6602 6.41406 13.6602 6.03125V3.24219L7.5625 9.33984C7.31641 9.61328 6.90625 9.61328 6.66016 9.33984C6.38672 9.09375 6.38672 8.68359 6.66016 8.41016L12.7578 2.3125H9.96875C9.58594 2.3125 9.3125 2.03906 9.3125 1.65625ZM2.96875 1.875H6.46875C6.82422 1.875 7.125 2.17578 7.125 2.53125C7.125 2.91406 6.82422 3.1875 6.46875 3.1875H2.96875C2.58594 3.1875 2.3125 3.48828 2.3125 3.84375V13.0312C2.3125 13.4141 2.58594 13.6875 2.96875 13.6875H12.1562C12.5117 13.6875 12.8125 13.4141 12.8125 13.0312V9.53125C12.8125 9.17578 13.0859 8.875 13.4688 8.875C13.8242 8.875 14.125 9.17578 14.125 9.53125V13.0312C14.125 14.125 13.2227 15 12.1562 15H2.96875C1.875 15 1 14.125 1 13.0312V3.84375C1 2.77734 1.875 1.875 2.96875 1.875Z",
|
|
3117
|
+
fill: color
|
|
3118
|
+
}));
|
|
3119
|
+
};
|
|
3120
|
+
|
|
3102
3121
|
const LinkButton = _ref => {
|
|
3103
3122
|
let {
|
|
3104
3123
|
text = '',
|
|
@@ -3252,6 +3271,14 @@ const LinkButton = _ref => {
|
|
|
3252
3271
|
width: iconWidth,
|
|
3253
3272
|
color: color
|
|
3254
3273
|
}));
|
|
3274
|
+
case 'upload':
|
|
3275
|
+
return /*#__PURE__*/React$1.createElement(IconWrapper$4, {
|
|
3276
|
+
className: "UploadIcon"
|
|
3277
|
+
}, /*#__PURE__*/React$1.createElement(UploadIcon, {
|
|
3278
|
+
height: iconHeight,
|
|
3279
|
+
width: iconWidth,
|
|
3280
|
+
color: color
|
|
3281
|
+
}));
|
|
3255
3282
|
default:
|
|
3256
3283
|
return '';
|
|
3257
3284
|
}
|
|
@@ -42679,6 +42706,10 @@ const CustomTooltip = styled(Tooltip$2)`
|
|
|
42679
42706
|
&::before {
|
|
42680
42707
|
left: 90%;
|
|
42681
42708
|
}
|
|
42709
|
+
${props => props.trashIcon && `width: 150px;
|
|
42710
|
+
white-space: normal;
|
|
42711
|
+
max-height: 50px;
|
|
42712
|
+
margin-top: 8px;`}
|
|
42682
42713
|
}
|
|
42683
42714
|
`;
|
|
42684
42715
|
const Container$1 = styled.div`
|
|
@@ -42696,7 +42727,9 @@ const Trash$1 = styled.div`
|
|
|
42696
42727
|
height: 24px;
|
|
42697
42728
|
padding: 0 12px;
|
|
42698
42729
|
cursor: pointer;
|
|
42699
|
-
|
|
42730
|
+
${props => props.disabled && `opacity: 0.5;
|
|
42731
|
+
pointer-events: none;
|
|
42732
|
+
user-select: none;`};
|
|
42700
42733
|
svg {
|
|
42701
42734
|
pointer-events: none;
|
|
42702
42735
|
}
|
|
@@ -52005,6 +52038,7 @@ const ItemManagerPanel = _ref => {
|
|
|
52005
52038
|
linkColor = "#212121",
|
|
52006
52039
|
backgroundColor = 'white',
|
|
52007
52040
|
buttonTooltipText = "Please fill out all forms before sending.",
|
|
52041
|
+
trashTooltipText = 'Package cannot be deleted since it has been sent to the vendor as a form.',
|
|
52008
52042
|
maxVisibleVendors = 12
|
|
52009
52043
|
} = _ref;
|
|
52010
52044
|
const [screen, setScreen] = useState("initial");
|
|
@@ -52242,6 +52276,7 @@ const ItemManagerPanel = _ref => {
|
|
|
52242
52276
|
headerHeight: headerHeight
|
|
52243
52277
|
}, /*#__PURE__*/React$1.createElement(VendorList$2, null, itemAndPackage.filter(item => item.packages !== null).map((item, idx) => {
|
|
52244
52278
|
const packagesLength = item.packages.length;
|
|
52279
|
+
const sentPackagesLength = item.packages.filter(pkg => hasValidStatus(pkg) && !draftPackages(pkg)).length;
|
|
52245
52280
|
return /*#__PURE__*/React$1.createElement(VendorItem$1, {
|
|
52246
52281
|
key: idx
|
|
52247
52282
|
}, /*#__PURE__*/React$1.createElement(DotContainer, null, packagesLength === 0 && /*#__PURE__*/React$1.createElement(RedDot, null)), /*#__PURE__*/React$1.createElement(LineContainer, {
|
|
@@ -52249,14 +52284,20 @@ const ItemManagerPanel = _ref => {
|
|
|
52249
52284
|
handleVendorClick(item);
|
|
52250
52285
|
}
|
|
52251
52286
|
}, /*#__PURE__*/React$1.createElement(VendorNameAndPackagesContainer$1, null, /*#__PURE__*/React$1.createElement(VendorName$2, null, item.name), packagesLength === 0 && /*#__PURE__*/React$1.createElement(Subtitle$1, null, "No Packages"), packagesLength > 0 && /*#__PURE__*/React$1.createElement(Subtitle$1, null, (() => {
|
|
52252
|
-
const sentPackagesLength = item.packages.filter(pkg => hasValidStatus(pkg) && !draftPackages(pkg)).length;
|
|
52253
52287
|
const noPackagesSent = sentPackagesLength === 0;
|
|
52254
52288
|
if (noPackagesSent) {
|
|
52255
52289
|
return `0/${packagesLength} sent`;
|
|
52256
52290
|
} else {
|
|
52257
52291
|
return `${sentPackagesLength}/${packagesLength} sent`;
|
|
52258
52292
|
}
|
|
52259
|
-
})())), /*#__PURE__*/React$1.createElement(VendorChevron$1, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null))), /*#__PURE__*/React$1.createElement(
|
|
52293
|
+
})())), /*#__PURE__*/React$1.createElement(VendorChevron$1, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null))), /*#__PURE__*/React$1.createElement(CustomTooltip, {
|
|
52294
|
+
hideTooltip: !sentPackagesLength > 0,
|
|
52295
|
+
content: trashTooltipText,
|
|
52296
|
+
topFactor: 2,
|
|
52297
|
+
direction: "left",
|
|
52298
|
+
trashIcon: true
|
|
52299
|
+
}, /*#__PURE__*/React$1.createElement(Trash$1, {
|
|
52300
|
+
disabled: sentPackagesLength > 0,
|
|
52260
52301
|
className: "trash-icon",
|
|
52261
52302
|
onClick: () => {
|
|
52262
52303
|
onDeleteVendor(item);
|
|
@@ -52269,7 +52310,7 @@ const ItemManagerPanel = _ref => {
|
|
|
52269
52310
|
xmlns: "http://www.w3.org/2000/svg"
|
|
52270
52311
|
}, /*#__PURE__*/React$1.createElement("path", {
|
|
52271
52312
|
d: "M1 16C1 17.1 1.9 18 3 18H11C12.1 18 13 17.1 13 16V4H1V16ZM14 1H10.5L9.5 0H4.5L3.5 1H0V3H14V1Z"
|
|
52272
|
-
}))));
|
|
52313
|
+
})))));
|
|
52273
52314
|
}))));
|
|
52274
52315
|
}
|
|
52275
52316
|
};
|