@replyke/core 5.1.4 → 5.1.5-beta.1

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 (103) hide show
  1. package/dist/cjs/context/index.d.ts +1 -0
  2. package/dist/cjs/context/index.js +3 -1
  3. package/dist/cjs/context/index.js.map +1 -1
  4. package/dist/cjs/context/replyke-context.d.ts +1 -0
  5. package/dist/cjs/context/replyke-context.js +3 -2
  6. package/dist/cjs/context/replyke-context.js.map +1 -1
  7. package/dist/cjs/context/replyke-store-context.d.ts +12 -0
  8. package/dist/cjs/context/replyke-store-context.js +20 -0
  9. package/dist/cjs/context/replyke-store-context.js.map +1 -0
  10. package/dist/cjs/hooks/app-notifications-redux/index.d.ts +4 -0
  11. package/dist/cjs/hooks/app-notifications-redux/index.js +14 -0
  12. package/dist/cjs/hooks/app-notifications-redux/index.js.map +1 -0
  13. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.d.ts +12 -0
  14. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js +208 -0
  15. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js.map +1 -0
  16. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +7 -0
  17. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +83 -0
  18. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +1 -0
  19. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +7 -0
  20. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js +30 -0
  21. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +1 -0
  22. package/dist/cjs/index.d.ts +4 -1
  23. package/dist/cjs/index.js +9 -2
  24. package/dist/cjs/index.js.map +1 -1
  25. package/dist/cjs/store/api/appNotificationsApi.d.ts +1687 -0
  26. package/dist/cjs/store/api/appNotificationsApi.js +169 -0
  27. package/dist/cjs/store/api/appNotificationsApi.js.map +1 -0
  28. package/dist/cjs/store/api/baseApi.d.ts +1 -0
  29. package/dist/cjs/store/api/baseApi.js +34 -0
  30. package/dist/cjs/store/api/baseApi.js.map +1 -0
  31. package/dist/cjs/store/api/index.d.ts +2 -0
  32. package/dist/cjs/store/api/index.js +27 -0
  33. package/dist/cjs/store/api/index.js.map +1 -0
  34. package/dist/cjs/store/index.d.ts +13 -0
  35. package/dist/cjs/store/index.js +49 -0
  36. package/dist/cjs/store/index.js.map +1 -0
  37. package/dist/cjs/store/middleware.d.ts +4 -0
  38. package/dist/cjs/store/middleware.js +44 -0
  39. package/dist/cjs/store/middleware.js.map +1 -0
  40. package/dist/cjs/store/rootReducer.d.ts +8 -0
  41. package/dist/cjs/store/rootReducer.js +15 -0
  42. package/dist/cjs/store/rootReducer.js.map +1 -0
  43. package/dist/cjs/store/slices/appNotificationsSlice.d.ts +57 -0
  44. package/dist/cjs/store/slices/appNotificationsSlice.js +127 -0
  45. package/dist/cjs/store/slices/appNotificationsSlice.js.map +1 -0
  46. package/dist/cjs/store/slices/index.d.ts +1 -0
  47. package/dist/cjs/store/slices/index.js +23 -0
  48. package/dist/cjs/store/slices/index.js.map +1 -0
  49. package/dist/cjs/store/types/index.d.ts +8 -0
  50. package/dist/cjs/store/types/index.js +3 -0
  51. package/dist/cjs/store/types/index.js.map +1 -0
  52. package/dist/esm/context/index.d.ts +1 -0
  53. package/dist/esm/context/index.js +1 -0
  54. package/dist/esm/context/index.js.map +1 -1
  55. package/dist/esm/context/replyke-context.d.ts +1 -0
  56. package/dist/esm/context/replyke-context.js +3 -2
  57. package/dist/esm/context/replyke-context.js.map +1 -1
  58. package/dist/esm/context/replyke-store-context.d.ts +12 -0
  59. package/dist/esm/context/replyke-store-context.js +16 -0
  60. package/dist/esm/context/replyke-store-context.js.map +1 -0
  61. package/dist/esm/hooks/app-notifications-redux/index.d.ts +4 -0
  62. package/dist/esm/hooks/app-notifications-redux/index.js +5 -0
  63. package/dist/esm/hooks/app-notifications-redux/index.js.map +1 -0
  64. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.d.ts +12 -0
  65. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js +202 -0
  66. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js.map +1 -0
  67. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +7 -0
  68. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +78 -0
  69. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +1 -0
  70. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +7 -0
  71. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js +27 -0
  72. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +1 -0
  73. package/dist/esm/index.d.ts +4 -1
  74. package/dist/esm/index.js +7 -1
  75. package/dist/esm/index.js.map +1 -1
  76. package/dist/esm/store/api/appNotificationsApi.d.ts +1687 -0
  77. package/dist/esm/store/api/appNotificationsApi.js +166 -0
  78. package/dist/esm/store/api/appNotificationsApi.js.map +1 -0
  79. package/dist/esm/store/api/baseApi.d.ts +1 -0
  80. package/dist/esm/store/api/baseApi.js +31 -0
  81. package/dist/esm/store/api/baseApi.js.map +1 -0
  82. package/dist/esm/store/api/index.d.ts +2 -0
  83. package/dist/esm/store/api/index.js +9 -0
  84. package/dist/esm/store/api/index.js.map +1 -0
  85. package/dist/esm/store/index.d.ts +13 -0
  86. package/dist/esm/store/index.js +32 -0
  87. package/dist/esm/store/index.js.map +1 -0
  88. package/dist/esm/store/middleware.d.ts +4 -0
  89. package/dist/esm/store/middleware.js +39 -0
  90. package/dist/esm/store/middleware.js.map +1 -0
  91. package/dist/esm/store/rootReducer.d.ts +8 -0
  92. package/dist/esm/store/rootReducer.js +12 -0
  93. package/dist/esm/store/rootReducer.js.map +1 -0
  94. package/dist/esm/store/slices/appNotificationsSlice.d.ts +57 -0
  95. package/dist/esm/store/slices/appNotificationsSlice.js +116 -0
  96. package/dist/esm/store/slices/appNotificationsSlice.js.map +1 -0
  97. package/dist/esm/store/slices/index.d.ts +1 -0
  98. package/dist/esm/store/slices/index.js +7 -0
  99. package/dist/esm/store/slices/index.js.map +1 -0
  100. package/dist/esm/store/types/index.d.ts +8 -0
  101. package/dist/esm/store/types/index.js +2 -0
  102. package/dist/esm/store/types/index.js.map +1 -0
  103. package/package.json +4 -2
