sag_components 2.0.0-beta153 → 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 +90 -72
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +90 -72
- 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/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10357,23 +10357,24 @@ const QuarterPopupPicker = ({
|
|
|
10357
10357
|
};
|
|
10358
10358
|
|
|
10359
10359
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10360
|
-
const QuarterPicker =
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10360
|
+
const QuarterPicker = _ref => {
|
|
10361
|
+
let {
|
|
10362
|
+
availableQuarters,
|
|
10363
|
+
// ["Q1-2024"]
|
|
10364
|
+
label,
|
|
10365
|
+
onChange,
|
|
10366
|
+
borderRadius,
|
|
10367
|
+
required,
|
|
10368
|
+
width,
|
|
10369
|
+
height,
|
|
10370
|
+
placeholder,
|
|
10371
|
+
disabled,
|
|
10372
|
+
borderColor,
|
|
10373
|
+
borderColorFocus,
|
|
10374
|
+
textColor,
|
|
10375
|
+
selectedValue,
|
|
10376
|
+
startYear
|
|
10377
|
+
} = _ref;
|
|
10377
10378
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
10378
10379
|
const [isOpen, setIsOpen] = React$1.useState(false);
|
|
10379
10380
|
const [value, setValue] = React$1.useState('');
|
|
@@ -10815,22 +10816,23 @@ const MonthPopupPicker = ({
|
|
|
10815
10816
|
};
|
|
10816
10817
|
|
|
10817
10818
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10818
|
-
const MonthPicker =
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10819
|
+
const MonthPicker = _ref => {
|
|
10820
|
+
let {
|
|
10821
|
+
availableMonths,
|
|
10822
|
+
label,
|
|
10823
|
+
onChange,
|
|
10824
|
+
borderRadius,
|
|
10825
|
+
required,
|
|
10826
|
+
width,
|
|
10827
|
+
height,
|
|
10828
|
+
placeholder,
|
|
10829
|
+
disabled,
|
|
10830
|
+
borderColor,
|
|
10831
|
+
borderColorFocus,
|
|
10832
|
+
textColor,
|
|
10833
|
+
selectedValue,
|
|
10834
|
+
startYear
|
|
10835
|
+
} = _ref;
|
|
10834
10836
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
10835
10837
|
const [isOpen, setIsOpen] = React$1.useState(false);
|
|
10836
10838
|
const [value, setValue] = React$1.useState('');
|
|
@@ -23941,21 +23943,22 @@ const DeleteIcon = styled__default["default"].div`
|
|
|
23941
23943
|
position: absolute;
|
|
23942
23944
|
`;
|
|
23943
23945
|
|
|
23944
|
-
const QuickFilterDropdownSingle =
|
|
23945
|
-
|
|
23946
|
-
|
|
23947
|
-
|
|
23948
|
-
|
|
23949
|
-
|
|
23950
|
-
|
|
23951
|
-
|
|
23952
|
-
|
|
23953
|
-
|
|
23954
|
-
|
|
23955
|
-
|
|
23956
|
-
|
|
23957
|
-
|
|
23958
|
-
|
|
23946
|
+
const QuickFilterDropdownSingle = _ref => {
|
|
23947
|
+
let {
|
|
23948
|
+
label,
|
|
23949
|
+
hoverColor,
|
|
23950
|
+
options,
|
|
23951
|
+
selectedValue,
|
|
23952
|
+
placeHolder,
|
|
23953
|
+
onChange,
|
|
23954
|
+
disabled,
|
|
23955
|
+
width,
|
|
23956
|
+
error,
|
|
23957
|
+
errorMessage,
|
|
23958
|
+
xIconShow,
|
|
23959
|
+
labelColor,
|
|
23960
|
+
showLabelOnTop
|
|
23961
|
+
} = _ref;
|
|
23959
23962
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
23960
23963
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
23961
23964
|
const [inputValue, setInputValue] = React$1.useState("");
|
|
@@ -24352,23 +24355,24 @@ const IconContainer$2 = styled__default["default"].div`
|
|
|
24352
24355
|
cursor: pointer;
|
|
24353
24356
|
`;
|
|
24354
24357
|
|
|
24355
|
-
const QuickFilterDropdownMultiSelection =
|
|
24356
|
-
|
|
24357
|
-
|
|
24358
|
-
|
|
24359
|
-
|
|
24360
|
-
|
|
24361
|
-
|
|
24362
|
-
|
|
24363
|
-
|
|
24364
|
-
|
|
24365
|
-
|
|
24366
|
-
|
|
24367
|
-
|
|
24368
|
-
|
|
24369
|
-
|
|
24370
|
-
|
|
24371
|
-
|
|
24358
|
+
const QuickFilterDropdownMultiSelection = _ref => {
|
|
24359
|
+
let {
|
|
24360
|
+
label,
|
|
24361
|
+
labelEmptyValue,
|
|
24362
|
+
options,
|
|
24363
|
+
selectedValue,
|
|
24364
|
+
placeHolder,
|
|
24365
|
+
onChange,
|
|
24366
|
+
required,
|
|
24367
|
+
disabled,
|
|
24368
|
+
width,
|
|
24369
|
+
error,
|
|
24370
|
+
errorMessage,
|
|
24371
|
+
labelColor,
|
|
24372
|
+
xIconShow,
|
|
24373
|
+
checkBoxColor,
|
|
24374
|
+
showLabelOnTop
|
|
24375
|
+
} = _ref;
|
|
24372
24376
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24373
24377
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24374
24378
|
const [inputValue, setInputValue] = React$1.useState('');
|
|
@@ -35600,9 +35604,9 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
35600
35604
|
}
|
|
35601
35605
|
`;
|
|
35602
35606
|
|
|
35603
|
-
/**
|
|
35604
|
-
* ToggleSwitch component for on/off states.
|
|
35605
|
-
* Supports small/large sizes and disabled state.
|
|
35607
|
+
/**
|
|
35608
|
+
* ToggleSwitch component for on/off states.
|
|
35609
|
+
* Supports small/large sizes and disabled state.
|
|
35606
35610
|
*/
|
|
35607
35611
|
function ToggleSwitch(_ref) {
|
|
35608
35612
|
let {
|
|
@@ -42712,6 +42716,10 @@ const CustomTooltip = styled__default["default"](Tooltip$2)`
|
|
|
42712
42716
|
&::before {
|
|
42713
42717
|
left: 90%;
|
|
42714
42718
|
}
|
|
42719
|
+
${props => props.trashIcon && `width: 150px;
|
|
42720
|
+
white-space: normal;
|
|
42721
|
+
max-height: 50px;
|
|
42722
|
+
margin-top: 8px;`}
|
|
42715
42723
|
}
|
|
42716
42724
|
`;
|
|
42717
42725
|
const Container$1 = styled__default["default"].div`
|
|
@@ -42729,7 +42737,9 @@ const Trash$1 = styled__default["default"].div`
|
|
|
42729
42737
|
height: 24px;
|
|
42730
42738
|
padding: 0 12px;
|
|
42731
42739
|
cursor: pointer;
|
|
42732
|
-
|
|
42740
|
+
${props => props.disabled && `opacity: 0.5;
|
|
42741
|
+
pointer-events: none;
|
|
42742
|
+
user-select: none;`};
|
|
42733
42743
|
svg {
|
|
42734
42744
|
pointer-events: none;
|
|
42735
42745
|
}
|
|
@@ -52038,6 +52048,7 @@ const ItemManagerPanel = _ref => {
|
|
|
52038
52048
|
linkColor = "#212121",
|
|
52039
52049
|
backgroundColor = 'white',
|
|
52040
52050
|
buttonTooltipText = "Please fill out all forms before sending.",
|
|
52051
|
+
trashTooltipText = 'Package cannot be deleted since it has been sent to the vendor as a form.',
|
|
52041
52052
|
maxVisibleVendors = 12
|
|
52042
52053
|
} = _ref;
|
|
52043
52054
|
const [screen, setScreen] = React$1.useState("initial");
|
|
@@ -52275,6 +52286,7 @@ const ItemManagerPanel = _ref => {
|
|
|
52275
52286
|
headerHeight: headerHeight
|
|
52276
52287
|
}, /*#__PURE__*/React__default["default"].createElement(VendorList$2, null, itemAndPackage.filter(item => item.packages !== null).map((item, idx) => {
|
|
52277
52288
|
const packagesLength = item.packages.length;
|
|
52289
|
+
const sentPackagesLength = item.packages.filter(pkg => hasValidStatus(pkg) && !draftPackages(pkg)).length;
|
|
52278
52290
|
return /*#__PURE__*/React__default["default"].createElement(VendorItem$1, {
|
|
52279
52291
|
key: idx
|
|
52280
52292
|
}, /*#__PURE__*/React__default["default"].createElement(DotContainer, null, packagesLength === 0 && /*#__PURE__*/React__default["default"].createElement(RedDot, null)), /*#__PURE__*/React__default["default"].createElement(LineContainer, {
|
|
@@ -52282,14 +52294,20 @@ const ItemManagerPanel = _ref => {
|
|
|
52282
52294
|
handleVendorClick(item);
|
|
52283
52295
|
}
|
|
52284
52296
|
}, /*#__PURE__*/React__default["default"].createElement(VendorNameAndPackagesContainer$1, null, /*#__PURE__*/React__default["default"].createElement(VendorName$2, null, item.name), packagesLength === 0 && /*#__PURE__*/React__default["default"].createElement(Subtitle$1, null, "No Packages"), packagesLength > 0 && /*#__PURE__*/React__default["default"].createElement(Subtitle$1, null, (() => {
|
|
52285
|
-
const sentPackagesLength = item.packages.filter(pkg => hasValidStatus(pkg) && !draftPackages(pkg)).length;
|
|
52286
52297
|
const noPackagesSent = sentPackagesLength === 0;
|
|
52287
52298
|
if (noPackagesSent) {
|
|
52288
52299
|
return `0/${packagesLength} sent`;
|
|
52289
52300
|
} else {
|
|
52290
52301
|
return `${sentPackagesLength}/${packagesLength} sent`;
|
|
52291
52302
|
}
|
|
52292
|
-
})())), /*#__PURE__*/React__default["default"].createElement(VendorChevron$1, null, /*#__PURE__*/React__default["default"].createElement(ArrowRightFullIcon, null))), /*#__PURE__*/React__default["default"].createElement(
|
|
52303
|
+
})())), /*#__PURE__*/React__default["default"].createElement(VendorChevron$1, null, /*#__PURE__*/React__default["default"].createElement(ArrowRightFullIcon, null))), /*#__PURE__*/React__default["default"].createElement(CustomTooltip, {
|
|
52304
|
+
hideTooltip: !sentPackagesLength > 0,
|
|
52305
|
+
content: trashTooltipText,
|
|
52306
|
+
topFactor: 2,
|
|
52307
|
+
direction: "left",
|
|
52308
|
+
trashIcon: true
|
|
52309
|
+
}, /*#__PURE__*/React__default["default"].createElement(Trash$1, {
|
|
52310
|
+
disabled: sentPackagesLength > 0,
|
|
52293
52311
|
className: "trash-icon",
|
|
52294
52312
|
onClick: () => {
|
|
52295
52313
|
onDeleteVendor(item);
|
|
@@ -52302,7 +52320,7 @@ const ItemManagerPanel = _ref => {
|
|
|
52302
52320
|
xmlns: "http://www.w3.org/2000/svg"
|
|
52303
52321
|
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
52304
52322
|
d: "M1 16C1 17.1 1.9 18 3 18H11C12.1 18 13 17.1 13 16V4H1V16ZM14 1H10.5L9.5 0H4.5L3.5 1H0V3H14V1Z"
|
|
52305
|
-
}))));
|
|
52323
|
+
})))));
|
|
52306
52324
|
}))));
|
|
52307
52325
|
}
|
|
52308
52326
|
};
|