@solidxai/core-ui 0.1.13-beta.1 → 0.1.13-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/common/SolidFieldTooltip.d.ts.map +1 -1
- package/dist/components/common/SolidFieldTooltip.js +33 -1
- package/dist/components/common/SolidFieldTooltip.js.map +1 -1
- package/dist/components/common/SolidFieldTooltip.tsx +64 -8
- package/dist/components/core/chatter/SolidChatter.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatter.js +4 -2
- package/dist/components/core/chatter/SolidChatter.js.map +1 -1
- package/dist/components/core/chatter/SolidChatter.tsx +4 -1
- package/dist/components/core/chatter/SolidChatterMentionMenu.d.ts +9 -0
- package/dist/components/core/chatter/SolidChatterMentionMenu.d.ts.map +1 -0
- package/dist/components/core/chatter/SolidChatterMentionMenu.js +18 -0
- package/dist/components/core/chatter/SolidChatterMentionMenu.js.map +1 -0
- package/dist/components/core/chatter/SolidChatterMentionMenu.tsx +45 -0
- package/dist/components/core/chatter/SolidChatterMessageBox.d.ts +1 -0
- package/dist/components/core/chatter/SolidChatterMessageBox.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatterMessageBox.js +29 -5
- package/dist/components/core/chatter/SolidChatterMessageBox.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterMessageBox.tsx +57 -4
- package/dist/components/core/chatter/SolidMessageComposer.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidMessageComposer.js +33 -7
- package/dist/components/core/chatter/SolidMessageComposer.js.map +1 -1
- package/dist/components/core/chatter/SolidMessageComposer.tsx +61 -7
- package/dist/components/core/chatter/chatter.module.css +63 -0
- package/dist/components/core/chatter/chatterMentions.d.ts +17 -0
- package/dist/components/core/chatter/chatterMentions.d.ts.map +1 -0
- package/dist/components/core/chatter/chatterMentions.js +50 -0
- package/dist/components/core/chatter/chatterMentions.js.map +1 -0
- package/dist/components/core/chatter/chatterMentions.ts +59 -0
- package/dist/components/core/chatter/useChatterMentions.d.ts +26 -0
- package/dist/components/core/chatter/useChatterMentions.d.ts.map +1 -0
- package/dist/components/core/chatter/useChatterMentions.js +204 -0
- package/dist/components/core/chatter/useChatterMentions.js.map +1 -0
- package/dist/components/core/chatter/useChatterMentions.ts +160 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.d.ts +8 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.js +6 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.js.map +1 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.ts +13 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.d.ts +11 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.js +10 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.js.map +1 -0
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.ts +22 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +4 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +6 -0
- package/dist/components/core/list/SolidCustomListColumn.d.ts +8 -0
- package/dist/components/core/list/SolidCustomListColumn.d.ts.map +1 -0
- package/dist/components/core/list/SolidCustomListColumn.js +47 -0
- package/dist/components/core/list/SolidCustomListColumn.js.map +1 -0
- package/dist/components/core/list/SolidCustomListColumn.tsx +57 -0
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +4 -3
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +4 -3
- package/dist/components/core/model/CreateModel.d.ts.map +1 -1
- package/dist/components/core/model/CreateModel.js +3 -2
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/model/CreateModel.tsx +4 -1
- package/dist/components/core/model/FieldMetaData.d.ts +1 -1
- package/dist/components/core/model/FieldMetaData.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaData.js +17 -17
- package/dist/components/core/model/FieldMetaData.js.map +1 -1
- package/dist/components/core/model/FieldMetaData.tsx +10 -2
- package/dist/components/shad-cn-ui/SolidTextarea.d.ts +1 -1
- package/dist/components/shad-cn-ui/SolidTextarea.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidTextarea.js +4 -3
- package/dist/components/shad-cn-ui/SolidTextarea.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidTextarea.tsx +4 -2
- package/dist/components/workflow/WorkflowFlowCanvas.css +431 -0
- package/dist/components/workflow/WorkflowFlowCanvas.d.ts +41 -0
- package/dist/components/workflow/WorkflowFlowCanvas.d.ts.map +1 -0
- package/dist/components/workflow/WorkflowFlowCanvas.js +705 -0
- package/dist/components/workflow/WorkflowFlowCanvas.js.map +1 -0
- package/dist/components/workflow/WorkflowFlowCanvas.tsx +1274 -0
- package/dist/components/workflow/WorkflowNodeDocsPanel.css +247 -0
- package/dist/components/workflow/WorkflowNodeDocsPanel.d.ts +22 -0
- package/dist/components/workflow/WorkflowNodeDocsPanel.d.ts.map +1 -0
- package/dist/components/workflow/WorkflowNodeDocsPanel.js +97 -0
- package/dist/components/workflow/WorkflowNodeDocsPanel.js.map +1 -0
- package/dist/components/workflow/WorkflowNodeDocsPanel.tsx +363 -0
- package/dist/components/workflow/WorkflowNodeSchemaEditor.d.ts +50 -0
- package/dist/components/workflow/WorkflowNodeSchemaEditor.d.ts.map +1 -0
- package/dist/components/workflow/WorkflowNodeSchemaEditor.js +309 -0
- package/dist/components/workflow/WorkflowNodeSchemaEditor.js.map +1 -0
- package/dist/components/workflow/WorkflowNodeSchemaEditor.tsx +808 -0
- package/dist/helpers/modulePackageResumeState.d.ts +6 -0
- package/dist/helpers/modulePackageResumeState.d.ts.map +1 -0
- package/dist/helpers/modulePackageResumeState.js +46 -0
- package/dist/helpers/modulePackageResumeState.js.map +1 -0
- package/dist/helpers/modulePackageResumeState.ts +57 -0
- package/dist/redux/api/workflowDefinitionEditorApi.d.ts +17 -0
- package/dist/redux/api/workflowDefinitionEditorApi.d.ts.map +1 -0
- package/dist/redux/api/workflowDefinitionEditorApi.js +38 -0
- package/dist/redux/api/workflowDefinitionEditorApi.js.map +1 -0
- package/dist/redux/api/workflowDefinitionEditorApi.ts +40 -0
- package/dist/redux/api/workflowNodeApi.d.ts +6 -0
- package/dist/redux/api/workflowNodeApi.d.ts.map +1 -0
- package/dist/redux/api/workflowNodeApi.js +14 -0
- package/dist/redux/api/workflowNodeApi.js.map +1 -0
- package/dist/redux/api/workflowNodeApi.ts +18 -0
- package/dist/resources/globals.css +14 -0
- package/dist/resources/shadcn-base.css +70 -16
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.css +970 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.d.ts +3 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.js +1287 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.js.map +1 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.tsx +2572 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.css +151 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.d.ts +3 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.js +250 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.js.map +1 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.tsx +455 -0
- package/dist/types/workflow-node.d.ts +127 -0
- package/dist/types/workflow-node.d.ts.map +1 -0
- package/dist/types/workflow-node.js +2 -0
- package/dist/types/workflow-node.js.map +1 -0
- package/dist/types/workflow-node.ts +162 -0
- package/package.json +1 -1
- 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/common/AuthBanner.d.ts +0 -3
- package/dist/components/common/AuthBanner.d.ts.map +0 -1
- package/dist/components/common/AuthBanner.js +0 -15
- package/dist/components/common/AuthBanner.js.map +0 -1
- package/dist/components/common/AuthBanner.tsx +0 -41
- package/dist/components/common/SingleSelectAutoCompleteField.d.ts +0 -2
- package/dist/components/common/SingleSelectAutoCompleteField.d.ts.map +0 -1
- package/dist/components/common/SingleSelectAutoCompleteField.js +0 -92
- package/dist/components/common/SingleSelectAutoCompleteField.js.map +0 -1
- package/dist/components/common/SingleSelectAutoCompleteField.tsx +0 -73
- package/dist/components/common/SolidExportStepper.d.ts +0 -12
- package/dist/components/common/SolidExportStepper.d.ts.map +0 -1
- package/dist/components/common/SolidExportStepper.js +0 -30
- package/dist/components/common/SolidExportStepper.js.map +0 -1
- package/dist/components/common/SolidExportStepper.tsx +0 -135
- 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/components/core/common/SolidGenericImport/SolidImportWrapper.d.ts +0 -2
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.d.ts.map +0 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.js +0 -16
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.js.map +0 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.tsx +0 -29
- package/dist/components/core/dashboard/DashboardFilter.d.ts +0 -13
- package/dist/components/core/dashboard/DashboardFilter.d.ts.map +0 -1
- package/dist/components/core/dashboard/DashboardFilter.js +0 -299
- package/dist/components/core/dashboard/DashboardFilter.js.map +0 -1
- package/dist/components/core/dashboard/DashboardFilter.tsx +0 -348
- package/dist/components/core/dashboard/PrimeDataTableWrapper.d.ts +0 -3
- package/dist/components/core/dashboard/PrimeDataTableWrapper.d.ts.map +0 -1
- package/dist/components/core/dashboard/PrimeDataTableWrapper.js +0 -21
- package/dist/components/core/dashboard/PrimeDataTableWrapper.js.map +0 -1
- package/dist/components/core/dashboard/PrimeDataTableWrapper.tsx +0 -40
- package/dist/components/core/dashboard/SolidDashboard.d.ts +0 -28
- package/dist/components/core/dashboard/SolidDashboard.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboard.js +0 -183
- package/dist/components/core/dashboard/SolidDashboard.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboard.module.css +0 -83
- package/dist/components/core/dashboard/SolidDashboard.tsx +0 -263
- package/dist/components/core/dashboard/SolidDashboardBody.d.ts +0 -24
- package/dist/components/core/dashboard/SolidDashboardBody.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardBody.js +0 -162
- package/dist/components/core/dashboard/SolidDashboardBody.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardBody.tsx +0 -168
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.d.ts +0 -2
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.js +0 -11
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.tsx +0 -28
- package/dist/components/core/dashboard/SolidDashboardHeader.d.ts +0 -3
- package/dist/components/core/dashboard/SolidDashboardHeader.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardHeader.js +0 -6
- package/dist/components/core/dashboard/SolidDashboardHeader.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardHeader.tsx +0 -10
- package/dist/components/core/dashboard/SolidDashboardLoading.d.ts +0 -2
- package/dist/components/core/dashboard/SolidDashboardLoading.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardLoading.js +0 -10
- package/dist/components/core/dashboard/SolidDashboardLoading.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardLoading.tsx +0 -61
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.d.ts +0 -3
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.js +0 -12
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.tsx +0 -32
- package/dist/components/core/dashboard/SolidDashboardRenderError.d.ts +0 -2
- package/dist/components/core/dashboard/SolidDashboardRenderError.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardRenderError.js +0 -11
- package/dist/components/core/dashboard/SolidDashboardRenderError.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardRenderError.tsx +0 -28
- package/dist/components/core/dashboard/SolidDashboardVariable.d.ts +0 -19
- package/dist/components/core/dashboard/SolidDashboardVariable.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardVariable.js +0 -171
- package/dist/components/core/dashboard/SolidDashboardVariable.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardVariable.tsx +0 -259
- package/dist/components/core/dashboard/SolidQuestionRenderer.d.ts +0 -9
- package/dist/components/core/dashboard/SolidQuestionRenderer.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidQuestionRenderer.js +0 -42
- package/dist/components/core/dashboard/SolidQuestionRenderer.js.map +0 -1
- package/dist/components/core/dashboard/SolidQuestionRenderer.tsx +0 -99
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.d.ts +0 -9
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.d.ts.map +0 -1
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.js +0 -35
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.js.map +0 -1
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.tsx +0 -48
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.d.ts +0 -7
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.d.ts.map +0 -1
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.js +0 -22
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.js.map +0 -1
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.tsx +0 -51
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.d.ts +0 -2
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.d.ts.map +0 -1
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.js +0 -4
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.js.map +0 -1
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.ts +0 -25
- package/dist/components/core/dashboard/dashboard-utils.d.ts +0 -2
- package/dist/components/core/dashboard/dashboard-utils.d.ts.map +0 -1
- package/dist/components/core/dashboard/dashboard-utils.js +0 -38
- package/dist/components/core/dashboard/dashboard-utils.js.map +0 -1
- package/dist/components/core/dashboard/dashboard-utils.ts +0 -39
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.d.ts +0 -10
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.js +0 -16
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.js.map +0 -1
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.ts +0 -19
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.d.ts +0 -8
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.js +0 -64
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.js.map +0 -1
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.ts +0 -30
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.d.ts +0 -8
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.js +0 -62
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.js.map +0 -1
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.ts +0 -29
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.d.ts +0 -4
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.js +0 -23
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.js.map +0 -1
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.tsx +0 -36
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.d.ts +0 -3
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.d.ts.map +0 -1
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.js +0 -92
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.js.map +0 -1
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.tsx +0 -68
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.d.ts +0 -3
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.d.ts.map +0 -1
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.js +0 -111
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.js.map +0 -1
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.tsx +0 -122
- package/dist/components/core/kanban/SolidKanbanViewFields.d.ts +0 -12
- package/dist/components/core/kanban/SolidKanbanViewFields.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidKanbanViewFields.js +0 -145
- package/dist/components/core/kanban/SolidKanbanViewFields.js.map +0 -1
- package/dist/components/core/kanban/SolidKanbanViewFields.tsx +0 -164
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts +0 -2
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js +0 -87
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js.map +0 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.tsx +0 -59
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts +0 -2
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.js +0 -73
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.js.map +0 -1
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.tsx +0 -50
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts +0 -2
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.js +0 -20
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.js.map +0 -1
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.tsx +0 -32
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts +0 -12
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidVarInputsFilterElement.js +0 -81
- package/dist/components/core/kanban/SolidVarInputsFilterElement.js.map +0 -1
- package/dist/components/core/kanban/SolidVarInputsFilterElement.tsx +0 -184
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.js +0 -7
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.tsx +0 -16
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.js +0 -21
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.tsx +0 -23
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.tsx +0 -14
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.tsx +0 -13
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.js +0 -7
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.tsx +0 -12
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.js +0 -7
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.tsx +0 -14
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.js +0 -16
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.tsx +0 -20
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.js +0 -7
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js +0 -56
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +0 -140
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js +0 -42
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +0 -164
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.js +0 -11
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.tsx +0 -13
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.js +0 -7
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.tsx +0 -14
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.tsx +0 -14
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js +0 -37
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +0 -121
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.tsx +0 -12
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.tsx +0 -13
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js +0 -7
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +0 -16
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts +0 -2
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts.map +0 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js +0 -39
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js.map +0 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.tsx +0 -40
- package/dist/components/core/list/SolidVarInputsFilterElement.d.ts +0 -12
- package/dist/components/core/list/SolidVarInputsFilterElement.d.ts.map +0 -1
- package/dist/components/core/list/SolidVarInputsFilterElement.js +0 -81
- package/dist/components/core/list/SolidVarInputsFilterElement.js.map +0 -1
- package/dist/components/core/list/SolidVarInputsFilterElement.tsx +0 -184
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.d.ts +0 -3
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.d.ts.map +0 -1
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.js +0 -87
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.js.map +0 -1
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.tsx +0 -70
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.d.ts +0 -3
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.d.ts.map +0 -1
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.js +0 -33
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.js.map +0 -1
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.tsx +0 -50
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.d.ts +0 -3
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.d.ts.map +0 -1
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.js +0 -158
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.js.map +0 -1
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.tsx +0 -185
- package/dist/components/layout/DashboardHeader.d.ts +0 -3
- package/dist/components/layout/DashboardHeader.d.ts.map +0 -1
- package/dist/components/layout/DashboardHeader.js +0 -20
- package/dist/components/layout/DashboardHeader.js.map +0 -1
- package/dist/components/layout/DashboardHeader.tsx +0 -94
- package/dist/helpers/# no such endpoints exist, need to calle +0 -3
- package/dist/helpers/ToastContainer.d.ts +0 -4
- package/dist/helpers/ToastContainer.d.ts.map +0 -1
- package/dist/helpers/ToastContainer.js +0 -49
- package/dist/helpers/ToastContainer.js.map +0 -1
- package/dist/helpers/ToastContainer.tsx +0 -94
- package/dist/helpers/showToast.d.ts +0 -5
- package/dist/helpers/showToast.d.ts.map +0 -1
- package/dist/helpers/showToast.js +0 -17
- package/dist/helpers/showToast.js.map +0 -1
- package/dist/helpers/showToast.ts +0 -13
- package/dist/helpers/studioSandbox.d.ts +0 -31
- package/dist/helpers/studioSandbox.d.ts.map +0 -1
- package/dist/helpers/studioSandbox.js +0 -104
- package/dist/helpers/studioSandbox.js.map +0 -1
- package/dist/helpers/studioSandbox.ts +0 -117
- 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/api/dashboardApi.d.ts +0 -23
- package/dist/redux/api/dashboardApi.d.ts.map +0 -1
- package/dist/redux/api/dashboardApi.js +0 -35
- package/dist/redux/api/dashboardApi.js.map +0 -1
- package/dist/redux/api/dashboardApi.ts +0 -56
- package/dist/redux/api/dashboardLayoutApi.d.ts +0 -24
- package/dist/redux/api/dashboardLayoutApi.d.ts.map +0 -1
- package/dist/redux/api/dashboardLayoutApi.js +0 -34
- package/dist/redux/api/dashboardLayoutApi.js.map +0 -1
- package/dist/redux/api/dashboardLayoutApi.ts +0 -55
- package/dist/redux/api/dashboardQuestionApi.d.ts +0 -5
- package/dist/redux/api/dashboardQuestionApi.d.ts.map +0 -1
- package/dist/redux/api/dashboardQuestionApi.js +0 -18
- package/dist/redux/api/dashboardQuestionApi.js.map +0 -1
- package/dist/redux/api/dashboardQuestionApi.ts +0 -17
- 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
- package/dist/resources/images/Footerbg.png +0 -0
- package/dist/resources/images/LoginBanner.png +0 -0
- package/dist/resources/images/dashboard/Ellipse 1.svg +0 -10
- package/dist/resources/images/dashboard/Rectangle 17.svg +0 -10
- package/dist/resources/images/dashboard/Rectangle 25.svg +0 -11
- package/dist/resources/images/dashboard/image 5.svg +0 -9
- package/dist/resources/images/loginhero.png +0 -0
- package/dist/resources/images/logo.png +0 -0
- package/dist/resources/images/radix-logo-white.png +0 -0
- package/dist/resources/images/radix-logo.png +0 -0
- package/dist/resources/images/signupBanner.png +0 -0
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Studio Sandbox Mode API
|
|
3
|
-
*
|
|
4
|
-
* This module isolates the application layout from the Solid Studio UI.
|
|
5
|
-
* It dynamically creates a container to wrap the application root, converting
|
|
6
|
-
* it into a relative containing block. This prevents \`position: fixed\` elements
|
|
7
|
-
* within the application from inadvertently overlapping with the global Studio UI.
|
|
8
|
-
*/
|
|
9
|
-
var originalRootParent = null;
|
|
10
|
-
var originalRootNextSibling = null;
|
|
11
|
-
var isSandboxActive = false;
|
|
12
|
-
function getAppRoot() {
|
|
13
|
-
// Determine the root depending on the framework (Vite uses #root, Next uses #__next)
|
|
14
|
-
return document.getElementById("root") || document.getElementById("__next") || document.body.firstElementChild;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Wraps the app root into the sandbox container.
|
|
18
|
-
*/
|
|
19
|
-
export function enableStudioMode() {
|
|
20
|
-
if (typeof window === "undefined" || isSandboxActive)
|
|
21
|
-
return;
|
|
22
|
-
var appRoot = getAppRoot();
|
|
23
|
-
if (!appRoot || appRoot.id === "solid-studio-root" || appRoot.id === "solid-studio-app-container") {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
var parent = appRoot.parentNode;
|
|
27
|
-
if (!parent)
|
|
28
|
-
return;
|
|
29
|
-
isSandboxActive = true;
|
|
30
|
-
originalRootParent = parent;
|
|
31
|
-
originalRootNextSibling = appRoot.nextSibling;
|
|
32
|
-
// Create the outer wrapper
|
|
33
|
-
var studioRoot = document.createElement("div");
|
|
34
|
-
studioRoot.id = "solid-studio-root";
|
|
35
|
-
// Create the isolation container
|
|
36
|
-
var appContainer = document.createElement("div");
|
|
37
|
-
appContainer.id = "solid-studio-app-container";
|
|
38
|
-
// Re-parent the app node
|
|
39
|
-
appContainer.appendChild(appRoot);
|
|
40
|
-
studioRoot.appendChild(appContainer);
|
|
41
|
-
// Insert the wrapper into the DOM where the root used to be
|
|
42
|
-
parent.insertBefore(studioRoot, originalRootNextSibling);
|
|
43
|
-
// Set a class on the body to indicate Studio Mode
|
|
44
|
-
document.body.classList.add("solid-studio-active");
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Restores the application to its original state.
|
|
48
|
-
*/
|
|
49
|
-
export function disableStudioMode() {
|
|
50
|
-
if (typeof window === "undefined" || !isSandboxActive)
|
|
51
|
-
return;
|
|
52
|
-
var studioRoot = document.getElementById("solid-studio-root");
|
|
53
|
-
var appContainer = document.getElementById("solid-studio-app-container");
|
|
54
|
-
// Find our wrapped app root
|
|
55
|
-
var appRoot = appContainer === null || appContainer === void 0 ? void 0 : appContainer.firstElementChild;
|
|
56
|
-
if (studioRoot && appRoot && originalRootParent) {
|
|
57
|
-
originalRootParent.insertBefore(appRoot, originalRootNextSibling);
|
|
58
|
-
studioRoot.remove();
|
|
59
|
-
}
|
|
60
|
-
isSandboxActive = false;
|
|
61
|
-
originalRootParent = null;
|
|
62
|
-
originalRootNextSibling = null;
|
|
63
|
-
// Remove body class
|
|
64
|
-
document.body.classList.remove("solid-studio-active");
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Returns the active scroll element based on sandbox state.
|
|
68
|
-
* When Studio Mode is enabled, the scroll element becomes the container.
|
|
69
|
-
* Otherwise, it uses the default Window object.
|
|
70
|
-
*/
|
|
71
|
-
export function getScrollElement() {
|
|
72
|
-
if (typeof window === "undefined")
|
|
73
|
-
return window;
|
|
74
|
-
if (isSandboxActive) {
|
|
75
|
-
var container = document.getElementById("solid-studio-app-container");
|
|
76
|
-
return container || window;
|
|
77
|
-
}
|
|
78
|
-
return window;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Returns the current vertical scroll position.
|
|
82
|
-
*/
|
|
83
|
-
export function getScrollY() {
|
|
84
|
-
if (typeof window === "undefined")
|
|
85
|
-
return 0;
|
|
86
|
-
if (isSandboxActive) {
|
|
87
|
-
var container = document.getElementById("solid-studio-app-container");
|
|
88
|
-
return container ? container.scrollTop : 0;
|
|
89
|
-
}
|
|
90
|
-
return window.scrollY;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Returns the effective viewport height.
|
|
94
|
-
*/
|
|
95
|
-
export function getViewportHeight() {
|
|
96
|
-
if (typeof window === "undefined")
|
|
97
|
-
return 0;
|
|
98
|
-
if (isSandboxActive) {
|
|
99
|
-
var container = document.getElementById("solid-studio-app-container");
|
|
100
|
-
return container ? container.clientHeight : window.innerHeight;
|
|
101
|
-
}
|
|
102
|
-
return window.innerHeight;
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=studioSandbox.js.map
|
|
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AM,KAAK,WAAW;QAAE,OAAO,CAAC,CAAC;IAC5C,IAAI,eAAe,EAAE;QACjB,IAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,4BAA4B,CAAC,CAAC;QACxE,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;KAC9C;IACD,OAAO,MAAM,CAAC,OAAO,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC7B,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,CAAC,CAAC;IAC5C,IAAI,eAAe,EAAE;QACjB,IAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,4BAA4B,CAAC,CAAC;QACxE,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;KAClE;IACD,OAAO,MAAM,CAAC,WAAW,CAAC;AAC9B,CAAC","sourcesContent":["/**\n * Studio Sandbox Mode API\n * \n * This module isolates the application layout from the Solid Studio UI. \n * It dynamically creates a container to wrap the application root, converting\n * it into a relative containing block. This prevents \\`position: fixed\\` elements \n * within the application from inadvertently overlapping with the global Studio UI.\n */\n\nlet originalRootParent: ParentNode | null = null;\nlet originalRootNextSibling: Node | null = null;\nlet isSandboxActive = false;\n\nfunction getAppRoot() {\n // Determine the root depending on the framework (Vite uses #root, Next uses #__next)\n return document.getElementById(\"root\") || document.getElementById(\"__next\") || document.body.firstElementChild;\n}\n\n/**\n * Wraps the app root into the sandbox container.\n */\nexport function enableStudioMode() {\n if (typeof window === \"undefined\" || isSandboxActive) return;\n\n const appRoot = getAppRoot();\n if (!appRoot || appRoot.id === \"solid-studio-root\" || appRoot.id === \"solid-studio-app-container\") {\n return;\n }\n\n const parent = appRoot.parentNode;\n if (!parent) return;\n\n isSandboxActive = true;\n originalRootParent = parent;\n originalRootNextSibling = appRoot.nextSibling;\n\n // Create the outer wrapper\n const studioRoot = document.createElement(\"div\");\n studioRoot.id = \"solid-studio-root\";\n\n // Create the isolation container\n const appContainer = document.createElement(\"div\");\n appContainer.id = \"solid-studio-app-container\";\n\n // Re-parent the app node\n appContainer.appendChild(appRoot);\n studioRoot.appendChild(appContainer);\n\n // Insert the wrapper into the DOM where the root used to be\n parent.insertBefore(studioRoot, originalRootNextSibling);\n\n // Set a class on the body to indicate Studio Mode\n document.body.classList.add(\"solid-studio-active\");\n}\n\n/**\n * Restores the application to its original state.\n */\nexport function disableStudioMode() {\n if (typeof window === \"undefined\" || !isSandboxActive) return;\n\n const studioRoot = document.getElementById(\"solid-studio-root\");\n const appContainer = document.getElementById(\"solid-studio-app-container\");\n\n // Find our wrapped app root\n const appRoot = appContainer?.firstElementChild;\n\n if (studioRoot && appRoot && originalRootParent) {\n originalRootParent.insertBefore(appRoot, originalRootNextSibling);\n studioRoot.remove();\n }\n\n isSandboxActive = false;\n originalRootParent = null;\n originalRootNextSibling = null;\n\n // Remove body class\n document.body.classList.remove(\"solid-studio-active\");\n}\n\n/**\n * Returns the active scroll element based on sandbox state.\n * When Studio Mode is enabled, the scroll element becomes the container.\n * Otherwise, it uses the default Window object.\n */\nexport function getScrollElement(): HTMLElement | Window {\n if (typeof window === \"undefined\") return window;\n if (isSandboxActive) {\n const container = document.getElementById(\"solid-studio-app-container\");\n return container || window;\n }\n return window;\n}\n\n/**\n * Returns the current vertical scroll position.\n */\nexport function getScrollY(): number {\n if (typeof window === \"undefined\") return 0;\n if (isSandboxActive) {\n const container = document.getElementById(\"solid-studio-app-container\");\n return container ? container.scrollTop : 0;\n }\n return window.scrollY;\n}\n\n/**\n * Returns the effective viewport height.\n */\nexport function getViewportHeight(): number {\n if (typeof window === \"undefined\") return 0;\n if (isSandboxActive) {\n const container = document.getElementById(\"solid-studio-app-container\");\n return container ? container.clientHeight : window.innerHeight;\n }\n return window.innerHeight;\n}\n"]}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Studio Sandbox Mode API
|
|
3
|
-
*
|
|
4
|
-
* This module isolates the application layout from the Solid Studio UI.
|
|
5
|
-
* It dynamically creates a container to wrap the application root, converting
|
|
6
|
-
* it into a relative containing block. This prevents \`position: fixed\` elements
|
|
7
|
-
* within the application from inadvertently overlapping with the global Studio UI.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
let originalRootParent: ParentNode | null = null;
|
|
11
|
-
let originalRootNextSibling: Node | null = null;
|
|
12
|
-
let isSandboxActive = false;
|
|
13
|
-
|
|
14
|
-
function getAppRoot() {
|
|
15
|
-
// Determine the root depending on the framework (Vite uses #root, Next uses #__next)
|
|
16
|
-
return document.getElementById("root") || document.getElementById("__next") || document.body.firstElementChild;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Wraps the app root into the sandbox container.
|
|
21
|
-
*/
|
|
22
|
-
export function enableStudioMode() {
|
|
23
|
-
if (typeof window === "undefined" || isSandboxActive) return;
|
|
24
|
-
|
|
25
|
-
const appRoot = getAppRoot();
|
|
26
|
-
if (!appRoot || appRoot.id === "solid-studio-root" || appRoot.id === "solid-studio-app-container") {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const parent = appRoot.parentNode;
|
|
31
|
-
if (!parent) return;
|
|
32
|
-
|
|
33
|
-
isSandboxActive = true;
|
|
34
|
-
originalRootParent = parent;
|
|
35
|
-
originalRootNextSibling = appRoot.nextSibling;
|
|
36
|
-
|
|
37
|
-
// Create the outer wrapper
|
|
38
|
-
const studioRoot = document.createElement("div");
|
|
39
|
-
studioRoot.id = "solid-studio-root";
|
|
40
|
-
|
|
41
|
-
// Create the isolation container
|
|
42
|
-
const appContainer = document.createElement("div");
|
|
43
|
-
appContainer.id = "solid-studio-app-container";
|
|
44
|
-
|
|
45
|
-
// Re-parent the app node
|
|
46
|
-
appContainer.appendChild(appRoot);
|
|
47
|
-
studioRoot.appendChild(appContainer);
|
|
48
|
-
|
|
49
|
-
// Insert the wrapper into the DOM where the root used to be
|
|
50
|
-
parent.insertBefore(studioRoot, originalRootNextSibling);
|
|
51
|
-
|
|
52
|
-
// Set a class on the body to indicate Studio Mode
|
|
53
|
-
document.body.classList.add("solid-studio-active");
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Restores the application to its original state.
|
|
58
|
-
*/
|
|
59
|
-
export function disableStudioMode() {
|
|
60
|
-
if (typeof window === "undefined" || !isSandboxActive) return;
|
|
61
|
-
|
|
62
|
-
const studioRoot = document.getElementById("solid-studio-root");
|
|
63
|
-
const appContainer = document.getElementById("solid-studio-app-container");
|
|
64
|
-
|
|
65
|
-
// Find our wrapped app root
|
|
66
|
-
const appRoot = appContainer?.firstElementChild;
|
|
67
|
-
|
|
68
|
-
if (studioRoot && appRoot && originalRootParent) {
|
|
69
|
-
originalRootParent.insertBefore(appRoot, originalRootNextSibling);
|
|
70
|
-
studioRoot.remove();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
isSandboxActive = false;
|
|
74
|
-
originalRootParent = null;
|
|
75
|
-
originalRootNextSibling = null;
|
|
76
|
-
|
|
77
|
-
// Remove body class
|
|
78
|
-
document.body.classList.remove("solid-studio-active");
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Returns the active scroll element based on sandbox state.
|
|
83
|
-
* When Studio Mode is enabled, the scroll element becomes the container.
|
|
84
|
-
* Otherwise, it uses the default Window object.
|
|
85
|
-
*/
|
|
86
|
-
export function getScrollElement(): HTMLElement | Window {
|
|
87
|
-
if (typeof window === "undefined") return window;
|
|
88
|
-
if (isSandboxActive) {
|
|
89
|
-
const container = document.getElementById("solid-studio-app-container");
|
|
90
|
-
return container || window;
|
|
91
|
-
}
|
|
92
|
-
return window;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Returns the current vertical scroll position.
|
|
97
|
-
*/
|
|
98
|
-
export function getScrollY(): number {
|
|
99
|
-
if (typeof window === "undefined") return 0;
|
|
100
|
-
if (isSandboxActive) {
|
|
101
|
-
const container = document.getElementById("solid-studio-app-container");
|
|
102
|
-
return container ? container.scrollTop : 0;
|
|
103
|
-
}
|
|
104
|
-
return window.scrollY;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Returns the effective viewport height.
|
|
109
|
-
*/
|
|
110
|
-
export function getViewportHeight(): number {
|
|
111
|
-
if (typeof window === "undefined") return 0;
|
|
112
|
-
if (isSandboxActive) {
|
|
113
|
-
const container = document.getElementById("solid-studio-app-container");
|
|
114
|
-
return container ? container.clientHeight : window.innerHeight;
|
|
115
|
-
}
|
|
116
|
-
return window.innerHeight;
|
|
117
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authProviders.d.ts","sourceRoot":"./","sources":["nextAuth/authProviders.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAW5C,QAAA,MAAM,aAAa,EAAE,eAqNpB,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import CredentialsProvider from "next-auth/providers/credentials";
|
|
2
|
-
import GoogleProvider from "next-auth/providers/google";
|
|
3
|
-
import { jwtDecode } from "jwt-decode";
|
|
4
|
-
import axios from "axios";
|
|
5
|
-
import { refreshAccessToken } from "./refreshAccessToken";
|
|
6
|
-
const authProviders = {
|
|
7
|
-
session: {
|
|
8
|
-
strategy: "jwt",
|
|
9
|
-
},
|
|
10
|
-
providers: [
|
|
11
|
-
GoogleProvider({
|
|
12
|
-
clientId: process.env.GOOGLE_ID,
|
|
13
|
-
clientSecret: process.env.GOOGLE_CLIENT_SECRET
|
|
14
|
-
}),
|
|
15
|
-
CredentialsProvider({
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
async authorize(credentials, req) {
|
|
18
|
-
const userAgent = req.headers['user-agent'];
|
|
19
|
-
const { username, email, password, identifier, accessToken, accessCode } = credentials;
|
|
20
|
-
console.log(credentials, '=========================');
|
|
21
|
-
try {
|
|
22
|
-
if (accessCode) {
|
|
23
|
-
let config = {
|
|
24
|
-
method: 'get',
|
|
25
|
-
url: `${process.env.API_URL}/api/iam/google/authenticate?accessCode=${accessCode}`,
|
|
26
|
-
headers: {
|
|
27
|
-
'User-Agent': userAgent,
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const loginResponse = await axios.request(config);
|
|
31
|
-
if (loginResponse.status == 400) {
|
|
32
|
-
throw new Error(loginResponse.data.message);
|
|
33
|
-
}
|
|
34
|
-
if (loginResponse.status == 401) {
|
|
35
|
-
throw new Error(loginResponse.data.message);
|
|
36
|
-
}
|
|
37
|
-
let base64decoded = jwtDecode(loginResponse.data.data.accessToken);
|
|
38
|
-
// let accessTokenExpires = base64decoded.exp;
|
|
39
|
-
let accessTokenExpires = base64decoded.exp && base64decoded.exp * 1000;
|
|
40
|
-
return {
|
|
41
|
-
accessToken: loginResponse.data.data.accessToken,
|
|
42
|
-
refreshToken: loginResponse.data.data.refreshToken,
|
|
43
|
-
accessTokenExpires: accessTokenExpires,
|
|
44
|
-
...loginResponse.data.data,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
if (accessToken) {
|
|
49
|
-
let data = JSON.stringify({
|
|
50
|
-
username: identifier,
|
|
51
|
-
email: identifier.includes('@') ? identifier : null,
|
|
52
|
-
password: password
|
|
53
|
-
});
|
|
54
|
-
let config = {
|
|
55
|
-
method: 'get',
|
|
56
|
-
url: `${process.env.API_URL}/api/iam/me`,
|
|
57
|
-
headers: {
|
|
58
|
-
'accept': '*/*',
|
|
59
|
-
'Content-Type': 'application/json',
|
|
60
|
-
'Authorization': `Bearer ${accessToken}`
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
const loginResponse = await axios.request(config);
|
|
64
|
-
if (loginResponse.status == 400) {
|
|
65
|
-
throw new Error(loginResponse.data.message);
|
|
66
|
-
}
|
|
67
|
-
if (loginResponse.status == 401) {
|
|
68
|
-
throw new Error(loginResponse.data.message);
|
|
69
|
-
}
|
|
70
|
-
let base64decoded = jwtDecode(accessToken);
|
|
71
|
-
// let accessTokenExpires = base64decoded.exp;
|
|
72
|
-
let accessTokenExpires = base64decoded.exp && base64decoded.exp * 1000;
|
|
73
|
-
return {
|
|
74
|
-
accessToken: accessToken,
|
|
75
|
-
refreshToken: loginResponse.data.data.refreshToken,
|
|
76
|
-
accessTokenExpires: accessTokenExpires,
|
|
77
|
-
...loginResponse.data.data,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
let data = JSON.stringify({
|
|
82
|
-
username: identifier,
|
|
83
|
-
email: identifier.includes('@') ? identifier : null,
|
|
84
|
-
password: password
|
|
85
|
-
});
|
|
86
|
-
let config = {
|
|
87
|
-
method: 'post',
|
|
88
|
-
maxBodyLength: Infinity,
|
|
89
|
-
url: `${process.env.API_URL}/api/iam/authenticate`,
|
|
90
|
-
headers: {
|
|
91
|
-
'accept': '*/*',
|
|
92
|
-
'Content-Type': 'application/json',
|
|
93
|
-
'User-Agent': userAgent,
|
|
94
|
-
},
|
|
95
|
-
data: data
|
|
96
|
-
};
|
|
97
|
-
const loginResponse = await axios.request(config);
|
|
98
|
-
// const authenticateResponse = await fetch(
|
|
99
|
-
// `${process.env.API_URL}/api/iam/authenticate`,
|
|
100
|
-
// {
|
|
101
|
-
// method: "Post",
|
|
102
|
-
// headers: {
|
|
103
|
-
// 'accept': '*/*',
|
|
104
|
-
// "Content-Type": "application/json"
|
|
105
|
-
// },
|
|
106
|
-
// body: JSON.stringify({
|
|
107
|
-
// username: email,
|
|
108
|
-
// email: email,
|
|
109
|
-
// password: password
|
|
110
|
-
// })
|
|
111
|
-
// }
|
|
112
|
-
// );
|
|
113
|
-
// const loginResponse = await authenticateResponse.json();
|
|
114
|
-
// const response = await fetch(
|
|
115
|
-
// `${process.env.API_URL}/api/iam/me`,
|
|
116
|
-
// {
|
|
117
|
-
// method: "Get",
|
|
118
|
-
// headers: {
|
|
119
|
-
// "Content-Type": "application/json",
|
|
120
|
-
// "Authorization": `Bearer ${loginResponse.data.accessToken}`,
|
|
121
|
-
// },
|
|
122
|
-
// }
|
|
123
|
-
// );
|
|
124
|
-
// const responseData = await response.json();
|
|
125
|
-
if (loginResponse.status == 400) {
|
|
126
|
-
throw new Error(loginResponse.data.message);
|
|
127
|
-
}
|
|
128
|
-
if (loginResponse.status == 401) {
|
|
129
|
-
throw new Error(loginResponse.data.data.message);
|
|
130
|
-
}
|
|
131
|
-
let base64decoded = jwtDecode(loginResponse.data.data.accessToken);
|
|
132
|
-
// let accessTokenExpires = base64decoded.exp;
|
|
133
|
-
let accessTokenExpires = base64decoded.exp && base64decoded.exp * 1000;
|
|
134
|
-
const returnResponse = {
|
|
135
|
-
accessToken: loginResponse.data.data.accessToken,
|
|
136
|
-
refreshToken: loginResponse.data.data.refreshToken,
|
|
137
|
-
accessTokenExpires: accessTokenExpires,
|
|
138
|
-
...loginResponse.data.data,
|
|
139
|
-
};
|
|
140
|
-
return returnResponse;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
catch (error) {
|
|
145
|
-
throw new Error(error?.response?.data?.message);
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
}),
|
|
149
|
-
],
|
|
150
|
-
callbacks: {
|
|
151
|
-
// @ts-ignore
|
|
152
|
-
jwt: async ({ token, user }) => {
|
|
153
|
-
// console.log("JWT callback called");
|
|
154
|
-
const bufferTime = 60000;
|
|
155
|
-
if (Date.now() >= (token.accessTokenExpires - bufferTime)) {
|
|
156
|
-
// Call the refresh token function
|
|
157
|
-
return await refreshAccessToken(token);
|
|
158
|
-
}
|
|
159
|
-
// If there is no user (first time login or session), we return the user data
|
|
160
|
-
if (user) {
|
|
161
|
-
// const base64decoded = jwtDecode(user.accessToken);
|
|
162
|
-
// Convert from seconds to milliseconds
|
|
163
|
-
// const accessTokenExpires = base64decoded.exp && base64decoded.exp * 1000;
|
|
164
|
-
// const accessTokenExpires = user.accessTokenExpires * 1000;
|
|
165
|
-
return {
|
|
166
|
-
...token,
|
|
167
|
-
accessToken: user.accessToken,
|
|
168
|
-
refreshToken: user.refreshToken,
|
|
169
|
-
accessTokenExpires: user.accessTokenExpires,
|
|
170
|
-
user: user, // Include the user data here
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
return token; // If no update needed, just return the existing token
|
|
174
|
-
},
|
|
175
|
-
// @ts-ignore
|
|
176
|
-
session: async ({ session, token }) => {
|
|
177
|
-
// console.log("Session callback called");
|
|
178
|
-
const user = token.user || {}; // Default to an empty object if user is undefined or null
|
|
179
|
-
session.error = token.error ? token.error : null;
|
|
180
|
-
// if (token.error) {
|
|
181
|
-
// return null
|
|
182
|
-
// }
|
|
183
|
-
session.user = {
|
|
184
|
-
...user,
|
|
185
|
-
accessToken: token?.accessToken,
|
|
186
|
-
refreshToken: token?.refreshToken,
|
|
187
|
-
accessTokenExpires: token?.accessTokenExpires && token?.accessTokenExpires, // Store the expiry time
|
|
188
|
-
};
|
|
189
|
-
return session;
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
pages: {
|
|
193
|
-
signIn: "/auth/login",
|
|
194
|
-
},
|
|
195
|
-
secret: process.env.NEXTAUTH_SECRET,
|
|
196
|
-
};
|
|
197
|
-
export default authProviders;
|
|
198
|
-
//# sourceMappingURL=authProviders.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authProviders.js","sourceRoot":"./","sources":["nextAuth/authProviders.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,iCAAiC,CAAC;AAClE,OAAO,cAAc,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EA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AK,CAAC,CAAC;aAC1C;YAED,6EAA6E;YAC7E,IAAI,IAAI,EAAE;gBACN,qDAAqD;gBACrD,uCAAuC;gBACvC,6EAA6E;gBAC7E,8DAA8D;gBAC9D,OAAO;oBACH,GAAG,KAAK;oBACR,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;oBAC/B,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;oBAC3C,IAAI,EAAE,IAAI,EAAG,6BAA6B;iBAC7C,CAAC;aACL;YAED,OAAO,KAAK,CAAC,CAAC,sDAAsD;QACxE,CAAC;QACD,aAAa;QACb,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;YAClC,0CAA0C;YAE1C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,CAAE,0DAA0D;YAC1F,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;YACjD,qBAAqB;YACrB,gBAAgB;YAChB,IAAI;YACJ,OAAO,CAAC,IAAI,GAAG;gBACX,GAAG,IAAI;gBACP,WAAW,EAAE,KAAK,EAAE,WAAW;gBAC/B,YAAY,EAAE,KAAK,EAAE,YAAY;gBACjC,kBAAkB,EAAE,KAAK,EAAE,kBAAkB,IAAI,KAAK,EAAE,kBAAkB,EAAG,wBAAwB;aACxG,CAAC;YACF,OAAO,OAAO,CAAC;QAEnB,CAAC;KACJ;IACD,KAAK,EAAE;QACH,MAAM,EAAE,aAAa;KACxB;IACD,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe;CACtC,CAAA;AAED,eAAe,aAAa,CAAA","sourcesContent":["import CredentialsProvider from \"next-auth/providers/credentials\";\nimport GoogleProvider from \"next-auth/providers/google\";\nimport { NextRequest } from \"next/server\";\nimport { jwtDecode } from \"jwt-decode\";\nimport { JWT } from \"next-auth/jwt\";\nimport axios from \"axios\";\nimport { signOut } from \"next-auth/react\";\nimport { refreshAccessToken } from \"./refreshAccessToken\";\nimport { NextAuthOptions } from \"next-auth\";\n\ntype Credentials = {\n username: string,\n email: string,\n password: string,\n identifier:string,\n accessToken: string,\n accessCode: string,\n};\n\nconst authProviders: NextAuthOptions = {\n session: {\n strategy: \"jwt\",\n },\n providers: [\n GoogleProvider({\n clientId: process.env.GOOGLE_ID!,\n clientSecret: process.env.GOOGLE_CLIENT_SECRET!\n }),\n CredentialsProvider({\n // @ts-ignore\n async authorize(credentials: Credentials, req: any) {\n const userAgent = req.headers['user-agent'];\n\n const { username, email, password, identifier, accessToken, accessCode } = credentials;\n\n console.log(credentials , '=========================');\n \n try {\n if (accessCode) {\n let config = {\n method: 'get',\n url: `${process.env.API_URL}/api/iam/google/authenticate?accessCode=${accessCode}`,\n headers: {\n 'User-Agent': userAgent,\n }\n };\n const loginResponse = await axios.request(config);\n if (loginResponse.status == 400) {\n throw new Error(loginResponse.data.message);\n }\n if (loginResponse.status == 401) {\n throw new Error(loginResponse.data.message);\n }\n\n let base64decoded = jwtDecode(loginResponse.data.data.accessToken);\n // let accessTokenExpires = base64decoded.exp;\n let accessTokenExpires = base64decoded.exp && base64decoded.exp * 1000;\n\n return {\n accessToken: loginResponse.data.data.accessToken,\n refreshToken: loginResponse.data.data.refreshToken,\n accessTokenExpires: accessTokenExpires,\n ...loginResponse.data.data,\n };\n\n } else {\n if (accessToken) {\n let data = JSON.stringify({\n username: identifier,\n email: identifier.includes('@')? identifier : null,\n password: password\n });\n\n let config = {\n method: 'get',\n url: `${process.env.API_URL}/api/iam/me`,\n headers: {\n 'accept': '*/*',\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${accessToken}`\n }\n };\n\n\n const loginResponse = await axios.request(config);\n\n if (loginResponse.status == 400) {\n throw new Error(loginResponse.data.message);\n }\n if (loginResponse.status == 401) {\n throw new Error(loginResponse.data.message);\n }\n \n let base64decoded = jwtDecode(accessToken);\n // let accessTokenExpires = base64decoded.exp;\n let accessTokenExpires = base64decoded.exp && base64decoded.exp * 1000;\n\n return {\n accessToken: accessToken,\n refreshToken: loginResponse.data.data.refreshToken,\n accessTokenExpires: accessTokenExpires,\n ...loginResponse.data.data,\n };\n\n } else {\n\n let data = JSON.stringify({\n username: identifier,\n email: identifier.includes('@')? identifier : null,\n password: password\n });\n\n let config = {\n method: 'post',\n maxBodyLength: Infinity,\n url: `${process.env.API_URL}/api/iam/authenticate`,\n headers: {\n 'accept': '*/*',\n 'Content-Type': 'application/json',\n 'User-Agent': userAgent,\n },\n data: data\n };\n\n\n const loginResponse = await axios.request(config);\n\n // const authenticateResponse = await fetch(\n // `${process.env.API_URL}/api/iam/authenticate`,\n // {\n // method: \"Post\",\n // headers: {\n // 'accept': '*/*', \n // \"Content-Type\": \"application/json\"\n // },\n // body: JSON.stringify({\n // username: email,\n // email: email,\n // password: password\n // })\n // }\n // );\n\n // const loginResponse = await authenticateResponse.json();\n\n // const response = await fetch(\n // `${process.env.API_URL}/api/iam/me`,\n // {\n // method: \"Get\",\n // headers: {\n // \"Content-Type\": \"application/json\",\n // \"Authorization\": `Bearer ${loginResponse.data.accessToken}`,\n // },\n // }\n // );\n\n // const responseData = await response.json();\n\n if (loginResponse.status == 400) {\n throw new Error(loginResponse.data.message);\n }\n if (loginResponse.status == 401) {\n throw new Error(loginResponse.data.data.message);\n }\n let base64decoded = jwtDecode(loginResponse.data.data.accessToken);\n // let accessTokenExpires = base64decoded.exp;\n let accessTokenExpires = base64decoded.exp && base64decoded.exp * 1000;\n const returnResponse = {\n accessToken: loginResponse.data.data.accessToken,\n refreshToken: loginResponse.data.data.refreshToken,\n accessTokenExpires: accessTokenExpires,\n ...loginResponse.data.data,\n }\n return returnResponse;\n }\n }\n } catch (error: any) {\n throw new Error(error?.response?.data?.message);\n }\n },\n }),\n ],\n callbacks: {\n // @ts-ignore\n jwt: async ({ token, user }) => {\n // console.log(\"JWT callback called\");\n const bufferTime = 60000;\n if (Date.now() >= (token.accessTokenExpires as number - bufferTime)) {\n // Call the refresh token function\n return await refreshAccessToken(token);\n }\n\n // If there is no user (first time login or session), we return the user data\n if (user) {\n // const base64decoded = jwtDecode(user.accessToken);\n // Convert from seconds to milliseconds\n // const accessTokenExpires = base64decoded.exp && base64decoded.exp * 1000; \n // const accessTokenExpires = user.accessTokenExpires * 1000; \n return {\n ...token,\n accessToken: user.accessToken,\n refreshToken: user.refreshToken,\n accessTokenExpires: user.accessTokenExpires,\n user: user, // Include the user data here\n };\n }\n\n return token; // If no update needed, just return the existing token\n },\n // @ts-ignore\n session: async ({ session, token }) => {\n // console.log(\"Session callback called\");\n\n const user = token.user || {}; // Default to an empty object if user is undefined or null\n session.error = token.error ? token.error : null;\n // if (token.error) {\n // return null\n // }\n session.user = {\n ...user, // Include the user info from the token\n accessToken: token?.accessToken, // Add the access token to session for client use\n refreshToken: token?.refreshToken, // Add refresh token to session for future use\n accessTokenExpires: token?.accessTokenExpires && token?.accessTokenExpires, // Store the expiry time\n };\n return session;\n\n },\n },\n pages: {\n signIn: \"/auth/login\",\n },\n secret: process.env.NEXTAUTH_SECRET,\n}\n\nexport default authProviders"]}
|