@replyke/core 7.0.0-beta.27 → 7.0.0-beta.29
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.
- package/dist/cjs/hooks/reactions/useReactionToggle.d.ts +4 -2
- package/dist/cjs/hooks/reactions/useReactionToggle.js +32 -4
- package/dist/cjs/hooks/reactions/useReactionToggle.js.map +1 -1
- package/dist/esm/hooks/reactions/useReactionToggle.d.ts +4 -2
- package/dist/esm/hooks/reactions/useReactionToggle.js +32 -4
- package/dist/esm/hooks/reactions/useReactionToggle.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { Entity } from "../../interfaces/models/Entity";
|
|
2
2
|
import { Comment } from "../../interfaces/models/Comment";
|
|
3
|
-
import { ReactionType } from "../../interfaces/models/Reaction";
|
|
3
|
+
import { ReactionType, ReactionCounts } from "../../interfaces/models/Reaction";
|
|
4
4
|
export interface UseReactionToggleProps {
|
|
5
5
|
targetType: "Entity" | "Comment";
|
|
6
6
|
targetId: string | undefined;
|
|
7
7
|
initialReaction?: ReactionType | null | undefined;
|
|
8
|
+
initialReactionCounts?: ReactionCounts | null | undefined;
|
|
8
9
|
}
|
|
9
10
|
export interface UseReactionToggleValues {
|
|
10
11
|
currentReaction: ReactionType | null;
|
|
12
|
+
reactionCounts: Partial<ReactionCounts>;
|
|
11
13
|
toggleReaction: (props: {
|
|
12
14
|
reactionType: ReactionType;
|
|
13
15
|
}) => Promise<Entity | Comment | null>;
|
|
14
16
|
loading: boolean;
|
|
15
17
|
}
|
|
16
|
-
declare function useReactionToggle({ targetType, targetId, initialReaction, }: UseReactionToggleProps): UseReactionToggleValues;
|
|
18
|
+
declare function useReactionToggle({ targetType, targetId, initialReaction, initialReactionCounts, }: UseReactionToggleProps): UseReactionToggleValues;
|
|
17
19
|
export default useReactionToggle;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -45,17 +56,19 @@ var useRemoveReaction_1 = __importDefault(require("./useRemoveReaction"));
|
|
|
45
56
|
var handleError_1 = require("../../utils/handleError");
|
|
46
57
|
function useReactionToggle(_a) {
|
|
47
58
|
var _this = this;
|
|
48
|
-
var targetType = _a.targetType, targetId = _a.targetId, initialReaction = _a.initialReaction;
|
|
59
|
+
var targetType = _a.targetType, targetId = _a.targetId, initialReaction = _a.initialReaction, initialReactionCounts = _a.initialReactionCounts;
|
|
49
60
|
var addReaction = (0, useAddReaction_1.default)();
|
|
50
61
|
var removeReaction = (0, useRemoveReaction_1.default)();
|
|
51
62
|
var _b = (0, react_1.useState)(initialReaction !== null && initialReaction !== void 0 ? initialReaction : null), currentReaction = _b[0], setCurrentReaction = _b[1];
|
|
52
|
-
var _c = (0, react_1.useState)(
|
|
63
|
+
var _c = (0, react_1.useState)(initialReactionCounts !== null && initialReactionCounts !== void 0 ? initialReactionCounts : {}), reactionCounts = _c[0], setReactionCounts = _c[1];
|
|
64
|
+
var _d = (0, react_1.useState)(false), loading = _d[0], setLoading = _d[1];
|
|
53
65
|
// Reset state when target changes
|
|
54
66
|
(0, react_1.useEffect)(function () {
|
|
55
67
|
setCurrentReaction(initialReaction !== null && initialReaction !== void 0 ? initialReaction : null);
|
|
56
|
-
|
|
68
|
+
setReactionCounts(initialReactionCounts !== null && initialReactionCounts !== void 0 ? initialReactionCounts : {});
|
|
69
|
+
}, [targetId, initialReaction, initialReactionCounts]);
|
|
57
70
|
var toggleReaction = (0, react_1.useCallback)(function (props) { return __awaiter(_this, void 0, void 0, function () {
|
|
58
|
-
var reactionType, originalReaction, newReaction, result, _a, err_1;
|
|
71
|
+
var reactionType, originalReaction, originalCounts, newReaction, updatedCounts, result, _a, err_1;
|
|
59
72
|
var _b;
|
|
60
73
|
return __generator(this, function (_c) {
|
|
61
74
|
switch (_c.label) {
|
|
@@ -67,9 +80,20 @@ function useReactionToggle(_a) {
|
|
|
67
80
|
if (!targetId)
|
|
68
81
|
return [2 /*return*/, null];
|
|
69
82
|
originalReaction = currentReaction;
|
|
83
|
+
originalCounts = __assign({}, reactionCounts);
|
|
70
84
|
newReaction = currentReaction === reactionType ? null : reactionType;
|
|
71
85
|
// OPTIMISTIC: Update UI immediately
|
|
72
86
|
setCurrentReaction(newReaction);
|
|
87
|
+
updatedCounts = __assign({}, reactionCounts);
|
|
88
|
+
if (currentReaction) {
|
|
89
|
+
// Decrement old reaction count
|
|
90
|
+
updatedCounts[currentReaction] = Math.max((updatedCounts[currentReaction] || 0) - 1, 0);
|
|
91
|
+
}
|
|
92
|
+
if (newReaction) {
|
|
93
|
+
// Increment new reaction count
|
|
94
|
+
updatedCounts[newReaction] = (updatedCounts[newReaction] || 0) + 1;
|
|
95
|
+
}
|
|
96
|
+
setReactionCounts(updatedCounts);
|
|
73
97
|
_c.label = 1;
|
|
74
98
|
case 1:
|
|
75
99
|
_c.trys.push([1, 6, 7, 8]);
|
|
@@ -87,11 +111,13 @@ function useReactionToggle(_a) {
|
|
|
87
111
|
result = _a;
|
|
88
112
|
// Update with server truth (may differ from optimistic)
|
|
89
113
|
setCurrentReaction((_b = result.userReaction) !== null && _b !== void 0 ? _b : null);
|
|
114
|
+
setReactionCounts(result.reactionCounts ? __assign({}, result.reactionCounts) : {});
|
|
90
115
|
return [2 /*return*/, result];
|
|
91
116
|
case 6:
|
|
92
117
|
err_1 = _c.sent();
|
|
93
118
|
// REVERT: Restore original on error
|
|
94
119
|
setCurrentReaction(originalReaction);
|
|
120
|
+
setReactionCounts(originalCounts);
|
|
95
121
|
(0, handleError_1.handleError)(err_1, "Failed to toggle reaction:");
|
|
96
122
|
return [2 /*return*/, null];
|
|
97
123
|
case 7:
|
|
@@ -103,6 +129,7 @@ function useReactionToggle(_a) {
|
|
|
103
129
|
}); }, [
|
|
104
130
|
loading,
|
|
105
131
|
currentReaction,
|
|
132
|
+
reactionCounts,
|
|
106
133
|
targetType,
|
|
107
134
|
targetId,
|
|
108
135
|
addReaction,
|
|
@@ -110,6 +137,7 @@ function useReactionToggle(_a) {
|
|
|
110
137
|
]);
|
|
111
138
|
return {
|
|
112
139
|
currentReaction: currentReaction,
|
|
140
|
+
reactionCounts: reactionCounts,
|
|
113
141
|
toggleReaction: toggleReaction,
|
|
114
142
|
loading: loading,
|
|
115
143
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReactionToggle.js","sourceRoot":"","sources":["../../../../src/hooks/reactions/useReactionToggle.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useReactionToggle.js","sourceRoot":"","sources":["../../../../src/hooks/reactions/useReactionToggle.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAyD;AAIzD,oEAA8C;AAC9C,0EAAoD;AACpD,uDAAsD;AAkBtD,SAAS,iBAAiB,CAAC,EAKF;IALzB,iBAsGC;QArGC,UAAU,gBAAA,EACV,QAAQ,cAAA,EACR,eAAe,qBAAA,EACf,qBAAqB,2BAAA;IAErB,IAAM,WAAW,GAAG,IAAA,wBAAc,GAAE,CAAC;IACrC,IAAM,cAAc,GAAG,IAAA,2BAAiB,GAAE,CAAC;IAErC,IAAA,KAAwC,IAAA,gBAAQ,EACpD,eAAe,aAAf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A;QACd,OAAO,SAAA;KACR,CAAC;AACJ,CAAC;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { Entity } from "../../interfaces/models/Entity";
|
|
2
2
|
import { Comment } from "../../interfaces/models/Comment";
|
|
3
|
-
import { ReactionType } from "../../interfaces/models/Reaction";
|
|
3
|
+
import { ReactionType, ReactionCounts } from "../../interfaces/models/Reaction";
|
|
4
4
|
export interface UseReactionToggleProps {
|
|
5
5
|
targetType: "Entity" | "Comment";
|
|
6
6
|
targetId: string | undefined;
|
|
7
7
|
initialReaction?: ReactionType | null | undefined;
|
|
8
|
+
initialReactionCounts?: ReactionCounts | null | undefined;
|
|
8
9
|
}
|
|
9
10
|
export interface UseReactionToggleValues {
|
|
10
11
|
currentReaction: ReactionType | null;
|
|
12
|
+
reactionCounts: Partial<ReactionCounts>;
|
|
11
13
|
toggleReaction: (props: {
|
|
12
14
|
reactionType: ReactionType;
|
|
13
15
|
}) => Promise<Entity | Comment | null>;
|
|
14
16
|
loading: boolean;
|
|
15
17
|
}
|
|
16
|
-
declare function useReactionToggle({ targetType, targetId, initialReaction, }: UseReactionToggleProps): UseReactionToggleValues;
|
|
18
|
+
declare function useReactionToggle({ targetType, targetId, initialReaction, initialReactionCounts, }: UseReactionToggleProps): UseReactionToggleValues;
|
|
17
19
|
export default useReactionToggle;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
13
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
14
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -40,17 +51,19 @@ import useRemoveReaction from "./useRemoveReaction";
|
|
|
40
51
|
import { handleError } from "../../utils/handleError";
|
|
41
52
|
function useReactionToggle(_a) {
|
|
42
53
|
var _this = this;
|
|
43
|
-
var targetType = _a.targetType, targetId = _a.targetId, initialReaction = _a.initialReaction;
|
|
54
|
+
var targetType = _a.targetType, targetId = _a.targetId, initialReaction = _a.initialReaction, initialReactionCounts = _a.initialReactionCounts;
|
|
44
55
|
var addReaction = useAddReaction();
|
|
45
56
|
var removeReaction = useRemoveReaction();
|
|
46
57
|
var _b = useState(initialReaction !== null && initialReaction !== void 0 ? initialReaction : null), currentReaction = _b[0], setCurrentReaction = _b[1];
|
|
47
|
-
var _c = useState(
|
|
58
|
+
var _c = useState(initialReactionCounts !== null && initialReactionCounts !== void 0 ? initialReactionCounts : {}), reactionCounts = _c[0], setReactionCounts = _c[1];
|
|
59
|
+
var _d = useState(false), loading = _d[0], setLoading = _d[1];
|
|
48
60
|
// Reset state when target changes
|
|
49
61
|
useEffect(function () {
|
|
50
62
|
setCurrentReaction(initialReaction !== null && initialReaction !== void 0 ? initialReaction : null);
|
|
51
|
-
|
|
63
|
+
setReactionCounts(initialReactionCounts !== null && initialReactionCounts !== void 0 ? initialReactionCounts : {});
|
|
64
|
+
}, [targetId, initialReaction, initialReactionCounts]);
|
|
52
65
|
var toggleReaction = useCallback(function (props) { return __awaiter(_this, void 0, void 0, function () {
|
|
53
|
-
var reactionType, originalReaction, newReaction, result, _a, err_1;
|
|
66
|
+
var reactionType, originalReaction, originalCounts, newReaction, updatedCounts, result, _a, err_1;
|
|
54
67
|
var _b;
|
|
55
68
|
return __generator(this, function (_c) {
|
|
56
69
|
switch (_c.label) {
|
|
@@ -62,9 +75,20 @@ function useReactionToggle(_a) {
|
|
|
62
75
|
if (!targetId)
|
|
63
76
|
return [2 /*return*/, null];
|
|
64
77
|
originalReaction = currentReaction;
|
|
78
|
+
originalCounts = __assign({}, reactionCounts);
|
|
65
79
|
newReaction = currentReaction === reactionType ? null : reactionType;
|
|
66
80
|
// OPTIMISTIC: Update UI immediately
|
|
67
81
|
setCurrentReaction(newReaction);
|
|
82
|
+
updatedCounts = __assign({}, reactionCounts);
|
|
83
|
+
if (currentReaction) {
|
|
84
|
+
// Decrement old reaction count
|
|
85
|
+
updatedCounts[currentReaction] = Math.max((updatedCounts[currentReaction] || 0) - 1, 0);
|
|
86
|
+
}
|
|
87
|
+
if (newReaction) {
|
|
88
|
+
// Increment new reaction count
|
|
89
|
+
updatedCounts[newReaction] = (updatedCounts[newReaction] || 0) + 1;
|
|
90
|
+
}
|
|
91
|
+
setReactionCounts(updatedCounts);
|
|
68
92
|
_c.label = 1;
|
|
69
93
|
case 1:
|
|
70
94
|
_c.trys.push([1, 6, 7, 8]);
|
|
@@ -82,11 +106,13 @@ function useReactionToggle(_a) {
|
|
|
82
106
|
result = _a;
|
|
83
107
|
// Update with server truth (may differ from optimistic)
|
|
84
108
|
setCurrentReaction((_b = result.userReaction) !== null && _b !== void 0 ? _b : null);
|
|
109
|
+
setReactionCounts(result.reactionCounts ? __assign({}, result.reactionCounts) : {});
|
|
85
110
|
return [2 /*return*/, result];
|
|
86
111
|
case 6:
|
|
87
112
|
err_1 = _c.sent();
|
|
88
113
|
// REVERT: Restore original on error
|
|
89
114
|
setCurrentReaction(originalReaction);
|
|
115
|
+
setReactionCounts(originalCounts);
|
|
90
116
|
handleError(err_1, "Failed to toggle reaction:");
|
|
91
117
|
return [2 /*return*/, null];
|
|
92
118
|
case 7:
|
|
@@ -98,6 +124,7 @@ function useReactionToggle(_a) {
|
|
|
98
124
|
}); }, [
|
|
99
125
|
loading,
|
|
100
126
|
currentReaction,
|
|
127
|
+
reactionCounts,
|
|
101
128
|
targetType,
|
|
102
129
|
targetId,
|
|
103
130
|
addReaction,
|
|
@@ -105,6 +132,7 @@ function useReactionToggle(_a) {
|
|
|
105
132
|
]);
|
|
106
133
|
return {
|
|
107
134
|
currentReaction: currentReaction,
|
|
135
|
+
reactionCounts: reactionCounts,
|
|
108
136
|
toggleReaction: toggleReaction,
|
|
109
137
|
loading: loading,
|
|
110
138
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReactionToggle.js","sourceRoot":"","sources":["../../../../src/hooks/reactions/useReactionToggle.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useReactionToggle.js","sourceRoot":"","sources":["../../../../src/hooks/reactions/useReactionToggle.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAkBtD,SAAS,iBAAiB,CAAC,EAKF;IALzB,iBAsGC;QArGC,UAAU,gBAAA,EACV,QAAQ,cAAA,EACR,eAAe,qBAAA,EACf,qBAAqB,2BAAA;IAErB,IAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,IAAM,cAAc,GAAG,iBAAiB,EAAE,CAAC;IAErC,IAAA,KAAwC,QAAQ,CACpD,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,IAAI,CACxB,EAFM,eAAe,QAAA,EAAE,kBAAkB,QAEzC,CAAC;IACI,IAAA,KAAsC,QAAQ,CAClD,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,EAAE,CAC5B,EAFM,cAAc,QAAA,EAAE,iBAAiB,QAEvC,CAAC;IACI,IAAA,KAAwB,QAAQ,CAAC,KAAK,CAAC,EAAtC,OAAO,QAAA,EAAE,UAAU,QAAmB,CAAC;IAE9C,k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