@zeniai/client-epic-state 5.1.68-betaDI0 → 5.1.68-betaDI1

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.
@@ -4,10 +4,12 @@ import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
4
4
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
5
5
  import { notificationPreferencesUrl } from '../notificationPreferencesEndpoint';
6
6
  import { mapPreferencesToPayload, } from '../notificationPreferencesViewPayload';
7
- import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess, setGroupFrequency, toggleEventChannel, } from '../notificationPreferencesViewReducer';
7
+ import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess, setGroupChannelMaster, setGroupFrequency, toggleEventChannel, } from '../notificationPreferencesViewReducer';
8
8
  import { getNotificationLocalOverrides } from '../notificationPreferencesViewSelector';
9
9
  const DEBOUNCE_MS = 300;
10
- export const saveNotificationPreferencesEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter((action) => toggleEventChannel.match(action) || setGroupFrequency.match(action)),
10
+ export const saveNotificationPreferencesEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter((action) => toggleEventChannel.match(action) ||
11
+ setGroupFrequency.match(action) ||
12
+ setGroupChannelMaster.match(action)),
11
13
  // Coalesce bursts of toggles into a single PUT. Trade-off: rapid clickers
12
14
  // defer saves until they pause. Consider a max-wait wrapper if this
13
15
  // becomes a UX problem.
@@ -2,8 +2,8 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
2
2
  import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
3
3
  import { RootState } from '../../../reducer';
4
4
  import { ZeniAPI } from '../../../zeniAPI';
5
- import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess, setGroupFrequency, toggleEventChannel } from '../notificationPreferencesViewReducer';
6
- export type ActionType = ReturnType<typeof clearAllNotificationPreferencesView> | ReturnType<typeof clearNotificationPreferencesLocalOverrides> | ReturnType<typeof saveNotificationPreferences> | ReturnType<typeof saveNotificationPreferencesFailure> | ReturnType<typeof saveNotificationPreferencesSuccess> | ReturnType<typeof setGroupFrequency> | ReturnType<typeof toggleEventChannel> | ReturnType<typeof openSnackbar>;
5
+ import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess, setGroupChannelMaster, setGroupFrequency, toggleEventChannel } from '../notificationPreferencesViewReducer';
6
+ export type ActionType = ReturnType<typeof clearAllNotificationPreferencesView> | ReturnType<typeof clearNotificationPreferencesLocalOverrides> | ReturnType<typeof saveNotificationPreferences> | ReturnType<typeof saveNotificationPreferencesFailure> | ReturnType<typeof saveNotificationPreferencesSuccess> | ReturnType<typeof setGroupChannelMaster> | ReturnType<typeof setGroupFrequency> | ReturnType<typeof toggleEventChannel> | ReturnType<typeof openSnackbar>;
7
7
  export declare const saveNotificationPreferencesEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
8
8
  payload: undefined;
9
9
  type: "notificationPreferencesView/clearAllNotificationPreferencesView";
@@ -31,6 +31,9 @@ export declare const saveNotificationPreferencesEpic: (actions$: ActionsObservab
31
31
  } | {
32
32
  payload: import("../notificationPreferencesViewReducer").SaveNotificationPreferencesSuccessPayload;
33
33
  type: "notificationPreferencesView/saveNotificationPreferencesSuccess";
34
+ } | {
35
+ payload: import("../notificationPreferencesViewReducer").SetGroupChannelMasterPayload;
36
+ type: "notificationPreferencesView/setGroupChannelMaster";
34
37
  } | {
35
38
  payload: import("../notificationPreferencesViewReducer").SetFrequencyPayload;
36
39
  type: "notificationPreferencesView/setGroupFrequency";
@@ -10,7 +10,9 @@ const notificationPreferencesViewPayload_1 = require("../notificationPreferences
10
10
  const notificationPreferencesViewReducer_1 = require("../notificationPreferencesViewReducer");
11
11
  const notificationPreferencesViewSelector_1 = require("../notificationPreferencesViewSelector");
12
12
  const DEBOUNCE_MS = 300;
13
- const saveNotificationPreferencesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)((action) => notificationPreferencesViewReducer_1.toggleEventChannel.match(action) || notificationPreferencesViewReducer_1.setGroupFrequency.match(action)),
13
+ const saveNotificationPreferencesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)((action) => notificationPreferencesViewReducer_1.toggleEventChannel.match(action) ||
14
+ notificationPreferencesViewReducer_1.setGroupFrequency.match(action) ||
15
+ notificationPreferencesViewReducer_1.setGroupChannelMaster.match(action)),
14
16
  // Coalesce bursts of toggles into a single PUT. Trade-off: rapid clickers
15
17
  // defer saves until they pause. Consider a max-wait wrapper if this
16
18
  // becomes a UX problem.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.1.68-betaDI0",
3
+ "version": "5.1.68-betaDI1",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",