@webiny/app-workflows 6.3.0 → 6.4.0-beta.1
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/Components/AdminConfig/WorkflowsMenu.js +18 -19
- package/Components/AdminConfig/WorkflowsMenu.js.map +1 -1
- package/Components/App/ContentReviews.js +24 -25
- package/Components/App/ContentReviews.js.map +1 -1
- package/Components/App/WorkflowsAdminApp.js +5 -10
- package/Components/App/WorkflowsAdminApp.js.map +1 -1
- package/Components/App/index.js +0 -2
- package/Components/Common/Options/OptionItem/Approve.js +16 -20
- package/Components/Common/Options/OptionItem/Approve.js.map +1 -1
- package/Components/Common/Options/OptionItem/OpenInNewWindow.js +3 -6
- package/Components/Common/Options/OptionItem/OpenInNewWindow.js.map +1 -1
- package/Components/Common/Options/OptionItem/Reject.js +16 -20
- package/Components/Common/Options/OptionItem/Reject.js.map +1 -1
- package/Components/Common/Options/OptionItem/Start.js +15 -19
- package/Components/Common/Options/OptionItem/Start.js.map +1 -1
- package/Components/Common/Options/OptionItem/TakeOver.js +15 -19
- package/Components/Common/Options/OptionItem/TakeOver.js.map +1 -1
- package/Components/Common/Options/WorkflowStateOptions.js +57 -58
- package/Components/Common/Options/WorkflowStateOptions.js.map +1 -1
- package/Components/Common/Options/index.js +0 -2
- package/Components/Common/TagState.js +9 -10
- package/Components/Common/TagState.js.map +1 -1
- package/Components/Common/TagStep.js +9 -10
- package/Components/Common/TagStep.js.map +1 -1
- package/Components/Common/YouCanTrackAllContentReviewsHere.js +8 -9
- package/Components/Common/YouCanTrackAllContentReviewsHere.js.map +1 -1
- package/Components/Common/index.js +0 -2
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarApproved.js +15 -23
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarApproved.js.map +1 -1
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarCancelReview.js +15 -23
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarCancelReview.js.map +1 -1
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarError.js +14 -23
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarError.js.map +1 -1
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarLoading.js +10 -18
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarLoading.js.map +1 -1
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarRejected.js +22 -30
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarRejected.js.map +1 -1
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarRequestReview.js +13 -21
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarRequestReview.js.map +1 -1
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarReview.js +30 -51
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarReview.js.map +1 -1
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarStartReview.js +17 -25
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarStartReview.js.map +1 -1
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarWorkflow.js +7 -15
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarWorkflow.js.map +1 -1
- package/Components/WorkflowState/Bar/Dialogs/ApproveDialog.js +13 -16
- package/Components/WorkflowState/Bar/Dialogs/ApproveDialog.js.map +1 -1
- package/Components/WorkflowState/Bar/Dialogs/ApproveSuccessDialog.js +11 -14
- package/Components/WorkflowState/Bar/Dialogs/ApproveSuccessDialog.js.map +1 -1
- package/Components/WorkflowState/Bar/Dialogs/CancelReviewDialog.js +10 -11
- package/Components/WorkflowState/Bar/Dialogs/CancelReviewDialog.js.map +1 -1
- package/Components/WorkflowState/Bar/Dialogs/CommentDialog.js +11 -14
- package/Components/WorkflowState/Bar/Dialogs/CommentDialog.js.map +1 -1
- package/Components/WorkflowState/Bar/Dialogs/RejectDialog.js +13 -16
- package/Components/WorkflowState/Bar/Dialogs/RejectDialog.js.map +1 -1
- package/Components/WorkflowState/Bar/Dialogs/RejectSuccessDialog.js +11 -14
- package/Components/WorkflowState/Bar/Dialogs/RejectSuccessDialog.js.map +1 -1
- package/Components/WorkflowState/Bar/Dialogs/RequestReviewDialog.js +10 -11
- package/Components/WorkflowState/Bar/Dialogs/RequestReviewDialog.js.map +1 -1
- package/Components/WorkflowState/Bar/Dialogs/StartDialog.js +13 -16
- package/Components/WorkflowState/Bar/Dialogs/StartDialog.js.map +1 -1
- package/Components/WorkflowState/Bar/Dialogs/StartSuccessDialog.js +11 -14
- package/Components/WorkflowState/Bar/Dialogs/StartSuccessDialog.js.map +1 -1
- package/Components/WorkflowState/Bar/Dialogs/TakeOverDialog.js +15 -18
- package/Components/WorkflowState/Bar/Dialogs/TakeOverDialog.js.map +1 -1
- package/Components/WorkflowState/Bar/Dialogs/TakeOverSuccessDialog.js +11 -14
- package/Components/WorkflowState/Bar/Dialogs/TakeOverSuccessDialog.js.map +1 -1
- package/Components/WorkflowState/Bar/Dialogs/index.js +0 -2
- package/Components/WorkflowState/Bar/WorkflowStateBar.js +13 -20
- package/Components/WorkflowState/Bar/WorkflowStateBar.js.map +1 -1
- package/Components/WorkflowState/Bar/WorkflowStateBarComponent.js +10 -18
- package/Components/WorkflowState/Bar/WorkflowStateBarComponent.js.map +1 -1
- package/Components/WorkflowState/Bar/WorkflowStateBarDialogs.js +51 -52
- package/Components/WorkflowState/Bar/WorkflowStateBarDialogs.js.map +1 -1
- package/Components/WorkflowState/Bar/index.js +0 -2
- package/Components/WorkflowState/Overlay/WorkflowStateOverlay.js +7 -11
- package/Components/WorkflowState/Overlay/WorkflowStateOverlay.js.map +1 -1
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltip.js +32 -40
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltip.js.map +1 -1
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltipContent.js +30 -36
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltipContent.js.map +1 -1
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltipContentComment.js +17 -21
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltipContentComment.js.map +1 -1
- package/Components/WorkflowState/WorkflowStateProvider.d.ts +1 -0
- package/Components/WorkflowState/WorkflowStateProvider.js +41 -40
- package/Components/WorkflowState/WorkflowStateProvider.js.map +1 -1
- package/Components/WorkflowState/index.js +0 -2
- package/Components/WorkflowState/useWorkflowState.js +5 -6
- package/Components/WorkflowState/useWorkflowState.js.map +1 -1
- package/Components/WorkflowStateDialogs/ApproveDialog.js +43 -44
- package/Components/WorkflowStateDialogs/ApproveDialog.js.map +1 -1
- package/Components/WorkflowStateDialogs/ApproveSuccessDialog.js +27 -29
- package/Components/WorkflowStateDialogs/ApproveSuccessDialog.js.map +1 -1
- package/Components/WorkflowStateDialogs/CancelReviewDialog.js +29 -32
- package/Components/WorkflowStateDialogs/CancelReviewDialog.js.map +1 -1
- package/Components/WorkflowStateDialogs/CommentDialog.js +34 -40
- package/Components/WorkflowStateDialogs/CommentDialog.js.map +1 -1
- package/Components/WorkflowStateDialogs/RejectDialog.js +73 -76
- package/Components/WorkflowStateDialogs/RejectDialog.js.map +1 -1
- package/Components/WorkflowStateDialogs/RejectSuccessDialog.js +25 -27
- package/Components/WorkflowStateDialogs/RejectSuccessDialog.js.map +1 -1
- package/Components/WorkflowStateDialogs/RequestReviewDialog.js +29 -32
- package/Components/WorkflowStateDialogs/RequestReviewDialog.js.map +1 -1
- package/Components/WorkflowStateDialogs/StartDialog.js +29 -33
- package/Components/WorkflowStateDialogs/StartDialog.js.map +1 -1
- package/Components/WorkflowStateDialogs/StartSuccessDialog.js +25 -27
- package/Components/WorkflowStateDialogs/StartSuccessDialog.js.map +1 -1
- package/Components/WorkflowStateDialogs/TakeOverDialog.js +29 -34
- package/Components/WorkflowStateDialogs/TakeOverDialog.js.map +1 -1
- package/Components/WorkflowStateDialogs/TakeOverSuccessDialog.js +25 -27
- package/Components/WorkflowStateDialogs/TakeOverSuccessDialog.js.map +1 -1
- package/Components/WorkflowStateDialogs/index.js +0 -2
- package/Components/WorkflowStateList/List/WorkflowStateList.js +80 -87
- package/Components/WorkflowStateList/List/WorkflowStateList.js.map +1 -1
- package/Components/WorkflowStateList/List/WorkflowStateListFilters.js +67 -61
- package/Components/WorkflowStateList/List/WorkflowStateListFilters.js.map +1 -1
- package/Components/WorkflowStateList/List/WorkflowStateListOptions.js +7 -8
- package/Components/WorkflowStateList/List/WorkflowStateListOptions.js.map +1 -1
- package/Components/WorkflowStateList/List/WorkflowStateListView.js +18 -21
- package/Components/WorkflowStateList/List/WorkflowStateListView.js.map +1 -1
- package/Components/WorkflowStateList/List/index.js +0 -2
- package/Components/WorkflowStateList/Overlay/WorkflowStateListAppOverlay.js +24 -27
- package/Components/WorkflowStateList/Overlay/WorkflowStateListAppOverlay.js.map +1 -1
- package/Components/WorkflowStateList/Overlay/WorkflowStateListAppOverlayView.js +18 -25
- package/Components/WorkflowStateList/Overlay/WorkflowStateListAppOverlayView.js.map +1 -1
- package/Components/WorkflowStateList/Overlay/index.js +0 -2
- package/Components/WorkflowStateList/Provider/WorkflowStateListProvider.js +30 -31
- package/Components/WorkflowStateList/Provider/WorkflowStateListProvider.js.map +1 -1
- package/Components/WorkflowStateList/Provider/index.js +0 -2
- package/Components/WorkflowStateList/hooks/index.js +0 -2
- package/Components/WorkflowStateList/hooks/useWorkflowStateList.js +5 -6
- package/Components/WorkflowStateList/hooks/useWorkflowStateList.js.map +1 -1
- package/Components/WorkflowStateList/index.js +0 -2
- package/Components/WorkflowStatesWidget/Card/WorkflowStatesWidgetCard.js +42 -45
- package/Components/WorkflowStatesWidget/Card/WorkflowStatesWidgetCard.js.map +1 -1
- package/Components/WorkflowStatesWidget/Card/WorkflowStatesWidgetCardTabs.js +43 -53
- package/Components/WorkflowStatesWidget/Card/WorkflowStatesWidgetCardTabs.js.map +1 -1
- package/Components/WorkflowStatesWidget/Dialogs/ApproveDialog.js +18 -21
- package/Components/WorkflowStatesWidget/Dialogs/ApproveDialog.js.map +1 -1
- package/Components/WorkflowStatesWidget/Dialogs/ApproveSuccessDialog.js +10 -13
- package/Components/WorkflowStatesWidget/Dialogs/ApproveSuccessDialog.js.map +1 -1
- package/Components/WorkflowStatesWidget/Dialogs/RejectDialog.js +18 -21
- package/Components/WorkflowStatesWidget/Dialogs/RejectDialog.js.map +1 -1
- package/Components/WorkflowStatesWidget/Dialogs/RejectSuccessDialog.js +10 -13
- package/Components/WorkflowStatesWidget/Dialogs/RejectSuccessDialog.js.map +1 -1
- package/Components/WorkflowStatesWidget/Dialogs/StartDialog.js +18 -21
- package/Components/WorkflowStatesWidget/Dialogs/StartDialog.js.map +1 -1
- package/Components/WorkflowStatesWidget/Dialogs/StartSuccessDialog.js +10 -13
- package/Components/WorkflowStatesWidget/Dialogs/StartSuccessDialog.js.map +1 -1
- package/Components/WorkflowStatesWidget/Dialogs/TakeOverDialog.js +21 -24
- package/Components/WorkflowStatesWidget/Dialogs/TakeOverDialog.js.map +1 -1
- package/Components/WorkflowStatesWidget/Dialogs/TakeOverSuccessDialog.js +10 -13
- package/Components/WorkflowStatesWidget/Dialogs/TakeOverSuccessDialog.js.map +1 -1
- package/Components/WorkflowStatesWidget/Dialogs/index.js +0 -2
- package/Components/WorkflowStatesWidget/List/WorkflowStateList.js +10 -13
- package/Components/WorkflowStatesWidget/List/WorkflowStateList.js.map +1 -1
- package/Components/WorkflowStatesWidget/List/WorkflowStateRow.js +16 -17
- package/Components/WorkflowStatesWidget/List/WorkflowStateRow.js.map +1 -1
- package/Components/WorkflowStatesWidget/List/WorkflowStateRowOptions.js +36 -27
- package/Components/WorkflowStatesWidget/List/WorkflowStateRowOptions.js.map +1 -1
- package/Components/WorkflowStatesWidget/Provider/WorkflowStatesProvider.js +24 -28
- package/Components/WorkflowStatesWidget/Provider/WorkflowStatesProvider.js.map +1 -1
- package/Components/WorkflowStatesWidget/Row/WorkflowStateRowDescription.js +12 -17
- package/Components/WorkflowStatesWidget/Row/WorkflowStateRowDescription.js.map +1 -1
- package/Components/WorkflowStatesWidget/WorkflowStatesOwnWidget.js +22 -20
- package/Components/WorkflowStatesWidget/WorkflowStatesOwnWidget.js.map +1 -1
- package/Components/WorkflowStatesWidget/WorkflowStatesRequestedWidget.js +20 -20
- package/Components/WorkflowStatesWidget/WorkflowStatesRequestedWidget.js.map +1 -1
- package/Components/WorkflowStatesWidget/hooks/useWorkflowStatesWidget.js +5 -6
- package/Components/WorkflowStatesWidget/hooks/useWorkflowStatesWidget.js.map +1 -1
- package/Components/WorkflowStatesWidget/index.js +0 -2
- package/Components/WorkflowsEditor/DataList/WorkflowsDataList.js +34 -40
- package/Components/WorkflowsEditor/DataList/WorkflowsDataList.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/Error/FormattedError.js +28 -33
- package/Components/WorkflowsEditor/Editor/Error/FormattedError.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/Error/WorkflowError.js +28 -35
- package/Components/WorkflowsEditor/Editor/Error/WorkflowError.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormColor.js +11 -17
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormColor.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormDescription.js +8 -9
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormDescription.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormNotifications.js +27 -37
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormNotifications.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormTeams.js +21 -31
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormTeams.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormTitle.js +9 -10
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormTitle.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/Step/InactiveStep.js +14 -15
- package/Components/WorkflowsEditor/Editor/Step/InactiveStep.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/Step/NewStep.js +52 -51
- package/Components/WorkflowsEditor/Editor/Step/NewStep.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/Step/Step/RemoveStep.js +26 -32
- package/Components/WorkflowsEditor/Editor/Step/Step/RemoveStep.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/Step/Step.js +119 -134
- package/Components/WorkflowsEditor/Editor/Step/Step.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/WorkflowEditor.js +37 -38
- package/Components/WorkflowsEditor/Editor/WorkflowEditor.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/WorkflowEditorSteps.js +34 -39
- package/Components/WorkflowsEditor/Editor/WorkflowEditorSteps.js.map +1 -1
- package/Components/WorkflowsEditor/Editor/WorkflowEditorView.js +17 -23
- package/Components/WorkflowsEditor/Editor/WorkflowEditorView.js.map +1 -1
- package/Components/WorkflowsEditor/WorkflowsEditor.js +3 -4
- package/Components/WorkflowsEditor/WorkflowsEditor.js.map +1 -1
- package/Components/WorkflowsEditor/WorkflowsEditorBase.js +26 -33
- package/Components/WorkflowsEditor/WorkflowsEditorBase.js.map +1 -1
- package/Components/WorkflowsEditor/index.js +0 -2
- package/Components/WorkflowsPermissions/HasWorkflowsEditorPermission.js +6 -6
- package/Components/WorkflowsPermissions/HasWorkflowsEditorPermission.js.map +1 -1
- package/Components/WorkflowsPermissions/SecurityPermissions.js +11 -14
- package/Components/WorkflowsPermissions/SecurityPermissions.js.map +1 -1
- package/Components/WorkflowsPermissions/constants.js +2 -1
- package/Components/WorkflowsPermissions/constants.js.map +1 -1
- package/Components/WorkflowsPermissions/index.js +0 -2
- package/Components/WorkflowsPermissions/useWorkflowsPermission.js +13 -22
- package/Components/WorkflowsPermissions/useWorkflowsPermission.js.map +1 -1
- package/Components/helpers/index.js +0 -2
- package/Components/helpers/stateName.js +14 -13
- package/Components/helpers/stateName.js.map +1 -1
- package/Components/helpers/tagStateVariant.js +14 -13
- package/Components/helpers/tagStateVariant.js.map +1 -1
- package/Gateways/WorkflowNotificationTypesGateway.js +24 -23
- package/Gateways/WorkflowNotificationTypesGateway.js.map +1 -1
- package/Gateways/WorkflowStateGateway.js +163 -170
- package/Gateways/WorkflowStateGateway.js.map +1 -1
- package/Gateways/WorkflowStateListGateway.js +87 -80
- package/Gateways/WorkflowStateListGateway.js.map +1 -1
- package/Gateways/WorkflowStatesWidgetGateway.js +124 -123
- package/Gateways/WorkflowStatesWidgetGateway.js.map +1 -1
- package/Gateways/WorkflowsGateway.js +70 -67
- package/Gateways/WorkflowsGateway.js.map +1 -1
- package/Gateways/abstraction/WorkflowNotificationTypesGateway.js +0 -3
- package/Gateways/abstraction/WorkflowStateGateway.js +0 -3
- package/Gateways/abstraction/WorkflowStateListGateway.js +0 -3
- package/Gateways/abstraction/WorkflowStatesWidgetGateway.js +0 -3
- package/Gateways/abstraction/WorkflowsGateway.js +0 -3
- package/Gateways/graphql/workflowNotifications.js +5 -4
- package/Gateways/graphql/workflowNotifications.js.map +1 -1
- package/Gateways/graphql/workflowStates.js +15 -14
- package/Gateways/graphql/workflowStates.js.map +1 -1
- package/Gateways/graphql/workflows.js +8 -7
- package/Gateways/graphql/workflows.js.map +1 -1
- package/Gateways/index.js +0 -2
- package/Models/WorkflowModel.js +61 -70
- package/Models/WorkflowModel.js.map +1 -1
- package/Models/WorkflowStateModel.js +88 -107
- package/Models/WorkflowStateModel.js.map +1 -1
- package/Models/WorkflowStateStepModel.js +41 -40
- package/Models/WorkflowStateStepModel.js.map +1 -1
- package/Models/WorkflowStepModel.js +26 -25
- package/Models/WorkflowStepModel.js.map +1 -1
- package/Models/abstractions/WorkflowModel.js +0 -3
- package/Models/abstractions/WorkflowStateModel.js +0 -3
- package/Models/abstractions/WorkflowStateStepModel.js +0 -3
- package/Models/abstractions/WorkflowStepModel.js +0 -3
- package/Models/index.js +0 -2
- package/Presenters/WorkflowStateListPresenter.js +45 -49
- package/Presenters/WorkflowStateListPresenter.js.map +1 -1
- package/Presenters/WorkflowStatePresenter.d.ts +2 -0
- package/Presenters/WorkflowStatePresenter.js +192 -214
- package/Presenters/WorkflowStatePresenter.js.map +1 -1
- package/Presenters/WorkflowStatesWidgetPresenter.js +214 -259
- package/Presenters/WorkflowStatesWidgetPresenter.js.map +1 -1
- package/Presenters/WorkflowsPresenter.js +101 -103
- package/Presenters/WorkflowsPresenter.js.map +1 -1
- package/Presenters/abstractions/WorkflowStateListPresenter.js +0 -3
- package/Presenters/abstractions/WorkflowStatePresenter.js +0 -3
- package/Presenters/abstractions/WorkflowStatesWidgetPresenter.js +0 -3
- package/Presenters/abstractions/WorkflowsPresenter.js +0 -3
- package/Presenters/index.js +0 -2
- package/Repositories/WorkflowNotificationTypesRepository.js +26 -25
- package/Repositories/WorkflowNotificationTypesRepository.js.map +1 -1
- package/Repositories/WorkflowStateListRepository.js +65 -69
- package/Repositories/WorkflowStateListRepository.js.map +1 -1
- package/Repositories/WorkflowStateRepository.js +121 -127
- package/Repositories/WorkflowStateRepository.js.map +1 -1
- package/Repositories/WorkflowStatesWidgetRepository.js +120 -131
- package/Repositories/WorkflowStatesWidgetRepository.js.map +1 -1
- package/Repositories/WorkflowsRepository.js +71 -80
- package/Repositories/WorkflowsRepository.js.map +1 -1
- package/Repositories/abstractions/WorkflowNotificationTypesRepository.js +0 -3
- package/Repositories/abstractions/WorkflowStateListRepository.js +0 -3
- package/Repositories/abstractions/WorkflowStateRepository.js +0 -3
- package/Repositories/abstractions/WorkflowStatesWidgetRepository.js +0 -3
- package/Repositories/abstractions/WorkflowsRepository.js +0 -3
- package/Repositories/index.js +0 -2
- package/domain/permissionsSchema.js +6 -5
- package/domain/permissionsSchema.js.map +1 -1
- package/features/permissions/abstractions.js +2 -1
- package/features/permissions/abstractions.js.map +1 -1
- package/features/permissions/feature.js +2 -1
- package/features/permissions/feature.js.map +1 -1
- package/hooks/canUseWorkflows.js +7 -6
- package/hooks/canUseWorkflows.js.map +1 -1
- package/index.js +32 -33
- package/index.js.map +1 -1
- package/package.json +12 -13
- package/routes.js +15 -13
- package/routes.js.map +1 -1
- package/types.js +11 -15
- package/types.js.map +1 -1
- package/Components/App/index.js.map +0 -1
- package/Components/Common/Options/index.js.map +0 -1
- package/Components/Common/index.js.map +0 -1
- package/Components/WorkflowState/Bar/Dialogs/index.js.map +0 -1
- package/Components/WorkflowState/Bar/index.js.map +0 -1
- package/Components/WorkflowState/index.js.map +0 -1
- package/Components/WorkflowStateDialogs/index.js.map +0 -1
- package/Components/WorkflowStateList/List/index.js.map +0 -1
- package/Components/WorkflowStateList/Overlay/index.js.map +0 -1
- package/Components/WorkflowStateList/Provider/index.js.map +0 -1
- package/Components/WorkflowStateList/hooks/index.js.map +0 -1
- package/Components/WorkflowStateList/index.js.map +0 -1
- package/Components/WorkflowStatesWidget/Dialogs/index.js.map +0 -1
- package/Components/WorkflowStatesWidget/index.js.map +0 -1
- package/Components/WorkflowsEditor/index.js.map +0 -1
- package/Components/WorkflowsPermissions/index.js.map +0 -1
- package/Components/helpers/index.js.map +0 -1
- package/Gateways/abstraction/WorkflowNotificationTypesGateway.js.map +0 -1
- package/Gateways/abstraction/WorkflowStateGateway.js.map +0 -1
- package/Gateways/abstraction/WorkflowStateListGateway.js.map +0 -1
- package/Gateways/abstraction/WorkflowStatesWidgetGateway.js.map +0 -1
- package/Gateways/abstraction/WorkflowsGateway.js.map +0 -1
- package/Gateways/index.js.map +0 -1
- package/Models/abstractions/WorkflowModel.js.map +0 -1
- package/Models/abstractions/WorkflowStateModel.js.map +0 -1
- package/Models/abstractions/WorkflowStateStepModel.js.map +0 -1
- package/Models/abstractions/WorkflowStepModel.js.map +0 -1
- package/Models/index.js.map +0 -1
- package/Presenters/abstractions/WorkflowStateListPresenter.js.map +0 -1
- package/Presenters/abstractions/WorkflowStatePresenter.js.map +0 -1
- package/Presenters/abstractions/WorkflowStatesWidgetPresenter.js.map +0 -1
- package/Presenters/abstractions/WorkflowsPresenter.js.map +0 -1
- package/Presenters/index.js.map +0 -1
- package/Repositories/abstractions/WorkflowNotificationTypesRepository.js.map +0 -1
- package/Repositories/abstractions/WorkflowStateListRepository.js.map +0 -1
- package/Repositories/abstractions/WorkflowStateRepository.js.map +0 -1
- package/Repositories/abstractions/WorkflowStatesWidgetRepository.js.map +0 -1
- package/Repositories/abstractions/WorkflowsRepository.js.map +0 -1
- package/Repositories/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Models/WorkflowStateModel.js","sources":["../../src/Models/WorkflowStateModel.ts"],"sourcesContent":["import { makeAutoObservable, observable, runInAction, toJS } from \"mobx\";\nimport { WorkflowStateStepModel } from \"./WorkflowStateStepModel.js\";\nimport type { IWorkflowStateModel } from \"./abstractions/WorkflowStateModel.js\";\nimport type { IWorkflowStateStepModel } from \"./abstractions/WorkflowStateStepModel.js\";\nimport { type IWorkflowState, type IWorkflowStateStep, WorkflowStateValue } from \"~/types.js\";\n\nconst createSnapshot = (input: IWorkflowState) => {\n return JSON.stringify(toJS(input));\n};\n\nexport class WorkflowStateModel implements IWorkflowStateModel {\n snapshot: string;\n public id;\n public isActive;\n public app;\n public title;\n public targetId;\n public targetRevisionId;\n public comment;\n public state;\n public steps;\n public createdBy;\n public savedBy;\n public createdOn;\n public savedOn;\n public currentStep;\n public nextStep;\n public previousStep;\n\n public get dirty(): boolean {\n return this.snapshot !== createSnapshot(this.toJS());\n }\n\n public get lastApproved(): IWorkflowStateStepModel | null {\n const steps = this.steps.toReversed();\n for (const step of steps) {\n if (step.state === WorkflowStateValue.approved) {\n return step;\n }\n }\n return null;\n }\n\n public get lastRejected(): IWorkflowStateStepModel | null {\n const steps = this.steps.toReversed();\n for (const step of steps) {\n if (step.state === WorkflowStateValue.rejected) {\n return step;\n }\n }\n return null;\n }\n\n public constructor(params: IWorkflowState) {\n this.snapshot = createSnapshot(params);\n this.id = params.id;\n this.app = params.app;\n this.title = params.title;\n this.targetId = params.targetId;\n this.targetRevisionId = params.targetRevisionId;\n this.comment = params.comment;\n this.state = params.state;\n this.createdBy = params.createdBy;\n this.savedBy = params.savedBy;\n this.createdOn = params.createdOn;\n this.savedOn = params.savedOn;\n this.isActive = params.isActive;\n this.steps = observable.array<IWorkflowStateStepModel>();\n this.currentStep = WorkflowStateStepModel.create(params.currentStep);\n this.previousStep = params.previousStep\n ? WorkflowStateStepModel.create(params.previousStep)\n : null;\n this.nextStep = params.nextStep ? WorkflowStateStepModel.create(params.nextStep) : null;\n\n const steps = params.steps.map(step => {\n return WorkflowStateStepModel.create(step);\n });\n\n this.steps.replace(steps);\n\n makeAutoObservable(this);\n }\n\n public toJS(): IWorkflowState {\n return toJS({\n id: this.id,\n isActive: this.isActive,\n app: this.app,\n title: this.title,\n targetId: this.targetId,\n targetRevisionId: this.targetRevisionId,\n comment: this.comment,\n state: this.state,\n createdBy: this.createdBy,\n savedBy: this.savedBy,\n createdOn: this.createdOn,\n savedOn: this.savedOn,\n steps: this.steps.map(step => {\n return step.toJS();\n }),\n currentStep: this.currentStep,\n previousStep: this.previousStep,\n nextStep: this.nextStep\n });\n }\n\n public setSteps(steps: IWorkflowStateStep[]) {\n runInAction(() => {\n this.steps.replace(\n steps.map(step => {\n return WorkflowStateStepModel.create(step);\n })\n );\n this.updateSnapshot();\n });\n }\n\n public addStep(step: IWorkflowStateStep) {\n runInAction(() => {\n this.steps.push(WorkflowStateStepModel.create(step));\n this.updateSnapshot();\n });\n }\n\n public updateStep(step: IWorkflowStateStep) {\n const existingStep = this.findStep(step.id);\n if (!existingStep) {\n return;\n }\n existingStep.updateStep(step);\n }\n\n public removeStep(id: string) {\n const index = this.steps.findIndex(s => s.id === id);\n if (index === -1) {\n return;\n }\n runInAction(() => {\n this.steps.splice(index, 1);\n this.updateSnapshot();\n });\n }\n\n public findStep(id: string) {\n return this.steps.find(s => s.id === id);\n }\n\n private updateSnapshot() {\n this.snapshot = createSnapshot(this.toJS());\n }\n\n public static create(input: IWorkflowState): IWorkflowStateModel {\n return new WorkflowStateModel(input);\n }\n}\n"],"names":["createSnapshot","input","JSON","toJS","WorkflowStateModel","steps","step","WorkflowSt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
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
2
|
+
class WorkflowStateStepModel {
|
|
3
|
+
constructor(params){
|
|
4
|
+
this.id = params.id;
|
|
5
|
+
this.title = params.title;
|
|
6
|
+
this.color = params.color;
|
|
7
|
+
this.description = params.description;
|
|
8
|
+
this.notifications = params.notifications;
|
|
9
|
+
this.teams = params.teams;
|
|
10
|
+
this.comment = params.comment;
|
|
11
|
+
this.savedBy = params.savedBy;
|
|
12
|
+
this.state = params.state;
|
|
13
|
+
this.canReview = params.canReview;
|
|
14
|
+
this.canTakeOver = params.canTakeOver;
|
|
15
|
+
this.isOwner = params.isOwner;
|
|
16
|
+
makeAutoObservable(this);
|
|
17
|
+
}
|
|
18
|
+
toJS() {
|
|
19
|
+
return toJS({
|
|
20
|
+
id: this.id,
|
|
21
|
+
comment: this.comment,
|
|
22
|
+
savedBy: this.savedBy,
|
|
23
|
+
state: this.state,
|
|
24
|
+
title: this.title,
|
|
25
|
+
notifications: this.notifications,
|
|
26
|
+
teams: this.teams,
|
|
27
|
+
color: this.color,
|
|
28
|
+
description: this.description,
|
|
29
|
+
canReview: this.canReview,
|
|
30
|
+
canTakeOver: this.canTakeOver,
|
|
31
|
+
isOwner: this.isOwner
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
updateStep(input) {
|
|
35
|
+
runInAction(()=>{
|
|
36
|
+
Object.assign(this, input);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
static create(input) {
|
|
40
|
+
return new WorkflowStateStepModel(input);
|
|
41
|
+
}
|
|
42
42
|
}
|
|
43
|
+
export { WorkflowStateStepModel };
|
|
43
44
|
|
|
44
45
|
//# sourceMappingURL=WorkflowStateStepModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Models/WorkflowStateStepModel.js","sources":["../../src/Models/WorkflowStateStepModel.ts"],"sourcesContent":["import type { IWorkflowStateStep } from \"~/types.js\";\nimport { makeAutoObservable, runInAction, toJS } from \"mobx\";\nimport type { IWorkflowStateStepModel } from \"./abstractions/WorkflowStateStepModel.js\";\n\nexport class WorkflowStateStepModel implements IWorkflowStateStepModel {\n public id;\n public comment;\n public savedBy;\n public state;\n public title;\n public teams;\n public notifications;\n public color;\n public description;\n public canReview;\n public canTakeOver;\n public isOwner;\n\n public constructor(params: IWorkflowStateStep) {\n this.id = params.id;\n this.title = params.title;\n this.color = params.color;\n this.description = params.description;\n this.notifications = params.notifications;\n this.teams = params.teams;\n this.comment = params.comment;\n this.savedBy = params.savedBy;\n this.state = params.state;\n this.canReview = params.canReview;\n this.canTakeOver = params.canTakeOver;\n this.isOwner = params.isOwner;\n\n makeAutoObservable(this);\n }\n\n public toJS(): IWorkflowStateStep {\n return toJS({\n id: this.id,\n comment: this.comment,\n savedBy: this.savedBy,\n state: this.state,\n title: this.title,\n notifications: this.notifications,\n teams: this.teams,\n color: this.color,\n description: this.description,\n canReview: this.canReview,\n canTakeOver: this.canTakeOver,\n isOwner: this.isOwner\n });\n }\n\n public updateStep(input: Partial<IWorkflowStateStep>) {\n runInAction(() => {\n Object.assign(this, input);\n });\n }\n\n public static create(input: IWorkflowStateStep): IWorkflowStateStepModel {\n return new WorkflowStateStepModel(input);\n }\n}\n"],"names":["WorkflowStateStepModel","params","makeAutoObservable","toJS","input","runInAction","Object"],"mappings":";AAIO,MAAMA;IAcT,YAAmBC,MAA0B,CAAE;QAC3C,IAAI,CAAC,EAAE,GAAGA,OAAO,EAAE;QACnB,IAAI,CAAC,KAAK,GAAGA,OAAO,KAAK;QACzB,IAAI,CAAC,KAAK,GAAGA,OAAO,KAAK;QACzB,IAAI,CAAC,WAAW,GAAGA,OAAO,WAAW;QACrC,IAAI,CAAC,aAAa,GAAGA,OAAO,aAAa;QACzC,IAAI,CAAC,KAAK,GAAGA,OAAO,KAAK;QACzB,IAAI,CAAC,OAAO,GAAGA,OAAO,OAAO;QAC7B,IAAI,CAAC,OAAO,GAAGA,OAAO,OAAO;QAC7B,IAAI,CAAC,KAAK,GAAGA,OAAO,KAAK;QACzB,IAAI,CAAC,SAAS,GAAGA,OAAO,SAAS;QACjC,IAAI,CAAC,WAAW,GAAGA,OAAO,WAAW;QACrC,IAAI,CAAC,OAAO,GAAGA,OAAO,OAAO;QAE7BC,mBAAmB,IAAI;IAC3B;IAEO,OAA2B;QAC9B,OAAOC,KAAK;YACR,IAAI,IAAI,CAAC,EAAE;YACX,SAAS,IAAI,CAAC,OAAO;YACrB,SAAS,IAAI,CAAC,OAAO;YACrB,OAAO,IAAI,CAAC,KAAK;YACjB,OAAO,IAAI,CAAC,KAAK;YACjB,eAAe,IAAI,CAAC,aAAa;YACjC,OAAO,IAAI,CAAC,KAAK;YACjB,OAAO,IAAI,CAAC,KAAK;YACjB,aAAa,IAAI,CAAC,WAAW;YAC7B,WAAW,IAAI,CAAC,SAAS;YACzB,aAAa,IAAI,CAAC,WAAW;YAC7B,SAAS,IAAI,CAAC,OAAO;QACzB;IACJ;IAEO,WAAWC,KAAkC,EAAE;QAClDC,YAAY;YACRC,OAAO,MAAM,CAAC,IAAI,EAAEF;QACxB;IACJ;IAEA,OAAc,OAAOA,KAAyB,EAA2B;QACrE,OAAO,IAAIJ,uBAAuBI;IACtC;AACJ"}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { makeAutoObservable, runInAction, toJS } from "mobx";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
class WorkflowStepModel {
|
|
3
|
+
constructor(data){
|
|
4
|
+
this.id = data.id;
|
|
5
|
+
this.title = data.title;
|
|
6
|
+
this.color = data.color;
|
|
7
|
+
this.description = data.description;
|
|
8
|
+
this.teams = data.teams;
|
|
9
|
+
this.notifications = data.notifications || [];
|
|
10
|
+
makeAutoObservable(this);
|
|
11
|
+
}
|
|
12
|
+
toJS() {
|
|
13
|
+
return toJS({
|
|
14
|
+
id: this.id,
|
|
15
|
+
title: this.title,
|
|
16
|
+
color: this.color,
|
|
17
|
+
description: this.description,
|
|
18
|
+
teams: this.teams,
|
|
19
|
+
notifications: this.notifications
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
updateStep(input) {
|
|
23
|
+
runInAction(()=>{
|
|
24
|
+
Object.assign(this, input);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
27
|
}
|
|
28
|
+
export { WorkflowStepModel };
|
|
28
29
|
|
|
29
30
|
//# sourceMappingURL=WorkflowStepModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Models/WorkflowStepModel.js","sources":["../../src/Models/WorkflowStepModel.ts"],"sourcesContent":["import type { IWorkflowStep } from \"~/types.js\";\nimport { makeAutoObservable, runInAction, toJS } from \"mobx\";\nimport type { IWorkflowStepModel } from \"./abstractions/WorkflowStepModel.js\";\n\nexport class WorkflowStepModel implements IWorkflowStepModel {\n public id;\n public title;\n public color;\n public description;\n public teams;\n public notifications;\n\n public constructor(data: IWorkflowStep) {\n this.id = data.id;\n this.title = data.title;\n this.color = data.color;\n this.description = data.description;\n this.teams = data.teams;\n this.notifications = data.notifications || [];\n\n makeAutoObservable(this);\n }\n\n public toJS(): IWorkflowStep {\n return toJS({\n id: this.id,\n title: this.title,\n color: this.color,\n description: this.description,\n teams: this.teams,\n notifications: this.notifications\n });\n }\n\n public updateStep(input: Partial<IWorkflowStep>) {\n runInAction(() => {\n Object.assign(this, input);\n });\n }\n}\n"],"names":["WorkflowStepModel","data","makeAutoObservable","toJS","input","runInAction","Object"],"mappings":";AAIO,MAAMA;IAQT,YAAmBC,IAAmB,CAAE;QACpC,IAAI,CAAC,EAAE,GAAGA,KAAK,EAAE;QACjB,IAAI,CAAC,KAAK,GAAGA,KAAK,KAAK;QACvB,IAAI,CAAC,KAAK,GAAGA,KAAK,KAAK;QACvB,IAAI,CAAC,WAAW,GAAGA,KAAK,WAAW;QACnC,IAAI,CAAC,KAAK,GAAGA,KAAK,KAAK;QACvB,IAAI,CAAC,aAAa,GAAGA,KAAK,aAAa,IAAI,EAAE;QAE7CC,mBAAmB,IAAI;IAC3B;IAEO,OAAsB;QACzB,OAAOC,KAAK;YACR,IAAI,IAAI,CAAC,EAAE;YACX,OAAO,IAAI,CAAC,KAAK;YACjB,OAAO,IAAI,CAAC,KAAK;YACjB,aAAa,IAAI,CAAC,WAAW;YAC7B,OAAO,IAAI,CAAC,KAAK;YACjB,eAAe,IAAI,CAAC,aAAa;QACrC;IACJ;IAEO,WAAWC,KAA6B,EAAE;QAC7CC,YAAY;YACRC,OAAO,MAAM,CAAC,IAAI,EAAEF;QACxB;IACJ;AACJ"}
|
package/Models/index.js
CHANGED
|
@@ -2,5 +2,3 @@ export { WorkflowModel } from "./WorkflowModel.js";
|
|
|
2
2
|
export { WorkflowStepModel } from "./WorkflowStepModel.js";
|
|
3
3
|
export { WorkflowStateModel } from "./WorkflowStateModel.js";
|
|
4
4
|
export { WorkflowStateStepModel } from "./WorkflowStateStepModel.js";
|
|
5
|
-
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,54 +1,50 @@
|
|
|
1
1
|
import { makeAutoObservable } from "mobx";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
2
|
+
class WorkflowStateListPresenter {
|
|
3
|
+
get vm() {
|
|
4
|
+
return {
|
|
5
|
+
items: this.repository.items,
|
|
6
|
+
loading: this.repository.loading,
|
|
7
|
+
error: this.repository.error,
|
|
8
|
+
totalCount: this.repository.meta?.totalCount || 0,
|
|
9
|
+
hasMoreItems: this.repository.meta?.hasMoreItems || false,
|
|
10
|
+
where: this.listParams?.where || {},
|
|
11
|
+
type: this.repository.type
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
constructor(params){
|
|
15
|
+
this.listParams = void 0;
|
|
16
|
+
this.filterBy = async (where)=>await this.list({
|
|
17
|
+
...this.listParams,
|
|
18
|
+
after: void 0,
|
|
19
|
+
where
|
|
20
|
+
});
|
|
21
|
+
this.nextPage = async ()=>{
|
|
22
|
+
if (!this.repository.meta?.hasMoreItems) return void console.warn("No more items to load.");
|
|
23
|
+
return await this.repository.list({
|
|
24
|
+
...this.listParams,
|
|
25
|
+
after: this.repository.meta?.cursor || void 0
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
this.list = async (params)=>{
|
|
29
|
+
this.listParams = {
|
|
30
|
+
after: void 0,
|
|
31
|
+
...params,
|
|
32
|
+
limit: 50,
|
|
33
|
+
where: {
|
|
34
|
+
...params?.where,
|
|
35
|
+
isActive: true
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return await this.repository.list(this.listParams);
|
|
39
|
+
};
|
|
40
|
+
this.setType = async (type)=>{
|
|
41
|
+
this.repository.setType(type);
|
|
42
|
+
return await this.repository.list(this.listParams);
|
|
43
|
+
};
|
|
44
|
+
this.repository = params.repository;
|
|
45
|
+
makeAutoObservable(this);
|
|
30
46
|
}
|
|
31
|
-
return await this.repository.list({
|
|
32
|
-
...this.listParams,
|
|
33
|
-
after: this.repository.meta?.cursor || undefined
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
list = async params => {
|
|
37
|
-
this.listParams = {
|
|
38
|
-
after: undefined,
|
|
39
|
-
...params,
|
|
40
|
-
limit: 50,
|
|
41
|
-
where: {
|
|
42
|
-
...params?.where,
|
|
43
|
-
isActive: true
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
return await this.repository.list(this.listParams);
|
|
47
|
-
};
|
|
48
|
-
setType = async type => {
|
|
49
|
-
this.repository.setType(type);
|
|
50
|
-
return await this.repository.list(this.listParams);
|
|
51
|
-
};
|
|
52
47
|
}
|
|
48
|
+
export { WorkflowStateListPresenter };
|
|
53
49
|
|
|
54
50
|
//# sourceMappingURL=WorkflowStateListPresenter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Presenters/WorkflowStateListPresenter.js","sources":["../../src/Presenters/WorkflowStateListPresenter.ts"],"sourcesContent":["import type {\n IWorkflowStateListPresenter,\n IWorkflowStateListPresenterListParams,\n IWorkflowStateListPresenterListParamsWhere\n} from \"./abstractions/WorkflowStateListPresenter.js\";\nimport type {\n IWorkflowStateListRepository,\n WorkflowStateListRepositoryType\n} from \"~/Repositories/index.js\";\nimport { makeAutoObservable } from \"mobx\";\n\ninterface IWorkflowStateListPresenterParams {\n repository: IWorkflowStateListRepository;\n}\n\nexport class WorkflowStateListPresenter implements IWorkflowStateListPresenter {\n private readonly repository: IWorkflowStateListRepository;\n\n private listParams: IWorkflowStateListPresenterListParams | undefined = undefined;\n\n public get vm() {\n return {\n items: this.repository.items,\n loading: this.repository.loading,\n error: this.repository.error,\n totalCount: this.repository.meta?.totalCount || 0,\n hasMoreItems: this.repository.meta?.hasMoreItems || false,\n where: this.listParams?.where || {},\n type: this.repository.type\n };\n }\n\n public constructor(params: IWorkflowStateListPresenterParams) {\n this.repository = params.repository;\n\n makeAutoObservable(this);\n }\n\n filterBy = async (where: IWorkflowStateListPresenterListParamsWhere): Promise<void> => {\n return await this.list({\n ...this.listParams,\n after: undefined,\n where\n });\n };\n\n nextPage = async (): Promise<void> => {\n if (!this.repository.meta?.hasMoreItems) {\n console.warn(\"No more items to load.\");\n return;\n }\n return await this.repository.list({\n ...this.listParams,\n after: this.repository.meta?.cursor || undefined\n });\n };\n\n list = async (params?: IWorkflowStateListPresenterListParams): Promise<void> => {\n this.listParams = {\n after: undefined,\n ...params,\n limit: 50,\n where: {\n ...params?.where,\n isActive: true\n }\n };\n return await this.repository.list(this.listParams);\n };\n\n setType = async (type: WorkflowStateListRepositoryType): Promise<void> => {\n this.repository.setType(type);\n return await this.repository.list(this.listParams);\n };\n}\n"],"names":["WorkflowStateListPresenter","params","undefined","where","console","type","makeAutoObservable"],"mappings":";AAeO,MAAMA;IAKT,IAAW,KAAK;QACZ,OAAO;YACH,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK;YAC5B,SAAS,IAAI,CAAC,UAAU,CAAC,OAAO;YAChC,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK;YAC5B,YAAY,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,cAAc;YAChD,cAAc,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,gBAAgB;YACpD,OAAO,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC;YAClC,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI;QAC9B;IACJ;IAEA,YAAmBC,MAAyC,CAAE;aAdtD,UAAU,GAAsDC;aAoBxE,QAAQ,GAAG,OAAOC,QACP,MAAM,IAAI,CAAC,IAAI,CAAC;gBACnB,GAAG,IAAI,CAAC,UAAU;gBAClB,OAAOD;gBACPC;YACJ;aAGJ,QAAQ,GAAG;YACP,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,cAAc,YACrCC,QAAQ,IAAI,CAAC;YAGjB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;gBAC9B,GAAG,IAAI,CAAC,UAAU;gBAClB,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,UAAUF;YAC3C;QACJ;aAEA,IAAI,GAAG,OAAOD;YACV,IAAI,CAAC,UAAU,GAAG;gBACd,OAAOC;gBACP,GAAGD,MAAM;gBACT,OAAO;gBACP,OAAO;oBACH,GAAGA,QAAQ,KAAK;oBAChB,UAAU;gBACd;YACJ;YACA,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU;QACrD;aAEA,OAAO,GAAG,OAAOI;YACb,IAAI,CAAC,UAAU,CAAC,OAAO,CAACA;YACxB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU;QACrD;QAxCI,IAAI,CAAC,UAAU,GAAGJ,OAAO,UAAU;QAEnCK,mBAAmB,IAAI;IAC3B;AAsCJ"}
|
|
@@ -9,6 +9,7 @@ export interface IWorkflowStatePresenterParams {
|
|
|
9
9
|
targetRevisionId: string;
|
|
10
10
|
title: string;
|
|
11
11
|
identity: IIdentity | null;
|
|
12
|
+
disabled: boolean;
|
|
12
13
|
}
|
|
13
14
|
export declare class WorkflowStatePresenter implements IWorkflowStatePresenter {
|
|
14
15
|
private readonly repository;
|
|
@@ -18,6 +19,7 @@ export declare class WorkflowStatePresenter implements IWorkflowStatePresenter {
|
|
|
18
19
|
private readonly targetRevisionId;
|
|
19
20
|
private readonly title;
|
|
20
21
|
private readonly identity;
|
|
22
|
+
private readonly disabled;
|
|
21
23
|
private state;
|
|
22
24
|
private dialog;
|
|
23
25
|
step: IWorkflowStateStepModel | null;
|