bs-unified-ui 1.0.920 → 1.0.925
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/index.js +11 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -20487,6 +20487,9 @@ var TablePagination = function (_a) {
|
|
|
20487
20487
|
var pageIdx = Math.max(0, page - pageStart);
|
|
20488
20488
|
var pageVal = pageIdx + pageStart;
|
|
20489
20489
|
var _g = React.useState(pageVal), currentPage = _g[0], setCurrentPage = _g[1];
|
|
20490
|
+
React.useEffect(function () {
|
|
20491
|
+
setCurrentPage(pageVal);
|
|
20492
|
+
}, [pageVal]);
|
|
20490
20493
|
return (React.createElement(material.Box, { sx: { display: 'flex', alignItems: 'center', px: 2 } },
|
|
20491
20494
|
React.createElement(material.Box, { sx: {
|
|
20492
20495
|
'py': 1.5,
|
|
@@ -20510,18 +20513,12 @@ var TablePagination = function (_a) {
|
|
|
20510
20513
|
}, "data-testid": "pagination-".concat(dataTestId) },
|
|
20511
20514
|
React.createElement(Button, { iconOnly: true, variant: 'text', disabled: pageIdx <= 0, onClick: function () {
|
|
20512
20515
|
if (pageIdx) {
|
|
20513
|
-
if (enablePageInput) {
|
|
20514
|
-
setCurrentPage(pageVal - 1);
|
|
20515
|
-
}
|
|
20516
20516
|
onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(pageVal - 1);
|
|
20517
20517
|
}
|
|
20518
20518
|
}, "data-testid": "btn-pagination-prev-".concat(dataTestId) },
|
|
20519
20519
|
React.createElement(Icon, { name: 'arrow-left-s', size: 20 })),
|
|
20520
20520
|
React.createElement(Button, { iconOnly: true, variant: 'text', disabled: pageIdx >= pageCount - 1, onClick: function () {
|
|
20521
20521
|
if (pageIdx < pageCount - 1) {
|
|
20522
|
-
if (enablePageInput) {
|
|
20523
|
-
setCurrentPage(pageVal + 1);
|
|
20524
|
-
}
|
|
20525
20522
|
onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(pageVal + 1);
|
|
20526
20523
|
}
|
|
20527
20524
|
}, "data-testid": "btn-pagination-next-".concat(dataTestId) },
|
|
@@ -45847,6 +45844,7 @@ var useNotificationsV2 = function (options) {
|
|
|
45847
45844
|
var onErrorRef = React.useRef(onError);
|
|
45848
45845
|
var onNotificationRef = React.useRef(onNotification);
|
|
45849
45846
|
var onConnectionChangeRef = React.useRef(onConnectionChange);
|
|
45847
|
+
var warehousesConfigRef = React.useRef(warehousesConfig);
|
|
45850
45848
|
// Track current pathname for display indicators
|
|
45851
45849
|
var currentPath = useCurrentPath();
|
|
45852
45850
|
// Check which page user is currently on
|
|
@@ -46217,7 +46215,7 @@ var useNotificationsV2 = function (options) {
|
|
|
46217
46215
|
case 1:
|
|
46218
46216
|
_a.trys.push([1, 3, 4, 5]);
|
|
46219
46217
|
fetchAudioRepeatInFlightRef.current = true;
|
|
46220
|
-
return [4 /*yield*/, serviceRef.current.getAudioRepeat(bsOrgId,
|
|
46218
|
+
return [4 /*yield*/, serviceRef.current.getAudioRepeat(bsOrgId, warehousesConfigRef.current)];
|
|
46221
46219
|
case 2:
|
|
46222
46220
|
response = _a.sent();
|
|
46223
46221
|
data = response === null || response === void 0 ? void 0 : response.data;
|
|
@@ -46863,6 +46861,11 @@ var useNotificationsV2 = function (options) {
|
|
|
46863
46861
|
}
|
|
46864
46862
|
}
|
|
46865
46863
|
});
|
|
46864
|
+
// Check condition 4: warehousesConfig changed
|
|
46865
|
+
if (warehousesConfigRef.current !== memoizedWarehousesConfig) {
|
|
46866
|
+
warehousesConfigRef.current = memoizedWarehousesConfig;
|
|
46867
|
+
shouldFetch = true;
|
|
46868
|
+
}
|
|
46866
46869
|
// Update refs for next comparison
|
|
46867
46870
|
prevReminderEventsRef.current = __assign({}, memoizedReminderEvents);
|
|
46868
46871
|
prevSoundConfigRef.current = {
|
|
@@ -46894,7 +46897,7 @@ var useNotificationsV2 = function (options) {
|
|
|
46894
46897
|
fetchAudioRepeatTimerRef.current = null;
|
|
46895
46898
|
}, 3000);
|
|
46896
46899
|
}
|
|
46897
|
-
}, [fetchAudioRepeat, memoizedSoundConfig, memoizedReminderEvents]);
|
|
46900
|
+
}, [fetchAudioRepeat, memoizedSoundConfig, memoizedReminderEvents, memoizedWarehousesConfig]);
|
|
46898
46901
|
// Restart interval when repeatingInterval or mute changes per group
|
|
46899
46902
|
React.useEffect(function () {
|
|
46900
46903
|
if (!memoizedSoundConfig)
|