@@ -1,4 +1,5 @@
1
1
  export { ReplykeProvider } from "./replyke-context";
2
+ export { ReplykeStoreProvider } from "./replyke-store-context";
2
3
  export { AuthProvider } from "./auth-context";
3
4
  export { EntityListProvider } from "./entity-list-context";
4
5
  export { EntityProvider } from "./entity-context";
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CommentSectionProvider = exports.AppNotificationsProvider = exports.ListsProvider = exports.EntityProvider = exports.EntityListProvider = exports.AuthProvider = exports.ReplykeProvider = void 0;
3
+ exports.CommentSectionProvider = exports.AppNotificationsProvider = exports.ListsProvider = exports.EntityProvider = exports.EntityListProvider = exports.AuthProvider = exports.ReplykeStoreProvider = exports.ReplykeProvider = void 0;
4
4
  var replyke_context_1 = require("./replyke-context");
5
5
  Object.defineProperty(exports, "ReplykeProvider", { enumerable: true, get: function () { return replyke_context_1.ReplykeProvider; } });
6
+ var replyke_store_context_1 = require("./replyke-store-context");
7
+ Object.defineProperty(exports, "ReplykeStoreProvider", { enumerable: true, get: function () { return replyke_store_context_1.ReplykeStoreProvider; } });
6
8
  var auth_context_1 = require("./auth-context");
7
9
  Object.defineProperty(exports, "AuthProvider", { enumerable: true, get: function () { return auth_context_1.AuthProvider; } });
8
10
  var entity_list_context_1 = require("./entity-list-context");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,6DAA2D;AAAlD,yHAAA,kBAAkB,OAAA;AAC3B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,yEAAuE;AAA9D,qIAAA,wBAAwB,OAAA;AACjC,qEAAmE;AAA1D,iIAAA,sBAAsB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,iEAA+D;AAAtD,6HAAA,oBAAoB,OAAA;AAC7B,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,6DAA2D;AAAlD,yHAAA,kBAAkB,OAAA;AAC3B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,yEAAuE;AAA9D,qIAAA,wBAAwB,OAAA;AACjC,qEAAmE;AAA1D,iIAAA,sBAAsB,OAAA"}
@@ -2,6 +2,7 @@ import React from "react";
2
2
  import { UseProjectDataProps, UseProjectDataValues } from "../hooks/projects/useProjectData";
3
3
  export interface ReplykeContextProps extends UseProjectDataProps {
4
4
  signedToken?: string | null | undefined;
5
+ enableRedux?: boolean;
5
6
  children: React.ReactNode;
6
7
  }
