@replyke/core 7.0.0-beta.26 → 7.0.0-beta.28
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 +5 -3
- package/dist/cjs/hooks/reactions/useReactionToggle.js +34 -4
- package/dist/cjs/hooks/reactions/useReactionToggle.js.map +1 -1
- package/dist/esm/hooks/reactions/useReactionToggle.d.ts +5 -3
- package/dist/esm/hooks/reactions/useReactionToggle.js +34 -4
- package/dist/esm/hooks/reactions/useReactionToggle.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,15 +3,17 @@ import { Comment } from "../../interfaces/models/Comment";
|
|
|
3
3
|
import { ReactionType } from "../../interfaces/models/Reaction";
|
|
4
4
|
export interface UseReactionToggleProps {
|
|
5
5
|
targetType: "Entity" | "Comment";
|
|
6
|
-
targetId: string;
|
|
7
|
-
initialReaction?: ReactionType | null;
|
|
6
|
+
targetId: string | undefined;
|
|
7
|
+
initialReaction?: ReactionType | null | undefined;
|
|
8
|
+
initialReactionCounts?: Record<string, number> | null | undefined;
|
|
8
9
|
}
|
|
9
10
|
export interface UseReactionToggleValues {
|
|
10
11
|
currentReaction: ReactionType | null;
|
|
12
|
+
reactionCounts: Record<string, number>;
|
|
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) {
|
|
@@ -64,10 +77,23 @@ function useReactionToggle(_a) {
|
|
|
64
77
|
// Guard: prevent concurrent operations
|
|
65
78
|
if (loading)
|
|
66
79
|
return [2 /*return*/, null];
|
|
80
|
+
if (!targetId)
|
|
81
|
+
return [2 /*return*/, null];
|
|
67
82
|
originalReaction = currentReaction;
|
|
83
|
+
originalCounts = __assign({}, reactionCounts);
|
|
68
84
|
newReaction = currentReaction === reactionType ? null : reactionType;
|
|
69
85
|
// OPTIMISTIC: Update UI immediately
|
|
70
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);
|
|
71
97
|
_c.label = 1;
|
|
72
98
|
case 1:
|
|
73
99
|
_c.trys.push([1, 6, 7, 8]);
|
|
@@ -85,11 +111,13 @@ function useReactionToggle(_a) {
|
|
|
85
111
|
result = _a;
|
|
86
112
|
// Update with server truth (may differ from optimistic)
|
|
87
113
|
setCurrentReaction((_b = result.userReaction) !== null && _b !== void 0 ? _b : null);
|
|
114
|
+
setReactionCounts(result.reactionCounts ? __assign({}, result.reactionCounts) : {});
|
|
88
115
|
return [2 /*return*/, result];
|
|
89
116
|
case 6:
|
|
90
117
|
err_1 = _c.sent();
|
|
91
118
|
// REVERT: Restore original on error
|
|
92
119
|
setCurrentReaction(originalReaction);
|
|
120
|
+
setReactionCounts(originalCounts);
|
|
93
121
|
(0, handleError_1.handleError)(err_1, "Failed to toggle reaction:");
|
|
94
122
|
return [2 /*return*/, null];
|
|
95
123
|
case 7:
|
|
@@ -101,6 +129,7 @@ function useReactionToggle(_a) {
|
|
|
101
129
|
}); }, [
|
|
102
130
|
loading,
|
|
103
131
|
currentReaction,
|
|
132
|
+
reactionCounts,
|
|
104
133
|
targetType,
|
|
105
134
|
targetId,
|
|
106
135
|
addReaction,
|
|
@@ -108,6 +137,7 @@ function useReactionToggle(_a) {
|
|
|
108
137
|
]);
|
|
109
138
|
return {
|
|
110
139
|
currentReaction: currentReaction,
|
|
140
|
+
reactionCounts: reactionCounts,
|
|
111
141
|
toggleReaction: toggleReaction,
|
|
112
142
|
loading: loading,
|
|
113
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,gBAA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AAA;QACd,cAAc,gBAAA;QACd,OAAO,SAAA;KACR,CAAC;AACJ,CAAC;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -3,15 +3,17 @@ import { Comment } from "../../interfaces/models/Comment";
|
|
|
3
3
|
import { ReactionType } from "../../interfaces/models/Reaction";
|
|
4
4
|
export interface UseReactionToggleProps {
|
|
5
5
|
targetType: "Entity" | "Comment";
|
|
6
|
-
targetId: string;
|
|
7
|
-
initialReaction?: ReactionType | null;
|
|
6
|
+
targetId: string | undefined;
|
|
7
|
+
initialReaction?: ReactionType | null | undefined;
|
|
8
|
+
initialReactionCounts?: Record<string, number> | null | undefined;
|
|
8
9
|
}
|
|
9
10
|
export interface UseReactionToggleValues {
|
|
10
11
|
currentReaction: ReactionType | null;
|
|
12
|
+
reactionCounts: Record<string, number>;
|
|
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) {
|
|
@@ -59,10 +72,23 @@ function useReactionToggle(_a) {
|
|
|
59
72
|
// Guard: prevent concurrent operations
|
|
60
73
|
if (loading)
|
|
61
74
|
return [2 /*return*/, null];
|
|
75
|
+
if (!targetId)
|
|
76
|
+
return [2 /*return*/, null];
|
|
62
77
|
originalReaction = currentReaction;
|
|
78
|
+
originalCounts = __assign({}, reactionCounts);
|
|
63
79
|
newReaction = currentReaction === reactionType ? null : reactionType;
|
|
64
80
|
// OPTIMISTIC: Update UI immediately
|
|
65
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);
|
|
66
92
|
_c.label = 1;
|
|
67
93
|
case 1:
|
|
68
94
|
_c.trys.push([1, 6, 7, 8]);
|
|
@@ -80,11 +106,13 @@ function useReactionToggle(_a) {
|
|
|
80
106
|
result = _a;
|
|
81
107
|
// Update with server truth (may differ from optimistic)
|
|
82
108
|
setCurrentReaction((_b = result.userReaction) !== null && _b !== void 0 ? _b : null);
|
|
109
|
+
setReactionCounts(result.reactionCounts ? __assign({}, result.reactionCounts) : {});
|
|
83
110
|
return [2 /*return*/, result];
|
|
84
111
|
case 6:
|
|
85
112
|
err_1 = _c.sent();
|
|
86
113
|
// REVERT: Restore original on error
|
|
87
114
|
setCurrentReaction(originalReaction);
|
|
115
|
+
setReactionCounts(originalCounts);
|
|
88
116
|
handleError(err_1, "Failed to toggle reaction:");
|
|
89
117
|
return [2 /*return*/, null];
|
|
90
118
|
case 7:
|
|
@@ -96,6 +124,7 @@ function useReactionToggle(_a) {
|
|
|
96
124
|
}); }, [
|
|
97
125
|
loading,
|
|
98
126
|
currentReaction,
|
|
127
|
+
reactionCounts,
|
|
99
128
|
targetType,
|
|
100
129
|
targetId,
|
|
101
130
|
addReaction,
|
|
@@ -103,6 +132,7 @@ function useReactionToggle(_a) {
|
|
|
103
132
|
]);
|
|
104
133
|
return {
|
|
105
134
|
currentReaction: currentReaction,
|
|
135
|
+
reactionCounts: reactionCounts,
|
|
106
136
|
toggleReaction: toggleReaction,
|
|
107
137
|
loading: loading,
|
|
108
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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