@dxos/shell 0.3.11-main.1caa3af
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/LICENSE +8 -0
- package/README.md +21 -0
- package/dist/lib/browser/chunk-ZSTKOCBT.mjs +10 -0
- package/dist/lib/browser/chunk-ZSTKOCBT.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/browser/react.mjs +3617 -0
- package/dist/lib/browser/react.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +179 -0
- package/dist/lib/browser/testing/index.mjs.map +7 -0
- package/dist/types/src/components/AuthCode.d.ts +8 -0
- package/dist/types/src/components/AuthCode.d.ts.map +1 -0
- package/dist/types/src/components/AuthCode.js +26 -0
- package/dist/types/src/components/AuthCode.js.map +1 -0
- package/dist/types/src/components/Clipboard/ClipboardProvider.d.ts +9 -0
- package/dist/types/src/components/Clipboard/ClipboardProvider.d.ts.map +1 -0
- package/dist/types/src/components/Clipboard/ClipboardProvider.js +46 -0
- package/dist/types/src/components/Clipboard/ClipboardProvider.js.map +1 -0
- package/dist/types/src/components/Clipboard/CopyButton.d.ts +9 -0
- package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -0
- package/dist/types/src/components/Clipboard/CopyButton.js +65 -0
- package/dist/types/src/components/Clipboard/CopyButton.js.map +1 -0
- package/dist/types/src/components/Clipboard/index.d.ts +3 -0
- package/dist/types/src/components/Clipboard/index.d.ts.map +1 -0
- package/dist/types/src/components/Clipboard/index.js +22 -0
- package/dist/types/src/components/Clipboard/index.js.map +1 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.d.ts +17 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.d.ts.map +1 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.js +29 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.js.map +1 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts +35 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts.map +1 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js +45 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js.map +1 -0
- package/dist/types/src/components/CompoundButton/index.d.ts +2 -0
- package/dist/types/src/components/CompoundButton/index.d.ts.map +1 -0
- package/dist/types/src/components/CompoundButton/index.js +21 -0
- package/dist/types/src/components/CompoundButton/index.js.map +1 -0
- package/dist/types/src/components/IdentityList/DeviceList.d.ts +7 -0
- package/dist/types/src/components/IdentityList/DeviceList.d.ts.map +1 -0
- package/dist/types/src/components/IdentityList/DeviceList.js +29 -0
- package/dist/types/src/components/IdentityList/DeviceList.js.map +1 -0
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts +11 -0
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts.map +1 -0
- package/dist/types/src/components/IdentityList/IdentityListItem.js +47 -0
- package/dist/types/src/components/IdentityList/IdentityListItem.js.map +1 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts +13 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts.map +1 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.js +54 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.js.map +1 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts +17 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts.map +1 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js +26 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js.map +1 -0
- package/dist/types/src/components/IdentityList/index.d.ts +4 -0
- package/dist/types/src/components/IdentityList/index.d.ts.map +1 -0
- package/dist/types/src/components/IdentityList/index.js +23 -0
- package/dist/types/src/components/IdentityList/index.js.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationList.d.ts +11 -0
- package/dist/types/src/components/InvitationList/InvitationList.d.ts.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationList.js +22 -0
- package/dist/types/src/components/InvitationList/InvitationList.js.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts +17 -0
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationList.stories.js +39 -0
- package/dist/types/src/components/InvitationList/InvitationList.stories.js.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts +7 -0
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationListContainer.js +42 -0
- package/dist/types/src/components/InvitationList/InvitationListContainer.js.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts +12 -0
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationListItem.js +103 -0
- package/dist/types/src/components/InvitationList/InvitationListItem.js.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationListProps.d.ts +9 -0
- package/dist/types/src/components/InvitationList/InvitationListProps.d.ts.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationListProps.js +3 -0
- package/dist/types/src/components/InvitationList/InvitationListProps.js.map +1 -0
- package/dist/types/src/components/InvitationList/index.d.ts +4 -0
- package/dist/types/src/components/InvitationList/index.d.ts.map +1 -0
- package/dist/types/src/components/InvitationList/index.js +23 -0
- package/dist/types/src/components/InvitationList/index.js.map +1 -0
- package/dist/types/src/components/Panel/Action.d.ts +20 -0
- package/dist/types/src/components/Panel/Action.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Action.js +93 -0
- package/dist/types/src/components/Panel/Action.js.map +1 -0
- package/dist/types/src/components/Panel/Actions.d.ts +11 -0
- package/dist/types/src/components/Panel/Actions.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Actions.js +36 -0
- package/dist/types/src/components/Panel/Actions.js.map +1 -0
- package/dist/types/src/components/Panel/CloseButton.d.ts +5 -0
- package/dist/types/src/components/Panel/CloseButton.d.ts.map +1 -0
- package/dist/types/src/components/Panel/CloseButton.js +21 -0
- package/dist/types/src/components/Panel/CloseButton.js.map +1 -0
- package/dist/types/src/components/Panel/Emoji.d.ts +7 -0
- package/dist/types/src/components/Panel/Emoji.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Emoji.js +24 -0
- package/dist/types/src/components/Panel/Emoji.js.map +1 -0
- package/dist/types/src/components/Panel/Heading.d.ts +16 -0
- package/dist/types/src/components/Panel/Heading.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Heading.js +39 -0
- package/dist/types/src/components/Panel/Heading.js.map +1 -0
- package/dist/types/src/components/Panel/Input.d.ts +11 -0
- package/dist/types/src/components/Panel/Input.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Input.js +19 -0
- package/dist/types/src/components/Panel/Input.js.map +1 -0
- package/dist/types/src/components/Panel/Label.d.ts +4 -0
- package/dist/types/src/components/Panel/Label.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Label.js +17 -0
- package/dist/types/src/components/Panel/Label.js.map +1 -0
- package/dist/types/src/components/Panel/Panel.stories.d.ts +13 -0
- package/dist/types/src/components/Panel/Panel.stories.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Panel.stories.js +44 -0
- package/dist/types/src/components/Panel/Panel.stories.js.map +1 -0
- package/dist/types/src/components/Panel/StepHeading.d.ts +5 -0
- package/dist/types/src/components/Panel/StepHeading.d.ts.map +1 -0
- package/dist/types/src/components/Panel/StepHeading.js +35 -0
- package/dist/types/src/components/Panel/StepHeading.js.map +1 -0
- package/dist/types/src/components/Panel/index.d.ts +9 -0
- package/dist/types/src/components/Panel/index.d.ts.map +1 -0
- package/dist/types/src/components/Panel/index.js +28 -0
- package/dist/types/src/components/Panel/index.js.map +1 -0
- package/dist/types/src/components/SpaceListItem.d.ts +7 -0
- package/dist/types/src/components/SpaceListItem.d.ts.map +1 -0
- package/dist/types/src/components/SpaceListItem.js +46 -0
- package/dist/types/src/components/SpaceListItem.js.map +1 -0
- package/dist/types/src/components/StorybookDialog.d.ts +6 -0
- package/dist/types/src/components/StorybookDialog.d.ts.map +1 -0
- package/dist/types/src/components/StorybookDialog.js +23 -0
- package/dist/types/src/components/StorybookDialog.js.map +1 -0
- package/dist/types/src/components/Viewport/Viewport.d.ts +39 -0
- package/dist/types/src/components/Viewport/Viewport.d.ts.map +1 -0
- package/dist/types/src/components/Viewport/Viewport.js +73 -0
- package/dist/types/src/components/Viewport/Viewport.js.map +1 -0
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts +17 -0
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts.map +1 -0
- package/dist/types/src/components/Viewport/Viewport.stories.js +51 -0
- package/dist/types/src/components/Viewport/Viewport.stories.js.map +1 -0
- package/dist/types/src/components/Viewport/index.d.ts +2 -0
- package/dist/types/src/components/Viewport/index.d.ts.map +1 -0
- package/dist/types/src/components/Viewport/index.js +21 -0
- package/dist/types/src/components/Viewport/index.js.map +1 -0
- package/dist/types/src/components/index.d.ts +9 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/components/index.js +28 -0
- package/dist/types/src/components/index.js.map +1 -0
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts +7 -0
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts.map +1 -0
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js +26 -0
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js.map +1 -0
- package/dist/types/src/composites/IdentityDialog/index.d.ts +2 -0
- package/dist/types/src/composites/IdentityDialog/index.d.ts.map +1 -0
- package/dist/types/src/composites/IdentityDialog/index.js +21 -0
- package/dist/types/src/composites/IdentityDialog/index.js.map +1 -0
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts +6 -0
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts.map +1 -0
- package/dist/types/src/composites/JoinDialog/JoinDialog.js +27 -0
- package/dist/types/src/composites/JoinDialog/JoinDialog.js.map +1 -0
- package/dist/types/src/composites/JoinDialog/index.d.ts +2 -0
- package/dist/types/src/composites/JoinDialog/index.d.ts.map +1 -0
- package/dist/types/src/composites/JoinDialog/index.js +21 -0
- package/dist/types/src/composites/JoinDialog/index.js.map +1 -0
- package/dist/types/src/composites/Shell/Shell.d.ts +6 -0
- package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -0
- package/dist/types/src/composites/Shell/Shell.js +90 -0
- package/dist/types/src/composites/Shell/Shell.js.map +1 -0
- package/dist/types/src/composites/Shell/ShellContext.d.ts +30 -0
- package/dist/types/src/composites/Shell/ShellContext.d.ts.map +1 -0
- package/dist/types/src/composites/Shell/ShellContext.js +129 -0
- package/dist/types/src/composites/Shell/ShellContext.js.map +1 -0
- package/dist/types/src/composites/Shell/index.d.ts +4 -0
- package/dist/types/src/composites/Shell/index.d.ts.map +1 -0
- package/dist/types/src/composites/Shell/index.js +23 -0
- package/dist/types/src/composites/Shell/index.js.map +1 -0
- package/dist/types/src/composites/Shell/memory-shell-runtime.d.ts +16 -0
- package/dist/types/src/composites/Shell/memory-shell-runtime.d.ts.map +1 -0
- package/dist/types/src/composites/Shell/memory-shell-runtime.js +38 -0
- package/dist/types/src/composites/Shell/memory-shell-runtime.js.map +1 -0
- package/dist/types/src/composites/Shell/run-shell.d.ts +3 -0
- package/dist/types/src/composites/Shell/run-shell.d.ts.map +1 -0
- package/dist/types/src/composites/Shell/run-shell.js +54 -0
- package/dist/types/src/composites/Shell/run-shell.js.map +1 -0
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts +6 -0
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts.map +1 -0
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js +26 -0
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js.map +1 -0
- package/dist/types/src/composites/SpaceDialog/index.d.ts +2 -0
- package/dist/types/src/composites/SpaceDialog/index.d.ts.map +1 -0
- package/dist/types/src/composites/SpaceDialog/index.js +21 -0
- package/dist/types/src/composites/SpaceDialog/index.js.map +1 -0
- package/dist/types/src/composites/index.d.ts +5 -0
- package/dist/types/src/composites/index.d.ts.map +1 -0
- package/dist/types/src/composites/index.js +24 -0
- package/dist/types/src/composites/index.js.map +1 -0
- package/dist/types/src/index.d.ts +3 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/index.js +10 -0
- package/dist/types/src/index.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts +4 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +124 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts +22 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js +86 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +27 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.js +6 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts +46 -0
- package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/identityMachine.js +79 -0
- package/dist/types/src/panels/IdentityPanel/identityMachine.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/index.d.ts +3 -0
- package/dist/types/src/panels/IdentityPanel/index.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/index.js +22 -0
- package/dist/types/src/panels/IdentityPanel/index.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts +9 -0
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +85 -0
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts +15 -0
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js +62 -0
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/index.d.ts +3 -0
- package/dist/types/src/panels/IdentityPanel/steps/index.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/index.js +22 -0
- package/dist/types/src/panels/IdentityPanel/steps/index.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinHeading.d.ts +10 -0
- package/dist/types/src/panels/JoinPanel/JoinHeading.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinHeading.js +45 -0
- package/dist/types/src/panels/JoinPanel/JoinHeading.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts +4 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.js +293 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +92 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js +74 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts +91 -0
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.js +6 -0
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/index.d.ts +3 -0
- package/dist/types/src/panels/JoinPanel/index.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/index.js +22 -0
- package/dist/types/src/panels/JoinPanel/index.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/joinMachine.d.ts +87 -0
- package/dist/types/src/panels/JoinPanel/joinMachine.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/joinMachine.js +402 -0
- package/dist/types/src/panels/JoinPanel/joinMachine.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts +4 -0
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js +34 -0
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts +8 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.js +56 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts +12 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.js +67 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.d.ts +9 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.js +44 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts +11 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js +72 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts +8 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js +68 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts +11 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js +49 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.d.ts +12 -0
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js +63 -0
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/index.d.ts +9 -0
- package/dist/types/src/panels/JoinPanel/steps/index.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/index.js +28 -0
- package/dist/types/src/panels/JoinPanel/steps/index.js.map +1 -0
- package/dist/types/src/panels/Panels.stories.d.ts +22 -0
- package/dist/types/src/panels/Panels.stories.d.ts.map +1 -0
- package/dist/types/src/panels/Panels.stories.js +71 -0
- package/dist/types/src/panels/Panels.stories.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts +4 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.js +93 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts +30 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js +183 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.d.ts +30 -0
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.js +6 -0
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/index.d.ts +3 -0
- package/dist/types/src/panels/SpacePanel/index.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/index.js +22 -0
- package/dist/types/src/panels/SpacePanel/index.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/spaceMachine.d.ts +35 -0
- package/dist/types/src/panels/SpacePanel/spaceMachine.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/spaceMachine.js +46 -0
- package/dist/types/src/panels/SpacePanel/spaceMachine.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts +15 -0
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js +120 -0
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/steps/index.d.ts +2 -0
- package/dist/types/src/panels/SpacePanel/steps/index.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/steps/index.js +21 -0
- package/dist/types/src/panels/SpacePanel/steps/index.js.map +1 -0
- package/dist/types/src/panels/index.d.ts +4 -0
- package/dist/types/src/panels/index.d.ts.map +1 -0
- package/dist/types/src/panels/index.js +23 -0
- package/dist/types/src/panels/index.js.map +1 -0
- package/dist/types/src/playwright/invitations-manager.d.ts +26 -0
- package/dist/types/src/playwright/invitations-manager.d.ts.map +1 -0
- package/dist/types/src/playwright/invitations-manager.js +142 -0
- package/dist/types/src/playwright/invitations-manager.js.map +1 -0
- package/dist/types/src/playwright/invitations.spec.d.ts +2 -0
- package/dist/types/src/playwright/invitations.spec.d.ts.map +1 -0
- package/dist/types/src/playwright/invitations.spec.js +298 -0
- package/dist/types/src/playwright/invitations.spec.js.map +1 -0
- package/dist/types/src/playwright/playwright.config.d.ts +3 -0
- package/dist/types/src/playwright/playwright.config.d.ts.map +1 -0
- package/dist/types/src/playwright/playwright.config.js +8 -0
- package/dist/types/src/playwright/playwright.config.js.map +1 -0
- package/dist/types/src/react.d.ts +6 -0
- package/dist/types/src/react.d.ts.map +1 -0
- package/dist/types/src/react.js +25 -0
- package/dist/types/src/react.js.map +1 -0
- package/dist/types/src/steps/InvitationManager.d.ts +7 -0
- package/dist/types/src/steps/InvitationManager.d.ts.map +1 -0
- package/dist/types/src/steps/InvitationManager.js +80 -0
- package/dist/types/src/steps/InvitationManager.js.map +1 -0
- package/dist/types/src/steps/StepProps.d.ts +14 -0
- package/dist/types/src/steps/StepProps.d.ts.map +1 -0
- package/dist/types/src/steps/StepProps.js +6 -0
- package/dist/types/src/steps/StepProps.js.map +1 -0
- package/dist/types/src/steps/index.d.ts +3 -0
- package/dist/types/src/steps/index.d.ts.map +1 -0
- package/dist/types/src/steps/index.js +22 -0
- package/dist/types/src/steps/index.js.map +1 -0
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts +22 -0
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts.map +1 -0
- package/dist/types/src/stories/Invitations.e2e-stories.js +146 -0
- package/dist/types/src/stories/Invitations.e2e-stories.js.map +1 -0
- package/dist/types/src/styles/index.d.ts +3 -0
- package/dist/types/src/styles/index.d.ts.map +1 -0
- package/dist/types/src/styles/index.js +22 -0
- package/dist/types/src/styles/index.js.map +1 -0
- package/dist/types/src/styles/invitationStatusStyles.d.ts +20 -0
- package/dist/types/src/styles/invitationStatusStyles.d.ts.map +1 -0
- package/dist/types/src/styles/invitationStatusStyles.js +41 -0
- package/dist/types/src/styles/invitationStatusStyles.js.map +1 -0
- package/dist/types/src/styles/panelStyles.d.ts +2 -0
- package/dist/types/src/styles/panelStyles.d.ts.map +1 -0
- package/dist/types/src/styles/panelStyles.js +8 -0
- package/dist/types/src/styles/panelStyles.js.map +1 -0
- package/dist/types/src/testing/fixtures/identities.d.ts +3 -0
- package/dist/types/src/testing/fixtures/identities.d.ts.map +1 -0
- package/dist/types/src/testing/fixtures/identities.js +18 -0
- package/dist/types/src/testing/fixtures/identities.js.map +1 -0
- package/dist/types/src/testing/fixtures/index.d.ts +3 -0
- package/dist/types/src/testing/fixtures/index.d.ts.map +1 -0
- package/dist/types/src/testing/fixtures/index.js +22 -0
- package/dist/types/src/testing/fixtures/index.js.map +1 -0
- package/dist/types/src/testing/fixtures/invitations.d.ts +3 -0
- package/dist/types/src/testing/fixtures/invitations.d.ts.map +1 -0
- package/dist/types/src/testing/fixtures/invitations.js +25 -0
- package/dist/types/src/testing/fixtures/invitations.js.map +1 -0
- package/dist/types/src/testing/index.d.ts +4 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/index.js +23 -0
- package/dist/types/src/testing/index.js.map +1 -0
- package/dist/types/src/testing/scoped-shell-manager.d.ts +17 -0
- package/dist/types/src/testing/scoped-shell-manager.d.ts.map +1 -0
- package/dist/types/src/testing/scoped-shell-manager.js +71 -0
- package/dist/types/src/testing/scoped-shell-manager.js.map +1 -0
- package/dist/types/src/testing/shell-manager.d.ts +24 -0
- package/dist/types/src/testing/shell-manager.d.ts.map +1 -0
- package/dist/types/src/testing/shell-manager.js +85 -0
- package/dist/types/src/testing/shell-manager.js.map +1 -0
- package/dist/types/src/translations/index.d.ts +5 -0
- package/dist/types/src/translations/index.d.ts.map +1 -0
- package/dist/types/src/translations/index.js +32 -0
- package/dist/types/src/translations/index.js.map +1 -0
- package/dist/types/src/translations/locales/en-US.d.ts +97 -0
- package/dist/types/src/translations/locales/en-US.d.ts.map +1 -0
- package/dist/types/src/translations/locales/en-US.js +103 -0
- package/dist/types/src/translations/locales/en-US.js.map +1 -0
- package/dist/types/src/types/FailReason.d.ts +2 -0
- package/dist/types/src/types/FailReason.d.ts.map +1 -0
- package/dist/types/src/types/FailReason.js +6 -0
- package/dist/types/src/types/FailReason.js.map +1 -0
- package/dist/types/src/types/IInvitation.d.ts +7 -0
- package/dist/types/src/types/IInvitation.d.ts.map +1 -0
- package/dist/types/src/types/IInvitation.js +6 -0
- package/dist/types/src/types/IInvitation.js.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/index.js +22 -0
- package/dist/types/src/types/index.js.map +1 -0
- package/dist/types/src/util/index.d.ts +3 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/src/util/index.js +22 -0
- package/dist/types/src/util/index.js.map +1 -0
- package/dist/types/src/util/invitationStatusValue.d.ts +8 -0
- package/dist/types/src/util/invitationStatusValue.d.ts.map +1 -0
- package/dist/types/src/util/invitationStatusValue.js +24 -0
- package/dist/types/src/util/invitationStatusValue.js.map +1 -0
- package/dist/types/src/util/toEmoji.d.ts +2 -0
- package/dist/types/src/util/toEmoji.d.ts.map +1 -0
- package/dist/types/src/util/toEmoji.js +26 -0
- package/dist/types/src/util/toEmoji.js.map +1 -0
- package/package.json +79 -0
- package/src/components/AuthCode.tsx +36 -0
- package/src/components/Clipboard/ClipboardProvider.tsx +26 -0
- package/src/components/Clipboard/CopyButton.tsx +70 -0
- package/src/components/Clipboard/index.ts +6 -0
- package/src/components/CompoundButton/CompoundButton.stories.tsx +49 -0
- package/src/components/CompoundButton/CompoundButton.tsx +89 -0
- package/src/components/CompoundButton/index.ts +5 -0
- package/src/components/IdentityList/DeviceList.tsx +45 -0
- package/src/components/IdentityList/IdentityListItem.tsx +42 -0
- package/src/components/IdentityList/SpaceMemberList.stories.tsx +24 -0
- package/src/components/IdentityList/SpaceMemberList.tsx +65 -0
- package/src/components/IdentityList/index.ts +7 -0
- package/src/components/InvitationList/InvitationList.stories.tsx +44 -0
- package/src/components/InvitationList/InvitationList.tsx +31 -0
- package/src/components/InvitationList/InvitationListContainer.tsx +27 -0
- package/src/components/InvitationList/InvitationListItem.tsx +183 -0
- package/src/components/InvitationList/InvitationListProps.ts +9 -0
- package/src/components/InvitationList/index.ts +7 -0
- package/src/components/Panel/Action.tsx +142 -0
- package/src/components/Panel/Actions.tsx +31 -0
- package/src/components/Panel/CloseButton.tsx +24 -0
- package/src/components/Panel/Emoji.tsx +36 -0
- package/src/components/Panel/Heading.tsx +32 -0
- package/src/components/Panel/Input.tsx +27 -0
- package/src/components/Panel/Label.tsx +14 -0
- package/src/components/Panel/Panel.stories.tsx +52 -0
- package/src/components/Panel/StepHeading.tsx +17 -0
- package/src/components/Panel/index.ts +12 -0
- package/src/components/SpaceListItem.tsx +35 -0
- package/src/components/StorybookDialog.tsx +33 -0
- package/src/components/Viewport/Viewport.stories.tsx +66 -0
- package/src/components/Viewport/Viewport.tsx +120 -0
- package/src/components/Viewport/index.tsx +5 -0
- package/src/components/index.ts +12 -0
- package/src/composites/IdentityDialog/IdentityDialog.tsx +39 -0
- package/src/composites/IdentityDialog/index.ts +5 -0
- package/src/composites/JoinDialog/JoinDialog.tsx +40 -0
- package/src/composites/JoinDialog/index.ts +5 -0
- package/src/composites/Shell/Shell.tsx +98 -0
- package/src/composites/Shell/ShellContext.tsx +163 -0
- package/src/composites/Shell/index.ts +7 -0
- package/src/composites/Shell/memory-shell-runtime.ts +50 -0
- package/src/composites/Shell/run-shell.tsx +38 -0
- package/src/composites/SpaceDialog/SpaceDialog.tsx +37 -0
- package/src/composites/SpaceDialog/index.ts +5 -0
- package/src/composites/index.ts +8 -0
- package/src/index.ts +7 -0
- package/src/panels/IdentityPanel/IdentityPanel.stories.tsx +113 -0
- package/src/panels/IdentityPanel/IdentityPanel.tsx +158 -0
- package/src/panels/IdentityPanel/IdentityPanelProps.ts +36 -0
- package/src/panels/IdentityPanel/identityMachine.ts +131 -0
- package/src/panels/IdentityPanel/index.ts +6 -0
- package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +96 -0
- package/src/panels/IdentityPanel/steps/ProfileForm.tsx +79 -0
- package/src/panels/IdentityPanel/steps/index.ts +6 -0
- package/src/panels/JoinPanel/JoinHeading.tsx +49 -0
- package/src/panels/JoinPanel/JoinPanel.stories.tsx +91 -0
- package/src/panels/JoinPanel/JoinPanel.tsx +415 -0
- package/src/panels/JoinPanel/JoinPanelProps.ts +132 -0
- package/src/panels/JoinPanel/index.ts +6 -0
- package/src/panels/JoinPanel/joinMachine.ts +536 -0
- package/src/panels/JoinPanel/steps/AdditionMethodChooser.tsx +65 -0
- package/src/panels/JoinPanel/steps/IdentityAdded.tsx +75 -0
- package/src/panels/JoinPanel/steps/IdentityInput.tsx +86 -0
- package/src/panels/JoinPanel/steps/InvitationAccepted.tsx +43 -0
- package/src/panels/JoinPanel/steps/InvitationAuthenticator.tsx +99 -0
- package/src/panels/JoinPanel/steps/InvitationInput.tsx +102 -0
- package/src/panels/JoinPanel/steps/InvitationRescuer.tsx +102 -0
- package/src/panels/JoinPanel/steps/ResetIdentity.tsx +71 -0
- package/src/panels/JoinPanel/steps/index.ts +12 -0
- package/src/panels/Panels.stories.tsx +61 -0
- package/src/panels/SpacePanel/SpacePanel.stories.tsx +328 -0
- package/src/panels/SpacePanel/SpacePanel.tsx +122 -0
- package/src/panels/SpacePanel/SpacePanelProps.ts +40 -0
- package/src/panels/SpacePanel/index.ts +6 -0
- package/src/panels/SpacePanel/spaceMachine.ts +72 -0
- package/src/panels/SpacePanel/steps/SpaceManager.tsx +157 -0
- package/src/panels/SpacePanel/steps/index.ts +5 -0
- package/src/panels/index.ts +7 -0
- package/src/playwright/invitations-manager.ts +168 -0
- package/src/playwright/invitations.spec.ts +364 -0
- package/src/playwright/playwright.config.ts +7 -0
- package/src/react.ts +9 -0
- package/src/steps/InvitationManager.tsx +116 -0
- package/src/steps/StepProps.ts +17 -0
- package/src/steps/index.ts +6 -0
- package/src/stories/Invitations.e2e-stories.tsx +231 -0
- package/src/styles/index.ts +6 -0
- package/src/styles/invitationStatusStyles.ts +42 -0
- package/src/styles/panelStyles.ts +5 -0
- package/src/testing/fixtures/identities.ts +16 -0
- package/src/testing/fixtures/index.ts +6 -0
- package/src/testing/fixtures/invitations.ts +23 -0
- package/src/testing/index.ts +7 -0
- package/src/testing/scoped-shell-manager.ts +79 -0
- package/src/testing/shell-manager.ts +102 -0
- package/src/translations/index.ts +7 -0
- package/src/translations/locales/en-US.ts +101 -0
- package/src/types/FailReason.ts +5 -0
- package/src/types/IInvitation.ts +14 -0
- package/src/types/index.ts +6 -0
- package/src/util/index.ts +6 -0
- package/src/util/invitationStatusValue.ts +22 -0
- package/src/util/toEmoji.ts +22 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2022 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./CompoundButton"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/CompoundButton/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,mDAAiC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Device } from '@dxos/react-client/halo';
|
|
2
|
+
export interface DeviceListProps {
|
|
3
|
+
devices: Device[];
|
|
4
|
+
onSelect?: (device: Device) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const DeviceList: ({ devices, onSelect }: DeviceListProps) => JSX.Element;
|
|
7
|
+
//# sourceMappingURL=DeviceList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceList.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/DeviceList.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAMtD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,eAAO,MAAM,UAAU,0BAA2B,eAAe,gBA2BhE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
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.DeviceList = void 0;
|
|
10
|
+
const react_1 = __importDefault(require("react"));
|
|
11
|
+
const react_ui_1 = require("@dxos/react-ui");
|
|
12
|
+
const react_ui_theme_1 = require("@dxos/react-ui-theme");
|
|
13
|
+
const IdentityListItem_1 = require("./IdentityListItem");
|
|
14
|
+
const DeviceList = ({ devices, onSelect }) => {
|
|
15
|
+
const { t } = (0, react_ui_1.useTranslation)('os');
|
|
16
|
+
return devices.length > 0 ? (react_1.default.createElement(react_ui_1.List, { classNames: 'flex flex-col gap-2' }, devices.map((device) => {
|
|
17
|
+
var _a, _b, _c, _d, _e, _f;
|
|
18
|
+
const identity = {
|
|
19
|
+
identityKey: device.deviceKey,
|
|
20
|
+
profile: {
|
|
21
|
+
displayName: `${(_a = device.profile) === null || _a === void 0 ? void 0 : _a.platform} (${(_b = device.profile) === null || _b === void 0 ? void 0 : _b.platformVersion}) on ${(_c = device.profile) === null || _c === void 0 ? void 0 : _c.os} (${(_d = device.profile) === null || _d === void 0 ? void 0 : _d.osVersion}) ${(_f = (_e = device.profile) === null || _e === void 0 ? void 0 : _e.architecture) !== null && _f !== void 0 ? _f : 'Unknown'}-bit`,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
return (react_1.default.createElement(IdentityListItem_1.IdentityListItem, { key: device.deviceKey.toHex(), identity: identity, onClick: onSelect && (() => onSelect(device)) }));
|
|
25
|
+
}))) : (react_1.default.createElement("div", { role: 'none', className: 'grow flex items-center p-2' },
|
|
26
|
+
react_1.default.createElement("p", { className: (0, react_ui_theme_1.mx)(react_ui_theme_1.descriptionText, 'text-center is-full') }, t('empty device list message'))));
|
|
27
|
+
};
|
|
28
|
+
exports.DeviceList = DeviceList;
|
|
29
|
+
//# sourceMappingURL=DeviceList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceList.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/DeviceList.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,kDAA0B;AAG1B,6CAAsD;AACtD,yDAA2D;AAE3D,yDAAsD;AAO/C,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAmB,EAAE,EAAE;IACnE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,yBAAc,EAAC,IAAI,CAAC,CAAC;IACnC,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAC1B,8BAAC,eAAI,IAAC,UAAU,EAAC,qBAAqB,IACnC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;;QACtB,MAAM,QAAQ,GAAG;YACf,WAAW,EAAE,MAAM,CAAC,SAAS;YAC7B,OAAO,EAAE;gBACP,WAAW,EAAE,GAAG,MAAA,MAAM,CAAC,OAAO,0CAAE,QAAQ,KAAK,MAAA,MAAM,CAAC,OAAO,0CAAE,eAAe,QAAQ,MAAA,MAAM,CAAC,OAAO,0CAAE,EAAE,KACpG,MAAA,MAAM,CAAC,OAAO,0CAAE,SAClB,KAAK,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,YAAY,mCAAI,SAAS,MAAM;aACrD;SACF,CAAC;QACF,OAAO,CACL,8BAAC,mCAAgB,IACf,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,EAC7B,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,QAAQ,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAC7C,CACH,CAAC;IACJ,CAAC,CAAC,CACG,CACR,CAAC,CAAC,CAAC,CACF,uCAAK,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,4BAA4B;QACrD,qCAAG,SAAS,EAAE,IAAA,mBAAE,EAAC,gCAAe,EAAE,qBAAqB,CAAC,IAAG,CAAC,CAAC,2BAA2B,CAAC,CAAK,CAC1F,CACP,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,UAAU,cA2BrB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SpaceMember } from '@dxos/react-client/echo';
|
|
3
|
+
import { type Identity } from '@dxos/react-client/halo';
|
|
4
|
+
type IdentityListItemProps = {
|
|
5
|
+
identity: Identity;
|
|
6
|
+
presence?: SpaceMember['presence'];
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const IdentityListItem: React.ForwardRefExoticComponent<IdentityListItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=IdentityListItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentityListItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/IdentityListItem.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAIxD,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,6FAuB5B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
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 (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.IdentityListItem = void 0;
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
|
+
const display_name_1 = require("@dxos/display-name");
|
|
32
|
+
const echo_1 = require("@dxos/react-client/echo");
|
|
33
|
+
const react_ui_1 = require("@dxos/react-ui");
|
|
34
|
+
const react_ui_theme_1 = require("@dxos/react-ui-theme");
|
|
35
|
+
exports.IdentityListItem = (0, react_1.forwardRef)(({ identity, presence, onClick }, forwardedRef) => {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
const fallbackValue = identity.identityKey.toHex();
|
|
38
|
+
const labelId = (0, react_ui_1.useId)('identityListItem__label');
|
|
39
|
+
const jdenticon = (0, react_ui_1.useJdenticonHref)(fallbackValue !== null && fallbackValue !== void 0 ? fallbackValue : '', 12);
|
|
40
|
+
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());
|
|
41
|
+
return (react_1.default.createElement(react_ui_1.ListItem.Root, { classNames: (0, react_ui_theme_1.mx)('flex gap-2 pis-3 pie-1 items-center', onClick && 'cursor-pointer'), onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(), "data-testid": 'identity-list-item', labelId: labelId, ref: forwardedRef },
|
|
42
|
+
react_1.default.createElement(react_ui_1.Avatar.Root, { status: presence === echo_1.SpaceMember.PresenceState.ONLINE ? 'active' : 'inactive', labelId: labelId },
|
|
43
|
+
react_1.default.createElement(react_ui_1.Avatar.Frame, null,
|
|
44
|
+
react_1.default.createElement(react_ui_1.Avatar.Fallback, { href: jdenticon })),
|
|
45
|
+
react_1.default.createElement(react_ui_1.Avatar.Label, { classNames: 'text-sm truncate pli-2' }, displayName))));
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=IdentityListItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentityListItem.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/IdentityListItem.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,+CAA0C;AAE1C,qDAAkD;AAClD,kDAAsD;AAEtD,6CAA2E;AAC3E,yDAA0C;AAQ7B,QAAA,gBAAgB,GAAG,IAAA,kBAAU,EACxC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAyB,EAAE,YAAY,EAAE,EAAE;;IACvE,MAAM,aAAa,GAAG,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;IACnD,MAAM,OAAO,GAAG,IAAA,gBAAK,EAAC,yBAAyB,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,IAAA,2BAAgB,EAAC,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5D,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,8BAAC,mBAAQ,CAAC,IAAI,IACZ,UAAU,EAAE,IAAA,mBAAE,EAAC,qCAAqC,EAAE,OAAO,IAAI,gBAAgB,CAAC,EAClF,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,EAAI,iBACd,oBAAoB,EAChC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,YAAY;QAEjB,8BAAC,iBAAM,CAAC,IAAI,IAAC,MAAM,EAAE,QAAQ,KAAK,kBAAW,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO;YAC1G,8BAAC,iBAAM,CAAC,KAAK;gBACX,8BAAC,iBAAM,CAAC,QAAQ,IAAC,IAAI,EAAE,SAAS,GAAI,CACvB;YACf,8BAAC,iBAAM,CAAC,KAAK,IAAC,UAAU,EAAC,wBAAwB,IAAE,WAAW,CAAgB,CAClE,CACA,CACjB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type PublicKey } from '@dxos/react-client';
|
|
2
|
+
import type { SpaceMember } from '@dxos/react-client/echo';
|
|
3
|
+
export interface SpaceMemberListImplProps {
|
|
4
|
+
members: SpaceMember[];
|
|
5
|
+
onSelect?: (member: SpaceMember) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface SpaceMemberListProps extends Partial<SpaceMemberListImplProps> {
|
|
8
|
+
spaceKey: PublicKey;
|
|
9
|
+
includeSelf?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const SpaceMemberList: ({ spaceKey, includeSelf, onSelect }: SpaceMemberListProps) => JSX.Element;
|
|
12
|
+
export declare const SpaceMemberListImpl: ({ members, onSelect }: SpaceMemberListImplProps) => JSX.Element;
|
|
13
|
+
//# sourceMappingURL=SpaceMemberList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,gBAexF,CAAC;AAEF,eAAO,MAAM,mBAAmB,0BAA2B,wBAAwB,gBAqBlF,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
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 (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.SpaceMemberListImpl = exports.SpaceMemberList = void 0;
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
|
+
const react_client_1 = require("@dxos/react-client");
|
|
32
|
+
const echo_1 = require("@dxos/react-client/echo");
|
|
33
|
+
const react_ui_1 = require("@dxos/react-ui");
|
|
34
|
+
const react_ui_theme_1 = require("@dxos/react-ui-theme");
|
|
35
|
+
const IdentityListItem_1 = require("./IdentityListItem");
|
|
36
|
+
const SpaceMemberList = ({ spaceKey, includeSelf, onSelect }) => {
|
|
37
|
+
const client = (0, react_client_1.useClient)();
|
|
38
|
+
const allUnsortedMembers = (0, echo_1.useMembers)(spaceKey);
|
|
39
|
+
const members = (0, react_1.useMemo)(() => includeSelf
|
|
40
|
+
? allUnsortedMembers.sort((member) => member.identity.identityKey.equals(client.halo.identity.get().identityKey) ? -1 : 1)
|
|
41
|
+
: allUnsortedMembers.filter((member) => !member.identity.identityKey.equals(client.halo.identity.get().identityKey)), [allUnsortedMembers]);
|
|
42
|
+
return react_1.default.createElement(exports.SpaceMemberListImpl, { members: members, onSelect: onSelect });
|
|
43
|
+
};
|
|
44
|
+
exports.SpaceMemberList = SpaceMemberList;
|
|
45
|
+
const SpaceMemberListImpl = ({ members, onSelect }) => {
|
|
46
|
+
const { t } = (0, react_ui_1.useTranslation)('os');
|
|
47
|
+
const visibleMembers = members.filter((member) => member.identity);
|
|
48
|
+
return visibleMembers.length > 0 ? (react_1.default.createElement(react_ui_1.List, { classNames: 'flex flex-col gap-2' }, visibleMembers.map((member) => {
|
|
49
|
+
return (react_1.default.createElement(IdentityListItem_1.IdentityListItem, { key: member.identity.identityKey.toHex(), identity: member.identity, presence: member.presence, onClick: onSelect && (() => onSelect(member)) }));
|
|
50
|
+
}))) : (react_1.default.createElement("div", { role: 'none', className: 'grow flex items-center p-2' },
|
|
51
|
+
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'))));
|
|
52
|
+
};
|
|
53
|
+
exports.SpaceMemberListImpl = SpaceMemberListImpl;
|
|
54
|
+
//# sourceMappingURL=SpaceMemberList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpaceMemberList.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,+CAAuC;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,8BAAC,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,8BAAC,eAAI,IAAC,UAAU,EAAC,qBAAqB,IACnC,cAAc,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,OAAO,CACL,8BAAC,mCAAgB,IACf,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,EACxC,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,GAC7C,CACH,CAAC;IACJ,CAAC,CAAC,CACG,CACR,CAAC,CAAC,CAAC,CACF,uCAAK,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,4BAA4B;QACrD,qCAAG,SAAS,EAAE,IAAA,mBAAE,EAAC,gCAAe,EAAE,2BAA2B,CAAC,IAAG,CAAC,CAAC,6BAA6B,CAAC,CAAK,CAClG,CACP,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,mBAAmB,uBAqB9B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import '@dxosTheme';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ members, onSelect }: import("./SpaceMemberList").SpaceMemberListImplProps) => JSX.Element;
|
|
5
|
+
actions: {
|
|
6
|
+
argTypesRegex: string;
|
|
7
|
+
};
|
|
8
|
+
decorators: import("@storybook/react").Decorator[];
|
|
9
|
+
parameters: {
|
|
10
|
+
chromatic: {
|
|
11
|
+
disableSnapshot: boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
export declare const Default: (props: any) => JSX.Element;
|
|
17
|
+
//# sourceMappingURL=SpaceMemberList.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpaceMemberList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;;;;;;;;;;;;;;AASpB,wBAME;AAEF,eAAO,MAAM,OAAO,UAAW,GAAG,gBAEjC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
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
|
+
require("@dxosTheme");
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const storybook_utils_1 = require("@dxos/storybook-utils");
|
|
13
|
+
const SpaceMemberList_1 = require("./SpaceMemberList");
|
|
14
|
+
const testing_1 = require("../../testing");
|
|
15
|
+
exports.default = {
|
|
16
|
+
title: 'react-shell/SpaceMemberList',
|
|
17
|
+
component: SpaceMemberList_1.SpaceMemberListImpl,
|
|
18
|
+
actions: { argTypesRegex: '^on.*' },
|
|
19
|
+
decorators: [storybook_utils_1.withTheme],
|
|
20
|
+
parameters: { chromatic: { disableSnapshot: false } },
|
|
21
|
+
};
|
|
22
|
+
const Default = (props) => {
|
|
23
|
+
return react_1.default.createElement(SpaceMemberList_1.SpaceMemberListImpl, { ...props, members: [testing_1.alice] });
|
|
24
|
+
};
|
|
25
|
+
exports.Default = Default;
|
|
26
|
+
//# sourceMappingURL=SpaceMemberList.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpaceMemberList.stories.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/SpaceMemberList.stories.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,sBAAoB;AAEpB,kDAA0B;AAE1B,2DAAkD;AAElD,uDAAwD;AACxD,2CAAsC;AAEtC,kBAAe;IACb,KAAK,EAAE,6BAA6B;IACpC,SAAS,EAAE,qCAAmB;IAC9B,OAAO,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE;IACnC,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,8BAAC,qCAAmB,OAAK,KAAK,EAAE,OAAO,EAAE,CAAC,eAAK,CAAC,GAAI,CAAC;AAC9D,CAAC,CAAC;AAFW,QAAA,OAAO,WAElB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./DeviceList"), exports);
|
|
21
|
+
__exportStar(require("./IdentityListItem"), exports);
|
|
22
|
+
__exportStar(require("./SpaceMemberList"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,+CAA6B;AAC7B,qDAAmC;AACnC,oDAAkC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CancellableInvitationObservable } from '@dxos/react-client/invitations';
|
|
3
|
+
import { type InvitationListItemProps } from './InvitationListItem';
|
|
4
|
+
import { type SharedInvitationListProps } from './InvitationListProps';
|
|
5
|
+
export interface InvitationListProps extends Omit<InvitationListItemProps, 'invitation' | 'value'>, Pick<SharedInvitationListProps, 'send'> {
|
|
6
|
+
invitations: CancellableInvitationObservable[];
|
|
7
|
+
InvitationListItem?: React.ComponentType<InvitationListItemProps>;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const InvitationList: ({ invitations, send, ...invitationProps }: InvitationListProps) => JSX.Element;
|
|
11
|
+
//# sourceMappingURL=InvitationList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitationList.d.ts","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationList.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,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,KAAK,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,8CAA+C,mBAAmB,gBAU5F,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.InvitationList = void 0;
|
|
7
|
+
//
|
|
8
|
+
// Copyright 2023 DXOS.org
|
|
9
|
+
//
|
|
10
|
+
const react_1 = __importDefault(require("react"));
|
|
11
|
+
const react_ui_1 = require("@dxos/react-ui");
|
|
12
|
+
const react_ui_theme_1 = require("@dxos/react-ui-theme");
|
|
13
|
+
const InvitationListItem_1 = require("./InvitationListItem");
|
|
14
|
+
const InvitationList = ({ invitations, send, ...invitationProps }) => {
|
|
15
|
+
const { className, InvitationListItem: Item = InvitationListItem_1.InvitationListItem } = invitationProps;
|
|
16
|
+
return (react_1.default.createElement(react_ui_1.List, { classNames: (0, react_ui_theme_1.mx)('flex flex-col gap-2', className) }, invitations.map((invitation) => {
|
|
17
|
+
const value = invitation.get().invitationId;
|
|
18
|
+
return react_1.default.createElement(Item, { key: value, send: send, invitation: invitation, ...invitationProps });
|
|
19
|
+
})));
|
|
20
|
+
};
|
|
21
|
+
exports.InvitationList = InvitationList;
|
|
22
|
+
//# sourceMappingURL=InvitationList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitationList.js","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationList.tsx"],"names":[],"mappings":";;;;;;AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AACF,kDAA0B;AAG1B,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,8BAAC,eAAI,IAAC,UAAU,EAAE,IAAA,mBAAE,EAAC,qBAAqB,EAAE,SAAS,CAAC,IACnD,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;QAC9B,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC;QAC5C,OAAO,8BAAC,IAAI,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,KAAM,eAAe,GAAI,CAAC;IACvF,CAAC,CAAC,CACG,CACR,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,cAAc,kBAUzB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import '@dxosTheme';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ invitations, send, ...invitationProps }: import("./InvitationList").InvitationListProps) => JSX.Element;
|
|
5
|
+
decorators: import("@storybook/react").Decorator[];
|
|
6
|
+
actions: {
|
|
7
|
+
argTypesRegex: string;
|
|
8
|
+
};
|
|
9
|
+
parameters: {
|
|
10
|
+
chromatic: {
|
|
11
|
+
disableSnapshot: boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
export declare const Default: () => JSX.Element;
|
|
17
|
+
//# sourceMappingURL=InvitationList.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitationList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;;;;;;;;;;;;;;AAWpB,wBAME;AAEF,eAAO,MAAM,OAAO,mBAoBnB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
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
|
+
require("@dxosTheme");
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const invitations_1 = require("@dxos/react-client/invitations");
|
|
13
|
+
const react_ui_1 = require("@dxos/react-ui");
|
|
14
|
+
const storybook_utils_1 = require("@dxos/storybook-utils");
|
|
15
|
+
const InvitationList_1 = require("./InvitationList");
|
|
16
|
+
const testing_1 = require("../../testing");
|
|
17
|
+
exports.default = {
|
|
18
|
+
title: 'react-shell/InvitationList',
|
|
19
|
+
component: InvitationList_1.InvitationList,
|
|
20
|
+
decorators: [storybook_utils_1.withTheme],
|
|
21
|
+
actions: { argTypesRegex: '^on.*' },
|
|
22
|
+
parameters: { chromatic: { disableSnapshot: false } },
|
|
23
|
+
};
|
|
24
|
+
const Default = () => {
|
|
25
|
+
return (react_1.default.createElement(react_ui_1.Tooltip.Provider, null,
|
|
26
|
+
react_1.default.createElement(InvitationList_1.InvitationList, { invitations: [
|
|
27
|
+
(0, testing_1.inviteWithState)(invitations_1.Invitation.State.INIT),
|
|
28
|
+
(0, testing_1.inviteWithState)(invitations_1.Invitation.State.CONNECTING),
|
|
29
|
+
(0, testing_1.inviteWithState)(invitations_1.Invitation.State.CONNECTED),
|
|
30
|
+
(0, testing_1.inviteWithState)(invitations_1.Invitation.State.READY_FOR_AUTHENTICATION),
|
|
31
|
+
(0, testing_1.inviteWithState)(invitations_1.Invitation.State.AUTHENTICATING),
|
|
32
|
+
(0, testing_1.inviteWithState)(invitations_1.Invitation.State.SUCCESS),
|
|
33
|
+
(0, testing_1.inviteWithState)(invitations_1.Invitation.State.TIMEOUT),
|
|
34
|
+
(0, testing_1.inviteWithState)(invitations_1.Invitation.State.ERROR),
|
|
35
|
+
(0, testing_1.inviteWithState)(invitations_1.Invitation.State.CANCELLED),
|
|
36
|
+
], send: () => { }, createInvitationUrl: (invite) => invite })));
|
|
37
|
+
};
|
|
38
|
+
exports.Default = Default;
|
|
39
|
+
//# sourceMappingURL=InvitationList.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitationList.stories.js","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationList.stories.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,sBAAoB;AAEpB,kDAA0B;AAE1B,gEAA4D;AAC5D,6CAAyC;AACzC,2DAAkD;AAElD,qDAAkD;AAClD,2CAAgD;AAEhD,kBAAe;IACb,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,+BAAc;IACzB,UAAU,EAAE,CAAC,2BAAS,CAAC;IACvB,OAAO,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE;IACnC,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE;CACtD,CAAC;AAEK,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,OAAO,CACL,8BAAC,kBAAO,CAAC,QAAQ;QACf,8BAAC,+BAAc,IACb,WAAW,EAAE;gBACX,IAAA,yBAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,IAAI,CAAC;gBACtC,IAAA,yBAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,UAAU,CAAC;gBAC5C,IAAA,yBAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,SAAS,CAAC;gBAC3C,IAAA,yBAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,wBAAwB,CAAC;gBAC1D,IAAA,yBAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,cAAc,CAAC;gBAChD,IAAA,yBAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,OAAO,CAAC;gBACzC,IAAA,yBAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,OAAO,CAAC;gBACzC,IAAA,yBAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,KAAK,CAAC;gBACvC,IAAA,yBAAe,EAAC,wBAAU,CAAC,KAAK,CAAC,SAAS,CAAC;aAC5C,EACD,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC,EACd,mBAAmB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,GACvC,CACe,CACpB,CAAC;AACJ,CAAC,CAAC;AApBW,QAAA,OAAO,WAoBlB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PublicKey } from '@dxos/react-client';
|
|
2
|
+
import { type SharedInvitationListProps } from './InvitationListProps';
|
|
3
|
+
export interface InvitationListContainerProps extends SharedInvitationListProps {
|
|
4
|
+
spaceKey: PublicKey;
|
|
5
|
+
}
|
|
6
|
+
export declare const InvitationListContainer: ({ spaceKey, createInvitationUrl, send }: InvitationListContainerProps) => JSX.Element;
|
|
7
|
+
//# sourceMappingURL=InvitationListContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,gBAU5G,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.InvitationListContainer = void 0;
|
|
27
|
+
//
|
|
28
|
+
// Copyright 2023 DXOS.org
|
|
29
|
+
//
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
|
+
const echo_1 = require("@dxos/react-client/echo");
|
|
32
|
+
const InvitationList_1 = require("./InvitationList");
|
|
33
|
+
const InvitationListContainer = ({ spaceKey, createInvitationUrl, send }) => {
|
|
34
|
+
const space = (0, echo_1.useSpace)(spaceKey);
|
|
35
|
+
const invitations = (0, echo_1.useSpaceInvitations)(spaceKey);
|
|
36
|
+
const onClickRemove = (0, react_1.useCallback)((invitation) => {
|
|
37
|
+
void invitation.cancel();
|
|
38
|
+
}, [space]);
|
|
39
|
+
return react_1.default.createElement(InvitationList_1.InvitationList, { invitations: invitations, onClickRemove, createInvitationUrl, send });
|
|
40
|
+
};
|
|
41
|
+
exports.InvitationListContainer = InvitationListContainer;
|
|
42
|
+
//# sourceMappingURL=InvitationListContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitationListContainer.js","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationListContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AACF,+CAA2C;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,aAAa,GAAG,IAAA,mBAAW,EAC/B,CAAC,UAA2C,EAAE,EAAE;QAC9C,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC,EACD,CAAC,KAAK,CAAC,CACR,CAAC;IACF,OAAO,8BAAC,+BAAc,IAAC,WAAW,EAAE,WAAW,EAAQ,aAAa,EAAE,mBAAmB,EAAE,IAAI,GAAM,CAAC;AACxG,CAAC,CAAC;AAVW,QAAA,uBAAuB,2BAUlC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type CancellableInvitationObservable, type InvitationStatus } from '@dxos/react-client/invitations';
|
|
2
|
+
import { type SharedInvitationListProps } from './InvitationListProps';
|
|
3
|
+
export interface InvitationListItemProps extends SharedInvitationListProps {
|
|
4
|
+
invitation: CancellableInvitationObservable;
|
|
5
|
+
onClickRemove?: (invitation: CancellableInvitationObservable) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface InvitationListItemImplProps extends InvitationListItemProps {
|
|
8
|
+
invitationStatus: InvitationStatus;
|
|
9
|
+
}
|
|
10
|
+
export declare const InvitationListItem: (props: InvitationListItemProps) => JSX.Element;
|
|
11
|
+
export declare const InvitationListItemImpl: ({ invitation, invitationStatus: propsInvitationStatus, send, onClickRemove, createInvitationUrl, }: InvitationListItemImplProps) => JSX.Element;
|
|
12
|
+
//# sourceMappingURL=InvitationListItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitationListItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/InvitationList/InvitationListItem.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,+BAA+B,EAEpC,KAAK,gBAAgB,EAEtB,MAAM,gCAAgC,CAAC;AAYxC,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAKvE,MAAM,WAAW,uBAAwB,SAAQ,yBAAyB;IACxE,UAAU,EAAE,+BAA+B,CAAC;IAC5C,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,+BAA+B,KAAK,IAAI,CAAC;CACvE;AAED,MAAM,WAAW,2BAA4B,SAAQ,uBAAuB;IAC1E,gBAAgB,EAAE,gBAAgB,CAAC;CACpC;AAED,eAAO,MAAM,kBAAkB,UAAW,uBAAuB,gBAIhE,CAAC;AAgCF,eAAO,MAAM,sBAAsB,uGAMhC,2BAA2B,gBAuG7B,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.InvitationListItemImpl = exports.InvitationListItem = void 0;
|
|
27
|
+
//
|
|
28
|
+
// Copyright 2023 DXOS.org
|
|
29
|
+
//
|
|
30
|
+
const react_1 = require("@phosphor-icons/react");
|
|
31
|
+
const react_2 = __importStar(require("react"));
|
|
32
|
+
const invitations_1 = require("@dxos/react-client/invitations");
|
|
33
|
+
const react_ui_1 = require("@dxos/react-ui");
|
|
34
|
+
const react_ui_theme_1 = require("@dxos/react-ui-theme");
|
|
35
|
+
const util_1 = require("../../util");
|
|
36
|
+
const AuthCode_1 = require("../AuthCode");
|
|
37
|
+
const Clipboard_1 = require("../Clipboard");
|
|
38
|
+
const InvitationListItem = (props) => {
|
|
39
|
+
const { invitation } = props;
|
|
40
|
+
const invitationStatus = (0, invitations_1.useInvitationStatus)(invitation);
|
|
41
|
+
return react_2.default.createElement(exports.InvitationListItemImpl, { ...props, invitationStatus: invitationStatus });
|
|
42
|
+
};
|
|
43
|
+
exports.InvitationListItem = InvitationListItem;
|
|
44
|
+
const avatarProps = { size: 10, variant: 'circle' };
|
|
45
|
+
const AvatarStackEffect = ({ animation, status }) => {
|
|
46
|
+
const { tx } = (0, react_ui_1.useThemeContext)();
|
|
47
|
+
return (react_2.default.createElement(react_2.default.Fragment, null,
|
|
48
|
+
react_2.default.createElement("span", { role: 'none', className: (0, react_ui_theme_1.mx)('absolute inline-start-1 inline-end-auto opacity-20', (0, react_ui_theme_1.getSize)(avatarProps.size)) },
|
|
49
|
+
react_2.default.createElement("span", { role: 'none', className: tx('avatar.ring', 'avatar__ring', { ...avatarProps, status, animation }), style: { animationDelay: '400ms' } })),
|
|
50
|
+
react_2.default.createElement("span", { role: 'none', className: (0, react_ui_theme_1.mx)('absolute inline-start-2 inline-end-auto opacity-50', (0, react_ui_theme_1.getSize)(avatarProps.size)) },
|
|
51
|
+
react_2.default.createElement("span", { role: 'none', className: tx('avatar.ring', 'avatar__ring', { ...avatarProps, status, animation }), style: { animationDelay: '200ms' } }))));
|
|
52
|
+
};
|
|
53
|
+
const InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationStatus, send, onClickRemove, createInvitationUrl, }) => {
|
|
54
|
+
const { t } = (0, react_ui_1.useTranslation)('os');
|
|
55
|
+
const { cancel, status: invitationStatus, invitationCode, authCode, type } = propsInvitationStatus;
|
|
56
|
+
const isCancellable = !([invitations_1.Invitation.State.ERROR, invitations_1.Invitation.State.TIMEOUT, invitations_1.Invitation.State.CANCELLED].indexOf(invitationStatus) >= 0);
|
|
57
|
+
const showShare = type === invitations_1.Invitation.Type.MULTIUSE ||
|
|
58
|
+
[invitations_1.Invitation.State.INIT, invitations_1.Invitation.State.CONNECTING, invitations_1.Invitation.State.CONNECTED].indexOf(invitationStatus) >= 0;
|
|
59
|
+
const showAuthCode = invitationStatus === invitations_1.Invitation.State.READY_FOR_AUTHENTICATION;
|
|
60
|
+
const handleClickRemove = (0, react_2.useCallback)(() => onClickRemove === null || onClickRemove === void 0 ? void 0 : onClickRemove(invitation), [invitation, onClickRemove]);
|
|
61
|
+
const invitationUrl = invitationCode && createInvitationUrl(invitationCode);
|
|
62
|
+
const invitationId = invitation === null || invitation === void 0 ? void 0 : invitation.get().invitationId;
|
|
63
|
+
const avatarAnimation = [
|
|
64
|
+
invitations_1.Invitation.State.INIT,
|
|
65
|
+
invitations_1.Invitation.State.CONNECTING,
|
|
66
|
+
invitations_1.Invitation.State.CONNECTED,
|
|
67
|
+
invitations_1.Invitation.State.READY_FOR_AUTHENTICATION,
|
|
68
|
+
invitations_1.Invitation.State.AUTHENTICATING,
|
|
69
|
+
].includes(invitationStatus)
|
|
70
|
+
? 'pulse'
|
|
71
|
+
: 'none';
|
|
72
|
+
const avatarError = [invitations_1.Invitation.State.ERROR, invitations_1.Invitation.State.TIMEOUT, invitations_1.Invitation.State.CANCELLED].includes(invitationStatus);
|
|
73
|
+
const avatarGreen = [
|
|
74
|
+
invitations_1.Invitation.State.CONNECTED,
|
|
75
|
+
invitations_1.Invitation.State.READY_FOR_AUTHENTICATION,
|
|
76
|
+
invitations_1.Invitation.State.AUTHENTICATING,
|
|
77
|
+
invitations_1.Invitation.State.SUCCESS,
|
|
78
|
+
].includes(invitationStatus);
|
|
79
|
+
const avatarStatus = avatarError ? 'error' : avatarGreen ? 'active' : 'inactive';
|
|
80
|
+
return (react_2.default.createElement(react_ui_1.ListItem.Root, { id: invitationCode, classNames: 'flex gap-2 pis-3 pie-1 items-center relative' },
|
|
81
|
+
react_2.default.createElement(react_ui_1.ListItem.Heading, { classNames: 'sr-only' }, t(type === invitations_1.Invitation.Type.MULTIUSE ? 'invite many list item label' : 'invite one list item label')),
|
|
82
|
+
type === invitations_1.Invitation.Type.MULTIUSE && react_2.default.createElement(AvatarStackEffect, { status: avatarStatus, animation: avatarAnimation }),
|
|
83
|
+
react_2.default.createElement(react_ui_1.Tooltip.Root, null,
|
|
84
|
+
react_2.default.createElement(react_ui_1.Avatar.Root, { ...avatarProps, animation: avatarAnimation, status: avatarStatus },
|
|
85
|
+
react_2.default.createElement(react_ui_1.Tooltip.Trigger, { asChild: true },
|
|
86
|
+
react_2.default.createElement(react_ui_1.Avatar.Frame, { tabIndex: 0, classNames: [react_ui_theme_1.focusRing, 'relative rounded-full'] },
|
|
87
|
+
react_2.default.createElement(react_ui_1.Avatar.Fallback, { text: (0, util_1.toEmoji)(invitationId) })))),
|
|
88
|
+
react_2.default.createElement(react_ui_1.Tooltip.Portal, null,
|
|
89
|
+
react_2.default.createElement(react_ui_1.Tooltip.Content, { side: 'left', classNames: 'z-[70]' },
|
|
90
|
+
t(type === invitations_1.Invitation.Type.MULTIUSE ? 'invite many qr label' : 'invite one qr label'),
|
|
91
|
+
react_2.default.createElement(react_ui_1.Tooltip.Arrow, null)))),
|
|
92
|
+
showShare && invitationUrl ? (react_2.default.createElement(react_2.default.Fragment, null,
|
|
93
|
+
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' },
|
|
94
|
+
react_2.default.createElement("span", null, t('open share panel label'))),
|
|
95
|
+
react_2.default.createElement(Clipboard_1.CopyButtonIconOnly, { variant: 'ghost', value: invitationUrl }))) : 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")) : (react_2.default.createElement("span", { className: 'grow' }, " ")),
|
|
96
|
+
isCancellable ? (react_2.default.createElement(react_ui_1.Button, { variant: 'ghost', classNames: 'flex gap-1', onClick: cancel, "data-testid": 'cancel-invitation' },
|
|
97
|
+
react_2.default.createElement("span", { className: 'sr-only' }, t('cancel invitation label')),
|
|
98
|
+
react_2.default.createElement(react_1.X, { className: (0, react_ui_theme_1.getSize)(5), weight: 'bold' }))) : (react_2.default.createElement(react_ui_1.Button, { variant: 'ghost', classNames: 'flex gap-1', onClick: handleClickRemove, "data-testid": 'remove-invitation' },
|
|
99
|
+
react_2.default.createElement("span", { className: 'sr-only' }, t('remove invitation label')),
|
|
100
|
+
react_2.default.createElement(react_1.X, { className: (0, react_ui_theme_1.getSize)(5), weight: 'bold' })))));
|
|
101
|
+
};
|
|
102
|
+
exports.InvitationListItemImpl = InvitationListItemImpl;
|
|
103
|
+
//# sourceMappingURL=InvitationListItem.js.map
|