7
8
  export interface ReplykeContextValues extends UseProjectDataValues {
@@ -8,16 +8,17 @@ var jsx_runtime_1 = require("react/jsx-runtime");
8
8
  var react_1 = require("react");
9
9
  var useProjectData_1 = __importDefault(require("../hooks/projects/useProjectData"));
10
10
  var auth_context_1 = require("./auth-context");
11
+ var replyke_store_context_1 = require("./replyke-store-context");
11
12
  exports.ReplykeContext = (0, react_1.createContext)({
12
13
  projectId: "",
13
14
  project: null,
14
15
  });
15
16
  var ReplykeProvider = function (_a) {
16
- var projectId = _a.projectId, signedToken = _a.signedToken, children = _a.children;
17
+ var projectId = _a.projectId, signedToken = _a.signedToken, _b = _a.enableRedux, enableRedux = _b === void 0 ? false : _b, children = _a.children;
17
18
  var data = (0, useProjectData_1.default)({ projectId: projectId });
18
19
  if (!projectId)
19
20
  throw new Error("projectId in ReplykeProvider is " + typeof projectId);
20
- return ((0, jsx_runtime_1.jsx)(exports.ReplykeContext.Provider, { value: data, children: (0, jsx_runtime_1.jsx)(auth_context_1.AuthProvider, { signedToken: signedToken, children: children }) }));
21
+ return ((0, jsx_runtime_1.jsx)(exports.ReplykeContext.Provider, { value: data, children: (0, jsx_runtime_1.jsx)(auth_context_1.AuthProvider, { signedToken: signedToken, children: enableRedux ? ((0, jsx_runtime_1.jsx)(replyke_store_context_1.ReplykeStoreProvider, { children: children })) : (children) }) }));
21
22
  };
22
23
  exports.ReplykeProvider = ReplykeProvider;
23
24
  //# sourceMappingURL=replyke-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"replyke-context.js","sourceRoot":"","sources":["../../../src/context/replyke-context.tsx"],"names":[],"mappings":";;;;;;;AAAA,+BAA6C;AAC7C,oFAG0C;AAC1C,+CAA8C;AASjC,QAAA,cAAc,GAAG,IAAA,qBAAa,EAAuB;IAChE,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,IAAI;CACd,CAAC,CAAC;AAEI,IAAM,eAAe,GAAkC,UAAC,EAIzC;QAHpB,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,QAAQ,cAAA;IAER,IAAM,IAAI,GAAG,IAAA,wBAAc,EAAC,EAAE,SAAS,WAAA,EAAE,CAAC,CAAC;IAE3C,IAAI,CAAC,SAAS;QACZ,MAAM,IAAI,KAAK,CAAC,kCAAkC,GAAG,OAAO,SAAS,CAAC,CAAC;IAEzE,OAAO,CACL,uBAAC,sBAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YAClC,uBAAC,2BAAY,IAAC,WAAW,EAAE,WAAW,YAAG,QAAQ,GAAgB,GACzC,CAC3B,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,eAAe,mBAe1B"}
1
+ {"version":3,"file":"replyke-context.js","sourceRoot":"","sources":["../../../src/context/replyke-context.tsx"],"names":[],"mappings":";;;;;;;AAAA,+BAA6C;AAC7C,oFAG0C;AAC1C,+CAA8C;AAC9C,iEAA+D;AAUlD,QAAA,cAAc,GAAG,IAAA,qBAAa,EAAuB;IAChE,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,IAAI;CACd,CAAC,CAAC;AAEI,IAAM,eAAe,GAAkC,UAAC,EAKzC;QAJpB,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,mBAAmB,EAAnB,WAAW,mBAAG,KAAK,KAAA,EACnB,QAAQ,cAAA;IAER,IAAM,IAAI,GAAG,IAAA,wBAAc,EAAC,EAAE,SAAS,WAAA,EAAE,CAAC,CAAC;IAE3C,IAAI,CAAC,SAAS;QACZ,MAAM,IAAI,KAAK,CAAC,kCAAkC,GAAG,OAAO,SAAS,CAAC,CAAC;IAEzE,OAAO,CACL,uBAAC,sBAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YAClC,uBAAC,2BAAY,IAAC,WAAW,EAAE,WAAW,YACnC,WAAW,CAAC,CAAC,CAAC,CACb,uBAAC,4CAAoB,cAAE,QAAQ,GAAwB,CACxD,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,GACY,GACS,CAC3B,CAAC;AACJ,CAAC,CAAC;AAtBW,QAAA,eAAe,mBAsB1B"}
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import type { ReactNode } from "react";
3
+ export interface ReplykeStoreProviderProps {
4
+ children: ReactNode;
5
+ }
6
+ /**
7
+ * Redux store provider for Replyke
8
+ * This component provides the Redux store to all child components
9
+ * Can be used standalone or wrapped around the existing ReplykeProvider
10
+ */
11
+ export declare const ReplykeStoreProvider: React.FC<ReplykeStoreProviderProps>;
12
+ export default ReplykeStoreProvider;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReplykeStoreProvider = void 0;
4
+ var jsx_runtime_1 = require("react/jsx-runtime");
5
+ var react_redux_1 = require("react-redux");
6
+ var store_1 = require("../store");
7
+ /**
8
+ * Redux store provider for Replyke
9
+ * This component provides the Redux store to all child components
10
+ * Can be used standalone or wrapped around the existing ReplykeProvider
11
+ */
12
+ var ReplykeStoreProvider = function (_a) {
13
+ var children = _a.children;
14
+ return ((0, jsx_runtime_1.jsx)(react_redux_1.Provider, { store: store_1.replykeStore, children: children }));
15
+ };
16
+ exports.ReplykeStoreProvider = ReplykeStoreProvider;
17
+ // ReplykeProviderWithRedux has been deprecated
18
+ // Use ReplykeProvider with enableRedux={true} instead
19
+ exports.default = exports.ReplykeStoreProvider;
20
+ //# sourceMappingURL=replyke-store-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replyke-store-context.js","sourceRoot":"","sources":["../../../src/context/replyke-store-context.tsx"],"names":[],"mappings":";;;;AACA,2CAAuC;AACvC,kCAAwC;AAOxC;;;;GAIG;AACI,IAAM,oBAAoB,GAAwC,UAAC,EAEzE;QADC,QAAQ,cAAA;IAER,OAAO,CACL,uBAAC,sBAAQ,IAAC,KAAK,EAAE,oBAAY,YAC1B,QAAQ,GACA,CACZ,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,oBAAoB,wBAQ/B;AAEF,+CAA+C;AAC/C,sDAAsD;AAEtD,kBAAe,4BAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default as useAppNotificationsRedux } from "./useAppNotificationsRedux";
2
+ export { default as useAppNotificationsDataRedux } from "./useAppNotificationsDataRedux";
3
+ export { default as useAppNotificationsActionsRedux } from "./useAppNotificationsActionsRedux";
4
+ export type { UseAppNotificationsDataProps, UseAppNotificationsDataValues, } from "../app-notifications/useAppNotificationsData";
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useAppNotificationsActionsRedux = exports.useAppNotificationsDataRedux = exports.useAppNotificationsRedux = void 0;
7
+ // Export Redux-powered app notifications hooks
8
+ var useAppNotificationsRedux_1 = require("./useAppNotificationsRedux");
9
+ Object.defineProperty(exports, "useAppNotificationsRedux", { enumerable: true, get: function () { return __importDefault(useAppNotificationsRedux_1).default; } });
10
+ var useAppNotificationsDataRedux_1 = require("./useAppNotificationsDataRedux");
11
+ Object.defineProperty(exports, "useAppNotificationsDataRedux", { enumerable: true, get: function () { return __importDefault(useAppNotificationsDataRedux_1).default; } });
12
+ var useAppNotificationsActionsRedux_1 = require("./useAppNotificationsActionsRedux");
13
+ Object.defineProperty(exports, "useAppNotificationsActionsRedux", { enumerable: true, get: function () { return __importDefault(useAppNotificationsActionsRedux_1).default; } });
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAA+C;AAC/C,uEAAiF;AAAxE,qJAAA,OAAO,OAA4B;AAC5C,+EAAyF;AAAhF,6JAAA,OAAO,OAAgC;AAChD,qFAA+F;AAAtF,mKAAA,OAAO,OAAmC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Hook that provides Redux-powered actions for app notifications
3
+ * Integrates RTK Query with Redux slice actions
4
+ */
5
+ export declare function useAppNotificationsActionsRedux(): {
6
+ loadMore: () => void;
7
+ markNotificationAsRead: (notificationId: string) => Promise<void>;
8
+ resetAppNotifications: () => Promise<void>;
9
+ fetchMoreNotifications: (pageToFetch: number) => Promise<void>;
10
+ updateUnreadCount: () => Promise<void>;
11
+ };
12
+ export default useAppNotificationsActionsRedux;
@@ -0,0 +1,208 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.useAppNotificationsActionsRedux = useAppNotificationsActionsRedux;
43
+ var react_1 = require("react");
44
+ var react_redux_1 = require("react-redux");
45
+ var appNotificationsSlice_1 = require("../../store/slices/appNotificationsSlice");
46
+ var appNotificationsApi_1 = require("../../store/api/appNotificationsApi");
47
+ var handleError_1 = require("../../utils/handleError");
48
+ var addNotificationsMessages_1 = __importDefault(require("../../helpers/addNotificationsMessages"));
49
+ var useProject_1 = __importDefault(require("../projects/useProject"));
50
+ var useUser_1 = __importDefault(require("../users/useUser"));
51
+ /**
52
+ * Hook that provides Redux-powered actions for app notifications
53
+ * Integrates RTK Query with Redux slice actions
54
+ */
55
+ function useAppNotificationsActionsRedux() {
56
+ var _this = this;
57
+ var dispatch = (0, react_redux_1.useDispatch)();
58
+ // Get current state for actions
59
+ var projectIdFromSlice = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectCurrentProjectId)(state); });
60
+ var page = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectAppNotificationsPage)(state); });
61
+ var limit = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectAppNotificationsLimit)(state); });
62
+ var notificationTemplates = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectNotificationTemplates)(state); });
63
+ // Get project and user context (fallback to current hooks)
64
+ var projectIdFromHook = (0, useProject_1.default)().projectId;
65
+ var user = (0, useUser_1.default)().user;
66
+ // Use project ID from slice if available, otherwise from hook
67
+ var projectId = projectIdFromSlice || projectIdFromHook;
68
+ // RTK Query hooks
69
+ var triggerFetchNotifications = (0, appNotificationsApi_1.useLazyFetchAppNotificationsQuery)()[0];
70
+ var markNotificationAsReadMutation = (0, appNotificationsApi_1.useMarkNotificationAsReadMutation)()[0];
71
+ var triggerCountUnread = (0, appNotificationsApi_1.useLazyCountUnreadNotificationsQuery)()[0];
72
+ // Load more action
73
+ var loadMore = (0, react_1.useCallback)(function () {
74
+ dispatch((0, appNotificationsSlice_1.loadMore)());
75
+ }, [dispatch]);
76
+ // Mark notification as read action
77
+ var markNotificationAsRead = (0, react_1.useCallback)(function (notificationId) { return __awaiter(_this, void 0, void 0, function () {
78
+ var error_1;
79
+ return __generator(this, function (_a) {
80
+ switch (_a.label) {
81
+ case 0:
82
+ if (!projectId || !user) {
83
+ throw new Error("No project ID or authenticated user available");
84
+ }
85
+ _a.label = 1;
86
+ case 1:
87
+ _a.trys.push([1, 3, , 4]);
88
+ // Optimistic update
89
+ dispatch((0, appNotificationsSlice_1.markAsReadLocally)(notificationId));
90
+ // Make API call
91
+ return [4 /*yield*/, markNotificationAsReadMutation({ projectId: projectId, notificationId: notificationId }).unwrap()];
92
+ case 2:
93
+ // Make API call
94
+ _a.sent();
95
+ return [3 /*break*/, 4];
96
+ case 3:
97
+ error_1 = _a.sent();
98
+ (0, handleError_1.handleError)(error_1, "Failed to mark notification as read:");
99
+ throw error_1;
100
+ case 4: return [2 /*return*/];
101
+ }
102
+ });
103
+ }); }, [dispatch, projectId, user, markNotificationAsReadMutation]);
104
+ // Reset notifications action
105
+ var resetAppNotifications = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
106
+ var result, completeNotifications, error_2;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ if (!projectId || !user) {
111
+ throw new Error("No project ID or authenticated user available");
112
+ }
113
+ _a.label = 1;
114
+ case 1:
115
+ _a.trys.push([1, 3, , 4]);
116
+ dispatch((0, appNotificationsSlice_1.setLoading)(true));
117
+ dispatch((0, appNotificationsSlice_1.resetNotifications)());
118
+ return [4 /*yield*/, triggerFetchNotifications({
119
+ projectId: projectId,
120
+ page: 1,
121
+ limit: limit,
122
+ }).unwrap()];
123
+ case 2:
124
+ result = _a.sent();
125
+ if (result) {
126
+ completeNotifications = (0, addNotificationsMessages_1.default)(result, notificationTemplates);
127
+ dispatch((0, appNotificationsSlice_1.addNotifications)({ notifications: completeNotifications, isFirstPage: true }));
128
+ }
129
+ return [3 /*break*/, 4];
130
+ case 3:
131
+ error_2 = _a.sent();
132
+ (0, handleError_1.handleError)(error_2, "Failed to refresh notifications:");
133
+ throw error_2;
134
+ case 4: return [2 /*return*/];
135
+ }
136
+ });
137
+ }); }, [dispatch, projectId, user, triggerFetchNotifications, limit, notificationTemplates]);
138
+ // Fetch more notifications (internal action triggered by page changes)
139
+ var fetchMoreNotifications = (0, react_1.useCallback)(function (pageToFetch) { return __awaiter(_this, void 0, void 0, function () {
140
+ var result, completeNotifications, error_3;
141
+ return __generator(this, function (_a) {
142
+ switch (_a.label) {
143
+ case 0:
144
+ if (!projectId || !user)
145
+ return [2 /*return*/];
146
+ _a.label = 1;
147
+ case 1:
148
+ _a.trys.push([1, 3, 4, 5]);
149
+ dispatch((0, appNotificationsSlice_1.setLoading)(true));
150
+ return [4 /*yield*/, triggerFetchNotifications({
151
+ projectId: projectId,
152
+ page: pageToFetch,
153
+ limit: limit,
154
+ }).unwrap()];
155
+ case 2:
156
+ result = _a.sent();
157
+ if (result) {
158
+ completeNotifications = (0, addNotificationsMessages_1.default)(result, notificationTemplates);
159
+ dispatch((0, appNotificationsSlice_1.addNotifications)({ notifications: completeNotifications }));
160
+ }
161
+ return [3 /*break*/, 5];
162
+ case 3:
163
+ error_3 = _a.sent();
164
+ (0, handleError_1.handleError)(error_3, "Loading more app notifications failed:");
165
+ return [3 /*break*/, 5];
166
+ case 4:
167
+ dispatch((0, appNotificationsSlice_1.setLoading)(false));
168
+ return [7 /*endfinally*/];
169
+ case 5: return [2 /*return*/];
170
+ }
171
+ });
172
+ }); }, [dispatch, projectId, user, triggerFetchNotifications, limit, notificationTemplates]);
173
+ // Update unread count
174
+ var updateUnreadCount = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
175
+ var count, error_4;
176
+ return __generator(this, function (_a) {
177
+ switch (_a.label) {
178
+ case 0:
179
+ if (!projectId || !user)
180
+ return [2 /*return*/];
181
+ _a.label = 1;
182
+ case 1:
183
+ _a.trys.push([1, 3, , 4]);
184
+ return [4 /*yield*/, triggerCountUnread({ projectId: projectId }).unwrap()];
185
+ case 2:
186
+ count = _a.sent();
187
+ if (typeof count === 'number') {
188
+ dispatch((0, appNotificationsSlice_1.setUnreadCount)(count));
189
+ }
190
+ return [3 /*break*/, 4];
191
+ case 3:
192
+ error_4 = _a.sent();
193
+ (0, handleError_1.handleError)(error_4, "Failed to fetch unread count:");
194
+ return [3 /*break*/, 4];
195
+ case 4: return [2 /*return*/];
196
+ }
197
+ });
198
+ }); }, [dispatch, projectId, user, triggerCountUnread]);
199
+ return {
200
+ loadMore: loadMore,
201
+ markNotificationAsRead: markNotificationAsRead,
202
+ resetAppNotifications: resetAppNotifications,
203
+ fetchMoreNotifications: fetchMoreNotifications, // Internal action
204
+ updateUnreadCount: updateUnreadCount,
205
+ };
206
+ }
207
+ exports.default = useAppNotificationsActionsRedux;
208
+ //# sourceMappingURL=useAppNotificationsActionsRedux.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAppNotificationsActionsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsActionsRedux.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,0EA6HC;AA1JD,+BAAoC;AACpC,2CAAuD;AAEvD,kFAWkD;AAClD,2EAI6C;AAC7C,uDAAsD;AACtD,oGAA8E;AAC9E,sEAAgD;AAChD,6DAAuC;AAEvC;;;GAGG;AACH,SAAgB,+BAA+B;IAA/C,iBA6HC;IA5HC,IAAM,QAAQ,GAAG,IAAA,yBAAW,GAAe,CAAC;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,QAAQ,EAAE,CAAC;wBAC9B,QAAQ,CAAC,IAAA,sCAAc,EAAC,KAAK,CAAC,CAAC,CAAC;oBAClC,CAAC;;;;oBAED,IAAA,yBAAW,EAAC,OAAK,EAAE,+BAA+B,CAAC,CAAC;;;;;SAEvD,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAEpD,OAAO;QACL,QAAQ,UAAA;QACR,sBAAsB,wBAAA;QACtB,qBAAqB,uBAAA;QACrB,sBAAsB,wBAAA,EAAE,kBAAkB;QAC1C,iBAAiB,mBAAA;KAClB,CAAC;AACJ,CAAC;AAED,kBAAe,+BAA+B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { UseAppNotificationsDataProps, UseAppNotificationsDataValues } from "../app-notifications/useAppNotificationsData";
2
+ /**
3
+ * Redux-powered hook that provides the exact same interface as useAppNotificationsData()
4
+ * This is a drop-in replacement for the Context-based hook
5
+ */
6
+ declare function useAppNotificationsDataRedux({ limit, notificationTemplates, }?: UseAppNotificationsDataProps): UseAppNotificationsDataValues;
7
+ export default useAppNotificationsDataRedux;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var react_1 = require("react");
7
+ var react_redux_1 = require("react-redux");
8
+ var appNotificationsSlice_1 = require("../../store/slices/appNotificationsSlice");
9
+ var useAppNotificationsActionsRedux_1 = require("./useAppNotificationsActionsRedux");
10
+ var useProject_1 = __importDefault(require("../projects/useProject"));
11
+ var useUser_1 = __importDefault(require("../users/useUser"));
12
+ /**
13
+ * Redux-powered hook that provides the exact same interface as useAppNotificationsData()
14
+ * This is a drop-in replacement for the Context-based hook
15
+ */
16
+ function useAppNotificationsDataRedux(_a) {
17
+ var _b = _a === void 0 ? {} : _a, _c = _b.limit, limit = _c === void 0 ? 10 : _c, notificationTemplates = _b.notificationTemplates;
18
+ var dispatch = (0, react_redux_1.useDispatch)();
19
+ // Get external context
20
+ var projectId = (0, useProject_1.default)().projectId;
21
+ var user = (0, useUser_1.default)().user;
22
+ // Get Redux state
23
+ var appNotifications = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectAppNotifications)(state); });
24
+ var unreadAppNotificationsCount = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectUnreadCount)(state); });
25
+ var loading = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectAppNotificationsLoading)(state); });
26
+ var hasMore = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectAppNotificationsHasMore)(state); });
27
+ var currentPage = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectAppNotificationsPage)(state); });
28
+ var currentProjectId = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectCurrentProjectId)(state); });
29
+ // Get actions
30
+ var _d = (0, useAppNotificationsActionsRedux_1.useAppNotificationsActionsRedux)(), loadMore = _d.loadMore, markNotificationAsRead = _d.markNotificationAsRead, resetAppNotifications = _d.resetAppNotifications, fetchMoreNotifications = _d.fetchMoreNotifications, updateUnreadCount = _d.updateUnreadCount;
31
+ // Update Redux state when props change
32
+ (0, react_1.useEffect)(function () {
33
+ if (projectId && projectId !== currentProjectId) {
34
+ dispatch((0, appNotificationsSlice_1.setProjectContext)(projectId));
35
+ }
36
+ }, [dispatch, projectId, currentProjectId]);
37
+ (0, react_1.useEffect)(function () {
38
+ dispatch((0, appNotificationsSlice_1.setLimit)(limit));
39
+ }, [dispatch, limit]);
40
+ (0, react_1.useEffect)(function () {
41
+ if (notificationTemplates) {
42
+ dispatch((0, appNotificationsSlice_1.setNotificationTemplates)(notificationTemplates));
43
+ }
44
+ }, [dispatch, notificationTemplates]);
45
+ // Fetch unread count on mount and when dependencies change
46
+ (0, react_1.useEffect)(function () {
47
+ if (projectId && user) {
48
+ updateUnreadCount();
49
+ }
50
+ }, [updateUnreadCount, projectId, user]);
51
+ // Reset and fetch initial notifications when dependencies change
52
+ (0, react_1.useEffect)(function () {
53
+ if (projectId && user) {
54
+ resetAppNotifications();
55
+ }
56
+ }, [resetAppNotifications, projectId, user]);
57
+ // Handle page changes (load more notifications)
58
+ (0, react_1.useEffect)(function () {
59
+ if (currentPage > 1 && projectId && user) {
60
+ fetchMoreNotifications(currentPage);
61
+ }
62
+ }, [currentPage, fetchMoreNotifications, projectId, user]);
63
+ // Return the same interface as the original hook
64
+ return (0, react_1.useMemo)(function () { return ({
65
+ appNotifications: appNotifications,
66
+ unreadAppNotificationsCount: unreadAppNotificationsCount,
67
+ loading: loading,
68
+ hasMore: hasMore,
69
+ loadMore: loadMore,
70
+ markNotificationAsRead: markNotificationAsRead,
71
+ resetAppNotifications: resetAppNotifications,
72
+ }); }, [
73
+ appNotifications,
74
+ unreadAppNotificationsCount,
75
+ loading,
76
+ hasMore,
77
+ loadMore,
78
+ markNotificationAsRead,
79
+ resetAppNotifications,
80
+ ]);
81
+ }
82
+ exports.default = useAppNotificationsDataRedux;
83
+ //# sourceMappingURL=useAppNotificationsDataRedux.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAppNotificationsDataRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsDataRedux.ts"],"names":[],"mappings":";;;;;AAAA,+BAA2C;AAC3C,2CAAuD;AAGvD,kFAUkD;AAClD,qFAAoF;AACpF,sEAAgD;AAChD,6DAAuC;AAEvC;;;GAGG;AACH,SAAS,4BAA4B,CAAC,EAGF;QAHE,qBAGJ,EAAE,KAAA,EAFlC,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,qBAAqB,2BAAA;IAErB,IAAM,QAAQ,GAAG,IAAA,yBAAW,GAAe,CAAC;IAE5C,uBAAuB;IACf,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB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,EAAE;QACF,gBAAgB;QAChB,2BAA2B;QAC3B,OAAO;QACP,OAAO;QACP,QAAQ;QACR,sBAAsB;QACtB,qBAAqB;KACtB,CAAC,CAAC;AACL,CAAC;AAED,kBAAe,4BAA4B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { UseAppNotificationsDataValues } from "../app-notifications/useAppNotificationsData";
2
+ /**
3
+ * Redux-powered hook that provides the same interface as useAppNotifications()
4
+ * Returns the current app notifications state and actions
5
+ */
6
+ export declare function useAppNotificationsRedux(): Partial<UseAppNotificationsDataValues>;
7
+ export default useAppNotificationsRedux;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useAppNotificationsRedux = useAppNotificationsRedux;
4
+ var react_redux_1 = require("react-redux");
5
+ var appNotificationsSlice_1 = require("../../store/slices/appNotificationsSlice");
6
+ var useAppNotificationsActionsRedux_1 = require("./useAppNotificationsActionsRedux");
7
+ /**
8
+ * Redux-powered hook that provides the same interface as useAppNotifications()
9
+ * Returns the current app notifications state and actions
10
+ */
11
+ function useAppNotificationsRedux() {
12
+ // Select data from Redux store
13
+ var appNotifications = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectAppNotifications)(state); });
14
+ var unreadAppNotificationsCount = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectUnreadCount)(state); });
15
+ var loading = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectAppNotificationsLoading)(state); });
16
+ var hasMore = (0, react_redux_1.useSelector)(function (state) { return (0, appNotificationsSlice_1.selectAppNotificationsHasMore)(state); });
17
+ // Get actions
18
+ var _a = (0, useAppNotificationsActionsRedux_1.useAppNotificationsActionsRedux)(), loadMore = _a.loadMore, markNotificationAsRead = _a.markNotificationAsRead, resetAppNotifications = _a.resetAppNotifications;
19
+ return {
20
+ appNotifications: appNotifications,
21
+ unreadAppNotificationsCount: unreadAppNotificationsCount,
22
+ loading: loading,
23
+ hasMore: hasMore,
24
+ loadMore: loadMore,
25
+ markNotificationAsRead: markNotificationAsRead,
26
+ resetAppNotifications: resetAppNotifications,
27
+ };
28
+ }
29
+ exports.default = useAppNotificationsRedux;
30
+ //# sourceMappingURL=useAppNotificationsRedux.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAppNotificationsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsRedux.ts"],"names":[],"mappings":";;AAeA,4DAmBC;AAlCD,2CAA0C;AAG1C,kFAKkD;AAClD,qFAAoF;AAEpF;;;GAGG;AACH,SAAgB,wBAAwB;IACtC,+BAA+B;IAC/B,IAAM,gBAAgB,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB,IAAK,OAAA,IAAA,8CAAsB,EAAC,KAAK,CAAC,EAA7B,CAA6B,CAAC,CAAC;IAC1F,IAAM,2BAA2B,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB,IAAK,OAAA,IAAA,yCAAiB,EAAC,KAAK,CAAC,EAAxB,CAAwB,CAAC,CAAC;IAChG,IAAM,OAAO,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB,IAAK,OAAA,IAAA,qDAA6B,EAAC,KAAK,CAAC,EAApC,CAAoC,CAAC,CAAC;IACxF,IAAM,OAAO,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB,IAAK,OAAA,IAAA,qDAA6B,EAAC,KAAK,CAAC,EAApC,CAAoC,CAAC,CAAC;IAExF,cAAc;IACR,IAAA,KAA8D,IAAA,iEAA+B,GAAE,EAA7F,QAAQ,cAAA,EAAE,sBAAsB,4BAAA,EAAE,qBAAqB,2BAAsC,CAAC;IAEtG,OAAO;QACL,gBAAgB,kBAAA;QAChB,2BAA2B,6BAAA;QAC3B,OAAO,SAAA;QACP,OAAO,SAAA;QACP,QAAQ,UAAA;QACR,sBAAsB,wBAAA;QACtB,qBAAqB,uBAAA;KACtB,CAAC;AACJ,CAAC;AAED,kBAAe,wBAAwB,CAAC"}
@@ -4,11 +4,14 @@ export { getUserName } from "./helpers/getUserName";
4
4
  export { default as getPublicFileUrl } from "./helpers/getPublicFileUrl";
