@dxos/react-ui 0.1.39 → 0.1.41-next.adfd7c6
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/lib/browser/index.mjs +35 -19
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +21 -2
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts.map +1 -1
- package/dist/types/src/panels/DevicesPanel/DevicesPanel.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/joinMachine.d.ts.map +1 -1
- package/dist/types/src/playwright/invitations-manager.d.ts +4 -3
- package/dist/types/src/playwright/invitations-manager.d.ts.map +1 -1
- package/dist/types/src/stories/Invitations.stories.d.ts.map +1 -1
- package/dist/types/src/testing/shell-manager.d.ts +2 -1
- package/dist/types/src/testing/shell-manager.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/components/IdentityList/IdentityListItem.tsx +4 -1
- package/src/components/InvitationList/InvitationListContainer.tsx +1 -2
- package/src/panels/DevicesPanel/DevicesPanel.tsx +1 -3
- package/src/panels/JoinPanel/joinMachine.ts +34 -18
- package/src/panels/SpacePanel/SpacePanel.tsx +1 -1
- package/src/playwright/invitations-manager.ts +24 -18
- package/src/playwright/invitations.spec.ts +58 -45
- package/src/stories/Invitations.stories.tsx +25 -3
- package/src/testing/shell-manager.ts +20 -2
|
@@ -96,7 +96,8 @@ var IdentityListItem = ({ identity, presence, onClick }) => {
|
|
|
96
96
|
...presence === SpaceMember.PresenceState.OFFLINE && {
|
|
97
97
|
status: "inactive",
|
|
98
98
|
description: /* @__PURE__ */ React3.createElement("p", {
|
|
99
|
-
className: "font-system-normal text-xs text-neutral-700 dark:text-neutral-300"
|
|
99
|
+
className: "font-system-normal text-xs text-neutral-700 dark:text-neutral-300",
|
|
100
|
+
"data-testid": "identity-list-item.description"
|
|
100
101
|
}, t("identity offline description"))
|
|
101
102
|
},
|
|
102
103
|
...presence === SpaceMember.PresenceState.ONLINE && {
|
|
@@ -498,8 +499,7 @@ var InvitationListContainer = ({ spaceKey, createInvitationUrl }) => {
|
|
|
498
499
|
const space = useSpace(spaceKey);
|
|
499
500
|
const invitations = useSpaceInvitations(spaceKey);
|
|
500
501
|
const onClickRemove = useCallback3((invitation) => {
|
|
501
|
-
|
|
502
|
-
invitationId && (space == null ? void 0 : space.removeInvitation(invitationId));
|
|
502
|
+
void invitation.cancel();
|
|
503
503
|
}, [
|
|
504
504
|
space
|
|
505
505
|
]);
|
|
@@ -826,7 +826,7 @@ var DeviceListView = ({ createInvitationUrl, titleId, onDone, doneActionParent }
|
|
|
826
826
|
className: mx13(defaultSurface, "rounded-be-md p-2")
|
|
827
827
|
}, /* @__PURE__ */ React18.createElement(InvitationList, {
|
|
828
828
|
invitations,
|
|
829
|
-
onClickRemove: (invitation) => invitation.
|
|
829
|
+
onClickRemove: (invitation) => invitation.cancel(),
|
|
830
830
|
createInvitationUrl
|
|
831
831
|
}), /* @__PURE__ */ React18.createElement(Button3, {
|
|
832
832
|
className: "is-full flex gap-2 mbs-2",
|
|
@@ -1311,18 +1311,34 @@ var joinMachine = createMachine({
|
|
|
1311
1311
|
identity: () => null
|
|
1312
1312
|
}),
|
|
1313
1313
|
resetInvitation: assign({
|
|
1314
|
-
halo: (context, event) =>
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1314
|
+
halo: (context, event) => {
|
|
1315
|
+
if (event.type !== "resetHaloInvitation") {
|
|
1316
|
+
return context.halo;
|
|
1317
|
+
}
|
|
1318
|
+
if (context.halo.invitationObservable) {
|
|
1319
|
+
void context.halo.invitationObservable.cancel();
|
|
1320
|
+
}
|
|
1321
|
+
return {
|
|
1322
|
+
...context.halo,
|
|
1323
|
+
invitation: void 0,
|
|
1324
|
+
invitationObservable: void 0,
|
|
1325
|
+
invitationSubscribable: void 0
|
|
1326
|
+
};
|
|
1327
|
+
},
|
|
1328
|
+
space: (context, event) => {
|
|
1329
|
+
if (event.type !== "resetSpaceInvitation") {
|
|
1330
|
+
return context.space;
|
|
1331
|
+
}
|
|
1332
|
+
if (context.space.invitationObservable) {
|
|
1333
|
+
void context.space.invitationObservable.cancel();
|
|
1334
|
+
}
|
|
1335
|
+
return {
|
|
1336
|
+
...context.space,
|
|
1337
|
+
invitation: void 0,
|
|
1338
|
+
invitationObservable: void 0,
|
|
1339
|
+
invitationSubscribable: void 0
|
|
1340
|
+
};
|
|
1341
|
+
}
|
|
1326
1342
|
}),
|
|
1327
1343
|
setInvitation: assign({
|
|
1328
1344
|
halo: (context, event) => event.type.includes("Halo") ? {
|
|
@@ -1341,7 +1357,7 @@ var joinMachine = createMachine({
|
|
|
1341
1357
|
spaceInvitation: context.space.invitation
|
|
1342
1358
|
}, {
|
|
1343
1359
|
file: "joinMachine.ts",
|
|
1344
|
-
line:
|
|
1360
|
+
line: 365,
|
|
1345
1361
|
scope: void 0,
|
|
1346
1362
|
callSite: (f, a) => f(...a)
|
|
1347
1363
|
});
|
|
@@ -1356,7 +1372,7 @@ var defaultCodeFromUrl = (invitationType, text) => {
|
|
|
1356
1372
|
} catch (err) {
|
|
1357
1373
|
log.catch(err, {}, {
|
|
1358
1374
|
file: "joinMachine.ts",
|
|
1359
|
-
line:
|
|
1375
|
+
line: 391,
|
|
1360
1376
|
scope: void 0,
|
|
1361
1377
|
callSite: (f, a) => f(...a)
|
|
1362
1378
|
});
|
|
@@ -2389,7 +2405,7 @@ var CurrentSpaceView = observer(({ space, createInvitationUrl, titleId }) => {
|
|
|
2389
2405
|
className: mx22(defaultSurface, "rounded-be-md p-2")
|
|
2390
2406
|
}, /* @__PURE__ */ React30.createElement(InvitationList, {
|
|
2391
2407
|
invitations,
|
|
2392
|
-
onClickRemove: (invitation) => invitation.
|
|
2408
|
+
onClickRemove: (invitation) => invitation.cancel(),
|
|
2393
2409
|
createInvitationUrl
|
|
2394
2410
|
}), /* @__PURE__ */ React30.createElement(Button12, {
|
|
2395
2411
|
className: "is-full flex gap-2 mbs-2",
|