@solidxai/core-ui 0.1.8-beta.9 → 0.1.9-alpha.0
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 +2 -2
- package/dist/adapters/auth/getSession.d.ts.map +1 -1
- package/dist/adapters/auth/getSession.js +1 -1
- package/dist/adapters/auth/getSession.js.map +1 -1
- package/dist/adapters/auth/getSession.ts +1 -0
- package/dist/adapters/auth/helper.d.ts.map +1 -1
- package/dist/adapters/auth/helper.js +1 -0
- package/dist/adapters/auth/helper.js.map +1 -1
- package/dist/adapters/auth/helper.ts +3 -1
- package/dist/adapters/auth/signIn.d.ts.map +1 -1
- package/dist/adapters/auth/signIn.js +1 -0
- package/dist/adapters/auth/signIn.js.map +1 -1
- package/dist/adapters/auth/signIn.ts +3 -1
- package/dist/adapters/auth/signInWithOAuthAccessCode.d.ts +1 -0
- package/dist/adapters/auth/signInWithOAuthAccessCode.d.ts.map +1 -1
- package/dist/adapters/auth/signInWithOAuthAccessCode.js +10 -9
- package/dist/adapters/auth/signInWithOAuthAccessCode.js.map +1 -1
- package/dist/adapters/auth/signInWithOAuthAccessCode.ts +6 -3
- package/dist/adapters/auth/signOut.d.ts.map +1 -1
- package/dist/adapters/auth/signOut.js +7 -1
- package/dist/adapters/auth/signOut.js.map +1 -1
- package/dist/adapters/auth/signOut.ts +7 -1
- package/dist/adapters/auth/types.d.ts +1 -0
- package/dist/adapters/auth/types.d.ts.map +1 -1
- package/dist/adapters/auth/types.js.map +1 -1
- package/dist/adapters/auth/types.ts +1 -0
- package/dist/components/auth/AuthLayout.d.ts +1 -1
- package/dist/components/auth/AuthLayout.d.ts.map +1 -1
- package/dist/components/auth/AuthLayout.js +92 -22
- package/dist/components/auth/AuthLayout.js.map +1 -1
- package/dist/components/auth/AuthLayout.tsx +38 -12
- package/dist/components/auth/AuthSettingsContext.d.ts +10 -0
- package/dist/components/auth/AuthSettingsContext.d.ts.map +1 -0
- package/dist/components/auth/AuthSettingsContext.js +49 -0
- package/dist/components/auth/AuthSettingsContext.js.map +1 -0
- package/dist/components/auth/AuthSettingsContext.tsx +19 -0
- package/dist/components/auth/FacebookAuthChecking.d.ts +2 -0
- package/dist/components/auth/FacebookAuthChecking.d.ts.map +1 -0
- package/dist/components/auth/FacebookAuthChecking.js +98 -0
- package/dist/components/auth/FacebookAuthChecking.js.map +1 -0
- package/dist/components/auth/FacebookAuthChecking.tsx +59 -0
- package/dist/components/auth/ForgotPasswordThankYou.d.ts.map +1 -1
- package/dist/components/auth/ForgotPasswordThankYou.js +3 -7
- package/dist/components/auth/ForgotPasswordThankYou.js.map +1 -1
- package/dist/components/auth/ForgotPasswordThankYou.tsx +4 -9
- package/dist/components/auth/GoogleAuthChecking.d.ts.map +1 -1
- package/dist/components/auth/GoogleAuthChecking.js +10 -16
- package/dist/components/auth/GoogleAuthChecking.js.map +1 -1
- package/dist/components/auth/GoogleAuthChecking.tsx +2 -7
- package/dist/components/auth/MicrosoftAuthChecking.d.ts +2 -0
- package/dist/components/auth/MicrosoftAuthChecking.d.ts.map +1 -0
- package/dist/components/auth/MicrosoftAuthChecking.js +98 -0
- package/dist/components/auth/MicrosoftAuthChecking.js.map +1 -0
- package/dist/components/auth/MicrosoftAuthChecking.tsx +59 -0
- package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -1
- package/dist/components/auth/SolidForgotPassword.js +3 -7
- package/dist/components/auth/SolidForgotPassword.js.map +1 -1
- package/dist/components/auth/SolidForgotPassword.tsx +4 -9
- package/dist/components/auth/SolidInitialLoginOtp.d.ts.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.js +21 -30
- package/dist/components/auth/SolidInitialLoginOtp.js.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.tsx +5 -13
- package/dist/components/auth/SolidInitiateRegisterOtp.d.ts.map +1 -1
- package/dist/components/auth/SolidInitiateRegisterOtp.js +35 -22
- package/dist/components/auth/SolidInitiateRegisterOtp.js.map +1 -1
- package/dist/components/auth/SolidInitiateRegisterOtp.tsx +28 -16
- package/dist/components/auth/SolidLogin.d.ts.map +1 -1
- package/dist/components/auth/SolidLogin.js +25 -31
- package/dist/components/auth/SolidLogin.js.map +1 -1
- package/dist/components/auth/SolidLogin.tsx +19 -16
- package/dist/components/auth/SolidRegister.d.ts.map +1 -1
- package/dist/components/auth/SolidRegister.js +59 -31
- package/dist/components/auth/SolidRegister.js.map +1 -1
- package/dist/components/auth/SolidRegister.tsx +91 -38
- package/dist/components/auth/SolidResetPassword.d.ts.map +1 -1
- package/dist/components/auth/SolidResetPassword.js +2 -6
- package/dist/components/auth/SolidResetPassword.js.map +1 -1
- package/dist/components/auth/SolidResetPassword.tsx +2 -6
- package/dist/components/common/AuthBanner.js.map +1 -1
- package/dist/components/common/GeneralSettings.d.ts.map +1 -1
- package/dist/components/common/GeneralSettings.js +235 -151
- package/dist/components/common/GeneralSettings.js.map +1 -1
- package/dist/components/common/GeneralSettings.tsx +1109 -776
- package/dist/components/common/SettingsComponent.d.ts +2 -0
- package/dist/components/common/SettingsComponent.d.ts.map +1 -0
- package/dist/components/common/SettingsComponent.js +351 -0
- package/dist/components/common/SettingsComponent.js.map +1 -0
- package/dist/components/common/SettingsComponent.module.css +421 -0
- package/dist/components/common/SettingsComponent.tsx +582 -0
- package/dist/components/common/SocialMediaLogin.d.ts +8 -1
- package/dist/components/common/SocialMediaLogin.d.ts.map +1 -1
- package/dist/components/common/SocialMediaLogin.js +6 -13
- package/dist/components/common/SocialMediaLogin.js.map +1 -1
- package/dist/components/common/SocialMediaLogin.tsx +120 -58
- package/dist/components/common/SolidExport.d.ts.map +1 -1
- package/dist/components/common/SolidExport.js +1 -1
- package/dist/components/common/SolidExport.js.map +1 -1
- package/dist/components/common/SolidExport.tsx +2 -1
- package/dist/components/common/SolidFormStepper.d.ts.map +1 -1
- package/dist/components/common/SolidFormStepper.js +2 -1
- package/dist/components/common/SolidFormStepper.js.map +1 -1
- package/dist/components/common/SolidFormStepper.tsx +2 -1
- package/dist/components/common/solid-export.css +26 -0
- package/dist/components/core/card/SolidCardView.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardView.js +24 -25
- package/dist/components/core/card/SolidCardView.js.map +1 -1
- package/dist/components/core/card/SolidCardView.tsx +22 -27
- package/dist/components/core/card/SolidCardViewConfigure.js +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.js.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.tsx +1 -1
- package/dist/components/core/chatter/SolidChatter.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatter.js +39 -9
- package/dist/components/core/chatter/SolidChatter.js.map +1 -1
- package/dist/components/core/chatter/SolidChatter.tsx +42 -7
- package/dist/components/core/chatter/SolidChatterAuditMessage.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatterAuditMessage.js +19 -1
- package/dist/components/core/chatter/SolidChatterAuditMessage.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterAuditMessage.tsx +22 -1
- package/dist/components/core/chatter/SolidChatterMessageBox.d.ts +3 -0
- package/dist/components/core/chatter/SolidChatterMessageBox.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatterMessageBox.js +68 -4
- package/dist/components/core/chatter/SolidChatterMessageBox.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterMessageBox.tsx +45 -3
- package/dist/components/core/chatter/chatter.module.css +0 -3
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.d.ts.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.js +3 -1
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.module.css +149 -0
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.tsx +3 -1
- package/dist/components/core/common/SolidAccountSettings/SolidNotifications.d.ts.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidNotifications.js +9 -8
- package/dist/components/core/common/SolidAccountSettings/SolidNotifications.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidNotifications.tsx +4 -2
- package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.d.ts.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.js +21 -4
- package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.tsx +128 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.tsx +1 -1
- package/dist/components/core/extension/solid-core/scheduled-job/scheduleFrequencyOnFieldChangeHandler.d.ts +7 -0
- package/dist/components/core/extension/solid-core/scheduled-job/scheduleFrequencyOnFieldChangeHandler.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/scheduled-job/scheduleFrequencyOnFieldChangeHandler.js +75 -0
- package/dist/components/core/extension/solid-core/scheduled-job/scheduleFrequencyOnFieldChangeHandler.js.map +1 -0
- package/dist/components/core/extension/solid-core/scheduled-job/scheduleFrequencyOnFieldChangeHandler.ts +45 -0
- package/dist/components/core/extension/solid-core/settings/solidXGenAiCodeBuilderConfigWidget.d.ts +3 -0
- package/dist/components/core/extension/solid-core/settings/solidXGenAiCodeBuilderConfigWidget.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/settings/solidXGenAiCodeBuilderConfigWidget.js +81 -0
- package/dist/components/core/extension/solid-core/settings/solidXGenAiCodeBuilderConfigWidget.js.map +1 -0
- package/dist/components/core/extension/solid-core/settings/solidXGenAiCodeBuilderConfigWidget.tsx +114 -0
- package/dist/components/core/form/SolidFormActionHeader.d.ts +1 -1
- package/dist/components/core/form/SolidFormActionHeader.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.js +10 -5
- package/dist/components/core/form/SolidFormActionHeader.js.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.tsx +33 -4
- package/dist/components/core/form/SolidFormLayouts.js +1 -1
- package/dist/components/core/form/SolidFormLayouts.js.map +1 -1
- package/dist/components/core/form/SolidFormLayouts.tsx +1 -1
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +122 -28
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +111 -10
- package/dist/components/core/form/fields/SolidComputedField.d.ts +25 -0
- package/dist/components/core/form/fields/SolidComputedField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidComputedField.js +128 -0
- package/dist/components/core/form/fields/SolidComputedField.js.map +1 -0
- package/dist/components/core/form/fields/SolidComputedField.tsx +134 -0
- package/dist/components/core/form/fields/SolidDateTimeField.js +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.tsx +1 -1
- package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.js +4 -1
- package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.tsx +4 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js +35 -24
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.tsx +30 -14
- package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.js +29 -28
- package/dist/components/core/form/fields/SolidSelectionStaticField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.tsx +17 -12
- package/dist/components/core/form/fields/SolidTimeField.js +1 -1
- package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.tsx +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +2 -2
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +2 -2
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.js +3 -3
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.js.map +1 -1
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.tsx +0 -5
- package/dist/components/core/kanban/KanbanBoard.js +1 -1
- package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.tsx +1 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +216 -102
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +204 -72
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.tsx +1 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.tsx +1 -2
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js +2 -2
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +21 -10
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js +2 -2
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +18 -10
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js +3 -6
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +30 -24
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +2 -2
- package/dist/components/core/list/SolidDataTable.d.ts.map +1 -1
- package/dist/components/core/list/SolidDataTable.js +6 -5
- package/dist/components/core/list/SolidDataTable.js.map +1 -1
- package/dist/components/core/list/SolidDataTable.tsx +6 -5
- package/dist/components/core/list/SolidDataTablePagination.d.ts +15 -0
- package/dist/components/core/list/SolidDataTablePagination.d.ts.map +1 -0
- package/dist/components/core/list/SolidDataTablePagination.js +22 -0
- package/dist/components/core/list/SolidDataTablePagination.js.map +1 -0
- package/dist/components/core/list/SolidDataTablePagination.tsx +71 -0
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.d.ts.map +1 -1
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.js +3 -3
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.js.map +1 -1
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.tsx +1 -0
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +60 -63
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +43 -48
- package/dist/components/core/list/SolidListViewConfigure.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.js +32 -3
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.tsx +35 -3
- package/dist/components/core/list/SolidListViewRowActionsMenu.js +2 -2
- package/dist/components/core/list/SolidListViewRowActionsMenu.js.map +1 -1
- package/dist/components/core/list/SolidListViewRowActionsMenu.tsx +2 -2
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js +6 -7
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js.map +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.tsx +9 -10
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +1 -1
- package/dist/components/core/tree/SolidTreeTable.d.ts +1 -1
- package/dist/components/core/tree/SolidTreeTable.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeTable.js +78 -78
- package/dist/components/core/tree/SolidTreeTable.js.map +1 -1
- package/dist/components/core/tree/SolidTreeTable.tsx +1 -10
- package/dist/components/core/users/CreateUser.css +27 -2
- package/dist/components/core/users/CreateUser.d.ts.map +1 -1
- package/dist/components/core/users/CreateUser.js +14 -12
- package/dist/components/core/users/CreateUser.js.map +1 -1
- package/dist/components/core/users/CreateUser.tsx +18 -2
- package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
- package/dist/components/layout/user-profile-menu.js +17 -15
- package/dist/components/layout/user-profile-menu.js.map +1 -1
- package/dist/components/layout/user-profile-menu.tsx +30 -33
- package/dist/components/shad-cn-ui/SolidAutocomplete.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidAutocomplete.js +9 -1
- package/dist/components/shad-cn-ui/SolidAutocomplete.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidAutocomplete.tsx +10 -1
- package/dist/components/shad-cn-ui/SolidButton.d.ts +14 -15
- package/dist/components/shad-cn-ui/SolidButton.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidButton.js +13 -3
- package/dist/components/shad-cn-ui/SolidButton.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidButton.tsx +24 -4
- package/dist/components/shad-cn-ui/SolidDatePicker.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidDatePicker.js +1 -1
- package/dist/components/shad-cn-ui/SolidDatePicker.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidDatePicker.tsx +2 -0
- package/dist/components/shad-cn-ui/SolidDialog.d.ts +1 -1
- package/dist/components/shad-cn-ui/SolidDialog.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidDialog.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidDialog.tsx +1 -1
- package/dist/components/shad-cn-ui/SolidIcon.d.ts +2 -2
- package/dist/components/shad-cn-ui/SolidIcon.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidIcon.js +3 -4
- package/dist/components/shad-cn-ui/SolidIcon.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidIcon.tsx +12 -15
- package/dist/components/shad-cn-ui/SolidRichTextEditor.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidRichTextEditor.js +9 -1
- package/dist/components/shad-cn-ui/SolidRichTextEditor.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidRichTextEditor.tsx +8 -1
- package/dist/components/shad-cn-ui/SolidTabs.d.ts +2 -1
- package/dist/components/shad-cn-ui/SolidTabs.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidTabs.js +2 -2
- package/dist/components/shad-cn-ui/SolidTabs.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidTabs.tsx +12 -1
- package/dist/components/solid-ui/SolidButton.d.ts +14 -0
- package/dist/components/solid-ui/SolidButton.d.ts.map +1 -0
- package/dist/components/solid-ui/SolidButton.js +36 -0
- package/dist/components/solid-ui/SolidButton.js.map +1 -0
- package/dist/components/solid-ui/SolidButton.tsx +54 -0
- package/dist/components/solid-ui/SolidTabs.d.ts +18 -0
- package/dist/components/solid-ui/SolidTabs.d.ts.map +1 -0
- package/dist/components/solid-ui/SolidTabs.js +22 -0
- package/dist/components/solid-ui/SolidTabs.js.map +1 -0
- package/dist/components/solid-ui/SolidTabs.tsx +73 -0
- package/dist/components/solid-ui/index.d.ts +3 -0
- package/dist/components/solid-ui/index.d.ts.map +1 -0
- package/dist/components/solid-ui/index.js +3 -0
- package/dist/components/solid-ui/index.js.map +1 -0
- package/dist/components/solid-ui/index.ts +2 -0
- package/dist/helpers/hydrateRelationRules.js +1 -1
- package/dist/helpers/hydrateRelationRules.js.map +1 -1
- package/dist/helpers/hydrateRelationRules.ts +1 -1
- package/dist/helpers/permissions.js +2 -2
- package/dist/helpers/permissions.js.map +1 -1
- package/dist/helpers/permissions.ts +2 -2
- package/dist/helpers/registry.d.ts +2 -2
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +6 -0
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/registry.ts +9 -2
- package/dist/helpers/settingsPayload.d.ts +32 -0
- package/dist/helpers/settingsPayload.d.ts.map +1 -0
- package/dist/helpers/settingsPayload.js +72 -0
- package/dist/helpers/settingsPayload.js.map +1 -0
- package/dist/helpers/settingsPayload.ts +125 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.ts +7 -0
- package/dist/redux/api/solidChatterMessageApi.d.ts +2 -1
- package/dist/redux/api/solidChatterMessageApi.d.ts.map +1 -1
- package/dist/redux/api/solidChatterMessageApi.js +11 -1
- package/dist/redux/api/solidChatterMessageApi.js.map +1 -1
- package/dist/redux/api/solidChatterMessageApi.ts +10 -1
- package/dist/redux/api/solidEntityApi.d.ts.map +1 -1
- package/dist/redux/api/solidEntityApi.js +14 -1
- package/dist/redux/api/solidEntityApi.js.map +1 -1
- package/dist/redux/api/solidEntityApi.tsx +17 -1
- package/dist/redux/store/createSolidStore.d.ts +1 -1
- package/dist/redux/store/createSolidStore.d.ts.map +1 -1
- package/dist/redux/store/createSolidStore.js +20 -11
- package/dist/redux/store/createSolidStore.js.map +1 -1
- package/dist/redux/store/createSolidStore.ts +20 -11
- package/dist/redux/store/defaultStoreConfig.d.ts +1 -0
- package/dist/redux/store/defaultStoreConfig.d.ts.map +1 -1
- package/dist/redux/store/dynamicEntityApiMiddleware.d.ts +10 -0
- package/dist/redux/store/dynamicEntityApiMiddleware.d.ts.map +1 -0
- package/dist/redux/store/dynamicEntityApiMiddleware.js +44 -0
- package/dist/redux/store/dynamicEntityApiMiddleware.js.map +1 -0
- package/dist/redux/store/dynamicEntityApiMiddleware.ts +58 -0
- package/dist/redux/store/dynamicReducerManager.d.ts +10 -0
- package/dist/redux/store/dynamicReducerManager.d.ts.map +1 -0
- package/dist/redux/store/dynamicReducerManager.js +51 -0
- package/dist/redux/store/dynamicReducerManager.js.map +1 -0
- package/dist/redux/store/dynamicReducerManager.ts +51 -0
- package/dist/redux/store/solidEntityApiPool.d.ts +31 -0
- package/dist/redux/store/solidEntityApiPool.d.ts.map +1 -0
- package/dist/redux/store/solidEntityApiPool.js +123 -0
- package/dist/redux/store/solidEntityApiPool.js.map +1 -0
- package/dist/redux/store/solidEntityApiPool.ts +167 -0
- package/dist/resources/globals.css +26 -6
- package/dist/resources/shadcn-base.css +269 -92
- package/dist/resources/solid-responsive.css +22 -4
- package/dist/routes/AppEventListener.js +1 -1
- package/dist/routes/AppEventListener.js.map +1 -1
- package/dist/routes/AppEventListener.tsx +1 -1
- package/dist/routes/SolidRouteMetadataBoundary.d.ts +5 -0
- package/dist/routes/SolidRouteMetadataBoundary.d.ts.map +1 -0
- package/dist/routes/SolidRouteMetadataBoundary.js +72 -0
- package/dist/routes/SolidRouteMetadataBoundary.js.map +1 -0
- package/dist/routes/SolidRouteMetadataBoundary.tsx +77 -0
- package/dist/routes/pages/admin/core/CardPage.js +1 -1
- package/dist/routes/pages/admin/core/CardPage.js.map +1 -1
- package/dist/routes/pages/admin/core/CardPage.tsx +1 -1
- package/dist/routes/pages/admin/core/DiagnosticsPage.d.ts +2 -0
- package/dist/routes/pages/admin/core/DiagnosticsPage.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/DiagnosticsPage.js +48 -0
- package/dist/routes/pages/admin/core/DiagnosticsPage.js.map +1 -0
- package/dist/routes/pages/admin/core/DiagnosticsPage.tsx +167 -0
- package/dist/routes/pages/admin/core/FormPage.js +1 -1
- package/dist/routes/pages/admin/core/FormPage.js.map +1 -1
- package/dist/routes/pages/admin/core/FormPage.tsx +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.js +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.js.map +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.tsx +1 -1
- package/dist/routes/pages/admin/core/ListPage.js +1 -1
- package/dist/routes/pages/admin/core/ListPage.js.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.tsx +1 -1
- package/dist/routes/pages/admin/core/SettingsPage.js +2 -2
- package/dist/routes/pages/admin/core/SettingsPage.js.map +1 -1
- package/dist/routes/pages/admin/core/SettingsPage.tsx +2 -2
- package/dist/routes/pages/admin/core/TreePage.js +1 -1
- package/dist/routes/pages/admin/core/TreePage.js.map +1 -1
- package/dist/routes/pages/admin/core/TreePage.tsx +1 -1
- package/dist/routes/pages/auth/InitiateFacebookOauthPage.d.ts +2 -0
- package/dist/routes/pages/auth/InitiateFacebookOauthPage.d.ts.map +1 -0
- package/dist/routes/pages/auth/InitiateFacebookOauthPage.js +6 -0
- package/dist/routes/pages/auth/InitiateFacebookOauthPage.js.map +1 -0
- package/dist/routes/pages/auth/InitiateFacebookOauthPage.tsx +5 -0
- package/dist/routes/pages/auth/InitiateMicrosoftOauthPage.d.ts +2 -0
- package/dist/routes/pages/auth/InitiateMicrosoftOauthPage.d.ts.map +1 -0
- package/dist/routes/pages/auth/InitiateMicrosoftOauthPage.js +6 -0
- package/dist/routes/pages/auth/InitiateMicrosoftOauthPage.js.map +1 -0
- package/dist/routes/pages/auth/InitiateMicrosoftOauthPage.tsx +5 -0
- package/dist/routes/pages/studio/StudioLandingPage.d.ts.map +1 -1
- package/dist/routes/pages/studio/StudioLandingPage.js +35 -7
- package/dist/routes/pages/studio/StudioLandingPage.js.map +1 -1
- package/dist/routes/pages/studio/StudioLandingPage.tsx +42 -6
- package/dist/routes/solidRoutes.d.ts.map +1 -1
- package/dist/routes/solidRoutes.js +49 -24
- package/dist/routes/solidRoutes.js.map +1 -1
- package/dist/routes/solidRoutes.tsx +49 -24
- package/dist/routes/types.d.ts +8 -1
- package/dist/routes/types.d.ts.map +1 -1
- package/dist/routes/types.js.map +1 -1
- package/dist/routes/types.ts +10 -0
- package/dist/types/extension-registry.d.ts +1 -0
- package/dist/types/extension-registry.d.ts.map +1 -1
- package/dist/types/extension-registry.js +1 -0
- package/dist/types/extension-registry.js.map +1 -1
- package/dist/types/extension-registry.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/solid-core.d.ts +11 -0
- package/package.json +1 -2
- package/dist/components/auth/SolidOTPVerify.d.ts +0 -3
- package/dist/components/auth/SolidOTPVerify.d.ts.map +0 -1
- package/dist/components/auth/SolidOTPVerify.js +0 -67
- package/dist/components/auth/SolidOTPVerify.js.map +0 -1
- package/dist/components/auth/SolidOTPVerify.tsx +0 -133
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts +0 -2
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts.map +0 -1
- package/dist/components/core/common/LoadDynamicJsxComponent.js +0 -50
- package/dist/components/core/common/LoadDynamicJsxComponent.js.map +0 -1
- package/dist/components/core/common/LoadDynamicJsxComponent.tsx +0 -70
- package/dist/nextAuth/authProviders.d.ts +0 -4
- package/dist/nextAuth/authProviders.d.ts.map +0 -1
- package/dist/nextAuth/authProviders.js +0 -198
- package/dist/nextAuth/authProviders.js.map +0 -1
- package/dist/nextAuth/authProviders.tsx +0 -232
- package/dist/nextAuth/handleLogout.d.ts +0 -2
- package/dist/nextAuth/handleLogout.d.ts.map +0 -1
- package/dist/nextAuth/handleLogout.js +0 -36
- package/dist/nextAuth/handleLogout.js.map +0 -1
- package/dist/nextAuth/handleLogout.tsx +0 -39
- package/dist/nextAuth/refreshAccessToken.d.ts +0 -2
- package/dist/nextAuth/refreshAccessToken.d.ts.map +0 -1
- package/dist/nextAuth/refreshAccessToken.js +0 -24
- package/dist/nextAuth/refreshAccessToken.js.map +0 -1
- package/dist/nextAuth/refreshAccessToken.tsx +0 -28
- package/dist/redux/features/settingsSlice.d.ts +0 -20
- package/dist/redux/features/settingsSlice.d.ts.map +0 -1
- package/dist/redux/features/settingsSlice.js +0 -39
- package/dist/redux/features/settingsSlice.js.map +0 -1
- package/dist/redux/features/settingsSlice.ts +0 -60
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
38
|
+
import { ERROR_MESSAGES } from '../../constants/error-messages';
|
|
39
|
+
import { signInWithOAuthAccessCode } from "../../adapters/auth/index";
|
|
40
|
+
import { useRouter } from "../../hooks/useRouter";
|
|
41
|
+
import { useSearchParams } from "../../hooks/useSearchParams";
|
|
42
|
+
import { useEffect, useState } from 'react';
|
|
43
|
+
import { useDispatch } from 'react-redux';
|
|
44
|
+
import { env } from "../../adapters/env";
|
|
45
|
+
import { showToast } from "../../redux/features/toastSlice";
|
|
46
|
+
import { SolidSpinner } from "../shad-cn-ui";
|
|
47
|
+
export var FacebookAuthChecking = function () {
|
|
48
|
+
var searchParams = useSearchParams();
|
|
49
|
+
var accessCode = searchParams.get("accessCode");
|
|
50
|
+
var router = useRouter();
|
|
51
|
+
var _a = useState(null), error = _a[0], setError = _a[1];
|
|
52
|
+
var dispatch = useDispatch();
|
|
53
|
+
useEffect(function () {
|
|
54
|
+
var handleOAuthAuthentication = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
+
var response, redirectUrl, err_1;
|
|
56
|
+
var _a;
|
|
57
|
+
return __generator(this, function (_b) {
|
|
58
|
+
switch (_b.label) {
|
|
59
|
+
case 0:
|
|
60
|
+
if (!accessCode) {
|
|
61
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: ERROR_MESSAGES.AUTHENICATION__FAILED }));
|
|
62
|
+
setError(ERROR_MESSAGES.AUTHENICATION__FAILED);
|
|
63
|
+
return [2 /*return*/];
|
|
64
|
+
}
|
|
65
|
+
_b.label = 1;
|
|
66
|
+
case 1:
|
|
67
|
+
_b.trys.push([1, 3, , 4]);
|
|
68
|
+
return [4 /*yield*/, signInWithOAuthAccessCode({
|
|
69
|
+
accessCode: accessCode,
|
|
70
|
+
provider: "facebook"
|
|
71
|
+
})];
|
|
72
|
+
case 2:
|
|
73
|
+
response = _b.sent();
|
|
74
|
+
if (response === null || response === void 0 ? void 0 : response.error) {
|
|
75
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: response.error }));
|
|
76
|
+
setError(ERROR_MESSAGES.AUTHENICATION__FAILED);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
redirectUrl = env("NEXT_PUBLIC_LOGIN_REDIRECT_URL") || "/admin";
|
|
80
|
+
router.push(redirectUrl);
|
|
81
|
+
}
|
|
82
|
+
return [3 /*break*/, 4];
|
|
83
|
+
case 3:
|
|
84
|
+
err_1 = _b.sent();
|
|
85
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: ((_a = err_1 === null || err_1 === void 0 ? void 0 : err_1.data) === null || _a === void 0 ? void 0 : _a.message) || ERROR_MESSAGES.AUTHENICATION__FAILED }));
|
|
86
|
+
return [3 /*break*/, 4];
|
|
87
|
+
case 4: return [2 /*return*/];
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}); };
|
|
91
|
+
handleOAuthAuthentication();
|
|
92
|
+
}, [accessCode, router]);
|
|
93
|
+
if (error) {
|
|
94
|
+
return (_jsx("div", { className: "flex items-center justify-center min-h-screen", children: _jsx("h2", { className: "text-red-500 text-xl font-semibold", children: error }) }));
|
|
95
|
+
}
|
|
96
|
+
return (_jsx(SolidSpinner, { className: "flex items-center justify-center min-h-screen" }));
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=FacebookAuthChecking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FacebookAuthChecking.js","sourceRoot":"","sources":["../../../src/components/auth/FacebookAuthChecking.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,IAAM,oBAAoB,GAAG;IAChC,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,IAAM,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAElD,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IACrB,IAAA,KAAoB,QAAQ,CAAgB,IAAI,CAAC,EAAhD,KAAK,QAAA,EAAE,QAAQ,QAAiC,CAAC;IACxD,IAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,SAAS,CAAC;QACN,IAAM,yBAAyB,GAAG;;;;;;wBAC9B,IAAI,CAAC,UAAU,EAAE;4BACb,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;4BAC9H,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC;4BAC/C,sBAAO;yBACV;;;;wBAGoB,qBAAM,yBAAyB,CAAC;gCAC7C,UAAU,EAAE,UAAU;gCACtB,QAAQ,EAAE,UAAU;6BACvB,CAAC,EAAA;;wBAHI,QAAQ,GAAG,SAGf;wBAEF,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,EAAE;4BACjB,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;4BACxG,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAA;yBACjD;6BAAM;4BAEG,WAAW,GAAG,GAAG,CAAC,gCAAgC,CAAC,IAAI,QAAQ,CAAC;4BACtE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;yBAC5B;;;;wBAED,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,CAAA,MAAA,KAAG,aAAH,KAAG,uBAAH,KAAG,CAAE,IAAI,0CAAE,OAAO,KAAI,cAAc,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;;;;;aAE3J,CAAC;QAEF,yBAAyB,EAAE,CAAC;IAChC,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IAEzB,IAAI,KAAK,EAAE;QACP,OAAO,CACH,cAAK,SAAS,EAAC,+CAA+C,YAC1D,aAAI,SAAS,EAAC,oCAAoC,YAAE,KAAK,GAAM,GAC7D,CACT,CAAC;KACL;IACD,OAAO,CACH,KAAC,YAAY,IAAC,SAAS,EAAC,+CAA+C,GAAG,CAC7E,CAAA;AACL,CAAC,CAAA","sourcesContent":["import { ERROR_MESSAGES } from '../../constants/error-messages';\nimport { signInWithOAuthAccessCode } from \"../../adapters/auth/index\";\nimport { useRouter } from \"../../hooks/useRouter\";\nimport { useSearchParams } from \"../../hooks/useSearchParams\";\nimport { useEffect, useState } from 'react'\nimport { useDispatch } from 'react-redux';\nimport { env } from \"../../adapters/env\";\nimport { showToast } from \"../../redux/features/toastSlice\";\nimport { SolidSpinner } from \"../shad-cn-ui\";\n\nexport const FacebookAuthChecking = () => {\n const searchParams = useSearchParams();\n const accessCode = searchParams.get(\"accessCode\");\n\n const router = useRouter();\n const [error, setError] = useState<string | null>(null);\n const dispatch = useDispatch();\n\n useEffect(() => {\n const handleOAuthAuthentication = async () => {\n if (!accessCode) {\n dispatch(showToast({ severity: \"error\", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: ERROR_MESSAGES.AUTHENICATION__FAILED }));\n setError(ERROR_MESSAGES.AUTHENICATION__FAILED);\n return;\n }\n\n try {\n const response = await signInWithOAuthAccessCode({\n accessCode: accessCode,\n provider: \"facebook\"\n });\n\n if (response?.error) {\n dispatch(showToast({ severity: \"error\", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: response.error }));\n setError(ERROR_MESSAGES.AUTHENICATION__FAILED)\n } else {\n // dispatch(showToast({ severity: \"success\", summary: ERROR_MESSAGES.LOGIN_SUCCESS, detail: ERROR_MESSAGES.DASHBOARD_REDIRECTING }));\n const redirectUrl = env(\"NEXT_PUBLIC_LOGIN_REDIRECT_URL\") || \"/admin\";\n router.push(redirectUrl);\n }\n } catch (err: any) {\n dispatch(showToast({ severity: \"error\", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: err?.data?.message || ERROR_MESSAGES.AUTHENICATION__FAILED }));\n }\n };\n\n handleOAuthAuthentication();\n }, [accessCode, router]);\n\n if (error) {\n return (\n <div className=\"flex items-center justify-center min-h-screen\">\n <h2 className=\"text-red-500 text-xl font-semibold\">{error}</h2>\n </div>\n );\n }\n return (\n <SolidSpinner className=\"flex items-center justify-center min-h-screen\" />\n )\n}\n"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ERROR_MESSAGES } from '../../constants/error-messages';
|
|
2
|
+
import { signInWithOAuthAccessCode } from "../../adapters/auth/index";
|
|
3
|
+
import { useRouter } from "../../hooks/useRouter";
|
|
4
|
+
import { useSearchParams } from "../../hooks/useSearchParams";
|
|
5
|
+
import { useEffect, useState } from 'react'
|
|
6
|
+
import { useDispatch } from 'react-redux';
|
|
7
|
+
import { env } from "../../adapters/env";
|
|
8
|
+
import { showToast } from "../../redux/features/toastSlice";
|
|
9
|
+
import { SolidSpinner } from "../shad-cn-ui";
|
|
10
|
+
|
|
11
|
+
export const FacebookAuthChecking = () => {
|
|
12
|
+
const searchParams = useSearchParams();
|
|
13
|
+
const accessCode = searchParams.get("accessCode");
|
|
14
|
+
|
|
15
|
+
const router = useRouter();
|
|
16
|
+
const [error, setError] = useState<string | null>(null);
|
|
17
|
+
const dispatch = useDispatch();
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
const handleOAuthAuthentication = async () => {
|
|
21
|
+
if (!accessCode) {
|
|
22
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: ERROR_MESSAGES.AUTHENICATION__FAILED }));
|
|
23
|
+
setError(ERROR_MESSAGES.AUTHENICATION__FAILED);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const response = await signInWithOAuthAccessCode({
|
|
29
|
+
accessCode: accessCode,
|
|
30
|
+
provider: "facebook"
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
if (response?.error) {
|
|
34
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: response.error }));
|
|
35
|
+
setError(ERROR_MESSAGES.AUTHENICATION__FAILED)
|
|
36
|
+
} else {
|
|
37
|
+
// dispatch(showToast({ severity: "success", summary: ERROR_MESSAGES.LOGIN_SUCCESS, detail: ERROR_MESSAGES.DASHBOARD_REDIRECTING }));
|
|
38
|
+
const redirectUrl = env("NEXT_PUBLIC_LOGIN_REDIRECT_URL") || "/admin";
|
|
39
|
+
router.push(redirectUrl);
|
|
40
|
+
}
|
|
41
|
+
} catch (err: any) {
|
|
42
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: err?.data?.message || ERROR_MESSAGES.AUTHENICATION__FAILED }));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
handleOAuthAuthentication();
|
|
47
|
+
}, [accessCode, router]);
|
|
48
|
+
|
|
49
|
+
if (error) {
|
|
50
|
+
return (
|
|
51
|
+
<div className="flex items-center justify-center min-h-screen">
|
|
52
|
+
<h2 className="text-red-500 text-xl font-semibold">{error}</h2>
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
return (
|
|
57
|
+
<SolidSpinner className="flex items-center justify-center min-h-screen" />
|
|
58
|
+
)
|
|
59
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPasswordThankYou.d.ts","sourceRoot":"","sources":["../../../src/components/auth/ForgotPasswordThankYou.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ForgotPasswordThankYou.d.ts","sourceRoot":"","sources":["../../../src/components/auth/ForgotPasswordThankYou.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,sBAAsB,+CAsBlC,CAAA"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useSearchParams } from "../../hooks/useSearchParams";
|
|
3
|
-
import { useLazyGetAuthSettingsQuery } from "../../redux/api/solidSettingsApi";
|
|
4
|
-
import { useEffect } from "react";
|
|
5
3
|
import { SolidButton } from "../shad-cn-ui";
|
|
6
4
|
import { useRouter } from "../../hooks/useRouter";
|
|
5
|
+
import { useAuthSettings } from "./AuthSettingsContext";
|
|
7
6
|
export var ForgotPasswordThankYou = function () {
|
|
8
7
|
var _a;
|
|
9
|
-
var
|
|
8
|
+
var solidSettingsData = useAuthSettings().solidSettingsData;
|
|
10
9
|
var router = useRouter();
|
|
11
|
-
useEffect(function () {
|
|
12
|
-
trigger(""); // Fetch settings on mount
|
|
13
|
-
}, [trigger]);
|
|
14
10
|
var searchParams = useSearchParams();
|
|
15
11
|
var email = searchParams.get('email');
|
|
16
12
|
var decodedEmail = email ? decodeURIComponent(email) : '';
|
|
17
|
-
return (_jsxs("div", { className: "auth-container ".concat(((_a = solidSettingsData === null || solidSettingsData === void 0 ? void 0 : solidSettingsData.data) === null || _a === void 0 ? void 0 : _a.authPagesLayout) === 'center' ? 'center' : 'side'), children: [_jsx("h2", { className: "solid-auth-title", children: "Check your inbox" }),
|
|
13
|
+
return (_jsxs("div", { className: "auth-container ".concat(((_a = solidSettingsData === null || solidSettingsData === void 0 ? void 0 : solidSettingsData.data) === null || _a === void 0 ? void 0 : _a.authPagesLayout) === 'center' ? 'center' : 'side'), children: [_jsx("h2", { className: "solid-auth-title", children: "Check your inbox" }), _jsxs("p", { className: "solid-auth-helper", children: [_jsx("br", {}), "Please note that you will receive an email with password reset instructions if an account exists for the corresponding masked email address."] }), _jsx("p", { className: "solid-auth-input-label mt-3", style: { fontWeight: 600 }, children: decodedEmail }), _jsx("p", { className: "solid-auth-helper", children: "If you receive the email, follow the instructions there to continue." }), _jsx("div", { className: "mt-4", children: _jsx(SolidButton, { className: "w-full", onClick: function () { return router.push("/auth/login"); }, children: "Back to Sign In" }) })] }));
|
|
18
14
|
};
|
|
19
15
|
//# sourceMappingURL=ForgotPasswordThankYou.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPasswordThankYou.js","sourceRoot":"","sources":["../../../src/components/auth/ForgotPasswordThankYou.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ForgotPasswordThankYou.js","sourceRoot":"","sources":["../../../src/components/auth/ForgotPasswordThankYou.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,MAAM,CAAC,IAAM,sBAAsB,GAAG;;IAC1B,IAAA,iBAAiB,GAAK,eAAe,EAAE,kBAAtB,CAAuB;IAChD,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,IAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACxC,IAAM,YAAY,GAAG,KAAK,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5D,OAAO,CACH,eAAK,SAAS,EAAE,yBAAkB,CAAA,MAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAI,0CAAE,eAAe,MAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAE,aACzG,aAAI,SAAS,EAAC,kBAAkB,iCAAsB,EACtD,aAAG,SAAS,EAAC,mBAAmB,aAAC,cAAS,oJAAgJ,EAC1L,YAAG,SAAS,EAAC,6BAA6B,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAG,YAAY,GAAK,EACzF,YAAG,SAAS,EAAC,mBAAmB,qFAE5B,EACJ,cAAK,SAAS,EAAC,MAAM,YACjB,KAAC,WAAW,IAAC,SAAS,EAAC,QAAQ,EAAC,OAAO,EAAE,cAAM,OAAA,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,EAA1B,CAA0B,gCAE3D,GACZ,IACJ,CACT,CAAA;AACL,CAAC,CAAA","sourcesContent":["import { useSearchParams } from \"../../hooks/useSearchParams\";\nimport { SolidButton } from \"../shad-cn-ui\";\nimport { useRouter } from \"../../hooks/useRouter\";\nimport { useAuthSettings } from \"./AuthSettingsContext\";\n\n\nexport const ForgotPasswordThankYou = () => {\n const { solidSettingsData } = useAuthSettings();\n const router = useRouter();\n\n const searchParams = useSearchParams();\n const email = searchParams.get('email');\n const decodedEmail = email ? decodeURIComponent(email) : '';\n return (\n <div className={`auth-container ${solidSettingsData?.data?.authPagesLayout === 'center' ? 'center' : 'side'}`}>\n <h2 className=\"solid-auth-title\">Check your inbox</h2>\n <p className=\"solid-auth-helper\"><br></br>Please note that you will receive an email with password reset instructions if an account exists for the corresponding masked email address.</p>\n <p className=\"solid-auth-input-label mt-3\" style={{ fontWeight: 600 }}>{decodedEmail}</p>\n <p className=\"solid-auth-helper\">\n If you receive the email, follow the instructions there to continue.\n </p>\n <div className=\"mt-4\">\n <SolidButton className=\"w-full\" onClick={() => router.push(\"/auth/login\")}>\n Back to Sign In\n </SolidButton>\n </div>\n </div>\n )\n}\n"]}
|
|
@@ -1,28 +1,23 @@
|
|
|
1
1
|
import { useSearchParams } from "../../hooks/useSearchParams";
|
|
2
|
-
import { useLazyGetAuthSettingsQuery } from "../../redux/api/solidSettingsApi";
|
|
3
|
-
import { useEffect } from "react";
|
|
4
2
|
import { SolidButton } from "../shad-cn-ui";
|
|
5
3
|
import { useRouter } from "../../hooks/useRouter";
|
|
4
|
+
import { useAuthSettings } from "./AuthSettingsContext";
|
|
6
5
|
|
|
7
6
|
|
|
8
7
|
export const ForgotPasswordThankYou = () => {
|
|
9
|
-
const
|
|
8
|
+
const { solidSettingsData } = useAuthSettings();
|
|
10
9
|
const router = useRouter();
|
|
11
10
|
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
trigger("") // Fetch settings on mount
|
|
14
|
-
}, [trigger])
|
|
15
|
-
|
|
16
11
|
const searchParams = useSearchParams();
|
|
17
12
|
const email = searchParams.get('email');
|
|
18
13
|
const decodedEmail = email ? decodeURIComponent(email) : '';
|
|
19
14
|
return (
|
|
20
15
|
<div className={`auth-container ${solidSettingsData?.data?.authPagesLayout === 'center' ? 'center' : 'side'}`}>
|
|
21
16
|
<h2 className="solid-auth-title">Check your inbox</h2>
|
|
22
|
-
<p className="solid-auth-helper">
|
|
17
|
+
<p className="solid-auth-helper"><br></br>Please note that you will receive an email with password reset instructions if an account exists for the corresponding masked email address.</p>
|
|
23
18
|
<p className="solid-auth-input-label mt-3" style={{ fontWeight: 600 }}>{decodedEmail}</p>
|
|
24
19
|
<p className="solid-auth-helper">
|
|
25
|
-
|
|
20
|
+
If you receive the email, follow the instructions there to continue.
|
|
26
21
|
</p>
|
|
27
22
|
<div className="mt-4">
|
|
28
23
|
<SolidButton className="w-full" onClick={() => router.push("/auth/login")}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleAuthChecking.d.ts","sourceRoot":"","sources":["../../../src/components/auth/GoogleAuthChecking.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GoogleAuthChecking.d.ts","sourceRoot":"","sources":["../../../src/components/auth/GoogleAuthChecking.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,kBAAkB,+CA8C9B,CAAA"}
|
|
@@ -43,8 +43,6 @@ import { useEffect, useState } from 'react';
|
|
|
43
43
|
import { useDispatch } from 'react-redux';
|
|
44
44
|
import { env } from "../../adapters/env";
|
|
45
45
|
import { showToast } from "../../redux/features/toastSlice";
|
|
46
|
-
import { loadSession } from "../../adapters/auth/storage";
|
|
47
|
-
import { hasAnyRole } from "../../helpers/rolesHelper";
|
|
48
46
|
import { SolidSpinner } from "../shad-cn-ui";
|
|
49
47
|
export var GoogleAuthChecking = function () {
|
|
50
48
|
var searchParams = useSearchParams();
|
|
@@ -54,40 +52,36 @@ export var GoogleAuthChecking = function () {
|
|
|
54
52
|
var dispatch = useDispatch();
|
|
55
53
|
useEffect(function () {
|
|
56
54
|
var handleOAuthAuthentication = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
57
|
-
var response,
|
|
58
|
-
var _a
|
|
59
|
-
return __generator(this, function (
|
|
60
|
-
switch (
|
|
55
|
+
var response, redirectUrl, err_1;
|
|
56
|
+
var _a;
|
|
57
|
+
return __generator(this, function (_b) {
|
|
58
|
+
switch (_b.label) {
|
|
61
59
|
case 0:
|
|
62
60
|
if (!accessCode) {
|
|
63
61
|
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: ERROR_MESSAGES.AUTHENICATION__FAILED }));
|
|
64
62
|
setError(ERROR_MESSAGES.AUTHENICATION__FAILED);
|
|
65
63
|
return [2 /*return*/];
|
|
66
64
|
}
|
|
67
|
-
|
|
65
|
+
_b.label = 1;
|
|
68
66
|
case 1:
|
|
69
|
-
|
|
67
|
+
_b.trys.push([1, 3, , 4]);
|
|
70
68
|
return [4 /*yield*/, signInWithOAuthAccessCode({
|
|
71
69
|
accessCode: accessCode,
|
|
72
70
|
})];
|
|
73
71
|
case 2:
|
|
74
|
-
response =
|
|
72
|
+
response = _b.sent();
|
|
75
73
|
if (response === null || response === void 0 ? void 0 : response.error) {
|
|
76
74
|
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: response.error }));
|
|
77
75
|
setError(ERROR_MESSAGES.AUTHENICATION__FAILED);
|
|
78
76
|
}
|
|
79
77
|
else {
|
|
80
|
-
|
|
81
|
-
session = loadSession();
|
|
82
|
-
isAdmin = hasAnyRole((_a = session === null || session === void 0 ? void 0 : session.user) === null || _a === void 0 ? void 0 : _a.roles, ["Admin"]);
|
|
83
|
-
isDev = env("VITE_SOLIDX_ENV") === "dev";
|
|
84
|
-
redirectUrl = isAdmin && isDev ? "/studio" : (env("NEXT_PUBLIC_LOGIN_REDIRECT_URL") || "/admin");
|
|
78
|
+
redirectUrl = env("NEXT_PUBLIC_LOGIN_REDIRECT_URL") || "/admin";
|
|
85
79
|
router.push(redirectUrl);
|
|
86
80
|
}
|
|
87
81
|
return [3 /*break*/, 4];
|
|
88
82
|
case 3:
|
|
89
|
-
err_1 =
|
|
90
|
-
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: ((
|
|
83
|
+
err_1 = _b.sent();
|
|
84
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: ((_a = err_1 === null || err_1 === void 0 ? void 0 : err_1.data) === null || _a === void 0 ? void 0 : _a.message) || ERROR_MESSAGES.AUTHENICATION__FAILED }));
|
|
91
85
|
return [3 /*break*/, 4];
|
|
92
86
|
case 4: return [2 /*return*/];
|
|
93
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleAuthChecking.js","sourceRoot":"","sources":["../../../src/components/auth/GoogleAuthChecking.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GoogleAuthChecking.js","sourceRoot":"","sources":["../../../src/components/auth/GoogleAuthChecking.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,IAAM,kBAAkB,GAAG;IAC9B,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,IAAM,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAElD,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IACrB,IAAA,KAAoB,QAAQ,CAAgB,IAAI,CAAC,EAAhD,KAAK,QAAA,EAAE,QAAQ,QAAiC,CAAC;IACxD,IAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,SAAS,CAAC;QACN,IAAM,yBAAyB,GAAG;;;;;;wBAC9B,IAAI,CAAC,UAAU,EAAE;4BACb,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;4BAC9H,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC;4BAC/C,sBAAO;yBACV;;;;wBAGoB,qBAAM,yBAAyB,CAAC;gCAC7C,UAAU,EAAE,UAAU;6BACzB,CAAC,EAAA;;wBAFI,QAAQ,GAAG,SAEf;wBAEF,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,EAAE;4BACjB,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;4BACxG,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAA;yBACjD;6BAAM;4BAEG,WAAW,GAAG,GAAG,CAAC,gCAAgC,CAAC,IAAI,QAAQ,CAAC;4BACtE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;yBAC5B;;;;wBAED,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,CAAA,MAAA,KAAG,aAAH,KAAG,uBAAH,KAAG,CAAE,IAAI,0CAAE,OAAO,KAAI,cAAc,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;;;;;aAE3J,CAAC;QAEF,yBAAyB,EAAE,CAAC;IAChC,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IAEzB,IAAI,KAAK,EAAE;QACP,OAAO,CACH,cAAK,SAAS,EAAC,+CAA+C,YAC1D,aAAI,SAAS,EAAC,oCAAoC,YAAE,KAAK,GAAM,GAC7D,CACT,CAAC;KACL;IACD,OAAO,CACH,KAAC,YAAY,IAAC,SAAS,EAAC,+CAA+C,GAAG,CAC7E,CAAA;AACL,CAAC,CAAA","sourcesContent":["import { ERROR_MESSAGES } from '../../constants/error-messages';\nimport { signInWithOAuthAccessCode } from \"../../adapters/auth/index\";\nimport { useRouter } from \"../../hooks/useRouter\";\nimport { useSearchParams } from \"../../hooks/useSearchParams\";\nimport { useEffect, useState } from 'react'\nimport { useDispatch } from 'react-redux';\nimport { env } from \"../../adapters/env\";\nimport { showToast } from \"../../redux/features/toastSlice\";\nimport { SolidSpinner } from \"../shad-cn-ui\";\n\nexport const GoogleAuthChecking = () => {\n const searchParams = useSearchParams();\n const accessCode = searchParams.get(\"accessCode\");\n\n const router = useRouter();\n const [error, setError] = useState<string | null>(null);\n const dispatch = useDispatch();\n useEffect(() => {\n const handleOAuthAuthentication = async () => {\n if (!accessCode) {\n dispatch(showToast({ severity: \"error\", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: ERROR_MESSAGES.AUTHENICATION__FAILED }));\n setError(ERROR_MESSAGES.AUTHENICATION__FAILED);\n return;\n }\n\n try {\n const response = await signInWithOAuthAccessCode({\n accessCode: accessCode,\n });\n\n if (response?.error) {\n dispatch(showToast({ severity: \"error\", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: response.error }));\n setError(ERROR_MESSAGES.AUTHENICATION__FAILED)\n } else {\n // dispatch(showToast({ severity: \"success\", summary: ERROR_MESSAGES.LOGIN_SUCCESS, detail: ERROR_MESSAGES.DASHBOARD_REDIRECTING }));\n const redirectUrl = env(\"NEXT_PUBLIC_LOGIN_REDIRECT_URL\") || \"/admin\";\n router.push(redirectUrl);\n }\n } catch (err: any) {\n dispatch(showToast({ severity: \"error\", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: err?.data?.message || ERROR_MESSAGES.AUTHENICATION__FAILED }));\n }\n };\n\n handleOAuthAuthentication();\n }, [accessCode, router]);\n\n if (error) {\n return (\n <div className=\"flex items-center justify-center min-h-screen\">\n <h2 className=\"text-red-500 text-xl font-semibold\">{error}</h2>\n </div>\n );\n }\n return (\n <SolidSpinner className=\"flex items-center justify-center min-h-screen\" />\n )\n}\n"]}
|
|
@@ -6,8 +6,6 @@ import { useEffect, useState } from 'react'
|
|
|
6
6
|
import { useDispatch } from 'react-redux';
|
|
7
7
|
import { env } from "../../adapters/env";
|
|
8
8
|
import { showToast } from "../../redux/features/toastSlice";
|
|
9
|
-
import { loadSession } from "../../adapters/auth/storage";
|
|
10
|
-
import { hasAnyRole } from "../../helpers/rolesHelper";
|
|
11
9
|
import { SolidSpinner } from "../shad-cn-ui";
|
|
12
10
|
|
|
13
11
|
export const GoogleAuthChecking = () => {
|
|
@@ -34,11 +32,8 @@ export const GoogleAuthChecking = () => {
|
|
|
34
32
|
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: response.error }));
|
|
35
33
|
setError(ERROR_MESSAGES.AUTHENICATION__FAILED)
|
|
36
34
|
} else {
|
|
37
|
-
dispatch(showToast({ severity: "success", summary: ERROR_MESSAGES.LOGIN_SUCCESS, detail: ERROR_MESSAGES.DASHBOARD_REDIRECTING }));
|
|
38
|
-
const
|
|
39
|
-
const isAdmin = hasAnyRole(session?.user?.roles, ["Admin"]);
|
|
40
|
-
const isDev = env("VITE_SOLIDX_ENV") === "dev";
|
|
41
|
-
const redirectUrl = isAdmin && isDev ? "/studio" : (env("NEXT_PUBLIC_LOGIN_REDIRECT_URL") || "/admin");
|
|
35
|
+
// dispatch(showToast({ severity: "success", summary: ERROR_MESSAGES.LOGIN_SUCCESS, detail: ERROR_MESSAGES.DASHBOARD_REDIRECTING }));
|
|
36
|
+
const redirectUrl = env("NEXT_PUBLIC_LOGIN_REDIRECT_URL") || "/admin";
|
|
42
37
|
router.push(redirectUrl);
|
|
43
38
|
}
|
|
44
39
|
} catch (err: any) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MicrosoftAuthChecking.d.ts","sourceRoot":"","sources":["../../../src/components/auth/MicrosoftAuthChecking.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,qBAAqB,+CAgDjC,CAAA"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
38
|
+
import { ERROR_MESSAGES } from '../../constants/error-messages';
|
|
39
|
+
import { signInWithOAuthAccessCode } from "../../adapters/auth/index";
|
|
40
|
+
import { useRouter } from "../../hooks/useRouter";
|
|
41
|
+
import { useSearchParams } from "../../hooks/useSearchParams";
|
|
42
|
+
import { useEffect, useState } from 'react';
|
|
43
|
+
import { useDispatch } from 'react-redux';
|
|
44
|
+
import { env } from "../../adapters/env";
|
|
45
|
+
import { showToast } from "../../redux/features/toastSlice";
|
|
46
|
+
import { SolidSpinner } from "../shad-cn-ui";
|
|
47
|
+
export var MicrosoftAuthChecking = function () {
|
|
48
|
+
var searchParams = useSearchParams();
|
|
49
|
+
var accessCode = searchParams.get("accessCode");
|
|
50
|
+
var router = useRouter();
|
|
51
|
+
var _a = useState(null), error = _a[0], setError = _a[1];
|
|
52
|
+
var dispatch = useDispatch();
|
|
53
|
+
useEffect(function () {
|
|
54
|
+
var handleOAuthAuthentication = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
+
var response, redirectUrl, err_1;
|
|
56
|
+
var _a;
|
|
57
|
+
return __generator(this, function (_b) {
|
|
58
|
+
switch (_b.label) {
|
|
59
|
+
case 0:
|
|
60
|
+
if (!accessCode) {
|
|
61
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: ERROR_MESSAGES.AUTHENICATION__FAILED }));
|
|
62
|
+
setError(ERROR_MESSAGES.AUTHENICATION__FAILED);
|
|
63
|
+
return [2 /*return*/];
|
|
64
|
+
}
|
|
65
|
+
_b.label = 1;
|
|
66
|
+
case 1:
|
|
67
|
+
_b.trys.push([1, 3, , 4]);
|
|
68
|
+
return [4 /*yield*/, signInWithOAuthAccessCode({
|
|
69
|
+
accessCode: accessCode,
|
|
70
|
+
provider: "microsoft"
|
|
71
|
+
})];
|
|
72
|
+
case 2:
|
|
73
|
+
response = _b.sent();
|
|
74
|
+
if (response === null || response === void 0 ? void 0 : response.error) {
|
|
75
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: response.error }));
|
|
76
|
+
setError(ERROR_MESSAGES.AUTHENICATION__FAILED);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
redirectUrl = env("NEXT_PUBLIC_LOGIN_REDIRECT_URL") || "/admin";
|
|
80
|
+
router.push(redirectUrl);
|
|
81
|
+
}
|
|
82
|
+
return [3 /*break*/, 4];
|
|
83
|
+
case 3:
|
|
84
|
+
err_1 = _b.sent();
|
|
85
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: ((_a = err_1 === null || err_1 === void 0 ? void 0 : err_1.data) === null || _a === void 0 ? void 0 : _a.message) || ERROR_MESSAGES.AUTHENICATION__FAILED }));
|
|
86
|
+
return [3 /*break*/, 4];
|
|
87
|
+
case 4: return [2 /*return*/];
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}); };
|
|
91
|
+
handleOAuthAuthentication();
|
|
92
|
+
}, [accessCode, router]);
|
|
93
|
+
if (error) {
|
|
94
|
+
return (_jsx("div", { className: "flex items-center justify-center min-h-screen", children: _jsx("h2", { className: "text-red-500 text-xl font-semibold", children: error }) }));
|
|
95
|
+
}
|
|
96
|
+
return (_jsx(SolidSpinner, { className: "flex items-center justify-center min-h-screen" }));
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=MicrosoftAuthChecking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MicrosoftAuthChecking.js","sourceRoot":"","sources":["../../../src/components/auth/MicrosoftAuthChecking.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,IAAM,qBAAqB,GAAG;IACjC,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,IAAM,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAElD,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IACrB,IAAA,KAAoB,QAAQ,CAAgB,IAAI,CAAC,EAAhD,KAAK,QAAA,EAAE,QAAQ,QAAiC,CAAC;IACxD,IAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,SAAS,CAAC;QACN,IAAM,yBAAyB,GAAG;;;;;;wBAC9B,IAAI,CAAC,UAAU,EAAE;4BACb,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;4BAC9H,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC;4BAC/C,sBAAO;yBACV;;;;wBAGoB,qBAAM,yBAAyB,CAAC;gCAC7C,UAAU,EAAE,UAAU;gCACtB,QAAQ,EAAE,WAAW;6BACxB,CAAC,EAAA;;wBAHI,QAAQ,GAAG,SAGf;wBAEF,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,EAAE;4BACjB,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;4BACxG,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAA;yBACjD;6BAAM;4BAEG,WAAW,GAAG,GAAG,CAAC,gCAAgC,CAAC,IAAI,QAAQ,CAAC;4BACtE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;yBAC5B;;;;wBAED,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,CAAA,MAAA,KAAG,aAAH,KAAG,uBAAH,KAAG,CAAE,IAAI,0CAAE,OAAO,KAAI,cAAc,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;;;;;aAE3J,CAAC;QAEF,yBAAyB,EAAE,CAAC;IAChC,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IAEzB,IAAI,KAAK,EAAE;QACP,OAAO,CACH,cAAK,SAAS,EAAC,+CAA+C,YAC1D,aAAI,SAAS,EAAC,oCAAoC,YAAE,KAAK,GAAM,GAC7D,CACT,CAAC;KACL;IACD,OAAO,CACH,KAAC,YAAY,IAAC,SAAS,EAAC,+CAA+C,GAAG,CAC7E,CAAA;AACL,CAAC,CAAA","sourcesContent":["import { ERROR_MESSAGES } from '../../constants/error-messages';\nimport { signInWithOAuthAccessCode } from \"../../adapters/auth/index\";\nimport { useRouter } from \"../../hooks/useRouter\";\nimport { useSearchParams } from \"../../hooks/useSearchParams\";\nimport { useEffect, useState } from 'react'\nimport { useDispatch } from 'react-redux';\nimport { env } from \"../../adapters/env\";\nimport { showToast } from \"../../redux/features/toastSlice\";\nimport { SolidSpinner } from \"../shad-cn-ui\";\n\nexport const MicrosoftAuthChecking = () => {\n const searchParams = useSearchParams();\n const accessCode = searchParams.get(\"accessCode\");\n\n const router = useRouter();\n const [error, setError] = useState<string | null>(null);\n const dispatch = useDispatch();\n\n useEffect(() => {\n const handleOAuthAuthentication = async () => {\n if (!accessCode) {\n dispatch(showToast({ severity: \"error\", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: ERROR_MESSAGES.AUTHENICATION__FAILED }));\n setError(ERROR_MESSAGES.AUTHENICATION__FAILED);\n return;\n }\n\n try {\n const response = await signInWithOAuthAccessCode({\n accessCode: accessCode,\n provider: \"microsoft\"\n });\n\n if (response?.error) {\n dispatch(showToast({ severity: \"error\", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: response.error }));\n setError(ERROR_MESSAGES.AUTHENICATION__FAILED)\n } else {\n // dispatch(showToast({ severity: \"success\", summary: ERROR_MESSAGES.LOGIN_SUCCESS, detail: ERROR_MESSAGES.DASHBOARD_REDIRECTING }));\n const redirectUrl = env(\"NEXT_PUBLIC_LOGIN_REDIRECT_URL\") || \"/admin\";\n router.push(redirectUrl);\n }\n } catch (err: any) {\n dispatch(showToast({ severity: \"error\", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: err?.data?.message || ERROR_MESSAGES.AUTHENICATION__FAILED }));\n }\n };\n\n handleOAuthAuthentication();\n }, [accessCode, router]);\n\n if (error) {\n return (\n <div className=\"flex items-center justify-center min-h-screen\">\n <h2 className=\"text-red-500 text-xl font-semibold\">{error}</h2>\n </div>\n );\n }\n return (\n <SolidSpinner className=\"flex items-center justify-center min-h-screen\" />\n )\n}\n"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ERROR_MESSAGES } from '../../constants/error-messages';
|
|
2
|
+
import { signInWithOAuthAccessCode } from "../../adapters/auth/index";
|
|
3
|
+
import { useRouter } from "../../hooks/useRouter";
|
|
4
|
+
import { useSearchParams } from "../../hooks/useSearchParams";
|
|
5
|
+
import { useEffect, useState } from 'react'
|
|
6
|
+
import { useDispatch } from 'react-redux';
|
|
7
|
+
import { env } from "../../adapters/env";
|
|
8
|
+
import { showToast } from "../../redux/features/toastSlice";
|
|
9
|
+
import { SolidSpinner } from "../shad-cn-ui";
|
|
10
|
+
|
|
11
|
+
export const MicrosoftAuthChecking = () => {
|
|
12
|
+
const searchParams = useSearchParams();
|
|
13
|
+
const accessCode = searchParams.get("accessCode");
|
|
14
|
+
|
|
15
|
+
const router = useRouter();
|
|
16
|
+
const [error, setError] = useState<string | null>(null);
|
|
17
|
+
const dispatch = useDispatch();
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
const handleOAuthAuthentication = async () => {
|
|
21
|
+
if (!accessCode) {
|
|
22
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: ERROR_MESSAGES.AUTHENICATION__FAILED }));
|
|
23
|
+
setError(ERROR_MESSAGES.AUTHENICATION__FAILED);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const response = await signInWithOAuthAccessCode({
|
|
29
|
+
accessCode: accessCode,
|
|
30
|
+
provider: "microsoft"
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
if (response?.error) {
|
|
34
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: response.error }));
|
|
35
|
+
setError(ERROR_MESSAGES.AUTHENICATION__FAILED)
|
|
36
|
+
} else {
|
|
37
|
+
// dispatch(showToast({ severity: "success", summary: ERROR_MESSAGES.LOGIN_SUCCESS, detail: ERROR_MESSAGES.DASHBOARD_REDIRECTING }));
|
|
38
|
+
const redirectUrl = env("NEXT_PUBLIC_LOGIN_REDIRECT_URL") || "/admin";
|
|
39
|
+
router.push(redirectUrl);
|
|
40
|
+
}
|
|
41
|
+
} catch (err: any) {
|
|
42
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.LOGIN_ERROR, detail: err?.data?.message || ERROR_MESSAGES.AUTHENICATION__FAILED }));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
handleOAuthAuthentication();
|
|
47
|
+
}, [accessCode, router]);
|
|
48
|
+
|
|
49
|
+
if (error) {
|
|
50
|
+
return (
|
|
51
|
+
<div className="flex items-center justify-center min-h-screen">
|
|
52
|
+
<h2 className="text-red-500 text-xl font-semibold">{error}</h2>
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
return (
|
|
57
|
+
<SolidSpinner className="flex items-center justify-center min-h-screen" />
|
|
58
|
+
)
|
|
59
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidForgotPassword.d.ts","sourceRoot":"","sources":["../../../src/components/auth/SolidForgotPassword.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SolidForgotPassword.d.ts","sourceRoot":"","sources":["../../../src/components/auth/SolidForgotPassword.tsx"],"names":[],"mappings":"AAUA,QAAA,MAAM,mBAAmB,yDAA0D,GAAG,4CAgGrF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -38,20 +38,16 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
38
38
|
import { useInitiateChangePasswordMutation } from "../../redux/api/authApi";
|
|
39
39
|
import { useFormik } from "formik";
|
|
40
40
|
import { useRouter } from "../../hooks/useRouter";
|
|
41
|
-
import { useEffect } from "react";
|
|
42
41
|
import * as Yup from "yup";
|
|
43
42
|
import { ERROR_MESSAGES } from "../../constants/error-messages";
|
|
44
|
-
import { useLazyGetAuthSettingsQuery } from "../../redux/api/solidSettingsApi";
|
|
45
43
|
import { showToast } from "../../redux/features/toastSlice";
|
|
46
44
|
import { useDispatch } from "react-redux";
|
|
47
45
|
import { SolidButton, SolidInput, SolidMessage } from "../shad-cn-ui";
|
|
46
|
+
import { useAuthSettings } from "./AuthSettingsContext";
|
|
48
47
|
var SolidForgotPassword = function (_a) {
|
|
49
48
|
var _b, _c, _d;
|
|
50
49
|
var signInValidatorLabel = _a.signInValidatorLabel, signInValidatorPlaceholder = _a.signInValidatorPlaceholder;
|
|
51
|
-
var
|
|
52
|
-
useEffect(function () {
|
|
53
|
-
trigger(""); // Fetch settings on mount
|
|
54
|
-
}, [trigger]);
|
|
50
|
+
var solidSettingsData = useAuthSettings().solidSettingsData;
|
|
55
51
|
var dispatch = useDispatch();
|
|
56
52
|
var router = useRouter();
|
|
57
53
|
var initiateChangePassword = useInitiateChangePasswordMutation()[0];
|
|
@@ -104,7 +100,7 @@ var SolidForgotPassword = function (_a) {
|
|
|
104
100
|
var isFormFieldValid = function (formik, fieldName) {
|
|
105
101
|
return formik.touched[fieldName] && formik.errors[fieldName];
|
|
106
102
|
};
|
|
107
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { className: "auth-container ".concat(((_b = solidSettingsData === null || solidSettingsData === void 0 ? void 0 : solidSettingsData.data) === null || _b === void 0 ? void 0 : _b.authPagesLayout) === 'center' ? 'center' : 'side'), children: [_jsx("h2", { className: "solid-auth-title", children: "Forgot password" }),
|
|
103
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { className: "auth-container ".concat(((_b = solidSettingsData === null || solidSettingsData === void 0 ? void 0 : solidSettingsData.data) === null || _b === void 0 ? void 0 : _b.authPagesLayout) === 'center' ? 'center' : 'side'), children: [_jsx("h2", { className: "solid-auth-title", children: "Forgot password" }), _jsxs("p", { className: "solid-auth-helper", children: ["Enter your email. ", _jsx("br", {}), "Please note that you will receive an email with password reset instructions if an account exists for the corresponding masked email address."] }), _jsxs("form", { onSubmit: formik.handleSubmit, children: [_jsxs("div", { className: "flex flex-column gap-2", children: [_jsx("label", { htmlFor: "email", className: "solid-auth-input-label", children: signInValidatorLabel ? signInValidatorLabel : "Email" }), _jsx(SolidInput, { id: "email", name: "email", placeholder: signInValidatorPlaceholder ? signInValidatorPlaceholder : "Email ID", value: formik.values.email, onChange: formik.handleChange, onBlur: formik.handleBlur, autoComplete: "off" }), isFormFieldValid(formik, "email") && (_jsx(SolidMessage, { className: "text-red-500 text-sm", severity: "error", text: (_d = (_c = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _c === void 0 ? void 0 : _c.email) === null || _d === void 0 ? void 0 : _d.toString() }))] }), _jsxs("div", { className: "mt-4", children: [_jsx(SolidButton, { type: "submit", className: "w-full font-light auth-submit-button", label: "Continue", disabled: formik.isSubmitting, loading: formik.isSubmitting }), _jsx(SolidButton, { type: "button", label: "Back", className: "w-full auth-back-button text-center mt-1", text: true, onClick: function () { return (window.location.href = '/auth/login'); } })] })] })] }) }));
|
|
108
104
|
};
|
|
109
105
|
export default SolidForgotPassword;
|
|
110
106
|
//# sourceMappingURL=SolidForgotPassword.js.map
|