5
5
  export { reportReasons } from "./constants/reportReasons";
6
6
  export type { ReportReasonKey } from "./constants/reportReasons";
7
- export { ReplykeProvider, EntityListProvider, EntityProvider, ListsProvider, AppNotificationsProvider, CommentSectionProvider, } from "./context";
7
+ export { ReplykeProvider, // Now includes optional Redux support via enableRedux prop
8
+ EntityListProvider, EntityProvider, ListsProvider, AppNotificationsProvider, CommentSectionProvider, } from "./context";
9
+ export { ReplykeStoreProvider, } from "./context";
8
10
  export { useProject, useProjectData } from "./hooks/projects";
9
11
  export { useSignTestingJwt } from "./hooks/crypto";
10
12
  export { useAuth, useAuthData, useRequestNewAccessToken, useSignUpWithEmailAndPassword, useSignInWithEmailAndPassword, useSignOut, useChangePassword, useVerifyExternalUser, } from "./hooks/auth";
11
13
  export { useAppNotifications, useAppNotificationsData, useCountUnreadNotifications, useFetchAppNotifications, useMarkNotificationAsRead, } from "./hooks/app-notifications";
14
+ export { useAppNotificationsRedux, useAppNotificationsDataRedux, type UseAppNotificationsDataProps, type UseAppNotificationsDataValues, } from "./hooks/app-notifications-redux";
12
15
  export { useEntity, useEntityData, useCreateEntity, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useUpdateEntity, useEntityVotes, useDeleteEntity, useEntityList, useEntityListData, useInfusedData, } from "./hooks/entities";
