sag_components 2.0.0-beta170 → 2.0.0-beta171
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 +110 -99
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +110 -99
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -10429,24 +10429,23 @@ const QuarterPopupPicker = ({
|
|
|
10429
10429
|
};
|
|
10430
10430
|
|
|
10431
10431
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10432
|
-
const QuarterPicker =
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
} = _ref;
|
|
10432
|
+
const QuarterPicker = ({
|
|
10433
|
+
availableQuarters,
|
|
10434
|
+
// ["Q1-2024"]
|
|
10435
|
+
label,
|
|
10436
|
+
onChange,
|
|
10437
|
+
borderRadius,
|
|
10438
|
+
required,
|
|
10439
|
+
width,
|
|
10440
|
+
height,
|
|
10441
|
+
placeholder,
|
|
10442
|
+
disabled,
|
|
10443
|
+
borderColor,
|
|
10444
|
+
borderColorFocus,
|
|
10445
|
+
textColor,
|
|
10446
|
+
selectedValue,
|
|
10447
|
+
startYear
|
|
10448
|
+
}) => {
|
|
10450
10449
|
const [isFocused, setIsFocused] = useState(false);
|
|
10451
10450
|
const [isOpen, setIsOpen] = useState(false);
|
|
10452
10451
|
const [value, setValue] = useState('');
|
|
@@ -10888,23 +10887,22 @@ const MonthPopupPicker = ({
|
|
|
10888
10887
|
};
|
|
10889
10888
|
|
|
10890
10889
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10891
|
-
const MonthPicker =
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
} = _ref;
|
|
10890
|
+
const MonthPicker = ({
|
|
10891
|
+
availableMonths,
|
|
10892
|
+
label,
|
|
10893
|
+
onChange,
|
|
10894
|
+
borderRadius,
|
|
10895
|
+
required,
|
|
10896
|
+
width,
|
|
10897
|
+
height,
|
|
10898
|
+
placeholder,
|
|
10899
|
+
disabled,
|
|
10900
|
+
borderColor,
|
|
10901
|
+
borderColorFocus,
|
|
10902
|
+
textColor,
|
|
10903
|
+
selectedValue,
|
|
10904
|
+
startYear
|
|
10905
|
+
}) => {
|
|
10908
10906
|
const [isFocused, setIsFocused] = useState(false);
|
|
10909
10907
|
const [isOpen, setIsOpen] = useState(false);
|
|
10910
10908
|
const [value, setValue] = useState('');
|
|
@@ -24015,22 +24013,21 @@ const DeleteIcon = styled.div`
|
|
|
24015
24013
|
position: absolute;
|
|
24016
24014
|
`;
|
|
24017
24015
|
|
|
24018
|
-
const QuickFilterDropdownSingle =
|
|
24019
|
-
|
|
24020
|
-
|
|
24021
|
-
|
|
24022
|
-
|
|
24023
|
-
|
|
24024
|
-
|
|
24025
|
-
|
|
24026
|
-
|
|
24027
|
-
|
|
24028
|
-
|
|
24029
|
-
|
|
24030
|
-
|
|
24031
|
-
|
|
24032
|
-
|
|
24033
|
-
} = _ref;
|
|
24016
|
+
const QuickFilterDropdownSingle = ({
|
|
24017
|
+
label,
|
|
24018
|
+
hoverColor,
|
|
24019
|
+
options,
|
|
24020
|
+
selectedValue,
|
|
24021
|
+
placeHolder,
|
|
24022
|
+
onChange,
|
|
24023
|
+
disabled,
|
|
24024
|
+
width,
|
|
24025
|
+
error,
|
|
24026
|
+
errorMessage,
|
|
24027
|
+
xIconShow,
|
|
24028
|
+
labelColor,
|
|
24029
|
+
showLabelOnTop
|
|
24030
|
+
}) => {
|
|
24034
24031
|
const [isFocused, setIsFocused] = useState(false);
|
|
24035
24032
|
const [showOptions, setShowOptions] = useState(false);
|
|
24036
24033
|
const [inputValue, setInputValue] = useState("");
|
|
@@ -24427,24 +24424,23 @@ const IconContainer$2 = styled.div`
|
|
|
24427
24424
|
cursor: pointer;
|
|
24428
24425
|
`;
|
|
24429
24426
|
|
|
24430
|
-
const QuickFilterDropdownMultiSelection =
|
|
24431
|
-
|
|
24432
|
-
|
|
24433
|
-
|
|
24434
|
-
|
|
24435
|
-
|
|
24436
|
-
|
|
24437
|
-
|
|
24438
|
-
|
|
24439
|
-
|
|
24440
|
-
|
|
24441
|
-
|
|
24442
|
-
|
|
24443
|
-
|
|
24444
|
-
|
|
24445
|
-
|
|
24446
|
-
|
|
24447
|
-
} = _ref;
|
|
24427
|
+
const QuickFilterDropdownMultiSelection = ({
|
|
24428
|
+
label,
|
|
24429
|
+
labelEmptyValue,
|
|
24430
|
+
options,
|
|
24431
|
+
selectedValue,
|
|
24432
|
+
placeHolder,
|
|
24433
|
+
onChange,
|
|
24434
|
+
required,
|
|
24435
|
+
disabled,
|
|
24436
|
+
width,
|
|
24437
|
+
error,
|
|
24438
|
+
errorMessage,
|
|
24439
|
+
labelColor,
|
|
24440
|
+
xIconShow,
|
|
24441
|
+
checkBoxColor,
|
|
24442
|
+
showLabelOnTop
|
|
24443
|
+
}) => {
|
|
24448
24444
|
const [isFocused, setIsFocused] = useState(false);
|
|
24449
24445
|
const [showOptions, setShowOptions] = useState(false);
|
|
24450
24446
|
const [inputValue, setInputValue] = useState('');
|
|
@@ -35682,9 +35678,9 @@ const ToggleSlider = styled.span`
|
|
|
35682
35678
|
}
|
|
35683
35679
|
`;
|
|
35684
35680
|
|
|
35685
|
-
/**
|
|
35686
|
-
* ToggleSwitch component for on/off states.
|
|
35687
|
-
* Supports small/large sizes and disabled state.
|
|
35681
|
+
/**
|
|
35682
|
+
* ToggleSwitch component for on/off states.
|
|
35683
|
+
* Supports small/large sizes and disabled state.
|
|
35688
35684
|
*/
|
|
35689
35685
|
function ToggleSwitch(_ref) {
|
|
35690
35686
|
let {
|
|
@@ -43364,11 +43360,13 @@ const NewItemList = ({
|
|
|
43364
43360
|
// Helper to highlight matched portions
|
|
43365
43361
|
const highlightMatch = (text, query) => {
|
|
43366
43362
|
if (!query) return text;
|
|
43367
|
-
const regex = new RegExp(`(${query})`,
|
|
43363
|
+
const regex = new RegExp(`(${query})`, "ig");
|
|
43368
43364
|
return text.split(regex).map((part, i) => regex.test(part) ? /*#__PURE__*/React$1.createElement(MarkVendorName, {
|
|
43369
43365
|
key: i
|
|
43370
43366
|
}, part) : part);
|
|
43371
43367
|
};
|
|
43368
|
+
const hasValidStatus = pkg => pkg.hasOwnProperty("status") && pkg.status != null && pkg.status !== undefined && pkg.status !== "";
|
|
43369
|
+
const draftPackages = pkg => pkg.status === 1;
|
|
43372
43370
|
return /*#__PURE__*/React$1.createElement(VendorSelectionContainer, null, /*#__PURE__*/React$1.createElement(VendorHeader$1, {
|
|
43373
43371
|
ref: headerRef
|
|
43374
43372
|
}, /*#__PURE__*/React$1.createElement(VendorRoute, null, /*#__PURE__*/React$1.createElement(VendorBackButton, {
|
|
@@ -43380,15 +43378,31 @@ const NewItemList = ({
|
|
|
43380
43378
|
onChange: e => setSearch(e.target.value)
|
|
43381
43379
|
}), /*#__PURE__*/React$1.createElement(VendorSearchResult, null, search !== "" ? `${filteredItems.length === 0 ? "No" : filteredItems.length} Vendors Found` : " ")), /*#__PURE__*/React$1.createElement(VendorListWrapper$1, {
|
|
43382
43380
|
headerHeight: headerHeight
|
|
43383
|
-
}, /*#__PURE__*/React$1.createElement(VendorList$1, null, filteredItems.map((item, idx) =>
|
|
43384
|
-
|
|
43385
|
-
|
|
43386
|
-
|
|
43387
|
-
|
|
43388
|
-
|
|
43381
|
+
}, /*#__PURE__*/React$1.createElement(VendorList$1, null, filteredItems.map((item, idx) => {
|
|
43382
|
+
console.log("item", item);
|
|
43383
|
+
let packagesLength = 0;
|
|
43384
|
+
let sentPackagesLength = 0;
|
|
43385
|
+
if (item.packages !== null) {
|
|
43386
|
+
packagesLength = item.packages.length;
|
|
43387
|
+
sentPackagesLength = item.packages.filter(pkg => hasValidStatus(pkg) && !draftPackages(pkg)).length;
|
|
43388
|
+
}
|
|
43389
|
+
return /*#__PURE__*/React$1.createElement(VendorItem, {
|
|
43390
|
+
key: idx,
|
|
43391
|
+
onClick: e => {
|
|
43392
|
+
// Always call onVendorClick - it will handle the conversion from null to []
|
|
43393
|
+
if (onVendorClick) {
|
|
43394
|
+
onVendorClick(item);
|
|
43395
|
+
}
|
|
43389
43396
|
}
|
|
43390
|
-
}
|
|
43391
|
-
|
|
43397
|
+
}, /*#__PURE__*/React$1.createElement(VendorNameAndPackagesContainer, null, /*#__PURE__*/React$1.createElement(VendorName$1, null, highlightMatch(item.name, searchLower)), packagesLength > 0 && /*#__PURE__*/React$1.createElement(VendorPackages, null, (() => {
|
|
43398
|
+
const noPackagesSent = sentPackagesLength === 0;
|
|
43399
|
+
if (noPackagesSent) {
|
|
43400
|
+
return `0/${packagesLength} Packages Sent`;
|
|
43401
|
+
} else {
|
|
43402
|
+
return `${sentPackagesLength}/${packagesLength} Packages Sent`;
|
|
43403
|
+
}
|
|
43404
|
+
})())), /*#__PURE__*/React$1.createElement(VendorChevron, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null)));
|
|
43405
|
+
}))));
|
|
43392
43406
|
};
|
|
43393
43407
|
|
|
43394
43408
|
const NewSubitemContainer$1 = styled(Card)`
|
|
@@ -43544,7 +43558,7 @@ const Chevron = styled.div`
|
|
|
43544
43558
|
align-items: center;
|
|
43545
43559
|
display: flex;
|
|
43546
43560
|
`;
|
|
43547
|
-
|
|
43561
|
+
styled.div`
|
|
43548
43562
|
display: flex;
|
|
43549
43563
|
align-items: center;
|
|
43550
43564
|
justify-content: center;
|
|
@@ -43595,12 +43609,6 @@ const NewSubitemList = props => {
|
|
|
43595
43609
|
setSelectedPackage(item);
|
|
43596
43610
|
handleSubitemDetail(item); // Pass the package object for editing
|
|
43597
43611
|
};
|
|
43598
|
-
|
|
43599
|
-
// useEffect(() => {
|
|
43600
|
-
// console.log("Vendor items updated:", vendorItems);
|
|
43601
|
-
// console.log("Props:", props);
|
|
43602
|
-
// }, [vendorItems]);
|
|
43603
|
-
|
|
43604
43612
|
return /*#__PURE__*/React$1.createElement(NewSubitemContainer$1, null, /*#__PURE__*/React$1.createElement(Header$1, null, /*#__PURE__*/React$1.createElement(BackButton$1, {
|
|
43605
43613
|
onClick: onBack
|
|
43606
43614
|
}, /*#__PURE__*/React$1.createElement(ArrowLeftIcon, null)), /*#__PURE__*/React$1.createElement(BackTitle$1, null, "All Vendors")), /*#__PURE__*/React$1.createElement(SelectionTitle$1, null, vendor.name), /*#__PURE__*/React$1.createElement(AddButtonContainer, null, /*#__PURE__*/React$1.createElement(LinkButton, {
|
|
@@ -43617,20 +43625,23 @@ const NewSubitemList = props => {
|
|
|
43617
43625
|
onClick: e => {
|
|
43618
43626
|
handleEditExistingPackage(item);
|
|
43619
43627
|
}
|
|
43620
|
-
}, item.brands && /*#__PURE__*/React$1.createElement(Title$2, null, item.brands), item.component && /*#__PURE__*/React$1.createElement(ComponentContainer, null, item.component[0]), /*#__PURE__*/React$1.createElement(Chevron, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null))), /*#__PURE__*/React$1.createElement(
|
|
43628
|
+
}, item.brands && /*#__PURE__*/React$1.createElement(Title$2, null, item.brands), item.component && /*#__PURE__*/React$1.createElement(ComponentContainer, null, item.component[0]), /*#__PURE__*/React$1.createElement(Chevron, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null))), item.status && Number(item.status) > 1 ? /*#__PURE__*/React$1.createElement(DisabledTrashIconWrapper, {
|
|
43629
|
+
className: "trash-icon-disabled"
|
|
43630
|
+
|
|
43631
|
+
// ref={(el) => setupTooltip(el, trashTooltipText)}
|
|
43632
|
+
}, /*#__PURE__*/React$1.createElement(DisabledTrashIcon, {
|
|
43633
|
+
width: "22",
|
|
43634
|
+
height: "22"
|
|
43635
|
+
})) : /*#__PURE__*/React$1.createElement(TrashIconWrapper, {
|
|
43621
43636
|
className: "trash-icon",
|
|
43622
43637
|
onClick: e => {
|
|
43638
|
+
e.stopPropagation();
|
|
43623
43639
|
onDeletePackage(item);
|
|
43624
43640
|
}
|
|
43625
|
-
}, /*#__PURE__*/React$1.createElement(
|
|
43641
|
+
}, /*#__PURE__*/React$1.createElement(TrashIcon, {
|
|
43626
43642
|
width: "14",
|
|
43627
|
-
height: "18"
|
|
43628
|
-
|
|
43629
|
-
fill: "none",
|
|
43630
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
43631
|
-
}, /*#__PURE__*/React$1.createElement("path", {
|
|
43632
|
-
d: "M1 16C1 17.1 1.9 18 3 18H11C12.1 18 13 17.1 13 16V4H1V16ZM14 1H10.5L9.5 0H4.5L3.5 1H0V3H14V1Z"
|
|
43633
|
-
})))))));
|
|
43643
|
+
height: "18"
|
|
43644
|
+
}))))));
|
|
43634
43645
|
};
|
|
43635
43646
|
|
|
43636
43647
|
const NewSubitemContainer = styled(Card)`
|
|
@@ -52774,9 +52785,9 @@ const ItemManagerPanel = _ref => {
|
|
|
52774
52785
|
}, /*#__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, (() => {
|
|
52775
52786
|
const noPackagesSent = sentPackagesLength === 0;
|
|
52776
52787
|
if (noPackagesSent) {
|
|
52777
|
-
return `0/${packagesLength}
|
|
52788
|
+
return `0/${packagesLength} Packages Sent`;
|
|
52778
52789
|
} else {
|
|
52779
|
-
return `${sentPackagesLength}/${packagesLength}
|
|
52790
|
+
return `${sentPackagesLength}/${packagesLength} Packages Sent`;
|
|
52780
52791
|
}
|
|
52781
52792
|
})())), /*#__PURE__*/React$1.createElement(VendorChevron$1, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null))), sentPackagesLength > 0 ? /*#__PURE__*/React$1.createElement(DisabledTrashIconWrapper, {
|
|
52782
52793
|
className: "trash-icon-disabled",
|