@dxos/shell 0.7.5-main.e9bb01b → 0.7.5-staging.2ff1350
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/bundle/{shell.mjs → shell.js} +8743 -8681
- package/dist/bundle/shell.js.map +1 -0
- package/dist/bundle/shell.umd.cjs +1045 -0
- package/dist/bundle/shell.umd.cjs.map +1 -0
- package/dist/bundle/style.css +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react.mjs +36 -30
- package/dist/lib/browser/react.mjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react.cjs +25 -19
- package/dist/lib/node/react.cjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react.mjs +36 -30
- package/dist/lib/node-esm/react.mjs.map +3 -3
- package/dist/types/src/components/AgentConfig.d.ts +1 -2
- package/dist/types/src/components/AgentConfig.d.ts.map +1 -1
- package/dist/types/src/components/AgentConfig.js +17 -43
- package/dist/types/src/components/AgentConfig.js.map +1 -1
- package/dist/types/src/components/AuthCode.d.ts +2 -2
- package/dist/types/src/components/AuthCode.d.ts.map +1 -1
- package/dist/types/src/components/AuthCode.js +5 -39
- package/dist/types/src/components/AuthCode.js.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.d.ts +2 -2
- package/dist/types/src/components/CompoundButton/CompoundButton.d.ts.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.js +2 -13
- package/dist/types/src/components/CompoundButton/CompoundButton.js.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts +7 -8
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js +9 -14
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceList.d.ts +1 -2
- package/dist/types/src/components/DeviceList/DeviceList.d.ts.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceList.js +6 -16
- package/dist/types/src/components/DeviceList/DeviceList.js.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceListItem.js +6 -58
- package/dist/types/src/components/DeviceList/DeviceListItem.js.map +1 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.js +5 -41
- package/dist/types/src/components/IdentityList/IdentityListItem.js.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts +2 -3
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.js +8 -41
- package/dist/types/src/components/IdentityList/SpaceMemberList.js.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts +2 -3
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js +4 -7
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.d.ts +2 -2
- package/dist/types/src/components/InvitationList/InvitationList.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.js +5 -11
- package/dist/types/src/components/InvitationList/InvitationList.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts +2 -3
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.stories.js +4 -7
- package/dist/types/src/components/InvitationList/InvitationList.stories.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts +1 -2
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListContainer.js +3 -35
- package/dist/types/src/components/InvitationList/InvitationListContainer.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts +3 -3
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListItem.js +5 -67
- package/dist/types/src/components/InvitationList/InvitationListItem.js.map +1 -1
- package/dist/types/src/components/Panel/Action.js +8 -58
- package/dist/types/src/components/Panel/Action.js.map +1 -1
- package/dist/types/src/components/Panel/Actions.js +5 -37
- package/dist/types/src/components/Panel/Actions.js.map +1 -1
- package/dist/types/src/components/Panel/CloseButton.d.ts +1 -2
- package/dist/types/src/components/Panel/CloseButton.d.ts.map +1 -1
- package/dist/types/src/components/Panel/CloseButton.js +4 -9
- package/dist/types/src/components/Panel/CloseButton.js.map +1 -1
- package/dist/types/src/components/Panel/Emoji.d.ts +3 -3
- package/dist/types/src/components/Panel/Emoji.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Emoji.js +3 -11
- package/dist/types/src/components/Panel/Emoji.js.map +1 -1
- package/dist/types/src/components/Panel/Heading.js +5 -41
- package/dist/types/src/components/Panel/Heading.js.map +1 -1
- package/dist/types/src/components/Panel/Input.d.ts +2 -2
- package/dist/types/src/components/Panel/Input.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Input.js +2 -11
- package/dist/types/src/components/Panel/Input.js.map +1 -1
- package/dist/types/src/components/Panel/Label.d.ts +2 -2
- package/dist/types/src/components/Panel/Label.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Label.js +2 -8
- package/dist/types/src/components/Panel/Label.js.map +1 -1
- package/dist/types/src/components/Panel/Panel.stories.d.ts +3 -4
- package/dist/types/src/components/Panel/Panel.stories.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Panel.stories.js +5 -20
- package/dist/types/src/components/Panel/Panel.stories.js.map +1 -1
- package/dist/types/src/components/Panel/StepHeading.js +5 -37
- package/dist/types/src/components/Panel/StepHeading.js.map +1 -1
- package/dist/types/src/components/SpaceListItem.js +5 -41
- package/dist/types/src/components/SpaceListItem.js.map +1 -1
- package/dist/types/src/components/StorybookDialog.d.ts +2 -2
- package/dist/types/src/components/StorybookDialog.d.ts.map +1 -1
- package/dist/types/src/components/StorybookDialog.js +2 -11
- package/dist/types/src/components/StorybookDialog.js.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.d.ts +2 -2
- package/dist/types/src/components/Viewport/Viewport.js +7 -40
- package/dist/types/src/components/Viewport/Viewport.js.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts +1 -2
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.stories.js +5 -27
- package/dist/types/src/components/Viewport/Viewport.stories.js.map +1 -1
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts +1 -2
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts.map +1 -1
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js +3 -14
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js.map +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts +1 -2
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.js +4 -14
- package/dist/types/src/composites/JoinDialog/JoinDialog.js.map +1 -1
- package/dist/types/src/composites/Shell/Shell.d.ts +1 -2
- package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
- package/dist/types/src/composites/Shell/Shell.js +9 -41
- package/dist/types/src/composites/Shell/Shell.js.map +1 -1
- package/dist/types/src/composites/Shell/ShellContext.d.ts +2 -2
- package/dist/types/src/composites/Shell/ShellContext.d.ts.map +1 -1
- package/dist/types/src/composites/Shell/ShellContext.js +5 -40
- package/dist/types/src/composites/Shell/ShellContext.js.map +1 -1
- package/dist/types/src/composites/Shell/run-shell.js +7 -52
- package/dist/types/src/composites/Shell/run-shell.js.map +1 -1
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts +1 -2
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts.map +1 -1
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js +3 -14
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js.map +1 -1
- package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts +1 -2
- package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts.map +1 -1
- package/dist/types/src/composites/StatusDialog/StatusDialog.js +2 -12
- package/dist/types/src/composites/StatusDialog/StatusDialog.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts +2 -3
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +18 -94
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts +10 -11
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js +8 -10
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +2 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts +2 -3
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +3 -11
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts +1 -2
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js +13 -55
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinHeading.js +6 -40
- package/dist/types/src/panels/JoinPanel/JoinHeading.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts +2 -3
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.js +6 -63
- package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +14 -15
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js +17 -21
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts +1 -2
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js +5 -13
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts +1 -2
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.js +6 -46
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts +2 -3
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.js +7 -43
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.d.ts +2 -2
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.js +6 -41
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts +1 -2
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js +16 -63
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts +1 -2
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js +12 -49
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts +1 -2
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js +8 -27
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js.map +1 -1
- package/dist/types/src/panels/Panels.stories.d.ts +3 -3
- package/dist/types/src/panels/Panels.stories.d.ts.map +1 -1
- package/dist/types/src/panels/Panels.stories.js +6 -14
- package/dist/types/src/panels/Panels.stories.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts +2 -3
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.js +8 -50
- package/dist/types/src/panels/SpacePanel/SpacePanel.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts +17 -18
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js +37 -43
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts +3 -3
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js +6 -49
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js.map +1 -1
- package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts +1 -2
- package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts.map +1 -1
- package/dist/types/src/panels/StatusPanel/StatusPanel.js +2 -10
- package/dist/types/src/panels/StatusPanel/StatusPanel.js.map +1 -1
- package/dist/types/src/steps/ConfirmReset.d.ts +2 -3
- package/dist/types/src/steps/ConfirmReset.d.ts.map +1 -1
- package/dist/types/src/steps/ConfirmReset.js +12 -54
- package/dist/types/src/steps/ConfirmReset.js.map +1 -1
- package/dist/types/src/steps/InvitationManager.d.ts +1 -2
- package/dist/types/src/steps/InvitationManager.d.ts.map +1 -1
- package/dist/types/src/steps/InvitationManager.js +6 -56
- package/dist/types/src/steps/InvitationManager.js.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts +1 -2
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.js +15 -75
- package/dist/types/src/stories/Invitations.e2e-stories.js.map +1 -1
- package/dist/types/src/testing/fixtures/identities.d.ts.map +1 -1
- package/dist/types/src/testing/fixtures/identities.js +2 -0
- package/dist/types/src/testing/fixtures/identities.js.map +1 -1
- package/dist/types/src/translations/locales/en-US.d.ts +4 -1
- package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
- package/dist/types/src/translations/locales/en-US.js +5 -1
- package/dist/types/src/translations/locales/en-US.js.map +1 -1
- package/package.json +28 -27
- package/src/panels/IdentityPanel/IdentityPanel.stories.tsx +3 -0
- package/src/panels/IdentityPanel/IdentityPanel.tsx +31 -29
- package/src/panels/IdentityPanel/IdentityPanelProps.ts +8 -1
- package/src/panels/IdentityPanel/steps/ProfileForm.tsx +2 -7
- package/src/panels/JoinPanel/steps/IdentityInput.tsx +1 -1
- package/src/panels/SpacePanel/SpacePanel.stories.tsx +6 -1
- package/src/testing/fixtures/identities.ts +2 -0
- package/src/translations/locales/en-US.ts +7 -1
- package/dist/bundle/shell.mjs.map +0 -1
- package/dist/bundle/shell.umd.js +0 -1045
- package/dist/bundle/shell.umd.js.map +0 -1
- package/dist/types/src/playwright/playwright.config.d.ts +0 -3
- package/dist/types/src/playwright/playwright.config.d.ts.map +0 -1
- package/dist/types/src/playwright/playwright.config.js +0 -18
- package/dist/types/src/playwright/playwright.config.js.map +0 -1
- /package/src/playwright/{playwright.config.ts → playwright.config.cts} +0 -0
|
@@ -1,43 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IdentityListItem = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
2
5
|
//
|
|
3
6
|
// Copyright 2023 DXOS.org
|
|
4
7
|
//
|
|
5
|
-
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.IdentityListItem = void 0;
|
|
40
|
-
const react_1 = __importStar(require("react"));
|
|
8
|
+
const react_1 = require("react");
|
|
41
9
|
const display_name_1 = require("@dxos/display-name");
|
|
42
10
|
const echo_1 = require("@dxos/react-client/echo");
|
|
43
11
|
const react_ui_1 = require("@dxos/react-ui");
|
|
@@ -48,10 +16,6 @@ exports.IdentityListItem = (0, react_1.forwardRef)(({ identity, presence, onClic
|
|
|
48
16
|
const fallbackValue = (0, util_1.keyToFallback)(identity.identityKey);
|
|
49
17
|
const labelId = (0, react_ui_1.useId)('identityListItem__label');
|
|
50
18
|
const displayName = (_b = (_a = identity.profile) === null || _a === void 0 ? void 0 : _a.displayName) !== null && _b !== void 0 ? _b : (0, display_name_1.generateName)(identity.identityKey.toHex());
|
|
51
|
-
return (
|
|
52
|
-
react_1.default.createElement(react_ui_1.Avatar.Root, { status: presence === echo_1.SpaceMember.PresenceState.ONLINE ? 'active' : 'inactive', labelId: labelId, hue: ((_d = (_c = identity.profile) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.hue) || fallbackValue.hue },
|
|
53
|
-
react_1.default.createElement(react_ui_1.Avatar.Frame, { classNames: 'place-self-center' },
|
|
54
|
-
react_1.default.createElement(react_ui_1.Avatar.Fallback, { text: ((_f = (_e = identity.profile) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.emoji) || fallbackValue.emoji })),
|
|
55
|
-
react_1.default.createElement(react_ui_1.Avatar.Label, { classNames: 'text-sm truncate pli-2' }, displayName))));
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(react_ui_1.ListItem.Root, { ...props, classNames: (0, react_ui_theme_1.mx)('flex gap-2 pis-3 pie-1 items-center', onClick && 'cursor-pointer', classNames), onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(), "data-testid": 'identity-list-item', labelId: labelId, ref: forwardedRef, children: (0, jsx_runtime_1.jsxs)(react_ui_1.Avatar.Root, { status: presence === echo_1.SpaceMember.PresenceState.ONLINE ? 'active' : 'inactive', labelId: labelId, hue: ((_d = (_c = identity.profile) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.hue) || fallbackValue.hue, children: [(0, jsx_runtime_1.jsx)(react_ui_1.Avatar.Frame, { classNames: 'place-self-center', children: (0, jsx_runtime_1.jsx)(react_ui_1.Avatar.Fallback, { text: ((_f = (_e = identity.profile) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.emoji) || fallbackValue.emoji }) }), (0, jsx_runtime_1.jsx)(react_ui_1.Avatar.Label, { classNames: 'text-sm truncate pli-2', children: displayName })] }) }));
|
|
56
20
|
});
|
|
57
21
|
//# sourceMappingURL=IdentityListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityListItem.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/IdentityListItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdentityListItem.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/IdentityListItem.tsx"],"names":[],"mappings":";;;;AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,iCAAyE;AAEzE,qDAAkD;AAClD,kDAAsD;AAEtD,6CAA+E;AAC/E,yDAA0C;AAC1C,qCAA2C;AAQ9B,QAAA,gBAAgB,GAAG,IAAA,kBAAU,EAGxC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE;;IACxE,MAAM,aAAa,GAAG,IAAA,oBAAa,EAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC1D,MAAM,OAAO,GAAG,IAAA,gBAAK,EAAC,yBAAyB,CAAC,CAAC;IACjD,MAAM,WAAW,GAAG,MAAA,MAAA,QAAQ,CAAC,OAAO,0CAAE,WAAW,mCAAI,IAAA,2BAAY,EAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC;IAChG,OAAO,CACL,uBAAC,mBAAQ,CAAC,IAAI,OACR,KAAK,EACT,UAAU,EAAE,IAAA,mBAAE,EAAC,qCAAqC,EAAE,OAAO,IAAI,gBAAgB,EAAE,UAAU,CAAC,EAC9F,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,EAAI,iBACd,oBAAoB,EAChC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,YAAY,YAEjB,wBAAC,iBAAM,CAAC,IAAI,IACV,MAAM,EAAE,QAAQ,KAAK,kBAAW,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,EAC7E,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,CAAA,MAAA,MAAA,QAAQ,CAAC,OAAO,0CAAE,IAAI,0CAAE,GAAG,KAAI,aAAa,CAAC,GAAG,aAErD,uBAAC,iBAAM,CAAC,KAAK,IAAC,UAAU,EAAC,mBAAmB,YAC1C,uBAAC,iBAAM,CAAC,QAAQ,IAAC,IAAI,EAAE,CAAA,MAAA,MAAA,QAAQ,CAAC,OAAO,0CAAE,IAAI,0CAAE,KAAK,KAAI,aAAa,CAAC,KAAK,GAAI,GAClE,EACf,uBAAC,iBAAM,CAAC,KAAK,IAAC,UAAU,EAAC,wBAAwB,YAAE,WAAW,GAAgB,IAClE,GACA,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type PublicKey } from '@dxos/react-client';
|
|
3
2
|
import type { SpaceMember } from '@dxos/react-client/echo';
|
|
4
3
|
export interface SpaceMemberListImplProps {
|
|
@@ -9,6 +8,6 @@ export interface SpaceMemberListProps extends Partial<SpaceMemberListImplProps>
|
|
|
9
8
|
spaceKey: PublicKey;
|
|
10
9
|
includeSelf?: boolean;
|
|
11
10
|
}
|
|
12
|
-
export declare const SpaceMemberList: ({ spaceKey, includeSelf, onSelect }: SpaceMemberListProps) =>
|
|
13
|
-
export declare const SpaceMemberListImpl: ({ members, onSelect }: SpaceMemberListImplProps) =>
|
|
11
|
+
export declare const SpaceMemberList: ({ spaceKey, includeSelf, onSelect }: SpaceMemberListProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const SpaceMemberListImpl: ({ members, onSelect }: SpaceMemberListImplProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
//# sourceMappingURL=SpaceMemberList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpaceMemberList.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SpaceMemberList.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAS3D,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,wBAAwB,CAAC;IAC7E,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,eAAe,wCAAyC,oBAAoB,4CAexF,CAAC;AAEF,eAAO,MAAM,mBAAmB,0BAA2B,wBAAwB,4CAqBlF,CAAC"}
|
|
@@ -1,43 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpaceMemberListImpl = exports.SpaceMemberList = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
2
5
|
//
|
|
3
6
|
// Copyright 2023 DXOS.org
|
|
4
7
|
//
|
|
5
|
-
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.SpaceMemberListImpl = exports.SpaceMemberList = void 0;
|
|
40
|
-
const react_1 = __importStar(require("react"));
|
|
8
|
+
const react_1 = require("react");
|
|
41
9
|
const react_client_1 = require("@dxos/react-client");
|
|
42
10
|
const echo_1 = require("@dxos/react-client/echo");
|
|
43
11
|
const react_ui_1 = require("@dxos/react-ui");
|
|
@@ -49,16 +17,15 @@ const SpaceMemberList = ({ spaceKey, includeSelf, onSelect }) => {
|
|
|
49
17
|
const members = (0, react_1.useMemo)(() => includeSelf
|
|
50
18
|
? allUnsortedMembers.sort((member) => member.identity.identityKey.equals(client.halo.identity.get().identityKey) ? -1 : 1)
|
|
51
19
|
: allUnsortedMembers.filter((member) => !member.identity.identityKey.equals(client.halo.identity.get().identityKey)), [allUnsortedMembers]);
|
|
52
|
-
return
|
|
20
|
+
return (0, jsx_runtime_1.jsx)(exports.SpaceMemberListImpl, { members: members, onSelect: onSelect });
|
|
53
21
|
};
|
|
54
22
|
exports.SpaceMemberList = SpaceMemberList;
|
|
55
23
|
const SpaceMemberListImpl = ({ members, onSelect }) => {
|
|
56
24
|
const { t } = (0, react_ui_1.useTranslation)('os');
|
|
57
25
|
const visibleMembers = members.filter((member) => member.identity);
|
|
58
|
-
return visibleMembers.length > 0 ? (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
react_1.default.createElement("p", { className: (0, react_ui_theme_1.mx)(react_ui_theme_1.descriptionText, 'text-center is-full mlb-2') }, t('empty space members message'))));
|
|
26
|
+
return visibleMembers.length > 0 ? ((0, jsx_runtime_1.jsx)(react_ui_1.List, { classNames: 'flex flex-col gap-2', "data-testid": 'space-members-list', children: visibleMembers.map((member) => {
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(IdentityListItem_1.IdentityListItem, { identity: member.identity, presence: member.presence, onClick: onSelect && (() => onSelect(member)) }, member.identity.identityKey.toHex()));
|
|
28
|
+
}) })) : ((0, jsx_runtime_1.jsx)("div", { role: 'none', className: 'grow flex items-center p-2', children: (0, jsx_runtime_1.jsx)("p", { className: (0, react_ui_theme_1.mx)(react_ui_theme_1.descriptionText, 'text-center is-full mlb-2'), children: t('empty space members message') }) }));
|
|
62
29
|
};
|
|
63
30
|
exports.SpaceMemberListImpl = SpaceMemberListImpl;
|
|
64
31
|
//# sourceMappingURL=SpaceMemberList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpaceMemberList.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SpaceMemberList.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.tsx"],"names":[],"mappings":";;;;AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,iCAAuC;AAEvC,qDAA+D;AAE/D,kDAAqD;AACrD,6CAAsD;AACtD,yDAA2D;AAE3D,yDAAsD;AAc/C,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAwB,EAAE,EAAE;IAC3F,MAAM,MAAM,GAAG,IAAA,wBAAS,GAAE,CAAC;IAC3B,MAAM,kBAAkB,GAAG,IAAA,iBAAU,EAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,IAAA,eAAO,EACrB,GAAG,EAAE,CACH,WAAW;QACT,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CACjC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACrF;QACH,CAAC,CAAC,kBAAkB,CAAC,MAAM,CACvB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAG,CAAC,WAAW,CAAC,CACzF,EACP,CAAC,kBAAkB,CAAC,CACrB,CAAC;IACF,OAAO,uBAAC,2BAAmB,IAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC;AACvE,CAAC,CAAC;AAfW,QAAA,eAAe,mBAe1B;AAEK,MAAM,mBAAmB,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAA4B,EAAE,EAAE;IACrF,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,yBAAc,EAAC,IAAI,CAAC,CAAC;IACnC,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACnE,OAAO,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACjC,uBAAC,eAAI,IAAC,UAAU,EAAC,qBAAqB,iBAAa,oBAAoB,YACpE,cAAc,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YAC7B,OAAO,CACL,uBAAC,mCAAgB,IAEf,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,OAAO,EAAE,QAAQ,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAHxC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,CAIxC,CACH,CAAC;QACJ,CAAC,CAAC,GACG,CACR,CAAC,CAAC,CAAC,CACF,gCAAK,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,4BAA4B,YACrD,8BAAG,SAAS,EAAE,IAAA,mBAAE,EAAC,gCAAe,EAAE,2BAA2B,CAAC,YAAG,CAAC,CAAC,6BAA6B,CAAC,GAAK,GAClG,CACP,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,mBAAmB,uBAqB9B"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
5
|
-
component: ({ members, onSelect }: import("./SpaceMemberList").SpaceMemberListImplProps) =>
|
|
4
|
+
component: ({ members, onSelect }: import("./SpaceMemberList").SpaceMemberListImplProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
decorators: import("@storybook/react/*").Decorator[];
|
|
7
6
|
parameters: {
|
|
8
7
|
chromatic: {
|
|
@@ -11,5 +10,5 @@ declare const _default: {
|
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
export default _default;
|
|
14
|
-
export declare const Default: (props: any) =>
|
|
13
|
+
export declare const Default: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
//# sourceMappingURL=SpaceMemberList.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpaceMemberList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"SpaceMemberList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;;;;;;;;;;;AASrB,wBAKE;AAEF,eAAO,MAAM,OAAO,UAAW,GAAG,4CAEjC,CAAC"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
2
5
|
//
|
|
3
6
|
// Copyright 2023 DXOS.org
|
|
4
7
|
//
|
|
5
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.Default = void 0;
|
|
10
8
|
require("@dxos-theme");
|
|
11
|
-
const react_1 = __importDefault(require("react"));
|
|
12
9
|
const storybook_utils_1 = require("@dxos/storybook-utils");
|
|
13
10
|
const SpaceMemberList_1 = require("./SpaceMemberList");
|
|
14
11
|
const fixtures_1 = require("../../testing/fixtures");
|
|
@@ -19,7 +16,7 @@ exports.default = {
|
|
|
19
16
|
parameters: { chromatic: { disableSnapshot: false } },
|
|
20
17
|
};
|
|
21
18
|
const Default = (props) => {
|
|
22
|
-
return
|
|
19
|
+
return (0, jsx_runtime_1.jsx)(SpaceMemberList_1.SpaceMemberListImpl, { ...props, members: [fixtures_1.alice] });
|
|
23
20
|
};
|
|
24
21
|
exports.Default = Default;
|
|
25
22
|
//# sourceMappingURL=SpaceMemberList.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpaceMemberList.stories.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SpaceMemberList.stories.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.stories.tsx"],"names":[],"mappings":";;;;AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,uBAAqB;AAIrB,2DAAkD;AAElD,uDAAwD;AACxD,qDAA+C;AAE/C,kBAAe;IACb,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,qCAAmB;IAC9B,UAAU,EAAE,CAAC,2BAAS,CAAC;IACvB,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE;CACtD,CAAC;AAEK,MAAM,OAAO,GAAG,CAAC,KAAU,EAAE,EAAE;IACpC,OAAO,uBAAC,qCAAmB,OAAK,KAAK,EAAE,OAAO,EAAE,CAAC,gBAAK,CAAC,GAAI,CAAC;AAC9D,CAAC,CAAC;AAFW,QAAA,OAAO,WAElB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentType } from 'react';
|
|
2
2
|
import type { CancellableInvitationObservable } from '@dxos/react-client/invitations';
|
|
3
3
|
import { type InvitationListItemProps } from './InvitationListItem';
|
|
4
4
|
import { type SharedInvitationListProps } from './InvitationListProps';
|
|
@@ -7,5 +7,5 @@ export interface InvitationListProps extends Omit<InvitationListItemProps, 'invi
|
|
|
7
7
|
InvitationListItem?: ComponentType<InvitationListItemProps>;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const InvitationList: ({ invitations, send, ...invitationProps }: InvitationListProps) =>
|
|
10
|
+
export declare const InvitationList: ({ invitations, send, ...invitationProps }: InvitationListProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=InvitationList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationList.d.ts","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationList.tsx"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"InvitationList.d.ts","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationList.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AAItF,OAAO,EAAsB,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAEvE,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,uBAAuB,EAAE,YAAY,GAAG,OAAO,CAAC,EAC3D,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC;IACzC,WAAW,EAAE,+BAA+B,EAAE,CAAC;IAC/C,kBAAkB,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,8CAA+C,mBAAmB,4CAU5F,CAAC"}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.InvitationList = void 0;
|
|
7
|
-
|
|
8
|
-
// Copyright 2023 DXOS.org
|
|
9
|
-
//
|
|
10
|
-
const react_1 = __importDefault(require("react"));
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
5
|
const react_ui_1 = require("@dxos/react-ui");
|
|
12
6
|
const react_ui_theme_1 = require("@dxos/react-ui-theme");
|
|
13
7
|
const InvitationListItem_1 = require("./InvitationListItem");
|
|
14
8
|
const InvitationList = ({ invitations, send, ...invitationProps }) => {
|
|
15
9
|
const { className, InvitationListItem: Item = InvitationListItem_1.InvitationListItem } = invitationProps;
|
|
16
|
-
return (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(react_ui_1.List, { classNames: (0, react_ui_theme_1.mx)('flex flex-col gap-2', className), children: invitations.map((invitation) => {
|
|
11
|
+
const value = invitation.get().invitationId;
|
|
12
|
+
return (0, jsx_runtime_1.jsx)(Item, { send: send, invitation: invitation, ...invitationProps }, value);
|
|
13
|
+
}) }));
|
|
20
14
|
};
|
|
21
15
|
exports.InvitationList = InvitationList;
|
|
22
16
|
//# sourceMappingURL=InvitationList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationList.js","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InvitationList.js","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationList.tsx"],"names":[],"mappings":";;;;AAMA,6CAAsC;AACtC,yDAA0C;AAE1C,6DAAwF;AAWjF,MAAM,cAAc,GAAG,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,eAAe,EAAuB,EAAE,EAAE;IAC/F,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,IAAI,GAAG,uCAAkB,EAAE,GAAG,eAAe,CAAC;IACrF,OAAO,CACL,uBAAC,eAAI,IAAC,UAAU,EAAE,IAAA,mBAAE,EAAC,qBAAqB,EAAE,SAAS,CAAC,YACnD,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;YAC9B,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC;YAC5C,OAAO,uBAAC,IAAI,IAAa,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,KAAM,eAAe,IAA9D,KAAK,CAA6D,CAAC;QACvF,CAAC,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,cAAc,kBAUzB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
5
|
-
component: ({ invitations, send, ...invitationProps }: import("./InvitationList").InvitationListProps) =>
|
|
4
|
+
component: ({ invitations, send, ...invitationProps }: import("./InvitationList").InvitationListProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
decorators: import("@storybook/react/*").Decorator[];
|
|
7
6
|
parameters: {
|
|
8
7
|
chromatic: {
|
|
@@ -11,5 +10,5 @@ declare const _default: {
|
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
export default _default;
|
|
14
|
-
export declare const Default: () =>
|
|
13
|
+
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
//# sourceMappingURL=InvitationList.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"InvitationList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;;;;;;;;;;;AAUrB,wBAKE;AAEF,eAAO,MAAM,OAAO,+CAkBnB,CAAC"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
2
5
|
//
|
|
3
6
|
// Copyright 2023 DXOS.org
|
|
4
7
|
//
|
|
5
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.Default = void 0;
|
|
10
8
|
require("@dxos-theme");
|
|
11
|
-
const react_1 = __importDefault(require("react"));
|
|
12
9
|
const invitations_1 = require("@dxos/react-client/invitations");
|
|
13
10
|
const storybook_utils_1 = require("@dxos/storybook-utils");
|
|
14
11
|
const InvitationList_1 = require("./InvitationList");
|
|
@@ -20,7 +17,7 @@ exports.default = {
|
|
|
20
17
|
parameters: { chromatic: { disableSnapshot: false } },
|
|
21
18
|
};
|
|
22
19
|
const Default = () => {
|
|
23
|
-
return (
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(InvitationList_1.InvitationList, { invitations: [
|
|
24
21
|
(0, fixtures_1.inviteWithState)(invitations_1.Invitation.State.INIT),
|
|
25
22
|
(0, fixtures_1.inviteWithState)(invitations_1.Invitation.State.CONNECTING),
|
|
26
23
|
(0, fixtures_1.inviteWithState)(invitations_1.Invitation.State.CONNECTED),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationList.stories.js","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationList.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InvitationList.stories.js","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationList.stories.tsx"],"names":[],"mappings":";;;;AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,uBAAqB;AAIrB,gEAA4D;AAC5D,2DAA8D;AAE9D,qDAAkD;AAClD,qDAAyD;AAEzD,kBAAe;IACb,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,+BAAc;IACzB,UAAU,EAAE,CAAC,2BAAS,EAAE,IAAA,4BAAU,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE;CACtD,CAAC;AAEK,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,OAAO,CACL,uBAAC,+BAAc,IACb,WAAW,EAAE;YACX,IAAA,0BAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,IAAI,CAAC;YACtC,IAAA,0BAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,UAAU,CAAC;YAC5C,IAAA,0BAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,SAAS,CAAC;YAC3C,IAAA,0BAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,wBAAwB,CAAC;YAC1D,IAAA,0BAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,cAAc,CAAC;YAChD,IAAA,0BAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,OAAO,CAAC;YACzC,IAAA,0BAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,OAAO,CAAC;YACzC,IAAA,0BAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,KAAK,CAAC;YACvC,IAAA,0BAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,SAAS,CAAC;SAC5C,EACD,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC,EACd,mBAAmB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,GACvC,CACH,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,OAAO,WAkBlB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type PublicKey } from '@dxos/react-client';
|
|
3
2
|
import { type SharedInvitationListProps } from './InvitationListProps';
|
|
4
3
|
export interface InvitationListContainerProps extends SharedInvitationListProps {
|
|
5
4
|
spaceKey: PublicKey;
|
|
6
5
|
}
|
|
7
|
-
export declare const InvitationListContainer: ({ spaceKey, createInvitationUrl, send }: InvitationListContainerProps) =>
|
|
6
|
+
export declare const InvitationListContainer: ({ spaceKey, createInvitationUrl, send }: InvitationListContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
//# sourceMappingURL=InvitationListContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationListContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationListContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InvitationListContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationListContainer.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAKpD,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAEvE,MAAM,WAAW,4BAA6B,SAAQ,yBAAyB;IAC7E,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,uBAAuB,4CAA6C,4BAA4B,4CAa5G,CAAC"}
|
|
@@ -1,43 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.InvitationListContainer = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
37
5
|
//
|
|
38
6
|
// Copyright 2023 DXOS.org
|
|
39
7
|
//
|
|
40
|
-
const react_1 =
|
|
8
|
+
const react_1 = require("react");
|
|
41
9
|
const echo_1 = require("@dxos/react-client/echo");
|
|
42
10
|
const InvitationList_1 = require("./InvitationList");
|
|
43
11
|
const InvitationListContainer = ({ spaceKey, createInvitationUrl, send }) => {
|
|
@@ -46,7 +14,7 @@ const InvitationListContainer = ({ spaceKey, createInvitationUrl, send }) => {
|
|
|
46
14
|
const handleClickRemove = (0, react_1.useCallback)((invitation) => {
|
|
47
15
|
void invitation.cancel();
|
|
48
16
|
}, [space]);
|
|
49
|
-
return (
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(InvitationList_1.InvitationList, { invitations: invitations, onClickRemove: handleClickRemove, createInvitationUrl, send }));
|
|
50
18
|
};
|
|
51
19
|
exports.InvitationListContainer = InvitationListContainer;
|
|
52
20
|
//# sourceMappingURL=InvitationListContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationListContainer.js","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationListContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InvitationListContainer.js","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationListContainer.tsx"],"names":[],"mappings":";;;;AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AACF,iCAA2C;AAG3C,kDAAwE;AAGxE,qDAAkD;AAO3C,MAAM,uBAAuB,GAAG,CAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE,IAAI,EAAgC,EAAE,EAAE;IAC/G,MAAM,KAAK,GAAG,IAAA,eAAQ,EAAC,QAAQ,CAAC,CAAC;IACjC,MAAM,WAAW,GAAG,IAAA,0BAAmB,EAAC,QAAQ,CAAC,CAAC;IAClD,MAAM,iBAAiB,GAAG,IAAA,mBAAW,EACnC,CAAC,UAA2C,EAAE,EAAE;QAC9C,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC,EACD,CAAC,KAAK,CAAC,CACR,CAAC;IAEF,OAAO,CACL,uBAAC,+BAAc,IAAC,WAAW,EAAE,WAAW,EAAQ,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,IAAI,GAAM,CAClH,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,uBAAuB,2BAalC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { type CancellableInvitationObservable, type InvitationStatus } from '@dxos/react-client/invitations';
|
|
3
3
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
4
4
|
import { type SharedInvitationListProps } from './InvitationListProps';
|
|
@@ -10,6 +10,6 @@ export type InvitationListItemProps = SharedInvitationListProps & {
|
|
|
10
10
|
export type InvitationListItemImplProps = InvitationListItemProps & {
|
|
11
11
|
invitationStatus: InvitationStatus;
|
|
12
12
|
};
|
|
13
|
-
export declare const InvitationListItem: (props: InvitationListItemProps) =>
|
|
14
|
-
export declare const InvitationListItemImpl: ({ invitation, invitationStatus: propsInvitationStatus, send, onClickRemove, createInvitationUrl, reverseEffects, ...props }: InvitationListItemImplProps) =>
|
|
13
|
+
export declare const InvitationListItem: (props: InvitationListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const InvitationListItemImpl: ({ invitation, invitationStatus: propsInvitationStatus, send, onClickRemove, createInvitationUrl, reverseEffects, ...props }: InvitationListItemImplProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
//# sourceMappingURL=InvitationListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationListItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationListItem.tsx"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"InvitationListItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationListItem.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,KAAK,wBAAwB,EAAe,MAAM,OAAO,CAAC;AAE1E,OAAO,EACL,KAAK,+BAA+B,EAEpC,KAAK,gBAAgB,EAEtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EASL,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAGvE,MAAM,MAAM,uBAAuB,GAAG,yBAAyB,GAAG;IAChE,UAAU,EAAE,+BAA+B,CAAC;IAC5C,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,+BAA+B,KAAK,IAAI,CAAC;IACtE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,eAAe,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC;AAEpD,MAAM,MAAM,2BAA2B,GAAG,uBAAuB,GAAG;IAClE,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAW,uBAAuB,4CAIhE,CAAC;AA4CF,eAAO,MAAM,sBAAsB,gIAQhC,2BAA2B,4CAkI7B,CAAC"}
|
|
@@ -1,45 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.InvitationListItemImpl = exports.InvitationListItem = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
37
5
|
//
|
|
38
6
|
// Copyright 2023 DXOS.org
|
|
39
7
|
//
|
|
40
8
|
const react_1 = require("@phosphor-icons/react");
|
|
41
9
|
const date_fns_1 = require("date-fns");
|
|
42
|
-
const react_2 =
|
|
10
|
+
const react_2 = require("react");
|
|
43
11
|
const invitations_1 = require("@dxos/react-client/invitations");
|
|
44
12
|
const react_ui_1 = require("@dxos/react-ui");
|
|
45
13
|
const react_ui_theme_1 = require("@dxos/react-ui-theme");
|
|
@@ -48,17 +16,13 @@ const AuthCode_1 = require("../AuthCode");
|
|
|
48
16
|
const InvitationListItem = (props) => {
|
|
49
17
|
const { invitation } = props;
|
|
50
18
|
const invitationStatus = (0, invitations_1.useInvitationStatus)(invitation);
|
|
51
|
-
return
|
|
19
|
+
return (0, jsx_runtime_1.jsx)(exports.InvitationListItemImpl, { ...props, invitationStatus: invitationStatus });
|
|
52
20
|
};
|
|
53
21
|
exports.InvitationListItem = InvitationListItem;
|
|
54
22
|
const avatarProps = { size: 10, variant: 'circle' };
|
|
55
23
|
const AvatarStackEffect = ({ animation, status, reverseEffects, }) => {
|
|
56
24
|
const { tx } = (0, react_ui_1.useThemeContext)();
|
|
57
|
-
return (
|
|
58
|
-
react_2.default.createElement("span", { role: 'none', className: (0, react_ui_theme_1.mx)('absolute inline-end-auto opacity-20', reverseEffects ? 'inline-start-3' : 'inline-start-1', (0, react_ui_theme_1.getSize)(avatarProps.size)) },
|
|
59
|
-
react_2.default.createElement("span", { role: 'none', className: tx('avatar.ring', 'avatar__ring', { ...avatarProps, status, animation }), style: { animationDelay: '400ms' } })),
|
|
60
|
-
react_2.default.createElement("span", { role: 'none', className: (0, react_ui_theme_1.mx)('absolute inline-end-auto opacity-50', reverseEffects ? 'inline-start-2' : 'inline-start-2', (0, react_ui_theme_1.getSize)(avatarProps.size)) },
|
|
61
|
-
react_2.default.createElement("span", { role: 'none', className: tx('avatar.ring', 'avatar__ring', { ...avatarProps, status, animation }), style: { animationDelay: '200ms' } }))));
|
|
25
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { role: 'none', className: (0, react_ui_theme_1.mx)('absolute inline-end-auto opacity-20', reverseEffects ? 'inline-start-3' : 'inline-start-1', (0, react_ui_theme_1.getSize)(avatarProps.size)), children: (0, jsx_runtime_1.jsx)("span", { role: 'none', className: tx('avatar.ring', 'avatar__ring', { ...avatarProps, status, animation }), style: { animationDelay: '400ms' } }) }), (0, jsx_runtime_1.jsx)("span", { role: 'none', className: (0, react_ui_theme_1.mx)('absolute inline-end-auto opacity-50', reverseEffects ? 'inline-start-2' : 'inline-start-2', (0, react_ui_theme_1.getSize)(avatarProps.size)), children: (0, jsx_runtime_1.jsx)("span", { role: 'none', className: tx('avatar.ring', 'avatar__ring', { ...avatarProps, status, animation }), style: { animationDelay: '200ms' } }) })] }));
|
|
62
26
|
};
|
|
63
27
|
const InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationStatus, send, onClickRemove, createInvitationUrl, reverseEffects, ...props }) => {
|
|
64
28
|
const { t } = (0, react_ui_1.useTranslation)('os');
|
|
@@ -92,33 +56,7 @@ const InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationS
|
|
|
92
56
|
invitations_1.Invitation.State.SUCCESS,
|
|
93
57
|
].includes(invitationStatus);
|
|
94
58
|
const avatarStatus = avatarError ? 'error' : avatarGreen ? 'active' : 'inactive';
|
|
95
|
-
return (
|
|
96
|
-
react_2.default.createElement(react_ui_1.ListItem.Heading, { classNames: 'sr-only' }, t(multiUse ? 'invite many list item label' : 'invite one list item label')),
|
|
97
|
-
multiUse && (react_2.default.createElement(AvatarStackEffect, { status: avatarStatus, animation: avatarAnimation, reverseEffects: reverseEffects })),
|
|
98
|
-
react_2.default.createElement(react_ui_1.Tooltip.Root, null,
|
|
99
|
-
react_2.default.createElement(react_ui_1.Avatar.Root, { ...avatarProps, animation: avatarAnimation, status: avatarStatus },
|
|
100
|
-
react_2.default.createElement(react_ui_1.Tooltip.Trigger, { asChild: true },
|
|
101
|
-
react_2.default.createElement(react_ui_1.Avatar.Frame, { tabIndex: 0, classNames: [react_ui_theme_1.focusRing, 'relative rounded-full place-self-center'] },
|
|
102
|
-
react_2.default.createElement(react_ui_1.Avatar.Fallback, { text: (0, util_1.hexToEmoji)(invitationId) })))),
|
|
103
|
-
react_2.default.createElement(react_ui_1.Tooltip.Portal, null,
|
|
104
|
-
react_2.default.createElement(react_ui_1.Tooltip.Content, { side: 'left' },
|
|
105
|
-
t(multiUse ? 'invite many qr label' : 'invite one qr label'),
|
|
106
|
-
react_2.default.createElement(react_ui_1.Tooltip.Arrow, null)))),
|
|
107
|
-
showShare && invitationUrl ? (react_2.default.createElement(react_ui_1.Tooltip.Root, null,
|
|
108
|
-
react_2.default.createElement(react_2.default.Fragment, null,
|
|
109
|
-
react_2.default.createElement(react_ui_1.Tooltip.Trigger, { asChild: true },
|
|
110
|
-
react_2.default.createElement(react_ui_1.Button, { variant: 'ghost', classNames: 'grow justify-start font-medium', onClick: () => send({ type: 'selectInvitation', invitation }), "data-testid": 'show-qrcode' },
|
|
111
|
-
react_2.default.createElement("span", null, t('open share panel label')))),
|
|
112
|
-
react_2.default.createElement(react_ui_1.Clipboard.IconButton, { variant: 'ghost', value: invitationUrl })),
|
|
113
|
-
react_2.default.createElement(react_ui_1.Tooltip.Portal, null,
|
|
114
|
-
react_2.default.createElement(react_ui_1.Tooltip.Content, { side: 'left' }, invitationHasLifetime && react_2.default.createElement("span", null,
|
|
115
|
-
"Expires ",
|
|
116
|
-
invitationTimeLeft))))) : showAuthCode ? (react_2.default.createElement(AuthCode_1.AuthCode, { code: authCode, classNames: 'grow' })) : invitationStatus === invitations_1.Invitation.State.CONNECTING ? (react_2.default.createElement("span", { className: 'pli-2 grow text-neutral-500' }, "Connecting...")) : invitationStatus === invitations_1.Invitation.State.AUTHENTICATING ? (react_2.default.createElement("span", { className: 'pli-2 grow text-neutral-500' }, "Authenticating...")) : invitationStatus === invitations_1.Invitation.State.ERROR || invitationStatus === invitations_1.Invitation.State.TIMEOUT ? (react_2.default.createElement("span", { className: 'pli-2 grow text-neutral-500' }, "Failed")) : invitationStatus === invitations_1.Invitation.State.CANCELLED ? (react_2.default.createElement("span", { className: 'pli-2 grow text-neutral-500' }, "Cancelled")) : invitationStatus === invitations_1.Invitation.State.SUCCESS ? (react_2.default.createElement("span", { className: 'pli-2 grow truncate' }, "User joined")) : !shareable ? (react_2.default.createElement("span", { className: 'pli-2 grow text-neutral-500' }, "Pending Invitation")) : (react_2.default.createElement("span", { className: 'grow' }, " ")),
|
|
117
|
-
isCancellable ? (react_2.default.createElement(react_ui_1.Button, { variant: 'ghost', classNames: 'flex gap-1 pli-0', onClick: cancel, "data-testid": 'cancel-invitation' },
|
|
118
|
-
react_2.default.createElement("span", { className: 'sr-only' }, t('cancel invitation label')),
|
|
119
|
-
react_2.default.createElement(react_1.X, { className: (0, react_ui_theme_1.getSize)(4) }))) : (react_2.default.createElement(react_ui_1.Button, { variant: 'ghost', classNames: 'flex gap-1 pli-0', onClick: handleClickRemove, "data-testid": 'remove-invitation' },
|
|
120
|
-
react_2.default.createElement("span", { className: 'sr-only' }, t('remove invitation label')),
|
|
121
|
-
react_2.default.createElement(react_1.X, { className: (0, react_ui_theme_1.getSize)(4) })))));
|
|
59
|
+
return ((0, jsx_runtime_1.jsxs)(react_ui_1.ListItem.Root, { id: invitationCode, ...props, classNames: ['flex gap-2 pis-3 pie-1 items-center relative', props.classNames], children: [(0, jsx_runtime_1.jsx)(react_ui_1.ListItem.Heading, { classNames: 'sr-only', children: t(multiUse ? 'invite many list item label' : 'invite one list item label') }), multiUse && ((0, jsx_runtime_1.jsx)(AvatarStackEffect, { status: avatarStatus, animation: avatarAnimation, reverseEffects: reverseEffects })), (0, jsx_runtime_1.jsxs)(react_ui_1.Tooltip.Root, { children: [(0, jsx_runtime_1.jsx)(react_ui_1.Avatar.Root, { ...avatarProps, animation: avatarAnimation, status: avatarStatus, children: (0, jsx_runtime_1.jsx)(react_ui_1.Tooltip.Trigger, { asChild: true, children: (0, jsx_runtime_1.jsx)(react_ui_1.Avatar.Frame, { tabIndex: 0, classNames: [react_ui_theme_1.focusRing, 'relative rounded-full place-self-center'], children: (0, jsx_runtime_1.jsx)(react_ui_1.Avatar.Fallback, { text: (0, util_1.hexToEmoji)(invitationId) }) }) }) }), (0, jsx_runtime_1.jsx)(react_ui_1.Tooltip.Portal, { children: (0, jsx_runtime_1.jsxs)(react_ui_1.Tooltip.Content, { side: 'left', children: [t(multiUse ? 'invite many qr label' : 'invite one qr label'), (0, jsx_runtime_1.jsx)(react_ui_1.Tooltip.Arrow, {})] }) })] }), showShare && invitationUrl ? ((0, jsx_runtime_1.jsxs)(react_ui_1.Tooltip.Root, { children: [(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_ui_1.Tooltip.Trigger, { asChild: true, children: (0, jsx_runtime_1.jsx)(react_ui_1.Button, { variant: 'ghost', classNames: 'grow justify-start font-medium', onClick: () => send({ type: 'selectInvitation', invitation }), "data-testid": 'show-qrcode', children: (0, jsx_runtime_1.jsx)("span", { children: t('open share panel label') }) }) }), (0, jsx_runtime_1.jsx)(react_ui_1.Clipboard.IconButton, { variant: 'ghost', value: invitationUrl })] }), (0, jsx_runtime_1.jsx)(react_ui_1.Tooltip.Portal, { children: (0, jsx_runtime_1.jsx)(react_ui_1.Tooltip.Content, { side: 'left', children: invitationHasLifetime && (0, jsx_runtime_1.jsxs)("span", { children: ["Expires ", invitationTimeLeft] }) }) })] })) : showAuthCode ? ((0, jsx_runtime_1.jsx)(AuthCode_1.AuthCode, { code: authCode, classNames: 'grow' })) : invitationStatus === invitations_1.Invitation.State.CONNECTING ? ((0, jsx_runtime_1.jsx)("span", { className: 'pli-2 grow text-neutral-500', children: "Connecting..." })) : invitationStatus === invitations_1.Invitation.State.AUTHENTICATING ? ((0, jsx_runtime_1.jsx)("span", { className: 'pli-2 grow text-neutral-500', children: "Authenticating..." })) : invitationStatus === invitations_1.Invitation.State.ERROR || invitationStatus === invitations_1.Invitation.State.TIMEOUT ? ((0, jsx_runtime_1.jsx)("span", { className: 'pli-2 grow text-neutral-500', children: "Failed" })) : invitationStatus === invitations_1.Invitation.State.CANCELLED ? ((0, jsx_runtime_1.jsx)("span", { className: 'pli-2 grow text-neutral-500', children: "Cancelled" })) : invitationStatus === invitations_1.Invitation.State.SUCCESS ? ((0, jsx_runtime_1.jsx)("span", { className: 'pli-2 grow truncate', children: "User joined" })) : !shareable ? ((0, jsx_runtime_1.jsx)("span", { className: 'pli-2 grow text-neutral-500', children: "Pending Invitation" })) : ((0, jsx_runtime_1.jsx)("span", { className: 'grow', children: " " })), isCancellable ? ((0, jsx_runtime_1.jsxs)(react_ui_1.Button, { variant: 'ghost', classNames: 'flex gap-1 pli-0', onClick: cancel, "data-testid": 'cancel-invitation', children: [(0, jsx_runtime_1.jsx)("span", { className: 'sr-only', children: t('cancel invitation label') }), (0, jsx_runtime_1.jsx)(react_1.X, { className: (0, react_ui_theme_1.getSize)(4) })] })) : ((0, jsx_runtime_1.jsxs)(react_ui_1.Button, { variant: 'ghost', classNames: 'flex gap-1 pli-0', onClick: handleClickRemove, "data-testid": 'remove-invitation', children: [(0, jsx_runtime_1.jsx)("span", { className: 'sr-only', children: t('remove invitation label') }), (0, jsx_runtime_1.jsx)(react_1.X, { className: (0, react_ui_theme_1.getSize)(4) })] }))] }));
|
|
122
60
|
};
|
|
123
61
|
exports.InvitationListItemImpl = InvitationListItemImpl;
|
|
124
62
|
//# sourceMappingURL=InvitationListItem.js.map
|