13
16
  export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useProfileComments, } from "./hooks/comments";
14
17
  export { useLists, useListsData, useCreateList, useFetchRootList, useFetchSubLists, useIsEntitySaved, useUpdateList, useAddToList, useRemoveFromList, useDeleteList, } from "./hooks/lists";
package/dist/cjs/index.js CHANGED
@@ -36,8 +36,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.useEntityComments = exports.useDeleteComment = exports.useCommentVotes = exports.useUpdateComment = exports.useReplies = exports.useFetchCommentByForeignId = exports.useFetchComment = exports.useFetchManyComments = exports.useCreateComment = exports.useCommentSectionData = exports.useCommentSection = exports.useInfusedData = exports.useEntityListData = exports.useEntityList = exports.useDeleteEntity = exports.useEntityVotes = exports.useUpdateEntity = exports.useFetchEntityByShortId = exports.useFetchEntityByForeignId = exports.useFetchEntity = exports.useCreateEntity = exports.useEntityData = exports.useEntity = exports.useMarkNotificationAsRead = exports.useFetchAppNotifications = exports.useCountUnreadNotifications = exports.useAppNotificationsData = exports.useAppNotifications = exports.useVerifyExternalUser = exports.useChangePassword = exports.useSignOut = exports.useSignInWithEmailAndPassword = exports.useSignUpWithEmailAndPassword = exports.useRequestNewAccessToken = exports.useAuthData = exports.useAuth = exports.useSignTestingJwt = exports.useProjectData = exports.useProject = exports.CommentSectionProvider = exports.AppNotificationsProvider = exports.ListsProvider = exports.EntityProvider = exports.EntityListProvider = exports.ReplykeProvider = exports.reportReasons = exports.getPublicFileUrl = exports.getUserName = exports.safeMergeStyleProps = exports.handleError = void 0;
40
- exports.AppNotification = exports.useUploadFile = exports.useGetMetadata = exports.useCreateReport = exports.useUnfollowUser = exports.useFollowUser = exports.useFetchFollow = exports.useUpdateUser = exports.useMentions = exports.useFetchUserSuggestions = exports.useCheckUsernameAvailability = exports.useFetchUserFollowingCount = exports.useFetchUserFollowersCount = exports.useFetchUserByForeignId = exports.useFetchUser = exports.useUserData = exports.useUser = exports.useDeleteList = exports.useRemoveFromList = exports.useAddToList = exports.useUpdateList = exports.useIsEntitySaved = exports.useFetchSubLists = exports.useFetchRootList = exports.useCreateList = exports.useListsData = exports.useLists = exports.useProfileComments = void 0;
39
+ exports.useUpdateComment = exports.useReplies = exports.useFetchCommentByForeignId = exports.useFetchComment = exports.useFetchManyComments = exports.useCreateComment = exports.useCommentSectionData = exports.useCommentSection = exports.useInfusedData = exports.useEntityListData = exports.useEntityList = exports.useDeleteEntity = exports.useEntityVotes = exports.useUpdateEntity = exports.useFetchEntityByShortId = exports.useFetchEntityByForeignId = exports.useFetchEntity = exports.useCreateEntity = exports.useEntityData = exports.useEntity = exports.useAppNotificationsDataRedux = exports.useAppNotificationsRedux = exports.useMarkNotificationAsRead = exports.useFetchAppNotifications = exports.useCountUnreadNotifications = exports.useAppNotificationsData = exports.useAppNotifications = exports.useVerifyExternalUser = exports.useChangePassword = exports.useSignOut = exports.useSignInWithEmailAndPassword = exports.useSignUpWithEmailAndPassword = exports.useRequestNewAccessToken = exports.useAuthData = exports.useAuth = exports.useSignTestingJwt = exports.useProjectData = exports.useProject = exports.ReplykeStoreProvider = exports.CommentSectionProvider = exports.AppNotificationsProvider = exports.ListsProvider = exports.EntityProvider = exports.EntityListProvider = exports.ReplykeProvider = exports.reportReasons = exports.getPublicFileUrl = exports.getUserName = exports.safeMergeStyleProps = exports.handleError = void 0;
40
+ exports.AppNotification = exports.useUploadFile = exports.useGetMetadata = exports.useCreateReport = exports.useUnfollowUser = exports.useFollowUser = exports.useFetchFollow = exports.useUpdateUser = exports.useMentions = exports.useFetchUserSuggestions = exports.useCheckUsernameAvailability = exports.useFetchUserFollowingCount = exports.useFetchUserFollowersCount = exports.useFetchUserByForeignId = exports.useFetchUser = exports.useUserData = exports.useUser = exports.useDeleteList = exports.useRemoveFromList = exports.useAddToList = exports.useUpdateList = exports.useIsEntitySaved = exports.useFetchSubLists = exports.useFetchRootList = exports.useCreateList = exports.useListsData = exports.useLists = exports.useProfileComments = exports.useEntityComments = exports.useDeleteComment = exports.useCommentVotes = void 0;
41
41
  // Helpers & Utilities
