bs-unified-ui 1.0.915 → 1.0.917

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.
@@ -83,7 +83,7 @@ declare class NotificationService {
83
83
  }>;
84
84
  markAsRead(notificationId: string): Promise<void>;
85
85
  markAllAsRead(bsOrgId?: string): Promise<void>;
86
- getAudioRepeat(bsOrgId: string): Promise<any>;
86
+ getAudioRepeat(bsOrgId: string, warehousesConfig?: string[]): Promise<any>;
87
87
  getIndicators(bsOrgId: string, categories?: Record<string, string[]>): Promise<any>;
88
88
  updateIndicators(indicators: Partial<{
89
89
  order: boolean;
@@ -79,6 +79,7 @@ export interface UseNotificationsOptions extends NotificationConfig {
79
79
  navigate?: any;
80
80
  soundConfig?: SoundConfig;
81
81
  triggerEvents?: TriggerEvents;
82
+ warehousesConfig?: string[];
82
83
  }
83
84
  declare const useNotifications: (options?: UseNotificationsOptions) => UseNotificationsResult;
84
85
  export default useNotifications;
@@ -53,6 +53,7 @@ export interface UseNotificationsOptions extends NotificationConfig {
53
53
  navigate?: any;
54
54
  soundConfig?: SoundConfig;
55
55
  triggerEvents?: TriggerEvents;
56
+ warehousesConfig?: string[];
56
57
  }
57
58
  declare const useNotificationsV2: (options?: UseNotificationsOptions) => UseNotificationsV2Result;
58
59
  export default useNotificationsV2;
package/index.js CHANGED
@@ -41890,7 +41890,7 @@ var NotificationService = /** @class */ (function () {
41890
41890
  });
41891
41891
  });
41892
41892
  };
