@antscorp/antsomi-ui 1.3.7-beta.7 → 1.3.7-beta.71
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/README.md +70 -0
- package/es/components/atoms/Input/Input.js +3 -1
- package/es/components/atoms/InputDynamic/InputDynamic.js +3 -3
- package/es/components/atoms/Tag/Tag.js +1 -1
- package/es/components/icons/LazyIcon/LazyIcon.d.ts +2 -0
- package/es/components/icons/LazyIcon/LazyIcon.js +2 -0
- package/es/components/icons/QRCodeManagementIcon.d.ts +3 -0
- package/es/components/icons/QRCodeManagementIcon.js +7 -0
- package/es/components/icons/QRSetDashboardIcon.d.ts +3 -0
- package/es/components/icons/QRSetDashboardIcon.js +7 -0
- package/es/components/icons/index.d.ts +2 -0
- package/es/components/icons/index.js +2 -0
- package/es/components/molecules/AddDynamicContent/AddDynamicContent.js +28 -2
- package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.d.ts +1 -0
- package/es/components/molecules/AddDynamicContent/constants.d.ts +2 -0
- package/es/components/molecules/AddDynamicContent/constants.js +2 -0
- package/es/components/molecules/ColorPicker/index.d.ts +2 -0
- package/es/components/molecules/ColorPicker/index.js +8 -3
- package/es/components/molecules/EmojiPopover/EmojiPopover.d.ts +1 -0
- package/es/components/molecules/EmojiPopover/EmojiPopover.js +2 -2
- package/es/components/molecules/EmojiPopover/styled.d.ts +2 -2
- package/es/components/molecules/EmojiPopover/styled.js +1 -1
- package/es/components/molecules/EmptyData/EmptyData.d.ts +1 -1
- package/es/components/molecules/EmptyData/EmptyData.js +4 -2
- package/es/components/molecules/HeaderV2/HeaderV2.d.ts +1 -1
- package/es/components/molecules/InputSearch/index.d.ts +1 -1
- package/es/components/molecules/InputSearch/index.js +2 -1
- package/es/components/molecules/Modal/Modal.js +7 -1
- package/es/components/molecules/ModalV2/ModalV2.js +2 -1
- package/es/components/molecules/SearchPopover/SearchPopover.js +2 -2
- package/es/components/molecules/SearchPopover/styled.d.ts +12 -1
- package/es/components/molecules/SearchPopover/styled.js +1 -2
- package/es/components/molecules/SearchPopover/types.d.ts +4 -3
- package/es/components/molecules/Select/Select.js +3 -3
- package/es/components/molecules/Select/styled.d.ts +3 -1
- package/es/components/molecules/Select/styled.js +50 -6
- package/es/components/molecules/ShareAccess/ShareAccess.d.ts +2 -1
- package/es/components/molecules/ShareAccess/ShareAccess.js +12 -9
- package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.js +5 -5
- package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.js +2 -2
- package/es/components/molecules/ShareAccess/hooks/useShareAccess.d.ts +2 -1
- package/es/components/molecules/ShareAccess/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/reducer.d.ts +1 -1
- package/es/components/molecules/ShareAccess/reducer.js +7 -4
- package/es/components/molecules/ShareAccess/types.d.ts +22 -0
- package/es/components/molecules/ShareAccess/utils.d.ts +3 -1
- package/es/components/molecules/ShareAccess/utils.js +35 -2
- package/es/components/molecules/TagifyInput/TagifyInput.js +48 -27
- package/es/components/molecules/TagifyInput/types.d.ts +14 -8
- package/es/components/molecules/TagifyInput/utils.d.ts +6 -1
- package/es/components/molecules/TagifyInput/utils.js +19 -0
- package/es/components/molecules/VirtualizedMenu/VirtualizedMenu.d.ts +1 -0
- package/es/components/molecules/VirtualizedMenu/components/Item/Item.js +3 -7
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/MenuInline.d.ts +10 -10
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/MenuInline.js +46 -327
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/index.d.ts +9 -0
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/index.js +5 -0
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useFocusManagement.d.ts +23 -0
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useFocusManagement.js +81 -0
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useItemInteraction.d.ts +24 -0
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useItemInteraction.js +32 -0
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useKeyboardNavigation.d.ts +26 -0
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useKeyboardNavigation.js +93 -0
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useTreeState.d.ts +24 -0
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useTreeState.js +94 -0
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useVisibleItems.d.ts +7 -0
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/hooks/useVisibleItems.js +132 -0
- package/es/components/molecules/VirtualizedMenu/styled.js +14 -3
- package/es/components/molecules/VirtualizedMenu/types.d.ts +1 -0
- package/es/components/molecules/VirtualizedMenu/utils.d.ts +1 -0
- package/es/components/molecules/VirtualizedMenu/utils.js +1 -0
- package/es/components/molecules/index.d.ts +1 -0
- package/es/components/organism/AccountSharing/AccountSharing.d.ts +1 -0
- package/es/components/organism/AccountSharing/AccountSharing.js +17 -33
- package/es/components/organism/AccountSharing/styled.js +1 -1
- package/es/components/organism/ActivityTimeline/ActivityTimeline.js +3 -3
- package/es/components/organism/ActivityTimeline/constants.d.ts +9 -9
- package/es/components/organism/ActivityTimeline/constants.js +3 -3
- package/es/components/organism/ActivityTimeline/index.d.ts +530 -1
- package/es/components/organism/ActivityTimeline/index.js +9 -1
- package/es/components/organism/ActivityTimeline/utils.js +186 -15
- package/es/components/organism/LeftMenu/LeftMenu.js +6 -6
- package/es/components/organism/LeftMenu/hooks/usePermission.js +1 -1
- package/es/components/organism/LeftMenu/styled.js +2 -0
- package/es/components/organism/LeftMenu/types/index.d.ts +7 -0
- package/es/components/organism/LeftMenu/utils/index.js +1 -1
- package/es/components/organism/Login/Login.js +19 -36
- package/es/components/organism/Login/components/IconInfo/IconInfo.js +1 -1
- package/es/components/organism/Login/components/LoginSelectPortal/LoginSelectPortal.js +1 -1
- package/es/components/organism/Login/components/SignIn/SignIn.js +2 -2
- package/es/components/organism/Login/types/index.d.ts +2 -0
- package/es/components/organism/LoginV2/LoginV2.d.ts +3 -0
- package/es/components/organism/LoginV2/LoginV2.js +957 -0
- package/es/components/organism/LoginV2/components/Avatar/Avatar.d.ts +8 -0
- package/es/components/organism/LoginV2/components/Avatar/Avatar.js +11 -0
- package/es/components/organism/LoginV2/components/Avatar/index.d.ts +1 -0
- package/es/components/organism/LoginV2/components/Avatar/index.js +1 -0
- package/es/components/organism/LoginV2/components/ChooseMethod/ChooseMethod.d.ts +9 -0
- package/es/components/organism/LoginV2/components/ChooseMethod/ChooseMethod.js +54 -0
- package/es/components/organism/LoginV2/components/ChooseMethod/Method.d.ts +10 -0
- package/es/components/organism/LoginV2/components/ChooseMethod/Method.js +13 -0
- package/es/components/organism/LoginV2/components/ChooseMethod/index.d.ts +1 -0
- package/es/components/organism/LoginV2/components/ChooseMethod/index.js +1 -0
- package/es/components/organism/LoginV2/components/ChooseMethod/styled.d.ts +10 -0
- package/es/components/organism/LoginV2/components/ChooseMethod/styled.js +24 -0
- package/es/components/organism/LoginV2/components/ChooseMethod/utils.d.ts +1 -0
- package/es/components/organism/LoginV2/components/ChooseMethod/utils.js +1 -0
- package/es/components/organism/LoginV2/components/ForgotPassword/ForgotPassword.d.ts +14 -0
- package/es/components/organism/LoginV2/components/ForgotPassword/ForgotPassword.js +195 -0
- package/es/components/organism/LoginV2/components/ForgotPassword/index.d.ts +2 -0
- package/es/components/organism/LoginV2/components/ForgotPassword/index.js +2 -0
- package/es/components/organism/LoginV2/components/ForgotPassword/styled.d.ts +1 -0
- package/es/components/organism/LoginV2/components/ForgotPassword/styled.js +10 -0
- package/es/components/organism/LoginV2/components/IconInfo/IconInfo.d.ts +7 -0
- package/es/components/organism/LoginV2/components/IconInfo/IconInfo.js +18 -0
- package/es/components/organism/LoginV2/components/IconInfo/index.d.ts +1 -0
- package/es/components/organism/LoginV2/components/IconInfo/index.js +1 -0
- package/es/components/organism/LoginV2/components/LoginSelectPortal/Item/Item.d.ts +10 -0
- package/es/components/organism/LoginV2/components/LoginSelectPortal/Item/Item.js +12 -0
- package/es/components/organism/LoginV2/components/LoginSelectPortal/Item/index.d.ts +1 -0
- package/es/components/organism/LoginV2/components/LoginSelectPortal/Item/index.js +1 -0
- package/es/components/organism/LoginV2/components/LoginSelectPortal/Item/styled.d.ts +2 -0
- package/es/components/organism/LoginV2/components/LoginSelectPortal/Item/styled.js +34 -0
- package/es/components/organism/LoginV2/components/LoginSelectPortal/LoginSelectPortal.d.ts +19 -0
- package/es/components/organism/LoginV2/components/LoginSelectPortal/LoginSelectPortal.js +194 -0
- package/es/components/organism/LoginV2/components/LoginSelectPortal/index.d.ts +1 -0
- package/es/components/organism/LoginV2/components/LoginSelectPortal/index.js +1 -0
- package/es/components/organism/LoginV2/components/LoginSelectPortal/styled.d.ts +1 -0
- package/es/components/organism/LoginV2/components/LoginSelectPortal/styled.js +5 -0
- package/es/components/organism/LoginV2/components/LoginWithEmail/LoginWithEmail.d.ts +15 -0
- package/es/components/organism/LoginV2/components/LoginWithEmail/LoginWithEmail.js +211 -0
- package/es/components/organism/LoginV2/components/LoginWithEmail/index.d.ts +1 -0
- package/es/components/organism/LoginV2/components/LoginWithEmail/index.js +1 -0
- package/es/components/organism/LoginV2/components/LoginWithEmail/styled.d.ts +3 -0
- package/es/components/organism/LoginV2/components/LoginWithEmail/styled.js +5 -0
- package/es/components/organism/LoginV2/components/LoginWithGG/LoginWithGG.d.ts +14 -0
- package/es/components/organism/LoginV2/components/LoginWithGG/LoginWithGG.js +116 -0
- package/es/components/organism/LoginV2/components/LoginWithGG/index.d.ts +1 -0
- package/es/components/organism/LoginV2/components/LoginWithGG/index.js +1 -0
- package/es/components/organism/LoginV2/components/LoginWithGG/styled.d.ts +3 -0
- package/es/components/organism/LoginV2/components/LoginWithGG/styled.js +5 -0
- package/es/components/organism/LoginV2/components/Logo/Logo.d.ts +6 -0
- package/es/components/organism/LoginV2/components/Logo/Logo.js +9 -0
- package/es/components/organism/LoginV2/components/Logo/index.d.ts +1 -0
- package/es/components/organism/LoginV2/components/Logo/index.js +1 -0
- package/es/components/organism/LoginV2/components/OryConsent/OryAuthLayout.d.ts +9 -0
- package/es/components/organism/LoginV2/components/OryConsent/OryAuthLayout.js +4 -0
- package/es/components/organism/LoginV2/components/OryConsent/OryConsent.d.ts +17 -0
- package/es/components/organism/LoginV2/components/OryConsent/OryConsent.js +204 -0
- package/es/components/organism/LoginV2/components/OryConsent/OryThemeProvider.d.ts +8 -0
- package/es/components/organism/LoginV2/components/OryConsent/OryThemeProvider.js +10 -0
- package/es/components/organism/LoginV2/components/OryConsent/PortalSelect.d.ts +15 -0
- package/es/components/organism/LoginV2/components/OryConsent/PortalSelect.js +30 -0
- package/es/components/organism/LoginV2/components/OryConsent/ScopeConsent.d.ts +20 -0
- package/es/components/organism/LoginV2/components/OryConsent/ScopeConsent.js +29 -0
- package/es/components/organism/LoginV2/components/OryConsent/index.d.ts +2 -0
- package/es/components/organism/LoginV2/components/OryConsent/index.js +2 -0
- package/es/components/organism/LoginV2/components/OryConsent/styled.d.ts +31 -0
- package/es/components/organism/LoginV2/components/OryConsent/styled.js +292 -0
- package/es/components/organism/LoginV2/components/OrySignIn/OryFormShell.d.ts +9 -0
- package/es/components/organism/LoginV2/components/OrySignIn/OryFormShell.js +36 -0
- package/es/components/organism/LoginV2/components/OrySignIn/OryMfa.d.ts +11 -0
- package/es/components/organism/LoginV2/components/OrySignIn/OryMfa.js +144 -0
- package/es/components/organism/LoginV2/components/OrySignIn/OryRecovery.d.ts +9 -0
- package/es/components/organism/LoginV2/components/OrySignIn/OryRecovery.js +128 -0
- package/es/components/organism/LoginV2/components/OrySignIn/OryStatus.d.ts +17 -0
- package/es/components/organism/LoginV2/components/OrySignIn/OryStatus.js +33 -0
- package/es/components/organism/LoginV2/components/OrySignIn/index.d.ts +3 -0
- package/es/components/organism/LoginV2/components/OrySignIn/index.js +3 -0
- package/es/components/organism/LoginV2/components/SetupGGAuthenticator/SetupGGAuthenticator.d.ts +14 -0
- package/es/components/organism/LoginV2/components/SetupGGAuthenticator/SetupGGAuthenticator.js +100 -0
- package/es/components/organism/LoginV2/components/SetupGGAuthenticator/index.d.ts +2 -0
- package/es/components/organism/LoginV2/components/SetupGGAuthenticator/index.js +2 -0
- package/es/components/organism/LoginV2/components/SetupGGAuthenticator/styled.d.ts +4 -0
- package/es/components/organism/LoginV2/components/SetupGGAuthenticator/styled.js +10 -0
- package/es/components/organism/LoginV2/components/SignIn/SignIn.d.ts +22 -0
- package/es/components/organism/LoginV2/components/SignIn/SignIn.js +107 -0
- package/es/components/organism/LoginV2/components/SignIn/index.d.ts +1 -0
- package/es/components/organism/LoginV2/components/SignIn/index.js +1 -0
- package/es/components/organism/LoginV2/components/SignIn/styled.d.ts +3 -0
- package/es/components/organism/LoginV2/components/SignIn/styled.js +10 -0
- package/es/components/organism/LoginV2/components/VerifyAccount/VerifyAccount.d.ts +25 -0
- package/es/components/organism/LoginV2/components/VerifyAccount/VerifyAccount.js +42 -0
- package/es/components/organism/LoginV2/components/VerifyAccount/index.d.ts +1 -0
- package/es/components/organism/LoginV2/components/VerifyAccount/index.js +1 -0
- package/es/components/organism/LoginV2/components/VerifyAccount/styled.d.ts +22 -0
- package/es/components/organism/LoginV2/components/VerifyAccount/styled.js +17 -0
- package/es/components/organism/LoginV2/components/WidgetLayout/WidgetLayout.d.ts +13 -0
- package/es/components/organism/LoginV2/components/WidgetLayout/WidgetLayout.js +18 -0
- package/es/components/organism/LoginV2/components/WidgetLayout/index.d.ts +1 -0
- package/es/components/organism/LoginV2/components/WidgetLayout/index.js +1 -0
- package/es/components/organism/LoginV2/components/WidgetLayout/styled.d.ts +5 -0
- package/es/components/organism/LoginV2/components/WidgetLayout/styled.js +22 -0
- package/es/components/organism/LoginV2/components/index.d.ts +11 -0
- package/es/components/organism/LoginV2/components/index.js +11 -0
- package/es/components/organism/LoginV2/constants/index.d.ts +48 -0
- package/es/components/organism/LoginV2/constants/index.js +48 -0
- package/es/components/organism/LoginV2/hooks/index.d.ts +1 -0
- package/es/components/organism/LoginV2/hooks/index.js +1 -0
- package/es/components/organism/LoginV2/hooks/useResize.d.ts +7 -0
- package/es/components/organism/LoginV2/hooks/useResize.js +21 -0
- package/es/components/organism/LoginV2/index.d.ts +6 -0
- package/es/components/organism/LoginV2/index.js +4 -0
- package/es/components/organism/LoginV2/styled.d.ts +51 -0
- package/es/components/organism/LoginV2/styled.js +129 -0
- package/es/components/organism/LoginV2/types/index.d.ts +79 -0
- package/es/components/organism/LoginV2/types/index.js +1 -0
- package/es/components/organism/LoginV2/types/ory.d.ts +52 -0
- package/es/components/organism/LoginV2/types/ory.js +1 -0
- package/es/components/organism/LoginV2/utils/index.d.ts +14 -0
- package/es/components/organism/LoginV2/utils/index.js +49 -0
- package/es/components/organism/LoginV2/utils/ory.d.ts +138 -0
- package/es/components/organism/LoginV2/utils/ory.js +408 -0
- package/es/components/organism/LoginV2/utils/oryConsent.d.ts +52 -0
- package/es/components/organism/LoginV2/utils/oryConsent.js +174 -0
- package/es/components/organism/LoginV2/utils/oryFlows.d.ts +100 -0
- package/es/components/organism/LoginV2/utils/oryFlows.js +319 -0
- package/es/components/organism/TextEditor/TextEditor.d.ts +9 -2
- package/es/components/organism/TextEditor/TextEditor.js +203 -42
- package/es/components/organism/TextEditor/constants.d.ts +9 -0
- package/es/components/organism/TextEditor/constants.js +66 -0
- package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu-plugin.d.ts +6 -128
- package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu-plugin.js +7 -292
- package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu.d.ts +1 -1
- package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu.js +4 -0
- package/es/components/organism/TextEditor/extensions/Link.js +33 -14
- package/es/components/organism/TextEditor/extensions/ListItem.d.ts +10 -0
- package/es/components/organism/TextEditor/extensions/ListItem.js +93 -0
- package/es/components/organism/TextEditor/extensions/SmartTag.d.ts +5 -6
- package/es/components/organism/TextEditor/extensions/SmartTag.js +96 -4
- package/es/components/organism/TextEditor/hooks/useColorSet.js +7 -0
- package/es/components/organism/TextEditor/hooks/useMarkTracking.js +2 -1
- package/es/components/organism/TextEditor/index.d.ts +7 -5
- package/es/components/organism/TextEditor/index.scss +4 -7
- package/es/components/organism/TextEditor/provider.d.ts +1 -0
- package/es/components/organism/TextEditor/provider.js +6 -3
- package/es/components/organism/TextEditor/store.d.ts +11 -4
- package/es/components/organism/TextEditor/store.js +22 -2
- package/es/components/organism/TextEditor/stories/WithOldDynAndLink/froala-legacy-format.settings.json +95 -0
- package/es/components/organism/TextEditor/stories/WithOldDynAndLink/shared.d.ts +111 -0
- package/es/components/organism/TextEditor/stories/WithOldDynAndLink/shared.js +82 -0
- package/es/components/organism/TextEditor/stories/shared.d.ts +64 -0
- package/es/components/organism/TextEditor/stories/shared.js +57 -0
- package/es/components/organism/TextEditor/styled.d.ts +1 -1
- package/es/components/organism/TextEditor/styled.js +1 -0
- package/es/components/organism/TextEditor/types.d.ts +161 -11
- package/es/components/organism/TextEditor/types.js +1 -0
- package/es/components/organism/TextEditor/ui/BubbleMenu/BubbleMenu.d.ts +2 -1
- package/es/components/organism/TextEditor/ui/BubbleMenu/BubbleMenu.js +80 -51
- package/es/components/organism/TextEditor/ui/Emoji/EmojiList.js +1 -1
- package/es/components/organism/TextEditor/ui/Emoji/suggestion.d.ts +1 -1
- package/es/components/organism/TextEditor/ui/Emoji/suggestion.js +2 -2
- package/es/components/organism/TextEditor/ui/FontPopover/FontPopover.js +12 -2
- package/es/components/organism/TextEditor/ui/LinkInsertForm/LinkInsertForm.d.ts +16 -0
- package/es/components/organism/TextEditor/ui/LinkInsertForm/LinkInsertForm.js +61 -0
- package/es/components/organism/TextEditor/ui/LinkInsertForm/index.d.ts +2 -0
- package/es/components/organism/TextEditor/ui/LinkInsertForm/index.js +1 -0
- package/es/components/organism/TextEditor/ui/LinkPopover/LinkPopover.d.ts +9 -0
- package/es/components/organism/TextEditor/ui/LinkPopover/LinkPopover.js +126 -0
- package/es/components/organism/TextEditor/ui/LinkPopover/index.d.ts +2 -0
- package/es/components/organism/TextEditor/ui/LinkPopover/index.js +1 -0
- package/es/components/organism/TextEditor/ui/Popover/Popover.js +1 -1
- package/es/components/organism/TextEditor/ui/TextAlignSelect/TextAlignSelect.js +1 -3
- package/es/components/organism/TextEditor/ui/Toolbar/{Toolbar.d.ts → FormattingToolbar.d.ts} +3 -4
- package/es/components/organism/TextEditor/ui/Toolbar/FormattingToolbar.js +90 -0
- package/es/components/organism/TextEditor/ui/Toolbar/LinkPreviewToolbar.d.ts +10 -0
- package/es/components/organism/TextEditor/ui/Toolbar/LinkPreviewToolbar.js +39 -0
- package/es/components/organism/TextEditor/ui/Toolbar/actions/EmojiAction.js +4 -3
- package/es/components/organism/TextEditor/ui/Toolbar/actions/FontFamilyAction.d.ts +1 -0
- package/es/components/organism/TextEditor/ui/Toolbar/actions/FontFamilyAction.js +2 -2
- package/es/components/organism/TextEditor/ui/Toolbar/actions/FontSizeAction.js +6 -1
- package/es/components/organism/TextEditor/ui/Toolbar/index.d.ts +2 -1
- package/es/components/organism/TextEditor/ui/Toolbar/index.js +2 -1
- package/es/components/organism/TextEditor/utils/documentState.d.ts +14 -0
- package/es/components/organism/TextEditor/utils/documentState.js +25 -0
- package/es/components/organism/TextEditor/utils/htmlProcessing.js +60 -0
- package/es/components/organism/TextEditor/utils/link.d.ts +10 -1
- package/es/components/organism/TextEditor/utils/link.js +161 -7
- package/es/components/organism/TextEditor/utils/menu.js +2 -1
- package/es/components/organism/TextEditor/utils/selection.js +3 -2
- package/es/components/organism/TextEditor/utils/smartTag.js +2 -1
- package/es/components/organism/index.d.ts +3 -1
- package/es/components/organism/index.js +1 -0
- package/es/components/template/TemplateListing/Loadable.d.ts +1 -0
- package/es/hooks/index.d.ts +1 -1
- package/es/hooks/index.js +1 -1
- package/es/providers/ConfigProvider/ConfigProvider.d.ts +4 -0
- package/es/providers/ConfigProvider/ConfigProvider.js +2 -3
- package/es/providers/ConfigProvider/GlobalStyle.d.ts +2 -2
- package/es/providers/ConfigProvider/GlobalStyle.js +67 -64
- package/es/services/MediaTemplateDesign/UploadFile/index.js +4 -4
- package/es/utils/common.d.ts +1 -1
- package/es/utils/common.js +3 -3
- package/es/utils/cookie.js +2 -1
- package/es/utils/crossSubdomainCookieOptions.d.ts +14 -0
- package/es/utils/crossSubdomainCookieOptions.js +12 -0
- package/package.json +26 -30
- package/es/components/organism/TextEditor/ui/BubbleToolbar/BubbleToolbar.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/BubbleToolbar/BubbleToolbar.js +0 -1
- package/es/components/organism/TextEditor/ui/BubbleToolbar/index.d.ts +0 -0
- package/es/components/organism/TextEditor/ui/BubbleToolbar/index.js +0 -1
- package/es/components/organism/TextEditor/ui/Toolbar/Toolbar.js +0 -39
package/es/components/organism/LoginV2/components/SetupGGAuthenticator/SetupGGAuthenticator.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LoginData } from '../../types';
|
|
3
|
+
interface SetupGGAuthenticatorProps {
|
|
4
|
+
domainLogin: string;
|
|
5
|
+
token?: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
loginData: Partial<LoginData>;
|
|
8
|
+
onSkipSetupGGAuthenticator?: () => void;
|
|
9
|
+
onSetupGGAuthenticatorDone?: (data: any) => void;
|
|
10
|
+
backLogin: () => void;
|
|
11
|
+
loadingSkip: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const SetupGGAuthenticator: React.FC<SetupGGAuthenticatorProps>;
|
|
14
|
+
export default SetupGGAuthenticator;
|
package/es/components/organism/LoginV2/components/SetupGGAuthenticator/SetupGGAuthenticator.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Libraries
|
|
3
|
+
import { useState, useEffect, useRef } from 'react';
|
|
4
|
+
import axios from 'axios';
|
|
5
|
+
import { Button, Flex, Typography } from 'antd';
|
|
6
|
+
import { get } from 'lodash';
|
|
7
|
+
import { isAndroid, isMobile } from 'react-device-detect';
|
|
8
|
+
// Components
|
|
9
|
+
import { WidgetLayout } from '../WidgetLayout';
|
|
10
|
+
import { Avatar } from '../Avatar';
|
|
11
|
+
import { IconInfo } from '../IconInfo';
|
|
12
|
+
import imageStep1 from '../../../../../assets/images/components/Login/step1.png';
|
|
13
|
+
import imageStep2 from '../../../../../assets/images/components/Login/step2.png';
|
|
14
|
+
// Styled
|
|
15
|
+
import { LabelStep, Link } from './styled';
|
|
16
|
+
import { StyleButton, StyleInput, Text } from '../../styled';
|
|
17
|
+
const { Text: TextAntsomiUI } = Typography;
|
|
18
|
+
const SetupGGAuthenticator = props => {
|
|
19
|
+
const { domainLogin, token = '', userId, loginData, onSkipSetupGGAuthenticator, onSetupGGAuthenticatorDone, backLogin, loadingSkip, } = props;
|
|
20
|
+
const [codeError, setCodeError] = useState(true);
|
|
21
|
+
const [count, setCount] = useState(0);
|
|
22
|
+
const [isLoading, setLoading] = useState(false);
|
|
23
|
+
const [qrCode, setQRCode] = useState('');
|
|
24
|
+
const [g2faCode, setG2faCode] = useState('');
|
|
25
|
+
const errorRef = useRef(false);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
getQRCode();
|
|
28
|
+
}, []);
|
|
29
|
+
const updateG2FA = () => {
|
|
30
|
+
errorRef.current = true;
|
|
31
|
+
setCount(prev => prev + 1);
|
|
32
|
+
if (!token || !userId || codeError) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const verifyParam = {
|
|
36
|
+
g2fa: 1,
|
|
37
|
+
g2fa_code: g2faCode,
|
|
38
|
+
};
|
|
39
|
+
const url = `${domainLogin}api/account/index/${userId}?_token=${token}&_user_id=${userId}&_account_id=${userId}`;
|
|
40
|
+
setLoading(true);
|
|
41
|
+
const xhr = new XMLHttpRequest();
|
|
42
|
+
xhr.open('PUT', url, true);
|
|
43
|
+
xhr.setRequestHeader('Content-Type', 'application/json');
|
|
44
|
+
xhr.withCredentials = false;
|
|
45
|
+
xhr.onreadystatechange = function () {
|
|
46
|
+
if (xhr.readyState === XMLHttpRequest.DONE) {
|
|
47
|
+
setLoading(false);
|
|
48
|
+
}
|
|
49
|
+
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
|
|
50
|
+
const res = JSON.parse(xhr.responseText);
|
|
51
|
+
if (res && res.code === 200 && res.data && res.data.userId) {
|
|
52
|
+
if (onSetupGGAuthenticatorDone && typeof onSetupGGAuthenticatorDone === 'function') {
|
|
53
|
+
onSetupGGAuthenticatorDone(res.data);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
setCodeError(true);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
xhr.send(JSON.stringify(verifyParam));
|
|
62
|
+
};
|
|
63
|
+
const getQRCode = () => {
|
|
64
|
+
const { personal, token } = loginData;
|
|
65
|
+
const { user_id: userId } = personal || {};
|
|
66
|
+
axios
|
|
67
|
+
.get(`${domainLogin}api/account/info?_token=${token}&_user_id=${userId}&_account_id=${userId}&type=get-qr-code`)
|
|
68
|
+
.then(res => {
|
|
69
|
+
if (res && res.data && res.data.data) {
|
|
70
|
+
setQRCode(res.data.data);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
const handleBack = () => {
|
|
75
|
+
if (backLogin && typeof backLogin === 'function') {
|
|
76
|
+
backLogin();
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
return (_jsx(WidgetLayout, { title: "Enable two-step authentication", isShowLogo: false, header: _jsx(Avatar, { image: get(loginData, 'personal.avatar'), name: get(loginData, 'personal.full_name'), email: get(loginData, 'personal.email') }), content: _jsxs(Flex, { vertical: true, gap: 30, children: [_jsxs(Flex, { vertical: true, gap: 13, children: [_jsx(LabelStep, { isMobile: isMobile, children: "STEP 1" }), _jsxs(Flex, { align: "center", gap: 5, children: [_jsx(Text, { isMobile: isMobile, color: "#595959", children: isMobile ? (_jsxs("span", { children: [_jsx(Link, { href: isAndroid
|
|
80
|
+
? 'https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2'
|
|
81
|
+
: 'https://apps.apple.com/us/app/google-authenticator/id388497605 ', target: "_blank", rel: "noreferrer", children: "Install Google Authenticator" }), "& scan the code"] })) : ('Install Google Authenticator on your phone & scan the code') }), _jsx(IconInfo, { image: imageStep1, title: _jsx(TextAntsomiUI, { style: {
|
|
82
|
+
marginTop: 20,
|
|
83
|
+
}, children: _jsxs(Text, { isMobile: isMobile, style: { textAlign: 'center' }, children: ["Open ", _jsx("b", { children: "Google Authenticator" }), " app on your phone and scan the QR code."] }) }) })] }), qrCode ? (_jsx(Flex, { vertical: true, align: "center", style: {
|
|
84
|
+
background: '#EEF5FC',
|
|
85
|
+
padding: 10,
|
|
86
|
+
borderRadius: 10,
|
|
87
|
+
}, children: _jsx("img", { src: `data:image/gif;base64,${qrCode}`, alt: "QR Code", height: 160, style: {
|
|
88
|
+
borderRadius: 10,
|
|
89
|
+
} }) })) : null] }), _jsxs(Flex, { vertical: true, gap: 13, children: [_jsx(LabelStep, { isMobile: isMobile, children: "STEP 2" }), _jsxs(Flex, { align: "center", gap: 5, children: [_jsxs(Text, { isMobile: isMobile, color: "#595959", children: ["Enter the 6-digit code from ", _jsx("span", { style: { fontWeight: 'bold' }, children: "antsomi.com" })] }), _jsx(IconInfo, { image: imageStep2, title: _jsx(TextAntsomiUI, { style: {
|
|
90
|
+
marginTop: 20,
|
|
91
|
+
}, children: _jsx(Text, { isMobile: isMobile, children: "Enter the code to confirm the connection to this account" }) }) })] }), _jsx(StyleInput, { isMobile: isMobile, maxLength: 6, placeholder: "Input your code", onChange: e => {
|
|
92
|
+
setG2faCode(e.target.value.trim());
|
|
93
|
+
if (e.target.value.trim().length) {
|
|
94
|
+
setCodeError(false);
|
|
95
|
+
}
|
|
96
|
+
}, status: errorRef.current && codeError ? 'error' : '' }), errorRef.current && codeError ? (_jsx(TextAntsomiUI, { type: "danger", children: "Invalid code, please try again" })) : null] })] }), footer: _jsxs(Flex, { vertical: true, gap: 92, children: [_jsxs(Flex, { vertical: true, gap: isMobile ? 30 : 15, children: [_jsx(StyleButton, { isMobile: isMobile, loading: isLoading, type: "primary", onClick: updateG2FA, children: "Complete" }), _jsx(StyleButton, { isMobile: isMobile, type: "text", onClick: onSkipSetupGGAuthenticator, loading: loadingSkip, children: "Skip" })] }), _jsx(Flex, { justify: "center", children: _jsx(Button, { type: "text", onClick: handleBack, style: {
|
|
97
|
+
fontSize: isMobile ? '16px' : '14px',
|
|
98
|
+
}, children: "Sign in with a different account" }) })] }) }));
|
|
99
|
+
};
|
|
100
|
+
export default SetupGGAuthenticator;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const LabelStep = styled.span `
|
|
3
|
+
color: #005eb8;
|
|
4
|
+
font-size: ${props => (props.isMobile ? '16px' : '14px')};
|
|
5
|
+
font-weight: 500;
|
|
6
|
+
`;
|
|
7
|
+
export const Link = styled.a `
|
|
8
|
+
text-decoration: underline;
|
|
9
|
+
padding-right: 4px;
|
|
10
|
+
`;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LoginData } from '../../types';
|
|
3
|
+
type TSignIn = {
|
|
4
|
+
domainLogin: string;
|
|
5
|
+
networkId?: string;
|
|
6
|
+
urlLogo?: string;
|
|
7
|
+
onForgotPassword?: () => void;
|
|
8
|
+
onLoginSuccess?: (data: Partial<LoginData>) => void;
|
|
9
|
+
onLoginFail?: (data: any) => void;
|
|
10
|
+
userNameKey?: string;
|
|
11
|
+
passwordKey?: string;
|
|
12
|
+
setAuthenInfo: (info: {
|
|
13
|
+
email: string;
|
|
14
|
+
}) => void;
|
|
15
|
+
/** Optional browser-session adapter used by the Ory challenge flow. */
|
|
16
|
+
onOrySubmit?: (credentials: {
|
|
17
|
+
email: string;
|
|
18
|
+
password: string;
|
|
19
|
+
}) => Promise<void>;
|
|
20
|
+
};
|
|
21
|
+
export declare const SignIn: React.FC<TSignIn>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Libraries
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { useCookies } from 'react-cookie';
|
|
5
|
+
import { isEmpty } from 'lodash';
|
|
6
|
+
import { Flex, Form } from 'antd';
|
|
7
|
+
// Styled
|
|
8
|
+
import { StyleButton, StyledForm, StyleInput, WrapperImage } from '../../styled';
|
|
9
|
+
// Images
|
|
10
|
+
import logoAntsomi from '../../../../../assets/images/logo/antsomi_logo.png';
|
|
11
|
+
import { Wrapper } from './styled';
|
|
12
|
+
import { isMobile } from 'react-device-detect';
|
|
13
|
+
import Icon from '@antscorp/icons';
|
|
14
|
+
export const SignIn = props => {
|
|
15
|
+
const { domainLogin, networkId, urlLogo, onForgotPassword, onLoginSuccess, onLoginFail, userNameKey = 'user_name', passwordKey = 'password', setAuthenInfo, onOrySubmit, } = props;
|
|
16
|
+
const [form] = Form.useForm();
|
|
17
|
+
const loginUrl = `${domainLogin}api/account/authenticate`;
|
|
18
|
+
const [cookies, setCookie] = useCookies();
|
|
19
|
+
const [loginError, setLoginError] = useState(false);
|
|
20
|
+
const [loginErrorMessage, setLoginErrorMessage] = useState('Email or password is invalid');
|
|
21
|
+
const [isLoading, setLoading] = useState(false);
|
|
22
|
+
const goForgotPassword = e => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
if (onForgotPassword && typeof onForgotPassword === 'function') {
|
|
25
|
+
onForgotPassword();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const onFinish = async (values) => {
|
|
29
|
+
const { password, email } = values;
|
|
30
|
+
if (onOrySubmit) {
|
|
31
|
+
setAuthenInfo({ email });
|
|
32
|
+
setLoginError(false);
|
|
33
|
+
setLoading(true);
|
|
34
|
+
try {
|
|
35
|
+
await onOrySubmit({ email, password });
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
setLoginError(true);
|
|
39
|
+
setLoginErrorMessage(error?.userMessage ||
|
|
40
|
+
(error?.code === 'ORY_MFA_REQUIRED'
|
|
41
|
+
? 'Additional verification is required to finish signing in.'
|
|
42
|
+
: 'Email or password is invalid'));
|
|
43
|
+
if (onLoginFail && typeof onLoginFail === 'function') {
|
|
44
|
+
onLoginFail({ code: error?.code || 'ORY_LOGIN_FAILED' });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
setLoading(false);
|
|
49
|
+
}
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const keyName = `ogs-${btoa(email)}`;
|
|
53
|
+
const trustKey = cookies[keyName] || localStorage.getItem(keyName);
|
|
54
|
+
const params = {
|
|
55
|
+
[userNameKey]: email,
|
|
56
|
+
[passwordKey]: password,
|
|
57
|
+
app_id: networkId,
|
|
58
|
+
};
|
|
59
|
+
setAuthenInfo({
|
|
60
|
+
email,
|
|
61
|
+
});
|
|
62
|
+
if (trustKey) {
|
|
63
|
+
params.trust_key = trustKey;
|
|
64
|
+
}
|
|
65
|
+
setLoading(true);
|
|
66
|
+
const xhr = new XMLHttpRequest();
|
|
67
|
+
xhr.open('POST', loginUrl, true);
|
|
68
|
+
// Send the proper header information along with the request
|
|
69
|
+
xhr.setRequestHeader('Content-Type', 'application/json');
|
|
70
|
+
xhr.withCredentials = false;
|
|
71
|
+
xhr.onreadystatechange = () => {
|
|
72
|
+
if (xhr.readyState === XMLHttpRequest.DONE) {
|
|
73
|
+
setLoading(false);
|
|
74
|
+
}
|
|
75
|
+
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
|
|
76
|
+
const response = JSON.parse(xhr.responseText);
|
|
77
|
+
if (response?.data?.token) {
|
|
78
|
+
if (onLoginSuccess && typeof onLoginSuccess === 'function') {
|
|
79
|
+
onLoginSuccess({ ...response.data, isCheckG2FA: true });
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
setLoginError(true);
|
|
84
|
+
setLoginErrorMessage('Email or password is invalid');
|
|
85
|
+
if (onLoginFail && typeof onLoginFail === 'function') {
|
|
86
|
+
onLoginFail(response);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
xhr.send(JSON.stringify(params));
|
|
92
|
+
};
|
|
93
|
+
return (_jsxs(Wrapper, { isMobile: isMobile, children: [_jsx(Flex, { align: "center", justify: "center", children: !isEmpty(urlLogo) ? (_jsx(WrapperImage, { src: urlLogo, alt: "" })) : typeof LOGO_NETWORK_DOMAIN !== 'undefined' && LOGO_NETWORK_DOMAIN !== '' ? (_jsx(WrapperImage, { src: LOGO_NETWORK_DOMAIN, alt: "" })) : (_jsx(WrapperImage, { src: logoAntsomi, alt: "logosaS" })) }), _jsxs(StyledForm, { form: form, name: "login_form", onFinish: onFinish, scrollToFirstError: true, style: { width: '100%' }, isMobile: isMobile, validateTrigger: "onSubmit", children: [_jsx(Form.Item, { name: "email", rules: [
|
|
94
|
+
{
|
|
95
|
+
required: true,
|
|
96
|
+
message: 'Please enter your email',
|
|
97
|
+
pattern: /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
98
|
+
},
|
|
99
|
+
], children: _jsx(StyleInput, { autoComplete: "username", name: "email", type: "text", isMobile: isMobile, placeholder: "Email" }) }), _jsx(Form.Item, { name: "password", rules: [
|
|
100
|
+
{ required: true, message: 'Please enter your password' },
|
|
101
|
+
{ min: 6, message: 'Password must be at least 6 characters long' },
|
|
102
|
+
], style: { marginTop: 15 }, children: _jsx(StyleInput.Password, { name: "password", autoComplete: "current-password", placeholder: "Password", iconRender: visible => visible ? (_jsx(Icon, { type: "icon-ants-eye", style: {
|
|
103
|
+
color: '#595959',
|
|
104
|
+
} })) : (_jsx(Icon, { type: "icon-ants-invisible", style: {
|
|
105
|
+
color: '#595959',
|
|
106
|
+
} })) }) }), loginError && (_jsx("span", { role: "alert", style: { color: 'red', fontSize: 11 }, children: loginErrorMessage })), _jsxs(Flex, { style: { width: '100%', marginTop: '40px' }, vertical: true, className: "", children: [_jsx(Form.Item, { children: _jsx(StyleButton, { isMobile: isMobile, type: "primary", htmlType: "submit", style: { width: '100%', marginBottom: isMobile ? 15 : 0 }, loading: isLoading, children: "Sign in" }) }), _jsx(StyleButton, { isMobile: isMobile, type: "text", onClick: goForgotPassword, disabled: !onForgotPassword, children: "Forgot password?" })] })] })] }));
|
|
107
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SignIn';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SignIn';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LoginData } from '../../types';
|
|
3
|
+
type TVerifyAccount = {
|
|
4
|
+
loginData: {
|
|
5
|
+
personal?: Partial<LoginData>;
|
|
6
|
+
token?: string;
|
|
7
|
+
};
|
|
8
|
+
domainLogin: string;
|
|
9
|
+
networkId?: string;
|
|
10
|
+
listNetworks: any;
|
|
11
|
+
u_ogs?: string;
|
|
12
|
+
urlLogo?: string;
|
|
13
|
+
authenInfo: any;
|
|
14
|
+
callbackSelectNetwork?: (data: any) => void;
|
|
15
|
+
backLogin: () => void;
|
|
16
|
+
onLoginSuccess: (data: any) => void;
|
|
17
|
+
onLoginFail: () => void;
|
|
18
|
+
onForgotPassword: () => void;
|
|
19
|
+
handleLoginData: (data: Partial<LoginData> | null | undefined, doPostEvent: boolean | undefined, doSelectNetwork: number | null) => void;
|
|
20
|
+
sendMailValidateAccount: (callback: (data: any) => void) => Promise<void>;
|
|
21
|
+
isLoginGG?: boolean;
|
|
22
|
+
callbackUrl?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const VerifyAccount: React.FC<TVerifyAccount>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { WidgetLayout } from '../WidgetLayout';
|
|
4
|
+
import { StyleButton, WrapperContent } from '../../styled';
|
|
5
|
+
import { Flex, Typography } from 'antd';
|
|
6
|
+
import { isMobile } from 'react-device-detect';
|
|
7
|
+
import { STATUS } from '../../constants';
|
|
8
|
+
import NOT_AUTHENTICATED from '../../../../../assets/images/components/Login/ICON.png';
|
|
9
|
+
import EMAIL_SENT from '../../../../../assets/images/components/Login/email.png';
|
|
10
|
+
import RECENT_EMAIL from '../../../../../assets/images/components/Login/RECENT_EMAIL.png';
|
|
11
|
+
import { Logo } from '../Logo';
|
|
12
|
+
const { Text } = Typography;
|
|
13
|
+
export const VerifyAccount = props => {
|
|
14
|
+
const { backLogin, sendMailValidateAccount, authenInfo, urlLogo } = props;
|
|
15
|
+
const [init, setInit] = useState(false);
|
|
16
|
+
const [status, setStatus] = useState(STATUS.ACCOUNT_NOT_VERIFIED);
|
|
17
|
+
const handleSendMail = () => {
|
|
18
|
+
sendMailValidateAccount(data => {
|
|
19
|
+
if (data && data.status) {
|
|
20
|
+
setStatus(STATUS.CHECK_YOUR_EMAIL);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
setTimeout(() => setInit(true), 1000);
|
|
26
|
+
}, []);
|
|
27
|
+
const renderContent = () => {
|
|
28
|
+
switch (status) {
|
|
29
|
+
case STATUS.ACCOUNT_NOT_VERIFIED:
|
|
30
|
+
return (_jsx(WidgetLayout, { title: "This account is not authenticated", header: _jsxs(Flex, { vertical: true, gap: 40, align: "center", style: {
|
|
31
|
+
paddingTop: 60,
|
|
32
|
+
}, children: [_jsx(Logo, { urlLogo: urlLogo }), _jsx("img", { src: NOT_AUTHENTICATED, width: 100, height: 100, alt: "" })] }), content: _jsx(WrapperContent, { className: "verify_account", children: "Please click the button below to receive an account verification email. Thank you." }), footer: _jsxs(Flex, { vertical: true, gap: 15, children: [_jsx(StyleButton, { isMobile: isMobile, type: "primary", onClick: handleSendMail, children: "SEND VALIDATE EMAIL" }), _jsxs(StyleButton, { isMobile: isMobile, type: "text", onClick: backLogin, children: ["Back to login", ' '] })] }), isShowLogo: false }));
|
|
33
|
+
case STATUS.CHECK_YOUR_EMAIL:
|
|
34
|
+
return (_jsx(WidgetLayout, { title: "Email sent", header: _jsx("img", { src: EMAIL_SENT, width: 200, height: 200, alt: "", style: { marginTop: 100 } }), content: _jsx(WrapperContent, { className: "verify_account", children: "Check your email and follow the instruction to retrieve your password" }), footer: _jsxs(Flex, { vertical: true, gap: 15, children: [_jsx(StyleButton, { isMobile: isMobile, type: "primary", onClick: backLogin, children: "Back to login" }), _jsx(StyleButton, { isMobile: isMobile, type: "text", onClick: () => setStatus(STATUS.RESEND_EMAIL), children: "Resend" })] }), isShowLogo: false }));
|
|
35
|
+
case STATUS.RESEND_EMAIL:
|
|
36
|
+
return (_jsx(WidgetLayout, { title: "Email sent", header: _jsx("img", { src: RECENT_EMAIL, width: 200, height: 200, alt: "", style: { marginTop: 100 } }), content: _jsx(WrapperContent, { className: "verify_account", children: "Check your email and follow the instruction to retrieve your password" }), footer: _jsxs(Flex, { vertical: true, gap: 15, children: [_jsx(StyleButton, { isMobile: isMobile, type: "primary", onClick: backLogin, children: "Back to login" }), _jsx(StyleButton, { isMobile: isMobile, type: "text", onClick: handleSendMail, children: "Resend" })] }), isShowLogo: false }));
|
|
37
|
+
default:
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
return renderContent();
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VerifyAccount';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VerifyAccount';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const WrapperForm: import("styled-components").StyledComponent<(<Values = any>(props: import("antd").FormProps<Values> & {
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
} & import("react").RefAttributes<import("antd").FormInstance<Values>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
|
|
5
|
+
displayName?: string | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
useForm: typeof import("antd/es/form/Form").useForm;
|
|
8
|
+
useFormInstance: typeof import("antd/es/form/hooks/useFormInstance").default;
|
|
9
|
+
useWatch: typeof import("rc-field-form").useWatch;
|
|
10
|
+
Item: (<Values_1 = any>(props: import("antd").FormItemProps<Values_1>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
|
|
11
|
+
useStatus: () => {
|
|
12
|
+
status?: "" | "warning" | "error" | "success" | "validating" | undefined;
|
|
13
|
+
errors: import("react").ReactNode[];
|
|
14
|
+
warnings: import("react").ReactNode[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
List: import("react").FC<import("antd/es/form").FormListProps>;
|
|
18
|
+
ErrorList: import("react").FC<import("antd/es/form").ErrorListProps>;
|
|
19
|
+
Provider: import("react").FC<import("antd/es/form/context").FormProviderProps>;
|
|
20
|
+
create: () => void;
|
|
21
|
+
}, any, {}, never>;
|
|
22
|
+
export declare const LabelRequire: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Form } from 'antd';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
export const WrapperForm = styled(Form) `
|
|
4
|
+
.antsomi-form-item-row {
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.antsomi-form-item .antsomi-form-item-label > label::after {
|
|
9
|
+
content: '' !important;
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
export const LabelRequire = styled.span `
|
|
13
|
+
color: #595959;
|
|
14
|
+
.icon {
|
|
15
|
+
color: red;
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type TWidgetLayout = {
|
|
3
|
+
header?: React.ReactNode | string;
|
|
4
|
+
title?: React.ReactNode | string;
|
|
5
|
+
content?: React.ReactNode | string;
|
|
6
|
+
isShowLogo?: boolean;
|
|
7
|
+
footer?: React.ReactNode;
|
|
8
|
+
urlLogo?: string;
|
|
9
|
+
gapContent?: number;
|
|
10
|
+
paddingContent?: string | number;
|
|
11
|
+
};
|
|
12
|
+
export declare const WidgetLayout: React.FC<TWidgetLayout>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Libraries
|
|
3
|
+
import { Flex } from 'antd';
|
|
4
|
+
import { isEmpty } from 'lodash';
|
|
5
|
+
import { isMobile } from 'react-device-detect';
|
|
6
|
+
// Styled
|
|
7
|
+
import { Title, WidgetLayoutMain } from './styled';
|
|
8
|
+
import { WrapperImage } from '../../styled';
|
|
9
|
+
// Images
|
|
10
|
+
import logoAntsomi from '../../../../../assets/images/logo/antsomi_logo.png';
|
|
11
|
+
export const WidgetLayout = props => {
|
|
12
|
+
const { header, title, content, isShowLogo = true, footer, urlLogo, gapContent = 40, paddingContent = '0 30px', } = props;
|
|
13
|
+
return (_jsxs(WidgetLayoutMain, { vertical: true, gap: 40, children: [isShowLogo && (_jsx(Flex, { align: "center", justify: "center", children: !isEmpty(urlLogo) ? (_jsx(WrapperImage, { src: urlLogo, alt: "" })) : typeof LOGO_NETWORK_DOMAIN !== 'undefined' && LOGO_NETWORK_DOMAIN !== '' ? (_jsx(WrapperImage, { src: LOGO_NETWORK_DOMAIN, alt: "" })) : (_jsx(WrapperImage, { src: logoAntsomi, alt: "logosaS" })) })), _jsxs(Flex, { vertical: true, gap: gapContent, style: { height: '100%', padding: paddingContent }, children: [_jsx(Flex, { align: "center", justify: "center", style: {
|
|
14
|
+
paddingTop: '40px',
|
|
15
|
+
}, children: header }), _jsx(Title, { isMobile: isMobile, children: title }), _jsxs(Flex, { vertical: true, justify: "space-between", flex: 1, gap: gapContent, children: [content, _jsx(Flex, { vertical: true, style: {
|
|
16
|
+
paddingBottom: '40px',
|
|
17
|
+
}, children: footer })] })] })] }));
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './WidgetLayout';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './WidgetLayout';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Title: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
isMobile: boolean;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const WidgetLayoutMain: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Flex } from 'antd';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
export const Title = styled.div `
|
|
4
|
+
font-size: ${props => (props.isMobile ? '20px' : '18px')};
|
|
5
|
+
font-weight: 700;
|
|
6
|
+
color: #005eb8;
|
|
7
|
+
text-align: center;
|
|
8
|
+
`;
|
|
9
|
+
export const WidgetLayoutMain = styled(Flex) `
|
|
10
|
+
position: relative;
|
|
11
|
+
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
overflow: auto;
|
|
15
|
+
|
|
16
|
+
.sticky-footer {
|
|
17
|
+
margin-top: 50px;
|
|
18
|
+
bottom: 0px;
|
|
19
|
+
width: 100%;
|
|
20
|
+
z-index: 100;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './WidgetLayout';
|
|
2
|
+
export * from './ForgotPassword';
|
|
3
|
+
export * from './SignIn';
|
|
4
|
+
export * from './OryConsent';
|
|
5
|
+
export * from './VerifyAccount';
|
|
6
|
+
export * from './SetupGGAuthenticator';
|
|
7
|
+
export * from './LoginWithGG';
|
|
8
|
+
export * from './LoginSelectPortal';
|
|
9
|
+
export * from './Logo';
|
|
10
|
+
export * from './ChooseMethod';
|
|
11
|
+
export * from './LoginWithEmail';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './WidgetLayout';
|
|
2
|
+
export * from './ForgotPassword';
|
|
3
|
+
export * from './SignIn';
|
|
4
|
+
export * from './OryConsent';
|
|
5
|
+
export * from './VerifyAccount';
|
|
6
|
+
export * from './SetupGGAuthenticator';
|
|
7
|
+
export * from './LoginWithGG';
|
|
8
|
+
export * from './LoginSelectPortal';
|
|
9
|
+
export * from './Logo';
|
|
10
|
+
export * from './ChooseMethod';
|
|
11
|
+
export * from './LoginWithEmail';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare const TYPE_VIEW: {
|
|
2
|
+
LOGIN: string;
|
|
3
|
+
FORGOT_PASSWORD: string;
|
|
4
|
+
VALIDATE: string;
|
|
5
|
+
EMAIL_SENT: string;
|
|
6
|
+
NOT_AUTHEN: string;
|
|
7
|
+
VALIDATE_ACCOUNT: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const STEPS: {
|
|
10
|
+
readonly STEP1: 1;
|
|
11
|
+
readonly STEP_LOGIN_WITH_GG: 2;
|
|
12
|
+
readonly STEP_SETUP_GG_AUTHENTICATOR: 3;
|
|
13
|
+
readonly STEP_SELECT_NETWORK: 4;
|
|
14
|
+
readonly STEP_SELECT_ACCOUNT: 5;
|
|
15
|
+
readonly STEP_VERIFY_ACCOUNT: 6;
|
|
16
|
+
readonly STEP_CHOOSE_METHOD: 7;
|
|
17
|
+
readonly STEP_LOGIN_WITH_EMAIL: 8;
|
|
18
|
+
readonly STEP_FORGOT: 999;
|
|
19
|
+
readonly STEP_FORGOT_RESEND: 1000;
|
|
20
|
+
};
|
|
21
|
+
export declare const STATUS: {
|
|
22
|
+
readonly ACCOUNT_NOT_VERIFIED: 1;
|
|
23
|
+
readonly RESEND_EMAIL: 2;
|
|
24
|
+
readonly CHECK_YOUR_EMAIL: 3;
|
|
25
|
+
readonly SESSION_EXPIRED: 4;
|
|
26
|
+
};
|
|
27
|
+
export declare const LOGIN_METHODS: {
|
|
28
|
+
readonly GOOGLE_AUTHENTICATOR: "google";
|
|
29
|
+
readonly EMAIL: "email";
|
|
30
|
+
};
|
|
31
|
+
export declare const LOGIN_ERROR_TYPES: {
|
|
32
|
+
VERIFY_FAILED: {
|
|
33
|
+
type: string;
|
|
34
|
+
message: string;
|
|
35
|
+
};
|
|
36
|
+
SEND_LIMIT_REACHED: {
|
|
37
|
+
type: string;
|
|
38
|
+
message: string;
|
|
39
|
+
};
|
|
40
|
+
TOO_MANY_ATTEMPTS: {
|
|
41
|
+
type: string;
|
|
42
|
+
message: string;
|
|
43
|
+
};
|
|
44
|
+
INVALID_CODE: {
|
|
45
|
+
type: string;
|
|
46
|
+
message: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export const TYPE_VIEW = {
|
|
2
|
+
LOGIN: 'LOGIN',
|
|
3
|
+
FORGOT_PASSWORD: 'FORGOT_PASSWORD',
|
|
4
|
+
VALIDATE: 'VALIDATE',
|
|
5
|
+
EMAIL_SENT: 'EMAIL_SENT',
|
|
6
|
+
NOT_AUTHEN: 'NOT_AUTHEN',
|
|
7
|
+
VALIDATE_ACCOUNT: 'VALIDATE_ACCOUNT',
|
|
8
|
+
};
|
|
9
|
+
export const STEPS = {
|
|
10
|
+
STEP1: 1,
|
|
11
|
+
STEP_LOGIN_WITH_GG: 2,
|
|
12
|
+
STEP_SETUP_GG_AUTHENTICATOR: 3,
|
|
13
|
+
STEP_SELECT_NETWORK: 4,
|
|
14
|
+
STEP_SELECT_ACCOUNT: 5,
|
|
15
|
+
STEP_VERIFY_ACCOUNT: 6,
|
|
16
|
+
STEP_CHOOSE_METHOD: 7,
|
|
17
|
+
STEP_LOGIN_WITH_EMAIL: 8,
|
|
18
|
+
STEP_FORGOT: 999,
|
|
19
|
+
STEP_FORGOT_RESEND: 1000,
|
|
20
|
+
};
|
|
21
|
+
export const STATUS = {
|
|
22
|
+
ACCOUNT_NOT_VERIFIED: 1,
|
|
23
|
+
RESEND_EMAIL: 2,
|
|
24
|
+
CHECK_YOUR_EMAIL: 3,
|
|
25
|
+
SESSION_EXPIRED: 4,
|
|
26
|
+
};
|
|
27
|
+
export const LOGIN_METHODS = {
|
|
28
|
+
GOOGLE_AUTHENTICATOR: 'google',
|
|
29
|
+
EMAIL: 'email',
|
|
30
|
+
};
|
|
31
|
+
export const LOGIN_ERROR_TYPES = {
|
|
32
|
+
VERIFY_FAILED: {
|
|
33
|
+
type: 'VERIFY_FAILED',
|
|
34
|
+
message: 'Missing userId or code',
|
|
35
|
+
},
|
|
36
|
+
SEND_LIMIT_REACHED: {
|
|
37
|
+
type: 'SEND_LIMIT_REACHED',
|
|
38
|
+
message: 'Too many requests. Please contact Antsomi Support.',
|
|
39
|
+
},
|
|
40
|
+
TOO_MANY_ATTEMPTS: {
|
|
41
|
+
type: 'TOO_MANY_ATTEMPTS',
|
|
42
|
+
message: 'Too many incorrect attempts. Please try again later.',
|
|
43
|
+
},
|
|
44
|
+
INVALID_CODE: {
|
|
45
|
+
type: 'INVALID_CODE',
|
|
46
|
+
message: 'Invalid code, please try again.',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useResize';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useResize';
|