42
42
  var handleError_1 = require("./utils/handleError");
43
43
  Object.defineProperty(exports, "handleError", { enumerable: true, get: function () { return handleError_1.handleError; } });
@@ -58,6 +58,9 @@ Object.defineProperty(exports, "EntityProvider", { enumerable: true, get: functi
58
58
  Object.defineProperty(exports, "ListsProvider", { enumerable: true, get: function () { return context_1.ListsProvider; } });
59
59
  Object.defineProperty(exports, "AppNotificationsProvider", { enumerable: true, get: function () { return context_1.AppNotificationsProvider; } });
60
60
  Object.defineProperty(exports, "CommentSectionProvider", { enumerable: true, get: function () { return context_1.CommentSectionProvider; } });
61
+ // Advanced Redux providers (for advanced use cases)
62
+ var context_2 = require("./context");
63
+ Object.defineProperty(exports, "ReplykeStoreProvider", { enumerable: true, get: function () { return context_2.ReplykeStoreProvider; } });
61
64
  // -- projects
62
65
  var projects_1 = require("./hooks/projects");
63
66
  Object.defineProperty(exports, "useProject", { enumerable: true, get: function () { return projects_1.useProject; } });
@@ -82,6 +85,10 @@ Object.defineProperty(exports, "useAppNotificationsData", { enumerable: true, ge
82
85
  Object.defineProperty(exports, "useCountUnreadNotifications", { enumerable: true, get: function () { return app_notifications_1.useCountUnreadNotifications; } });
83
86
  Object.defineProperty(exports, "useFetchAppNotifications", { enumerable: true, get: function () { return app_notifications_1.useFetchAppNotifications; } });
84
87
  Object.defineProperty(exports, "useMarkNotificationAsRead", { enumerable: true, get: function () { return app_notifications_1.useMarkNotificationAsRead; } });
88
+ // -- app notifications (Redux-powered)
89
+ var app_notifications_redux_1 = require("./hooks/app-notifications-redux");
90
+ Object.defineProperty(exports, "useAppNotificationsRedux", { enumerable: true, get: function () { return app_notifications_redux_1.useAppNotificationsRedux; } });
91
+ Object.defineProperty(exports, "useAppNotificationsDataRedux", { enumerable: true, get: function () { return app_notifications_redux_1.useAppNotificationsDataRedux; } });
85
92
  // -- entities
86
93
  var entities_1 = require("./hooks/entities");
87
94
  Object.defineProperty(exports, "useEntity", { enumerable: true, get: function () { return entities_1.useEntity; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sBAAsB;AACtB,mDAAkD;AAAzC,0GAAA,WAAW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