@zeniai/client-epic-state 5.1.54-betaDI0 → 5.1.54-betaRD2

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.
Files changed (77) hide show
  1. package/lib/coreEpics.js +2 -3
  2. package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
  3. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +2 -0
  4. package/lib/entity/jeSchedules/jeSchedulesPayload.js +2 -0
  5. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -0
  6. package/lib/entity/jeSchedules/jeSchedulesSelector.js +11 -1
  7. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +2 -0
  8. package/lib/entity/tenant/clearAllEpic.d.ts +1 -3
  9. package/lib/entity/tenant/clearAllEpic.js +0 -4
  10. package/lib/epic.d.ts +2 -2
  11. package/lib/epic.js +2 -2
  12. package/lib/esm/coreEpics.js +2 -3
  13. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +2 -0
  14. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +11 -1
  15. package/lib/esm/entity/tenant/clearAllEpic.js +0 -4
  16. package/lib/esm/epic.js +2 -2
  17. package/lib/esm/index.js +3 -8
  18. package/lib/esm/reducer.js +0 -6
  19. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +15 -2
  20. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +22 -0
  21. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +20 -6
  22. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +58 -10
  23. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +2 -6
  24. package/lib/esm/view/settingsView/epic/fetchNotificationSettingsEpic.js +2 -12
  25. package/lib/esm/view/settingsView/settingsViewHelpers.js +2 -3
  26. package/lib/index.d.ts +5 -11
  27. package/lib/index.js +44 -53
  28. package/lib/reducer.d.ts +0 -6
  29. package/lib/reducer.js +0 -6
  30. package/lib/view/common/recurringViewHelper.d.ts +2 -2
  31. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +14 -1
  32. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +6 -0
  33. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +26 -0
  34. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -0
  35. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  36. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +21 -7
  37. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +27 -4
  38. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +58 -10
  39. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +6 -3
  40. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +4 -8
  41. package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.d.ts +1 -9
  42. package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.js +2 -12
  43. package/lib/view/settingsView/settingsViewHelpers.d.ts +1 -1
  44. package/lib/view/settingsView/settingsViewHelpers.js +2 -3
  45. package/lib/view/settingsView/settingsViewPayload.d.ts +0 -4
  46. package/lib/view/settingsView/settingsViewState.d.ts +1 -1
  47. package/package.json +1 -1
  48. package/lib/entity/notificationRegistry/notificationRegistryPayload.d.ts +0 -18
  49. package/lib/entity/notificationRegistry/notificationRegistryPayload.js +0 -28
  50. package/lib/entity/notificationRegistry/notificationRegistryReducer.d.ts +0 -6
  51. package/lib/entity/notificationRegistry/notificationRegistryReducer.js +0 -26
  52. package/lib/entity/notificationRegistry/notificationRegistrySelector.d.ts +0 -2
  53. package/lib/entity/notificationRegistry/notificationRegistrySelector.js +0 -10
  54. package/lib/entity/notificationRegistry/notificationRegistryState.d.ts +0 -31
  55. package/lib/entity/notificationRegistry/notificationRegistryState.js +0 -10
  56. package/lib/esm/entity/notificationRegistry/notificationRegistryPayload.js +0 -24
  57. package/lib/esm/entity/notificationRegistry/notificationRegistryReducer.js +0 -22
  58. package/lib/esm/entity/notificationRegistry/notificationRegistrySelector.js +0 -6
  59. package/lib/esm/entity/notificationRegistry/notificationRegistryState.js +0 -5
  60. package/lib/esm/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +0 -58
  61. package/lib/esm/view/notificationPreferencesView/notificationPreferencesEndpoint.js +0 -5
  62. package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewPayload.js +0 -36
  63. package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewReducer.js +0 -124
  64. package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewSelector.js +0 -25
  65. package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewState.js +0 -4
  66. package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.d.ts +0 -30
  67. package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +0 -62
  68. package/lib/view/notificationPreferencesView/notificationPreferencesEndpoint.d.ts +0 -2
  69. package/lib/view/notificationPreferencesView/notificationPreferencesEndpoint.js +0 -9
  70. package/lib/view/notificationPreferencesView/notificationPreferencesViewPayload.d.ts +0 -7
  71. package/lib/view/notificationPreferencesView/notificationPreferencesViewPayload.js +0 -41
  72. package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.d.ts +0 -23
  73. package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.js +0 -128
  74. package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.d.ts +0 -7
  75. package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.js +0 -32
  76. package/lib/view/notificationPreferencesView/notificationPreferencesViewState.d.ts +0 -12
  77. package/lib/view/notificationPreferencesView/notificationPreferencesViewState.js +0 -8
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hasUnsavedNotificationPreferences = exports.getNotificationLocalOverrides = exports.getEffectiveNotificationPreferences = exports.getNotificationPreferencesSaveState = void 0;
4
- const getView = (state) => state.notificationPreferencesViewState;
5
- const getNotificationPreferencesSaveState = (state) => getView(state).savePreferencesState;
6
- exports.getNotificationPreferencesSaveState = getNotificationPreferencesSaveState;
7
- const getEffectiveNotificationPreferences = (state) => {
8
- const view = getView(state);
9
- const mergedEventEnabledByChannel = { ...view.preferences.eventEnabledByChannel };
10
- Object.entries(view.localOverrides.eventEnabledByChannel).forEach(([eventId, channels]) => {
11
- mergedEventEnabledByChannel[eventId] = {
12
- ...(view.preferences.eventEnabledByChannel[eventId] ?? {}),
13
- ...channels,
14
- };
15
- });
16
- return {
17
- eventEnabledByChannel: mergedEventEnabledByChannel,
18
- groupFrequencyByGroupId: {
19
- ...view.preferences.groupFrequencyByGroupId,
20
- ...view.localOverrides.groupFrequencyByGroupId,
21
- },
22
- };
23
- };
24
- exports.getEffectiveNotificationPreferences = getEffectiveNotificationPreferences;
25
- const getNotificationLocalOverrides = (state) => getView(state).localOverrides;
26
- exports.getNotificationLocalOverrides = getNotificationLocalOverrides;
27
- const hasUnsavedNotificationPreferences = (state) => {
28
- const overrides = getView(state).localOverrides;
29
- return (Object.keys(overrides.eventEnabledByChannel).length > 0 ||
30
- Object.keys(overrides.groupFrequencyByGroupId).length > 0);
31
- };
32
- exports.hasUnsavedNotificationPreferences = hasUnsavedNotificationPreferences;
@@ -1,12 +0,0 @@
1
- import { FetchStateAndError } from '../../commonStateTypes/common';
2
- import { NotificationChannel, NotificationFrequency } from '../../entity/notificationRegistry/notificationRegistryState';
3
- export interface NotificationPreferences {
4
- eventEnabledByChannel: Record<string, Partial<Record<NotificationChannel, boolean>>>;
5
- groupFrequencyByGroupId: Record<string, NotificationFrequency>;
6
- }
7
- export interface NotificationPreferencesViewState {
8
- localOverrides: NotificationPreferences;
9
- preferences: NotificationPreferences;
10
- savePreferencesState: FetchStateAndError;
11
- }
12
- export declare const emptyNotificationPreferences: () => NotificationPreferences;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.emptyNotificationPreferences = void 0;
4
- const emptyNotificationPreferences = () => ({
5
- eventEnabledByChannel: {},
6
- groupFrequencyByGroupId: {},
7
- });
8
- exports.emptyNotificationPreferences = emptyNotificationPreferences;