@capxul/sdk-react 4.2.0-rc.10 → 4.2.0-rc.11
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/capxul-source.json +3 -3
- package/dist/index.mjs +22 -0
- package/package.json +4 -4
package/dist/capxul-source.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"source": {
|
|
3
|
-
"commit": "
|
|
4
|
-
"tree": "
|
|
3
|
+
"commit": "12a590f10914e8b056ce54732e6f484f36e060f3",
|
|
4
|
+
"tree": "90adc6656be3c1fb0a6e18170877d46081fa2538",
|
|
5
5
|
"branch": "codex/programme-rc",
|
|
6
6
|
"repository": "https://github.com/Xelmar-tech/infrastructure",
|
|
7
7
|
"lockfileSha256": "5870f53b72706d103220c1bcf733cb4fb71196aea32a9cfbdc277d73cc959264"
|
|
8
8
|
},
|
|
9
9
|
"name": "@capxul/sdk-react",
|
|
10
|
-
"version": "4.2.0-rc.
|
|
10
|
+
"version": "4.2.0-rc.11"
|
|
11
11
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1598,6 +1598,28 @@ function useActivity(input) {
|
|
|
1598
1598
|
getNextPageParam: (last) => last.cursor ?? void 0,
|
|
1599
1599
|
enabled
|
|
1600
1600
|
});
|
|
1601
|
+
const queryClient = useQueryClient();
|
|
1602
|
+
useEffect(() => {
|
|
1603
|
+
if (!enabled || client === null) return;
|
|
1604
|
+
let stop;
|
|
1605
|
+
let cancelled = false;
|
|
1606
|
+
client.activity.subscribe(() => {
|
|
1607
|
+
queryClient.invalidateQueries({ queryKey: capxulKeys.activity });
|
|
1608
|
+
}, actor === void 0 ? void 0 : { actor }).then((result) => {
|
|
1609
|
+
if (!result.ok) return;
|
|
1610
|
+
if (cancelled) result.value();
|
|
1611
|
+
else stop = result.value;
|
|
1612
|
+
});
|
|
1613
|
+
return () => {
|
|
1614
|
+
cancelled = true;
|
|
1615
|
+
stop?.();
|
|
1616
|
+
};
|
|
1617
|
+
}, [
|
|
1618
|
+
actor,
|
|
1619
|
+
client,
|
|
1620
|
+
enabled,
|
|
1621
|
+
queryClient
|
|
1622
|
+
]);
|
|
1601
1623
|
const pages = query.data?.pages;
|
|
1602
1624
|
const rows = useMemo(() => {
|
|
1603
1625
|
return (pages?.flatMap((page) => page.items) ?? []).map((item) => toActivityRow(item, actor)).filter((row) => matchesSearch(row, searchText));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capxul/sdk-react",
|
|
3
|
-
"version": "4.2.0-rc.
|
|
3
|
+
"version": "4.2.0-rc.11",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/Xelmar-tech/infrastructure.git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@capxul/sdk": "4.2.0-rc.
|
|
29
|
+
"@capxul/sdk": "4.2.0-rc.11"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@tanstack/react-query": "^5.66.9",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.0",
|
|
44
44
|
"vite-plus": "0.3.0",
|
|
45
45
|
"vitest": "4.1.11",
|
|
46
|
+
"@capxul/types": "0.3.0",
|
|
46
47
|
"@capxul/errors": "0.3.0",
|
|
47
|
-
"@capxul/typescript-config": "0.0.0"
|
|
48
|
-
"@capxul/types": "0.3.0"
|
|
48
|
+
"@capxul/typescript-config": "0.0.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@tanstack/react-query": "^5.66.9",
|