@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,582 @@
|
|
|
1
|
+
import { useEffect, useMemo, useState, type ComponentType } from "react";
|
|
2
|
+
import { Search } from "lucide-react";
|
|
3
|
+
import { useDispatch } from "react-redux";
|
|
4
|
+
import { env } from "../../adapters/env";
|
|
5
|
+
import { ERROR_MESSAGES } from "../../constants/error-messages";
|
|
6
|
+
import { getExtensionComponent } from "../../helpers/registry";
|
|
7
|
+
import {
|
|
8
|
+
extractSettingsList,
|
|
9
|
+
getSettingOptionLabel,
|
|
10
|
+
getSettingsMap,
|
|
11
|
+
humanizeSettingToken,
|
|
12
|
+
type AdminSettingDefinition,
|
|
13
|
+
} from "../../helpers/settingsPayload";
|
|
14
|
+
import type { SolidSettingsWidgetProps } from "../../types/solid-core";
|
|
15
|
+
import { showToast } from "../../redux/features/toastSlice";
|
|
16
|
+
import {
|
|
17
|
+
useBulkUpdateSolidSettingsMutation,
|
|
18
|
+
useGetSolidSettingsQuery,
|
|
19
|
+
} from "../../redux/api/solidSettingsApi";
|
|
20
|
+
import {
|
|
21
|
+
SolidButton,
|
|
22
|
+
SolidDatePicker,
|
|
23
|
+
SolidInput,
|
|
24
|
+
SolidSelect,
|
|
25
|
+
SolidSwitch,
|
|
26
|
+
SolidTabGroup,
|
|
27
|
+
SolidTag,
|
|
28
|
+
SolidTextarea,
|
|
29
|
+
SolidTooltip,
|
|
30
|
+
SolidTooltipContent,
|
|
31
|
+
SolidTooltipTrigger,
|
|
32
|
+
} from "../shad-cn-ui";
|
|
33
|
+
import { SettingDropzoneActivePlaceholder } from "./SolidSettings/SettingDropzoneActivePlaceholder";
|
|
34
|
+
import { SettingsImageRemoveButton } from "./SolidSettings/SettingsImageRemoveButton";
|
|
35
|
+
import { SolidUploadedImage } from "./SolidSettings/SolidUploadedImage";
|
|
36
|
+
import styles from "./SettingsComponent.module.css";
|
|
37
|
+
|
|
38
|
+
type SettingsFormValue = string | number | boolean | null | File;
|
|
39
|
+
type SettingsFilterMode = "all" | "read-only" | "editable";
|
|
40
|
+
|
|
41
|
+
function normalizeAssetUrl(src?: string | null) {
|
|
42
|
+
if (!src) return "";
|
|
43
|
+
const isBlobOrAbsolute = src.startsWith("blob:") || src.startsWith("http");
|
|
44
|
+
if (isBlobOrAbsolute || src.startsWith("/")) return src;
|
|
45
|
+
return `${env("API_URL")}/${src}`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function toModuleInitials(moduleName: string) {
|
|
49
|
+
return moduleName
|
|
50
|
+
.split(/[-_\s]+/)
|
|
51
|
+
.filter(Boolean)
|
|
52
|
+
.map((token) => token[0]?.toUpperCase())
|
|
53
|
+
.join("")
|
|
54
|
+
.slice(0, 2);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function serializeValue(value: unknown) {
|
|
58
|
+
if (value === null || value === undefined) return "";
|
|
59
|
+
if (typeof value === "string") return value;
|
|
60
|
+
return JSON.stringify(value);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function areValuesEqual(left: unknown, right: unknown) {
|
|
64
|
+
if (left instanceof File || right instanceof File) return false;
|
|
65
|
+
return serializeValue(left) === serializeValue(right);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function formatReadonlyValue(setting: AdminSettingDefinition, value: unknown) {
|
|
69
|
+
if (value === null || value === undefined || value === "") {
|
|
70
|
+
return "Not set";
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (setting.controlType === "boolean") {
|
|
74
|
+
return value ? "Enabled" : "Disabled";
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (setting.controlType === "selectionStatic") {
|
|
78
|
+
return getSettingOptionLabel(setting, value);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (setting.controlType === "mediaSingle") {
|
|
82
|
+
return String(value);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (typeof value === "object") {
|
|
86
|
+
return JSON.stringify(value, null, 2);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return String(value);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function getSettingsWidgetName(setting: AdminSettingDefinition) {
|
|
93
|
+
return setting.settingsWidget || "";
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function getCustomWidgetErrorText(setting: AdminSettingDefinition, widgetName: string, settingsWidget: ComponentType<any> | null) {
|
|
97
|
+
if (setting.controlType !== "custom") return null;
|
|
98
|
+
if (!widgetName) {
|
|
99
|
+
return `controlType is "custom" for setting "${setting.key}" but no settingsWidget is specified.`;
|
|
100
|
+
}
|
|
101
|
+
if (!settingsWidget) {
|
|
102
|
+
return `Widget "${widgetName}" is not registered for setting "${setting.key}".`;
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function SettingsComponent() {
|
|
108
|
+
const dispatch = useDispatch();
|
|
109
|
+
const { data: settingsResponse, refetch } = useGetSolidSettingsQuery(undefined);
|
|
110
|
+
const [bulkUpdateSolidSettings] = useBulkUpdateSolidSettingsMutation();
|
|
111
|
+
const [searchTerm, setSearchTerm] = useState("");
|
|
112
|
+
const [filterMode, setFilterMode] = useState<SettingsFilterMode>("all");
|
|
113
|
+
const [activeModule, setActiveModule] = useState("");
|
|
114
|
+
const [formValues, setFormValues] = useState<Record<string, SettingsFormValue>>({});
|
|
115
|
+
const [filePreviews, setFilePreviews] = useState<Record<string, string>>({});
|
|
116
|
+
|
|
117
|
+
const settingsList = useMemo(
|
|
118
|
+
() => extractSettingsList(settingsResponse).filter((setting) => setting.level !== "internal-user"),
|
|
119
|
+
[settingsResponse],
|
|
120
|
+
);
|
|
121
|
+
const settingsMap = useMemo(() => getSettingsMap(settingsResponse), [settingsResponse]);
|
|
122
|
+
const totalSettingsCount = settingsList.length;
|
|
123
|
+
const editableSettingsCount = useMemo(
|
|
124
|
+
() => settingsList.filter((setting) => setting.editable).length,
|
|
125
|
+
[settingsList],
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
useEffect(() => {
|
|
129
|
+
if (!settingsList.length) return;
|
|
130
|
+
const nextValues = Object.fromEntries(
|
|
131
|
+
settingsList.map((setting) => [setting.key, settingsMap[setting.key] ?? setting.value ?? null]),
|
|
132
|
+
);
|
|
133
|
+
setFormValues(nextValues);
|
|
134
|
+
}, [settingsList, settingsMap]);
|
|
135
|
+
|
|
136
|
+
const filteredSettings = useMemo(() => {
|
|
137
|
+
const scopedSettings = settingsList.filter((setting) => {
|
|
138
|
+
if (filterMode === "read-only") return !setting.editable;
|
|
139
|
+
if (filterMode === "editable") return setting.editable;
|
|
140
|
+
return true;
|
|
141
|
+
});
|
|
142
|
+
const query = searchTerm.trim().toLowerCase();
|
|
143
|
+
if (!query) return scopedSettings;
|
|
144
|
+
|
|
145
|
+
return scopedSettings.filter((setting) => {
|
|
146
|
+
const haystack = [
|
|
147
|
+
setting.moduleName,
|
|
148
|
+
setting.group,
|
|
149
|
+
setting.key,
|
|
150
|
+
setting.label,
|
|
151
|
+
setting.description,
|
|
152
|
+
setting.options?.map((option) => `${option.label} ${option.value}`).join(" "),
|
|
153
|
+
]
|
|
154
|
+
.filter(Boolean)
|
|
155
|
+
.join(" ")
|
|
156
|
+
.toLowerCase();
|
|
157
|
+
|
|
158
|
+
return haystack.includes(query);
|
|
159
|
+
});
|
|
160
|
+
}, [filterMode, searchTerm, settingsList]);
|
|
161
|
+
|
|
162
|
+
const moduleEntries = useMemo(() => {
|
|
163
|
+
const grouped = new Map<string, AdminSettingDefinition[]>();
|
|
164
|
+
filteredSettings.forEach((setting) => {
|
|
165
|
+
const current = grouped.get(setting.moduleName) ?? [];
|
|
166
|
+
current.push(setting);
|
|
167
|
+
grouped.set(setting.moduleName, current);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
return Array.from(grouped.entries()).map(([moduleName, moduleSettings]) => ({
|
|
171
|
+
moduleName,
|
|
172
|
+
label: humanizeSettingToken(moduleName),
|
|
173
|
+
badge: toModuleInitials(moduleName) || "S",
|
|
174
|
+
settings: moduleSettings,
|
|
175
|
+
}));
|
|
176
|
+
}, [filteredSettings]);
|
|
177
|
+
|
|
178
|
+
useEffect(() => {
|
|
179
|
+
if (!moduleEntries.length) {
|
|
180
|
+
setActiveModule("");
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (!moduleEntries.some((entry) => entry.moduleName === activeModule)) {
|
|
185
|
+
setActiveModule(moduleEntries[0].moduleName);
|
|
186
|
+
}
|
|
187
|
+
}, [activeModule, moduleEntries]);
|
|
188
|
+
|
|
189
|
+
const hasChanges = useMemo(
|
|
190
|
+
() =>
|
|
191
|
+
settingsList.some(
|
|
192
|
+
(setting) =>
|
|
193
|
+
setting.editable &&
|
|
194
|
+
!areValuesEqual(formValues[setting.key], settingsMap[setting.key] ?? setting.value ?? null),
|
|
195
|
+
),
|
|
196
|
+
[formValues, settingsList, settingsMap],
|
|
197
|
+
);
|
|
198
|
+
|
|
199
|
+
const groupedModuleSettings = useMemo(() => {
|
|
200
|
+
const currentModule = moduleEntries.find((entry) => entry.moduleName === activeModule);
|
|
201
|
+
if (!currentModule) return [];
|
|
202
|
+
|
|
203
|
+
const grouped = new Map<string, AdminSettingDefinition[]>();
|
|
204
|
+
currentModule.settings.forEach((setting) => {
|
|
205
|
+
const groupKey = setting.group || "general";
|
|
206
|
+
const current = grouped.get(groupKey) ?? [];
|
|
207
|
+
current.push(setting);
|
|
208
|
+
grouped.set(groupKey, current);
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
return Array.from(grouped.entries()).map(([groupKey, groupSettings]) => ({
|
|
212
|
+
key: groupKey,
|
|
213
|
+
label: humanizeSettingToken(groupKey),
|
|
214
|
+
settings: groupSettings.sort((left, right) => {
|
|
215
|
+
const leftSort = left.sortOrder ?? Number.MAX_SAFE_INTEGER;
|
|
216
|
+
const rightSort = right.sortOrder ?? Number.MAX_SAFE_INTEGER;
|
|
217
|
+
if (leftSort !== rightSort) return leftSort - rightSort;
|
|
218
|
+
return (left.label ?? left.key).localeCompare(right.label ?? right.key);
|
|
219
|
+
}),
|
|
220
|
+
}));
|
|
221
|
+
}, [activeModule, moduleEntries]);
|
|
222
|
+
|
|
223
|
+
const updateValue = (key: string, value: SettingsFormValue) => {
|
|
224
|
+
setFormValues((current) => ({ ...current, [key]: value }));
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
const updateFileValue = (key: string, file: File | null) => {
|
|
228
|
+
if (!file) {
|
|
229
|
+
if (filePreviews[key]) {
|
|
230
|
+
URL.revokeObjectURL(filePreviews[key]);
|
|
231
|
+
}
|
|
232
|
+
setFilePreviews((current) => {
|
|
233
|
+
const next = { ...current };
|
|
234
|
+
delete next[key];
|
|
235
|
+
return next;
|
|
236
|
+
});
|
|
237
|
+
updateValue(key, null);
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (file.size > 2 * 1024 * 1024) {
|
|
242
|
+
dispatch(showToast({ severity: "error", summary: "File too large", detail: "Maximum file size is 2MB" }));
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (filePreviews[key]) {
|
|
247
|
+
URL.revokeObjectURL(filePreviews[key]);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const preview = URL.createObjectURL(file);
|
|
251
|
+
setFilePreviews((current) => ({ ...current, [key]: preview }));
|
|
252
|
+
updateValue(key, file);
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
useEffect(
|
|
256
|
+
() => () => {
|
|
257
|
+
Object.values(filePreviews).forEach((preview) => URL.revokeObjectURL(preview));
|
|
258
|
+
},
|
|
259
|
+
[filePreviews],
|
|
260
|
+
);
|
|
261
|
+
|
|
262
|
+
const handleSave = async () => {
|
|
263
|
+
try {
|
|
264
|
+
const updatedSettingsArray: Array<{ key: string; value: string; type: string }> = [];
|
|
265
|
+
const formData = new FormData();
|
|
266
|
+
|
|
267
|
+
settingsList.forEach((setting) => {
|
|
268
|
+
if (!setting.editable) return;
|
|
269
|
+
|
|
270
|
+
const nextValue = formValues[setting.key];
|
|
271
|
+
const currentValue = settingsMap[setting.key] ?? setting.value ?? null;
|
|
272
|
+
|
|
273
|
+
if (nextValue instanceof File) {
|
|
274
|
+
formData.append(setting.key, nextValue);
|
|
275
|
+
updatedSettingsArray.push({ key: setting.key, value: "", type: "system" });
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
if (!areValuesEqual(nextValue, currentValue)) {
|
|
280
|
+
updatedSettingsArray.push({
|
|
281
|
+
key: setting.key,
|
|
282
|
+
value: serializeValue(nextValue),
|
|
283
|
+
type: "system",
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
if (!updatedSettingsArray.length) {
|
|
289
|
+
dispatch(showToast({ severity: "success", summary: "No Changes", detail: "No settings were updated" }));
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
formData.append("settings", JSON.stringify(updatedSettingsArray));
|
|
294
|
+
const response = await bulkUpdateSolidSettings({ data: formData }).unwrap();
|
|
295
|
+
|
|
296
|
+
if (response?.statusCode === 200) {
|
|
297
|
+
dispatch(showToast({ severity: "success", summary: "Updated", detail: "Settings updated" }));
|
|
298
|
+
} else {
|
|
299
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.FAILED, detail: ERROR_MESSAGES.SOMETHING_WRONG }));
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
await refetch();
|
|
303
|
+
setFilePreviews({});
|
|
304
|
+
} catch (error: any) {
|
|
305
|
+
dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.FAILED, detail: error?.data?.message || ERROR_MESSAGES.SOMETHING_WRONG }));
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
const moduleTabs = moduleEntries.map((entry) => ({
|
|
310
|
+
value: entry.moduleName,
|
|
311
|
+
label: (
|
|
312
|
+
<span className={styles.moduleTab}>
|
|
313
|
+
<span className={styles.moduleTabBadge}>{entry.badge}</span>
|
|
314
|
+
<span className={styles.moduleTabText}>
|
|
315
|
+
<span className={styles.moduleTabLabel}>{entry.label}</span>
|
|
316
|
+
<span className={styles.moduleTabMeta}>{entry.settings.length} settings</span>
|
|
317
|
+
</span>
|
|
318
|
+
</span>
|
|
319
|
+
),
|
|
320
|
+
content: (
|
|
321
|
+
<div>
|
|
322
|
+
{groupedModuleSettings.length ? (
|
|
323
|
+
groupedModuleSettings.map((group) => (
|
|
324
|
+
<section key={group.key} className={styles.groupSection}>
|
|
325
|
+
<div className={styles.groupCard}>
|
|
326
|
+
<div className={styles.groupHeader}>
|
|
327
|
+
<div>
|
|
328
|
+
<h3 className={styles.groupTitle}>{group.label}</h3>
|
|
329
|
+
<div className={styles.groupMeta}>{group.settings.length} item{group.settings.length === 1 ? "" : "s"}</div>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
<div className={styles.groupBody}>
|
|
333
|
+
{group.settings.map((setting) => {
|
|
334
|
+
const value = formValues[setting.key];
|
|
335
|
+
const settingsWidgetName = getSettingsWidgetName(setting);
|
|
336
|
+
const SettingsWidget = settingsWidgetName ? getExtensionComponent(settingsWidgetName) : null;
|
|
337
|
+
const customWidgetErrorText = getCustomWidgetErrorText(setting, settingsWidgetName, SettingsWidget);
|
|
338
|
+
const settingsWidgetProps: SolidSettingsWidgetProps = {
|
|
339
|
+
setting,
|
|
340
|
+
value,
|
|
341
|
+
settingsMap,
|
|
342
|
+
formValues,
|
|
343
|
+
editable: Boolean(setting.editable),
|
|
344
|
+
updateValue,
|
|
345
|
+
updateFileValue,
|
|
346
|
+
};
|
|
347
|
+
return (
|
|
348
|
+
<div key={setting.key} className={styles.settingRow}>
|
|
349
|
+
<div className={styles.settingLabelWrap}>
|
|
350
|
+
<div className={styles.settingLabelLine}>
|
|
351
|
+
<p className={styles.settingLabel}>{setting.label || humanizeSettingToken(setting.key)}</p>
|
|
352
|
+
{!setting.editable ? (
|
|
353
|
+
<SolidTooltip>
|
|
354
|
+
<SolidTooltipTrigger asChild>
|
|
355
|
+
<span>
|
|
356
|
+
<SolidTag tone="warn">Read only</SolidTag>
|
|
357
|
+
</span>
|
|
358
|
+
</SolidTooltipTrigger>
|
|
359
|
+
<SolidTooltipContent>
|
|
360
|
+
This value comes from system configuration and cannot be changed from the admin UI.
|
|
361
|
+
</SolidTooltipContent>
|
|
362
|
+
</SolidTooltip>
|
|
363
|
+
) : null}
|
|
364
|
+
</div>
|
|
365
|
+
{setting.description ? <p className={styles.settingDescription}>{setting.description}</p> : null}
|
|
366
|
+
</div>
|
|
367
|
+
|
|
368
|
+
{!setting.editable ? (
|
|
369
|
+
setting.controlType === "custom" ? (
|
|
370
|
+
customWidgetErrorText ? (
|
|
371
|
+
<div className={styles.readonlyValue}>
|
|
372
|
+
<span className={styles.customWidgetError}>{customWidgetErrorText}</span>
|
|
373
|
+
</div>
|
|
374
|
+
) : SettingsWidget ? (
|
|
375
|
+
(() => {
|
|
376
|
+
const ResolvedSettingsWidget = SettingsWidget as ComponentType<any>;
|
|
377
|
+
return <ResolvedSettingsWidget {...settingsWidgetProps} />;
|
|
378
|
+
})()
|
|
379
|
+
) : null
|
|
380
|
+
) : setting.controlType === "mediaSingle" && value ? (
|
|
381
|
+
<div className={styles.mediaPreview}>
|
|
382
|
+
<SolidUploadedImage src={normalizeAssetUrl(String(value))} />
|
|
383
|
+
</div>
|
|
384
|
+
) : (
|
|
385
|
+
<div className={styles.readonlyValue}>
|
|
386
|
+
<span className={value === null || value === undefined || value === "" ? styles.emptyValue : undefined}>
|
|
387
|
+
{formatReadonlyValue(setting, value)}
|
|
388
|
+
</span>
|
|
389
|
+
</div>
|
|
390
|
+
)
|
|
391
|
+
) : (
|
|
392
|
+
<div className={`${styles.controlStack} ${setting.controlType === "custom" ? styles.customControlStack : ""}`}>
|
|
393
|
+
{setting.controlType === "boolean" ? (
|
|
394
|
+
<div className={styles.boolRow}>
|
|
395
|
+
<SolidSwitch checked={Boolean(value)} onChange={(checked) => updateValue(setting.key, checked)} />
|
|
396
|
+
<span className={styles.boolText}>{value ? "Enabled" : "Disabled"}</span>
|
|
397
|
+
</div>
|
|
398
|
+
) : null}
|
|
399
|
+
|
|
400
|
+
{setting.controlType === "shortText" ? (
|
|
401
|
+
<SolidInput
|
|
402
|
+
type="text"
|
|
403
|
+
value={value == null ? "" : String(value)}
|
|
404
|
+
placeholder={setting.placeholder || setting.label}
|
|
405
|
+
onChange={(event: any) => updateValue(setting.key, event.target.value)}
|
|
406
|
+
/>
|
|
407
|
+
) : null}
|
|
408
|
+
|
|
409
|
+
{setting.controlType === "longText" ? (
|
|
410
|
+
<SolidTextarea
|
|
411
|
+
rows={4}
|
|
412
|
+
value={value == null ? "" : typeof value === "string" ? value : JSON.stringify(value, null, 2)}
|
|
413
|
+
placeholder={setting.placeholder || setting.label}
|
|
414
|
+
onChange={(event: any) => updateValue(setting.key, event.target.value)}
|
|
415
|
+
/>
|
|
416
|
+
) : null}
|
|
417
|
+
|
|
418
|
+
{setting.controlType === "numeric" ? (
|
|
419
|
+
<SolidInput
|
|
420
|
+
type="number"
|
|
421
|
+
value={value == null ? "" : String(value)}
|
|
422
|
+
placeholder={setting.placeholder || setting.label}
|
|
423
|
+
onChange={(event: any) => updateValue(setting.key, event.target.value === "" ? null : Number(event.target.value))}
|
|
424
|
+
/>
|
|
425
|
+
) : null}
|
|
426
|
+
|
|
427
|
+
{setting.controlType === "selectionStatic" ? (
|
|
428
|
+
<SolidSelect
|
|
429
|
+
value={value}
|
|
430
|
+
options={setting.options || []}
|
|
431
|
+
placeholder={setting.placeholder || "Select"}
|
|
432
|
+
onChange={(event) => updateValue(setting.key, event.value)}
|
|
433
|
+
/>
|
|
434
|
+
) : null}
|
|
435
|
+
|
|
436
|
+
{setting.controlType === "date" || setting.controlType === "datetime" ? (
|
|
437
|
+
<SolidDatePicker
|
|
438
|
+
selected={value ? new Date(String(value)) : null}
|
|
439
|
+
showTimeSelect={setting.controlType === "datetime"}
|
|
440
|
+
dateFormat={setting.controlType === "datetime" ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM-dd"}
|
|
441
|
+
onChange={(date: Date | null) => updateValue(setting.key, date instanceof Date ? date.toISOString() : null)}
|
|
442
|
+
/>
|
|
443
|
+
) : null}
|
|
444
|
+
|
|
445
|
+
{setting.controlType === "mediaSingle" ? (
|
|
446
|
+
<div className={styles.mediaField}>
|
|
447
|
+
<div className={styles.mediaComposer}>
|
|
448
|
+
<label className={styles.mediaDropzone}>
|
|
449
|
+
<input
|
|
450
|
+
className={styles.mediaInput}
|
|
451
|
+
type="file"
|
|
452
|
+
accept=".png,.jpg,.jpeg,.svg,.webp"
|
|
453
|
+
onChange={(event) => updateFileValue(setting.key, event.target.files?.[0] ?? null)}
|
|
454
|
+
/>
|
|
455
|
+
<SettingDropzoneActivePlaceholder note="PNG, JPG, JPEG, SVG, WEBP | Max size: 2 MB" />
|
|
456
|
+
</label>
|
|
457
|
+
{(filePreviews[setting.key] || value) ? (
|
|
458
|
+
<div className={styles.mediaPreview}>
|
|
459
|
+
<SolidUploadedImage src={filePreviews[setting.key] || normalizeAssetUrl(String(value))} />
|
|
460
|
+
</div>
|
|
461
|
+
) : (
|
|
462
|
+
<div className={styles.mediaEmptyState}>Preview appears here after upload</div>
|
|
463
|
+
)}
|
|
464
|
+
</div>
|
|
465
|
+
{(filePreviews[setting.key] || value) ? (
|
|
466
|
+
<SettingsImageRemoveButton onClick={() => updateFileValue(setting.key, null)} />
|
|
467
|
+
) : null}
|
|
468
|
+
</div>
|
|
469
|
+
) : null}
|
|
470
|
+
|
|
471
|
+
{setting.controlType === "custom" ? (
|
|
472
|
+
customWidgetErrorText ? (
|
|
473
|
+
<div className={styles.readonlyValue}>
|
|
474
|
+
<span className={styles.customWidgetError}>{customWidgetErrorText}</span>
|
|
475
|
+
</div>
|
|
476
|
+
) : SettingsWidget ? (
|
|
477
|
+
(() => {
|
|
478
|
+
const ResolvedSettingsWidget = SettingsWidget as ComponentType<any>;
|
|
479
|
+
return <ResolvedSettingsWidget {...settingsWidgetProps} />;
|
|
480
|
+
})()
|
|
481
|
+
) : null
|
|
482
|
+
) : null}
|
|
483
|
+
</div>
|
|
484
|
+
)}
|
|
485
|
+
</div>
|
|
486
|
+
);
|
|
487
|
+
})}
|
|
488
|
+
</div>
|
|
489
|
+
</div>
|
|
490
|
+
</section>
|
|
491
|
+
))
|
|
492
|
+
) : (
|
|
493
|
+
<div className={styles.emptyState}>No settings match the current filter.</div>
|
|
494
|
+
)}
|
|
495
|
+
</div>
|
|
496
|
+
),
|
|
497
|
+
}));
|
|
498
|
+
|
|
499
|
+
return (
|
|
500
|
+
<div className={styles.page}>
|
|
501
|
+
<div className="page-header secondary-border-bottom">
|
|
502
|
+
<div className={styles.headerIntro}>
|
|
503
|
+
<div className="form-wrapper-title">Settings</div>
|
|
504
|
+
<div className={styles.subtitle}>Manage platform configuration across modules from a single workspace.</div>
|
|
505
|
+
<div className={styles.summaryChips}>
|
|
506
|
+
<span className={styles.summaryChip}>{moduleEntries.length} module{moduleEntries.length === 1 ? "" : "s"}</span>
|
|
507
|
+
<span className={styles.summaryChip}>{totalSettingsCount} setting{totalSettingsCount === 1 ? "" : "s"}</span>
|
|
508
|
+
<button
|
|
509
|
+
type="button"
|
|
510
|
+
className={`${styles.summaryChip} ${styles.summaryChipButton} ${filterMode === "editable" ? styles.summaryChipActive : ""}`}
|
|
511
|
+
aria-pressed={filterMode === "editable"}
|
|
512
|
+
onClick={() => setFilterMode((current) => (current === "editable" ? "all" : "editable"))}
|
|
513
|
+
>
|
|
514
|
+
{editableSettingsCount} editable
|
|
515
|
+
</button>
|
|
516
|
+
</div>
|
|
517
|
+
</div>
|
|
518
|
+
<div className={styles.headerSearch}>
|
|
519
|
+
<div className={styles.searchIcon}>
|
|
520
|
+
<Search size={16} />
|
|
521
|
+
<SolidInput
|
|
522
|
+
className={styles.searchInput}
|
|
523
|
+
value={searchTerm}
|
|
524
|
+
placeholder="Search settings, groups, or modules"
|
|
525
|
+
onChange={(event: any) => setSearchTerm(event.target.value)}
|
|
526
|
+
/>
|
|
527
|
+
</div>
|
|
528
|
+
{searchTerm ? (
|
|
529
|
+
<span className={styles.resultsMeta}>
|
|
530
|
+
{filteredSettings.length} result{filteredSettings.length === 1 ? "" : "s"}
|
|
531
|
+
</span>
|
|
532
|
+
) : null}
|
|
533
|
+
</div>
|
|
534
|
+
<div className={styles.toolbarActions}>
|
|
535
|
+
<div className={styles.legend}>
|
|
536
|
+
<button
|
|
537
|
+
type="button"
|
|
538
|
+
className={`${styles.readonlyFilterButton} ${filterMode === "read-only" ? styles.readonlyFilterButtonActive : ""}`}
|
|
539
|
+
aria-pressed={filterMode === "read-only"}
|
|
540
|
+
aria-label={filterMode === "read-only" ? "Disable read-only filter" : "Enable read-only filter"}
|
|
541
|
+
onClick={() => setFilterMode((current) => (current === "read-only" ? "all" : "read-only"))}
|
|
542
|
+
>
|
|
543
|
+
<SolidTag tone="warn">Read only</SolidTag>
|
|
544
|
+
</button>
|
|
545
|
+
<span className={filterMode === "read-only" ? styles.legendLabelActive : undefined}>
|
|
546
|
+
{filterMode === "read-only" ? "Read-only filter active" : "System-managed value"}
|
|
547
|
+
</span>
|
|
548
|
+
<SolidTooltip>
|
|
549
|
+
<SolidTooltipTrigger asChild>
|
|
550
|
+
<button type="button" className={styles.legendButton} aria-label="Read-only legend details">
|
|
551
|
+
i
|
|
552
|
+
</button>
|
|
553
|
+
</SolidTooltipTrigger>
|
|
554
|
+
<SolidTooltipContent>
|
|
555
|
+
Read-only settings are visible here for context, but can only be changed through environment or backend configuration.
|
|
556
|
+
</SolidTooltipContent>
|
|
557
|
+
</SolidTooltip>
|
|
558
|
+
</div>
|
|
559
|
+
<SolidButton size="sm" type="button" loading={false} onClick={handleSave} disabled={!hasChanges}>
|
|
560
|
+
Save
|
|
561
|
+
</SolidButton>
|
|
562
|
+
</div>
|
|
563
|
+
</div>
|
|
564
|
+
|
|
565
|
+
<div className={styles.workspace}>
|
|
566
|
+
{moduleTabs.length ? (
|
|
567
|
+
<SolidTabGroup
|
|
568
|
+
tabs={moduleTabs}
|
|
569
|
+
value={activeModule}
|
|
570
|
+
onValueChange={setActiveModule}
|
|
571
|
+
className={styles.tabGroup}
|
|
572
|
+
listClassName={styles.tabList}
|
|
573
|
+
panelClassName={styles.tabPanel}
|
|
574
|
+
orientation="vertical"
|
|
575
|
+
/>
|
|
576
|
+
) : (
|
|
577
|
+
<div className={styles.emptyState}>No settings are available.</div>
|
|
578
|
+
)}
|
|
579
|
+
</div>
|
|
580
|
+
</div>
|
|
581
|
+
);
|
|
582
|
+
}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
type SocialMediaLoginProps = {
|
|
2
|
+
googleEnabled?: boolean;
|
|
3
|
+
facebookEnabled?: boolean;
|
|
4
|
+
appleEnabled?: boolean;
|
|
5
|
+
microsoftEnabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const SocialMediaLogin: ({ googleEnabled, facebookEnabled, appleEnabled, microsoftEnabled, }: SocialMediaLoginProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
2
9
|
//# sourceMappingURL=SocialMediaLogin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialMediaLogin.d.ts","sourceRoot":"","sources":["../../../src/components/common/SocialMediaLogin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SocialMediaLogin.d.ts","sourceRoot":"","sources":["../../../src/components/common/SocialMediaLogin.tsx"],"names":[],"mappings":"AAIA,KAAK,qBAAqB,GAAG;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,wEAK1B,qBAAqB,4CAiHvB,CAAC"}
|
|
@@ -2,20 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRouter } from "../../hooks/useRouter";
|
|
3
3
|
import { env } from "../../adapters/env";
|
|
4
4
|
import { SolidButton } from "../shad-cn-ui";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export var SocialMediaLogin = function () {
|
|
5
|
+
export var SocialMediaLogin = function (_a) {
|
|
6
|
+
var _b = _a.googleEnabled, googleEnabled = _b === void 0 ? false : _b, _c = _a.facebookEnabled, facebookEnabled = _c === void 0 ? false : _c, _d = _a.appleEnabled, appleEnabled = _d === void 0 ? false : _d, _e = _a.microsoftEnabled, microsoftEnabled = _e === void 0 ? false : _e;
|
|
8
7
|
var router = useRouter();
|
|
9
|
-
var dispatch = useDispatch();
|
|
10
8
|
var googleApiConnectRedirectUrl = "".concat(env("NEXT_PUBLIC_BACKEND_API_URL"), "/api/iam/google/connect");
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
detail: "This provider is not enabled yet.",
|
|
16
|
-
life: 2200,
|
|
17
|
-
}));
|
|
18
|
-
};
|
|
19
|
-
return (_jsx("div", { className: "mt-4", children: _jsxs("div", { className: "solid-auth-social-grid", children: [_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", onClick: function () { return showNotEnabledToast("Apple"); }, "aria-label": "Login with Apple (not enabled)", children: _jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "currentColor", "aria-hidden": "true", children: _jsx("path", { d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" }) }) }), _jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", onClick: function () { return router.push(googleApiConnectRedirectUrl); }, "aria-label": "Login with Google", children: _jsxs("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", "aria-hidden": "true", children: [_jsx("path", { d: "M21.8 12.23c0-.74-.07-1.45-.2-2.13H12v4.03h5.5a4.7 4.7 0 0 1-2.04 3.08v2.55h3.3c1.93-1.78 3.04-4.4 3.04-7.53z", fill: "#4285F4" }), _jsx("path", { d: "M12 22c2.75 0 5.05-.91 6.73-2.47l-3.3-2.55c-.92.62-2.1.99-3.43.99-2.64 0-4.88-1.78-5.68-4.18H2.9v2.63A10 10 0 0 0 12 22z", fill: "#34A853" }), _jsx("path", { d: "M6.32 13.79a6 6 0 0 1 0-3.58V7.58H2.9a10 10 0 0 0 0 8.84l3.42-2.63z", fill: "#FBBC05" }), _jsx("path", { d: "M12 6.02c1.49 0 2.82.51 3.87 1.5l2.9-2.9C17.04 2.98 14.74 2 12 2A10 10 0 0 0 2.9 7.58l3.42 2.63c.8-2.4 3.04-4.19 5.68-4.19z", fill: "#EA4335" })] }) }), _jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", onClick: function () { return showNotEnabledToast("Meta"); }, "aria-label": "Login with Meta (not enabled)", children: _jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M5.4 15.6c0-3.14 1.62-7.09 3.76-7.09 1.43 0 2.56 1.72 2.84 2.25.28-.53 1.41-2.25 2.84-2.25 2.14 0 3.76 3.95 3.76 7.09 0 1.79-.63 2.89-1.82 2.89-2.12 0-3.75-3.02-4.78-4.82-1.03 1.8-2.66 4.82-4.78 4.82-1.19 0-1.82-1.1-1.82-2.89z", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] }) }));
|
|
9
|
+
var facebookApiConnectRedirectUrl = "".concat(env("NEXT_PUBLIC_BACKEND_API_URL"), "/api/iam/facebook/connect");
|
|
10
|
+
var appleApiConnectRedirectUrl = "".concat(env("NEXT_PUBLIC_BACKEND_API_URL"), "/api/iam/apple/connect");
|
|
11
|
+
var microsoftApiConnectRedirectUrl = "".concat(env("NEXT_PUBLIC_BACKEND_API_URL"), "/api/iam/microsoft/connect");
|
|
12
|
+
return (_jsx("div", { className: "mt-4", children: _jsxs("div", { className: "solid-auth-social-grid", children: [appleEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", onClick: function () { return router.push(appleApiConnectRedirectUrl); }, "aria-label": "Login with Apple", children: _jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "currentColor", "aria-hidden": "true", children: _jsx("path", { d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" }) }) })), googleEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", onClick: function () { return router.push(googleApiConnectRedirectUrl); }, "aria-label": "Login with Google", children: _jsxs("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", "aria-hidden": "true", children: [_jsx("path", { d: "M21.8 12.23c0-.74-.07-1.45-.2-2.13H12v4.03h5.5a4.7 4.7 0 0 1-2.04 3.08v2.55h3.3c1.93-1.78 3.04-4.4 3.04-7.53z", fill: "#4285F4" }), _jsx("path", { d: "M12 22c2.75 0 5.05-.91 6.73-2.47l-3.3-2.55c-.92.62-2.1.99-3.43.99-2.64 0-4.88-1.78-5.68-4.18H2.9v2.63A10 10 0 0 0 12 22z", fill: "#34A853" }), _jsx("path", { d: "M6.32 13.79a6 6 0 0 1 0-3.58V7.58H2.9a10 10 0 0 0 0 8.84l3.42-2.63z", fill: "#FBBC05" }), _jsx("path", { d: "M12 6.02c1.49 0 2.82.51 3.87 1.5l2.9-2.9C17.04 2.98 14.74 2 12 2A10 10 0 0 0 2.9 7.58l3.42 2.63c.8-2.4 3.04-4.19 5.68-4.19z", fill: "#EA4335" })] }) })), facebookEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", onClick: function () { return router.push(facebookApiConnectRedirectUrl); }, "aria-label": "Login with Meta", children: _jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M5.4 15.6c0-3.14 1.62-7.09 3.76-7.09 1.43 0 2.56 1.72 2.84 2.25.28-.53 1.41-2.25 2.84-2.25 2.14 0 3.76 3.95 3.76 7.09 0 1.79-.63 2.89-1.82 2.89-2.12 0-3.75-3.02-4.78-4.82-1.03 1.8-2.66 4.82-4.78 4.82-1.19 0-1.82-1.1-1.82-2.89z", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) }) })), microsoftEnabled && (_jsx(SolidButton, { type: "button", variant: "outline", className: "solid-auth-social-btn", onClick: function () { return router.push(microsoftApiConnectRedirectUrl); }, "aria-label": "Login with Microsoft", children: _jsx("svg", { viewBox: "0 0 24 24", width: "18", height: "18", "aria-hidden": "true", children: _jsxs("g", { transform: "translate(2, 2)", children: [_jsx("rect", { width: "9", height: "9", x: "0", y: "0", fill: "#f25022" }), _jsx("rect", { width: "9", height: "9", x: "11", y: "0", fill: "#7fba00" }), _jsx("rect", { width: "9", height: "9", x: "0", y: "11", fill: "#00a4ef" }), _jsx("rect", { width: "9", height: "9", x: "11", y: "11", fill: "#ffb900" })] }) }) }))] }) }));
|
|
20
13
|
};
|
|
21
14
|
//# sourceMappingURL=SocialMediaLogin.js.map
|