41893
- NotificationService.prototype.getAudioRepeat = function (bsOrgId) {
41893
+ NotificationService.prototype.getAudioRepeat = function (bsOrgId, warehousesConfig) {
41894
41894
  return __awaiter(this, void 0, void 0, function () {
41895
41895
  var headers, sessionToken, queryParams, url, response, res, error_8;
41896
41896
  return __generator(this, function (_a) {
@@ -41916,6 +41916,9 @@ var NotificationService = /** @class */ (function () {
41916
41916
  case 3:
41917
41917
  queryParams = new URLSearchParams();
41918
41918
  queryParams.append('bsOrgId', bsOrgId);
41919
+ if (warehousesConfig && warehousesConfig.length > 0) {
41920
+ queryParams.append('warehouses', warehousesConfig.join(','));
41921
+ }
41919
41922
  url = "".concat(this.config.apiBaseUrl, "/notifications/me/get-audio-repeat?").concat(queryParams.toString());
41920
41923
  return [4 /*yield*/, fetch(url, { headers: headers })];
41921
41924
  case 4:
@@ -45724,16 +45727,16 @@ var ObservableSet = /** @class */ (function () {
45724
45727
  var useNotificationsV2 = function (options) {
45725
45728
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
45726
45729
  if (options === void 0) { options = {}; }
45727
- var onNotification = options.onNotification, onConnectionChange = options.onConnectionChange, onError = options.onError, _k = options.timezone, timezone = _k === void 0 ? 'America/Vancouver' : _k, navigate = options.navigate, bsOrgId = options.bsOrgId, cfWsId = options.cfWsId, soundConfig = options.soundConfig, triggerEvents = options.triggerEvents;
45728
- var _l = React.useState([]), popoverNotifications = _l[0], setPopoverNotifications = _l[1];
45729
- var _m = React.useState(true), popoverLoading = _m[0], setPopoverLoading = _m[1];
45730
- var _o = React.useState(false), popoverHasNextPage = _o[0], setPopoverHasNextPage = _o[1];
45731
- var _p = React.useState(false), isUnreadPopover = _p[0], setIsUnreadPopover = _p[1];
45732
- var _q = React.useState(0), unreadCount = _q[0], setUnreadCount = _q[1];
45733
- var _r = React.useState(false), isActiveNotificationPage = _r[0], setIsActiveNotificationPage = _r[1];
45734
- var _s = React.useState([]), notifications = _s[0], setNotifications = _s[1];
45735
- var _t = React.useState(true), notificationLoading = _t[0], setNotificationLoading = _t[1];
45736
- var _u = React.useState({
45730
+ var onNotification = options.onNotification, onConnectionChange = options.onConnectionChange, onError = options.onError, _k = options.timezone, timezone = _k === void 0 ? 'America/Vancouver' : _k, navigate = options.navigate, bsOrgId = options.bsOrgId, cfWsId = options.cfWsId, soundConfig = options.soundConfig, triggerEvents = options.triggerEvents, _l = options.warehousesConfig, warehousesConfig = _l === void 0 ? [] : _l;
45731
+ var _m = React.useState([]), popoverNotifications = _m[0], setPopoverNotifications = _m[1];
45732
+ var _o = React.useState(true), popoverLoading = _o[0], setPopoverLoading = _o[1];
45733
+ var _p = React.useState(false), popoverHasNextPage = _p[0], setPopoverHasNextPage = _p[1];
45734
+ var _q = React.useState(false), isUnreadPopover = _q[0], setIsUnreadPopover = _q[1];
45735
+ var _r = React.useState(0), unreadCount = _r[0], setUnreadCount = _r[1];
45736
+ var _s = React.useState(false), isActiveNotificationPage = _s[0], setIsActiveNotificationPage = _s[1];
45737
+ var _t = React.useState([]), notifications = _t[0], setNotifications = _t[1];
45738
+ var _u = React.useState(true), notificationLoading = _u[0], setNotificationLoading = _u[1];
45739
+ var _v = React.useState({
45737
45740
  search: '',
45738
45741
  sortBy: '',
45739
45742
  sortOrder: '',
@@ -45743,19 +45746,19 @@ var useNotificationsV2 = function (options) {
45743
45746
  limit: 20,
45744
45747
  startDate: '',
45745
45748
  endDate: '',
45746
- }), filter = _u[0], setFilter = _u[1];
45749
+ }), filter = _v[0], setFilter = _v[1];
45747
45750
  var filterRef = React.useRef(filter);
45748
- var _v = React.useState(true), hasNextPage = _v[0], setHasNextPage = _v[1];
45749
- var _w = React.useState(true), loading = _w[0], setLoading = _w[1];
45750
- var _x = React.useState(false), isConnected = _x[0], setIsConnected = _x[1];
45751
- var _y = React.useState(null), error = _y[0], setError = _y[1];
45752
- var _z = React.useState(false), isInitialized = _z[0], setIsInitialized = _z[1];
45753
- var _0 = React.useState({
45751
+ var _w = React.useState(true), hasNextPage = _w[0], setHasNextPage = _w[1];
45752
+ var _x = React.useState(true), loading = _x[0], setLoading = _x[1];
45753
+ var _y = React.useState(false), isConnected = _y[0], setIsConnected = _y[1];
45754
+ var _z = React.useState(null), error = _z[0], setError = _z[1];
45755
+ var _0 = React.useState(false), isInitialized = _0[0], setIsInitialized = _0[1];
45756
+ var _1 = React.useState({
45754
45757
  order: false,
45755
45758
  chat: false,
45756
45759
  task_update: false,
45757
45760
  new_driver: false,
45758
- }), indicators = _0[0], setIndicators = _0[1];
45761
+ }), indicators = _1[0], setIndicators = _1[1];
45759
45762
  var serviceRef = React.useRef(null);
45760
45763
  var unsubscribeRef = React.useRef(null);
45761
45764
  var initPromiseRef = React.useRef(null);
@@ -46175,7 +46178,7 @@ var useNotificationsV2 = function (options) {
46175
46178
  _a.label = 1;
46176
46179
  case 1:
46177
46180
  _a.trys.push([1, 3, , 4]);
46178
- return [4 /*yield*/, serviceRef.current.getAudioRepeat(bsOrgId)];
46181
+ return [4 /*yield*/, serviceRef.current.getAudioRepeat(bsOrgId, warehousesConfig)];
46179
46182
  case 2:
46180
46183
  response = _a.sent();
46181
46184
  data = response === null || response === void 0 ? void 0 : response.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bs-unified-ui",
3
- "version": "1.0.915",
3
+ "version": "1.0.917",
4
4
  "license": "MIT",
5
5
  "author": "Advesa",
6
6
  "description": "UI Components for Unified Breadstack UI",