@orbe-agro/client-core 5.3.86 → 5.3.90
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/@ecme/assets/styles/app.css +1 -1
- package/dist/@ecme/assets/styles/components/_dialog.css +1 -1
- package/dist/@ecme/assets/styles/components/_drawer.css +1 -1
- package/dist/@ecme/assets/styles/components/_scrollbar.css +1 -1
- package/dist/@ecme/assets/styles/components/_switcher.css +1 -1
- package/dist/@ecme/assets/styles/components/_upload.css +1 -1
- package/dist/@ecme/assets/styles/components/index.css +1 -1
- package/dist/@ecme/assets/styles/tailwind/index.css +1 -1
- package/dist/@ecme/auth/AuthProvider.js +58 -62
- package/dist/@ecme/auth/AuthProvider.js.map +1 -1
- package/dist/@ecme/components/docs/DemoCard/DemoCard.js +18 -19
- package/dist/@ecme/components/docs/DemoCard/DemoCard.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.js +29 -30
- package/dist/@ecme/components/layouts/PostLoginLayout/PostLoginLayout.js.map +1 -1
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.js +56 -56
- package/dist/@ecme/components/layouts/PostLoginLayout/components/ContentOverlay.js.map +1 -1
- package/dist/@ecme/components/shared/Affix.js +9 -10
- package/dist/@ecme/components/shared/Affix.js.map +1 -1
- package/dist/@ecme/components/shared/AutoComplete.js +27 -28
- package/dist/@ecme/components/shared/AutoComplete.js.map +1 -1
- package/dist/@ecme/components/shared/CalendarView.js +19 -20
- package/dist/@ecme/components/shared/CalendarView.js.map +1 -1
- package/dist/@ecme/components/shared/ConfirmDialog.js +16 -16
- package/dist/@ecme/components/shared/ConfirmDialog.js.map +1 -1
- package/dist/@ecme/components/shared/DataTable.js +151 -151
- package/dist/@ecme/components/shared/DataTable.js.map +1 -1
- package/dist/@ecme/components/shared/DebounceInput.js +11 -12
- package/dist/@ecme/components/shared/DebounceInput.js.map +1 -1
- package/dist/@ecme/components/shared/GanttChart/GanttChart.js +20 -20
- package/dist/@ecme/components/shared/GanttChart/GanttChart.js.map +1 -1
- package/dist/@ecme/components/shared/GanttChart/TaskListTable.js +22 -22
- package/dist/@ecme/components/shared/GanttChart/TaskListTable.js.map +1 -1
- package/dist/@ecme/components/shared/ImageGallery.js +18 -18
- package/dist/@ecme/components/shared/ImageGallery.js.map +1 -1
- package/dist/@ecme/components/shared/Masonry/Masonry.js +25 -25
- package/dist/@ecme/components/shared/Masonry/Masonry.js.map +1 -1
- package/dist/@ecme/components/shared/OtpInput.js +54 -56
- package/dist/@ecme/components/shared/OtpInput.js.map +1 -1
- package/dist/@ecme/components/shared/PasswordInput.js +6 -6
- package/dist/@ecme/components/shared/PasswordInput.js.map +1 -1
- package/dist/@ecme/components/shared/RegionMap.js +9 -9
- package/dist/@ecme/components/shared/RegionMap.js.map +1 -1
- package/dist/@ecme/components/shared/RichTextEditor/RichTextEditor.js +47 -47
- package/dist/@ecme/components/shared/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/@ecme/components/shared/UsersAvatarGroup.js +24 -24
- package/dist/@ecme/components/shared/UsersAvatarGroup.js.map +1 -1
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuContent.js +63 -69
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuContent.js.map +1 -1
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdown.js +48 -48
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdown.js.map +1 -1
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdownContent.js +220 -231
- package/dist/@ecme/components/template/HorizontalMenuContent/HorizontalMenuDropdownContent.js.map +1 -1
- package/dist/@ecme/components/template/LanguageSelector.js +10 -13
- package/dist/@ecme/components/template/LanguageSelector.js.map +1 -1
- package/dist/@ecme/components/template/Search.js +85 -92
- package/dist/@ecme/components/template/Search.js.map +1 -1
- package/dist/@ecme/components/template/ThemeConfigurator/DirectionSwitcher.js +18 -18
- package/dist/@ecme/components/template/ThemeConfigurator/DirectionSwitcher.js.map +1 -1
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.js +17 -17
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.js.map +1 -1
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.js +59 -59
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalMenuContent.js.map +1 -1
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.js +34 -34
- package/dist/@ecme/components/template/VerticalMenuContent/VerticalSingleMenuItem.js.map +1 -1
- package/dist/@ecme/components/ui/Alert/Alert.js +29 -29
- package/dist/@ecme/components/ui/Alert/Alert.js.map +1 -1
- package/dist/@ecme/components/ui/Avatar/AvatarGroup.js +30 -30
- package/dist/@ecme/components/ui/Avatar/AvatarGroup.js.map +1 -1
- package/dist/@ecme/components/ui/Button/Button.js +66 -67
- package/dist/@ecme/components/ui/Button/Button.js.map +1 -1
- package/dist/@ecme/components/ui/Card/Card.js +39 -40
- package/dist/@ecme/components/ui/Card/Card.js.map +1 -1
- package/dist/@ecme/components/ui/Checkbox/Checkbox.js +42 -42
- package/dist/@ecme/components/ui/Checkbox/Checkbox.js.map +1 -1
- package/dist/@ecme/components/ui/Checkbox/Group.js +27 -27
- package/dist/@ecme/components/ui/Checkbox/Group.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/BasePicker.js +67 -67
- package/dist/@ecme/components/ui/DatePicker/BasePicker.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/Calendar.js +18 -18
- package/dist/@ecme/components/ui/DatePicker/Calendar.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/CalendarBase.js +77 -78
- package/dist/@ecme/components/ui/DatePicker/CalendarBase.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/DatePicker.js +67 -71
- package/dist/@ecme/components/ui/DatePicker/DatePicker.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/DatePickerRange.js +94 -98
- package/dist/@ecme/components/ui/DatePicker/DatePickerRange.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/DateTimepicker.js +51 -58
- package/dist/@ecme/components/ui/DatePicker/DateTimepicker.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/tables/DateTable.js +67 -67
- package/dist/@ecme/components/ui/DatePicker/tables/DateTable.js.map +1 -1
- package/dist/@ecme/components/ui/DatePicker/tables/components/Day.js +12 -12
- package/dist/@ecme/components/ui/DatePicker/tables/components/Day.js.map +1 -1
- package/dist/@ecme/components/ui/Dialog/Dialog.js +25 -25
- package/dist/@ecme/components/ui/Dialog/Dialog.js.map +1 -1
- package/dist/@ecme/components/ui/Drawer/Drawer.js +32 -32
- package/dist/@ecme/components/ui/Drawer/Drawer.js.map +1 -1
- package/dist/@ecme/components/ui/Dropdown/DropdownItem.js +58 -58
- package/dist/@ecme/components/ui/Dropdown/DropdownItem.js.map +1 -1
- package/dist/@ecme/components/ui/Dropdown/DropdownMenu.js +99 -100
- package/dist/@ecme/components/ui/Dropdown/DropdownMenu.js.map +1 -1
- package/dist/@ecme/components/ui/Dropdown/DropdownSubItem.js +26 -26
- package/dist/@ecme/components/ui/Dropdown/DropdownSubItem.js.map +1 -1
- package/dist/@ecme/components/ui/Form/FormContainer.js +17 -17
- package/dist/@ecme/components/ui/Form/FormContainer.js.map +1 -1
- package/dist/@ecme/components/ui/Form/FormItem.js +38 -38
- package/dist/@ecme/components/ui/Form/FormItem.js.map +1 -1
- package/dist/@ecme/components/ui/Input/Input.js +50 -52
- package/dist/@ecme/components/ui/Input/Input.js.map +1 -1
- package/dist/@ecme/components/ui/InputGroup/Addon.js +12 -13
- package/dist/@ecme/components/ui/InputGroup/Addon.js.map +1 -1
- package/dist/@ecme/components/ui/InputGroup/InputGroup.js +10 -11
- package/dist/@ecme/components/ui/InputGroup/InputGroup.js.map +1 -1
- package/dist/@ecme/components/ui/Notification/Notification.js +19 -19
- package/dist/@ecme/components/ui/Notification/Notification.js.map +1 -1
- package/dist/@ecme/components/ui/Pagination/Pagination.js +45 -45
- package/dist/@ecme/components/ui/Pagination/Pagination.js.map +1 -1
- package/dist/@ecme/components/ui/Radio/Group.js +28 -28
- package/dist/@ecme/components/ui/Radio/Group.js.map +1 -1
- package/dist/@ecme/components/ui/Radio/Radio.js +42 -42
- package/dist/@ecme/components/ui/Radio/Radio.js.map +1 -1
- package/dist/@ecme/components/ui/Segment/SegmentItem.js +53 -53
- package/dist/@ecme/components/ui/Segment/SegmentItem.js.map +1 -1
- package/dist/@ecme/components/ui/Select/Select.js +40 -41
- package/dist/@ecme/components/ui/Select/Select.js.map +1 -1
- package/dist/@ecme/components/ui/Steps/StepItem.js +33 -33
- package/dist/@ecme/components/ui/Steps/StepItem.js.map +1 -1
- package/dist/@ecme/components/ui/Switcher/Switcher.js +24 -24
- package/dist/@ecme/components/ui/Switcher/Switcher.js.map +1 -1
- package/dist/@ecme/components/ui/Tabs/TabNav.js +22 -22
- package/dist/@ecme/components/ui/Tabs/TabNav.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/AmPmInput.js +25 -27
- package/dist/@ecme/components/ui/TimeInput/AmPmInput.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/TimeInput.js +130 -135
- package/dist/@ecme/components/ui/TimeInput/TimeInput.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/TimeInputField.js +22 -24
- package/dist/@ecme/components/ui/TimeInput/TimeInputField.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/TimeInputRange.js +65 -68
- package/dist/@ecme/components/ui/TimeInput/TimeInputRange.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/utils/createAmPmHandler.js +11 -12
- package/dist/@ecme/components/ui/TimeInput/utils/createAmPmHandler.js.map +1 -1
- package/dist/@ecme/components/ui/TimeInput/utils/createTimeHandler.js +19 -20
- package/dist/@ecme/components/ui/TimeInput/utils/createTimeHandler.js.map +1 -1
- package/dist/@ecme/components/ui/Upload/Upload.js +67 -68
- package/dist/@ecme/components/ui/Upload/Upload.js.map +1 -1
- package/dist/@ecme/components/ui/hooks/useCallbackRef.js +7 -10
- package/dist/@ecme/components/ui/hooks/useCallbackRef.js.map +1 -1
- package/dist/@ecme/components/ui/hooks/useRootClose.js +32 -32
- package/dist/@ecme/components/ui/hooks/useRootClose.js.map +1 -1
- package/dist/@ecme/components/ui/hooks/useTimeout.js +12 -13
- package/dist/@ecme/components/ui/hooks/useTimeout.js.map +1 -1
- package/dist/@ecme/components/ui/toast/ToastWrapper.js +58 -61
- package/dist/@ecme/components/ui/toast/ToastWrapper.js.map +1 -1
- package/dist/@ecme/components/ui/toast/toast.js +16 -19
- package/dist/@ecme/components/ui/toast/toast.js.map +1 -1
- package/dist/@ecme/components/view/Activity/ActivityEvent.js +63 -67
- package/dist/@ecme/components/view/Activity/ActivityEvent.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/components/Attachment.js +8 -9
- package/dist/@ecme/components/view/ChatBox/components/Attachment.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js +37 -39
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js.map +1 -1
- package/dist/@ecme/components/view/ChatBox/components/Message.js +10 -10
- package/dist/@ecme/components/view/ChatBox/components/Message.js.map +1 -1
- package/dist/@ecme/components/view/CreditCardDialog/CreditCardDialog.js +36 -37
- package/dist/@ecme/components/view/CreditCardDialog/CreditCardDialog.js.map +1 -1
- package/dist/@ecme/components/view/TaskItem/TaskItem.js +33 -33
- package/dist/@ecme/components/view/TaskItem/TaskItem.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/chatFakeApi.js +16 -18
- package/dist/@ecme/mock/fakeApi/chatFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/customersFakeApi.js +10 -11
- package/dist/@ecme/mock/fakeApi/customersFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/helpCenterFakeApi.js +10 -11
- package/dist/@ecme/mock/fakeApi/helpCenterFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/mailFakeApi.js +9 -10
- package/dist/@ecme/mock/fakeApi/mailFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/ordersFakeApi.js +9 -10
- package/dist/@ecme/mock/fakeApi/ordersFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/productsFakeApi.js +7 -8
- package/dist/@ecme/mock/fakeApi/productsFakeApi.js.map +1 -1
- package/dist/@ecme/mock/fakeApi/projectsFakeApi.js +10 -11
- package/dist/@ecme/mock/fakeApi/projectsFakeApi.js.map +1 -1
- package/dist/@ecme/utils/hooks/useInfiniteScroll.js +11 -11
- package/dist/@ecme/utils/hooks/useInfiniteScroll.js.map +1 -1
- package/dist/@ecme/utils/hooks/useMenuActive.js +11 -12
- package/dist/@ecme/utils/hooks/useMenuActive.js.map +1 -1
- package/dist/@ecme/views/auth/ForgotPassword/components/ForgotPasswordForm.js +36 -37
- package/dist/@ecme/views/auth/ForgotPassword/components/ForgotPasswordForm.js.map +1 -1
- package/dist/@ecme/views/auth/OtpVerification/OtpVerification.js +14 -14
- package/dist/@ecme/views/auth/OtpVerification/OtpVerification.js.map +1 -1
- package/dist/@ecme/views/auth/OtpVerification/components/OtpVerificationForm.js +41 -42
- package/dist/@ecme/views/auth/OtpVerification/components/OtpVerificationForm.js.map +1 -1
- package/dist/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.js +59 -60
- package/dist/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.js.map +1 -1
- package/dist/@ecme/views/auth/SignIn/components/OauthSignIn.js +27 -27
- package/dist/@ecme/views/auth/SignIn/components/OauthSignIn.js.map +1 -1
- package/dist/@ecme/views/auth/SignIn/components/SignInForm.js +57 -58
- package/dist/@ecme/views/auth/SignIn/components/SignInForm.js.map +1 -1
- package/dist/@ecme/views/auth/SignUp/components/SignUpForm.js +37 -38
- package/dist/@ecme/views/auth/SignUp/components/SignUpForm.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Pricing/components/PaymentDialog.js +44 -45
- package/dist/@ecme/views/concepts/accounts/Pricing/components/PaymentDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Pricing/components/Plans.js +5 -5
- package/dist/@ecme/views/concepts/accounts/Pricing/components/Plans.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsAccessDialog.js +34 -35
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsAccessDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserAction.js +26 -26
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserAction.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserTable.js +28 -29
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/components/RolesPermissionsUserTable.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/hooks/useRolePermissonsUsers.js +8 -8
- package/dist/@ecme/views/concepts/accounts/RolesPermissions/hooks/useRolePermissonsUsers.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingMobileMenu.js +10 -11
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingMobileMenu.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsBilling.js +48 -49
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsBilling.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsMenu.js +14 -14
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsMenu.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsProfile.js +102 -103
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsProfile.js.map +1 -1
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsSecurity.js +34 -35
- package/dist/@ecme/views/concepts/accounts/Settings/components/SettingsSecurity.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomAction.js +16 -16
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomAction.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomContent.js +76 -78
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatCustomContent.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistory.js +23 -23
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistory.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryItem.js +48 -49
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryItem.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryRenameDialog.js +34 -35
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatHistoryRenameDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatMobileNav.js +11 -14
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatMobileNav.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatSideNav.js +19 -19
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatSideNav.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js +22 -26
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/store/generativeChatStore.js +18 -24
- package/dist/@ecme/views/concepts/ai/Chat/store/generativeChatStore.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Image/components/ConfigDropdown.js +22 -22
- package/dist/@ecme/views/concepts/ai/Image/components/ConfigDropdown.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Image/components/GeneratorPrompt.js +31 -32
- package/dist/@ecme/views/concepts/ai/Image/components/GeneratorPrompt.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Image/components/ImageDialog.js +31 -32
- package/dist/@ecme/views/concepts/ai/Image/components/ImageDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/calendar/Calendar/Calendar.js +38 -39
- package/dist/@ecme/views/concepts/calendar/Calendar/Calendar.js.map +1 -1
- package/dist/@ecme/views/concepts/calendar/Calendar/components/EventDialog.js +68 -69
- package/dist/@ecme/views/concepts/calendar/Calendar/components/EventDialog.js.map +1 -1
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatBody.js +63 -66
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatBody.js.map +1 -1
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatList.js +21 -22
- package/dist/@ecme/views/concepts/chat/Chat/components/ChatList.js.map +1 -1
- package/dist/@ecme/views/concepts/chat/Chat/components/ContactInfoDrawer.js +84 -85
- package/dist/@ecme/views/concepts/chat/Chat/components/ContactInfoDrawer.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerDetails/ActivitySection.js +19 -19
- package/dist/@ecme/views/concepts/customers/CustomerDetails/ActivitySection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerDetails/BillingSection.js +51 -58
- package/dist/@ecme/views/concepts/customers/CustomerDetails/BillingSection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerDetails/ProfileSection.js +76 -89
- package/dist/@ecme/views/concepts/customers/CustomerDetails/ProfileSection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerForm/AddressSection.js +104 -107
- package/dist/@ecme/views/concepts/customers/CustomerForm/AddressSection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerForm/CustomerForm.js +22 -22
- package/dist/@ecme/views/concepts/customers/CustomerForm/CustomerForm.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerForm/OverviewSection.js +38 -39
- package/dist/@ecme/views/concepts/customers/CustomerForm/OverviewSection.js.map +1 -1
- package/dist/@ecme/views/concepts/customers/CustomerList/hooks/useCustomerList.js +20 -20
- package/dist/@ecme/views/concepts/customers/CustomerList/hooks/useCustomerList.js.map +1 -1
- package/dist/@ecme/views/concepts/files/FileManager/components/FileItemDropdown.js +32 -33
- package/dist/@ecme/views/concepts/files/FileManager/components/FileItemDropdown.js.map +1 -1
- package/dist/@ecme/views/concepts/help-center/EditArticle/components/EditArticleHeader.js +17 -18
- package/dist/@ecme/views/concepts/help-center/EditArticle/components/EditArticleHeader.js.map +1 -1
- package/dist/@ecme/views/concepts/help-center/ManageArticle/hooks/useManageArticle.js +5 -5
- package/dist/@ecme/views/concepts/help-center/ManageArticle/hooks/useManageArticle.js.map +1 -1
- package/dist/@ecme/views/concepts/help-center/SupportHub/components/TopSection.js +12 -13
- package/dist/@ecme/views/concepts/help-center/SupportHub/components/TopSection.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailAction.js +28 -29
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailAction.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailContent.js +63 -67
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailContent.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailTitle.js +8 -8
- package/dist/@ecme/views/concepts/mail/Mail/components/MailDetailTitle.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailEditor.js +36 -37
- package/dist/@ecme/views/concepts/mail/Mail/components/MailEditor.js.map +1 -1
- package/dist/@ecme/views/concepts/mail/Mail/components/MailList.js +134 -137
- package/dist/@ecme/views/concepts/mail/Mail/components/MailList.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderDetails/components/OrderDetailProducts.js +17 -17
- package/dist/@ecme/views/concepts/orders/OrderDetails/components/OrderDetailProducts.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderEdit/OrderEdit.js +35 -35
- package/dist/@ecme/views/concepts/orders/OrderEdit/OrderEdit.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderForm/OrderForm.js +38 -38
- package/dist/@ecme/views/concepts/orders/OrderForm/OrderForm.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderForm/components/BillingAddressSection.js +108 -111
- package/dist/@ecme/views/concepts/orders/OrderForm/components/BillingAddressSection.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderForm/components/CustomerDetailSection.js +44 -45
- package/dist/@ecme/views/concepts/orders/OrderForm/components/CustomerDetailSection.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderForm/components/PaymentMethodSection.js +211 -214
- package/dist/@ecme/views/concepts/orders/OrderForm/components/PaymentMethodSection.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderList/components/OrderListTableFilter.js +17 -17
- package/dist/@ecme/views/concepts/orders/OrderList/components/OrderListTableFilter.js.map +1 -1
- package/dist/@ecme/views/concepts/orders/OrderList/hooks/useOrderlist.js +15 -15
- package/dist/@ecme/views/concepts/orders/OrderList/hooks/useOrderlist.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/ProductForm.js +4 -4
- package/dist/@ecme/views/concepts/products/ProductForm/ProductForm.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/components/AttributeSection.js +97 -100
- package/dist/@ecme/views/concepts/products/ProductForm/components/AttributeSection.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/components/GeneralSection.js +68 -71
- package/dist/@ecme/views/concepts/products/ProductForm/components/GeneralSection.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/components/ImageSection.js +85 -86
- package/dist/@ecme/views/concepts/products/ProductForm/components/ImageSection.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductForm/components/PricingSection.js +121 -124
- package/dist/@ecme/views/concepts/products/ProductForm/components/PricingSection.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductList/components/ProductListSearch.js +11 -11
- package/dist/@ecme/views/concepts/products/ProductList/components/ProductListSearch.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductList/components/ProductTableFilter.js +17 -17
- package/dist/@ecme/views/concepts/products/ProductList/components/ProductTableFilter.js.map +1 -1
- package/dist/@ecme/views/concepts/products/ProductList/hooks/useProductList.js +17 -17
- package/dist/@ecme/views/concepts/products/ProductList/hooks/useProductList.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/Issue/components/IssueBody.js +101 -105
- package/dist/@ecme/views/concepts/projects/Issue/components/IssueBody.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/Issue/components/IssueFooter.js +57 -58
- package/dist/@ecme/views/concepts/projects/Issue/components/IssueFooter.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsHeader.js +51 -52
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsHeader.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsOverview.js +22 -23
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsOverview.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsSetting.js +45 -46
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsSetting.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsTask.js +62 -65
- package/dist/@ecme/views/concepts/projects/ProjectDetails/components/ProjectDetailsTask.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/components/NewProjectForm.js +52 -53
- package/dist/@ecme/views/concepts/projects/ProjectList/components/NewProjectForm.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/components/NewTaskField.js +23 -25
- package/dist/@ecme/views/concepts/projects/ProjectList/components/NewTaskField.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListContent.js +15 -15
- package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListContent.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListHeader.js +16 -16
- package/dist/@ecme/views/concepts/projects/ProjectList/components/ProjectListHeader.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ProjectList/hooks/useProjectList.js +9 -9
- package/dist/@ecme/views/concepts/projects/ProjectList/hooks/useProjectList.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewColumnContent.js +40 -41
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewColumnContent.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewTicketContent.js +33 -34
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/AddNewTicketContent.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/BoardCardList.js +33 -33
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/BoardCardList.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/TicketContent.js +203 -210
- package/dist/@ecme/views/concepts/projects/ScrumBoard/components/TicketContent.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/Tasks/components/AddTask.js +53 -56
- package/dist/@ecme/views/concepts/projects/Tasks/components/AddTask.js.map +1 -1
- package/dist/@ecme/views/concepts/projects/Tasks/components/TaskList.js +80 -83
- package/dist/@ecme/views/concepts/projects/Tasks/components/TaskList.js.map +1 -1
- package/dist/@ecme/views/dashboards/AnalyticDashboard/components/AnalyticHeader.js +6 -6
- package/dist/@ecme/views/dashboards/AnalyticDashboard/components/AnalyticHeader.js.map +1 -1
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/Overview.js +21 -21
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/Overview.js.map +1 -1
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/RevenueByChannel.js +27 -27
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/RevenueByChannel.js.map +1 -1
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/SalesTarget.js +27 -27
- package/dist/@ecme/views/dashboards/EcommerceDashboard/components/SalesTarget.js.map +1 -1
- package/dist/@ecme/views/dashboards/MarketingDashboard/components/CreateCampaign.js +59 -60
- package/dist/@ecme/views/dashboards/MarketingDashboard/components/CreateCampaign.js.map +1 -1
- package/dist/@ecme/views/dashboards/ProjectDashboard/components/CreateEventDialog.js +76 -77
- package/dist/@ecme/views/dashboards/ProjectDashboard/components/CreateEventDialog.js.map +1 -1
- package/dist/@ecme/views/dashboards/ProjectDashboard/components/UpcomingSchedule.js +30 -30
- package/dist/@ecme/views/dashboards/ProjectDashboard/components/UpcomingSchedule.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/CustomFormatInputDoc/WithForm.js +21 -22
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/CustomFormatInputDoc/WithForm.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/ImageGalleryDoc/Example.js +15 -15
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/ImageGalleryDoc/Example.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/NumericInputDoc/WithForm.js +20 -21
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/NumericInputDoc/WithForm.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/PatternInputDoc/WithForm.js +20 -21
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/PatternInputDoc/WithForm.js.map +1 -1
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/RichTextEditorDoc/WithForm.js +20 -21
- package/dist/@ecme/views/guide/SharedComponentsDoc/components/RichTextEditorDoc/WithForm.js.map +1 -1
- package/dist/@ecme/views/ui-components/data-display/Table/Editable.js +17 -18
- package/dist/@ecme/views/ui-components/data-display/Table/Editable.js.map +1 -1
- package/dist/@ecme/views/ui-components/data-display/Table/PaginationTable.js +12 -12
- package/dist/@ecme/views/ui-components/data-display/Table/PaginationTable.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/AsyncValidation.js +28 -29
- package/dist/@ecme/views/ui-components/forms/FormControl/AsyncValidation.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/Basic.js +21 -22
- package/dist/@ecme/views/ui-components/forms/FormControl/Basic.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/DependentValidation.js +24 -25
- package/dist/@ecme/views/ui-components/forms/FormControl/DependentValidation.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/DynamicForm.js +75 -79
- package/dist/@ecme/views/ui-components/forms/FormControl/DynamicForm.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/FieldValidation.js +19 -20
- package/dist/@ecme/views/ui-components/forms/FormControl/FieldValidation.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/MixedFormControl.js +90 -91
- package/dist/@ecme/views/ui-components/forms/FormControl/MixedFormControl.js.map +1 -1
- package/dist/@ecme/views/ui-components/forms/FormControl/SchemaValidation.js +22 -23
- package/dist/@ecme/views/ui-components/forms/FormControl/SchemaValidation.js.map +1 -1
- package/dist/@types/base/configs/api.config.d.ts +3 -22
- package/dist/@types/base/configs/api.config.d.ts.map +1 -1
- package/dist/base/assets/styles/init.css +1 -1
- package/dist/base/components/forms/ArraysForms/GenericArrayNumberFormSection.js +24 -25
- package/dist/base/components/forms/ArraysForms/GenericArrayNumberFormSection.js.map +1 -1
- package/dist/base/components/forms/ArraysForms/GenericArrayStringFormSection.js +23 -24
- package/dist/base/components/forms/ArraysForms/GenericArrayStringFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericFomrsSetValue/GenericNumberFormSectionPrice.js +30 -31
- package/dist/base/components/forms/GenericFomrsSetValue/GenericNumberFormSectionPrice.js.map +1 -1
- package/dist/base/components/forms/GenericFomrsSetValue/GenericStringFormSection.js +25 -26
- package/dist/base/components/forms/GenericFomrsSetValue/GenericStringFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericForms/GenericArrayFormSection.js +49 -50
- package/dist/base/components/forms/GenericForms/GenericArrayFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericForms/GenericNumberFormSection.js +27 -28
- package/dist/base/components/forms/GenericForms/GenericNumberFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericForms/GenericStringFormSection.js +23 -24
- package/dist/base/components/forms/GenericForms/GenericStringFormSection.js.map +1 -1
- package/dist/base/components/forms/GenericForms/GenericUploadFormSection.js +27 -28
- package/dist/base/components/forms/GenericForms/GenericUploadFormSection.js.map +1 -1
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPercentage.js +29 -30
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPercentage.js.map +1 -1
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPrice.js +27 -28
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionPrice.js.map +1 -1
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionWeight.js +27 -28
- package/dist/base/components/forms/NumberFormVariant/GenericNumberFormSectionWeight.js.map +1 -1
- package/dist/base/components/shared/TransferirProcessoDialog.js +10 -10
- package/dist/base/components/shared/TransferirProcessoDialog.js.map +1 -1
- package/dist/base/components/tools/NavFilter.js +68 -75
- package/dist/base/components/tools/NavFilter.js.map +1 -1
- package/dist/base/configs/api.config.js +15 -14
- package/dist/base/configs/api.config.js.map +1 -1
- package/dist/base/hooks/adm/roles/useRolesList.js +11 -11
- package/dist/base/hooks/adm/roles/useRolesList.js.map +1 -1
- package/dist/base/hooks/adm/users/useUsersList.js +10 -10
- package/dist/base/hooks/adm/users/useUsersList.js.map +1 -1
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerClienteList.js +5 -5
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerClienteList.js.map +1 -1
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFornecedorList.js +7 -7
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerFornecedorList.js.map +1 -1
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerList.js +10 -10
- package/dist/base/hooks/dm/businessPartner/useBusinessPartnerList.js.map +1 -1
- package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoByCodigoList.js +8 -8
- package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoList.js +8 -8
- package/dist/base/hooks/dm/canalDistribuicao/useCanalDistribuicaoList.js.map +1 -1
- package/dist/base/hooks/dm/centro/useCentroByCodigoList.js +13 -13
- package/dist/base/hooks/dm/centro/useCentroByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/centro/useCentroList.js +6 -6
- package/dist/base/hooks/dm/centro/useCentroList.js.map +1 -1
- package/dist/base/hooks/dm/condicaoPagamento/useCondicaoPagamentoList.js +4 -4
- package/dist/base/hooks/dm/condicaoPagamento/useCondicaoPagamentoList.js.map +1 -1
- package/dist/base/hooks/dm/deposito/useDepositoByCodigoList.js +9 -9
- package/dist/base/hooks/dm/deposito/useDepositoByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/deposito/useDepositoList.js +5 -5
- package/dist/base/hooks/dm/deposito/useDepositoList.js.map +1 -1
- package/dist/base/hooks/dm/deposito/useDepositosByCodigoCentroList.js +13 -13
- package/dist/base/hooks/dm/deposito/useDepositosByCodigoCentroList.js.map +1 -1
- package/dist/base/hooks/dm/equipeVenda/useEquipeVendaByCodigoList.js +8 -8
- package/dist/base/hooks/dm/equipeVenda/useEquipeVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/equipeVenda/useEquipeVendaList.js +6 -6
- package/dist/base/hooks/dm/equipeVenda/useEquipeVendaList.js.map +1 -1
- package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaByCodigoList.js +10 -10
- package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaList.js +7 -7
- package/dist/base/hooks/dm/escritorioVenda/useEscritorioVendaList.js.map +1 -1
- package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoByCodigoList.js +10 -10
- package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoList.js +1 -1
- package/dist/base/hooks/dm/formaPagamento/useFormaPagamentoList.js.map +1 -1
- package/dist/base/hooks/dm/grupoVenda/useGrupoVendaByCodigoList.js +11 -11
- package/dist/base/hooks/dm/grupoVenda/useGrupoVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/grupoVenda/useGrupoVendaList.js +9 -9
- package/dist/base/hooks/dm/grupoVenda/useGrupoVendaList.js.map +1 -1
- package/dist/base/hooks/dm/incoterms/useIncotermsList.js +17 -18
- package/dist/base/hooks/dm/incoterms/useIncotermsList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoByCodigoList.js +13 -13
- package/dist/base/hooks/dm/produto/useProdutoByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoByGrupoProdutoList.js +21 -21
- package/dist/base/hooks/dm/produto/useProdutoByGrupoProdutoList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoFindList.js +8 -8
- package/dist/base/hooks/dm/produto/useProdutoFindList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoFindMonitorList.js +11 -11
- package/dist/base/hooks/dm/produto/useProdutoFindMonitorList.js.map +1 -1
- package/dist/base/hooks/dm/produto/useProdutoIsPrecificadoRacaoList.js +9 -9
- package/dist/base/hooks/dm/produto/useProdutoIsPrecificadoRacaoList.js.map +1 -1
- package/dist/base/hooks/dm/setorAtividade/useSetorAtividadeList.js +5 -5
- package/dist/base/hooks/dm/setorAtividade/useSetorAtividadeList.js.map +1 -1
- package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaByCodigoList.js +9 -9
- package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaList.js +9 -9
- package/dist/base/hooks/dm/tipoDocumentoVenda/useTipoDocumentoVendaList.js.map +1 -1
- package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaByCodigoList.js +10 -10
- package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaByCodigoList.js.map +1 -1
- package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaList.js +9 -9
- package/dist/base/hooks/dm/tipoOrdemVenda/useTipoOrdemVendaList.js.map +1 -1
- package/dist/base/hooks/useList.js +10 -10
- package/dist/base/hooks/useList.js.map +1 -1
- package/dist/base/services/modules/transportadora/ControleDescarga/ControleDescargaService.js +15 -15
- package/dist/base/services/modules/transportadora/ControleDescarga/ControleDescargaService.js.map +1 -1
- package/dist/base/services/modules/transportadora/ControleEmbarque/ControleEmbarqueService.js +7 -7
- package/dist/base/services/modules/transportadora/ControleEmbarque/ControleEmbarqueService.js.map +1 -1
- package/dist/base/services/modules/transportadora/NaturezaCarga/NaturezaCargaService.js +5 -5
- package/dist/base/services/modules/transportadora/NaturezaCarga/NaturezaCargaService.js.map +1 -1
- package/dist/base/utils/functions/stringUtils.js +14 -15
- package/dist/base/utils/functions/stringUtils.js.map +1 -1
- package/lib/base/configs/api.config.ts +9 -7
- package/package.json +1 -1
- package/tsconfig.json +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtpVerification.js","sources":["../../../../../lib/@ecme/views/auth/OtpVerification/OtpVerification.tsx"],"sourcesContent":["import Alert from '@/components/ui/Alert'\nimport OtpVerificationForm from './components/OtpVerificationForm'\nimport sleep from '@/utils/sleep'\nimport useTimeOutMessage from '@/utils/hooks/useTimeOutMessage'\n\nexport const OtpVerificationBase = () => {\n const [otpVerified, setOtpVerified] = useTimeOutMessage()\n const [otpResend, setOtpResend] = useTimeOutMessage()\n const [message, setMessage] = useTimeOutMessage()\n\n const handleResendOtp = async () => {\n try {\n /** simulate api call with sleep */\n await sleep(500)\n setOtpResend('We have sent you One Time Password.')\n } catch (errors) {\n setMessage?.(\n typeof errors === 'string' ? errors : 'Some error occured!',\n )\n }\n }\n\n return (\n <div>\n <div className=\"mb-8\">\n <h3 className=\"mb-2\">OTP Verification</h3>\n <p className=\"font-semibold heading-text\">\n We have sent you One Time Password to your email.\n </p>\n </div>\n {message && (\n <Alert showIcon className=\"mb-4\" type=\"danger\">\n <span className=\"break-all\">{message}</span>\n </Alert>\n )}\n {otpResend && (\n <Alert showIcon className=\"mb-4\" type=\"info\">\n <span className=\"break-all\">{otpResend}</span>\n </Alert>\n )}\n {otpVerified && (\n <Alert showIcon className=\"mb-4\" type=\"success\">\n <span className=\"break-all\">{otpVerified}</span>\n </Alert>\n )}\n <OtpVerificationForm\n setMessage={setMessage}\n setOtpVerified={setOtpVerified}\n />\n <div className=\"mt-4 text-center\">\n <span className=\"font-semibold\">Din't receive OTP? </span>\n <button\n className=\"heading-text font-bold underline\"\n onClick={handleResendOtp}\n >\n Resend OTP\n </button>\n </div>\n </div>\n )\n}\n\nconst OtpVerification = () => {\n return <OtpVerificationBase />\n}\n\nexport default OtpVerification\n"],"names":["OtpVerificationBase","otpVerified","setOtpVerified","useTimeOutMessage","otpResend","setOtpResend","message","setMessage","jsxs","jsx","Alert","OtpVerificationForm","sleep","errors","OtpVerification"],"mappings":";;;;;;AAKO,MAAMA,IAAsB,MAAM;AACrC,QAAM,CAACC,GAAaC,CAAc,IAAIC,EAAA,GAChC,CAACC,GAAWC,CAAY,IAAIF,EAAA,GAC5B,CAACG,GAASC,CAAU,IAAIJ,EAAA;AAc9B,2BACK,OAAA,EACG,UAAA;AAAA,IAAA,gBAAAK,EAAC,OAAA,EAAI,WAAU,QACX,UAAA;AAAA,MAAA,gBAAAC,EAAC,MAAA,EAAG,WAAU,QAAO,UAAA,oBAAgB;AAAA,MACrC,gBAAAA,EAAC,KAAA,EAAE,WAAU,8BAA6B,UAAA,oDAAA,CAE1C;AAAA,IAAA,GACJ;AAAA,IACCH,KACG,gBAAAG,EAACC,GAAA,EAAM,UAAQ,IAAC,WAAU,QAAO,MAAK,UAClC,UAAA,gBAAAD,EAAC,QAAA,EAAK,WAAU,aAAa,aAAQ,GACzC;AAAA,IAEHL,KACG,gBAAAK,EAACC,GAAA,EAAM,UAAQ,IAAC,WAAU,QAAO,MAAK,QAClC,UAAA,gBAAAD,EAAC,QAAA,EAAK,WAAU,aAAa,aAAU,GAC3C;AAAA,IAEHR,KACG,gBAAAQ,EAACC,GAAA,EAAM,UAAQ,IAAC,WAAU,QAAO,MAAK,WAClC,UAAA,gBAAAD,EAAC,QAAA,EAAK,WAAU,aAAa,aAAY,GAC7C;AAAA,IAEJ,gBAAAA;AAAA,MAACE;AAAA,MAAA;AAAA,QACG,YAAAJ;AAAA,QACA,gBAAAL;AAAA,MAAA;AAAA,IAAA;AAAA,IAEJ,gBAAAM,EAAC,OAAA,EAAI,WAAU,oBACX,UAAA;AAAA,MAAA,gBAAAC,EAAC,QAAA,EAAK,WAAU,iBAAgB,UAAA,uBAAwB;AAAA,MACxD,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,WAAU;AAAA,UACV,SA3CQ,YAAY;AAChC,gBAAI;AAEA,oBAAMG,EAAM,GAAG,GACfP,EAAa,qCAAqC;AAAA,YACtD,SAASQ,GAAQ;AACb,cAAAN
|
|
1
|
+
{"version":3,"file":"OtpVerification.js","sources":["../../../../../lib/@ecme/views/auth/OtpVerification/OtpVerification.tsx"],"sourcesContent":["import Alert from '@/components/ui/Alert'\nimport OtpVerificationForm from './components/OtpVerificationForm'\nimport sleep from '@/utils/sleep'\nimport useTimeOutMessage from '@/utils/hooks/useTimeOutMessage'\n\nexport const OtpVerificationBase = () => {\n const [otpVerified, setOtpVerified] = useTimeOutMessage()\n const [otpResend, setOtpResend] = useTimeOutMessage()\n const [message, setMessage] = useTimeOutMessage()\n\n const handleResendOtp = async () => {\n try {\n /** simulate api call with sleep */\n await sleep(500)\n setOtpResend('We have sent you One Time Password.')\n } catch (errors) {\n setMessage?.(\n typeof errors === 'string' ? errors : 'Some error occured!',\n )\n }\n }\n\n return (\n <div>\n <div className=\"mb-8\">\n <h3 className=\"mb-2\">OTP Verification</h3>\n <p className=\"font-semibold heading-text\">\n We have sent you One Time Password to your email.\n </p>\n </div>\n {message && (\n <Alert showIcon className=\"mb-4\" type=\"danger\">\n <span className=\"break-all\">{message}</span>\n </Alert>\n )}\n {otpResend && (\n <Alert showIcon className=\"mb-4\" type=\"info\">\n <span className=\"break-all\">{otpResend}</span>\n </Alert>\n )}\n {otpVerified && (\n <Alert showIcon className=\"mb-4\" type=\"success\">\n <span className=\"break-all\">{otpVerified}</span>\n </Alert>\n )}\n <OtpVerificationForm\n setMessage={setMessage}\n setOtpVerified={setOtpVerified}\n />\n <div className=\"mt-4 text-center\">\n <span className=\"font-semibold\">Din't receive OTP? </span>\n <button\n className=\"heading-text font-bold underline\"\n onClick={handleResendOtp}\n >\n Resend OTP\n </button>\n </div>\n </div>\n )\n}\n\nconst OtpVerification = () => {\n return <OtpVerificationBase />\n}\n\nexport default OtpVerification\n"],"names":["OtpVerificationBase","otpVerified","setOtpVerified","useTimeOutMessage","otpResend","setOtpResend","message","setMessage","jsxs","jsx","Alert","OtpVerificationForm","sleep","errors","OtpVerification"],"mappings":";;;;;;AAKO,MAAMA,IAAsB,MAAM;AACrC,QAAM,CAACC,GAAaC,CAAc,IAAIC,EAAA,GAChC,CAACC,GAAWC,CAAY,IAAIF,EAAA,GAC5B,CAACG,GAASC,CAAU,IAAIJ,EAAA;AAc9B,2BACK,OAAA,EACG,UAAA;AAAA,IAAA,gBAAAK,EAAC,OAAA,EAAI,WAAU,QACX,UAAA;AAAA,MAAA,gBAAAC,EAAC,MAAA,EAAG,WAAU,QAAO,UAAA,oBAAgB;AAAA,MACrC,gBAAAA,EAAC,KAAA,EAAE,WAAU,8BAA6B,UAAA,oDAAA,CAE1C;AAAA,IAAA,GACJ;AAAA,IACCH,KACG,gBAAAG,EAACC,GAAA,EAAM,UAAQ,IAAC,WAAU,QAAO,MAAK,UAClC,UAAA,gBAAAD,EAAC,QAAA,EAAK,WAAU,aAAa,aAAQ,GACzC;AAAA,IAEHL,KACG,gBAAAK,EAACC,GAAA,EAAM,UAAQ,IAAC,WAAU,QAAO,MAAK,QAClC,UAAA,gBAAAD,EAAC,QAAA,EAAK,WAAU,aAAa,aAAU,GAC3C;AAAA,IAEHR,KACG,gBAAAQ,EAACC,GAAA,EAAM,UAAQ,IAAC,WAAU,QAAO,MAAK,WAClC,UAAA,gBAAAD,EAAC,QAAA,EAAK,WAAU,aAAa,aAAY,GAC7C;AAAA,IAEJ,gBAAAA;AAAA,MAACE;AAAA,MAAA;AAAA,QACG,YAAAJ;AAAA,QACA,gBAAAL;AAAA,MAAA;AAAA,IAAA;AAAA,IAEJ,gBAAAM,EAAC,OAAA,EAAI,WAAU,oBACX,UAAA;AAAA,MAAA,gBAAAC,EAAC,QAAA,EAAK,WAAU,iBAAgB,UAAA,uBAAwB;AAAA,MACxD,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,WAAU;AAAA,UACV,SA3CQ,YAAY;AAChC,gBAAI;AAEA,oBAAMG,EAAM,GAAG,GACfP,EAAa,qCAAqC;AAAA,YACtD,SAASQ,GAAQ;AACb,cAAAN;AAAA,gBACI,OAAOM,KAAW,WAAWA,IAAS;AAAA,cAAA;AAAA,YAE9C;AAAA,UACJ;AAAA,UAkCa,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAED,EAAA,CACJ;AAAA,EAAA,GACJ;AAER,GAEMC,IAAkB,wBACZd,GAAA,EAAoB;"}
|
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h } from "react";
|
|
3
3
|
import "../../../../components/ui/Button/index.js";
|
|
4
4
|
import "../../../../components/ui/Form/index.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useForm as
|
|
8
|
-
import { zodResolver as
|
|
9
|
-
import { z as
|
|
10
|
-
import { Form as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
otp:
|
|
15
|
-
}),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
resolver: P(j)
|
|
5
|
+
import S from "../../../../components/shared/OtpInput.js";
|
|
6
|
+
import O from "../../../../utils/sleep.js";
|
|
7
|
+
import { useForm as v, Controller as b } from "react-hook-form";
|
|
8
|
+
import { zodResolver as y } from "@hookform/resolvers/zod";
|
|
9
|
+
import { z as n } from "zod";
|
|
10
|
+
import { Form as P } from "../../../../components/ui/Form/Form.js";
|
|
11
|
+
import T from "../../../../components/ui/Form/FormItem.js";
|
|
12
|
+
import x from "../../../../components/ui/Button/Button.js";
|
|
13
|
+
const m = 6, F = n.object({
|
|
14
|
+
otp: n.string().min(m, { message: "Please enter a valid OTP" })
|
|
15
|
+
}), L = (a) => {
|
|
16
|
+
const [r, e] = h(!1), { className: l, setMessage: p, setOtpVerified: c } = a, {
|
|
17
|
+
handleSubmit: f,
|
|
18
|
+
formState: { errors: i },
|
|
19
|
+
control: d
|
|
20
|
+
} = v({
|
|
21
|
+
resolver: y(F)
|
|
23
22
|
});
|
|
24
|
-
return /* @__PURE__ */ o("div", { className:
|
|
25
|
-
const { otp:
|
|
26
|
-
|
|
23
|
+
return /* @__PURE__ */ o("div", { className: l, children: /* @__PURE__ */ g(P, { onSubmit: f(async (t) => {
|
|
24
|
+
const { otp: u } = t;
|
|
25
|
+
e(!0);
|
|
27
26
|
try {
|
|
28
|
-
await
|
|
29
|
-
} catch (
|
|
30
|
-
|
|
31
|
-
typeof
|
|
32
|
-
),
|
|
27
|
+
await O(1e3), e(!1), c?.("OTP verified!");
|
|
28
|
+
} catch (s) {
|
|
29
|
+
p?.(
|
|
30
|
+
typeof s == "string" ? s : "Some error occured!"
|
|
31
|
+
), e(!1);
|
|
33
32
|
}
|
|
34
|
-
console.log("otp",
|
|
33
|
+
console.log("otp", u), e(!1);
|
|
35
34
|
}), children: [
|
|
36
35
|
/* @__PURE__ */ o(
|
|
37
|
-
|
|
36
|
+
T,
|
|
38
37
|
{
|
|
39
|
-
invalid: !!
|
|
40
|
-
errorMessage:
|
|
38
|
+
invalid: !!i.otp,
|
|
39
|
+
errorMessage: i.otp?.message,
|
|
41
40
|
children: /* @__PURE__ */ o(
|
|
42
|
-
|
|
41
|
+
b,
|
|
43
42
|
{
|
|
44
43
|
name: "otp",
|
|
45
|
-
control:
|
|
46
|
-
render: ({ field:
|
|
47
|
-
|
|
44
|
+
control: d,
|
|
45
|
+
render: ({ field: t }) => /* @__PURE__ */ o(
|
|
46
|
+
S,
|
|
48
47
|
{
|
|
49
48
|
placeholder: "",
|
|
50
49
|
inputClass: "h-[58px]",
|
|
51
|
-
length:
|
|
52
|
-
...
|
|
50
|
+
length: m,
|
|
51
|
+
...t
|
|
53
52
|
}
|
|
54
53
|
)
|
|
55
54
|
}
|
|
@@ -57,18 +56,18 @@ const p = 6, j = l.object({
|
|
|
57
56
|
}
|
|
58
57
|
),
|
|
59
58
|
/* @__PURE__ */ o(
|
|
60
|
-
|
|
59
|
+
x,
|
|
61
60
|
{
|
|
62
61
|
block: !0,
|
|
63
|
-
loading:
|
|
62
|
+
loading: r,
|
|
64
63
|
variant: "solid",
|
|
65
64
|
type: "submit",
|
|
66
|
-
children:
|
|
65
|
+
children: r ? "Verifying..." : "Verify OTP"
|
|
67
66
|
}
|
|
68
67
|
)
|
|
69
68
|
] }) });
|
|
70
69
|
};
|
|
71
70
|
export {
|
|
72
|
-
|
|
71
|
+
L as default
|
|
73
72
|
};
|
|
74
73
|
//# sourceMappingURL=OtpVerificationForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtpVerificationForm.js","sources":["../../../../../../lib/@ecme/views/auth/OtpVerification/components/OtpVerificationForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport Button from '@/components/ui/Button'\nimport { FormItem, Form } from '@/components/ui/Form'\nimport OtpInput from '@/components/shared/OtpInput'\nimport sleep from '@/utils/sleep'\nimport { useForm, Controller } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport type { ZodType } from 'zod'\nimport type { CommonProps } from '@/@types/common'\n\ninterface OtpVerificationFormProps extends CommonProps {\n setOtpVerified?: (message: string) => void\n setMessage?: (message: string) => void\n}\n\ntype ForgotPasswordFormSchema = {\n otp: string\n}\n\nconst OTP_LENGTH = 6\n\nconst validationSchema: ZodType<ForgotPasswordFormSchema> = z.object({\n otp: z.string().min(OTP_LENGTH, { message: 'Please enter a valid OTP' }),\n})\n\nconst OtpVerificationForm = (props: OtpVerificationFormProps) => {\n const [isSubmitting, setSubmitting] = useState<boolean>(false)\n\n const { className, setMessage, setOtpVerified } = props\n\n const {\n handleSubmit,\n formState: { errors },\n control,\n } = useForm<ForgotPasswordFormSchema>({\n resolver: zodResolver(validationSchema),\n })\n\n const onOtpSend = async (values: ForgotPasswordFormSchema) => {\n const { otp } = values\n setSubmitting(true)\n try {\n /** simulate api call with sleep */\n await sleep(1000)\n setSubmitting(false)\n setOtpVerified?.('OTP verified!')\n } catch (errors) {\n setMessage?.(\n typeof errors === 'string' ? errors : 'Some error occured!',\n )\n setSubmitting(false)\n }\n\n console.log('otp', otp)\n setSubmitting(false)\n }\n\n return (\n <div className={className}>\n <Form onSubmit={handleSubmit(onOtpSend)}>\n <FormItem\n invalid={Boolean(errors.otp)}\n errorMessage={errors.otp?.message}\n >\n <Controller\n name=\"otp\"\n control={control}\n render={({ field }) => (\n <OtpInput\n placeholder=\"\"\n inputClass=\"h-[58px]\"\n length={OTP_LENGTH}\n {...field}\n />\n )}\n />\n </FormItem>\n <Button\n block\n loading={isSubmitting}\n variant=\"solid\"\n type=\"submit\"\n >\n {isSubmitting ? 'Verifying...' : 'Verify OTP'}\n </Button>\n </Form>\n </div>\n )\n}\n\nexport default OtpVerificationForm\n"],"names":["OTP_LENGTH","validationSchema","z","OtpVerificationForm","props","isSubmitting","setSubmitting","useState","className","setMessage","setOtpVerified","handleSubmit","errors","control","useForm","zodResolver","jsx","jsxs","Form","values","otp","sleep","FormItem","
|
|
1
|
+
{"version":3,"file":"OtpVerificationForm.js","sources":["../../../../../../lib/@ecme/views/auth/OtpVerification/components/OtpVerificationForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport Button from '@/components/ui/Button'\nimport { FormItem, Form } from '@/components/ui/Form'\nimport OtpInput from '@/components/shared/OtpInput'\nimport sleep from '@/utils/sleep'\nimport { useForm, Controller } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport type { ZodType } from 'zod'\nimport type { CommonProps } from '@/@types/common'\n\ninterface OtpVerificationFormProps extends CommonProps {\n setOtpVerified?: (message: string) => void\n setMessage?: (message: string) => void\n}\n\ntype ForgotPasswordFormSchema = {\n otp: string\n}\n\nconst OTP_LENGTH = 6\n\nconst validationSchema: ZodType<ForgotPasswordFormSchema> = z.object({\n otp: z.string().min(OTP_LENGTH, { message: 'Please enter a valid OTP' }),\n})\n\nconst OtpVerificationForm = (props: OtpVerificationFormProps) => {\n const [isSubmitting, setSubmitting] = useState<boolean>(false)\n\n const { className, setMessage, setOtpVerified } = props\n\n const {\n handleSubmit,\n formState: { errors },\n control,\n } = useForm<ForgotPasswordFormSchema>({\n resolver: zodResolver(validationSchema),\n })\n\n const onOtpSend = async (values: ForgotPasswordFormSchema) => {\n const { otp } = values\n setSubmitting(true)\n try {\n /** simulate api call with sleep */\n await sleep(1000)\n setSubmitting(false)\n setOtpVerified?.('OTP verified!')\n } catch (errors) {\n setMessage?.(\n typeof errors === 'string' ? errors : 'Some error occured!',\n )\n setSubmitting(false)\n }\n\n console.log('otp', otp)\n setSubmitting(false)\n }\n\n return (\n <div className={className}>\n <Form onSubmit={handleSubmit(onOtpSend)}>\n <FormItem\n invalid={Boolean(errors.otp)}\n errorMessage={errors.otp?.message}\n >\n <Controller\n name=\"otp\"\n control={control}\n render={({ field }) => (\n <OtpInput\n placeholder=\"\"\n inputClass=\"h-[58px]\"\n length={OTP_LENGTH}\n {...field}\n />\n )}\n />\n </FormItem>\n <Button\n block\n loading={isSubmitting}\n variant=\"solid\"\n type=\"submit\"\n >\n {isSubmitting ? 'Verifying...' : 'Verify OTP'}\n </Button>\n </Form>\n </div>\n )\n}\n\nexport default OtpVerificationForm\n"],"names":["OTP_LENGTH","validationSchema","z","OtpVerificationForm","props","isSubmitting","setSubmitting","useState","className","setMessage","setOtpVerified","handleSubmit","errors","control","useForm","zodResolver","jsx","jsxs","Form","values","otp","sleep","FormItem","Controller","field","OtpInput","Button"],"mappings":";;;;;;;;;;;;AAoBA,MAAMA,IAAa,GAEbC,IAAsDC,EAAE,OAAO;AAAA,EACjE,KAAKA,EAAE,OAAA,EAAS,IAAIF,GAAY,EAAE,SAAS,2BAAA,CAA4B;AAC3E,CAAC,GAEKG,IAAsB,CAACC,MAAoC;AAC7D,QAAM,CAACC,GAAcC,CAAa,IAAIC,EAAkB,EAAK,GAEvD,EAAE,WAAAC,GAAW,YAAAC,GAAY,gBAAAC,EAAA,IAAmBN,GAE5C;AAAA,IACF,cAAAO;AAAA,IACA,WAAW,EAAE,QAAAC,EAAA;AAAA,IACb,SAAAC;AAAA,EAAA,IACAC,EAAkC;AAAA,IAClC,UAAUC,EAAYd,CAAgB;AAAA,EAAA,CACzC;AAqBD,SACI,gBAAAe,EAAC,SAAI,WAAAR,GACD,UAAA,gBAAAS,EAACC,KAAK,UAAUP,EArBN,OAAOQ,MAAqC;AAC1D,UAAM,EAAE,KAAAC,MAAQD;AAChB,IAAAb,EAAc,EAAI;AAClB,QAAI;AAEA,YAAMe,EAAM,GAAI,GAChBf,EAAc,EAAK,GACnBI,IAAiB,eAAe;AAAA,IACpC,SAASE,GAAQ;AACb,MAAAH;AAAA,QACI,OAAOG,KAAW,WAAWA,IAAS;AAAA,MAAA,GAE1CN,EAAc,EAAK;AAAA,IACvB;AAEA,YAAQ,IAAI,OAAOc,CAAG,GACtBd,EAAc,EAAK;AAAA,EACvB,CAI8C,GAClC,UAAA;AAAA,IAAA,gBAAAU;AAAA,MAACM;AAAA,MAAA;AAAA,QACG,SAAS,EAAQV,EAAO;AAAA,QACxB,cAAcA,EAAO,KAAK;AAAA,QAE1B,UAAA,gBAAAI;AAAA,UAACO;AAAA,UAAA;AAAA,YACG,MAAK;AAAA,YACL,SAAAV;AAAA,YACA,QAAQ,CAAC,EAAE,OAAAW,EAAA,MACP,gBAAAR;AAAA,cAACS;AAAAA,cAAA;AAAA,gBACG,aAAY;AAAA,gBACZ,YAAW;AAAA,gBACX,QAAQzB;AAAA,gBACP,GAAGwB;AAAA,cAAA;AAAA,YAAA;AAAA,UACR;AAAA,QAAA;AAAA,MAER;AAAA,IAAA;AAAA,IAEJ,gBAAAR;AAAA,MAACU;AAAA,MAAA;AAAA,QACG,OAAK;AAAA,QACL,SAASrB;AAAA,QACT,SAAQ;AAAA,QACR,MAAK;AAAA,QAEJ,cAAe,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACrC,EAAA,CACJ,EAAA,CACJ;AAER;"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as o, jsxs as R, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { useState as L } from "react";
|
|
3
3
|
import "../../../../components/ui/Button/index.js";
|
|
4
4
|
import "../../../../components/ui/Form/index.js";
|
|
5
|
-
import
|
|
6
|
-
import { apiResetPassword as
|
|
7
|
-
import { useForm as
|
|
8
|
-
import { zodResolver as
|
|
5
|
+
import f from "../../../../components/shared/PasswordInput.js";
|
|
6
|
+
import { apiResetPassword as F } from "../../../../services/AuthService.js";
|
|
7
|
+
import { useForm as I, Controller as p } from "react-hook-form";
|
|
8
|
+
import { zodResolver as k } from "@hookform/resolvers/zod";
|
|
9
9
|
import { z as s } from "zod";
|
|
10
10
|
import "../../../../auth/index.js";
|
|
11
|
-
import { useNavigate as
|
|
12
|
-
import
|
|
13
|
-
import { useThemeStore as
|
|
14
|
-
import { LAYOUT_COLLAPSIBLE_SIDE as
|
|
15
|
-
import
|
|
16
|
-
import { Form as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
const
|
|
11
|
+
import { useNavigate as B } from "react-router-dom";
|
|
12
|
+
import N from "../../../../configs/app.config.js";
|
|
13
|
+
import { useThemeStore as _ } from "../../../../store/themeStore.js";
|
|
14
|
+
import { LAYOUT_COLLAPSIBLE_SIDE as j } from "../../../../constants/theme.constant.js";
|
|
15
|
+
import x from "../../../../auth/useAuth.js";
|
|
16
|
+
import { Form as M } from "../../../../components/ui/Form/Form.js";
|
|
17
|
+
import c from "../../../../components/ui/Form/FormItem.js";
|
|
18
|
+
import T from "../../../../components/ui/Button/Button.js";
|
|
19
|
+
const U = s.object({
|
|
20
20
|
token: s.string().optional(),
|
|
21
21
|
id: s.string().optional(),
|
|
22
22
|
newPassword: s.string({ required_error: "Por favor digite uma senha" }),
|
|
@@ -26,103 +26,102 @@ const H = s.object({
|
|
|
26
26
|
}).refine((t) => t.newPassword === t.confirmPassword, {
|
|
27
27
|
message: "As senhas não são iguais.",
|
|
28
28
|
path: ["confirmPassword"]
|
|
29
|
-
}),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
resetComplete: y,
|
|
29
|
+
}), to = (t) => {
|
|
30
|
+
const [i, a] = L(!1), u = B(), { updateUserSession: w } = x(), h = _((r) => r.setLayout), {
|
|
31
|
+
className: P,
|
|
32
|
+
setMessage: g,
|
|
33
|
+
setResetComplete: v,
|
|
34
|
+
resetComplete: S,
|
|
36
35
|
children: C,
|
|
37
|
-
type:
|
|
38
|
-
userId:
|
|
39
|
-
token:
|
|
36
|
+
type: b,
|
|
37
|
+
userId: y,
|
|
38
|
+
token: m
|
|
40
39
|
} = t, {
|
|
41
|
-
handleSubmit:
|
|
40
|
+
handleSubmit: E,
|
|
42
41
|
formState: { errors: n },
|
|
43
|
-
control:
|
|
44
|
-
} =
|
|
45
|
-
resolver:
|
|
42
|
+
control: d
|
|
43
|
+
} = I({
|
|
44
|
+
resolver: k(U)
|
|
46
45
|
});
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
const { newPassword:
|
|
46
|
+
return /* @__PURE__ */ o("div", { className: P, children: S ? /* @__PURE__ */ o(A, { children: C }) : /* @__PURE__ */ R(M, { onSubmit: E(async (r) => {
|
|
47
|
+
const { newPassword: l } = r;
|
|
49
48
|
a(!0);
|
|
50
49
|
try {
|
|
51
50
|
let e;
|
|
52
|
-
if (
|
|
53
|
-
if (!
|
|
51
|
+
if (b === "RECUPERARSENHA") {
|
|
52
|
+
if (!m)
|
|
54
53
|
throw new Error("Token de recuperação não fornecido.");
|
|
55
|
-
e = { token:
|
|
54
|
+
e = { token: m, password: l };
|
|
56
55
|
} else
|
|
57
|
-
e = { id:
|
|
58
|
-
await
|
|
56
|
+
e = { id: y ?? "", password: l };
|
|
57
|
+
await F(e), a(!1), v?.(!0), w({ primeiroAcesso: !1 }), h(j), u(N.authenticatedEntryPath);
|
|
59
58
|
} catch (e) {
|
|
60
|
-
|
|
59
|
+
g?.(
|
|
61
60
|
typeof e == "string" ? e : "Houve um erro ao alterar sua senha."
|
|
62
61
|
), a(!1);
|
|
63
62
|
}
|
|
64
63
|
a(!1);
|
|
65
64
|
}), children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
65
|
+
/* @__PURE__ */ o(
|
|
66
|
+
c,
|
|
68
67
|
{
|
|
69
68
|
label: "Senha",
|
|
70
69
|
invalid: !!n.newPassword,
|
|
71
|
-
errorMessage:
|
|
72
|
-
children: /* @__PURE__ */
|
|
73
|
-
|
|
70
|
+
errorMessage: n.newPassword?.message,
|
|
71
|
+
children: /* @__PURE__ */ o(
|
|
72
|
+
p,
|
|
74
73
|
{
|
|
75
74
|
name: "newPassword",
|
|
76
|
-
control:
|
|
77
|
-
render: ({ field:
|
|
78
|
-
|
|
75
|
+
control: d,
|
|
76
|
+
render: ({ field: r }) => /* @__PURE__ */ o(
|
|
77
|
+
f,
|
|
79
78
|
{
|
|
80
79
|
autoComplete: "off",
|
|
81
80
|
placeholder: "••••••••••••",
|
|
82
|
-
...
|
|
81
|
+
...r
|
|
83
82
|
}
|
|
84
83
|
)
|
|
85
84
|
}
|
|
86
85
|
)
|
|
87
86
|
}
|
|
88
87
|
),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
|
|
88
|
+
/* @__PURE__ */ o(
|
|
89
|
+
c,
|
|
91
90
|
{
|
|
92
91
|
label: "Confirmar Senha",
|
|
93
92
|
invalid: !!n.confirmPassword,
|
|
94
|
-
errorMessage:
|
|
95
|
-
children: /* @__PURE__ */
|
|
96
|
-
|
|
93
|
+
errorMessage: n.confirmPassword?.message,
|
|
94
|
+
children: /* @__PURE__ */ o(
|
|
95
|
+
p,
|
|
97
96
|
{
|
|
98
97
|
name: "confirmPassword",
|
|
99
|
-
control:
|
|
100
|
-
render: ({ field:
|
|
101
|
-
|
|
98
|
+
control: d,
|
|
99
|
+
render: ({ field: r }) => /* @__PURE__ */ o(
|
|
100
|
+
f,
|
|
102
101
|
{
|
|
103
102
|
autoComplete: "off",
|
|
104
103
|
placeholder: "Confirm Password",
|
|
105
|
-
...
|
|
104
|
+
...r
|
|
106
105
|
}
|
|
107
106
|
)
|
|
108
107
|
}
|
|
109
108
|
)
|
|
110
109
|
}
|
|
111
110
|
),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
|
|
111
|
+
/* @__PURE__ */ o(
|
|
112
|
+
T,
|
|
114
113
|
{
|
|
115
114
|
className: "mt-5",
|
|
116
115
|
block: !0,
|
|
117
|
-
loading:
|
|
116
|
+
loading: i,
|
|
118
117
|
variant: "solid",
|
|
119
118
|
type: "submit",
|
|
120
|
-
children:
|
|
119
|
+
children: i ? "Enviando..." : "Enviar"
|
|
121
120
|
}
|
|
122
121
|
)
|
|
123
122
|
] }) });
|
|
124
123
|
};
|
|
125
124
|
export {
|
|
126
|
-
|
|
125
|
+
to as default
|
|
127
126
|
};
|
|
128
127
|
//# sourceMappingURL=ResetPasswordForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPasswordForm.js","sources":["../../../../../../lib/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport Button from \"@/components/ui/Button\";\nimport { FormItem, Form } from \"@/components/ui/Form\";\nimport PasswordInput from \"@/components/shared/PasswordInput\";\nimport { apiResetPassword } from \"@/services/AuthService\";\nimport { useForm, Controller } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport { z } from \"zod\";\nimport type { ZodType } from \"zod\";\nimport type { CommonProps } from \"@/@types/common\";\nimport { TAlterarPasswordType } from \"@base/@types/models/auth\";\nimport { useAuth } from \"@/auth\";\nimport { useNavigate } from \"react-router-dom\";\nimport appConfig from \"@/configs/app.config\";\nimport { useThemeStore } from \"@/store/themeStore\";\nimport { LAYOUT_COLLAPSIBLE_SIDE } from \"@/constants/theme.constant\";\n\ninterface ResetPasswordFormProps extends CommonProps {\n resetComplete: boolean;\n setResetComplete?: (compplete: boolean) => void;\n setMessage?: (message: string) => void;\n type: TAlterarPasswordType;\n userId?: string;\n token?: string;\n}\n\ntype ResetPasswordFormSchema = {\n newPassword: string;\n confirmPassword: string;\n};\n\nconst validationSchema: ZodType<ResetPasswordFormSchema> = z\n .object({\n token: z.string().optional(),\n id: z.string().optional(),\n newPassword: z.string({ required_error: \"Por favor digite uma senha\" }),\n confirmPassword: z.string({\n required_error: \"Confirme sua nova senha.\",\n }),\n })\n .refine((data) => data.newPassword === data.confirmPassword, {\n message: \"As senhas não são iguais.\",\n path: [\"confirmPassword\"],\n });\n\nconst ResetPasswordForm = (props: ResetPasswordFormProps) => {\n const [isSubmitting, setSubmitting] = useState<boolean>(false);\n const navigate = useNavigate();\n const { updateUserSession } = useAuth();\n const setLayout = useThemeStore((state) => state.setLayout);\n\n const {\n className,\n setMessage,\n setResetComplete,\n resetComplete,\n children,\n type,\n userId,\n token,\n } = props;\n\n const {\n handleSubmit,\n formState: { errors },\n control,\n } = useForm<ResetPasswordFormSchema>({\n resolver: zodResolver(validationSchema),\n });\n\n const onResetPassword = async (values: ResetPasswordFormSchema) => {\n const { newPassword } = values;\n setSubmitting(true);\n\n try {\n let payload;\n if (type === \"RECUPERARSENHA\") {\n if (!token) {\n throw new Error(\"Token de recuperação não fornecido.\");\n }\n payload = { token, password: newPassword };\n } else {\n payload = { id: userId ?? \"\", password: newPassword };\n }\n await apiResetPassword(payload);\n\n setSubmitting(false);\n setResetComplete?.(true);\n updateUserSession({ primeiroAcesso: false });\n setLayout(LAYOUT_COLLAPSIBLE_SIDE);\n navigate(appConfig.authenticatedEntryPath);\n } catch (errors) {\n setMessage?.(\n typeof errors === \"string\"\n ? errors\n : \"Houve um erro ao alterar sua senha.\"\n );\n setSubmitting(false);\n }\n\n setSubmitting(false);\n };\n\n return (\n <div className={className}>\n {!resetComplete ? (\n <Form onSubmit={handleSubmit(onResetPassword)}>\n <FormItem\n label=\"Senha\"\n invalid={Boolean(errors.newPassword)}\n errorMessage={errors.newPassword?.message}\n >\n <Controller\n name=\"newPassword\"\n control={control}\n render={({ field }) => (\n <PasswordInput\n autoComplete=\"off\"\n placeholder=\"••••••••••••\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Confirmar Senha\"\n invalid={Boolean(errors.confirmPassword)}\n errorMessage={errors.confirmPassword?.message}\n >\n <Controller\n name=\"confirmPassword\"\n control={control}\n render={({ field }) => (\n <PasswordInput\n autoComplete=\"off\"\n placeholder=\"Confirm Password\"\n {...field}\n />\n )}\n />\n </FormItem>\n <Button\n className=\"mt-5\"\n block\n loading={isSubmitting}\n variant=\"solid\"\n type=\"submit\"\n >\n {isSubmitting ? \"Enviando...\" : \"Enviar\"}\n </Button>\n </Form>\n ) : (\n <>{children}</>\n )}\n </div>\n );\n};\n\nexport default ResetPasswordForm;\n"],"names":["validationSchema","z","data","ResetPasswordForm","props","isSubmitting","setSubmitting","useState","navigate","useNavigate","updateUserSession","useAuth","setLayout","useThemeStore","state","className","setMessage","setResetComplete","resetComplete","children","type","userId","token","handleSubmit","errors","control","useForm","zodResolver","jsx","Fragment","Form","values","newPassword","payload","apiResetPassword","LAYOUT_COLLAPSIBLE_SIDE","appConfig","FormItem","
|
|
1
|
+
{"version":3,"file":"ResetPasswordForm.js","sources":["../../../../../../lib/@ecme/views/auth/ResetPassword/components/ResetPasswordForm.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport Button from \"@/components/ui/Button\";\nimport { FormItem, Form } from \"@/components/ui/Form\";\nimport PasswordInput from \"@/components/shared/PasswordInput\";\nimport { apiResetPassword } from \"@/services/AuthService\";\nimport { useForm, Controller } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport { z } from \"zod\";\nimport type { ZodType } from \"zod\";\nimport type { CommonProps } from \"@/@types/common\";\nimport { TAlterarPasswordType } from \"@base/@types/models/auth\";\nimport { useAuth } from \"@/auth\";\nimport { useNavigate } from \"react-router-dom\";\nimport appConfig from \"@/configs/app.config\";\nimport { useThemeStore } from \"@/store/themeStore\";\nimport { LAYOUT_COLLAPSIBLE_SIDE } from \"@/constants/theme.constant\";\n\ninterface ResetPasswordFormProps extends CommonProps {\n resetComplete: boolean;\n setResetComplete?: (compplete: boolean) => void;\n setMessage?: (message: string) => void;\n type: TAlterarPasswordType;\n userId?: string;\n token?: string;\n}\n\ntype ResetPasswordFormSchema = {\n newPassword: string;\n confirmPassword: string;\n};\n\nconst validationSchema: ZodType<ResetPasswordFormSchema> = z\n .object({\n token: z.string().optional(),\n id: z.string().optional(),\n newPassword: z.string({ required_error: \"Por favor digite uma senha\" }),\n confirmPassword: z.string({\n required_error: \"Confirme sua nova senha.\",\n }),\n })\n .refine((data) => data.newPassword === data.confirmPassword, {\n message: \"As senhas não são iguais.\",\n path: [\"confirmPassword\"],\n });\n\nconst ResetPasswordForm = (props: ResetPasswordFormProps) => {\n const [isSubmitting, setSubmitting] = useState<boolean>(false);\n const navigate = useNavigate();\n const { updateUserSession } = useAuth();\n const setLayout = useThemeStore((state) => state.setLayout);\n\n const {\n className,\n setMessage,\n setResetComplete,\n resetComplete,\n children,\n type,\n userId,\n token,\n } = props;\n\n const {\n handleSubmit,\n formState: { errors },\n control,\n } = useForm<ResetPasswordFormSchema>({\n resolver: zodResolver(validationSchema),\n });\n\n const onResetPassword = async (values: ResetPasswordFormSchema) => {\n const { newPassword } = values;\n setSubmitting(true);\n\n try {\n let payload;\n if (type === \"RECUPERARSENHA\") {\n if (!token) {\n throw new Error(\"Token de recuperação não fornecido.\");\n }\n payload = { token, password: newPassword };\n } else {\n payload = { id: userId ?? \"\", password: newPassword };\n }\n await apiResetPassword(payload);\n\n setSubmitting(false);\n setResetComplete?.(true);\n updateUserSession({ primeiroAcesso: false });\n setLayout(LAYOUT_COLLAPSIBLE_SIDE);\n navigate(appConfig.authenticatedEntryPath);\n } catch (errors) {\n setMessage?.(\n typeof errors === \"string\"\n ? errors\n : \"Houve um erro ao alterar sua senha.\"\n );\n setSubmitting(false);\n }\n\n setSubmitting(false);\n };\n\n return (\n <div className={className}>\n {!resetComplete ? (\n <Form onSubmit={handleSubmit(onResetPassword)}>\n <FormItem\n label=\"Senha\"\n invalid={Boolean(errors.newPassword)}\n errorMessage={errors.newPassword?.message}\n >\n <Controller\n name=\"newPassword\"\n control={control}\n render={({ field }) => (\n <PasswordInput\n autoComplete=\"off\"\n placeholder=\"••••••••••••\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Confirmar Senha\"\n invalid={Boolean(errors.confirmPassword)}\n errorMessage={errors.confirmPassword?.message}\n >\n <Controller\n name=\"confirmPassword\"\n control={control}\n render={({ field }) => (\n <PasswordInput\n autoComplete=\"off\"\n placeholder=\"Confirm Password\"\n {...field}\n />\n )}\n />\n </FormItem>\n <Button\n className=\"mt-5\"\n block\n loading={isSubmitting}\n variant=\"solid\"\n type=\"submit\"\n >\n {isSubmitting ? \"Enviando...\" : \"Enviar\"}\n </Button>\n </Form>\n ) : (\n <>{children}</>\n )}\n </div>\n );\n};\n\nexport default ResetPasswordForm;\n"],"names":["validationSchema","z","data","ResetPasswordForm","props","isSubmitting","setSubmitting","useState","navigate","useNavigate","updateUserSession","useAuth","setLayout","useThemeStore","state","className","setMessage","setResetComplete","resetComplete","children","type","userId","token","handleSubmit","errors","control","useForm","zodResolver","jsx","Fragment","Form","values","newPassword","payload","apiResetPassword","LAYOUT_COLLAPSIBLE_SIDE","appConfig","FormItem","Controller","field","PasswordInput","Button"],"mappings":";;;;;;;;;;;;;;;;;;AA+BA,MAAMA,IAAqDC,EACxD,OAAO;AAAA,EACN,OAAOA,EAAE,OAAA,EAAS,SAAA;AAAA,EAClB,IAAIA,EAAE,OAAA,EAAS,SAAA;AAAA,EACf,aAAaA,EAAE,OAAO,EAAE,gBAAgB,8BAA8B;AAAA,EACtE,iBAAiBA,EAAE,OAAO;AAAA,IACxB,gBAAgB;AAAA,EAAA,CACjB;AACH,CAAC,EACA,OAAO,CAACC,MAASA,EAAK,gBAAgBA,EAAK,iBAAiB;AAAA,EAC3D,SAAS;AAAA,EACT,MAAM,CAAC,iBAAiB;AAC1B,CAAC,GAEGC,KAAoB,CAACC,MAAkC;AAC3D,QAAM,CAACC,GAAcC,CAAa,IAAIC,EAAkB,EAAK,GACvDC,IAAWC,EAAA,GACX,EAAE,mBAAAC,EAAA,IAAsBC,EAAA,GACxBC,IAAYC,EAAc,CAACC,MAAUA,EAAM,SAAS,GAEpD;AAAA,IACJ,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,IACElB,GAEE;AAAA,IACJ,cAAAmB;AAAA,IACA,WAAW,EAAE,QAAAC,EAAA;AAAA,IACb,SAAAC;AAAA,EAAA,IACEC,EAAiC;AAAA,IACnC,UAAUC,EAAY3B,CAAgB;AAAA,EAAA,CACvC;AAmCD,SACE,gBAAA4B,EAAC,OAAA,EAAI,WAAAb,GACF,UAACG,IA+CA,gBAAAU,EAAAC,GAAA,EAAG,UAAAV,EAAA,CAAS,sBA9CXW,GAAA,EAAK,UAAUP,EApCE,OAAOQ,MAAoC;AACjE,UAAM,EAAE,aAAAC,MAAgBD;AACxB,IAAAzB,EAAc,EAAI;AAElB,QAAI;AACF,UAAI2B;AACJ,UAAIb,MAAS,kBAAkB;AAC7B,YAAI,CAACE;AACH,gBAAM,IAAI,MAAM,qCAAqC;AAEvD,QAAAW,IAAU,EAAE,OAAAX,GAAO,UAAUU,EAAA;AAAA,MAC/B;AACE,QAAAC,IAAU,EAAE,IAAIZ,KAAU,IAAI,UAAUW,EAAA;AAE1C,YAAME,EAAiBD,CAAO,GAE9B3B,EAAc,EAAK,GACnBW,IAAmB,EAAI,GACvBP,EAAkB,EAAE,gBAAgB,IAAO,GAC3CE,EAAUuB,CAAuB,GACjC3B,EAAS4B,EAAU,sBAAsB;AAAA,IAC3C,SAASZ,GAAQ;AACf,MAAAR;AAAA,QACE,OAAOQ,KAAW,WACdA,IACA;AAAA,MAAA,GAENlB,EAAc,EAAK;AAAA,IACrB;AAEA,IAAAA,EAAc,EAAK;AAAA,EACrB,CAKkD,GAC1C,UAAA;AAAA,IAAA,gBAAAsB;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,SAAS,EAAQb,EAAO;AAAA,QACxB,cAAcA,EAAO,aAAa;AAAA,QAElC,UAAA,gBAAAI;AAAA,UAACU;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAAAb;AAAA,YACA,QAAQ,CAAC,EAAE,OAAAc,EAAA,MACT,gBAAAX;AAAA,cAACY;AAAA,cAAA;AAAA,gBACC,cAAa;AAAA,gBACb,aAAY;AAAA,gBACX,GAAGD;AAAA,cAAA;AAAA,YAAA;AAAA,UACN;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,IAEF,gBAAAX;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,SAAS,EAAQb,EAAO;AAAA,QACxB,cAAcA,EAAO,iBAAiB;AAAA,QAEtC,UAAA,gBAAAI;AAAA,UAACU;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAAAb;AAAA,YACA,QAAQ,CAAC,EAAE,OAAAc,EAAA,MACT,gBAAAX;AAAA,cAACY;AAAA,cAAA;AAAA,gBACC,cAAa;AAAA,gBACb,aAAY;AAAA,gBACX,GAAGD;AAAA,cAAA;AAAA,YAAA;AAAA,UACN;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,IAEF,gBAAAX;AAAA,MAACa;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAK;AAAA,QACL,SAASpC;AAAA,QACT,SAAQ;AAAA,QACR,MAAK;AAAA,QAEJ,cAAe,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,EAClC,EAAA,CACF,EAEY,CAEhB;AAEJ;"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "../../../../components/ui/Button/index.js";
|
|
3
3
|
import "../../../../auth/index.js";
|
|
4
|
-
import { apiGoogleOauthSignIn as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const N = ({ setMessage:
|
|
8
|
-
const { oAuthSignIn:
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
|
|
4
|
+
import { apiGoogleOauthSignIn as h, apiGithubOauthSignIn as p } from "../../../../services/OAuthServices.js";
|
|
5
|
+
import m from "../../../../auth/useAuth.js";
|
|
6
|
+
import g from "../../../../components/ui/Button/Button.js";
|
|
7
|
+
const N = ({ setMessage: r, disableSubmit: a }) => {
|
|
8
|
+
const { oAuthSignIn: l } = m();
|
|
9
|
+
return /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
10
|
+
/* @__PURE__ */ e(
|
|
11
|
+
g,
|
|
12
12
|
{
|
|
13
13
|
className: "flex-1",
|
|
14
14
|
type: "button",
|
|
15
15
|
onClick: async () => {
|
|
16
|
-
|
|
16
|
+
a || l(async ({ redirect: t, onSignIn: i }) => {
|
|
17
17
|
try {
|
|
18
|
-
const n = await
|
|
18
|
+
const n = await h();
|
|
19
19
|
if (n) {
|
|
20
|
-
const { token:
|
|
21
|
-
|
|
20
|
+
const { token: o, user: s } = n;
|
|
21
|
+
i({ accessToken: o }, s), t();
|
|
22
22
|
}
|
|
23
23
|
} catch (n) {
|
|
24
|
-
|
|
24
|
+
r?.(n?.toString() || "");
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
},
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
28
|
+
children: /* @__PURE__ */ c("div", { className: "flex items-center justify-center gap-2", children: [
|
|
29
|
+
/* @__PURE__ */ e(
|
|
30
30
|
"img",
|
|
31
31
|
{
|
|
32
32
|
className: "h-[25px] w-[25px]",
|
|
@@ -34,30 +34,30 @@ const N = ({ setMessage: i, disableSubmit: r }) => {
|
|
|
34
34
|
alt: "Google sign in"
|
|
35
35
|
}
|
|
36
36
|
),
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ e("span", { children: "Google" })
|
|
38
38
|
] })
|
|
39
39
|
}
|
|
40
40
|
),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
|
|
41
|
+
/* @__PURE__ */ e(
|
|
42
|
+
g,
|
|
43
43
|
{
|
|
44
44
|
className: "flex-1",
|
|
45
45
|
type: "button",
|
|
46
46
|
onClick: async () => {
|
|
47
|
-
|
|
47
|
+
a || l(async ({ redirect: t, onSignIn: i }) => {
|
|
48
48
|
try {
|
|
49
|
-
const n = await
|
|
49
|
+
const n = await p();
|
|
50
50
|
if (n) {
|
|
51
|
-
const { token:
|
|
52
|
-
|
|
51
|
+
const { token: o, user: s } = n;
|
|
52
|
+
i({ accessToken: o }, s), t();
|
|
53
53
|
}
|
|
54
54
|
} catch (n) {
|
|
55
|
-
|
|
55
|
+
r?.(n?.toString() || "");
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
},
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
59
|
+
children: /* @__PURE__ */ c("div", { className: "flex items-center justify-center gap-2", children: [
|
|
60
|
+
/* @__PURE__ */ e(
|
|
61
61
|
"img",
|
|
62
62
|
{
|
|
63
63
|
className: "h-[25px] w-[25px]",
|
|
@@ -65,7 +65,7 @@ const N = ({ setMessage: i, disableSubmit: r }) => {
|
|
|
65
65
|
alt: "Google sign in"
|
|
66
66
|
}
|
|
67
67
|
),
|
|
68
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ e("span", { children: "Github" })
|
|
69
69
|
] })
|
|
70
70
|
}
|
|
71
71
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OauthSignIn.js","sources":["../../../../../../lib/@ecme/views/auth/SignIn/components/OauthSignIn.tsx"],"sourcesContent":["import Button from '@/components/ui/Button'\nimport { useAuth } from '@/auth'\nimport {\n apiGoogleOauthSignIn,\n apiGithubOauthSignIn,\n} from '@/services/OAuthServices'\n\ntype OauthSignInProps = {\n setMessage?: (message: string) => void\n disableSubmit?: boolean\n}\n\nconst OauthSignIn = ({ setMessage, disableSubmit }: OauthSignInProps) => {\n const { oAuthSignIn } = useAuth()\n\n const handleGoogleSignIn = async () => {\n if (!disableSubmit) {\n oAuthSignIn(async ({ redirect, onSignIn }) => {\n try {\n const resp = await apiGoogleOauthSignIn()\n if (resp) {\n const { token, user } = resp\n onSignIn({ accessToken: token }, user)\n redirect()\n }\n } catch (error) {\n setMessage?.((error as string)?.toString() || '')\n }\n })\n }\n }\n\n const handleGithubSignIn = async () => {\n if (!disableSubmit) {\n oAuthSignIn(async ({ redirect, onSignIn }) => {\n try {\n const resp = await apiGithubOauthSignIn()\n if (resp) {\n const { token, user } = resp\n onSignIn({ accessToken: token }, user)\n redirect()\n }\n } catch (error) {\n setMessage?.((error as string)?.toString() || '')\n }\n })\n }\n }\n\n return (\n <div className=\"flex items-center gap-2\">\n <Button\n className=\"flex-1\"\n type=\"button\"\n onClick={handleGoogleSignIn}\n >\n <div className=\"flex items-center justify-center gap-2\">\n <img\n className=\"h-[25px] w-[25px]\"\n src=\"/img/others/google.png\"\n alt=\"Google sign in\"\n />\n <span>Google</span>\n </div>\n </Button>\n <Button\n className=\"flex-1\"\n type=\"button\"\n onClick={handleGithubSignIn}\n >\n <div className=\"flex items-center justify-center gap-2\">\n <img\n className=\"h-[25px] w-[25px]\"\n src=\"/img/others/github.png\"\n alt=\"Google sign in\"\n />\n <span>Github</span>\n </div>\n </Button>\n </div>\n )\n}\n\nexport default OauthSignIn\n"],"names":["OauthSignIn","setMessage","disableSubmit","oAuthSignIn","useAuth","jsxs","jsx","Button","redirect","onSignIn","resp","apiGoogleOauthSignIn","token","user","error","apiGithubOauthSignIn"],"mappings":";;;;;;AAYA,MAAMA,IAAc,CAAC,EAAE,YAAAC,GAAY,eAAAC,QAAsC;AACrE,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA;AAoCxB,SACI,gBAAAC,EAAC,OAAA,EAAI,WAAU,2BACX,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACG,WAAU;AAAA,QACV,MAAK;AAAA,QACL,SAvCe,YAAY;AACnC,UAAKL,KACDC,EAAY,OAAO,EAAE,UAAAK,GAAU,UAAAC,QAAe;AAC1C,gBAAI;AACA,oBAAMC,IAAO,MAAMC,EAAA;AACnB,kBAAID,GAAM;AACN,sBAAM,EAAE,OAAAE,GAAO,MAAAC,EAAA,IAASH;AACxB,gBAAAD,EAAS,EAAE,aAAaG,EAAA,GAASC,CAAI,GACrCL,EAAA;AAAA,cACJ;AAAA,YACJ,SAASM,GAAO;AACZ,cAAAb,
|
|
1
|
+
{"version":3,"file":"OauthSignIn.js","sources":["../../../../../../lib/@ecme/views/auth/SignIn/components/OauthSignIn.tsx"],"sourcesContent":["import Button from '@/components/ui/Button'\nimport { useAuth } from '@/auth'\nimport {\n apiGoogleOauthSignIn,\n apiGithubOauthSignIn,\n} from '@/services/OAuthServices'\n\ntype OauthSignInProps = {\n setMessage?: (message: string) => void\n disableSubmit?: boolean\n}\n\nconst OauthSignIn = ({ setMessage, disableSubmit }: OauthSignInProps) => {\n const { oAuthSignIn } = useAuth()\n\n const handleGoogleSignIn = async () => {\n if (!disableSubmit) {\n oAuthSignIn(async ({ redirect, onSignIn }) => {\n try {\n const resp = await apiGoogleOauthSignIn()\n if (resp) {\n const { token, user } = resp\n onSignIn({ accessToken: token }, user)\n redirect()\n }\n } catch (error) {\n setMessage?.((error as string)?.toString() || '')\n }\n })\n }\n }\n\n const handleGithubSignIn = async () => {\n if (!disableSubmit) {\n oAuthSignIn(async ({ redirect, onSignIn }) => {\n try {\n const resp = await apiGithubOauthSignIn()\n if (resp) {\n const { token, user } = resp\n onSignIn({ accessToken: token }, user)\n redirect()\n }\n } catch (error) {\n setMessage?.((error as string)?.toString() || '')\n }\n })\n }\n }\n\n return (\n <div className=\"flex items-center gap-2\">\n <Button\n className=\"flex-1\"\n type=\"button\"\n onClick={handleGoogleSignIn}\n >\n <div className=\"flex items-center justify-center gap-2\">\n <img\n className=\"h-[25px] w-[25px]\"\n src=\"/img/others/google.png\"\n alt=\"Google sign in\"\n />\n <span>Google</span>\n </div>\n </Button>\n <Button\n className=\"flex-1\"\n type=\"button\"\n onClick={handleGithubSignIn}\n >\n <div className=\"flex items-center justify-center gap-2\">\n <img\n className=\"h-[25px] w-[25px]\"\n src=\"/img/others/github.png\"\n alt=\"Google sign in\"\n />\n <span>Github</span>\n </div>\n </Button>\n </div>\n )\n}\n\nexport default OauthSignIn\n"],"names":["OauthSignIn","setMessage","disableSubmit","oAuthSignIn","useAuth","jsxs","jsx","Button","redirect","onSignIn","resp","apiGoogleOauthSignIn","token","user","error","apiGithubOauthSignIn"],"mappings":";;;;;;AAYA,MAAMA,IAAc,CAAC,EAAE,YAAAC,GAAY,eAAAC,QAAsC;AACrE,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA;AAoCxB,SACI,gBAAAC,EAAC,OAAA,EAAI,WAAU,2BACX,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACG,WAAU;AAAA,QACV,MAAK;AAAA,QACL,SAvCe,YAAY;AACnC,UAAKL,KACDC,EAAY,OAAO,EAAE,UAAAK,GAAU,UAAAC,QAAe;AAC1C,gBAAI;AACA,oBAAMC,IAAO,MAAMC,EAAA;AACnB,kBAAID,GAAM;AACN,sBAAM,EAAE,OAAAE,GAAO,MAAAC,EAAA,IAASH;AACxB,gBAAAD,EAAS,EAAE,aAAaG,EAAA,GAASC,CAAI,GACrCL,EAAA;AAAA,cACJ;AAAA,YACJ,SAASM,GAAO;AACZ,cAAAb,IAAca,GAAkB,SAAA,KAAc,EAAE;AAAA,YACpD;AAAA,UACJ,CAAC;AAAA,QAET;AAAA,QA0BY,UAAA,gBAAAT,EAAC,OAAA,EAAI,WAAU,0CACX,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,WAAU;AAAA,cACV,KAAI;AAAA,cACJ,KAAI;AAAA,YAAA;AAAA,UAAA;AAAA,UAER,gBAAAA,EAAC,UAAK,UAAA,SAAA,CAAM;AAAA,QAAA,EAAA,CAChB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEJ,gBAAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACG,WAAU;AAAA,QACV,MAAK;AAAA,QACL,SApCe,YAAY;AACnC,UAAKL,KACDC,EAAY,OAAO,EAAE,UAAAK,GAAU,UAAAC,QAAe;AAC1C,gBAAI;AACA,oBAAMC,IAAO,MAAMK,EAAA;AACnB,kBAAIL,GAAM;AACN,sBAAM,EAAE,OAAAE,GAAO,MAAAC,EAAA,IAASH;AACxB,gBAAAD,EAAS,EAAE,aAAaG,EAAA,GAASC,CAAI,GACrCL,EAAA;AAAA,cACJ;AAAA,YACJ,SAASM,GAAO;AACZ,cAAAb,IAAca,GAAkB,SAAA,KAAc,EAAE;AAAA,YACpD;AAAA,UACJ,CAAC;AAAA,QAET;AAAA,QAuBY,UAAA,gBAAAT,EAAC,OAAA,EAAI,WAAU,0CACX,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,WAAU;AAAA,cACV,KAAI;AAAA,cACJ,KAAI;AAAA,YAAA;AAAA,UAAA;AAAA,UAER,gBAAAA,EAAC,UAAK,UAAA,SAAA,CAAM;AAAA,QAAA,EAAA,CAChB;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GACJ;AAER;"}
|