@replyke/core 6.0.0-beta.6 → 6.0.0-beta.9
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/comments/useCommentSectionData.js +4 -1
- package/dist/cjs/hooks/comments/useCommentSectionData.js.map +1 -1
- package/dist/cjs/hooks/relationships/connections/index.d.ts +13 -0
- package/dist/cjs/hooks/relationships/connections/index.js +33 -0
- package/dist/cjs/hooks/relationships/connections/index.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useAcceptConnection.d.ts +5 -0
- package/dist/cjs/hooks/relationships/connections/useAcceptConnection.js +76 -0
- package/dist/cjs/hooks/relationships/connections/useAcceptConnection.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useConnectionManager.d.ts +26 -0
- package/dist/cjs/hooks/relationships/connections/useConnectionManager.js +342 -0
- package/dist/cjs/hooks/relationships/connections/useConnectionManager.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useDeclineConnection.d.ts +5 -0
- package/dist/cjs/hooks/relationships/connections/useDeclineConnection.js +76 -0
- package/dist/cjs/hooks/relationships/connections/useDeclineConnection.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionStatus.d.ts +5 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionStatus.js +79 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionStatus.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnections.d.ts +7 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnections.js +95 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnections.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionsByUserId.d.ts +8 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionsByUserId.js +75 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionsByUserId.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionsCount.d.ts +3 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionsCount.js +72 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionsCount.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionsCountByUserId.d.ts +6 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionsCountByUserId.js +70 -0
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionsCountByUserId.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useFetchReceivedPendingConnections.d.ts +7 -0
- package/dist/cjs/hooks/relationships/connections/useFetchReceivedPendingConnections.js +95 -0
- package/dist/cjs/hooks/relationships/connections/useFetchReceivedPendingConnections.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useFetchSentPendingConnections.d.ts +7 -0
- package/dist/cjs/hooks/relationships/connections/useFetchSentPendingConnections.js +95 -0
- package/dist/cjs/hooks/relationships/connections/useFetchSentPendingConnections.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useRemoveConnection.d.ts +5 -0
- package/dist/cjs/hooks/relationships/connections/useRemoveConnection.js +76 -0
- package/dist/cjs/hooks/relationships/connections/useRemoveConnection.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useRemoveConnectionByUserId.d.ts +5 -0
- package/dist/cjs/hooks/relationships/connections/useRemoveConnectionByUserId.js +79 -0
- package/dist/cjs/hooks/relationships/connections/useRemoveConnectionByUserId.js.map +1 -0
- package/dist/cjs/hooks/relationships/connections/useRequestConnection.d.ts +3 -0
- package/dist/cjs/hooks/relationships/connections/useRequestConnection.js +71 -0
- package/dist/cjs/hooks/relationships/connections/useRequestConnection.js.map +1 -0
- package/dist/cjs/hooks/relationships/follows/index.d.ts +12 -3
- package/dist/cjs/hooks/relationships/follows/index.js +25 -7
- package/dist/cjs/hooks/relationships/follows/index.js.map +1 -1
- package/dist/cjs/hooks/relationships/follows/useFetchFollowStatus.d.ts +8 -0
- package/dist/cjs/hooks/relationships/follows/{useFetchFollow.js → useFetchFollowStatus.js} +5 -5
- package/dist/cjs/hooks/relationships/follows/useFetchFollowStatus.js.map +1 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowers.d.ts +23 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowers.js +91 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowers.js.map +1 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowersByUserId.d.ts +24 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowersByUserId.js +70 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowersByUserId.js.map +1 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowersCount.d.ts +4 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowersCount.js +72 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowersCount.js.map +1 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowersCountByUserId.d.ts +6 -0
- package/dist/cjs/hooks/{users/useFetchUserFollowersCount.js → relationships/follows/useFetchFollowersCountByUserId.js} +9 -10
- package/dist/cjs/hooks/relationships/follows/useFetchFollowersCountByUserId.js.map +1 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowing.d.ts +23 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowing.js +94 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowing.js.map +1 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowingByUserId.d.ts +24 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowingByUserId.js +75 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowingByUserId.js.map +1 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowingCount.d.ts +4 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowingCount.js +72 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowingCount.js.map +1 -0
- package/dist/cjs/hooks/relationships/follows/useFetchFollowingCountByUserId.d.ts +6 -0
- package/dist/cjs/hooks/{users/useFetchUserFollowingCount.js → relationships/follows/useFetchFollowingCountByUserId.js} +9 -10
- package/dist/cjs/hooks/relationships/follows/useFetchFollowingCountByUserId.js.map +1 -0
- package/dist/cjs/hooks/relationships/follows/useFollowManager.js +8 -8
- package/dist/cjs/hooks/relationships/follows/useFollowManager.js.map +1 -1
- package/dist/cjs/hooks/relationships/follows/useUnfollowByFollowId.d.ts +4 -0
- package/dist/cjs/hooks/relationships/follows/useUnfollowByFollowId.js +78 -0
- package/dist/cjs/hooks/relationships/follows/useUnfollowByFollowId.js.map +1 -0
- package/dist/cjs/hooks/relationships/follows/useUnfollowUserByUserId.d.ts +4 -0
- package/dist/cjs/hooks/relationships/follows/{useUnfollowUser.js → useUnfollowUserByUserId.js} +5 -5
- package/dist/cjs/hooks/relationships/follows/useUnfollowUserByUserId.js.map +1 -0
- package/dist/cjs/hooks/useStableObject.d.ts +11 -0
- package/dist/cjs/hooks/useStableObject.js +26 -0
- package/dist/cjs/hooks/useStableObject.js.map +1 -0
- package/dist/cjs/hooks/users/index.d.ts +0 -2
- package/dist/cjs/hooks/users/index.js +1 -5
- package/dist/cjs/hooks/users/index.js.map +1 -1
- package/dist/cjs/hooks/users/useUpdateUser.d.ts +1 -2
- package/dist/cjs/hooks/users/useUpdateUser.js +7 -2
- package/dist/cjs/hooks/users/useUpdateUser.js.map +1 -1
- package/dist/cjs/index.d.ts +4 -2
- package/dist/cjs/index.js +28 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/models/AppNotification.d.ts +26 -2
- package/dist/cjs/interfaces/models/Connection.d.ts +88 -0
- package/dist/cjs/interfaces/models/Connection.js +3 -0
- package/dist/cjs/interfaces/models/Connection.js.map +1 -0
- package/dist/cjs/interfaces/models/Follow.d.ts +2 -0
- package/dist/cjs/utils/objectComparison.d.ts +8 -0
- package/dist/cjs/utils/objectComparison.js +63 -0
- package/dist/cjs/utils/objectComparison.js.map +1 -0
- package/dist/esm/hooks/comments/useCommentSectionData.js +4 -1
- package/dist/esm/hooks/comments/useCommentSectionData.js.map +1 -1
- package/dist/esm/hooks/relationships/connections/index.d.ts +13 -0
- package/dist/esm/hooks/relationships/connections/index.js +14 -0
- package/dist/esm/hooks/relationships/connections/index.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useAcceptConnection.d.ts +5 -0
- package/dist/esm/hooks/relationships/connections/useAcceptConnection.js +71 -0
- package/dist/esm/hooks/relationships/connections/useAcceptConnection.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useConnectionManager.d.ts +26 -0
- package/dist/esm/hooks/relationships/connections/useConnectionManager.js +337 -0
- package/dist/esm/hooks/relationships/connections/useConnectionManager.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useDeclineConnection.d.ts +5 -0
- package/dist/esm/hooks/relationships/connections/useDeclineConnection.js +71 -0
- package/dist/esm/hooks/relationships/connections/useDeclineConnection.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnectionStatus.d.ts +5 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnectionStatus.js +74 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnectionStatus.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnections.d.ts +7 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnections.js +90 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnections.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnectionsByUserId.d.ts +8 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnectionsByUserId.js +70 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnectionsByUserId.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnectionsCount.d.ts +3 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnectionsCount.js +67 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnectionsCount.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnectionsCountByUserId.d.ts +6 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnectionsCountByUserId.js +65 -0
- package/dist/esm/hooks/relationships/connections/useFetchConnectionsCountByUserId.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useFetchReceivedPendingConnections.d.ts +7 -0
- package/dist/esm/hooks/relationships/connections/useFetchReceivedPendingConnections.js +90 -0
- package/dist/esm/hooks/relationships/connections/useFetchReceivedPendingConnections.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useFetchSentPendingConnections.d.ts +7 -0
- package/dist/esm/hooks/relationships/connections/useFetchSentPendingConnections.js +90 -0
- package/dist/esm/hooks/relationships/connections/useFetchSentPendingConnections.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useRemoveConnection.d.ts +5 -0
- package/dist/esm/hooks/relationships/connections/useRemoveConnection.js +71 -0
- package/dist/esm/hooks/relationships/connections/useRemoveConnection.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useRemoveConnectionByUserId.d.ts +5 -0
- package/dist/esm/hooks/relationships/connections/useRemoveConnectionByUserId.js +74 -0
- package/dist/esm/hooks/relationships/connections/useRemoveConnectionByUserId.js.map +1 -0
- package/dist/esm/hooks/relationships/connections/useRequestConnection.d.ts +3 -0
- package/dist/esm/hooks/relationships/connections/useRequestConnection.js +66 -0
- package/dist/esm/hooks/relationships/connections/useRequestConnection.js.map +1 -0
- package/dist/esm/hooks/relationships/follows/index.d.ts +12 -3
- package/dist/esm/hooks/relationships/follows/index.js +12 -3
- package/dist/esm/hooks/relationships/follows/index.js.map +1 -1
- package/dist/esm/hooks/relationships/follows/useFetchFollowStatus.d.ts +8 -0
- package/dist/esm/hooks/relationships/follows/{useFetchFollow.js → useFetchFollowStatus.js} +5 -5
- package/dist/esm/hooks/relationships/follows/useFetchFollowStatus.js.map +1 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowers.d.ts +23 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowers.js +86 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowers.js.map +1 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowersByUserId.d.ts +24 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowersByUserId.js +65 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowersByUserId.js.map +1 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowersCount.d.ts +4 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowersCount.js +67 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowersCount.js.map +1 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowersCountByUserId.d.ts +6 -0
- package/dist/esm/hooks/{users/useFetchUserFollowersCount.js → relationships/follows/useFetchFollowersCountByUserId.js} +8 -9
- package/dist/esm/hooks/relationships/follows/useFetchFollowersCountByUserId.js.map +1 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowing.d.ts +23 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowing.js +89 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowing.js.map +1 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowingByUserId.d.ts +24 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowingByUserId.js +70 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowingByUserId.js.map +1 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowingCount.d.ts +4 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowingCount.js +67 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowingCount.js.map +1 -0
- package/dist/esm/hooks/relationships/follows/useFetchFollowingCountByUserId.d.ts +6 -0
- package/dist/esm/hooks/{users/useFetchUserFollowingCount.js → relationships/follows/useFetchFollowingCountByUserId.js} +8 -9
- package/dist/esm/hooks/relationships/follows/useFetchFollowingCountByUserId.js.map +1 -0
- package/dist/esm/hooks/relationships/follows/useFollowManager.js +8 -8
- package/dist/esm/hooks/relationships/follows/useFollowManager.js.map +1 -1
- package/dist/esm/hooks/relationships/follows/useUnfollowByFollowId.d.ts +4 -0
- package/dist/esm/hooks/relationships/follows/useUnfollowByFollowId.js +73 -0
- package/dist/esm/hooks/relationships/follows/useUnfollowByFollowId.js.map +1 -0
- package/dist/esm/hooks/relationships/follows/useUnfollowUserByUserId.d.ts +4 -0
- package/dist/esm/hooks/relationships/follows/{useUnfollowUser.js → useUnfollowUserByUserId.js} +5 -5
- package/dist/esm/hooks/relationships/follows/useUnfollowUserByUserId.js.map +1 -0
- package/dist/esm/hooks/useStableObject.d.ts +11 -0
- package/dist/esm/hooks/useStableObject.js +23 -0
- package/dist/esm/hooks/useStableObject.js.map +1 -0
- package/dist/esm/hooks/users/index.d.ts +0 -2
- package/dist/esm/hooks/users/index.js +0 -2
- package/dist/esm/hooks/users/index.js.map +1 -1
- package/dist/esm/hooks/users/useUpdateUser.d.ts +1 -2
- package/dist/esm/hooks/users/useUpdateUser.js +7 -2
- package/dist/esm/hooks/users/useUpdateUser.js.map +1 -1
- package/dist/esm/index.d.ts +4 -2
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/models/AppNotification.d.ts +26 -2
- package/dist/esm/interfaces/models/Connection.d.ts +88 -0
- package/dist/esm/interfaces/models/Connection.js +2 -0
- package/dist/esm/interfaces/models/Connection.js.map +1 -0
- package/dist/esm/interfaces/models/Follow.d.ts +2 -0
- package/dist/esm/utils/objectComparison.d.ts +8 -0
- package/dist/esm/utils/objectComparison.js +59 -0
- package/dist/esm/utils/objectComparison.js.map +1 -0
- package/package.json +1 -1
- package/dist/cjs/hooks/relationships/follows/useFetchFollow.d.ts +0 -6
- package/dist/cjs/hooks/relationships/follows/useFetchFollow.js.map +0 -1
- package/dist/cjs/hooks/relationships/follows/useUnfollowUser.d.ts +0 -4
- package/dist/cjs/hooks/relationships/follows/useUnfollowUser.js.map +0 -1
- package/dist/cjs/hooks/users/useFetchUserFollowersCount.d.ts +0 -6
- package/dist/cjs/hooks/users/useFetchUserFollowersCount.js.map +0 -1
- package/dist/cjs/hooks/users/useFetchUserFollowingCount.d.ts +0 -6
- package/dist/cjs/hooks/users/useFetchUserFollowingCount.js.map +0 -1
- package/dist/esm/hooks/relationships/follows/useFetchFollow.d.ts +0 -6
- package/dist/esm/hooks/relationships/follows/useFetchFollow.js.map +0 -1
- package/dist/esm/hooks/relationships/follows/useUnfollowUser.d.ts +0 -4
- package/dist/esm/hooks/relationships/follows/useUnfollowUser.js.map +0 -1
- package/dist/esm/hooks/users/useFetchUserFollowersCount.d.ts +0 -6
- package/dist/esm/hooks/users/useFetchUserFollowersCount.js.map +0 -1
- package/dist/esm/hooks/users/useFetchUserFollowingCount.d.ts +0 -6
- package/dist/esm/hooks/users/useFetchUserFollowingCount.js.map +0 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
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);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
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;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { useCallback } from "react";
|
|
38
|
+
import useProject from "../../projects/useProject";
|
|
39
|
+
import axios from "../../../config/axios";
|
|
40
|
+
function useFetchFollowersByUserId() {
|
|
41
|
+
var _this = this;
|
|
42
|
+
var projectId = useProject().projectId;
|
|
43
|
+
var fetchFollowersByUserId = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
44
|
+
var response;
|
|
45
|
+
var userId = _b.userId, _c = _b.page, page = _c === void 0 ? 1 : _c, _d = _b.limit, limit = _d === void 0 ? 20 : _d;
|
|
46
|
+
return __generator(this, function (_e) {
|
|
47
|
+
switch (_e.label) {
|
|
48
|
+
case 0:
|
|
49
|
+
if (!userId) {
|
|
50
|
+
throw new Error("No userId provided.");
|
|
51
|
+
}
|
|
52
|
+
if (!projectId) {
|
|
53
|
+
throw new Error("No projectId available.");
|
|
54
|
+
}
|
|
55
|
+
return [4 /*yield*/, axios.get("/".concat(projectId, "/users/").concat(userId, "/followers"), { params: { page: page, limit: limit } })];
|
|
56
|
+
case 1:
|
|
57
|
+
response = _e.sent();
|
|
58
|
+
return [2 /*return*/, response.data];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}); }, [projectId]);
|
|
62
|
+
return fetchFollowersByUserId;
|
|
63
|
+
}
|
|
64
|
+
export default useFetchFollowersByUserId;
|
|
65
|
+
//# sourceMappingURL=useFetchFollowersByUserId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchFollowersByUserId.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useFetchFollowersByUserId.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,2BAA2B,CAAC;AAEnD,OAAO,KAAK,MAAM,uBAAuB,CAAC;AA0B1C,SAAS,yBAAyB;IAAlC,iBAwBC;IAvBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,sBAAsB,GAAG,WAAW,CACxC,gEAAO,EAA8D;;YAA5D,MAAM,YAAA,EAAE,YAAQ,EAAR,IAAI,mBAAG,CAAC,KAAA,EAAE,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA;;;;oBACnC,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;oBACzC,CAAC;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,oBAAU,MAAM,eAAY,EACzC,EAAE,MAAM,EAAE,EAAE,IAAI,MAAA,EAAE,KAAK,OAAA,EAAE,EAAE,CAC5B,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAyB,EAAC;;;SAC3C,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,sBAAsB,CAAC;AAChC,CAAC;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
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);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
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;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { useCallback } from "react";
|
|
38
|
+
import useAxiosPrivate from "../../../config/useAxiosPrivate";
|
|
39
|
+
import useProject from "../../projects/useProject";
|
|
40
|
+
import { useUser } from "../../user";
|
|
41
|
+
function useFetchFollowersCount() {
|
|
42
|
+
var _this = this;
|
|
43
|
+
var axios = useAxiosPrivate();
|
|
44
|
+
var projectId = useProject().projectId;
|
|
45
|
+
var user = useUser().user;
|
|
46
|
+
var fetchFollowersCount = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
47
|
+
var response;
|
|
48
|
+
return __generator(this, function (_a) {
|
|
49
|
+
switch (_a.label) {
|
|
50
|
+
case 0:
|
|
51
|
+
if (!projectId) {
|
|
52
|
+
throw new Error("No projectId available.");
|
|
53
|
+
}
|
|
54
|
+
if (!user) {
|
|
55
|
+
throw new Error("No user is logged in.");
|
|
56
|
+
}
|
|
57
|
+
return [4 /*yield*/, axios.get("/".concat(projectId, "/follows/followers-count"), { withCredentials: true })];
|
|
58
|
+
case 1:
|
|
59
|
+
response = _a.sent();
|
|
60
|
+
return [2 /*return*/, response.data];
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}); }, [axios, projectId, user]);
|
|
64
|
+
return fetchFollowersCount;
|
|
65
|
+
}
|
|
66
|
+
export default useFetchFollowersCount;
|
|
67
|
+
//# sourceMappingURL=useFetchFollowersCount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchFollowersCount.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useFetchFollowersCount.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,SAAS,sBAAsB;IAA/B,iBA0BC;IAzBC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,OAAO,EAAE,KAAd,CAAe;IAE3B,IAAM,mBAAmB,GAAG,WAAW,CACrC;;;;;oBACE,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,IAAI,EAAE,CAAC;wBACV,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;oBAC3C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,6BAA0B,EACvC,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAyB,EAAC;;;SAC3C,EACD,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CACzB,CAAC;IAEF,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -35,13 +35,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
import { useCallback } from "react";
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
function
|
|
38
|
+
import useProject from "../../projects/useProject";
|
|
39
|
+
import axios from "../../../config/axios";
|
|
40
|
+
function useFetchFollowersCountByUserId() {
|
|
41
41
|
var _this = this;
|
|
42
|
-
var axios = useAxiosPrivate();
|
|
43
42
|
var projectId = useProject().projectId;
|
|
44
|
-
var
|
|
43
|
+
var fetchFollowersCountByUserId = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
45
44
|
var response;
|
|
46
45
|
var userId = _b.userId;
|
|
47
46
|
return __generator(this, function (_c) {
|
|
@@ -59,8 +58,8 @@ function useFetchUserFollowersCount() {
|
|
|
59
58
|
return [2 /*return*/, response.data];
|
|
60
59
|
}
|
|
61
60
|
});
|
|
62
|
-
}); }, [
|
|
63
|
-
return
|
|
61
|
+
}); }, [projectId]);
|
|
62
|
+
return fetchFollowersCountByUserId;
|
|
64
63
|
}
|
|
65
|
-
export default
|
|
66
|
-
//# sourceMappingURL=
|
|
64
|
+
export default useFetchFollowersCountByUserId;
|
|
65
|
+
//# sourceMappingURL=useFetchFollowersCountByUserId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchFollowersCountByUserId.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useFetchFollowersCountByUserId.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAE1C,SAAS,8BAA8B;IAAvC,iBAuBC;IAtBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,2BAA2B,GAAG,WAAW,CAC7C,gEAAO,EAA8B;;YAA5B,MAAM,YAAA;;;;oBACb,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;oBACzC,CAAC;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,oBAAU,MAAM,qBAAkB,CAChD,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAAyB,EAAC;;;SAC3C,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,2BAA2B,CAAC;AACrC,CAAC;AAED,eAAe,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { User } from "../../../interfaces/models/User";
|
|
2
|
+
export interface FollowingWithFollowInfo {
|
|
3
|
+
followId: string;
|
|
4
|
+
user: User;
|
|
5
|
+
followedAt: string;
|
|
6
|
+
}
|
|
7
|
+
export interface FollowingResponse {
|
|
8
|
+
following: FollowingWithFollowInfo[];
|
|
9
|
+
pagination: {
|
|
10
|
+
currentPage: number;
|
|
11
|
+
totalPages: number;
|
|
12
|
+
totalCount: number;
|
|
13
|
+
hasNextPage: boolean;
|
|
14
|
+
hasPreviousPage: boolean;
|
|
15
|
+
limit: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface FetchFollowingParams {
|
|
19
|
+
page?: number;
|
|
20
|
+
limit?: number;
|
|
21
|
+
}
|
|
22
|
+
declare function useFetchFollowing(): ({ page, limit }?: FetchFollowingParams) => Promise<FollowingResponse>;
|
|
23
|
+
export default useFetchFollowing;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
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);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
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;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
38
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
39
|
+
if (ar || !(i in from)) {
|
|
40
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
41
|
+
ar[i] = from[i];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
45
|
+
};
|
|
46
|
+
import { useCallback } from "react";
|
|
47
|
+
import useAxiosPrivate from "../../../config/useAxiosPrivate";
|
|
48
|
+
import useProject from "../../projects/useProject";
|
|
49
|
+
import { useUser } from "../../user";
|
|
50
|
+
function useFetchFollowing() {
|
|
51
|
+
var _this = this;
|
|
52
|
+
var axios = useAxiosPrivate();
|
|
53
|
+
var projectId = useProject().projectId;
|
|
54
|
+
var user = useUser().user;
|
|
55
|
+
var fetchFollowing = useCallback(function () {
|
|
56
|
+
var args_1 = [];
|
|
57
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
58
|
+
args_1[_i] = arguments[_i];
|
|
59
|
+
}
|
|
60
|
+
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (_a) {
|
|
61
|
+
var response;
|
|
62
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.page, page = _c === void 0 ? 1 : _c, _d = _b.limit, limit = _d === void 0 ? 20 : _d;
|
|
63
|
+
return __generator(this, function (_e) {
|
|
64
|
+
switch (_e.label) {
|
|
65
|
+
case 0:
|
|
66
|
+
if (!projectId) {
|
|
67
|
+
throw new Error("No projectId available.");
|
|
68
|
+
}
|
|
69
|
+
if (!user) {
|
|
70
|
+
throw new Error("No user is logged in.");
|
|
71
|
+
}
|
|
72
|
+
return [4 /*yield*/, axios.get("/".concat(projectId, "/follows/following"), {
|
|
73
|
+
params: {
|
|
74
|
+
page: page,
|
|
75
|
+
limit: limit,
|
|
76
|
+
},
|
|
77
|
+
withCredentials: true,
|
|
78
|
+
})];
|
|
79
|
+
case 1:
|
|
80
|
+
response = _e.sent();
|
|
81
|
+
return [2 /*return*/, response.data];
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
}, [axios, projectId, user]);
|
|
86
|
+
return fetchFollowing;
|
|
87
|
+
}
|
|
88
|
+
export default useFetchFollowing;
|
|
89
|
+
//# sourceMappingURL=useFetchFollowing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchFollowing.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useFetchFollowing.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AA0BrC,SAAS,iBAAiB;IAA1B,iBA6BC;IA5BC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,OAAO,EAAE,KAAd,CAAe;IAE3B,IAAM,cAAc,GAAG,WAAW,CAChC;;;;;mFAAO,EAAmD;;gBAAnD,qBAAiD,EAAE,KAAA,EAAjD,YAAQ,EAAR,IAAI,mBAAG,CAAC,KAAA,EAAE,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA;;;;wBAC3B,IAAI,CAAC,SAAS,EAAE,CAAC;4BACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;wBAC7C,CAAC;wBAED,IAAI,CAAC,IAAI,EAAE,CAAC;4BACV,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;wBAC3C,CAAC;wBAEgB,qBAAM,KAAK,CAAC,GAAG,CAAC,WAAI,SAAS,uBAAoB,EAAE;gCAClE,MAAM,EAAE;oCACN,IAAI,MAAA;oCACJ,KAAK,OAAA;iCACN;gCACD,eAAe,EAAE,IAAI;6BACtB,CAAC,EAAA;;wBANI,QAAQ,GAAG,SAMf;wBAEF,sBAAO,QAAQ,CAAC,IAAyB,EAAC;;;;KAC3C,EACD,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CACzB,CAAC;IAEF,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { User } from "../../../interfaces/models/User";
|
|
2
|
+
export interface FollowingWithFollowInfo {
|
|
3
|
+
followId: string;
|
|
4
|
+
user: User;
|
|
5
|
+
followedAt: string;
|
|
6
|
+
}
|
|
7
|
+
export interface FollowingResponse {
|
|
8
|
+
following: FollowingWithFollowInfo[];
|
|
9
|
+
pagination: {
|
|
10
|
+
currentPage: number;
|
|
11
|
+
totalPages: number;
|
|
12
|
+
totalCount: number;
|
|
13
|
+
hasNextPage: boolean;
|
|
14
|
+
hasPreviousPage: boolean;
|
|
15
|
+
limit: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface FetchFollowingByUserIdParams {
|
|
19
|
+
userId: string;
|
|
20
|
+
page?: number;
|
|
21
|
+
limit?: number;
|
|
22
|
+
}
|
|
23
|
+
declare function useFetchFollowingByUserId(): ({ userId, page, limit }: FetchFollowingByUserIdParams) => Promise<FollowingResponse>;
|
|
24
|
+
export default useFetchFollowingByUserId;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
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);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
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;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { useCallback } from "react";
|
|
38
|
+
import useProject from "../../projects/useProject";
|
|
39
|
+
import axios from "../../../config/axios";
|
|
40
|
+
function useFetchFollowingByUserId() {
|
|
41
|
+
var _this = this;
|
|
42
|
+
var projectId = useProject().projectId;
|
|
43
|
+
var fetchFollowingByUserId = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
44
|
+
var response;
|
|
45
|
+
var userId = _b.userId, _c = _b.page, page = _c === void 0 ? 1 : _c, _d = _b.limit, limit = _d === void 0 ? 20 : _d;
|
|
46
|
+
return __generator(this, function (_e) {
|
|
47
|
+
switch (_e.label) {
|
|
48
|
+
case 0:
|
|
49
|
+
if (!userId) {
|
|
50
|
+
throw new Error("No userId provided.");
|
|
51
|
+
}
|
|
52
|
+
if (!projectId) {
|
|
53
|
+
throw new Error("No projectId available.");
|
|
54
|
+
}
|
|
55
|
+
return [4 /*yield*/, axios.get("/".concat(projectId, "/users/").concat(userId, "/following"), {
|
|
56
|
+
params: {
|
|
57
|
+
page: page,
|
|
58
|
+
limit: limit,
|
|
59
|
+
},
|
|
60
|
+
})];
|
|
61
|
+
case 1:
|
|
62
|
+
response = _e.sent();
|
|
63
|
+
return [2 /*return*/, response.data];
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}); }, [projectId]);
|
|
67
|
+
return fetchFollowingByUserId;
|
|
68
|
+
}
|
|
69
|
+
export default useFetchFollowingByUserId;
|
|
70
|
+
//# sourceMappingURL=useFetchFollowingByUserId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchFollowingByUserId.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useFetchFollowingByUserId.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,2BAA2B,CAAC;AAEnD,OAAO,KAAK,MAAM,uBAAuB,CAAC;AA0B1C,SAAS,yBAAyB;IAAlC,iBA6BC;IA5BS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,sBAAsB,GAAG,WAAW,CACxC,gEAAO,EAA8D;;YAA5D,MAAM,YAAA,EAAE,YAAQ,EAAR,IAAI,mBAAG,CAAC,KAAA,EAAE,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA;;;;oBACnC,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;oBACzC,CAAC;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,oBAAU,MAAM,eAAY,EACzC;4BACE,MAAM,EAAE;gCACN,IAAI,MAAA;gCACJ,KAAK,OAAA;6BACN;yBACF,CACF,EAAA;;oBARK,QAAQ,GAAG,SAQhB;oBAED,sBAAO,QAAQ,CAAC,IAAyB,EAAC;;;SAC3C,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,sBAAsB,CAAC;AAChC,CAAC;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
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);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
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;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { useCallback } from "react";
|
|
38
|
+
import useAxiosPrivate from "../../../config/useAxiosPrivate";
|
|
39
|
+
import useProject from "../../projects/useProject";
|
|
40
|
+
import { useUser } from "../../user";
|
|
41
|
+
function useFetchFollowingCount() {
|
|
42
|
+
var _this = this;
|
|
43
|
+
var axios = useAxiosPrivate();
|
|
44
|
+
var projectId = useProject().projectId;
|
|
45
|
+
var user = useUser().user;
|
|
46
|
+
var fetchFollowingCount = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
47
|
+
var response;
|
|
48
|
+
return __generator(this, function (_a) {
|
|
49
|
+
switch (_a.label) {
|
|
50
|
+
case 0:
|
|
51
|
+
if (!projectId) {
|
|
52
|
+
throw new Error("No projectId available.");
|
|
53
|
+
}
|
|
54
|
+
if (!user) {
|
|
55
|
+
throw new Error("No user is logged in.");
|
|
56
|
+
}
|
|
57
|
+
return [4 /*yield*/, axios.get("/".concat(projectId, "/follows/following-count"), { withCredentials: true })];
|
|
58
|
+
case 1:
|
|
59
|
+
response = _a.sent();
|
|
60
|
+
return [2 /*return*/, response.data];
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}); }, [axios, projectId, user]);
|
|
64
|
+
return fetchFollowingCount;
|
|
65
|
+
}
|
|
66
|
+
export default useFetchFollowingCount;
|
|
67
|
+
//# sourceMappingURL=useFetchFollowingCount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchFollowingCount.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useFetchFollowingCount.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,SAAS,sBAAsB;IAA/B,iBA0BC;IAzBC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,OAAO,EAAE,KAAd,CAAe;IAE3B,IAAM,mBAAmB,GAAG,WAAW,CACrC;;;;;oBACE,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,IAAI,EAAE,CAAC;wBACV,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;oBAC3C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,6BAA0B,EACvC,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAyB,EAAC;;;SAC3C,EACD,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CACzB,CAAC;IAEF,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -35,13 +35,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
import { useCallback } from "react";
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
function
|
|
38
|
+
import useProject from "../../projects/useProject";
|
|
39
|
+
import axios from "../../../config/axios";
|
|
40
|
+
function useFetchFollowingCountByUserId() {
|
|
41
41
|
var _this = this;
|
|
42
|
-
var axios = useAxiosPrivate();
|
|
43
42
|
var projectId = useProject().projectId;
|
|
44
|
-
var
|
|
43
|
+
var fetchFollowingCountByUserId = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
45
44
|
var response;
|
|
46
45
|
var userId = _b.userId;
|
|
47
46
|
return __generator(this, function (_c) {
|
|
@@ -59,8 +58,8 @@ function useFetchUserFollowingCount() {
|
|
|
59
58
|
return [2 /*return*/, response.data];
|
|
60
59
|
}
|
|
61
60
|
});
|
|
62
|
-
}); }, [
|
|
63
|
-
return
|
|
61
|
+
}); }, [projectId]);
|
|
62
|
+
return fetchFollowingCountByUserId;
|
|
64
63
|
}
|
|
65
|
-
export default
|
|
66
|
-
//# sourceMappingURL=
|
|
64
|
+
export default useFetchFollowingCountByUserId;
|
|
65
|
+
//# sourceMappingURL=useFetchFollowingCountByUserId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchFollowingCountByUserId.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useFetchFollowingCountByUserId.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAE1C,SAAS,8BAA8B;IAAvC,iBAuBC;IAtBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,2BAA2B,GAAG,WAAW,CAC7C,gEAAO,EAA8B;;YAA5B,MAAM,YAAA;;;;oBACb,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;oBACzC,CAAC;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,oBAAU,MAAM,qBAAkB,CAChD,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAAyB,EAAC;;;SAC3C,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,2BAA2B,CAAC;AACrC,CAAC;AAED,eAAe,8BAA8B,CAAC"}
|
|
@@ -36,8 +36,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
import { useState, useEffect, useCallback } from "react";
|
|
38
38
|
import useFollowUser from "./useFollowUser";
|
|
39
|
-
import
|
|
40
|
-
import
|
|
39
|
+
import useUnfollowUserByUserId from "./useUnfollowUserByUserId";
|
|
40
|
+
import useFetchFollowStatus from "./useFetchFollowStatus";
|
|
41
41
|
import useUser from "../../user/useUser";
|
|
42
42
|
function useFollowManager(_a) {
|
|
43
43
|
var _this = this;
|
|
@@ -46,8 +46,8 @@ function useFollowManager(_a) {
|
|
|
46
46
|
var _b = useState(null), isFollowing = _b[0], setIsFollowing = _b[1];
|
|
47
47
|
var _c = useState(true), isLoading = _c[0], setIsLoading = _c[1];
|
|
48
48
|
var followUser = useFollowUser();
|
|
49
|
-
var
|
|
50
|
-
var
|
|
49
|
+
var unfollowUserByUserId = useUnfollowUserByUserId();
|
|
50
|
+
var fetchFollowStatus = useFetchFollowStatus();
|
|
51
51
|
useEffect(function () {
|
|
52
52
|
var loadFollowStatus = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
53
53
|
var result, error_1;
|
|
@@ -56,7 +56,7 @@ function useFollowManager(_a) {
|
|
|
56
56
|
case 0:
|
|
57
57
|
_a.trys.push([0, 2, 3, 4]);
|
|
58
58
|
setIsLoading(true);
|
|
59
|
-
return [4 /*yield*/,
|
|
59
|
+
return [4 /*yield*/, fetchFollowStatus({ userId: userId })];
|
|
60
60
|
case 1:
|
|
61
61
|
result = _a.sent();
|
|
62
62
|
setIsFollowing(result.isFollowing);
|
|
@@ -76,7 +76,7 @@ function useFollowManager(_a) {
|
|
|
76
76
|
if (userId && (user === null || user === void 0 ? void 0 : user.id) !== userId) {
|
|
77
77
|
loadFollowStatus();
|
|
78
78
|
}
|
|
79
|
-
}, [userId,
|
|
79
|
+
}, [userId, fetchFollowStatus]);
|
|
80
80
|
var toggleFollow = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
81
81
|
var error_2;
|
|
82
82
|
return __generator(this, function (_a) {
|
|
@@ -88,7 +88,7 @@ function useFollowManager(_a) {
|
|
|
88
88
|
case 1:
|
|
89
89
|
_a.trys.push([1, 6, , 7]);
|
|
90
90
|
if (!isFollowing) return [3 /*break*/, 3];
|
|
91
|
-
return [4 /*yield*/,
|
|
91
|
+
return [4 /*yield*/, unfollowUserByUserId({ userId: userId })];
|
|
92
92
|
case 2:
|
|
93
93
|
_a.sent();
|
|
94
94
|
setIsFollowing(false);
|
|
@@ -106,7 +106,7 @@ function useFollowManager(_a) {
|
|
|
106
106
|
case 7: return [2 /*return*/];
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
|
-
}); }, [isFollowing, isLoading, userId, followUser,
|
|
109
|
+
}); }, [isFollowing, isLoading, userId, followUser, unfollowUserByUserId]);
|
|
110
110
|
return {
|
|
111
111
|
isFollowing: isFollowing,
|
|
112
112
|
isLoading: isLoading,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFollowManager.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useFollowManager.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"useFollowManager.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useFollowManager.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAMzC,SAAS,gBAAgB,CAAC,EAAgC;IAA1D,iBAkDC;QAlD2B,MAAM,YAAA;IACxB,IAAA,IAAI,GAAK,OAAO,EAAE,KAAd,CAAe;IAErB,IAAA,KAAgC,QAAQ,CAAiB,IAAI,CAAC,EAA7D,WAAW,QAAA,EAAE,cAAc,QAAkC,CAAC;IAC/D,IAAA,KAA4B,QAAQ,CAAC,IAAI,CAAC,EAAzC,SAAS,QAAA,EAAE,YAAY,QAAkB,CAAC;IAEjD,IAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,IAAM,oBAAoB,GAAG,uBAAuB,EAAE,CAAC;IACvD,IAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAC;IAEjD,SAAS,CAAC;QACR,IAAM,gBAAgB,GAAG;;;;;;wBAErB,YAAY,CAAC,IAAI,CAAC,CAAC;wBACJ,qBAAM,iBAAiB,CAAC,EAAE,MAAM,QAAA,EAAE,CAAC,EAAA;;wBAA5C,MAAM,GAAG,SAAmC;wBAClD,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;;;;wBAEnC,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,OAAK,CAAC,CAAC;wBACvD,cAAc,CAAC,KAAK,CAAC,CAAC;;;wBAEtB,YAAY,CAAC,KAAK,CAAC,CAAC;;;;;aAEvB,CAAC;QAEF,IAAI,MAAM,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,MAAK,MAAM,EAAE,CAAC;YAClC,gBAAgB,EAAE,CAAC;QACrB,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAEhC,IAAM,YAAY,GAAG,WAAW,CAAC;;;;;oBAC/B,IAAI,WAAW,KAAK,IAAI,IAAI,SAAS,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,MAAK,MAAM;wBAAE,sBAAO;;;;yBAG/D,WAAW,EAAX,wBAAW;oBACb,qBAAM,oBAAoB,CAAC,EAAE,MAAM,QAAA,EAAE,CAAC,EAAA;;oBAAtC,SAAsC,CAAC;oBACvC,cAAc,CAAC,KAAK,CAAC,CAAC;;wBAEtB,qBAAM,UAAU,CAAC,EAAE,MAAM,QAAA,EAAE,CAAC,EAAA;;oBAA5B,SAA4B,CAAC;oBAC7B,cAAc,CAAC,IAAI,CAAC,CAAC;;;;;oBAGvB,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,OAAK,CAAC,CAAC;;;;;SAE3D,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAEvE,OAAO;QACL,WAAW,aAAA;QACX,SAAS,WAAA;QACT,YAAY,cAAA;KACb,CAAC;AACJ,CAAC;AAED,eAAe,gBAAgB,CAAC"}
|