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.d.ts
CHANGED
|
@@ -1556,7 +1556,7 @@ declare function RangePop(props: any): react_jsx_runtime.JSX.Element;
|
|
|
1556
1556
|
|
|
1557
1557
|
declare function SearchInput(props: any): react_jsx_runtime.JSX.Element;
|
|
1558
1558
|
|
|
1559
|
-
declare function ItemManagerPanel({ width, height, disableSection, onSendForms, editMode, disabledSendForms, AllFormsSent, itemAndPackage, setItemAndPackage, linkColor, backgroundColor, buttonTooltipText, trashTooltipText, maxVisibleVendors, componentText, SubTitleColor, searchValue, onSearchChange, searchResults, filteredVendors, isSearchLoading, isLoading, isLoadingText, onLastRowsReached, lastRowsThreshold, onBackFromList, }: {
|
|
1559
|
+
declare function ItemManagerPanel({ width, height, disableSection, onSendForms, editMode, disabledSendForms, AllFormsSent, itemAndPackage, setItemAndPackage, linkColor, backgroundColor, buttonTooltipText, trashTooltipText, maxVisibleVendors, componentText, SubTitleColor, searchValue, onSearchChange, searchResults, filteredVendors, isSearchLoading, isLoading, isLoadingText, onLastRowsReached, lastRowsThreshold, onBackFromList, onPackageAdded, }: {
|
|
1560
1560
|
width?: string;
|
|
1561
1561
|
height?: string;
|
|
1562
1562
|
disableSection?: boolean;
|
|
@@ -1583,6 +1583,7 @@ declare function ItemManagerPanel({ width, height, disableSection, onSendForms,
|
|
|
1583
1583
|
onLastRowsReached?: () => void;
|
|
1584
1584
|
lastRowsThreshold?: number;
|
|
1585
1585
|
onBackFromList?: any;
|
|
1586
|
+
onPackageAdded?: any;
|
|
1586
1587
|
}): react_jsx_runtime.JSX.Element;
|
|
1587
1588
|
|
|
1588
1589
|
/**
|
package/dist/index.esm.js
CHANGED
|
@@ -57394,7 +57394,8 @@ const ItemManagerPanel = _ref => {
|
|
|
57394
57394
|
isLoadingText = "Loading Vendors...",
|
|
57395
57395
|
onLastRowsReached = () => {},
|
|
57396
57396
|
lastRowsThreshold = 3,
|
|
57397
|
-
onBackFromList = null
|
|
57397
|
+
onBackFromList = null,
|
|
57398
|
+
onPackageAdded = null
|
|
57398
57399
|
} = _ref;
|
|
57399
57400
|
const [screen, setScreen] = useState("initial");
|
|
57400
57401
|
const [selectedVendor, setSelectedVendor] = useState(null);
|
|
@@ -57467,6 +57468,9 @@ const ItemManagerPanel = _ref => {
|
|
|
57467
57468
|
}, ...prev.slice(vendorIndex + 1)];
|
|
57468
57469
|
}
|
|
57469
57470
|
});
|
|
57471
|
+
if (onPackageAdded) {
|
|
57472
|
+
onPackageAdded();
|
|
57473
|
+
}
|
|
57470
57474
|
setScreen("subitem");
|
|
57471
57475
|
};
|
|
57472
57476
|
const hasValidStatus = pkg => pkg.hasOwnProperty("status") && pkg.status != null && pkg.status !== undefined && pkg.status !== "";
|
|
@@ -57487,7 +57491,6 @@ const ItemManagerPanel = _ref => {
|
|
|
57487
57491
|
return {
|
|
57488
57492
|
...vendor,
|
|
57489
57493
|
packages: vendor.packages.map(pkg => {
|
|
57490
|
-
// Find the package to update by comparing with the original package
|
|
57491
57494
|
if (pkg.brands === originalPackage.brands && JSON.stringify(pkg.component) === JSON.stringify(originalPackage.component)) {
|
|
57492
57495
|
return {
|
|
57493
57496
|
...pkg,
|
|
@@ -57500,6 +57503,11 @@ const ItemManagerPanel = _ref => {
|
|
|
57500
57503
|
};
|
|
57501
57504
|
});
|
|
57502
57505
|
});
|
|
57506
|
+
if (onPackageAdded) {
|
|
57507
|
+
onPackageAdded();
|
|
57508
|
+
} else {
|
|
57509
|
+
console.log('onPackageAdded is null/undefined!');
|
|
57510
|
+
}
|
|
57503
57511
|
setScreen("subitem");
|
|
57504
57512
|
};
|
|
57505
57513
|
const onDeleteVendor = vendor => {
|
|
@@ -57542,6 +57550,11 @@ const ItemManagerPanel = _ref => {
|
|
|
57542
57550
|
packages: []
|
|
57543
57551
|
} : item));
|
|
57544
57552
|
}
|
|
57553
|
+
|
|
57554
|
+
// clear search when going back to initial screen
|
|
57555
|
+
if (onSearchChange) {
|
|
57556
|
+
onSearchChange("");
|
|
57557
|
+
}
|
|
57545
57558
|
setScreen("initial");
|
|
57546
57559
|
},
|
|
57547
57560
|
onTrashClick: () => onDeleteInner(selectedVendor),
|