@zeniai/client-epic-state 4.14.66 → 4.14.68

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.
@@ -1,9 +1,4 @@
1
- import { Store, StoreEnhancer } from 'redux';
1
+ import { Store } from 'redux';
2
2
  import { RootState } from './reducer';
3
3
  import { ZeniAPI } from './zeniAPI';
4
- declare global {
5
- interface Window {
6
- __REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: (...funcs: StoreEnhancer[]) => StoreEnhancer;
7
- }
8
- }
9
4
  export default function configureNewStore(zeniAPI: ZeniAPI, includeReduxDevTools?: boolean): Store<RootState>;
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = configureNewStore;
7
+ const extension_1 = require("@redux-devtools/extension");
7
8
  const redux_1 = require("redux");
8
9
  const redux_observable_1 = require("redux-observable");
9
10
  const epic_1 = __importDefault(require("./epic"));
@@ -11,10 +12,12 @@ const reducer_1 = __importDefault(require("./reducer"));
11
12
  let epicMiddleware;
12
13
  function configureNewStore(zeniAPI, includeReduxDevTools = false) {
13
14
  epicMiddleware = (0, redux_observable_1.createEpicMiddleware)({ dependencies: zeniAPI });
14
- const composeEnhancers = includeReduxDevTools &&
15
- typeof window === 'object' &&
16
- window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
17
- ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
15
+ const composeEnhancers = includeReduxDevTools
16
+ ? (0, extension_1.composeWithDevTools)({
17
+ name: 'Zeni',
18
+ trace: true,
19
+ traceLimit: 500,
20
+ })
18
21
  : redux_1.compose;
19
22
  const store = (0, redux_1.createStore)(reducer_1.default, composeEnhancers((0, redux_1.applyMiddleware)(epicMiddleware)));
20
23
  epicMiddleware.run(epic_1.default);
@@ -3,6 +3,7 @@ interface TaskTemplatePayload {
3
3
  }
4
4
  export interface TaskGroupTemplatePayload {
5
5
  group_name: string;
6
+ created_at: string | null;
6
7
  tasks: TaskTemplatePayload[];
7
8
  }
8
9
  export {};
@@ -3,6 +3,7 @@ var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.clearAllTaskGroupTemplates = exports.updateTaskGroupTemplates = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
+ const zeniDayJS_1 = require("../../zeniDayJS");
6
7
  exports.initialState = {
7
8
  taskGroupTemplateById: {},
8
9
  };
@@ -16,6 +17,9 @@ const taskGroupTemplate = (0, toolkit_1.createSlice)({
16
17
  id: templatePayload.group_name,
17
18
  name: templatePayload.group_name,
18
19
  tasks: templatePayload.tasks,
20
+ createdAt: templatePayload.created_at != null
21
+ ? (0, zeniDayJS_1.date)(templatePayload.created_at)
22
+ : undefined,
19
23
  };
20
24
  }
21
25
  },
@@ -1,4 +1,5 @@
1
1
  import { ID } from '../../commonStateTypes/common';
2
+ import { ZeniDate } from '../../zeniDayJS';
2
3
  interface TaskTemplate {
3
4
  name: string;
4
5
  }
@@ -6,6 +7,7 @@ export interface TaskGroupTemplate {
6
7
  id: ID;
7
8
  name: string;
8
9
  tasks: TaskTemplate[];
10
+ createdAt?: ZeniDate;
9
11
  }
10
12
  export interface TaskGroupTemplateState {
11
13
  taskGroupTemplateById: Record<ID, TaskGroupTemplate>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.14.66",
3
+ "version": "4.14.68",
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
  "types": "lib/index.d.ts",
@@ -51,6 +51,7 @@
51
51
  "typescript": "^5.7.3"
52
52
  },
53
53
  "dependencies": {
54
+ "@redux-devtools/extension": "^3.3.0",
54
55
  "@reduxjs/toolkit": "^1.6.2",
55
56
  "@stripe/stripe-js": "^4.4.0",
56
57
  "cross-fetch": "^3.1.2",
@@ -97,6 +98,7 @@
97
98
  "bump-update-web-app-cockpit-beta": "chmod +x ./scripts/bump_and_update_web_app_ui_beta.sh && ./scripts/bump_and_update_web_app_ui_beta.sh",
98
99
  "send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
99
100
  "update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
100
- "build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh"
101
+ "build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
102
+ "pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh"
101
103
  }
102
104
  }