@dxos/shell 0.7.5-main.9d2a38b → 0.7.5-main.c41020f
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} +20830 -21849
- 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 +556 -804
- package/dist/lib/browser/react.mjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react.cjs +656 -904
- package/dist/lib/node/react.cjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react.mjs +556 -804
- package/dist/lib/node-esm/react.mjs.map +4 -4
- 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 +20 -50
- 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 +6 -44
- 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 +9 -24
- package/dist/types/src/components/CompoundButton/CompoundButton.js.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts +8 -9
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js +17 -25
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js.map +1 -1
- package/dist/types/src/components/CompoundButton/index.js +1 -17
- package/dist/types/src/components/CompoundButton/index.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 +10 -24
- package/dist/types/src/components/DeviceList/DeviceList.js.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceListItem.d.ts +1 -1
- package/dist/types/src/components/DeviceList/DeviceListItem.js +18 -73
- package/dist/types/src/components/DeviceList/DeviceListItem.js.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceListProps.js +0 -2
- package/dist/types/src/components/DeviceList/DeviceListProps.js.map +1 -1
- package/dist/types/src/components/DeviceList/index.js +2 -18
- package/dist/types/src/components/DeviceList/index.js.map +1 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts +1 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.js +12 -51
- 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 +17 -55
- package/dist/types/src/components/IdentityList/SpaceMemberList.js.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts +3 -4
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js +10 -17
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js.map +1 -1
- package/dist/types/src/components/IdentityList/index.js +2 -18
- package/dist/types/src/components/IdentityList/index.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 +10 -20
- package/dist/types/src/components/InvitationList/InvitationList.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts +3 -4
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.stories.js +20 -27
- 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 +9 -45
- 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 +32 -99
- package/dist/types/src/components/InvitationList/InvitationListItem.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListProps.js +0 -2
- package/dist/types/src/components/InvitationList/index.js +3 -19
- package/dist/types/src/components/InvitationList/index.js.map +1 -1
- package/dist/types/src/components/Panel/Action.js +15 -68
- package/dist/types/src/components/Panel/Action.js.map +1 -1
- package/dist/types/src/components/Panel/Actions.js +6 -41
- 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 +7 -16
- 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 +6 -19
- package/dist/types/src/components/Panel/Emoji.js.map +1 -1
- package/dist/types/src/components/Panel/Heading.js +5 -44
- 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 +4 -17
- 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 +4 -14
- package/dist/types/src/components/Panel/Label.js.map +1 -1
- package/dist/types/src/components/Panel/Panel.stories.d.ts +4 -5
- package/dist/types/src/components/Panel/Panel.stories.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Panel.stories.js +15 -35
- package/dist/types/src/components/Panel/Panel.stories.js.map +1 -1
- package/dist/types/src/components/Panel/StepHeading.js +5 -40
- package/dist/types/src/components/Panel/StepHeading.js.map +1 -1
- package/dist/types/src/components/Panel/index.js +8 -24
- package/dist/types/src/components/Panel/index.js.map +1 -1
- package/dist/types/src/components/SpaceListItem.js +10 -49
- 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 +5 -18
- 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 +18 -55
- package/dist/types/src/components/Viewport/Viewport.js.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts +2 -3
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.stories.js +12 -37
- package/dist/types/src/components/Viewport/Viewport.stories.js.map +1 -1
- package/dist/types/src/components/Viewport/index.js +1 -17
- package/dist/types/src/components/Viewport/index.js.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/index.js +9 -27
- package/dist/types/src/components/index.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 +7 -22
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js.map +1 -1
- package/dist/types/src/composites/IdentityDialog/index.js +1 -17
- package/dist/types/src/composites/IdentityDialog/index.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 +9 -23
- package/dist/types/src/composites/JoinDialog/JoinDialog.js.map +1 -1
- package/dist/types/src/composites/JoinDialog/index.js +1 -17
- package/dist/types/src/composites/JoinDialog/index.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 +54 -90
- 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 +32 -72
- package/dist/types/src/composites/Shell/ShellContext.js.map +1 -1
- package/dist/types/src/composites/Shell/index.js +3 -19
- package/dist/types/src/composites/Shell/index.js.map +1 -1
- package/dist/types/src/composites/Shell/memory-shell-runtime.js +7 -11
- package/dist/types/src/composites/Shell/memory-shell-runtime.js.map +1 -1
- package/dist/types/src/composites/Shell/run-shell.js +18 -67
- package/dist/types/src/composites/Shell/run-shell.js.map +1 -1
- package/dist/types/src/composites/Shell/shell-runtime.js +13 -17
- package/dist/types/src/composites/Shell/shell-runtime.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 +7 -22
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js.map +1 -1
- package/dist/types/src/composites/SpaceDialog/index.js +1 -17
- package/dist/types/src/composites/SpaceDialog/index.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 +6 -20
- package/dist/types/src/composites/StatusDialog/StatusDialog.js.map +1 -1
- package/dist/types/src/composites/StatusDialog/index.js +1 -17
- package/dist/types/src/composites/StatusDialog/index.js.map +1 -1
- package/dist/types/src/composites/index.js +4 -20
- package/dist/types/src/composites/index.js.map +1 -1
- package/dist/types/src/index.js +2 -6
- package/dist/types/src/index.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 +63 -137
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts +11 -12
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js +39 -54
- 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/IdentityPanelProps.js +0 -2
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/identityMachine.js +10 -14
- package/dist/types/src/panels/IdentityPanel/identityMachine.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/index.js +2 -18
- package/dist/types/src/panels/IdentityPanel/index.js.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 +16 -29
- 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 +27 -72
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/index.js +2 -18
- package/dist/types/src/panels/IdentityPanel/steps/index.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js +7 -11
- package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.js +19 -23
- package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/useKubeAgentHandlers.js +19 -23
- package/dist/types/src/panels/IdentityPanel/useKubeAgentHandlers.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinHeading.js +11 -48
- 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 +38 -100
- package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +15 -16
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js +25 -45
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.js +0 -2
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/index.js +2 -18
- package/dist/types/src/panels/JoinPanel/index.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/joinMachine.js +49 -54
- package/dist/types/src/panels/JoinPanel/joinMachine.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 +9 -21
- 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 +14 -58
- 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 +20 -61
- 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 +8 -47
- 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 +22 -73
- 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 +18 -59
- 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 +14 -37
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/index.js +7 -23
- package/dist/types/src/panels/JoinPanel/steps/index.js.map +1 -1
- package/dist/types/src/panels/Panels.stories.d.ts +4 -4
- package/dist/types/src/panels/Panels.stories.d.ts.map +1 -1
- package/dist/types/src/panels/Panels.stories.js +13 -58
- 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 +25 -72
- package/dist/types/src/panels/SpacePanel/SpacePanel.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts +18 -19
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js +96 -121
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.js +0 -2
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/index.js +2 -18
- package/dist/types/src/panels/SpacePanel/index.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/spaceMachine.js +9 -13
- package/dist/types/src/panels/SpacePanel/spaceMachine.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 +33 -81
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/steps/index.js +1 -17
- package/dist/types/src/panels/SpacePanel/steps/index.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 +5 -17
- package/dist/types/src/panels/StatusPanel/StatusPanel.js.map +1 -1
- package/dist/types/src/panels/StatusPanel/index.js +1 -17
- package/dist/types/src/panels/StatusPanel/index.js.map +1 -1
- package/dist/types/src/panels/index.js +4 -20
- package/dist/types/src/panels/index.js.map +1 -1
- package/dist/types/src/playwright/invitations-manager.js +11 -15
- package/dist/types/src/playwright/invitations-manager.js.map +1 -1
- package/dist/types/src/playwright/invitations.spec.js +64 -66
- package/dist/types/src/playwright/invitations.spec.js.map +1 -1
- package/dist/types/src/react.js +6 -22
- package/dist/types/src/react.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 +23 -70
- 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 +17 -71
- package/dist/types/src/steps/InvitationManager.js.map +1 -1
- package/dist/types/src/steps/StepProps.js +0 -2
- package/dist/types/src/steps/StepProps.js.map +1 -1
- package/dist/types/src/steps/index.js +3 -19
- package/dist/types/src/steps/index.js.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts +2 -3
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.js +50 -113
- package/dist/types/src/stories/Invitations.e2e-stories.js.map +1 -1
- package/dist/types/src/styles/index.js +2 -18
- package/dist/types/src/styles/index.js.map +1 -1
- package/dist/types/src/styles/invitationStatusStyles.js +31 -37
- package/dist/types/src/styles/invitationStatusStyles.js.map +1 -1
- package/dist/types/src/styles/panelStyles.js +1 -4
- package/dist/types/src/styles/panelStyles.js.map +1 -1
- package/dist/types/src/testing/fixtures/identities.d.ts.map +1 -1
- package/dist/types/src/testing/fixtures/identities.js +8 -9
- package/dist/types/src/testing/fixtures/identities.js.map +1 -1
- package/dist/types/src/testing/fixtures/index.js +2 -18
- package/dist/types/src/testing/fixtures/index.js.map +1 -1
- package/dist/types/src/testing/fixtures/invitations.js +8 -12
- package/dist/types/src/testing/fixtures/invitations.js.map +1 -1
- package/dist/types/src/testing/index.js +2 -18
- package/dist/types/src/testing/index.js.map +1 -1
- package/dist/types/src/testing/scoped-shell-manager.js +1 -5
- package/dist/types/src/testing/scoped-shell-manager.js.map +1 -1
- package/dist/types/src/testing/shell-manager.js +11 -15
- package/dist/types/src/testing/shell-manager.js.map +1 -1
- package/dist/types/src/translations/index.js +2 -38
- package/dist/types/src/translations/index.js.map +1 -1
- package/dist/types/src/translations/locales/en-US.d.ts +5 -1
- package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
- package/dist/types/src/translations/locales/en-US.js +9 -7
- package/dist/types/src/translations/locales/en-US.js.map +1 -1
- package/dist/types/src/types/FailReason.js +0 -2
- package/dist/types/src/types/FailReason.js.map +1 -1
- package/dist/types/src/types/IInvitation.js +0 -2
- package/dist/types/src/types/IInvitation.js.map +1 -1
- package/dist/types/src/types/index.js +2 -18
- package/dist/types/src/types/index.js.map +1 -1
- package/dist/types/src/util/index.js +1 -17
- package/dist/types/src/util/index.js.map +1 -1
- package/dist/types/src/util/invitationStatusValue.js +11 -14
- package/dist/types/src/util/invitationStatusValue.js.map +1 -1
- package/package.json +36 -31
- package/src/components/AgentConfig.tsx +1 -1
- package/src/components/DeviceList/DeviceList.tsx +1 -1
- package/src/components/index.ts +0 -2
- package/src/panels/IdentityPanel/IdentityPanel.stories.tsx +3 -0
- package/src/panels/IdentityPanel/IdentityPanel.tsx +50 -33
- package/src/panels/IdentityPanel/IdentityPanelProps.ts +8 -1
- package/src/panels/IdentityPanel/steps/ProfileForm.tsx +3 -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 +10 -3
- package/dist/bundle/shell.mjs.map +0 -1
- package/dist/bundle/shell.umd.js +0 -1043
- package/dist/bundle/shell.umd.js.map +0 -1
- package/dist/lib/browser/react.css +0 -7
- package/dist/lib/browser/react.css.map +0 -7
- package/dist/lib/node/react.css +0 -7
- package/dist/lib/node/react.css.map +0 -7
- package/dist/lib/node-esm/react.css +0 -7
- package/dist/lib/node-esm/react.css.map +0 -7
- package/dist/types/src/components/EmojiPicker.d.ts +0 -19
- package/dist/types/src/components/EmojiPicker.d.ts.map +0 -1
- package/dist/types/src/components/EmojiPicker.js +0 -146
- package/dist/types/src/components/EmojiPicker.js.map +0 -1
- package/dist/types/src/components/HuePicker.d.ts +0 -18
- package/dist/types/src/components/HuePicker.d.ts.map +0 -1
- package/dist/types/src/components/HuePicker.js +0 -133
- package/dist/types/src/components/HuePicker.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/components/EmojiPicker.tsx +0 -187
- package/src/components/HuePicker.tsx +0 -182
- package/src/components/emoji.css +0 -25
- /package/src/playwright/{playwright.config.ts → playwright.config.cts} +0 -0
|
@@ -1,67 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
//
|
|
3
3
|
// Copyright 2023 DXOS.org
|
|
4
4
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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.IdentityAdded = void 0;
|
|
40
|
-
const react_1 = __importStar(require("react"));
|
|
41
|
-
const display_name_1 = require("@dxos/display-name");
|
|
42
|
-
const react_ui_1 = require("@dxos/react-ui");
|
|
43
|
-
const react_ui_theme_1 = require("@dxos/react-ui-theme");
|
|
44
|
-
const util_1 = require("@dxos/util");
|
|
45
|
-
const components_1 = require("../../../components");
|
|
46
|
-
const IdentityAdded = (props) => {
|
|
5
|
+
import { cloneElement } from 'react';
|
|
6
|
+
import { generateName } from '@dxos/display-name';
|
|
7
|
+
import { Avatar, useId, useTranslation } from '@dxos/react-ui';
|
|
8
|
+
import { mx } from '@dxos/react-ui-theme';
|
|
9
|
+
import { hexToFallback } from '@dxos/util';
|
|
10
|
+
import { Action, Actions, StepHeading } from '../../../components';
|
|
11
|
+
export const IdentityAdded = (props) => {
|
|
47
12
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
48
13
|
const { mode, addedIdentity, active, send, onDone, doneActionParent } = props;
|
|
49
14
|
const disabled = !active;
|
|
50
|
-
const { t } =
|
|
15
|
+
const { t } = useTranslation('os');
|
|
51
16
|
const addedIdentityHex = (_a = addedIdentity === null || addedIdentity === void 0 ? void 0 : addedIdentity.identityKey.toHex()) !== null && _a !== void 0 ? _a : '0';
|
|
52
|
-
const fallbackValue =
|
|
53
|
-
const labelId =
|
|
54
|
-
const displayName = (_c = (_b = addedIdentity === null || addedIdentity === void 0 ? void 0 : addedIdentity.profile) === null || _b === void 0 ? void 0 : _b.displayName) !== null && _c !== void 0 ? _c : (addedIdentity &&
|
|
55
|
-
const doneAction = (
|
|
56
|
-
|
|
57
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
58
|
-
react_1.default.createElement(components_1.StepHeading, null, t('identity added label')),
|
|
59
|
-
react_1.default.createElement("div", { role: 'none', className: 'grow flex flex-col items-center justify-center text-center gap-2' },
|
|
60
|
-
react_1.default.createElement(react_ui_1.Avatar.Root, { status: 'active', labelId: labelId, hue: ((_e = (_d = addedIdentity === null || addedIdentity === void 0 ? void 0 : addedIdentity.profile) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.hue) || fallbackValue.hue },
|
|
61
|
-
react_1.default.createElement(react_ui_1.Avatar.Frame, null,
|
|
62
|
-
react_1.default.createElement(react_ui_1.Avatar.Fallback, { text: ((_g = (_f = addedIdentity === null || addedIdentity === void 0 ? void 0 : addedIdentity.profile) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.emoji) || fallbackValue.emoji })),
|
|
63
|
-
react_1.default.createElement(react_ui_1.Avatar.Label, { classNames: (0, react_ui_theme_1.mx)('text-lg truncate', !((_h = addedIdentity === null || addedIdentity === void 0 ? void 0 : addedIdentity.profile) === null || _h === void 0 ? void 0 : _h.displayName) && 'font-mono') }, displayName))),
|
|
64
|
-
react_1.default.createElement(components_1.Actions, null, mode === 'halo-only' ? (doneActionParent ? ((0, react_1.cloneElement)(doneActionParent, {}, doneAction)) : (doneAction)) : (react_1.default.createElement(components_1.Action, { variant: 'primary', disabled: disabled || !addedIdentity, onClick: () => addedIdentity && send({ type: 'selectIdentity', identity: addedIdentity }), "data-autofocus": 'confirmingAddedIdentity' }, t('continue label'))))));
|
|
17
|
+
const fallbackValue = hexToFallback(addedIdentityHex);
|
|
18
|
+
const labelId = useId('identityListItem__label');
|
|
19
|
+
const displayName = (_c = (_b = addedIdentity === null || addedIdentity === void 0 ? void 0 : addedIdentity.profile) === null || _b === void 0 ? void 0 : _b.displayName) !== null && _c !== void 0 ? _c : (addedIdentity && generateName(addedIdentityHex));
|
|
20
|
+
const doneAction = (_jsx(Action, { ...(onDone && { onClick: () => onDone(null) }), disabled: disabled, "data-autofocus": 'confirmingAddedIdentity', "data-testid": 'identity-added-done', children: _jsx("span", { children: t('done label') }) }));
|
|
21
|
+
return (_jsxs(_Fragment, { children: [_jsx(StepHeading, { children: t('identity added label') }), _jsx("div", { role: 'none', className: 'grow flex flex-col items-center justify-center text-center gap-2', children: _jsxs(Avatar.Root, { status: 'active', labelId: labelId, hue: ((_e = (_d = addedIdentity === null || addedIdentity === void 0 ? void 0 : addedIdentity.profile) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.hue) || fallbackValue.hue, children: [_jsx(Avatar.Frame, { children: _jsx(Avatar.Fallback, { text: ((_g = (_f = addedIdentity === null || addedIdentity === void 0 ? void 0 : addedIdentity.profile) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.emoji) || fallbackValue.emoji }) }), _jsx(Avatar.Label, { classNames: mx('text-lg truncate', !((_h = addedIdentity === null || addedIdentity === void 0 ? void 0 : addedIdentity.profile) === null || _h === void 0 ? void 0 : _h.displayName) && 'font-mono'), children: displayName })] }) }), _jsx(Actions, { children: mode === 'halo-only' ? (doneActionParent ? (cloneElement(doneActionParent, {}, doneAction)) : (doneAction)) : (_jsx(Action, { variant: 'primary', disabled: disabled || !addedIdentity, onClick: () => addedIdentity && send({ type: 'selectIdentity', identity: addedIdentity }), "data-autofocus": 'confirmingAddedIdentity', children: t('continue label') })) })] }));
|
|
65
22
|
};
|
|
66
|
-
exports.IdentityAdded = IdentityAdded;
|
|
67
23
|
//# sourceMappingURL=IdentityAdded.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityAdded.js","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/IdentityAdded.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE
|
|
1
|
+
{"version":3,"file":"IdentityAdded.js","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/IdentityAdded.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAQnE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;;IACzD,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,KAAK,CAAC;IAC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CAAE,IAAI,0CAAE,KAAK,KAAI,aAAa,CAAC,KAAK,GAAI,GACxE,EACf,KAAC,MAAM,CAAC,KAAK,IAAC,UAAU,EAAE,EAAE,CAAC,kBAAkB,EAAE,CAAC,CAAA,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,0CAAE,WAAW,CAAA,IAAI,WAAW,CAAC,YAClG,WAAW,GACC,IACH,GACV,EACN,KAAC,OAAO,cACL,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,CACtB,gBAAgB,CAAC,CAAC,CAAC,CACjB,YAAY,CAAC,gBAAgB,EAAE,EAAE,EAAE,UAAU,CAAC,CAC/C,CAAC,CAAC,CAAC,CACF,UAAU,CACX,CACF,CAAC,CAAC,CAAC,CACF,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,QAAQ,EAAE,QAAQ,IAAI,CAAC,aAAa,EACpC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,oBAC1E,yBAAyB,YAEvC,CAAC,CAAC,gBAAgB,CAAC,GACb,CACV,GACO,IACT,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type MaybePromise } from '@dxos/util';
|
|
3
2
|
import { type JoinStepProps } from '../JoinPanelProps';
|
|
4
3
|
export interface IdentityCreatorProps extends JoinStepProps {
|
|
@@ -9,6 +8,6 @@ export type IdentityInputImplProps = IdentityCreatorProps & {
|
|
|
9
8
|
onConfirm?: (value: string) => MaybePromise<void>;
|
|
10
9
|
validationMessage?: string;
|
|
11
10
|
};
|
|
12
|
-
export declare const IdentityInput: (props: IdentityInputProps) =>
|
|
13
|
-
export declare const IdentityInputImpl: (props: IdentityInputImplProps) =>
|
|
11
|
+
export declare const IdentityInput: (props: IdentityInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const IdentityInputImpl: (props: IdentityInputImplProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
//# sourceMappingURL=IdentityInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/IdentityInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdentityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/IdentityInput.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,MAAM,EAAE,kBAAkB,GAAG,iBAAiB,CAAC;CAChD;AAED,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAEtD,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,GAAG;IAC1D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;IAClD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,kBAAkB,4CA8BtD,CAAC;AAGF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,4CAiD9D,CAAC"}
|
|
@@ -1,59 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
//
|
|
3
3
|
// Copyright 2023 DXOS.org
|
|
4
4
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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.IdentityInputImpl = exports.IdentityInput = void 0;
|
|
40
|
-
const react_1 = __importStar(require("react"));
|
|
41
|
-
const log_1 = require("@dxos/log");
|
|
42
|
-
const react_client_1 = require("@dxos/react-client");
|
|
43
|
-
const react_ui_1 = require("@dxos/react-ui");
|
|
44
|
-
const components_1 = require("../../../components");
|
|
45
|
-
const IdentityInput = (props) => {
|
|
5
|
+
import { useCallback, useState } from 'react';
|
|
6
|
+
import { log } from '@dxos/log';
|
|
7
|
+
import { useClient } from '@dxos/react-client';
|
|
8
|
+
import { useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { Action, Actions, StepHeading, Input } from '../../../components';
|
|
10
|
+
export const IdentityInput = (props) => {
|
|
46
11
|
const { send, method } = props;
|
|
47
12
|
const isRecover = method === 'recover identity';
|
|
48
|
-
const client =
|
|
49
|
-
const { t } =
|
|
50
|
-
const [validationMessage, setValidationMessage] =
|
|
13
|
+
const client = useClient();
|
|
14
|
+
const { t } = useTranslation('os');
|
|
15
|
+
const [validationMessage, setValidationMessage] = useState('');
|
|
51
16
|
const handleConfirm = async (value) => {
|
|
52
17
|
if (isRecover) {
|
|
53
|
-
await client.halo.recoverIdentity({
|
|
18
|
+
await client.halo.recoverIdentity({ recoveryCode: value }).then((identity) => {
|
|
54
19
|
send === null || send === void 0 ? void 0 : send({ type: 'selectIdentity', identity });
|
|
55
20
|
}, (error) => {
|
|
56
|
-
|
|
21
|
+
log.catch(error);
|
|
57
22
|
setValidationMessage(t('failed to recover identity message'));
|
|
58
23
|
});
|
|
59
24
|
}
|
|
@@ -61,32 +26,26 @@ const IdentityInput = (props) => {
|
|
|
61
26
|
await client.halo.createIdentity({ displayName: value }).then((identity) => {
|
|
62
27
|
send === null || send === void 0 ? void 0 : send({ type: 'selectIdentity', identity });
|
|
63
28
|
}, (error) => {
|
|
64
|
-
|
|
29
|
+
log.catch(error);
|
|
65
30
|
setValidationMessage(t('failed to create identity message'));
|
|
66
31
|
});
|
|
67
32
|
}
|
|
68
33
|
};
|
|
69
|
-
return
|
|
34
|
+
return _jsx(IdentityInputImpl, { ...props, onConfirm: handleConfirm, validationMessage: validationMessage });
|
|
70
35
|
};
|
|
71
|
-
exports.IdentityInput = IdentityInput;
|
|
72
36
|
// TODO(zhenyasav): impl shouldn't need send()
|
|
73
|
-
const IdentityInputImpl = (props) => {
|
|
37
|
+
export const IdentityInputImpl = (props) => {
|
|
74
38
|
const { method, active, onConfirm, validationMessage } = props;
|
|
75
|
-
const { t } =
|
|
76
|
-
const [inputValue, setInputValue] =
|
|
77
|
-
const [pending, setPending] =
|
|
39
|
+
const { t } = useTranslation('os');
|
|
40
|
+
const [inputValue, setInputValue] = useState('');
|
|
41
|
+
const [pending, setPending] = useState(false);
|
|
78
42
|
const disabled = !active || pending;
|
|
79
43
|
const isRecover = method === 'recover identity';
|
|
80
|
-
const handleConfirm =
|
|
44
|
+
const handleConfirm = useCallback(async () => {
|
|
81
45
|
setPending(true);
|
|
82
46
|
await (onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(inputValue));
|
|
83
47
|
setPending(false);
|
|
84
48
|
}, [onConfirm, inputValue]);
|
|
85
|
-
return (
|
|
86
|
-
react_1.default.createElement("div", { role: 'none', className: 'grow flex flex-col justify-center' },
|
|
87
|
-
react_1.default.createElement(components_1.Input, { validationMessage, label: react_1.default.createElement(components_1.StepHeading, null, t(isRecover ? 'recover identity input label' : 'new identity input label')), disabled: disabled, "data-testid": 'identity-input', placeholder: isRecover ? t('recovery code placeholder') : t('display name placeholder'), onChange: ({ target: { value } }) => setInputValue(value) })),
|
|
88
|
-
react_1.default.createElement(components_1.Actions, null,
|
|
89
|
-
react_1.default.createElement(components_1.Action, { variant: 'primary', disabled: disabled || inputValue.trim().length === 0, onClick: handleConfirm, "data-testid": `${method === 'recover identity' ? 'recover' : 'create'}-identity-input-continue` }, pending ? t('pending label') : t('continue label')))));
|
|
49
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { role: 'none', className: 'grow flex flex-col justify-center', children: _jsx(Input, { validationMessage, label: _jsx(StepHeading, { children: t(isRecover ? 'recover identity input label' : 'new identity input label') }), disabled: disabled, "data-testid": 'identity-input', placeholder: isRecover ? t('recovery code placeholder') : t('display name placeholder'), onChange: ({ target: { value } }) => setInputValue(value) }) }), _jsx(Actions, { children: _jsx(Action, { variant: 'primary', disabled: disabled || inputValue.trim().length === 0, onClick: handleConfirm, "data-testid": `${method === 'recover identity' ? 'recover' : 'create'}-identity-input-continue`, children: pending ? t('pending label') : t('continue label') }) })] }));
|
|
90
50
|
};
|
|
91
|
-
exports.IdentityInputImpl = IdentityInputImpl;
|
|
92
51
|
//# sourceMappingURL=IdentityInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityInput.js","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/IdentityInput.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE
|
|
1
|
+
{"version":3,"file":"IdentityInput.js","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/IdentityInput.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAc1E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IACzD,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC/B,MAAM,SAAS,GAAG,MAAM,KAAK,kBAAkB,CAAC;IAChD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC/D,MAAM,aAAa,GAAG,KAAK,EAAE,KAAa,EAAE,EAAE;QAC5C,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,CAC7D,CAAC,QAAQ,EAAE,EAAE;gBACX,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAG,EAAE,IAAI,EAAE,gBAAyB,EAAE,Q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,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { cloneElement } from 'react';
|
|
2
2
|
import { type JoinStepProps } from '../JoinPanelProps';
|
|
3
3
|
export interface InvitationAcceptedProps extends JoinStepProps {
|
|
4
4
|
Kind: 'Space' | 'Halo';
|
|
5
5
|
doneActionParent?: Parameters<typeof cloneElement>[0];
|
|
6
6
|
onDone?: () => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const InvitationAccepted: (props: InvitationAcceptedProps) =>
|
|
8
|
+
export declare const InvitationAccepted: (props: InvitationAcceptedProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=InvitationAccepted.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationAccepted.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/InvitationAccepted.tsx"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"InvitationAccepted.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/InvitationAccepted.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,UAAW,uBAAuB,4CAyBhE,CAAC"}
|
|
@@ -1,54 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
//
|
|
3
3
|
// Copyright 2023 DXOS.org
|
|
4
4
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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.InvitationAccepted = void 0;
|
|
40
|
-
const react_1 = __importStar(require("react"));
|
|
41
|
-
const react_ui_1 = require("@dxos/react-ui");
|
|
42
|
-
const components_1 = require("../../../components");
|
|
43
|
-
const InvitationAccepted = (props) => {
|
|
5
|
+
import { cloneElement } from 'react';
|
|
6
|
+
import { useTranslation } from '@dxos/react-ui';
|
|
7
|
+
import { Actions, Action } from '../../../components';
|
|
8
|
+
export const InvitationAccepted = (props) => {
|
|
44
9
|
const { active, Kind, doneActionParent, onDone } = props;
|
|
45
10
|
const disabled = !active;
|
|
46
|
-
const { t } =
|
|
47
|
-
const doneAction = (
|
|
48
|
-
return (
|
|
49
|
-
react_1.default.createElement("div", { role: 'none', className: 'grow flex flex-col justify-center' },
|
|
50
|
-
react_1.default.createElement("p", { className: 'text-center text-sm font-normal' }, t('welcome message'))),
|
|
51
|
-
react_1.default.createElement(components_1.Actions, null, doneActionParent ? (0, react_1.cloneElement)(doneActionParent, {}, doneAction) : doneAction)));
|
|
11
|
+
const { t } = useTranslation('os');
|
|
12
|
+
const doneAction = (_jsx(Action, { variant: 'primary', onClick: onDone, disabled: disabled, "data-autofocus": `success${Kind}Invitation finishingJoining${Kind}`, "data-testid": `${Kind.toLowerCase()}-invitation-accepted-done`, children: t('done label') }));
|
|
13
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { role: 'none', className: 'grow flex flex-col justify-center', children: _jsx("p", { className: 'text-center text-sm font-normal', children: t('welcome message') }) }), _jsx(Actions, { children: doneActionParent ? cloneElement(doneActionParent, {}, doneAction) : doneAction })] }));
|
|
52
14
|
};
|
|
53
|
-
exports.InvitationAccepted = InvitationAccepted;
|
|
54
15
|
//# sourceMappingURL=InvitationAccepted.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationAccepted.js","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/InvitationAccepted.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE
|
|
1
|
+
{"version":3,"file":"InvitationAccepted.js","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/InvitationAccepted.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAStD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAA8B,EAAE,EAAE;IACnE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzD,MAAM,QAAQ,GAAG,CAAC,MAAM,CAAC;IACzB,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAEnC,MAAM,UAAU,GAAG,CACjB,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,QAAQ,oBACF,UAAU,IAAI,8BAA8B,IAAI,EAAE,iBACrD,GAAG,IAAI,CAAC,WAAW,EAAE,2BAA2B,YAE5D,CAAC,CAAC,YAAY,CAAC,GACT,CACV,CAAC;IAEF,OAAO,CACL,8BACE,cAAK,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,mCAAmC,YAC5D,YAAG,SAAS,EAAC,iCAAiC,YAAE,CAAC,CAAC,iBAAiB,CAAC,GAAK,GACrE,EACN,KAAC,OAAO,cAAE,gBAAgB,CAAC,CAAC,CAAC,YAAY,CAAC,gBAAgB,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,GAAW,IAClG,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Invitation } from '@dxos/react-client/invitations';
|
|
3
2
|
import { type JoinStepProps } from '../JoinPanelProps';
|
|
4
3
|
export interface InvitationAuthenticatorProps extends JoinStepProps {
|
|
@@ -10,5 +9,5 @@ export interface InvitationAuthenticatorProps extends JoinStepProps {
|
|
|
10
9
|
onInvitationCancel?: () => Promise<void> | undefined;
|
|
11
10
|
onInvitationAuthenticate?: (authCode: string) => Promise<void> | undefined;
|
|
12
11
|
}
|
|
13
|
-
export declare const InvitationAuthenticator: ({ failed, Kind, authMethod, active, pending, invitationId, onInvitationAuthenticate, onInvitationCancel, }: InvitationAuthenticatorProps) =>
|
|
12
|
+
export declare const InvitationAuthenticator: ({ failed, Kind, authMethod, active, pending, invitationId, onInvitationAuthenticate, onInvitationCancel, }: InvitationAuthenticatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
//# sourceMappingURL=InvitationAuthenticator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationAuthenticator.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/InvitationAuthenticator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InvitationAuthenticator.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/InvitationAuthenticator.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAM5D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIvD,MAAM,WAAW,4BAA6B,SAAQ,aAAa;IACjE,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IACrD,wBAAwB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5E;AAED,eAAO,MAAM,uBAAuB,+GASjC,4BAA4B,4CAoF9B,CAAC"}
|
|
@@ -1,54 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
//
|
|
3
3
|
// Copyright 2023 DXOS.org
|
|
4
4
|
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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.InvitationAuthenticator = void 0;
|
|
40
|
-
const react_1 = __importStar(require("react"));
|
|
41
|
-
const invitations_1 = require("@dxos/react-client/invitations");
|
|
42
|
-
const react_ui_1 = require("@dxos/react-ui");
|
|
43
|
-
const react_ui_theme_1 = require("@dxos/react-ui-theme");
|
|
44
|
-
const util_1 = require("@dxos/util");
|
|
45
|
-
const components_1 = require("../../../components");
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import { Invitation } from '@dxos/react-client/invitations';
|
|
7
|
+
import { Input, useTranslation } from '@dxos/react-ui';
|
|
8
|
+
import { descriptionText } from '@dxos/react-ui-theme';
|
|
9
|
+
import { hexToEmoji } from '@dxos/util';
|
|
10
|
+
import { Actions, Action, Emoji, StepHeading, Label } from '../../../components';
|
|
46
11
|
const pinLength = 6;
|
|
47
|
-
const InvitationAuthenticator = ({ failed, Kind, authMethod, active, pending, invitationId, onInvitationAuthenticate, onInvitationCancel, }) => {
|
|
12
|
+
export const InvitationAuthenticator = ({ failed, Kind, authMethod, active, pending, invitationId, onInvitationAuthenticate, onInvitationCancel, }) => {
|
|
48
13
|
const disabled = !active || pending;
|
|
49
|
-
const { t } =
|
|
14
|
+
const { t } = useTranslation('os');
|
|
50
15
|
const invitationType = Kind.toLowerCase();
|
|
51
|
-
const [authCode, setAuthCode] =
|
|
16
|
+
const [authCode, setAuthCode] = useState('');
|
|
52
17
|
const onChange = ({ target: { value } }) => {
|
|
53
18
|
var _a;
|
|
54
19
|
setAuthCode(value);
|
|
@@ -56,33 +21,17 @@ const InvitationAuthenticator = ({ failed, Kind, authMethod, active, pending, in
|
|
|
56
21
|
(_a = document.querySelector(`[data-autofocus-pinlength="${invitationType}"]`)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
57
22
|
}
|
|
58
23
|
};
|
|
59
|
-
return (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
autoComplete: 'off',
|
|
72
|
-
pattern: '\\d*',
|
|
73
|
-
'data-autofocus': `connecting${Kind}Invitation inputting${Kind}VerificationCode authenticationFailing${Kind}VerificationCode authenticating${Kind}VerificationCode`,
|
|
74
|
-
'data-prevent-ios-autofocus': true,
|
|
75
|
-
'data-testid': `${invitationType}-auth-code-input`,
|
|
76
|
-
'data-1p-ignore': true })),
|
|
77
|
-
failed && (react_1.default.createElement(react_ui_1.Input.DescriptionAndValidation, { classNames: 'text-center' },
|
|
78
|
-
react_1.default.createElement(react_ui_1.Input.Validation, null, t('failed to authenticate message'))))),
|
|
79
|
-
invitationId && authMethod === invitations_1.Invitation.AuthMethod.SHARED_SECRET && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
80
|
-
react_1.default.createElement(components_1.Label, null, t('auth other device emoji message')),
|
|
81
|
-
react_1.default.createElement("div", { className: 'flex justify-center' },
|
|
82
|
-
react_1.default.createElement(components_1.Emoji, { text: (0, util_1.hexToEmoji)(invitationId) }))))),
|
|
83
|
-
react_1.default.createElement(components_1.Actions, null,
|
|
84
|
-
react_1.default.createElement(components_1.Action, { variant: 'ghost', disabled: disabled, onClick: () => onInvitationCancel === null || onInvitationCancel === void 0 ? void 0 : onInvitationCancel(), "data-testid": `${invitationType}-invitation-authenticator-cancel` }, t('cancel label')),
|
|
85
|
-
react_1.default.createElement(components_1.Action, { variant: 'primary', disabled: disabled, onClick: () => onInvitationAuthenticate === null || onInvitationAuthenticate === void 0 ? void 0 : onInvitationAuthenticate(authCode), "data-autofocus-pinlength": invitationType, "data-testid": `${invitationType}-invitation-authenticator-next` }, t('next label')))));
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { role: 'none', className: 'grow flex flex-col justify-center gap-4', children: [_jsxs(Input.Root, { ...(failed && {
|
|
25
|
+
validationValence: 'error',
|
|
26
|
+
}), children: [_jsx(Input.Label, { asChild: true, children: authMethod === Invitation.AuthMethod.SHARED_SECRET ? (_jsx(StepHeading, { children: t('auth code input label') })) : (_jsxs(_Fragment, { children: [_jsx(StepHeading, { className: descriptionText, children: t('authenticating label') }), _jsx("div", { role: 'none', className: 'grow' })] })) }), authMethod === Invitation.AuthMethod.SHARED_SECRET && (_jsx(Input.PinInput, { disabled,
|
|
27
|
+
length: pinLength,
|
|
28
|
+
onChange,
|
|
29
|
+
inputMode: 'numeric',
|
|
30
|
+
autoComplete: 'off',
|
|
31
|
+
pattern: '\\d*',
|
|
32
|
+
'data-autofocus': `connecting${Kind}Invitation inputting${Kind}VerificationCode authenticationFailing${Kind}VerificationCode authenticating${Kind}VerificationCode`,
|
|
33
|
+
'data-prevent-ios-autofocus': true,
|
|
34
|
+
'data-testid': `${invitationType}-auth-code-input`,
|
|
35
|
+
'data-1p-ignore': true })), failed && (_jsx(Input.DescriptionAndValidation, { classNames: 'text-center', children: _jsx(Input.Validation, { children: t('failed to authenticate message') }) }))] }), invitationId && authMethod === Invitation.AuthMethod.SHARED_SECRET && (_jsxs(_Fragment, { children: [_jsx(Label, { children: t('auth other device emoji message') }), _jsx("div", { className: 'flex justify-center', children: _jsx(Emoji, { text: hexToEmoji(invitationId) }) })] }))] }), _jsxs(Actions, { children: [_jsx(Action, { variant: 'ghost', disabled: disabled, onClick: () => onInvitationCancel === null || onInvitationCancel === void 0 ? void 0 : onInvitationCancel(), "data-testid": `${invitationType}-invitation-authenticator-cancel`, children: t('cancel label') }), _jsx(Action, { variant: 'primary', disabled: disabled, onClick: () => onInvitationAuthenticate === null || onInvitationAuthenticate === void 0 ? void 0 : onInvitationAuthenticate(authCode), "data-autofocus-pinlength": invitationType, "data-testid": `${invitationType}-invitation-authenticator-next`, children: t('next label') })] })] }));
|
|
86
36
|
};
|
|
87
|
-
exports.InvitationAuthenticator = InvitationAuthenticator;
|
|
88
37
|
//# sourceMappingURL=InvitationAuthenticator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationAuthenticator.js","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/InvitationAuthenticator.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE
|
|
1
|
+
{"version":3,"file":"InvitationAuthenticator.js","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/InvitationAuthenticator.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAc,E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MAAM,IACL,OAAO,EAAC,OAAO,EACf,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,EAAI,iBACxB,GAAG,cAAc,kCAAkC,YAE/D,CAAC,CAAC,cAAc,CAAC,GACX,EACT,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,wBAAwB,aAAxB,wBAAwB,uBAAxB,wBAAwB,CAAG,QAAQ,CAAC,8BACzB,cAAc,iBAC3B,GAAG,cAAc,gCAAgC,YAE7D,CAAC,CAAC,YAAY,CAAC,GACT,IACD,IACT,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type JoinPanelProps, type JoinStepProps } from '../JoinPanelProps';
|
|
3
2
|
export interface InvitationInputProps extends JoinStepProps, Pick<JoinPanelProps, 'onExit' | 'exitActionParent'> {
|
|
4
3
|
Kind: 'Space' | 'Halo';
|
|
5
4
|
unredeemedCode?: string;
|
|
6
5
|
succeededKeys?: Set<string>;
|
|
7
6
|
}
|
|
8
|
-
export declare const InvitationInput: (props: InvitationInputProps) =>
|
|
7
|
+
export declare const InvitationInput: (props: InvitationInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
//# sourceMappingURL=InvitationInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationInput.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/InvitationInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InvitationInput.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/JoinPanel/steps/InvitationInput.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE5E,MAAM,WAAW,oBAAqB,SAAQ,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,kBAAkB,CAAC;IAC9G,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC7B;AAaD,eAAO,MAAM,eAAe,UAAW,oBAAoB,4CAqE1D,CAAC"}
|