@solidxai/core-ui 0.1.13-beta.2 → 0.1.13-beta.4
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/auth/SolidOTPVerify.d.ts +3 -0
- package/dist/components/auth/SolidOTPVerify.d.ts.map +1 -0
- package/dist/components/auth/SolidOTPVerify.js +67 -0
- package/dist/components/auth/SolidOTPVerify.js.map +1 -0
- package/dist/components/auth/SolidOTPVerify.tsx +133 -0
- package/dist/components/common/AuthBanner.d.ts +3 -0
- package/dist/components/common/AuthBanner.d.ts.map +1 -0
- package/dist/components/common/AuthBanner.js +15 -0
- package/dist/components/common/AuthBanner.js.map +1 -0
- package/dist/components/common/AuthBanner.tsx +41 -0
- package/dist/components/common/SingleSelectAutoCompleteField.d.ts +2 -0
- package/dist/components/common/SingleSelectAutoCompleteField.d.ts.map +1 -0
- package/dist/components/common/SingleSelectAutoCompleteField.js +92 -0
- package/dist/components/common/SingleSelectAutoCompleteField.js.map +1 -0
- package/dist/components/common/SingleSelectAutoCompleteField.tsx +73 -0
- package/dist/components/common/SolidExportStepper.d.ts +12 -0
- package/dist/components/common/SolidExportStepper.d.ts.map +1 -0
- package/dist/components/common/SolidExportStepper.js +30 -0
- package/dist/components/common/SolidExportStepper.js.map +1 -0
- package/dist/components/common/SolidExportStepper.tsx +135 -0
- package/dist/components/core/card/SolidCardView.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardView.js +6 -11
- package/dist/components/core/card/SolidCardView.js.map +1 -1
- package/dist/components/core/card/SolidCardView.tsx +6 -11
- package/dist/components/core/card/SolidCardViewConfigure.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.js +3 -7
- package/dist/components/core/card/SolidCardViewConfigure.js.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.tsx +3 -9
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts +2 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts.map +1 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.js +50 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.js.map +1 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.tsx +70 -0
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.d.ts +2 -0
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.d.ts.map +1 -0
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.js +16 -0
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.js.map +1 -0
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.tsx +29 -0
- package/dist/components/core/dashboard/DashboardFilter.d.ts +13 -0
- package/dist/components/core/dashboard/DashboardFilter.d.ts.map +1 -0
- package/dist/components/core/dashboard/DashboardFilter.js +299 -0
- package/dist/components/core/dashboard/DashboardFilter.js.map +1 -0
- package/dist/components/core/dashboard/DashboardFilter.tsx +348 -0
- package/dist/components/core/dashboard/PrimeDataTableWrapper.d.ts +3 -0
- package/dist/components/core/dashboard/PrimeDataTableWrapper.d.ts.map +1 -0
- package/dist/components/core/dashboard/PrimeDataTableWrapper.js +21 -0
- package/dist/components/core/dashboard/PrimeDataTableWrapper.js.map +1 -0
- package/dist/components/core/dashboard/PrimeDataTableWrapper.tsx +40 -0
- package/dist/components/core/dashboard/SolidDashboard.d.ts +28 -0
- package/dist/components/core/dashboard/SolidDashboard.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidDashboard.js +183 -0
- package/dist/components/core/dashboard/SolidDashboard.js.map +1 -0
- package/dist/components/core/dashboard/SolidDashboard.module.css +83 -0
- package/dist/components/core/dashboard/SolidDashboard.tsx +263 -0
- package/dist/components/core/dashboard/SolidDashboardBody.d.ts +24 -0
- package/dist/components/core/dashboard/SolidDashboardBody.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardBody.js +162 -0
- package/dist/components/core/dashboard/SolidDashboardBody.js.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardBody.tsx +168 -0
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.d.ts +2 -0
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.js +11 -0
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.js.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.tsx +28 -0
- package/dist/components/core/dashboard/SolidDashboardHeader.d.ts +3 -0
- package/dist/components/core/dashboard/SolidDashboardHeader.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardHeader.js +6 -0
- package/dist/components/core/dashboard/SolidDashboardHeader.js.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardHeader.tsx +10 -0
- package/dist/components/core/dashboard/SolidDashboardLoading.d.ts +2 -0
- package/dist/components/core/dashboard/SolidDashboardLoading.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardLoading.js +10 -0
- package/dist/components/core/dashboard/SolidDashboardLoading.js.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardLoading.tsx +61 -0
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.d.ts +3 -0
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.js +12 -0
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.js.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.tsx +32 -0
- package/dist/components/core/dashboard/SolidDashboardRenderError.d.ts +2 -0
- package/dist/components/core/dashboard/SolidDashboardRenderError.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardRenderError.js +11 -0
- package/dist/components/core/dashboard/SolidDashboardRenderError.js.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardRenderError.tsx +28 -0
- package/dist/components/core/dashboard/SolidDashboardVariable.d.ts +19 -0
- package/dist/components/core/dashboard/SolidDashboardVariable.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardVariable.js +171 -0
- package/dist/components/core/dashboard/SolidDashboardVariable.js.map +1 -0
- package/dist/components/core/dashboard/SolidDashboardVariable.tsx +259 -0
- package/dist/components/core/dashboard/SolidQuestionRenderer.d.ts +9 -0
- package/dist/components/core/dashboard/SolidQuestionRenderer.d.ts.map +1 -0
- package/dist/components/core/dashboard/SolidQuestionRenderer.js +42 -0
- package/dist/components/core/dashboard/SolidQuestionRenderer.js.map +1 -0
- package/dist/components/core/dashboard/SolidQuestionRenderer.tsx +99 -0
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.d.ts +9 -0
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.d.ts.map +1 -0
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.js +35 -0
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.js.map +1 -0
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.tsx +48 -0
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.d.ts +7 -0
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.d.ts.map +1 -0
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.js +22 -0
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.js.map +1 -0
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.tsx +51 -0
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.d.ts +2 -0
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.d.ts.map +1 -0
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.js +4 -0
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.js.map +1 -0
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.ts +25 -0
- package/dist/components/core/dashboard/dashboard-utils.d.ts +2 -0
- package/dist/components/core/dashboard/dashboard-utils.d.ts.map +1 -0
- package/dist/components/core/dashboard/dashboard-utils.js +38 -0
- package/dist/components/core/dashboard/dashboard-utils.js.map +1 -0
- package/dist/components/core/dashboard/dashboard-utils.ts +39 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.d.ts +10 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.js +16 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.js.map +1 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.ts +19 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.d.ts +8 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.js +64 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.js.map +1 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.ts +30 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.d.ts +8 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.js +62 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.js.map +1 -0
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.ts +29 -0
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.d.ts +4 -0
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.js +23 -0
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.js.map +1 -0
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.tsx +36 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +2 -10
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +2 -10
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +111 -106
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +165 -134
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +81 -84
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.tsx +97 -86
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.d.ts +3 -0
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.js +92 -0
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.tsx +68 -0
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.d.ts +3 -0
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.d.ts.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.js +111 -0
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.js.map +1 -0
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.tsx +122 -0
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +6 -11
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +6 -11
- package/dist/components/core/kanban/SolidKanbanViewConfigure.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js +3 -7
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.tsx +3 -9
- package/dist/components/core/kanban/SolidKanbanViewFields.d.ts +12 -0
- package/dist/components/core/kanban/SolidKanbanViewFields.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidKanbanViewFields.js +145 -0
- package/dist/components/core/kanban/SolidKanbanViewFields.js.map +1 -0
- package/dist/components/core/kanban/SolidKanbanViewFields.tsx +164 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts +2 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js +87 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js.map +1 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.tsx +59 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts +2 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.js +73 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.js.map +1 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.tsx +50 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts +2 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.js +20 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.js.map +1 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.tsx +32 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts +12 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.js +81 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.js.map +1 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.tsx +184 -0
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.js +7 -0
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.tsx +16 -0
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.js +21 -0
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.tsx +23 -0
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.tsx +14 -0
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.tsx +13 -0
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.js +7 -0
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.tsx +12 -0
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.js +7 -0
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.tsx +14 -0
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.js +16 -0
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.tsx +20 -0
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.js +7 -0
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js +56 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +140 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js +42 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +164 -0
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.js +11 -0
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.tsx +13 -0
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.js +7 -0
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.tsx +9 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.tsx +14 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.tsx +14 -0
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js +37 -0
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +121 -0
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.tsx +12 -0
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.tsx +13 -0
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js +7 -0
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +16 -0
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.d.ts.map +1 -1
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.js +2 -3
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.js.map +1 -1
- package/dist/components/core/list/SolidEmptyListViewPlaceholder.tsx +2 -3
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +2 -14
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +2 -14
- package/dist/components/core/list/SolidListViewConfigure.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.js +7 -5
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.tsx +7 -5
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts +2 -0
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts.map +1 -0
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js +39 -0
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js.map +1 -0
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.tsx +40 -0
- package/dist/components/core/list/SolidVarInputsFilterElement.d.ts +12 -0
- package/dist/components/core/list/SolidVarInputsFilterElement.d.ts.map +1 -0
- package/dist/components/core/list/SolidVarInputsFilterElement.js +81 -0
- package/dist/components/core/list/SolidVarInputsFilterElement.js.map +1 -0
- package/dist/components/core/list/SolidVarInputsFilterElement.tsx +184 -0
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js +42 -81
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.tsx +90 -120
- package/dist/components/core/list/columns/SolidMediaSingleColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidMediaSingleColumn.js +34 -42
- package/dist/components/core/list/columns/SolidMediaSingleColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaSingleColumn.tsx +51 -46
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.d.ts +3 -0
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.js +87 -0
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.js.map +1 -0
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.tsx +70 -0
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.d.ts +3 -0
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.js +33 -0
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.js.map +1 -0
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.tsx +50 -0
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.d.ts +3 -0
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.js +158 -0
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.js.map +1 -0
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.tsx +185 -0
- package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeView.js +2 -14
- package/dist/components/core/tree/SolidTreeView.js.map +1 -1
- package/dist/components/core/tree/SolidTreeView.tsx +2 -14
- package/dist/components/layout/DashboardHeader.d.ts +3 -0
- package/dist/components/layout/DashboardHeader.d.ts.map +1 -0
- package/dist/components/layout/DashboardHeader.js +20 -0
- package/dist/components/layout/DashboardHeader.js.map +1 -0
- package/dist/components/layout/DashboardHeader.tsx +94 -0
- package/dist/helpers/# no such endpoints exist, need to calle +3 -0
- package/dist/helpers/ToastContainer.d.ts +4 -0
- package/dist/helpers/ToastContainer.d.ts.map +1 -0
- package/dist/helpers/ToastContainer.js +49 -0
- package/dist/helpers/ToastContainer.js.map +1 -0
- package/dist/helpers/ToastContainer.tsx +94 -0
- package/dist/helpers/downloadMediaFile.d.ts.map +1 -1
- package/dist/helpers/downloadMediaFile.js +10 -3
- package/dist/helpers/downloadMediaFile.js.map +1 -1
- package/dist/helpers/downloadMediaFile.tsx +13 -7
- package/dist/helpers/fileTypeIcon.d.ts +3 -2
- package/dist/helpers/fileTypeIcon.d.ts.map +1 -1
- package/dist/helpers/fileTypeIcon.js +11 -7
- package/dist/helpers/fileTypeIcon.js.map +1 -1
- package/dist/helpers/fileTypeIcon.tsx +12 -7
- package/dist/helpers/mediaType.d.ts +7 -0
- package/dist/helpers/mediaType.d.ts.map +1 -1
- package/dist/helpers/mediaType.js +39 -8
- package/dist/helpers/mediaType.js.map +1 -1
- package/dist/helpers/mediaType.ts +46 -7
- package/dist/helpers/mediaUrl.d.ts +2 -0
- package/dist/helpers/mediaUrl.d.ts.map +1 -0
- package/dist/helpers/mediaUrl.js +10 -0
- package/dist/helpers/mediaUrl.js.map +1 -0
- package/dist/helpers/mediaUrl.ts +11 -0
- package/dist/helpers/permissions.d.ts +13 -0
- package/dist/helpers/permissions.d.ts.map +1 -1
- package/dist/helpers/permissions.js +79 -0
- package/dist/helpers/permissions.js.map +1 -1
- package/dist/helpers/permissions.ts +92 -1
- package/dist/helpers/showToast.d.ts +5 -0
- package/dist/helpers/showToast.d.ts.map +1 -0
- package/dist/helpers/showToast.js +17 -0
- package/dist/helpers/showToast.js.map +1 -0
- package/dist/helpers/showToast.ts +13 -0
- package/dist/helpers/studioSandbox.d.ts +31 -0
- package/dist/helpers/studioSandbox.d.ts.map +1 -0
- package/dist/helpers/studioSandbox.js +104 -0
- package/dist/helpers/studioSandbox.js.map +1 -0
- package/dist/helpers/studioSandbox.ts +117 -0
- package/dist/nextAuth/authProviders.d.ts +4 -0
- package/dist/nextAuth/authProviders.d.ts.map +1 -0
- package/dist/nextAuth/authProviders.js +198 -0
- package/dist/nextAuth/authProviders.js.map +1 -0
- package/dist/nextAuth/authProviders.tsx +232 -0
- package/dist/nextAuth/handleLogout.d.ts +2 -0
- package/dist/nextAuth/handleLogout.d.ts.map +1 -0
- package/dist/nextAuth/handleLogout.js +36 -0
- package/dist/nextAuth/handleLogout.js.map +1 -0
- package/dist/nextAuth/handleLogout.tsx +39 -0
- package/dist/nextAuth/refreshAccessToken.d.ts +2 -0
- package/dist/nextAuth/refreshAccessToken.d.ts.map +1 -0
- package/dist/nextAuth/refreshAccessToken.js +24 -0
- package/dist/nextAuth/refreshAccessToken.js.map +1 -0
- package/dist/nextAuth/refreshAccessToken.tsx +28 -0
- package/dist/redux/api/dashboardApi.d.ts +23 -0
- package/dist/redux/api/dashboardApi.d.ts.map +1 -0
- package/dist/redux/api/dashboardApi.js +35 -0
- package/dist/redux/api/dashboardApi.js.map +1 -0
- package/dist/redux/api/dashboardApi.ts +56 -0
- package/dist/redux/api/dashboardLayoutApi.d.ts +24 -0
- package/dist/redux/api/dashboardLayoutApi.d.ts.map +1 -0
- package/dist/redux/api/dashboardLayoutApi.js +34 -0
- package/dist/redux/api/dashboardLayoutApi.js.map +1 -0
- package/dist/redux/api/dashboardLayoutApi.ts +55 -0
- package/dist/redux/api/dashboardQuestionApi.d.ts +5 -0
- package/dist/redux/api/dashboardQuestionApi.d.ts.map +1 -0
- package/dist/redux/api/dashboardQuestionApi.js +18 -0
- package/dist/redux/api/dashboardQuestionApi.js.map +1 -0
- package/dist/redux/api/dashboardQuestionApi.ts +17 -0
- package/dist/redux/features/settingsSlice.d.ts +20 -0
- package/dist/redux/features/settingsSlice.d.ts.map +1 -0
- package/dist/redux/features/settingsSlice.js +39 -0
- package/dist/redux/features/settingsSlice.js.map +1 -0
- package/dist/redux/features/settingsSlice.ts +60 -0
- package/dist/resources/images/Footerbg.png +0 -0
- package/dist/resources/images/LoginBanner.png +0 -0
- package/dist/resources/images/dashboard/Ellipse 1.svg +10 -0
- package/dist/resources/images/dashboard/Rectangle 17.svg +10 -0
- package/dist/resources/images/dashboard/Rectangle 25.svg +11 -0
- package/dist/resources/images/dashboard/image 5.svg +9 -0
- 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
- package/dist/resources/shadcn-base.css +16 -70
- package/dist/resources/solid-tailwind-generated.css +1 -1
- package/package.json +1 -1
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.d.ts +0 -8
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.js +0 -6
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.js.map +0 -1
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.ts +0 -13
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.d.ts +0 -11
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.js +0 -10
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.js.map +0 -1
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.ts +0 -22
- package/dist/components/core/list/SolidCustomListColumn.d.ts +0 -8
- package/dist/components/core/list/SolidCustomListColumn.d.ts.map +0 -1
- package/dist/components/core/list/SolidCustomListColumn.js +0 -47
- package/dist/components/core/list/SolidCustomListColumn.js.map +0 -1
- package/dist/components/core/list/SolidCustomListColumn.tsx +0 -57
- package/dist/components/workflow/WorkflowFlowCanvas.css +0 -431
- package/dist/components/workflow/WorkflowFlowCanvas.d.ts +0 -41
- package/dist/components/workflow/WorkflowFlowCanvas.d.ts.map +0 -1
- package/dist/components/workflow/WorkflowFlowCanvas.js +0 -705
- package/dist/components/workflow/WorkflowFlowCanvas.js.map +0 -1
- package/dist/components/workflow/WorkflowFlowCanvas.tsx +0 -1274
- package/dist/components/workflow/WorkflowNodeDocsPanel.css +0 -247
- package/dist/components/workflow/WorkflowNodeDocsPanel.d.ts +0 -22
- package/dist/components/workflow/WorkflowNodeDocsPanel.d.ts.map +0 -1
- package/dist/components/workflow/WorkflowNodeDocsPanel.js +0 -97
- package/dist/components/workflow/WorkflowNodeDocsPanel.js.map +0 -1
- package/dist/components/workflow/WorkflowNodeDocsPanel.tsx +0 -363
- package/dist/components/workflow/WorkflowNodeSchemaEditor.d.ts +0 -50
- package/dist/components/workflow/WorkflowNodeSchemaEditor.d.ts.map +0 -1
- package/dist/components/workflow/WorkflowNodeSchemaEditor.js +0 -309
- package/dist/components/workflow/WorkflowNodeSchemaEditor.js.map +0 -1
- package/dist/components/workflow/WorkflowNodeSchemaEditor.tsx +0 -808
- package/dist/helpers/modulePackageResumeState.d.ts +0 -6
- package/dist/helpers/modulePackageResumeState.d.ts.map +0 -1
- package/dist/helpers/modulePackageResumeState.js +0 -46
- package/dist/helpers/modulePackageResumeState.js.map +0 -1
- package/dist/helpers/modulePackageResumeState.ts +0 -57
- package/dist/redux/api/workflowDefinitionEditorApi.d.ts +0 -17
- package/dist/redux/api/workflowDefinitionEditorApi.d.ts.map +0 -1
- package/dist/redux/api/workflowDefinitionEditorApi.js +0 -38
- package/dist/redux/api/workflowDefinitionEditorApi.js.map +0 -1
- package/dist/redux/api/workflowDefinitionEditorApi.ts +0 -40
- package/dist/redux/api/workflowNodeApi.d.ts +0 -6
- package/dist/redux/api/workflowNodeApi.d.ts.map +0 -1
- package/dist/redux/api/workflowNodeApi.js +0 -14
- package/dist/redux/api/workflowNodeApi.js.map +0 -1
- package/dist/redux/api/workflowNodeApi.ts +0 -18
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.css +0 -970
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.d.ts +0 -3
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.d.ts.map +0 -1
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.js +0 -1287
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.js.map +0 -1
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.tsx +0 -2572
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.css +0 -151
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.d.ts +0 -3
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.d.ts.map +0 -1
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.js +0 -250
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.js.map +0 -1
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.tsx +0 -455
- package/dist/types/workflow-node.d.ts +0 -127
- package/dist/types/workflow-node.d.ts.map +0 -1
- package/dist/types/workflow-node.js +0 -2
- package/dist/types/workflow-node.js.map +0 -1
- package/dist/types/workflow-node.ts +0 -162
|
@@ -1,1287 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
-
function step(op) {
|
|
26
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
-
switch (op[0]) {
|
|
31
|
-
case 0: case 1: t = op; break;
|
|
32
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
-
default:
|
|
36
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
-
if (t[2]) _.ops.pop();
|
|
41
|
-
_.trys.pop(); continue;
|
|
42
|
-
}
|
|
43
|
-
op = body.call(thisArg, _);
|
|
44
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
49
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
50
|
-
if (ar || !(i in from)) {
|
|
51
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
52
|
-
ar[i] = from[i];
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
56
|
-
};
|
|
57
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
58
|
-
import { Activity, ArrowLeft, BookOpen, Braces, ChevronLeft, ChevronRight, GitBranchPlus, Layers3, Play, RefreshCw, Save, Settings2, ShieldCheck, X, } from "lucide-react";
|
|
59
|
-
import React from "react";
|
|
60
|
-
import { useNavigate, useParams } from "react-router-dom";
|
|
61
|
-
import { useDispatch } from "react-redux";
|
|
62
|
-
import qs from "qs";
|
|
63
|
-
import YAML from "yaml";
|
|
64
|
-
import { createSolidEntityApi } from "../../../../redux/api/solidEntityApi";
|
|
65
|
-
import { useGetWorkflowNodeTypesQuery } from "../../../../redux/api/workflowNodeApi";
|
|
66
|
-
import { useExecuteWorkflowDefinitionMutation, useValidateWorkflowDefinitionMutation, } from "../../../../redux/api/workflowDefinitionEditorApi";
|
|
67
|
-
import { showToast } from "../../../../redux/features/toastSlice";
|
|
68
|
-
import { WorkflowNodeDocsPanel, } from "../../../../components/workflow/WorkflowNodeDocsPanel";
|
|
69
|
-
import { WorkflowFlowCanvas, } from "../../../../components/workflow/WorkflowFlowCanvas";
|
|
70
|
-
import { WorkflowNodeEditorDialog, WorkflowNodePalette, } from "../../../../components/workflow/WorkflowNodeSchemaEditor";
|
|
71
|
-
import { SolidButton, SolidCodeEditor, SolidDatePicker, SolidDialog, SolidDialogBody, SolidDialogFooter, SolidInput, SolidPanel, SolidSpinner, SolidTabGroup, SolidTag, SolidTextarea, } from "../../../../components/shad-cn-ui";
|
|
72
|
-
import "./WorkflowDefinitionEditorPage.css";
|
|
73
|
-
var createEmptyWorkflowDefinition = function () { return ({
|
|
74
|
-
version: "1.0.0",
|
|
75
|
-
description: "",
|
|
76
|
-
inputs: {},
|
|
77
|
-
variables: {},
|
|
78
|
-
nodes: [],
|
|
79
|
-
triggers: [],
|
|
80
|
-
metadata: {},
|
|
81
|
-
}); };
|
|
82
|
-
var TOPOLOGY_SPLIT_STORAGE_KEY = "solid.workflow.editor.topologySplitPercent";
|
|
83
|
-
function readStoredTopologySplitPercent() {
|
|
84
|
-
if (typeof window === "undefined") {
|
|
85
|
-
return 62;
|
|
86
|
-
}
|
|
87
|
-
var storedValue = Number(window.localStorage.getItem(TOPOLOGY_SPLIT_STORAGE_KEY));
|
|
88
|
-
return Number.isFinite(storedValue) ? Math.min(78, Math.max(22, storedValue)) : 62;
|
|
89
|
-
}
|
|
90
|
-
function serializeWorkflowDefinitionYaml(definition) {
|
|
91
|
-
return YAML.stringify(definition);
|
|
92
|
-
}
|
|
93
|
-
function parseYamlValue(value, fallback) {
|
|
94
|
-
if (!value.trim()) {
|
|
95
|
-
return fallback;
|
|
96
|
-
}
|
|
97
|
-
var parsed = YAML.parse(value);
|
|
98
|
-
return (parsed !== null && parsed !== void 0 ? parsed : fallback);
|
|
99
|
-
}
|
|
100
|
-
function normalizeWorkflowDefinition(definitionYaml) {
|
|
101
|
-
if (!definitionYaml) {
|
|
102
|
-
return createEmptyWorkflowDefinition();
|
|
103
|
-
}
|
|
104
|
-
var parsed = definitionYaml;
|
|
105
|
-
if (typeof definitionYaml === "string") {
|
|
106
|
-
try {
|
|
107
|
-
parsed = YAML.parse(definitionYaml);
|
|
108
|
-
}
|
|
109
|
-
catch (_a) {
|
|
110
|
-
return createEmptyWorkflowDefinition();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return __assign(__assign(__assign({}, createEmptyWorkflowDefinition()), (parsed !== null && parsed !== void 0 ? parsed : {})), { nodes: Array.isArray(parsed === null || parsed === void 0 ? void 0 : parsed.nodes) ? parsed.nodes : [], triggers: Array.isArray(parsed === null || parsed === void 0 ? void 0 : parsed.triggers)
|
|
114
|
-
? parsed.triggers
|
|
115
|
-
: [] });
|
|
116
|
-
}
|
|
117
|
-
function flattenWorkflowNodeIds(nodes) {
|
|
118
|
-
return nodes.flatMap(function (node) {
|
|
119
|
-
var _a, _b, _c, _d, _e;
|
|
120
|
-
return __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([
|
|
121
|
-
String(node.id)
|
|
122
|
-
], flattenWorkflowNodeIds((_a = node.children) !== null && _a !== void 0 ? _a : []), true), flattenWorkflowNodeIds((_b = node.nodes) !== null && _b !== void 0 ? _b : []), true), flattenWorkflowNodeIds((_c = node.then) !== null && _c !== void 0 ? _c : []), true), flattenWorkflowNodeIds((_d = node.else) !== null && _d !== void 0 ? _d : []), true), ((_e = node.branches) !== null && _e !== void 0 ? _e : []).flatMap(function (branch) { var _a; return flattenWorkflowNodeIds((_a = branch.nodes) !== null && _a !== void 0 ? _a : []); }), true);
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
function buildNodeId(type, definition) {
|
|
126
|
-
var _a;
|
|
127
|
-
var suffix = (_a = type.split(".").pop()) !== null && _a !== void 0 ? _a : "node";
|
|
128
|
-
var base = suffix.replace(/[^a-zA-Z0-9]+/g, "");
|
|
129
|
-
var attempt = base.charAt(0).toLowerCase() + base.slice(1);
|
|
130
|
-
var counter = 1;
|
|
131
|
-
var nodeIds = new Set(flattenWorkflowNodeIds(definition.nodes));
|
|
132
|
-
while (nodeIds.has(attempt)) {
|
|
133
|
-
counter += 1;
|
|
134
|
-
attempt = "".concat(base.charAt(0).toLowerCase() + base.slice(1)).concat(counter);
|
|
135
|
-
}
|
|
136
|
-
return attempt;
|
|
137
|
-
}
|
|
138
|
-
function buildBranchId(parentNodeId, node) {
|
|
139
|
-
var _a, _b;
|
|
140
|
-
var existingIds = new Set(((_a = node.branches) !== null && _a !== void 0 ? _a : []).map(function (branch) { return branch.id; }));
|
|
141
|
-
var counter = ((_b = node.branches) !== null && _b !== void 0 ? _b : []).length + 1;
|
|
142
|
-
var nextId = "".concat(parentNodeId, "Branch").concat(counter);
|
|
143
|
-
while (existingIds.has(nextId)) {
|
|
144
|
-
counter += 1;
|
|
145
|
-
nextId = "".concat(parentNodeId, "Branch").concat(counter);
|
|
146
|
-
}
|
|
147
|
-
return nextId;
|
|
148
|
-
}
|
|
149
|
-
function countNodes(nodes) {
|
|
150
|
-
return nodes.reduce(function (sum, node) {
|
|
151
|
-
var _a, _b, _c, _d, _e;
|
|
152
|
-
return sum +
|
|
153
|
-
1 +
|
|
154
|
-
countNodes((_a = node.children) !== null && _a !== void 0 ? _a : []) +
|
|
155
|
-
countNodes((_b = node.nodes) !== null && _b !== void 0 ? _b : []) +
|
|
156
|
-
countNodes((_c = node.then) !== null && _c !== void 0 ? _c : []) +
|
|
157
|
-
countNodes((_d = node.else) !== null && _d !== void 0 ? _d : []) +
|
|
158
|
-
((_e = node.branches) !== null && _e !== void 0 ? _e : []).reduce(function (branchSum, branch) { var _a; return branchSum + countNodes((_a = branch.nodes) !== null && _a !== void 0 ? _a : []); }, 0);
|
|
159
|
-
}, 0);
|
|
160
|
-
}
|
|
161
|
-
function countTriggers(triggers) {
|
|
162
|
-
return Array.isArray(triggers) ? triggers.length : 0;
|
|
163
|
-
}
|
|
164
|
-
function formatExecutionDate(value) {
|
|
165
|
-
if (!value) {
|
|
166
|
-
return "Not available";
|
|
167
|
-
}
|
|
168
|
-
var parsed = new Date(value);
|
|
169
|
-
if (Number.isNaN(parsed.getTime())) {
|
|
170
|
-
return "Not available";
|
|
171
|
-
}
|
|
172
|
-
return parsed.toLocaleString(undefined, {
|
|
173
|
-
year: "numeric",
|
|
174
|
-
month: "short",
|
|
175
|
-
day: "numeric",
|
|
176
|
-
hour: "numeric",
|
|
177
|
-
minute: "2-digit",
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
function formatDurationMs(value) {
|
|
181
|
-
var numericValue = typeof value === "string" ? Number(value) : typeof value === "number" ? value : null;
|
|
182
|
-
if (numericValue == null || Number.isNaN(numericValue) || numericValue <= 0) {
|
|
183
|
-
return "Not available";
|
|
184
|
-
}
|
|
185
|
-
if (numericValue < 1000) {
|
|
186
|
-
return "".concat(numericValue, " ms");
|
|
187
|
-
}
|
|
188
|
-
var seconds = numericValue / 1000;
|
|
189
|
-
if (seconds < 60) {
|
|
190
|
-
return "".concat(seconds.toFixed(seconds >= 10 ? 0 : 1), " s");
|
|
191
|
-
}
|
|
192
|
-
var minutes = Math.floor(seconds / 60);
|
|
193
|
-
var remainingSeconds = Math.round(seconds % 60);
|
|
194
|
-
return "".concat(minutes, "m ").concat(remainingSeconds, "s");
|
|
195
|
-
}
|
|
196
|
-
function getExecutionStatusCategory(status) {
|
|
197
|
-
var normalized = (status !== null && status !== void 0 ? status : "").trim().toLowerCase();
|
|
198
|
-
if (["success", "succeeded", "completed", "complete"].includes(normalized)) {
|
|
199
|
-
return "success";
|
|
200
|
-
}
|
|
201
|
-
if (["failed", "error", "errored", "cancelled", "canceled"].includes(normalized)) {
|
|
202
|
-
return "failed";
|
|
203
|
-
}
|
|
204
|
-
if (["running", "in_progress", "in-progress", "started", "processing"].includes(normalized)) {
|
|
205
|
-
return "inProgress";
|
|
206
|
-
}
|
|
207
|
-
if (["created", "pending", "queued", "scheduled"].includes(normalized)) {
|
|
208
|
-
return "pending";
|
|
209
|
-
}
|
|
210
|
-
return "other";
|
|
211
|
-
}
|
|
212
|
-
function buildWorkflowExecutionQueryString(options) {
|
|
213
|
-
var _a;
|
|
214
|
-
var queryData = {
|
|
215
|
-
limit: (_a = options.limit) !== null && _a !== void 0 ? _a : 100,
|
|
216
|
-
offset: 0,
|
|
217
|
-
sort: ["startedAt:desc", "id:desc"],
|
|
218
|
-
filters: {
|
|
219
|
-
workflowDefinition: {
|
|
220
|
-
id: {
|
|
221
|
-
$eq: options.workflowDefinitionId,
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
};
|
|
226
|
-
if (options.startDate || options.endDate) {
|
|
227
|
-
queryData.filters.startedAt = {};
|
|
228
|
-
if (options.startDate) {
|
|
229
|
-
var startDate = new Date(options.startDate);
|
|
230
|
-
startDate.setHours(0, 0, 0, 0);
|
|
231
|
-
queryData.filters.startedAt.$gte = startDate.toISOString();
|
|
232
|
-
}
|
|
233
|
-
if (options.endDate) {
|
|
234
|
-
var endDate = new Date(options.endDate);
|
|
235
|
-
endDate.setHours(23, 59, 59, 999);
|
|
236
|
-
queryData.filters.startedAt.$lte = endDate.toISOString();
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
return qs.stringify(queryData, { encodeValuesOnly: true });
|
|
240
|
-
}
|
|
241
|
-
function buildTriggerDocsModel(trigger) {
|
|
242
|
-
var _a, _b, _c, _d, _e;
|
|
243
|
-
var triggerEntries = Object.entries(trigger !== null && trigger !== void 0 ? trigger : {}).filter(function (_a) {
|
|
244
|
-
var key = _a[0];
|
|
245
|
-
return !["id", "type", "description", "disabled", "name", "label"].includes(key);
|
|
246
|
-
});
|
|
247
|
-
return {
|
|
248
|
-
title: (_c = (_b = (_a = trigger.label) !== null && _a !== void 0 ? _a : trigger.name) !== null && _b !== void 0 ? _b : trigger.id) !== null && _c !== void 0 ? _c : "Trigger",
|
|
249
|
-
subtitle: (_d = trigger.type) !== null && _d !== void 0 ? _d : "Trigger",
|
|
250
|
-
summary: (_e = trigger.description) !== null && _e !== void 0 ? _e : "Workflow trigger that can launch the workflow on a schedule or external event.",
|
|
251
|
-
badges: ["trigger", trigger.disabled ? "disabled" : "enabled"].filter(Boolean),
|
|
252
|
-
definitions: [
|
|
253
|
-
{
|
|
254
|
-
key: "behavior",
|
|
255
|
-
label: "Behavior",
|
|
256
|
-
content: trigger.disabled
|
|
257
|
-
? "This trigger is currently disabled and will not launch workflow executions until it is enabled."
|
|
258
|
-
: "This trigger is currently enabled and may launch workflow executions based on its configuration.",
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
key: "configuration",
|
|
262
|
-
label: "Configuration",
|
|
263
|
-
content: "```yaml\n".concat(YAML.stringify(trigger), "```"),
|
|
264
|
-
},
|
|
265
|
-
],
|
|
266
|
-
outputs: triggerEntries.map(function (_a) {
|
|
267
|
-
var key = _a[0], value = _a[1];
|
|
268
|
-
return ({
|
|
269
|
-
key: key,
|
|
270
|
-
label: key,
|
|
271
|
-
description: typeof value === "object"
|
|
272
|
-
? "Structured trigger configuration value."
|
|
273
|
-
: "Current value: ".concat(String(value)),
|
|
274
|
-
valueType: Array.isArray(value)
|
|
275
|
-
? "array"
|
|
276
|
-
: typeof value === "boolean"
|
|
277
|
-
? "boolean"
|
|
278
|
-
: typeof value === "number"
|
|
279
|
-
? "number"
|
|
280
|
-
: typeof value === "object"
|
|
281
|
-
? "object"
|
|
282
|
-
: "string",
|
|
283
|
-
});
|
|
284
|
-
}),
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
function buildWorkflowDocsModel(definition) {
|
|
288
|
-
var _a, _b, _c;
|
|
289
|
-
return {
|
|
290
|
-
title: "Workflow Definition",
|
|
291
|
-
subtitle: "Workflow-level settings",
|
|
292
|
-
summary: "Top-level inputs, variables, triggers, and description live here. Use workflow settings when the change is not about a single node.",
|
|
293
|
-
badges: ["workflow", "settings"],
|
|
294
|
-
definitions: [
|
|
295
|
-
{
|
|
296
|
-
key: "inputs",
|
|
297
|
-
label: "Inputs",
|
|
298
|
-
content: "```yaml\n".concat(YAML.stringify((_a = definition.inputs) !== null && _a !== void 0 ? _a : {}), "```"),
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
key: "variables",
|
|
302
|
-
label: "Variables",
|
|
303
|
-
content: "```yaml\n".concat(YAML.stringify((_b = definition.variables) !== null && _b !== void 0 ? _b : {}), "```"),
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
key: "triggers",
|
|
307
|
-
label: "Triggers",
|
|
308
|
-
content: "```yaml\n".concat(YAML.stringify((_c = definition.triggers) !== null && _c !== void 0 ? _c : []), "```"),
|
|
309
|
-
},
|
|
310
|
-
],
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
function findNodeById(nodes, nodeId) {
|
|
314
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
315
|
-
for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {
|
|
316
|
-
var node = nodes_1[_i];
|
|
317
|
-
if (String(node.id) === nodeId) {
|
|
318
|
-
return node;
|
|
319
|
-
}
|
|
320
|
-
var fromChildren = (_h = (_f = (_d = (_b = findNodeById((_a = node.children) !== null && _a !== void 0 ? _a : [], nodeId)) !== null && _b !== void 0 ? _b : findNodeById((_c = node.nodes) !== null && _c !== void 0 ? _c : [], nodeId)) !== null && _d !== void 0 ? _d : findNodeById((_e = node.then) !== null && _e !== void 0 ? _e : [], nodeId)) !== null && _f !== void 0 ? _f : findNodeById((_g = node.else) !== null && _g !== void 0 ? _g : [], nodeId)) !== null && _h !== void 0 ? _h : ((_j = node.branches) !== null && _j !== void 0 ? _j : []).reduce(function (found, branch) { var _a; return found !== null && found !== void 0 ? found : findNodeById((_a = branch.nodes) !== null && _a !== void 0 ? _a : [], nodeId); }, undefined);
|
|
321
|
-
if (fromChildren) {
|
|
322
|
-
return fromChildren;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
return undefined;
|
|
326
|
-
}
|
|
327
|
-
function getFirstNodeId(nodes) {
|
|
328
|
-
var _a, _b;
|
|
329
|
-
return (_b = (_a = nodes[0]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : "";
|
|
330
|
-
}
|
|
331
|
-
function updateNodeById(nodes, nodeId, updater) {
|
|
332
|
-
return nodes.map(function (node) {
|
|
333
|
-
var _a;
|
|
334
|
-
if (String(node.id) === nodeId) {
|
|
335
|
-
return updater(node);
|
|
336
|
-
}
|
|
337
|
-
return __assign(__assign({}, node), { children: node.children
|
|
338
|
-
? updateNodeById(node.children, nodeId, updater)
|
|
339
|
-
: node.children, nodes: node.nodes ? updateNodeById(node.nodes, nodeId, updater) : node.nodes, then: node.then ? updateNodeById(node.then, nodeId, updater) : node.then, else: node.else ? updateNodeById(node.else, nodeId, updater) : node.else, branches: (_a = node.branches) === null || _a === void 0 ? void 0 : _a.map(function (branch) {
|
|
340
|
-
var _a;
|
|
341
|
-
return (__assign(__assign({}, branch), { nodes: updateNodeById((_a = branch.nodes) !== null && _a !== void 0 ? _a : [], nodeId, updater) }));
|
|
342
|
-
}) });
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
function removeNodeById(nodes, nodeId) {
|
|
346
|
-
return nodes
|
|
347
|
-
.filter(function (node) { return String(node.id) !== nodeId; })
|
|
348
|
-
.map(function (node) {
|
|
349
|
-
var _a;
|
|
350
|
-
return (__assign(__assign({}, node), { children: node.children ? removeNodeById(node.children, nodeId) : node.children, nodes: node.nodes ? removeNodeById(node.nodes, nodeId) : node.nodes, then: node.then ? removeNodeById(node.then, nodeId) : node.then, else: node.else ? removeNodeById(node.else, nodeId) : node.else, branches: (_a = node.branches) === null || _a === void 0 ? void 0 : _a.map(function (branch) {
|
|
351
|
-
var _a;
|
|
352
|
-
return (__assign(__assign({}, branch), { nodes: removeNodeById((_a = branch.nodes) !== null && _a !== void 0 ? _a : [], nodeId) }));
|
|
353
|
-
}) }));
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
function insertAt(items, index, item) {
|
|
357
|
-
var safeIndex = Math.max(0, Math.min(index, items.length));
|
|
358
|
-
return __spreadArray(__spreadArray(__spreadArray([], items.slice(0, safeIndex), true), [item], false), items.slice(safeIndex), true);
|
|
359
|
-
}
|
|
360
|
-
function insertNodeIntoDefinition(definition, target, nodeToInsert) {
|
|
361
|
-
if (target.scope === "root") {
|
|
362
|
-
return __assign(__assign({}, definition), { nodes: insertAt(definition.nodes, target.index, nodeToInsert) });
|
|
363
|
-
}
|
|
364
|
-
return __assign(__assign({}, definition), { nodes: updateNodeById(definition.nodes, target.parentNodeId, function (node) {
|
|
365
|
-
var _a;
|
|
366
|
-
var _b;
|
|
367
|
-
if (target.scope === "slot") {
|
|
368
|
-
var slotNodes = Array.isArray(node[target.slotKey])
|
|
369
|
-
? node[target.slotKey]
|
|
370
|
-
: [];
|
|
371
|
-
return __assign(__assign({}, node), (_a = {}, _a[target.slotKey] = insertAt(slotNodes, target.index, nodeToInsert), _a));
|
|
372
|
-
}
|
|
373
|
-
return __assign(__assign({}, node), { branches: ((_b = node.branches) !== null && _b !== void 0 ? _b : []).map(function (branch) {
|
|
374
|
-
var _a;
|
|
375
|
-
return branch.id === target.branchId
|
|
376
|
-
? __assign(__assign({}, branch), { nodes: insertAt((_a = branch.nodes) !== null && _a !== void 0 ? _a : [], target.index, nodeToInsert) }) : branch;
|
|
377
|
-
}) });
|
|
378
|
-
}) });
|
|
379
|
-
}
|
|
380
|
-
function appendBranchToDefinition(definition, parentNodeId) {
|
|
381
|
-
return __assign(__assign({}, definition), { nodes: updateNodeById(definition.nodes, parentNodeId, function (node) {
|
|
382
|
-
var _a, _b;
|
|
383
|
-
return (__assign(__assign({}, node), { branches: __spreadArray(__spreadArray([], ((_a = node.branches) !== null && _a !== void 0 ? _a : []), true), [
|
|
384
|
-
{
|
|
385
|
-
id: buildBranchId(parentNodeId, node),
|
|
386
|
-
name: "Branch ".concat(((_b = node.branches) !== null && _b !== void 0 ? _b : []).length + 1),
|
|
387
|
-
nodes: [],
|
|
388
|
-
},
|
|
389
|
-
], false) }));
|
|
390
|
-
}) });
|
|
391
|
-
}
|
|
392
|
-
function getFieldValue(value, pathOrKey) {
|
|
393
|
-
var parts = pathOrKey.split(".");
|
|
394
|
-
var current = value;
|
|
395
|
-
for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
|
|
396
|
-
var part = parts_1[_i];
|
|
397
|
-
current = current === null || current === void 0 ? void 0 : current[part];
|
|
398
|
-
if (current === undefined) {
|
|
399
|
-
return undefined;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
return current;
|
|
403
|
-
}
|
|
404
|
-
function validateWorkflowDefinitionClient(definition, nodeTypes, workflowKey) {
|
|
405
|
-
var errors = [];
|
|
406
|
-
var nodeTypeMap = new Map(nodeTypes.map(function (item) { return [item.type, item]; }));
|
|
407
|
-
var seenNodeIds = new Set();
|
|
408
|
-
if (!workflowKey.trim()) {
|
|
409
|
-
errors.push("Workflow key is required.");
|
|
410
|
-
}
|
|
411
|
-
if (!Array.isArray(definition.nodes) || !definition.nodes.length) {
|
|
412
|
-
errors.push("Workflow definition must contain at least one root node.");
|
|
413
|
-
}
|
|
414
|
-
var validateNodeSequence = function (nodes, scopeLabel) {
|
|
415
|
-
nodes.forEach(function (node, index) {
|
|
416
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
417
|
-
var prefix = "".concat(scopeLabel, " node ").concat(index + 1);
|
|
418
|
-
if (!node.id) {
|
|
419
|
-
errors.push("".concat(prefix, " is missing an id."));
|
|
420
|
-
}
|
|
421
|
-
else if (seenNodeIds.has(node.id)) {
|
|
422
|
-
errors.push("Duplicate workflow node id \"".concat(node.id, "\"."));
|
|
423
|
-
}
|
|
424
|
-
else {
|
|
425
|
-
seenNodeIds.add(node.id);
|
|
426
|
-
}
|
|
427
|
-
if (!node.type) {
|
|
428
|
-
errors.push("".concat(prefix, " is missing a type."));
|
|
429
|
-
return;
|
|
430
|
-
}
|
|
431
|
-
var nodeType = nodeTypeMap.get(node.type);
|
|
432
|
-
if (!nodeType) {
|
|
433
|
-
errors.push("Node \"".concat(node.id, "\" uses unregistered type \"").concat(node.type, "\"."));
|
|
434
|
-
return;
|
|
435
|
-
}
|
|
436
|
-
var configuration = (_a = node.configuration) !== null && _a !== void 0 ? _a : {};
|
|
437
|
-
((_c = (_b = nodeType.authoring) === null || _b === void 0 ? void 0 : _b.configurationFields) !== null && _c !== void 0 ? _c : []).forEach(function (field) {
|
|
438
|
-
var _a, _b;
|
|
439
|
-
if (!field.required) {
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
var value = getFieldValue(configuration, (_a = field.path) !== null && _a !== void 0 ? _a : field.key);
|
|
443
|
-
var isEmptyArray = Array.isArray(value) && value.length === 0;
|
|
444
|
-
var isMissing = value === undefined ||
|
|
445
|
-
value === null ||
|
|
446
|
-
value === "" ||
|
|
447
|
-
isEmptyArray;
|
|
448
|
-
if (isMissing) {
|
|
449
|
-
errors.push("Node \"".concat(node.id, "\" is missing required field \"").concat((_b = field.label) !== null && _b !== void 0 ? _b : field.key, "\"."));
|
|
450
|
-
}
|
|
451
|
-
});
|
|
452
|
-
((_e = (_d = nodeType.authoring) === null || _d === void 0 ? void 0 : _d.childSlots) !== null && _e !== void 0 ? _e : []).forEach(function (slot) {
|
|
453
|
-
var _a, _b, _c, _d;
|
|
454
|
-
if (slot.kind === "branch-collection") {
|
|
455
|
-
var branchCount = Array.isArray(node.branches) ? node.branches.length : 0;
|
|
456
|
-
if (slot.required && branchCount === 0) {
|
|
457
|
-
errors.push("Node \"".concat(node.id, "\" requires at least one branch in \"").concat((_a = slot.label) !== null && _a !== void 0 ? _a : slot.key, "\"."));
|
|
458
|
-
}
|
|
459
|
-
if (slot.minItems && branchCount < slot.minItems) {
|
|
460
|
-
errors.push("Node \"".concat(node.id, "\" requires at least ").concat(slot.minItems, " branches in \"").concat((_b = slot.label) !== null && _b !== void 0 ? _b : slot.key, "\"."));
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
else {
|
|
464
|
-
var slotNodes = Array.isArray(node[slot.key]) ? node[slot.key] : [];
|
|
465
|
-
if (slot.required && slotNodes.length === 0) {
|
|
466
|
-
errors.push("Node \"".concat(node.id, "\" requires at least one child node in \"").concat((_c = slot.label) !== null && _c !== void 0 ? _c : slot.key, "\"."));
|
|
467
|
-
}
|
|
468
|
-
if (slot.minItems && slotNodes.length < slot.minItems) {
|
|
469
|
-
errors.push("Node \"".concat(node.id, "\" requires at least ").concat(slot.minItems, " nodes in \"").concat((_d = slot.label) !== null && _d !== void 0 ? _d : slot.key, "\"."));
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
});
|
|
473
|
-
validateNodeSequence((_f = node.children) !== null && _f !== void 0 ? _f : [], "".concat(node.id, " children"));
|
|
474
|
-
validateNodeSequence((_g = node.nodes) !== null && _g !== void 0 ? _g : [], "".concat(node.id, " nodes"));
|
|
475
|
-
validateNodeSequence((_h = node.then) !== null && _h !== void 0 ? _h : [], "".concat(node.id, " then"));
|
|
476
|
-
validateNodeSequence((_j = node.else) !== null && _j !== void 0 ? _j : [], "".concat(node.id, " else"));
|
|
477
|
-
((_k = node.branches) !== null && _k !== void 0 ? _k : []).forEach(function (branch, branchIndex) {
|
|
478
|
-
var _a, _b, _c;
|
|
479
|
-
if (!branch.id) {
|
|
480
|
-
errors.push("Node \"".concat(node.id, "\" has a branch without an id."));
|
|
481
|
-
}
|
|
482
|
-
validateNodeSequence((_a = branch.nodes) !== null && _a !== void 0 ? _a : [], "".concat(node.id, " branch ").concat((_c = (_b = branch.name) !== null && _b !== void 0 ? _b : branch.id) !== null && _c !== void 0 ? _c : branchIndex + 1));
|
|
483
|
-
});
|
|
484
|
-
});
|
|
485
|
-
};
|
|
486
|
-
validateNodeSequence(definition.nodes, "root");
|
|
487
|
-
return errors;
|
|
488
|
-
}
|
|
489
|
-
export function WorkflowDefinitionEditorPage() {
|
|
490
|
-
var _this = this;
|
|
491
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
492
|
-
var params = useParams();
|
|
493
|
-
var navigate = useNavigate();
|
|
494
|
-
var dispatch = useDispatch();
|
|
495
|
-
var entityApi = React.useMemo(function () { return createSolidEntityApi("workflowDefinition"); }, []);
|
|
496
|
-
var workflowExecutionApi = React.useMemo(function () { return createSolidEntityApi("workflowExecution"); }, []);
|
|
497
|
-
var useCreateSolidEntityMutation = entityApi.useCreateSolidEntityMutation, useGetSolidEntityByIdQuery = entityApi.useGetSolidEntityByIdQuery, useUpdateSolidEntityMutation = entityApi.useUpdateSolidEntityMutation;
|
|
498
|
-
var useLazyGetWorkflowExecutionsQuery = workflowExecutionApi.useLazyGetSolidEntitiesQuery;
|
|
499
|
-
var workflowDefinitionId = (_a = params.id) !== null && _a !== void 0 ? _a : "";
|
|
500
|
-
var moduleName = (_b = params.moduleName) !== null && _b !== void 0 ? _b : "solid-core";
|
|
501
|
-
var _6 = useGetSolidEntityByIdQuery({ id: workflowDefinitionId, qs: "" }, { skip: !workflowDefinitionId || workflowDefinitionId === "new" }), workflowDefinitionResponse = _6.data, isWorkflowDefinitionLoading = _6.isLoading, refetch = _6.refetch;
|
|
502
|
-
var _7 = useCreateSolidEntityMutation(), createWorkflowDefinition = _7[0], isCreating = _7[1].isLoading;
|
|
503
|
-
var _8 = useUpdateSolidEntityMutation(), updateWorkflowDefinition = _8[0], isSaving = _8[1].isLoading;
|
|
504
|
-
var _9 = useValidateWorkflowDefinitionMutation(), validateWorkflowDefinition = _9[0], isServerValidating = _9[1].isLoading;
|
|
505
|
-
var _10 = useExecuteWorkflowDefinitionMutation(), executeWorkflowDefinition = _10[0], isExecuting = _10[1].isLoading;
|
|
506
|
-
var _11 = useLazyGetWorkflowExecutionsQuery(), triggerGetWorkflowExecutions = _11[0], workflowExecutionsQuery = _11[1];
|
|
507
|
-
var _12 = useLazyGetWorkflowExecutionsQuery(), triggerGetWorkflowExecutionPresence = _12[0], workflowExecutionPresenceQuery = _12[1];
|
|
508
|
-
var _13 = useGetWorkflowNodeTypesQuery(), _14 = _13.data, nodeTypes = _14 === void 0 ? [] : _14, isNodeTypesLoading = _13.isLoading, isNodeTypesError = _13.isError;
|
|
509
|
-
var record = workflowDefinitionResponse === null || workflowDefinitionResponse === void 0 ? void 0 : workflowDefinitionResponse.data;
|
|
510
|
-
var _15 = React.useState(""), workflowKey = _15[0], setWorkflowKey = _15[1];
|
|
511
|
-
var _16 = React.useState(""), workflowDisplayName = _16[0], setWorkflowDisplayName = _16[1];
|
|
512
|
-
var _17 = React.useState(""), workflowDescription = _17[0], setWorkflowDescription = _17[1];
|
|
513
|
-
var _18 = React.useState(createEmptyWorkflowDefinition()), definitionDraft = _18[0], setDefinitionDraft = _18[1];
|
|
514
|
-
var _19 = React.useState(serializeWorkflowDefinitionYaml(createEmptyWorkflowDefinition())), codeValue = _19[0], setCodeValue = _19[1];
|
|
515
|
-
var _20 = React.useState(null), codeError = _20[0], setCodeError = _20[1];
|
|
516
|
-
var _21 = React.useState(""), paletteNodeTypeKey = _21[0], setPaletteNodeTypeKey = _21[1];
|
|
517
|
-
var _22 = React.useState(""), selectedNodeId = _22[0], setSelectedNodeId = _22[1];
|
|
518
|
-
var _23 = React.useState(""), selectedTriggerId = _23[0], setSelectedTriggerId = _23[1];
|
|
519
|
-
var _24 = React.useState(false), editorOpen = _24[0], setEditorOpen = _24[1];
|
|
520
|
-
var _25 = React.useState(false), workflowSettingsOpen = _25[0], setWorkflowSettingsOpen = _25[1];
|
|
521
|
-
var _26 = React.useState("{}"), workflowInputsValue = _26[0], setWorkflowInputsValue = _26[1];
|
|
522
|
-
var _27 = React.useState("{}"), workflowVariablesValue = _27[0], setWorkflowVariablesValue = _27[1];
|
|
523
|
-
var _28 = React.useState("[]"), workflowTriggersValue = _28[0], setWorkflowTriggersValue = _28[1];
|
|
524
|
-
var _29 = React.useState(false), docsOpen = _29[0], setDocsOpen = _29[1];
|
|
525
|
-
var _30 = React.useState(""), docsNodeTypeKey = _30[0], setDocsNodeTypeKey = _30[1];
|
|
526
|
-
var _31 = React.useState(false), topologyDocsOpen = _31[0], setTopologyDocsOpen = _31[1];
|
|
527
|
-
var _32 = React.useState(""), topologyDocsNodeTypeKey = _32[0], setTopologyDocsNodeTypeKey = _32[1];
|
|
528
|
-
var _33 = React.useState(), topologyDocsModel = _33[0], setTopologyDocsModel = _33[1];
|
|
529
|
-
var _34 = React.useState(workflowDefinitionId === "new" ? "edit" : "overview"), detailTab = _34[0], setDetailTab = _34[1];
|
|
530
|
-
var _35 = React.useState("flow"), activePanel = _35[0], setActivePanel = _35[1];
|
|
531
|
-
var _36 = React.useState(false), toolsOpen = _36[0], setToolsOpen = _36[1];
|
|
532
|
-
var _37 = React.useState(false), codePaneOpen = _37[0], setCodePaneOpen = _37[1];
|
|
533
|
-
var _38 = React.useState(true), topologyViewOpen = _38[0], setTopologyViewOpen = _38[1];
|
|
534
|
-
var _39 = React.useState(false), topologyYamlViewOpen = _39[0], setTopologyYamlViewOpen = _39[1];
|
|
535
|
-
var _40 = React.useState(readStoredTopologySplitPercent), topologySplitPercent = _40[0], setTopologySplitPercent = _40[1];
|
|
536
|
-
var topologySplitRef = React.useRef(null);
|
|
537
|
-
var _41 = React.useState(null), overviewStartDate = _41[0], setOverviewStartDate = _41[1];
|
|
538
|
-
var _42 = React.useState(null), overviewEndDate = _42[0], setOverviewEndDate = _42[1];
|
|
539
|
-
var _43 = React.useState({
|
|
540
|
-
status: "idle",
|
|
541
|
-
errors: [],
|
|
542
|
-
}), validationState = _43[0], setValidationState = _43[1];
|
|
543
|
-
React.useEffect(function () {
|
|
544
|
-
setDetailTab(workflowDefinitionId === "new" ? "edit" : "overview");
|
|
545
|
-
}, [workflowDefinitionId]);
|
|
546
|
-
React.useEffect(function () {
|
|
547
|
-
setOverviewStartDate(null);
|
|
548
|
-
setOverviewEndDate(null);
|
|
549
|
-
}, [workflowDefinitionId]);
|
|
550
|
-
React.useEffect(function () {
|
|
551
|
-
var _a, _b, _c, _d;
|
|
552
|
-
if (workflowDefinitionId === "new") {
|
|
553
|
-
var emptyDefinition = createEmptyWorkflowDefinition();
|
|
554
|
-
setWorkflowKey("");
|
|
555
|
-
setWorkflowDisplayName("");
|
|
556
|
-
setWorkflowDescription("");
|
|
557
|
-
setDefinitionDraft(emptyDefinition);
|
|
558
|
-
setCodeValue(serializeWorkflowDefinitionYaml(emptyDefinition));
|
|
559
|
-
setCodeError(null);
|
|
560
|
-
setSelectedNodeId("");
|
|
561
|
-
setSelectedTriggerId("");
|
|
562
|
-
setValidationState({ status: "idle", errors: [] });
|
|
563
|
-
return;
|
|
564
|
-
}
|
|
565
|
-
if (!record) {
|
|
566
|
-
return;
|
|
567
|
-
}
|
|
568
|
-
var normalized = normalizeWorkflowDefinition(record.definitionYaml);
|
|
569
|
-
setWorkflowKey((_a = record.key) !== null && _a !== void 0 ? _a : "");
|
|
570
|
-
setWorkflowDisplayName((_b = record.displayName) !== null && _b !== void 0 ? _b : "");
|
|
571
|
-
setWorkflowDescription((_d = (_c = record.description) !== null && _c !== void 0 ? _c : normalized.description) !== null && _d !== void 0 ? _d : "");
|
|
572
|
-
setDefinitionDraft(normalized);
|
|
573
|
-
setCodeValue(serializeWorkflowDefinitionYaml(normalized));
|
|
574
|
-
setCodeError(null);
|
|
575
|
-
setSelectedNodeId(getFirstNodeId(normalized.nodes));
|
|
576
|
-
setSelectedTriggerId("");
|
|
577
|
-
setValidationState({ status: "idle", errors: [] });
|
|
578
|
-
}, [record, workflowDefinitionId]);
|
|
579
|
-
React.useEffect(function () {
|
|
580
|
-
if (!paletteNodeTypeKey && nodeTypes.length) {
|
|
581
|
-
setPaletteNodeTypeKey(nodeTypes[0].type);
|
|
582
|
-
}
|
|
583
|
-
}, [nodeTypes, paletteNodeTypeKey]);
|
|
584
|
-
React.useEffect(function () {
|
|
585
|
-
if (!selectedNodeId) {
|
|
586
|
-
return;
|
|
587
|
-
}
|
|
588
|
-
if (!findNodeById(definitionDraft.nodes, selectedNodeId)) {
|
|
589
|
-
setSelectedNodeId(getFirstNodeId(definitionDraft.nodes));
|
|
590
|
-
}
|
|
591
|
-
}, [definitionDraft.nodes, selectedNodeId]);
|
|
592
|
-
React.useEffect(function () {
|
|
593
|
-
var _a;
|
|
594
|
-
if (!selectedTriggerId) {
|
|
595
|
-
return;
|
|
596
|
-
}
|
|
597
|
-
var exists = ((_a = definitionDraft.triggers) !== null && _a !== void 0 ? _a : []).some(function (trigger) { return String(trigger.id) === selectedTriggerId; });
|
|
598
|
-
if (!exists) {
|
|
599
|
-
setSelectedTriggerId("");
|
|
600
|
-
}
|
|
601
|
-
}, [definitionDraft.triggers, selectedTriggerId]);
|
|
602
|
-
React.useEffect(function () {
|
|
603
|
-
if (typeof window === "undefined") {
|
|
604
|
-
return;
|
|
605
|
-
}
|
|
606
|
-
window.localStorage.setItem(TOPOLOGY_SPLIT_STORAGE_KEY, String(Math.round(topologySplitPercent)));
|
|
607
|
-
}, [topologySplitPercent]);
|
|
608
|
-
React.useEffect(function () {
|
|
609
|
-
var _a, _b, _c;
|
|
610
|
-
if (!workflowSettingsOpen) {
|
|
611
|
-
return;
|
|
612
|
-
}
|
|
613
|
-
setWorkflowInputsValue(YAML.stringify((_a = definitionDraft.inputs) !== null && _a !== void 0 ? _a : {}));
|
|
614
|
-
setWorkflowVariablesValue(YAML.stringify((_b = definitionDraft.variables) !== null && _b !== void 0 ? _b : {}));
|
|
615
|
-
setWorkflowTriggersValue(YAML.stringify((_c = definitionDraft.triggers) !== null && _c !== void 0 ? _c : []));
|
|
616
|
-
}, [definitionDraft, workflowSettingsOpen]);
|
|
617
|
-
var paletteNodeType = React.useMemo(function () { return nodeTypes.find(function (nodeType) { return nodeType.type === paletteNodeTypeKey; }); }, [nodeTypes, paletteNodeTypeKey]);
|
|
618
|
-
var selectedNode = React.useMemo(function () { return findNodeById(definitionDraft.nodes, selectedNodeId); }, [definitionDraft.nodes, selectedNodeId]);
|
|
619
|
-
var selectedNodeType = React.useMemo(function () {
|
|
620
|
-
if (!(selectedNode === null || selectedNode === void 0 ? void 0 : selectedNode.type)) {
|
|
621
|
-
return undefined;
|
|
622
|
-
}
|
|
623
|
-
return nodeTypes.find(function (nodeType) { return nodeType.type === selectedNode.type; });
|
|
624
|
-
}, [nodeTypes, selectedNode]);
|
|
625
|
-
var selectedTrigger = React.useMemo(function () {
|
|
626
|
-
var _a;
|
|
627
|
-
return ((_a = definitionDraft.triggers) !== null && _a !== void 0 ? _a : []).find(function (trigger) { return String(trigger.id) === selectedTriggerId; });
|
|
628
|
-
}, [definitionDraft.triggers, selectedTriggerId]);
|
|
629
|
-
var docsNodeType = React.useMemo(function () {
|
|
630
|
-
if (docsNodeTypeKey) {
|
|
631
|
-
return nodeTypes.find(function (nodeType) { return nodeType.type === docsNodeTypeKey; });
|
|
632
|
-
}
|
|
633
|
-
return selectedTrigger ? undefined : selectedNodeType !== null && selectedNodeType !== void 0 ? selectedNodeType : paletteNodeType;
|
|
634
|
-
}, [
|
|
635
|
-
docsNodeTypeKey,
|
|
636
|
-
nodeTypes,
|
|
637
|
-
paletteNodeType,
|
|
638
|
-
selectedNodeType,
|
|
639
|
-
selectedTrigger,
|
|
640
|
-
]);
|
|
641
|
-
var docsModel = React.useMemo(function () {
|
|
642
|
-
if (selectedTrigger) {
|
|
643
|
-
return buildTriggerDocsModel(selectedTrigger);
|
|
644
|
-
}
|
|
645
|
-
if (!selectedNode && !selectedTrigger) {
|
|
646
|
-
return buildWorkflowDocsModel(definitionDraft);
|
|
647
|
-
}
|
|
648
|
-
return undefined;
|
|
649
|
-
}, [definitionDraft, selectedNode, selectedTrigger]);
|
|
650
|
-
var topologyDocsNodeType = React.useMemo(function () {
|
|
651
|
-
if (!topologyDocsNodeTypeKey) {
|
|
652
|
-
return undefined;
|
|
653
|
-
}
|
|
654
|
-
return nodeTypes.find(function (nodeType) { return nodeType.type === topologyDocsNodeTypeKey; });
|
|
655
|
-
}, [nodeTypes, topologyDocsNodeTypeKey]);
|
|
656
|
-
var workflowStats = React.useMemo(function () { return ({
|
|
657
|
-
nodeCount: countNodes(definitionDraft.nodes),
|
|
658
|
-
triggerCount: countTriggers(definitionDraft.triggers),
|
|
659
|
-
inputCount: definitionDraft.inputs && typeof definitionDraft.inputs === "object"
|
|
660
|
-
? Array.isArray(definitionDraft.inputs)
|
|
661
|
-
? definitionDraft.inputs.length
|
|
662
|
-
: Object.keys(definitionDraft.inputs).length
|
|
663
|
-
: 0,
|
|
664
|
-
}); }, [definitionDraft]);
|
|
665
|
-
var numericWorkflowDefinitionId = React.useMemo(function () {
|
|
666
|
-
var _a;
|
|
667
|
-
var candidate = (_a = record === null || record === void 0 ? void 0 : record.id) !== null && _a !== void 0 ? _a : Number(workflowDefinitionId);
|
|
668
|
-
var parsedCandidate = typeof candidate === "number" ? candidate : Number(candidate);
|
|
669
|
-
return Number.isFinite(parsedCandidate) ? parsedCandidate : null;
|
|
670
|
-
}, [record === null || record === void 0 ? void 0 : record.id, workflowDefinitionId]);
|
|
671
|
-
var validationTag = React.useMemo(function () {
|
|
672
|
-
if (validationState.status === "valid") {
|
|
673
|
-
return { tone: "success", label: "Validated" };
|
|
674
|
-
}
|
|
675
|
-
if (validationState.status === "invalid") {
|
|
676
|
-
return { tone: "danger", label: "Needs fixes" };
|
|
677
|
-
}
|
|
678
|
-
if (validationState.status === "validating") {
|
|
679
|
-
return { tone: undefined, label: "Validating" };
|
|
680
|
-
}
|
|
681
|
-
return { tone: undefined, label: "Not validated" };
|
|
682
|
-
}, [validationState.status]);
|
|
683
|
-
var loadWorkflowExecutions = React.useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
684
|
-
return __generator(this, function (_a) {
|
|
685
|
-
switch (_a.label) {
|
|
686
|
-
case 0:
|
|
687
|
-
if (!numericWorkflowDefinitionId) {
|
|
688
|
-
return [2 /*return*/];
|
|
689
|
-
}
|
|
690
|
-
return [4 /*yield*/, triggerGetWorkflowExecutions(buildWorkflowExecutionQueryString({
|
|
691
|
-
workflowDefinitionId: numericWorkflowDefinitionId,
|
|
692
|
-
startDate: overviewStartDate,
|
|
693
|
-
endDate: overviewEndDate,
|
|
694
|
-
}))];
|
|
695
|
-
case 1:
|
|
696
|
-
_a.sent();
|
|
697
|
-
return [2 /*return*/];
|
|
698
|
-
}
|
|
699
|
-
});
|
|
700
|
-
}); }, [
|
|
701
|
-
numericWorkflowDefinitionId,
|
|
702
|
-
overviewEndDate,
|
|
703
|
-
overviewStartDate,
|
|
704
|
-
triggerGetWorkflowExecutions,
|
|
705
|
-
]);
|
|
706
|
-
React.useEffect(function () {
|
|
707
|
-
if (!numericWorkflowDefinitionId || workflowDefinitionId === "new") {
|
|
708
|
-
return;
|
|
709
|
-
}
|
|
710
|
-
void triggerGetWorkflowExecutionPresence(buildWorkflowExecutionQueryString({
|
|
711
|
-
workflowDefinitionId: numericWorkflowDefinitionId,
|
|
712
|
-
limit: 1,
|
|
713
|
-
}));
|
|
714
|
-
}, [
|
|
715
|
-
numericWorkflowDefinitionId,
|
|
716
|
-
triggerGetWorkflowExecutionPresence,
|
|
717
|
-
workflowDefinitionId,
|
|
718
|
-
]);
|
|
719
|
-
React.useEffect(function () {
|
|
720
|
-
if (detailTab !== "overview" ||
|
|
721
|
-
!numericWorkflowDefinitionId ||
|
|
722
|
-
workflowDefinitionId === "new") {
|
|
723
|
-
return;
|
|
724
|
-
}
|
|
725
|
-
void loadWorkflowExecutions();
|
|
726
|
-
}, [
|
|
727
|
-
detailTab,
|
|
728
|
-
loadWorkflowExecutions,
|
|
729
|
-
numericWorkflowDefinitionId,
|
|
730
|
-
workflowDefinitionId,
|
|
731
|
-
]);
|
|
732
|
-
var executionRecords = React.useMemo(function () { var _a, _b; return ((_b = (_a = workflowExecutionsQuery.data) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : []); }, [(_c = workflowExecutionsQuery.data) === null || _c === void 0 ? void 0 : _c.records]);
|
|
733
|
-
var hasExecutions = React.useMemo(function () { var _a, _b, _c; return ((_c = (_b = (_a = workflowExecutionPresenceQuery.data) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.totalRecords) !== null && _c !== void 0 ? _c : 0) > 0; }, [(_e = (_d = workflowExecutionPresenceQuery.data) === null || _d === void 0 ? void 0 : _d.meta) === null || _e === void 0 ? void 0 : _e.totalRecords]);
|
|
734
|
-
var executionOverview = React.useMemo(function () {
|
|
735
|
-
var totals = {
|
|
736
|
-
total: executionRecords.length,
|
|
737
|
-
success: 0,
|
|
738
|
-
failed: 0,
|
|
739
|
-
inProgress: 0,
|
|
740
|
-
pending: 0,
|
|
741
|
-
other: 0,
|
|
742
|
-
totalDurationMs: 0,
|
|
743
|
-
durationCount: 0,
|
|
744
|
-
};
|
|
745
|
-
for (var _i = 0, executionRecords_1 = executionRecords; _i < executionRecords_1.length; _i++) {
|
|
746
|
-
var execution = executionRecords_1[_i];
|
|
747
|
-
var category = getExecutionStatusCategory(execution.status);
|
|
748
|
-
totals[category] += 1;
|
|
749
|
-
var durationValue = typeof execution.durationMs === "string"
|
|
750
|
-
? Number(execution.durationMs)
|
|
751
|
-
: execution.durationMs;
|
|
752
|
-
if (typeof durationValue === "number" &&
|
|
753
|
-
Number.isFinite(durationValue) &&
|
|
754
|
-
durationValue > 0) {
|
|
755
|
-
totals.totalDurationMs += durationValue;
|
|
756
|
-
totals.durationCount += 1;
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
var terminalCount = totals.success + totals.failed;
|
|
760
|
-
var successRatio = terminalCount ? Math.round((totals.success / terminalCount) * 100) : 0;
|
|
761
|
-
var failedRatio = terminalCount ? Math.round((totals.failed / terminalCount) * 100) : 0;
|
|
762
|
-
return __assign(__assign({}, totals), { successRatio: successRatio, failedRatio: failedRatio, averageDurationMs: totals.durationCount
|
|
763
|
-
? Math.round(totals.totalDurationMs / totals.durationCount)
|
|
764
|
-
: null, latestExecution: executionRecords[0] });
|
|
765
|
-
}, [executionRecords]);
|
|
766
|
-
var overviewDateFilterLabel = React.useMemo(function () {
|
|
767
|
-
if (!overviewStartDate && !overviewEndDate) {
|
|
768
|
-
return "All dates";
|
|
769
|
-
}
|
|
770
|
-
var formatDateOnly = function (value) {
|
|
771
|
-
return value
|
|
772
|
-
? value.toLocaleDateString(undefined, {
|
|
773
|
-
year: "numeric",
|
|
774
|
-
month: "short",
|
|
775
|
-
day: "numeric",
|
|
776
|
-
})
|
|
777
|
-
: null;
|
|
778
|
-
};
|
|
779
|
-
var start = formatDateOnly(overviewStartDate);
|
|
780
|
-
var end = formatDateOnly(overviewEndDate);
|
|
781
|
-
if (start && end) {
|
|
782
|
-
return "".concat(start, " - ").concat(end);
|
|
783
|
-
}
|
|
784
|
-
if (start) {
|
|
785
|
-
return "From ".concat(start);
|
|
786
|
-
}
|
|
787
|
-
return "Until ".concat(end);
|
|
788
|
-
}, [overviewEndDate, overviewStartDate]);
|
|
789
|
-
var syncDraftToCode = React.useCallback(function (nextDraft) {
|
|
790
|
-
setDefinitionDraft(nextDraft);
|
|
791
|
-
setCodeValue(serializeWorkflowDefinitionYaml(nextDraft));
|
|
792
|
-
setCodeError(null);
|
|
793
|
-
setValidationState({ status: "idle", errors: [] });
|
|
794
|
-
}, []);
|
|
795
|
-
var handleSaveWorkflowSettings = React.useCallback(function () {
|
|
796
|
-
var _a;
|
|
797
|
-
try {
|
|
798
|
-
var nextInputs = parseYamlValue(workflowInputsValue, {});
|
|
799
|
-
var nextVariables = parseYamlValue(workflowVariablesValue, {});
|
|
800
|
-
var nextTriggers = parseYamlValue(workflowTriggersValue, []);
|
|
801
|
-
if (!Array.isArray(nextTriggers)) {
|
|
802
|
-
throw new Error("Triggers must be a YAML sequence.");
|
|
803
|
-
}
|
|
804
|
-
var nextDraft = __assign(__assign({}, definitionDraft), { description: workflowDescription, inputs: nextInputs, variables: nextVariables, triggers: nextTriggers });
|
|
805
|
-
syncDraftToCode(nextDraft);
|
|
806
|
-
setWorkflowSettingsOpen(false);
|
|
807
|
-
dispatch(showToast({
|
|
808
|
-
severity: "success",
|
|
809
|
-
summary: "Workflow settings updated",
|
|
810
|
-
detail: "Inputs, variables, and triggers were updated in the draft.",
|
|
811
|
-
}));
|
|
812
|
-
}
|
|
813
|
-
catch (error) {
|
|
814
|
-
dispatch(showToast({
|
|
815
|
-
severity: "error",
|
|
816
|
-
summary: "Invalid workflow settings",
|
|
817
|
-
detail: (_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : "Fix the workflow-level YAML blocks before saving the settings.",
|
|
818
|
-
}));
|
|
819
|
-
}
|
|
820
|
-
}, [
|
|
821
|
-
definitionDraft,
|
|
822
|
-
dispatch,
|
|
823
|
-
syncDraftToCode,
|
|
824
|
-
workflowDescription,
|
|
825
|
-
workflowInputsValue,
|
|
826
|
-
workflowTriggersValue,
|
|
827
|
-
workflowVariablesValue,
|
|
828
|
-
]);
|
|
829
|
-
var handleCodeChange = function (nextValue) {
|
|
830
|
-
var _a, _b;
|
|
831
|
-
var safeValue = nextValue !== null && nextValue !== void 0 ? nextValue : "";
|
|
832
|
-
setCodeValue(safeValue);
|
|
833
|
-
try {
|
|
834
|
-
var parsed = YAML.parse(safeValue);
|
|
835
|
-
var normalized = normalizeWorkflowDefinition(parsed);
|
|
836
|
-
setDefinitionDraft(normalized);
|
|
837
|
-
setCodeError(null);
|
|
838
|
-
setValidationState({ status: "idle", errors: [] });
|
|
839
|
-
}
|
|
840
|
-
catch (error) {
|
|
841
|
-
setCodeError((_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : "Invalid YAML");
|
|
842
|
-
setValidationState({
|
|
843
|
-
status: "invalid",
|
|
844
|
-
source: "client",
|
|
845
|
-
message: "Definition YAML is invalid.",
|
|
846
|
-
errors: [(_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : "Invalid YAML"],
|
|
847
|
-
});
|
|
848
|
-
}
|
|
849
|
-
};
|
|
850
|
-
var startTopologySplitResize = React.useCallback(function (event) {
|
|
851
|
-
event.preventDefault();
|
|
852
|
-
var container = topologySplitRef.current;
|
|
853
|
-
if (!container) {
|
|
854
|
-
return;
|
|
855
|
-
}
|
|
856
|
-
var handleMouseMove = function (moveEvent) {
|
|
857
|
-
var rect = container.getBoundingClientRect();
|
|
858
|
-
if (!rect.width) {
|
|
859
|
-
return;
|
|
860
|
-
}
|
|
861
|
-
var nextPercent = ((moveEvent.clientX - rect.left) / rect.width) * 100;
|
|
862
|
-
setTopologySplitPercent(Math.min(78, Math.max(22, nextPercent)));
|
|
863
|
-
};
|
|
864
|
-
var handleMouseUp = function () {
|
|
865
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
866
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
867
|
-
};
|
|
868
|
-
document.addEventListener("mousemove", handleMouseMove);
|
|
869
|
-
document.addEventListener("mouseup", handleMouseUp);
|
|
870
|
-
}, []);
|
|
871
|
-
var createNodeFromType = function (nodeType) {
|
|
872
|
-
var _a, _b, _c, _d, _e, _f;
|
|
873
|
-
var nextNode = {
|
|
874
|
-
id: buildNodeId(nodeType.type, definitionDraft),
|
|
875
|
-
kind: nodeType.kind,
|
|
876
|
-
type: nodeType.type,
|
|
877
|
-
name: (_a = nodeType.label) !== null && _a !== void 0 ? _a : nodeType.type,
|
|
878
|
-
description: (_b = nodeType.description) !== null && _b !== void 0 ? _b : "",
|
|
879
|
-
configuration: (_d = (_c = nodeType.authoring) === null || _c === void 0 ? void 0 : _c.defaultConfiguration) !== null && _d !== void 0 ? _d : {},
|
|
880
|
-
};
|
|
881
|
-
((_f = (_e = nodeType.authoring) === null || _e === void 0 ? void 0 : _e.childSlots) !== null && _f !== void 0 ? _f : []).forEach(function (slot) {
|
|
882
|
-
var _a, _b;
|
|
883
|
-
if (slot.kind === "branch-collection") {
|
|
884
|
-
var branchCount = Math.max((_a = slot.minItems) !== null && _a !== void 0 ? _a : 0, slot.required ? 1 : 0);
|
|
885
|
-
nextNode.branches = Array.from({ length: branchCount }, function (_, index) { return ({
|
|
886
|
-
id: "".concat(nextNode.id, "Branch").concat(index + 1),
|
|
887
|
-
name: "Branch ".concat(index + 1),
|
|
888
|
-
nodes: [],
|
|
889
|
-
}); });
|
|
890
|
-
return;
|
|
891
|
-
}
|
|
892
|
-
nextNode[slot.key] = (_b = nextNode[slot.key]) !== null && _b !== void 0 ? _b : [];
|
|
893
|
-
});
|
|
894
|
-
return nextNode;
|
|
895
|
-
};
|
|
896
|
-
var validateCurrentDefinition = React.useCallback(function (options) { return __awaiter(_this, void 0, void 0, function () {
|
|
897
|
-
var nextState, clientErrors, nextState, response, nextState, error_1, detail, nextState;
|
|
898
|
-
var _a, _b, _c, _d;
|
|
899
|
-
return __generator(this, function (_e) {
|
|
900
|
-
switch (_e.label) {
|
|
901
|
-
case 0:
|
|
902
|
-
if (codeError) {
|
|
903
|
-
nextState = {
|
|
904
|
-
status: "invalid",
|
|
905
|
-
source: "client",
|
|
906
|
-
message: "Definition YAML is invalid.",
|
|
907
|
-
errors: [codeError],
|
|
908
|
-
};
|
|
909
|
-
setValidationState(nextState);
|
|
910
|
-
setActivePanel("code");
|
|
911
|
-
return [2 /*return*/, { valid: false, errors: nextState.errors }];
|
|
912
|
-
}
|
|
913
|
-
setValidationState({
|
|
914
|
-
status: "validating",
|
|
915
|
-
errors: [],
|
|
916
|
-
message: "Validating workflow definition...",
|
|
917
|
-
});
|
|
918
|
-
clientErrors = validateWorkflowDefinitionClient(__assign(__assign({}, definitionDraft), { description: workflowDescription }), nodeTypes, workflowKey);
|
|
919
|
-
if (clientErrors.length) {
|
|
920
|
-
nextState = {
|
|
921
|
-
status: "invalid",
|
|
922
|
-
source: "client",
|
|
923
|
-
message: "Client-side validation failed.",
|
|
924
|
-
errors: clientErrors,
|
|
925
|
-
};
|
|
926
|
-
setValidationState(nextState);
|
|
927
|
-
setActivePanel("flow");
|
|
928
|
-
return [2 /*return*/, { valid: false, errors: clientErrors }];
|
|
929
|
-
}
|
|
930
|
-
_e.label = 1;
|
|
931
|
-
case 1:
|
|
932
|
-
_e.trys.push([1, 3, , 4]);
|
|
933
|
-
return [4 /*yield*/, validateWorkflowDefinition({
|
|
934
|
-
definitionYaml: serializeWorkflowDefinitionYaml(__assign(__assign({}, definitionDraft), { description: workflowDescription })),
|
|
935
|
-
}).unwrap()];
|
|
936
|
-
case 2:
|
|
937
|
-
response = _e.sent();
|
|
938
|
-
nextState = {
|
|
939
|
-
status: "valid",
|
|
940
|
-
source: "server",
|
|
941
|
-
message: (_a = response === null || response === void 0 ? void 0 : response.message) !== null && _a !== void 0 ? _a : "Workflow definition is valid.",
|
|
942
|
-
errors: [],
|
|
943
|
-
};
|
|
944
|
-
setValidationState(nextState);
|
|
945
|
-
if (options === null || options === void 0 ? void 0 : options.showSuccessToast) {
|
|
946
|
-
dispatch(showToast({
|
|
947
|
-
severity: "success",
|
|
948
|
-
summary: "Validation passed",
|
|
949
|
-
detail: nextState.message,
|
|
950
|
-
}));
|
|
951
|
-
}
|
|
952
|
-
return [2 /*return*/, { valid: true, errors: [] }];
|
|
953
|
-
case 3:
|
|
954
|
-
error_1 = _e.sent();
|
|
955
|
-
detail = (_d = (_c = (_b = error_1 === null || error_1 === void 0 ? void 0 : error_1.data) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : error_1 === null || error_1 === void 0 ? void 0 : error_1.message) !== null && _d !== void 0 ? _d : "Workflow validation failed on the server.";
|
|
956
|
-
nextState = {
|
|
957
|
-
status: "invalid",
|
|
958
|
-
source: "server",
|
|
959
|
-
message: detail,
|
|
960
|
-
errors: [detail],
|
|
961
|
-
};
|
|
962
|
-
setValidationState(nextState);
|
|
963
|
-
setActivePanel("flow");
|
|
964
|
-
return [2 /*return*/, { valid: false, errors: [detail] }];
|
|
965
|
-
case 4: return [2 /*return*/];
|
|
966
|
-
}
|
|
967
|
-
});
|
|
968
|
-
}); }, [
|
|
969
|
-
codeError,
|
|
970
|
-
definitionDraft,
|
|
971
|
-
dispatch,
|
|
972
|
-
nodeTypes,
|
|
973
|
-
validateWorkflowDefinition,
|
|
974
|
-
workflowDescription,
|
|
975
|
-
workflowKey,
|
|
976
|
-
]);
|
|
977
|
-
var handleInsertNode = function (target) {
|
|
978
|
-
if (!paletteNodeType) {
|
|
979
|
-
dispatch(showToast({
|
|
980
|
-
severity: "warn",
|
|
981
|
-
summary: "Pick a node type",
|
|
982
|
-
detail: "Select a node type from the palette before inserting into the flow.",
|
|
983
|
-
}));
|
|
984
|
-
return;
|
|
985
|
-
}
|
|
986
|
-
var nextNode = createNodeFromType(paletteNodeType);
|
|
987
|
-
var nextDraft = insertNodeIntoDefinition(definitionDraft, target, nextNode);
|
|
988
|
-
syncDraftToCode(nextDraft);
|
|
989
|
-
setSelectedNodeId(nextNode.id);
|
|
990
|
-
setDocsNodeTypeKey(nextNode.type);
|
|
991
|
-
setEditorOpen(true);
|
|
992
|
-
setActivePanel("flow");
|
|
993
|
-
};
|
|
994
|
-
var handleAddBranch = function (parentNodeId) {
|
|
995
|
-
var nextDraft = appendBranchToDefinition(definitionDraft, parentNodeId);
|
|
996
|
-
syncDraftToCode(nextDraft);
|
|
997
|
-
};
|
|
998
|
-
var handleUpdateSelectedNode = function (nextNode) {
|
|
999
|
-
if (!selectedNode) {
|
|
1000
|
-
return;
|
|
1001
|
-
}
|
|
1002
|
-
var nextDraft = __assign(__assign({}, definitionDraft), { nodes: updateNodeById(definitionDraft.nodes, selectedNode.id, function () { return nextNode; }) });
|
|
1003
|
-
syncDraftToCode(nextDraft);
|
|
1004
|
-
setSelectedNodeId(nextNode.id);
|
|
1005
|
-
setDocsNodeTypeKey(nextNode.type);
|
|
1006
|
-
};
|
|
1007
|
-
var handleRemoveNode = function (nodeId) {
|
|
1008
|
-
var nextDraft = __assign(__assign({}, definitionDraft), { nodes: removeNodeById(definitionDraft.nodes, nodeId) });
|
|
1009
|
-
syncDraftToCode(nextDraft);
|
|
1010
|
-
if (selectedNodeId === nodeId) {
|
|
1011
|
-
setSelectedNodeId(getFirstNodeId(nextDraft.nodes));
|
|
1012
|
-
}
|
|
1013
|
-
};
|
|
1014
|
-
var handleSave = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1015
|
-
var validation, payload, result, createdId, error_2;
|
|
1016
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1017
|
-
return __generator(this, function (_g) {
|
|
1018
|
-
switch (_g.label) {
|
|
1019
|
-
case 0: return [4 /*yield*/, validateCurrentDefinition()];
|
|
1020
|
-
case 1:
|
|
1021
|
-
validation = _g.sent();
|
|
1022
|
-
if (!validation.valid) {
|
|
1023
|
-
dispatch(showToast({
|
|
1024
|
-
severity: "error",
|
|
1025
|
-
summary: "Validation failed",
|
|
1026
|
-
detail: (_a = validation.errors[0]) !== null && _a !== void 0 ? _a : "Fix validation errors before saving.",
|
|
1027
|
-
}));
|
|
1028
|
-
return [2 /*return*/];
|
|
1029
|
-
}
|
|
1030
|
-
payload = {
|
|
1031
|
-
key: workflowKey,
|
|
1032
|
-
displayName: workflowDisplayName,
|
|
1033
|
-
description: workflowDescription,
|
|
1034
|
-
definitionYaml: serializeWorkflowDefinitionYaml(__assign(__assign({}, definitionDraft), { description: workflowDescription })),
|
|
1035
|
-
};
|
|
1036
|
-
_g.label = 2;
|
|
1037
|
-
case 2:
|
|
1038
|
-
_g.trys.push([2, 7, , 8]);
|
|
1039
|
-
if (!(record === null || record === void 0 ? void 0 : record.id)) return [3 /*break*/, 4];
|
|
1040
|
-
return [4 /*yield*/, updateWorkflowDefinition({
|
|
1041
|
-
id: record.id,
|
|
1042
|
-
data: __assign(__assign({}, record), payload),
|
|
1043
|
-
}).unwrap()];
|
|
1044
|
-
case 3:
|
|
1045
|
-
_g.sent();
|
|
1046
|
-
dispatch(showToast({
|
|
1047
|
-
severity: "success",
|
|
1048
|
-
summary: "Saved",
|
|
1049
|
-
detail: "Workflow definition updated successfully.",
|
|
1050
|
-
}));
|
|
1051
|
-
refetch();
|
|
1052
|
-
return [3 /*break*/, 6];
|
|
1053
|
-
case 4: return [4 /*yield*/, createWorkflowDefinition(payload).unwrap()];
|
|
1054
|
-
case 5:
|
|
1055
|
-
result = _g.sent();
|
|
1056
|
-
createdId = (_c = (_b = result === null || result === void 0 ? void 0 : result.data) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : result === null || result === void 0 ? void 0 : result.id;
|
|
1057
|
-
dispatch(showToast({
|
|
1058
|
-
severity: "success",
|
|
1059
|
-
summary: "Created",
|
|
1060
|
-
detail: "Workflow definition created successfully.",
|
|
1061
|
-
}));
|
|
1062
|
-
if (createdId) {
|
|
1063
|
-
navigate("/admin/core/".concat(moduleName, "/workflow-definition/editor/").concat(createdId), { replace: true });
|
|
1064
|
-
}
|
|
1065
|
-
_g.label = 6;
|
|
1066
|
-
case 6: return [3 /*break*/, 8];
|
|
1067
|
-
case 7:
|
|
1068
|
-
error_2 = _g.sent();
|
|
1069
|
-
dispatch(showToast({
|
|
1070
|
-
severity: "error",
|
|
1071
|
-
summary: "Save failed",
|
|
1072
|
-
detail: (_f = (_e = (_d = error_2 === null || error_2 === void 0 ? void 0 : error_2.data) === null || _d === void 0 ? void 0 : _d.message) !== null && _e !== void 0 ? _e : error_2 === null || error_2 === void 0 ? void 0 : error_2.message) !== null && _f !== void 0 ? _f : "Failed to save workflow definition.",
|
|
1073
|
-
}));
|
|
1074
|
-
return [3 /*break*/, 8];
|
|
1075
|
-
case 8: return [2 /*return*/];
|
|
1076
|
-
}
|
|
1077
|
-
});
|
|
1078
|
-
}); };
|
|
1079
|
-
var handleExecute = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1080
|
-
var validation, response, error_3;
|
|
1081
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1082
|
-
return __generator(this, function (_g) {
|
|
1083
|
-
switch (_g.label) {
|
|
1084
|
-
case 0:
|
|
1085
|
-
if (!(record === null || record === void 0 ? void 0 : record.id)) {
|
|
1086
|
-
dispatch(showToast({
|
|
1087
|
-
severity: "warn",
|
|
1088
|
-
summary: "Save first",
|
|
1089
|
-
detail: "Create the workflow definition before launching execution.",
|
|
1090
|
-
}));
|
|
1091
|
-
return [2 /*return*/];
|
|
1092
|
-
}
|
|
1093
|
-
return [4 /*yield*/, validateCurrentDefinition()];
|
|
1094
|
-
case 1:
|
|
1095
|
-
validation = _g.sent();
|
|
1096
|
-
if (!validation.valid) {
|
|
1097
|
-
dispatch(showToast({
|
|
1098
|
-
severity: "error",
|
|
1099
|
-
summary: "Execution blocked",
|
|
1100
|
-
detail: (_a = validation.errors[0]) !== null && _a !== void 0 ? _a : "Workflow validation failed.",
|
|
1101
|
-
}));
|
|
1102
|
-
return [2 /*return*/];
|
|
1103
|
-
}
|
|
1104
|
-
_g.label = 2;
|
|
1105
|
-
case 2:
|
|
1106
|
-
_g.trys.push([2, 4, , 5]);
|
|
1107
|
-
return [4 /*yield*/, executeWorkflowDefinition({ id: record.id }).unwrap()];
|
|
1108
|
-
case 3:
|
|
1109
|
-
response = _g.sent();
|
|
1110
|
-
dispatch(showToast({
|
|
1111
|
-
severity: (response === null || response === void 0 ? void 0 : response.status) === "failed" ? "error" : "success",
|
|
1112
|
-
summary: (response === null || response === void 0 ? void 0 : response.status) === "failed"
|
|
1113
|
-
? "Execution failed"
|
|
1114
|
-
: "Execution started",
|
|
1115
|
-
detail: (_c = (_b = response === null || response === void 0 ? void 0 : response.executionIdentifier) !== null && _b !== void 0 ? _b : response === null || response === void 0 ? void 0 : response.errorSummary) !== null && _c !== void 0 ? _c : "Workflow execution request completed.",
|
|
1116
|
-
}));
|
|
1117
|
-
return [3 /*break*/, 5];
|
|
1118
|
-
case 4:
|
|
1119
|
-
error_3 = _g.sent();
|
|
1120
|
-
dispatch(showToast({
|
|
1121
|
-
severity: "error",
|
|
1122
|
-
summary: "Execution failed",
|
|
1123
|
-
detail: (_f = (_e = (_d = error_3 === null || error_3 === void 0 ? void 0 : error_3.data) === null || _d === void 0 ? void 0 : _d.message) !== null && _e !== void 0 ? _e : error_3 === null || error_3 === void 0 ? void 0 : error_3.message) !== null && _f !== void 0 ? _f : "Failed to execute workflow definition.",
|
|
1124
|
-
}));
|
|
1125
|
-
return [3 /*break*/, 5];
|
|
1126
|
-
case 5: return [2 /*return*/];
|
|
1127
|
-
}
|
|
1128
|
-
});
|
|
1129
|
-
}); };
|
|
1130
|
-
var renderPlaceholderTab = function (label, message) { return (_jsxs("div", { className: "workflow-editor-placeholder", children: [_jsx("div", { className: "workflow-editor-placeholder__icon", children: _jsx(Activity, { size: 20 }) }), _jsxs("div", { className: "workflow-editor-placeholder__copy", children: [_jsx("h3", { children: label }), _jsx("p", { children: message })] })] })); };
|
|
1131
|
-
var overviewContent = workflowDefinitionId === "new" ? (_jsx("div", { className: "workflow-editor-overview workflow-editor-overview--empty", children: _jsxs("div", { className: "workflow-editor-overview-cta", children: [_jsx("div", { className: "workflow-editor-overview-cta__art", children: _jsx(Save, { size: 26 }) }), _jsxs("div", { className: "workflow-editor-overview-cta__copy", children: [_jsx("h2", { children: "Save this workflow to unlock the overview." }), _jsx("p", { children: "Once this definition exists, the overview tab will switch to execution analytics, KPI summaries, and date-based filtering." })] }), _jsxs("div", { className: "workflow-editor-overview-cta__actions", children: [_jsx(SolidButton, { leftIcon: _jsx(Save, { size: 16 }), onClick: handleSave, children: "Save Workflow" }), _jsx(SolidButton, { variant: "outline", onClick: function () { return setDetailTab("edit"); }, children: "Continue Editing" })] })] }) })) : !hasExecutions ? (_jsxs("div", { className: "workflow-editor-overview workflow-editor-overview--empty", children: [_jsxs("div", { className: "workflow-editor-overview-cta", children: [_jsx("div", { className: "workflow-editor-overview-cta__art", children: _jsx(GitBranchPlus, { size: 28 }) }), _jsxs("div", { className: "workflow-editor-overview-cta__copy", children: [_jsx("h2", { children: workflowDisplayName || (record === null || record === void 0 ? void 0 : record.displayName) || workflowKey || "Workflow" }), _jsx("p", { children: "Run the workflow once to unlock execution history, operational KPIs, and workflow activity for this definition." })] }), _jsxs("div", { className: "workflow-editor-overview-cta__actions", children: [_jsx(SolidButton, { leftIcon: _jsx(Play, { size: 16 }), loading: isExecuting, onClick: function () { return void handleExecute(); }, children: "Execute Workflow" }), _jsx(SolidButton, { variant: "outline", onClick: function () { return setDetailTab("edit"); }, children: "Open Builder" })] })] }), _jsxs("div", { className: "workflow-editor-overview-guides", children: [_jsxs("div", { className: "workflow-editor-overview-guide-card", children: [_jsx("h3", { children: "Overview" }), _jsx("p", { children: "Execution KPIs and health snapshots appear here after the first successful run." })] }), _jsxs("div", { className: "workflow-editor-overview-guide-card", children: [_jsx("h3", { children: "Edit" }), _jsx("p", { children: "Refine YAML, topology, nodes, inputs, and triggers inside the builder workspace." })] }), _jsxs("div", { className: "workflow-editor-overview-guide-card", children: [_jsx("h3", { children: "Executions" }), _jsx("p", { children: "Execution history and drill-downs will become available as runs accumulate." })] })] })] })) : (_jsxs("div", { className: "workflow-editor-overview", children: [_jsxs("div", { className: "workflow-editor-overview-filterbar", children: [_jsxs("div", { className: "workflow-editor-overview-filterbar__left", children: [_jsxs("div", { className: "workflow-editor-overview-filter", children: [_jsx("label", { children: "Date From" }), _jsx(SolidDatePicker, { selected: overviewStartDate, onChange: function (date) { return setOverviewStartDate(date); }, placeholderText: "Start date" })] }), _jsxs("div", { className: "workflow-editor-overview-filter", children: [_jsx("label", { children: "Date To" }), _jsx(SolidDatePicker, { selected: overviewEndDate, onChange: function (date) { return setOverviewEndDate(date); }, placeholderText: "End date" })] }), _jsx(SolidButton, { size: "small", variant: "outline", onClick: loadWorkflowExecutions, children: "Apply" }), (overviewStartDate || overviewEndDate) && (_jsx(SolidButton, { size: "small", variant: "ghost", onClick: function () {
|
|
1132
|
-
setOverviewStartDate(null);
|
|
1133
|
-
setOverviewEndDate(null);
|
|
1134
|
-
}, children: "Clear" }))] }), _jsxs("div", { className: "workflow-editor-overview-filterbar__right", children: [_jsx(SolidTag, { children: overviewDateFilterLabel }), _jsx(SolidButton, { size: "small", variant: "outline", leftIcon: _jsx(RefreshCw, { size: 14 }), loading: workflowExecutionsQuery.isFetching, onClick: loadWorkflowExecutions, children: "Refresh" })] })] }), _jsxs("div", { className: "workflow-editor-overview-stats", children: [_jsxs("div", { className: "workflow-editor-overview-stat", children: [_jsx("span", { className: "workflow-editor-overview-stat-label", children: "Success Ratio" }), _jsxs("strong", { className: "workflow-editor-overview-stat-value", children: [executionOverview.successRatio, "%"] }), _jsxs("span", { className: "workflow-editor-overview-stat-meta", children: [executionOverview.success, " successful runs"] })] }), _jsxs("div", { className: "workflow-editor-overview-stat", children: [_jsx("span", { className: "workflow-editor-overview-stat-label", children: "Failed Ratio" }), _jsxs("strong", { className: "workflow-editor-overview-stat-value", children: [executionOverview.failedRatio, "%"] }), _jsxs("span", { className: "workflow-editor-overview-stat-meta", children: [executionOverview.failed, " failed runs"] })] }), _jsxs("div", { className: "workflow-editor-overview-stat", children: [_jsx("span", { className: "workflow-editor-overview-stat-label", children: "In Progress" }), _jsx("strong", { className: "workflow-editor-overview-stat-value", children: executionOverview.inProgress }), _jsx("span", { className: "workflow-editor-overview-stat-meta", children: "Currently running executions" })] }), _jsxs("div", { className: "workflow-editor-overview-stat", children: [_jsx("span", { className: "workflow-editor-overview-stat-label", children: "Pending" }), _jsx("strong", { className: "workflow-editor-overview-stat-value", children: executionOverview.pending }), _jsx("span", { className: "workflow-editor-overview-stat-meta", children: "Created or queued executions" })] })] }), _jsxs("div", { className: "workflow-editor-overview-grid", children: [_jsx(SolidPanel, { header: "Workflow Summary", children: _jsxs("div", { className: "workflow-editor-overview-section", children: [_jsxs("div", { className: "workflow-editor-overview-kv", children: [_jsx("span", { children: "Workflow" }), _jsx("strong", { children: workflowDisplayName || (record === null || record === void 0 ? void 0 : record.displayName) || workflowKey })] }), _jsxs("div", { className: "workflow-editor-overview-kv", children: [_jsx("span", { children: "Total Executions" }), _jsx("strong", { children: (_h = (_g = (_f = workflowExecutionPresenceQuery.data) === null || _f === void 0 ? void 0 : _f.meta) === null || _g === void 0 ? void 0 : _g.totalRecords) !== null && _h !== void 0 ? _h : 0 })] }), _jsxs("div", { className: "workflow-editor-overview-kv", children: [_jsx("span", { children: "Executions In Range" }), _jsx("strong", { children: (_l = (_k = (_j = workflowExecutionsQuery.data) === null || _j === void 0 ? void 0 : _j.meta) === null || _k === void 0 ? void 0 : _k.totalRecords) !== null && _l !== void 0 ? _l : 0 })] }), _jsxs("div", { className: "workflow-editor-overview-kv", children: [_jsx("span", { children: "Average Duration" }), _jsx("strong", { children: formatDurationMs(executionOverview.averageDurationMs) })] }), _jsx("div", { className: "workflow-editor-overview-description", children: workflowDescription ||
|
|
1135
|
-
(record === null || record === void 0 ? void 0 : record.description) ||
|
|
1136
|
-
definitionDraft.description ||
|
|
1137
|
-
"No workflow description has been added yet." })] }) }), _jsx(SolidPanel, { header: "Latest Execution", children: executionOverview.latestExecution ? (_jsxs("div", { className: "workflow-editor-overview-section", children: [_jsxs("div", { className: "workflow-editor-overview-kv", children: [_jsx("span", { children: "Status" }), _jsx("strong", { children: (_m = executionOverview.latestExecution.status) !== null && _m !== void 0 ? _m : "Unknown" })] }), _jsxs("div", { className: "workflow-editor-overview-kv", children: [_jsx("span", { children: "Started" }), _jsx("strong", { children: formatExecutionDate(executionOverview.latestExecution.startedAt) })] }), _jsxs("div", { className: "workflow-editor-overview-kv", children: [_jsx("span", { children: "Finished" }), _jsx("strong", { children: formatExecutionDate(executionOverview.latestExecution.finishedAt) })] }), _jsxs("div", { className: "workflow-editor-overview-kv", children: [_jsx("span", { children: "Trigger Type" }), _jsx("strong", { children: (_o = executionOverview.latestExecution.triggerType) !== null && _o !== void 0 ? _o : "manual" })] })] })) : (_jsx("div", { className: "workflow-editor-empty-state workflow-editor-empty-state--compact", children: "No executions match the current date filter." })) }), _jsx(SolidPanel, { header: "Recent Executions", children: workflowExecutionsQuery.isFetching && !executionRecords.length ? (_jsx("div", { className: "workflow-editor-loading", children: _jsx(SolidSpinner, {}) })) : executionRecords.length ? (_jsx("div", { className: "workflow-editor-overview-list", children: executionRecords.slice(0, 6).map(function (execution, index) {
|
|
1138
|
-
var _a;
|
|
1139
|
-
return (_jsxs("div", { className: "workflow-editor-overview-list-item", children: [_jsx("div", { className: "workflow-editor-overview-list-index", children: index + 1 }), _jsxs("div", { className: "workflow-editor-overview-list-copy", children: [_jsx("strong", { children: (_a = execution.status) !== null && _a !== void 0 ? _a : "Unknown" }), _jsx("span", { children: formatExecutionDate(execution.startedAt || execution.createdAt) })] }), _jsx(SolidTag, { children: formatDurationMs(execution.durationMs) })] }, execution.id));
|
|
1140
|
-
}) })) : (_jsx("div", { className: "workflow-editor-empty-state workflow-editor-empty-state--compact", children: "No executions match the current date filter." })) }), _jsx(SolidPanel, { header: "Actions", children: _jsxs("div", { className: "workflow-editor-overview-actions", children: [_jsx(SolidButton, { leftIcon: _jsx(Play, { size: 16 }), loading: isExecuting, onClick: function () { return void handleExecute(); }, children: "Execute Again" }), _jsx(SolidButton, { variant: "outline", onClick: function () { return setDetailTab("edit"); }, children: "Open Builder" }), _jsx(SolidButton, { variant: "outline", leftIcon: _jsx(Settings2, { size: 16 }), onClick: function () { return setWorkflowSettingsOpen(true); }, children: "Workflow Settings" })] }) })] })] }));
|
|
1141
|
-
var hasTopologyGraph = definitionDraft.nodes.length || ((_q = (_p = definitionDraft.triggers) === null || _p === void 0 ? void 0 : _p.length) !== null && _q !== void 0 ? _q : 0) > 0;
|
|
1142
|
-
var topologyCanvasView = hasTopologyGraph ? (_jsx("div", { className: "workflow-editor-canvas-shell workflow-editor-canvas-shell--readonly", children: _jsx(WorkflowFlowCanvas, { definition: definitionDraft, nodeTypes: nodeTypes, selectedNodeId: selectedNodeId, selectedTriggerId: selectedTriggerId, onSelectNode: function (nodeId) {
|
|
1143
|
-
setSelectedNodeId(nodeId);
|
|
1144
|
-
setSelectedTriggerId("");
|
|
1145
|
-
var node = findNodeById(definitionDraft.nodes, nodeId);
|
|
1146
|
-
if (node === null || node === void 0 ? void 0 : node.type) {
|
|
1147
|
-
setDocsNodeTypeKey(node.type);
|
|
1148
|
-
}
|
|
1149
|
-
}, onSelectTrigger: function (triggerId) {
|
|
1150
|
-
setSelectedTriggerId(triggerId);
|
|
1151
|
-
setSelectedNodeId("");
|
|
1152
|
-
setDocsNodeTypeKey("");
|
|
1153
|
-
}, onEditNode: function () { }, onDeleteNode: function () { }, onViewDocs: function (nodeId) {
|
|
1154
|
-
var node = findNodeById(definitionDraft.nodes, nodeId);
|
|
1155
|
-
if (node === null || node === void 0 ? void 0 : node.type) {
|
|
1156
|
-
setSelectedNodeId(nodeId);
|
|
1157
|
-
setSelectedTriggerId("");
|
|
1158
|
-
setDocsNodeTypeKey(node.type);
|
|
1159
|
-
setTopologyDocsNodeTypeKey(node.type);
|
|
1160
|
-
setTopologyDocsModel(undefined);
|
|
1161
|
-
setTopologyDocsOpen(true);
|
|
1162
|
-
}
|
|
1163
|
-
}, onViewTriggerDocs: function (triggerId) {
|
|
1164
|
-
var _a;
|
|
1165
|
-
var trigger = ((_a = definitionDraft.triggers) !== null && _a !== void 0 ? _a : []).find(function (item) { return String(item.id) === triggerId; });
|
|
1166
|
-
setSelectedTriggerId(triggerId);
|
|
1167
|
-
setSelectedNodeId("");
|
|
1168
|
-
setDocsNodeTypeKey("");
|
|
1169
|
-
setTopologyDocsNodeTypeKey("");
|
|
1170
|
-
setTopologyDocsModel(trigger ? buildTriggerDocsModel(trigger) : undefined);
|
|
1171
|
-
setTopologyDocsOpen(true);
|
|
1172
|
-
}, onInsertNode: function () { }, onAddBranch: function () { }, readOnly: true }) })) : (_jsxs("div", { className: "workflow-editor-placeholder workflow-editor-placeholder--topology", children: [_jsx("div", { className: "workflow-editor-placeholder__icon", children: _jsx(Activity, { size: 20 }) }), _jsxs("div", { className: "workflow-editor-placeholder__copy", children: [_jsx("h3", { children: "Topology" }), _jsx("p", { children: "Save or add workflow nodes to generate a read-only topology view." })] })] }));
|
|
1173
|
-
var topologyYamlEditorView = (_jsxs("div", { className: "workflow-editor-topology-code", children: [_jsxs("div", { className: "workflow-editor-topology-code__header", children: [_jsx("span", { children: "Definition YAML" }), codeError ? (_jsx(SolidTag, { tone: "danger", children: "Invalid" })) : (_jsx(SolidTag, { tone: "success", children: "Synced" }))] }), _jsx(SolidCodeEditor, { language: "yaml", height: "100%", fontSize: 12, value: codeValue, onChange: handleCodeChange }), codeError ? _jsx("div", { className: "workflow-editor-error", children: codeError }) : null] }));
|
|
1174
|
-
var topologyContent = (_jsxs("div", { className: "workflow-editor-topology-tab", children: [_jsxs("div", { className: "workflow-editor-topology-actionbar", children: [_jsx("div", { className: "workflow-editor-topology-actionbar__spacer" }), _jsxs("div", { className: "workflow-editor-view-toggle", "aria-label": "Topology views", children: [_jsx("button", { type: "button", className: "workflow-editor-view-toggle__button ".concat(topologyViewOpen ? "is-active" : ""), "aria-label": topologyViewOpen ? "Hide topology view" : "Show topology view", title: topologyViewOpen ? "Hide topology view" : "Show topology view", onClick: function () { return setTopologyViewOpen(function (current) { return !current; }); }, children: _jsx(Layers3, { size: 14 }) }), _jsx("button", { type: "button", className: "workflow-editor-view-toggle__button ".concat(topologyYamlViewOpen ? "is-active" : ""), "aria-label": topologyYamlViewOpen ? "Hide YAML editor" : "Show YAML editor", title: topologyYamlViewOpen ? "Hide YAML editor" : "Show YAML editor", onClick: function () { return setTopologyYamlViewOpen(function (current) { return !current; }); }, children: _jsx(Braces, { size: 14 }) })] })] }), topologyViewOpen && topologyYamlViewOpen ? (_jsxs("div", { ref: topologySplitRef, className: "workflow-editor-topology-split", style: {
|
|
1175
|
-
gridTemplateColumns: "".concat(topologySplitPercent, "% 0.45rem minmax(0, 1fr)"),
|
|
1176
|
-
}, children: [_jsx("div", { className: "workflow-editor-topology-pane", children: topologyCanvasView }), _jsx("div", { className: "workflow-editor-topology-resizer", role: "separator", "aria-orientation": "vertical", "aria-label": "Resize topology and YAML views", onMouseDown: startTopologySplitResize }), _jsx("div", { className: "workflow-editor-topology-pane", children: topologyYamlEditorView })] })) : topologyViewOpen ? (_jsx("div", { className: "workflow-editor-topology-single", children: topologyCanvasView })) : topologyYamlViewOpen ? (_jsx("div", { className: "workflow-editor-topology-single", children: topologyYamlEditorView })) : (_jsxs("div", { className: "workflow-editor-placeholder", children: [_jsx("div", { className: "workflow-editor-placeholder__icon", children: _jsx(Layers3, { size: 20 }) }), _jsxs("div", { className: "workflow-editor-placeholder__copy", children: [_jsx("h3", { children: "No topology view selected" }), _jsx("p", { children: "Use the view toggles above to show the topology canvas or YAML editor." })] })] }))] }));
|
|
1177
|
-
var detailTabs = [
|
|
1178
|
-
{ value: "overview", label: "Overview", content: overviewContent },
|
|
1179
|
-
{
|
|
1180
|
-
value: "topology",
|
|
1181
|
-
label: "Topology",
|
|
1182
|
-
content: topologyContent,
|
|
1183
|
-
},
|
|
1184
|
-
{
|
|
1185
|
-
value: "executions",
|
|
1186
|
-
label: "Executions",
|
|
1187
|
-
content: renderPlaceholderTab("Executions", "Execution history and drill-downs will land here in the next pass."),
|
|
1188
|
-
},
|
|
1189
|
-
{ value: "edit", label: "Edit", content: null },
|
|
1190
|
-
{
|
|
1191
|
-
value: "revisions",
|
|
1192
|
-
label: "Revisions",
|
|
1193
|
-
content: renderPlaceholderTab("Revisions", "Revision history is not wired yet, but the tab shell is ready."),
|
|
1194
|
-
},
|
|
1195
|
-
{
|
|
1196
|
-
value: "triggers",
|
|
1197
|
-
label: "Triggers",
|
|
1198
|
-
content: renderPlaceholderTab("Triggers", "Trigger management will be added here after the overview pass is settled."),
|
|
1199
|
-
},
|
|
1200
|
-
{
|
|
1201
|
-
value: "logs",
|
|
1202
|
-
label: "Logs",
|
|
1203
|
-
content: renderPlaceholderTab("Logs", "Workflow-level log browsing will be added in a later pass."),
|
|
1204
|
-
},
|
|
1205
|
-
{
|
|
1206
|
-
value: "metrics",
|
|
1207
|
-
label: "Metrics",
|
|
1208
|
-
content: renderPlaceholderTab("Metrics", "Metrics will appear here once the backing persistence is introduced."),
|
|
1209
|
-
},
|
|
1210
|
-
];
|
|
1211
|
-
if (isWorkflowDefinitionLoading || isNodeTypesLoading) {
|
|
1212
|
-
return (_jsx("div", { className: "workflow-editor-page workflow-editor-page--loading", children: _jsx(SolidSpinner, {}) }));
|
|
1213
|
-
}
|
|
1214
|
-
if (isNodeTypesError) {
|
|
1215
|
-
return (_jsx("div", { className: "workflow-editor-page", children: _jsx("div", { className: "workflow-editor-empty-state", children: "Failed to load workflow node types." }) }));
|
|
1216
|
-
}
|
|
1217
|
-
return (_jsxs("div", { className: "workflow-editor-page", children: [_jsxs("div", { className: "workflow-editor-header", children: [_jsx("div", { className: "workflow-editor-header-main", children: _jsx(SolidButton, { size: "small", variant: "ghost", leftIcon: _jsx(ArrowLeft, { size: 16 }), onClick: function () {
|
|
1218
|
-
return navigate("/admin/core/".concat(moduleName, "/workflow-definition/list"));
|
|
1219
|
-
}, children: "Back" }) }), _jsxs("div", { className: "workflow-editor-header-actions", children: [_jsx(SolidButton, { size: "small", variant: "outline", leftIcon: _jsx(Settings2, { size: 16 }), onClick: function () { return setWorkflowSettingsOpen(true); }, children: "Workflow" }), _jsx(SolidButton, { size: "small", variant: "outline", leftIcon: _jsx(BookOpen, { size: 16 }), onClick: function () {
|
|
1220
|
-
setDetailTab("edit");
|
|
1221
|
-
setDocsOpen(true);
|
|
1222
|
-
setActivePanel("docs");
|
|
1223
|
-
}, children: "Docs" }), _jsx(SolidButton, { size: "small", variant: "outline", leftIcon: _jsx(ShieldCheck, { size: 16 }), loading: isServerValidating, onClick: function () { return void validateCurrentDefinition({ showSuccessToast: true }); }, children: "Validate" }), _jsx(SolidButton, { size: "small", variant: "outline", leftIcon: _jsx(Play, { size: 16 }), loading: isExecuting, onClick: function () { return void handleExecute(); }, children: "Run" }), _jsx(SolidButton, { size: "small", leftIcon: _jsx(Save, { size: 16 }), loading: isSaving || isCreating, onClick: handleSave, children: "Save" })] })] }), _jsx("div", { className: "workflow-editor-detail-tabs", children: _jsx(SolidTabGroup, { tabs: detailTabs.map(function (tab) { return ({
|
|
1224
|
-
value: tab.value,
|
|
1225
|
-
label: tab.label,
|
|
1226
|
-
content: tab.value === "edit" ? null : tab.content,
|
|
1227
|
-
}); }), value: detailTab, onValueChange: function (value) { return setDetailTab(value); }, listClassName: "workflow-editor-detail-tabs__list", panelClassName: "workflow-editor-detail-tabs__panel" }) }), detailTab === "edit" ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "workflow-editor-focus-switcher", children: ["flow", "code", "docs"].map(function (panel) { return (_jsx("button", { type: "button", className: "workflow-editor-focus-pill ".concat(activePanel === panel ? "is-active" : ""), onClick: function () { return setActivePanel(panel); }, children: panel === "flow" ? "Flow" : panel === "code" ? "Code" : "Docs" }, panel)); }) }), _jsxs("div", { className: "workflow-editor-shell workflow-editor-shell--two-panel ".concat(codePaneOpen ? "workflow-editor-shell--code-open" : "workflow-editor-shell--code-collapsed"), children: [_jsxs("section", { className: "workflow-editor-surface workflow-editor-surface--code ".concat(activePanel === "code" ? "is-active" : ""), children: [_jsxs("div", { className: "workflow-editor-surface-header", children: [_jsxs("div", { children: [_jsx("div", { className: "workflow-editor-surface-eyebrow", children: "Code" }), _jsx("h2", { className: "workflow-editor-surface-title", children: "Definition YAML" })] }), codeError ? (_jsx(SolidTag, { tone: "danger", children: "Invalid YAML" })) : (_jsx(SolidTag, { tone: "success", children: "Synced" }))] }), _jsxs("div", { className: "workflow-editor-surface-body", children: [_jsxs(SolidPanel, { header: "Workflow Identity", children: [_jsxs("div", { className: "workflow-editor-form-grid", children: [_jsxs("div", { className: "workflow-editor-field", children: [_jsx("label", { children: "Key" }), _jsx(SolidInput, { value: workflowKey, onChange: function (event) { return setWorkflowKey(event.target.value); } })] }), _jsxs("div", { className: "workflow-editor-field", children: [_jsx("label", { children: "Display Name" }), _jsx(SolidInput, { value: workflowDisplayName, onChange: function (event) { return setWorkflowDisplayName(event.target.value); } })] })] }), _jsxs("div", { className: "workflow-editor-field", children: [_jsx("label", { children: "Description" }), _jsx(SolidTextarea, { value: workflowDescription, onChange: function (event) { return setWorkflowDescription(event.target.value); } })] })] }), _jsxs(SolidPanel, { header: "Definition YAML", children: [_jsx(SolidCodeEditor, { language: "yaml", height: "calc(100vh - 390px)", value: codeValue, onChange: handleCodeChange }), codeError ? (_jsx("div", { className: "workflow-editor-error", children: codeError })) : null] })] })] }), _jsxs("section", { className: "workflow-editor-surface workflow-editor-surface--flow ".concat(activePanel !== "code" ? "is-active" : ""), children: [_jsxs("div", { className: "workflow-editor-surface-header", children: [_jsxs("div", { className: "workflow-editor-flow-header-main", children: [_jsx("div", { className: "workflow-editor-surface-eyebrow", children: "Flow" }), _jsxs("div", { className: "workflow-editor-flow-header-title-row", children: [_jsx("h2", { className: "workflow-editor-surface-title", children: "Topology Builder" }), _jsx(SolidTag, { tone: validationTag.tone, children: validationTag.label }), _jsxs(SolidTag, { children: [workflowStats.nodeCount, " nodes"] }), workflowStats.triggerCount ? (_jsxs(SolidTag, { children: [workflowStats.triggerCount, " triggers"] })) : null, (paletteNodeType === null || paletteNodeType === void 0 ? void 0 : paletteNodeType.label) ? (_jsx(SolidTag, { children: paletteNodeType.label })) : null] }), _jsx("div", { className: "workflow-editor-flow-header-selection", children: selectedNode && selectedNodeType ? (_jsxs(_Fragment, { children: [_jsx("strong", { children: (_r = selectedNode.name) !== null && _r !== void 0 ? _r : selectedNode.id }), _jsx("span", { className: "workflow-editor-node-card-subtitle", children: (_s = selectedNodeType.label) !== null && _s !== void 0 ? _s : selectedNode.type })] })) : selectedTrigger ? (_jsxs(_Fragment, { children: [_jsx("strong", { children: (_u = (_t = selectedTrigger.label) !== null && _t !== void 0 ? _t : selectedTrigger.name) !== null && _u !== void 0 ? _u : selectedTrigger.id }), _jsx("span", { className: "workflow-editor-node-card-subtitle", children: (_v = selectedTrigger.type) !== null && _v !== void 0 ? _v : "Trigger" })] })) : (_jsx("span", { className: "workflow-editor-flow-toolbar__empty", children: "Select a node or trigger to inspect it." })) })] }), _jsxs("div", { className: "workflow-editor-surface-header-actions", children: [_jsx(SolidButton, { size: "small", variant: "outline", leftIcon: codePaneOpen ? (_jsx(ChevronLeft, { size: 14 })) : (_jsx(ChevronRight, { size: 14 })), onClick: function () { return setCodePaneOpen(function (current) { return !current; }); }, children: codePaneOpen ? "Hide code" : "Show code" }), _jsx(SolidButton, { size: "small", variant: "outline", leftIcon: _jsx(Braces, { size: 14 }), onClick: function () {
|
|
1228
|
-
setCodePaneOpen(true);
|
|
1229
|
-
setActivePanel("code");
|
|
1230
|
-
}, children: "Code" }), _jsx(SolidButton, { size: "small", variant: "outline", leftIcon: _jsx(Layers3, { size: 14 }), onClick: function () { return setToolsOpen(function (current) { return !current; }); }, children: toolsOpen ? "Hide library" : "Library" }), _jsx(SolidButton, { size: "small", variant: "outline", leftIcon: _jsx(BookOpen, { size: 14 }), onClick: function () {
|
|
1231
|
-
setDocsOpen(true);
|
|
1232
|
-
setActivePanel("docs");
|
|
1233
|
-
}, children: docsNodeType || docsModel ? "View docs" : "Open docs" }), _jsx(SolidButton, { size: "small", variant: "outline", leftIcon: _jsx(Settings2, { size: 14 }), onClick: function () { return setWorkflowSettingsOpen(true); }, children: "Workflow" })] })] }), _jsx("div", { className: "workflow-editor-surface-body workflow-editor-surface-body--flow", children: _jsxs("div", { className: "workflow-editor-flow-workspace", children: [toolsOpen ? (_jsxs("aside", { className: "workflow-editor-tools-drawer", children: [_jsxs("div", { className: "workflow-editor-tools-drawer__header", children: [_jsxs("div", { children: [_jsx("div", { className: "workflow-editor-surface-eyebrow", children: "Builder Tools" }), _jsx("h3", { className: "workflow-editor-surface-title", children: "Node Library & Inspector" })] }), _jsx(SolidButton, { size: "small", variant: "ghost", onClick: function () { return setToolsOpen(false); }, children: _jsx(X, { size: 16 }) })] }), _jsxs("div", { className: "workflow-editor-tools-drawer__body", children: [_jsx(SolidPanel, { header: "Node Types", children: _jsx(WorkflowNodePalette, { nodeTypes: nodeTypes, value: paletteNodeType === null || paletteNodeType === void 0 ? void 0 : paletteNodeType.type, onSelect: function (nodeType) {
|
|
1234
|
-
setPaletteNodeTypeKey(nodeType.type);
|
|
1235
|
-
setDocsNodeTypeKey(nodeType.type);
|
|
1236
|
-
} }) }), _jsx(SolidPanel, { header: "Selection", children: selectedNode && selectedNodeType ? (_jsxs("div", { className: "workflow-editor-selected-node-summary", children: [_jsxs("div", { children: [_jsx("strong", { children: (_w = selectedNode.name) !== null && _w !== void 0 ? _w : selectedNode.id }), _jsx("div", { className: "workflow-editor-node-card-subtitle", children: (_x = selectedNodeType.label) !== null && _x !== void 0 ? _x : selectedNode.type })] }), _jsxs("div", { className: "workflow-editor-selected-node-actions", children: [_jsx(SolidButton, { size: "small", variant: "outline", onClick: function () {
|
|
1237
|
-
setDocsNodeTypeKey(selectedNode.type);
|
|
1238
|
-
setDocsOpen(true);
|
|
1239
|
-
setActivePanel("docs");
|
|
1240
|
-
}, children: "Docs" }), _jsx(SolidButton, { size: "small", onClick: function () { return setEditorOpen(true); }, children: "Edit" })] })] })) : selectedTrigger ? (_jsxs("div", { className: "workflow-editor-selected-node-summary", children: [_jsxs("div", { children: [_jsx("strong", { children: (_z = (_y = selectedTrigger.label) !== null && _y !== void 0 ? _y : selectedTrigger.name) !== null && _z !== void 0 ? _z : selectedTrigger.id }), _jsx("div", { className: "workflow-editor-node-card-subtitle", children: (_0 = selectedTrigger.type) !== null && _0 !== void 0 ? _0 : "Trigger" })] }), _jsxs("div", { className: "workflow-editor-selected-node-actions", children: [_jsx(SolidButton, { size: "small", variant: "outline", onClick: function () {
|
|
1241
|
-
setDocsOpen(true);
|
|
1242
|
-
setActivePanel("docs");
|
|
1243
|
-
}, children: "Docs" }), _jsx(SolidButton, { size: "small", onClick: function () { return setWorkflowSettingsOpen(true); }, children: "Workflow" })] })] })) : (_jsx("div", { className: "workflow-editor-empty-state workflow-editor-empty-state--compact", children: "Select a node or trigger on the canvas to inspect it." })) }), _jsx(SolidPanel, { header: "Validation", children: _jsxs("div", { className: "workflow-editor-validation-summary", children: [_jsx("div", { className: "workflow-editor-validation-state workflow-editor-validation-state--".concat(validationState.status), children: (_1 = validationState.message) !== null && _1 !== void 0 ? _1 : "Validation has not been run yet." }), validationState.errors.length ? (_jsx("ul", { className: "workflow-editor-validation-list", children: validationState.errors.map(function (error) { return (_jsx("li", { children: error }, error)); }) })) : null] }) })] })] })) : null, _jsx("div", { className: "workflow-editor-flow-main", children: _jsx("div", { className: "workflow-editor-canvas-shell", children: _jsx(WorkflowFlowCanvas, { definition: definitionDraft, nodeTypes: nodeTypes, selectedNodeId: selectedNodeId, selectedTriggerId: selectedTriggerId, activePaletteNodeType: paletteNodeType, onSelectNode: function (nodeId) {
|
|
1244
|
-
setSelectedNodeId(nodeId);
|
|
1245
|
-
setSelectedTriggerId("");
|
|
1246
|
-
var node = findNodeById(definitionDraft.nodes, nodeId);
|
|
1247
|
-
if (node === null || node === void 0 ? void 0 : node.type) {
|
|
1248
|
-
setDocsNodeTypeKey(node.type);
|
|
1249
|
-
}
|
|
1250
|
-
}, onSelectTrigger: function (triggerId) {
|
|
1251
|
-
setSelectedTriggerId(triggerId);
|
|
1252
|
-
setSelectedNodeId("");
|
|
1253
|
-
setDocsNodeTypeKey("");
|
|
1254
|
-
}, onEditNode: function (nodeId) {
|
|
1255
|
-
setSelectedNodeId(nodeId);
|
|
1256
|
-
setSelectedTriggerId("");
|
|
1257
|
-
var node = findNodeById(definitionDraft.nodes, nodeId);
|
|
1258
|
-
if (node === null || node === void 0 ? void 0 : node.type) {
|
|
1259
|
-
setDocsNodeTypeKey(node.type);
|
|
1260
|
-
}
|
|
1261
|
-
setEditorOpen(true);
|
|
1262
|
-
}, onDeleteNode: handleRemoveNode, onViewDocs: function (nodeId) {
|
|
1263
|
-
var node = findNodeById(definitionDraft.nodes, nodeId);
|
|
1264
|
-
if (node === null || node === void 0 ? void 0 : node.type) {
|
|
1265
|
-
setSelectedNodeId(nodeId);
|
|
1266
|
-
setDocsNodeTypeKey(node.type);
|
|
1267
|
-
setDocsOpen(true);
|
|
1268
|
-
setActivePanel("docs");
|
|
1269
|
-
}
|
|
1270
|
-
}, onViewTriggerDocs: function (triggerId) {
|
|
1271
|
-
setSelectedTriggerId(triggerId);
|
|
1272
|
-
setSelectedNodeId("");
|
|
1273
|
-
setDocsNodeTypeKey("");
|
|
1274
|
-
setDocsOpen(true);
|
|
1275
|
-
setActivePanel("docs");
|
|
1276
|
-
}, onInsertNode: handleInsertNode, onAddBranch: handleAddBranch }) }) })] }) }), docsOpen ? (_jsxs("aside", { className: "workflow-editor-docs-drawer ".concat(activePanel === "docs" ? "is-active" : ""), children: [_jsxs("div", { className: "workflow-editor-docs-drawer__header", children: [_jsxs("div", { children: [_jsx("div", { className: "workflow-editor-surface-eyebrow", children: "Docs" }), _jsx("h3", { className: "workflow-editor-surface-title", children: (_3 = (_2 = docsNodeType === null || docsNodeType === void 0 ? void 0 : docsNodeType.label) !== null && _2 !== void 0 ? _2 : docsModel === null || docsModel === void 0 ? void 0 : docsModel.title) !== null && _3 !== void 0 ? _3 : "Documentation" })] }), _jsx(SolidButton, { size: "small", variant: "ghost", onClick: function () { return setDocsOpen(false); }, children: _jsx(X, { size: 16 }) })] }), _jsx("div", { className: "workflow-editor-docs-drawer__body", children: docsNodeType || docsModel ? (_jsx(WorkflowNodeDocsPanel, { nodeType: docsNodeType, docsModel: docsModel })) : (_jsx("div", { className: "workflow-editor-empty-state", children: "Pick a node, trigger, or workflow surface to open its documentation." })) })] })) : null] })] })] })) : null, selectedNode && selectedNodeType ? (_jsx(WorkflowNodeEditorDialog, { open: editorOpen, onOpenChange: setEditorOpen, nodeType: selectedNodeType, nodeValue: selectedNode, onNodeSubmit: function (nextValue) {
|
|
1277
|
-
handleUpdateSelectedNode(nextValue);
|
|
1278
|
-
setEditorOpen(false);
|
|
1279
|
-
}, title: "".concat((_4 = selectedNode.name) !== null && _4 !== void 0 ? _4 : selectedNode.id, " \u00B7 ").concat((_5 = selectedNodeType.label) !== null && _5 !== void 0 ? _5 : selectedNodeType.type) })) : null, _jsx(SolidDialog, { open: topologyDocsOpen, onOpenChange: function (open) {
|
|
1280
|
-
setTopologyDocsOpen(open);
|
|
1281
|
-
if (!open) {
|
|
1282
|
-
setTopologyDocsNodeTypeKey("");
|
|
1283
|
-
setTopologyDocsModel(undefined);
|
|
1284
|
-
}
|
|
1285
|
-
}, header: "Node Documentation", className: "workflow-editor-topology-docs-dialog", style: { width: "min(920px, 94vw)", maxWidth: "96vw" }, children: _jsx(SolidDialogBody, { children: _jsx("div", { className: "workflow-editor-topology-docs-dialog__body", children: topologyDocsNodeType || topologyDocsModel ? (_jsx(WorkflowNodeDocsPanel, { nodeType: topologyDocsNodeType, docsModel: topologyDocsModel })) : (_jsx("div", { className: "workflow-editor-empty-state workflow-editor-empty-state--compact", children: "Documentation is not available for this topology item yet." })) }) }) }), _jsxs(SolidDialog, { open: workflowSettingsOpen, onOpenChange: setWorkflowSettingsOpen, header: "Workflow Settings", className: "solid-workflow-node-editor-dialog solid-workflow-node-editor-dialog--full", style: { width: "min(1200px, 94vw)", maxWidth: "96vw" }, children: [_jsx(SolidDialogBody, { children: _jsxs("div", { className: "workflow-editor-workflow-settings", children: [_jsxs(SolidPanel, { header: "Workflow Identity", children: [_jsxs("div", { className: "workflow-editor-form-grid", children: [_jsxs("div", { className: "workflow-editor-field", children: [_jsx("label", { children: "Key" }), _jsx(SolidInput, { value: workflowKey, onChange: function (event) { return setWorkflowKey(event.target.value); } })] }), _jsxs("div", { className: "workflow-editor-field", children: [_jsx("label", { children: "Display Name" }), _jsx(SolidInput, { value: workflowDisplayName, onChange: function (event) { return setWorkflowDisplayName(event.target.value); } })] })] }), _jsxs("div", { className: "workflow-editor-field", children: [_jsx("label", { children: "Description" }), _jsx(SolidTextarea, { value: workflowDescription, onChange: function (event) { return setWorkflowDescription(event.target.value); } })] })] }), _jsx(SolidPanel, { header: "Inputs", children: _jsx(SolidCodeEditor, { language: "yaml", height: "220px", value: workflowInputsValue, onChange: function (value) { return setWorkflowInputsValue(value !== null && value !== void 0 ? value : "{}"); } }) }), _jsx(SolidPanel, { header: "Variables", children: _jsx(SolidCodeEditor, { language: "yaml", height: "220px", value: workflowVariablesValue, onChange: function (value) { return setWorkflowVariablesValue(value !== null && value !== void 0 ? value : "{}"); } }) }), _jsx(SolidPanel, { header: "Triggers", children: _jsx(SolidCodeEditor, { language: "yaml", height: "260px", value: workflowTriggersValue, onChange: function (value) { return setWorkflowTriggersValue(value !== null && value !== void 0 ? value : "[]"); } }) })] }) }), _jsxs(SolidDialogFooter, { children: [_jsx(SolidButton, { variant: "secondary", onClick: function () { return setWorkflowSettingsOpen(false); }, children: "Cancel" }), _jsx(SolidButton, { onClick: handleSaveWorkflowSettings, children: "Apply" })] })] })] }));
|
|
1286
|
-
}
|
|
1287
|
-
//# sourceMappingURL=WorkflowDefinitionEditorPage.js.map
|