sag_components 2.0.0-beta316 → 2.0.0-beta318
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.js
CHANGED
|
@@ -57404,7 +57404,8 @@ const ItemManagerPanel = _ref => {
|
|
|
57404
57404
|
isLoadingText = "Loading Vendors...",
|
|
57405
57405
|
onLastRowsReached = () => {},
|
|
57406
57406
|
lastRowsThreshold = 3,
|
|
57407
|
-
onBackFromList = null
|
|
57407
|
+
onBackFromList = null,
|
|
57408
|
+
onPackageAdded = null
|
|
57408
57409
|
} = _ref;
|
|
57409
57410
|
const [screen, setScreen] = React$1.useState("initial");
|
|
57410
57411
|
const [selectedVendor, setSelectedVendor] = React$1.useState(null);
|
|
@@ -57477,6 +57478,9 @@ const ItemManagerPanel = _ref => {
|
|
|
57477
57478
|
}, ...prev.slice(vendorIndex + 1)];
|
|
57478
57479
|
}
|
|
57479
57480
|
});
|
|
57481
|
+
if (onPackageAdded) {
|
|
57482
|
+
onPackageAdded();
|
|
57483
|
+
}
|
|
57480
57484
|
setScreen("subitem");
|
|
57481
57485
|
};
|
|
57482
57486
|
const hasValidStatus = pkg => pkg.hasOwnProperty("status") && pkg.status != null && pkg.status !== undefined && pkg.status !== "";
|
|
@@ -57497,7 +57501,6 @@ const ItemManagerPanel = _ref => {
|
|
|
57497
57501
|
return {
|
|
57498
57502
|
...vendor,
|
|
57499
57503
|
packages: vendor.packages.map(pkg => {
|
|
57500
|
-
// Find the package to update by comparing with the original package
|
|
57501
57504
|
if (pkg.brands === originalPackage.brands && JSON.stringify(pkg.component) === JSON.stringify(originalPackage.component)) {
|
|
57502
57505
|
return {
|
|
57503
57506
|
...pkg,
|
|
@@ -57510,6 +57513,11 @@ const ItemManagerPanel = _ref => {
|
|
|
57510
57513
|
};
|
|
57511
57514
|
});
|
|
57512
57515
|
});
|
|
57516
|
+
if (onPackageAdded) {
|
|
57517
|
+
onPackageAdded();
|
|
57518
|
+
} else {
|
|
57519
|
+
console.log('onPackageAdded is null/undefined!');
|
|
57520
|
+
}
|
|
57513
57521
|
setScreen("subitem");
|
|
57514
57522
|
};
|
|
57515
57523
|
const onDeleteVendor = vendor => {
|
|
@@ -57552,6 +57560,11 @@ const ItemManagerPanel = _ref => {
|
|
|
57552
57560
|
packages: []
|
|
57553
57561
|
} : item));
|
|
57554
57562
|
}
|
|
57563
|
+
|
|
57564
|
+
// clear search when going back to initial screen
|
|
57565
|
+
if (onSearchChange) {
|
|
57566
|
+
onSearchChange("");
|
|
57567
|
+
}
|
|
57555
57568
|
setScreen("initial");
|
|
57556
57569
|
},
|
|
57557
57570
|
onTrashClick: () => onDeleteInner(selectedVendor),
|