@dxos/react-client 2.19.12-dev.aaf6c6df → 2.19.12-dev.c38ceb6d
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/.rush/temp/package-deps_build:test.json +2 -2
- package/dist/src/hooks/invitations/index.d.ts +1 -1
- package/dist/src/hooks/invitations/index.d.ts.map +1 -1
- package/dist/src/hooks/invitations/index.js +1 -1
- package/dist/src/hooks/invitations/index.js.map +1 -1
- package/dist/src/hooks/invitations/usePartyInvitations.d.ts +4 -0
- package/dist/src/hooks/invitations/usePartyInvitations.d.ts.map +1 -0
- package/dist/src/hooks/invitations/usePartyInvitations.js +24 -0
- package/dist/src/hooks/invitations/usePartyInvitations.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -11
- package/react-client.build.log +0 -34
- package/src/hooks/invitations/index.ts +1 -1
- package/src/hooks/invitations/usePartyInvitations.ts +27 -0
- package/src/hooks/invitations/useSecretGenerator.ts +0 -19
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"packages/sdk/react-client/src/hooks/echo-selections/search.ts": "d78a5b3b688dc5535e5fff2953bf911bf22dd2e8",
|
|
27
27
|
"packages/sdk/react-client/src/hooks/echo-selections/useSelection.ts": "386aea0d2f27eb4fed65eb4b63b92492567c95e5",
|
|
28
28
|
"packages/sdk/react-client/src/hooks/index.ts": "45dcdd5e8712652c72c57ca7e66c4a0369cad45b",
|
|
29
|
-
"packages/sdk/react-client/src/hooks/invitations/index.ts": "
|
|
30
|
-
"packages/sdk/react-client/src/hooks/invitations/
|
|
29
|
+
"packages/sdk/react-client/src/hooks/invitations/index.ts": "94ee77ee123d3b0b7e41b2c2fdab2a2f00af1c35",
|
|
30
|
+
"packages/sdk/react-client/src/hooks/invitations/usePartyInvitations.ts": "f007cc34617a37614d95f9f224b5e6b45a87e5f3",
|
|
31
31
|
"packages/sdk/react-client/src/hooks/invitations/useSecretProvider.ts": "ac932b9964b1cb21011aefa89c09849897c25fca",
|
|
32
32
|
"packages/sdk/react-client/src/hooks/util/index.ts": "f0419f072260d9cc907aba489590791d2ccf0f5b",
|
|
33
33
|
"packages/sdk/react-client/src/hooks/util/useResultSet.ts": "11b1d68c81930e82f5d39b00b4e6381e3249371e",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/invitations/index.ts"],"names":[],"mappings":"AAIA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/invitations/index.ts"],"names":[],"mappings":"AAIA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
|
@@ -13,6 +13,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
13
13
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
__exportStar(require("./
|
|
16
|
+
__exportStar(require("./usePartyInvitations"), exports);
|
|
17
17
|
__exportStar(require("./useSecretProvider"), exports);
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/invitations/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;AAEF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/invitations/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;AAEF,wDAAsC;AACtC,sDAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePartyInvitations.d.ts","sourceRoot":"","sources":["../../../../src/hooks/invitations/usePartyInvitations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,eAAO,MAAM,mBAAmB,2DAe/B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2022 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.usePartyInvitations = void 0;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const echo_queries_1 = require("../echo-queries");
|
|
9
|
+
const usePartyInvitations = (partyKey) => {
|
|
10
|
+
var _a;
|
|
11
|
+
const party = (0, echo_queries_1.useParty)(partyKey);
|
|
12
|
+
const [invitations, setInvitations] = (0, react_1.useState)((_a = party === null || party === void 0 ? void 0 : party.activeInvitations) !== null && _a !== void 0 ? _a : []);
|
|
13
|
+
(0, react_1.useEffect)(() => {
|
|
14
|
+
return party === null || party === void 0 ? void 0 : party.invitationsUpdate.on(() => {
|
|
15
|
+
setInvitations([...party.activeInvitations]);
|
|
16
|
+
});
|
|
17
|
+
}, [party]);
|
|
18
|
+
(0, react_1.useEffect)(() => {
|
|
19
|
+
setInvitations([]);
|
|
20
|
+
}, [party === null || party === void 0 ? void 0 : party.key.toHex()]);
|
|
21
|
+
return invitations;
|
|
22
|
+
};
|
|
23
|
+
exports.usePartyInvitations = usePartyInvitations;
|
|
24
|
+
//# sourceMappingURL=usePartyInvitations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePartyInvitations.js","sourceRoot":"","sources":["../../../../src/hooks/invitations/usePartyInvitations.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,iCAA4C;AAK5C,kDAA2C;AAEpC,MAAM,mBAAmB,GAAG,CAAC,QAAoB,EAAE,EAAE;;IAC1D,MAAM,KAAK,GAAG,IAAA,uBAAQ,EAAC,QAAQ,CAAC,CAAC;IACjC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAsB,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,iBAAiB,mCAAI,EAAE,CAAC,CAAC;IAEpG,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,OAAO,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE;YACtC,cAAc,CAAC,CAAC,GAAG,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,cAAc,CAAC,EAAE,CAAC,CAAC;IACrB,CAAC,EAAE,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAEzB,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAfW,QAAA,mBAAmB,uBAe9B"}
|