@webiny/app-workflows 0.0.0-unstable.61c048f412
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.d.ts +2 -0
- package/Components/AdminConfig/WorkflowsMenu.js +25 -0
- package/Components/AdminConfig/WorkflowsMenu.js.map +1 -0
- package/Components/App/ContentReviews.d.ts +2 -0
- package/Components/App/ContentReviews.js +34 -0
- package/Components/App/ContentReviews.js.map +1 -0
- package/Components/App/WorkflowsAdminApp.d.ts +5 -0
- package/Components/App/WorkflowsAdminApp.js +18 -0
- package/Components/App/WorkflowsAdminApp.js.map +1 -0
- package/Components/App/index.d.ts +1 -0
- package/Components/App/index.js +3 -0
- package/Components/App/index.js.map +1 -0
- package/Components/Common/Options/OptionItem/Approve.d.ts +8 -0
- package/Components/Common/Options/OptionItem/Approve.js +25 -0
- package/Components/Common/Options/OptionItem/Approve.js.map +1 -0
- package/Components/Common/Options/OptionItem/OpenInNewWindow.d.ts +24 -0
- package/Components/Common/Options/OptionItem/OpenInNewWindow.js +9 -0
- package/Components/Common/Options/OptionItem/OpenInNewWindow.js.map +1 -0
- package/Components/Common/Options/OptionItem/Reject.d.ts +8 -0
- package/Components/Common/Options/OptionItem/Reject.js +25 -0
- package/Components/Common/Options/OptionItem/Reject.js.map +1 -0
- package/Components/Common/Options/OptionItem/Start.d.ts +8 -0
- package/Components/Common/Options/OptionItem/Start.js +24 -0
- package/Components/Common/Options/OptionItem/Start.js.map +1 -0
- package/Components/Common/Options/OptionItem/TakeOver.d.ts +8 -0
- package/Components/Common/Options/OptionItem/TakeOver.js +23 -0
- package/Components/Common/Options/OptionItem/TakeOver.js.map +1 -0
- package/Components/Common/Options/WorkflowStateOptions.d.ts +11 -0
- package/Components/Common/Options/WorkflowStateOptions.js +67 -0
- package/Components/Common/Options/WorkflowStateOptions.js.map +1 -0
- package/Components/Common/Options/index.d.ts +2 -0
- package/Components/Common/Options/index.js +4 -0
- package/Components/Common/Options/index.js.map +1 -0
- package/Components/Common/TagState.d.ts +7 -0
- package/Components/Common/TagState.js +14 -0
- package/Components/Common/TagState.js.map +1 -0
- package/Components/Common/TagStep.d.ts +7 -0
- package/Components/Common/TagStep.js +14 -0
- package/Components/Common/TagStep.js.map +1 -0
- package/Components/Common/YouCanTrackAllContentReviewsHere.d.ts +2 -0
- package/Components/Common/YouCanTrackAllContentReviewsHere.js +15 -0
- package/Components/Common/YouCanTrackAllContentReviewsHere.js.map +1 -0
- package/Components/Common/index.d.ts +5 -0
- package/Components/Common/index.js +6 -0
- package/Components/Common/index.js.map +1 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarApproved.d.ts +5 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarApproved.js +29 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarApproved.js.map +1 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarCancelReview.d.ts +5 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarCancelReview.js +28 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarCancelReview.js.map +1 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarError.d.ts +6 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarError.js +29 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarError.js.map +1 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarLoading.d.ts +5 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarLoading.js +24 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarLoading.js.map +1 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarRejected.d.ts +5 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarRejected.js +35 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarRejected.js.map +1 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarRequestReview.d.ts +5 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarRequestReview.js +26 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarRequestReview.js.map +1 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarReview.d.ts +5 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarReview.js +57 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarReview.js.map +1 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarStartReview.d.ts +2 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarStartReview.js +31 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarStartReview.js.map +1 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarWorkflow.d.ts +5 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarWorkflow.js +19 -0
- package/Components/WorkflowState/Bar/Bars/WorkflowStateBarWorkflow.js.map +1 -0
- package/Components/WorkflowState/Bar/Dialogs/ApproveDialog.d.ts +7 -0
- package/Components/WorkflowState/Bar/Dialogs/ApproveDialog.js +19 -0
- package/Components/WorkflowState/Bar/Dialogs/ApproveDialog.js.map +1 -0
- package/Components/WorkflowState/Bar/Dialogs/ApproveSuccessDialog.d.ts +7 -0
- package/Components/WorkflowState/Bar/Dialogs/ApproveSuccessDialog.js +17 -0
- package/Components/WorkflowState/Bar/Dialogs/ApproveSuccessDialog.js.map +1 -0
- package/Components/WorkflowState/Bar/Dialogs/CancelReviewDialog.d.ts +7 -0
- package/Components/WorkflowState/Bar/Dialogs/CancelReviewDialog.js +14 -0
- package/Components/WorkflowState/Bar/Dialogs/CancelReviewDialog.js.map +1 -0
- package/Components/WorkflowState/Bar/Dialogs/CommentDialog.d.ts +7 -0
- package/Components/WorkflowState/Bar/Dialogs/CommentDialog.js +17 -0
- package/Components/WorkflowState/Bar/Dialogs/CommentDialog.js.map +1 -0
- package/Components/WorkflowState/Bar/Dialogs/RejectDialog.d.ts +7 -0
- package/Components/WorkflowState/Bar/Dialogs/RejectDialog.js +19 -0
- package/Components/WorkflowState/Bar/Dialogs/RejectDialog.js.map +1 -0
- package/Components/WorkflowState/Bar/Dialogs/RejectSuccessDialog.d.ts +7 -0
- package/Components/WorkflowState/Bar/Dialogs/RejectSuccessDialog.js +17 -0
- package/Components/WorkflowState/Bar/Dialogs/RejectSuccessDialog.js.map +1 -0
- package/Components/WorkflowState/Bar/Dialogs/RequestReviewDialog.d.ts +7 -0
- package/Components/WorkflowState/Bar/Dialogs/RequestReviewDialog.js +14 -0
- package/Components/WorkflowState/Bar/Dialogs/RequestReviewDialog.js.map +1 -0
- package/Components/WorkflowState/Bar/Dialogs/StartDialog.d.ts +7 -0
- package/Components/WorkflowState/Bar/Dialogs/StartDialog.js +19 -0
- package/Components/WorkflowState/Bar/Dialogs/StartDialog.js.map +1 -0
- package/Components/WorkflowState/Bar/Dialogs/StartSuccessDialog.d.ts +7 -0
- package/Components/WorkflowState/Bar/Dialogs/StartSuccessDialog.js +17 -0
- package/Components/WorkflowState/Bar/Dialogs/StartSuccessDialog.js.map +1 -0
- package/Components/WorkflowState/Bar/Dialogs/TakeOverDialog.d.ts +7 -0
- package/Components/WorkflowState/Bar/Dialogs/TakeOverDialog.js +21 -0
- package/Components/WorkflowState/Bar/Dialogs/TakeOverDialog.js.map +1 -0
- package/Components/WorkflowState/Bar/Dialogs/TakeOverSuccessDialog.d.ts +7 -0
- package/Components/WorkflowState/Bar/Dialogs/TakeOverSuccessDialog.js +17 -0
- package/Components/WorkflowState/Bar/Dialogs/TakeOverSuccessDialog.js.map +1 -0
- package/Components/WorkflowState/Bar/Dialogs/index.d.ts +11 -0
- package/Components/WorkflowState/Bar/Dialogs/index.js +13 -0
- package/Components/WorkflowState/Bar/Dialogs/index.js.map +1 -0
- package/Components/WorkflowState/Bar/WorkflowStateBar.d.ts +22 -0
- package/Components/WorkflowState/Bar/WorkflowStateBar.js +35 -0
- package/Components/WorkflowState/Bar/WorkflowStateBar.js.map +1 -0
- package/Components/WorkflowState/Bar/WorkflowStateBarComponent.d.ts +40 -0
- package/Components/WorkflowState/Bar/WorkflowStateBarComponent.js +23 -0
- package/Components/WorkflowState/Bar/WorkflowStateBarComponent.js.map +1 -0
- package/Components/WorkflowState/Bar/WorkflowStateBarDialogs.d.ts +4 -0
- package/Components/WorkflowState/Bar/WorkflowStateBarDialogs.js +58 -0
- package/Components/WorkflowState/Bar/WorkflowStateBarDialogs.js.map +1 -0
- package/Components/WorkflowState/Bar/index.d.ts +1 -0
- package/Components/WorkflowState/Bar/index.js +3 -0
- package/Components/WorkflowState/Bar/index.js.map +1 -0
- package/Components/WorkflowState/Overlay/WorkflowStateOverlay.d.ts +15 -0
- package/Components/WorkflowState/Overlay/WorkflowStateOverlay.js +17 -0
- package/Components/WorkflowState/Overlay/WorkflowStateOverlay.js.map +1 -0
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltip.d.ts +10 -0
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltip.js +47 -0
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltip.js.map +1 -0
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltipContent.d.ts +9 -0
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltipContent.js +42 -0
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltipContent.js.map +1 -0
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltipContentComment.d.ts +10 -0
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltipContentComment.js +26 -0
- package/Components/WorkflowState/Tooltip/WorkflowStateTooltipContentComment.js.map +1 -0
- package/Components/WorkflowState/WorkflowStateProvider.d.ts +17 -0
- package/Components/WorkflowState/WorkflowStateProvider.js +44 -0
- package/Components/WorkflowState/WorkflowStateProvider.js.map +1 -0
- package/Components/WorkflowState/index.d.ts +5 -0
- package/Components/WorkflowState/index.js +7 -0
- package/Components/WorkflowState/index.js.map +1 -0
- package/Components/WorkflowState/useWorkflowState.d.ts +1 -0
- package/Components/WorkflowState/useWorkflowState.js +11 -0
- package/Components/WorkflowState/useWorkflowState.js.map +1 -0
- package/Components/WorkflowStateDialogs/ApproveDialog.d.ts +9 -0
- package/Components/WorkflowStateDialogs/ApproveDialog.js +48 -0
- package/Components/WorkflowStateDialogs/ApproveDialog.js.map +1 -0
- package/Components/WorkflowStateDialogs/ApproveSuccessDialog.d.ts +7 -0
- package/Components/WorkflowStateDialogs/ApproveSuccessDialog.js +34 -0
- package/Components/WorkflowStateDialogs/ApproveSuccessDialog.js.map +1 -0
- package/Components/WorkflowStateDialogs/CancelReviewDialog.d.ts +8 -0
- package/Components/WorkflowStateDialogs/CancelReviewDialog.js +36 -0
- package/Components/WorkflowStateDialogs/CancelReviewDialog.js.map +1 -0
- package/Components/WorkflowStateDialogs/CommentDialog.d.ts +8 -0
- package/Components/WorkflowStateDialogs/CommentDialog.js +47 -0
- package/Components/WorkflowStateDialogs/CommentDialog.js.map +1 -0
- package/Components/WorkflowStateDialogs/RejectDialog.d.ts +9 -0
- package/Components/WorkflowStateDialogs/RejectDialog.js +83 -0
- package/Components/WorkflowStateDialogs/RejectDialog.js.map +1 -0
- package/Components/WorkflowStateDialogs/RejectSuccessDialog.d.ts +7 -0
- package/Components/WorkflowStateDialogs/RejectSuccessDialog.js +32 -0
- package/Components/WorkflowStateDialogs/RejectSuccessDialog.js.map +1 -0
- package/Components/WorkflowStateDialogs/RequestReviewDialog.d.ts +8 -0
- package/Components/WorkflowStateDialogs/RequestReviewDialog.js +36 -0
- package/Components/WorkflowStateDialogs/RequestReviewDialog.js.map +1 -0
- package/Components/WorkflowStateDialogs/StartDialog.d.ts +9 -0
- package/Components/WorkflowStateDialogs/StartDialog.js +37 -0
- package/Components/WorkflowStateDialogs/StartDialog.js.map +1 -0
- package/Components/WorkflowStateDialogs/StartSuccessDialog.d.ts +7 -0
- package/Components/WorkflowStateDialogs/StartSuccessDialog.js +32 -0
- package/Components/WorkflowStateDialogs/StartSuccessDialog.js.map +1 -0
- package/Components/WorkflowStateDialogs/TakeOverDialog.d.ts +10 -0
- package/Components/WorkflowStateDialogs/TakeOverDialog.js +38 -0
- package/Components/WorkflowStateDialogs/TakeOverDialog.js.map +1 -0
- package/Components/WorkflowStateDialogs/TakeOverSuccessDialog.d.ts +7 -0
- package/Components/WorkflowStateDialogs/TakeOverSuccessDialog.js +32 -0
- package/Components/WorkflowStateDialogs/TakeOverSuccessDialog.js.map +1 -0
- package/Components/WorkflowStateDialogs/index.d.ts +11 -0
- package/Components/WorkflowStateDialogs/index.js +13 -0
- package/Components/WorkflowStateDialogs/index.js.map +1 -0
- package/Components/WorkflowStateList/List/WorkflowStateList.d.ts +4 -0
- package/Components/WorkflowStateList/List/WorkflowStateList.js +100 -0
- package/Components/WorkflowStateList/List/WorkflowStateList.js.map +1 -0
- package/Components/WorkflowStateList/List/WorkflowStateListFilters.d.ts +4 -0
- package/Components/WorkflowStateList/List/WorkflowStateListFilters.js +68 -0
- package/Components/WorkflowStateList/List/WorkflowStateListFilters.js.map +1 -0
- package/Components/WorkflowStateList/List/WorkflowStateListOptions.d.ts +9 -0
- package/Components/WorkflowStateList/List/WorkflowStateListOptions.js +13 -0
- package/Components/WorkflowStateList/List/WorkflowStateListOptions.js.map +1 -0
- package/Components/WorkflowStateList/List/WorkflowStateListView.d.ts +7 -0
- package/Components/WorkflowStateList/List/WorkflowStateListView.js +28 -0
- package/Components/WorkflowStateList/List/WorkflowStateListView.js.map +1 -0
- package/Components/WorkflowStateList/List/index.d.ts +2 -0
- package/Components/WorkflowStateList/List/index.js +4 -0
- package/Components/WorkflowStateList/List/index.js.map +1 -0
- package/Components/WorkflowStateList/Overlay/WorkflowStateListAppOverlay.d.ts +14 -0
- package/Components/WorkflowStateList/Overlay/WorkflowStateListAppOverlay.js +32 -0
- package/Components/WorkflowStateList/Overlay/WorkflowStateListAppOverlay.js.map +1 -0
- package/Components/WorkflowStateList/Overlay/WorkflowStateListAppOverlayView.d.ts +8 -0
- package/Components/WorkflowStateList/Overlay/WorkflowStateListAppOverlayView.js +34 -0
- package/Components/WorkflowStateList/Overlay/WorkflowStateListAppOverlayView.js.map +1 -0
- package/Components/WorkflowStateList/Overlay/index.d.ts +1 -0
- package/Components/WorkflowStateList/Overlay/index.js +3 -0
- package/Components/WorkflowStateList/Overlay/index.js.map +1 -0
- package/Components/WorkflowStateList/Provider/WorkflowStateListProvider.d.ts +16 -0
- package/Components/WorkflowStateList/Provider/WorkflowStateListProvider.js +37 -0
- package/Components/WorkflowStateList/Provider/WorkflowStateListProvider.js.map +1 -0
- package/Components/WorkflowStateList/Provider/index.d.ts +1 -0
- package/Components/WorkflowStateList/Provider/index.js +3 -0
- package/Components/WorkflowStateList/Provider/index.js.map +1 -0
- package/Components/WorkflowStateList/hooks/index.d.ts +1 -0
- package/Components/WorkflowStateList/hooks/index.js +3 -0
- package/Components/WorkflowStateList/hooks/index.js.map +1 -0
- package/Components/WorkflowStateList/hooks/useWorkflowStateList.d.ts +1 -0
- package/Components/WorkflowStateList/hooks/useWorkflowStateList.js +11 -0
- package/Components/WorkflowStateList/hooks/useWorkflowStateList.js.map +1 -0
- package/Components/WorkflowStateList/index.d.ts +2 -0
- package/Components/WorkflowStateList/index.js +4 -0
- package/Components/WorkflowStateList/index.js.map +1 -0
- package/Components/WorkflowStatesWidget/Card/WorkflowStatesWidgetCard.d.ts +8 -0
- package/Components/WorkflowStatesWidget/Card/WorkflowStatesWidgetCard.js +55 -0
- package/Components/WorkflowStatesWidget/Card/WorkflowStatesWidgetCard.js.map +1 -0
- package/Components/WorkflowStatesWidget/Card/WorkflowStatesWidgetCardTabs.d.ts +9 -0
- package/Components/WorkflowStatesWidget/Card/WorkflowStatesWidgetCardTabs.js +65 -0
- package/Components/WorkflowStatesWidget/Card/WorkflowStatesWidgetCardTabs.js.map +1 -0
- package/Components/WorkflowStatesWidget/Dialogs/ApproveDialog.d.ts +7 -0
- package/Components/WorkflowStatesWidget/Dialogs/ApproveDialog.js +25 -0
- package/Components/WorkflowStatesWidget/Dialogs/ApproveDialog.js.map +1 -0
- package/Components/WorkflowStatesWidget/Dialogs/ApproveSuccessDialog.d.ts +7 -0
- package/Components/WorkflowStatesWidget/Dialogs/ApproveSuccessDialog.js +17 -0
- package/Components/WorkflowStatesWidget/Dialogs/ApproveSuccessDialog.js.map +1 -0
- package/Components/WorkflowStatesWidget/Dialogs/RejectDialog.d.ts +7 -0
- package/Components/WorkflowStatesWidget/Dialogs/RejectDialog.js +25 -0
- package/Components/WorkflowStatesWidget/Dialogs/RejectDialog.js.map +1 -0
- package/Components/WorkflowStatesWidget/Dialogs/RejectSuccessDialog.d.ts +7 -0
- package/Components/WorkflowStatesWidget/Dialogs/RejectSuccessDialog.js +17 -0
- package/Components/WorkflowStatesWidget/Dialogs/RejectSuccessDialog.js.map +1 -0
- package/Components/WorkflowStatesWidget/Dialogs/StartDialog.d.ts +7 -0
- package/Components/WorkflowStatesWidget/Dialogs/StartDialog.js +25 -0
- package/Components/WorkflowStatesWidget/Dialogs/StartDialog.js.map +1 -0
- package/Components/WorkflowStatesWidget/Dialogs/StartSuccessDialog.d.ts +7 -0
- package/Components/WorkflowStatesWidget/Dialogs/StartSuccessDialog.js +17 -0
- package/Components/WorkflowStatesWidget/Dialogs/StartSuccessDialog.js.map +1 -0
- package/Components/WorkflowStatesWidget/Dialogs/TakeOverDialog.d.ts +7 -0
- package/Components/WorkflowStatesWidget/Dialogs/TakeOverDialog.js +28 -0
- package/Components/WorkflowStatesWidget/Dialogs/TakeOverDialog.js.map +1 -0
- package/Components/WorkflowStatesWidget/Dialogs/TakeOverSuccessDialog.d.ts +7 -0
- package/Components/WorkflowStatesWidget/Dialogs/TakeOverSuccessDialog.js +17 -0
- package/Components/WorkflowStatesWidget/Dialogs/TakeOverSuccessDialog.js.map +1 -0
- package/Components/WorkflowStatesWidget/Dialogs/index.d.ts +8 -0
- package/Components/WorkflowStatesWidget/Dialogs/index.js +10 -0
- package/Components/WorkflowStatesWidget/Dialogs/index.js.map +1 -0
- package/Components/WorkflowStatesWidget/List/WorkflowStateList.d.ts +7 -0
- package/Components/WorkflowStatesWidget/List/WorkflowStateList.js +18 -0
- package/Components/WorkflowStatesWidget/List/WorkflowStateList.js.map +1 -0
- package/Components/WorkflowStatesWidget/List/WorkflowStateRow.d.ts +9 -0
- package/Components/WorkflowStatesWidget/List/WorkflowStateRow.js +24 -0
- package/Components/WorkflowStatesWidget/List/WorkflowStateRow.js.map +1 -0
- package/Components/WorkflowStatesWidget/List/WorkflowStateRowOptions.d.ts +9 -0
- package/Components/WorkflowStatesWidget/List/WorkflowStateRowOptions.js +33 -0
- package/Components/WorkflowStatesWidget/List/WorkflowStateRowOptions.js.map +1 -0
- package/Components/WorkflowStatesWidget/Provider/WorkflowStatesProvider.d.ts +17 -0
- package/Components/WorkflowStatesWidget/Provider/WorkflowStatesProvider.js +34 -0
- package/Components/WorkflowStatesWidget/Provider/WorkflowStatesProvider.js.map +1 -0
- package/Components/WorkflowStatesWidget/Row/WorkflowStateRowDescription.d.ts +7 -0
- package/Components/WorkflowStatesWidget/Row/WorkflowStateRowDescription.js +22 -0
- package/Components/WorkflowStatesWidget/Row/WorkflowStateRowDescription.js.map +1 -0
- package/Components/WorkflowStatesWidget/WorkflowStatesOwnWidget.d.ts +6 -0
- package/Components/WorkflowStatesWidget/WorkflowStatesOwnWidget.js +27 -0
- package/Components/WorkflowStatesWidget/WorkflowStatesOwnWidget.js.map +1 -0
- package/Components/WorkflowStatesWidget/WorkflowStatesRequestedWidget.d.ts +6 -0
- package/Components/WorkflowStatesWidget/WorkflowStatesRequestedWidget.js +27 -0
- package/Components/WorkflowStatesWidget/WorkflowStatesRequestedWidget.js.map +1 -0
- package/Components/WorkflowStatesWidget/hooks/useWorkflowStatesWidget.d.ts +1 -0
- package/Components/WorkflowStatesWidget/hooks/useWorkflowStatesWidget.js +11 -0
- package/Components/WorkflowStatesWidget/hooks/useWorkflowStatesWidget.js.map +1 -0
- package/Components/WorkflowStatesWidget/index.d.ts +2 -0
- package/Components/WorkflowStatesWidget/index.js +4 -0
- package/Components/WorkflowStatesWidget/index.js.map +1 -0
- package/Components/WorkflowsEditor/DataList/WorkflowsDataList.d.ts +8 -0
- package/Components/WorkflowsEditor/DataList/WorkflowsDataList.js +46 -0
- package/Components/WorkflowsEditor/DataList/WorkflowsDataList.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/Error/FormattedError.d.ts +7 -0
- package/Components/WorkflowsEditor/Editor/Error/FormattedError.js +37 -0
- package/Components/WorkflowsEditor/Editor/Error/FormattedError.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/Error/WorkflowError.d.ts +7 -0
- package/Components/WorkflowsEditor/Editor/Error/WorkflowError.js +41 -0
- package/Components/WorkflowsEditor/Editor/Error/WorkflowError.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormColor.d.ts +2 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormColor.js +22 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormColor.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormDescription.d.ts +2 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormDescription.js +13 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormDescription.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormNotifications.d.ts +7 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormNotifications.js +44 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormNotifications.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormTeams.d.ts +2 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormTeams.js +39 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormTeams.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormTitle.d.ts +2 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormTitle.js +15 -0
- package/Components/WorkflowsEditor/Editor/Step/Form/StepFormTitle.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/Step/InactiveStep.d.ts +7 -0
- package/Components/WorkflowsEditor/Editor/Step/InactiveStep.js +19 -0
- package/Components/WorkflowsEditor/Editor/Step/InactiveStep.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/Step/NewStep.d.ts +7 -0
- package/Components/WorkflowsEditor/Editor/Step/NewStep.js +58 -0
- package/Components/WorkflowsEditor/Editor/Step/NewStep.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/Step/Step/RemoveStep.d.ts +7 -0
- package/Components/WorkflowsEditor/Editor/Step/Step/RemoveStep.js +36 -0
- package/Components/WorkflowsEditor/Editor/Step/Step/RemoveStep.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/Step/Step.d.ts +18 -0
- package/Components/WorkflowsEditor/Editor/Step/Step.js +150 -0
- package/Components/WorkflowsEditor/Editor/Step/Step.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/WorkflowEditor.d.ts +6 -0
- package/Components/WorkflowsEditor/Editor/WorkflowEditor.js +49 -0
- package/Components/WorkflowsEditor/Editor/WorkflowEditor.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/WorkflowEditorSteps.d.ts +8 -0
- package/Components/WorkflowsEditor/Editor/WorkflowEditorSteps.js +50 -0
- package/Components/WorkflowsEditor/Editor/WorkflowEditorSteps.js.map +1 -0
- package/Components/WorkflowsEditor/Editor/WorkflowEditorView.d.ts +9 -0
- package/Components/WorkflowsEditor/Editor/WorkflowEditorView.js +31 -0
- package/Components/WorkflowsEditor/Editor/WorkflowEditorView.js.map +1 -0
- package/Components/WorkflowsEditor/WorkflowsEditor.d.ts +3 -0
- package/Components/WorkflowsEditor/WorkflowsEditor.js +8 -0
- package/Components/WorkflowsEditor/WorkflowsEditor.js.map +1 -0
- package/Components/WorkflowsEditor/WorkflowsEditorBase.d.ts +11 -0
- package/Components/WorkflowsEditor/WorkflowsEditorBase.js +42 -0
- package/Components/WorkflowsEditor/WorkflowsEditorBase.js.map +1 -0
- package/Components/WorkflowsEditor/index.d.ts +1 -0
- package/Components/WorkflowsEditor/index.js +3 -0
- package/Components/WorkflowsEditor/index.js.map +1 -0
- package/Components/WorkflowsPermissions/HasWorkflowsEditorPermission.d.ts +5 -0
- package/Components/WorkflowsPermissions/HasWorkflowsEditorPermission.js +10 -0
- package/Components/WorkflowsPermissions/HasWorkflowsEditorPermission.js.map +1 -0
- package/Components/WorkflowsPermissions/WorkflowsPermissions.d.ts +8 -0
- package/Components/WorkflowsPermissions/WorkflowsPermissions.js +22 -0
- package/Components/WorkflowsPermissions/WorkflowsPermissions.js.map +1 -0
- package/Components/WorkflowsPermissions/WorkflowsPermissionsForm.d.ts +8 -0
- package/Components/WorkflowsPermissions/WorkflowsPermissionsForm.js +61 -0
- package/Components/WorkflowsPermissions/WorkflowsPermissionsForm.js.map +1 -0
- package/Components/WorkflowsPermissions/constants.d.ts +1 -0
- package/Components/WorkflowsPermissions/constants.js +3 -0
- package/Components/WorkflowsPermissions/constants.js.map +1 -0
- package/Components/WorkflowsPermissions/index.d.ts +4 -0
- package/Components/WorkflowsPermissions/index.js +5 -0
- package/Components/WorkflowsPermissions/index.js.map +1 -0
- package/Components/WorkflowsPermissions/permissionPlugin.d.ts +2 -0
- package/Components/WorkflowsPermissions/permissionPlugin.js +11 -0
- package/Components/WorkflowsPermissions/permissionPlugin.js.map +1 -0
- package/Components/WorkflowsPermissions/useWorkflowsPermission.d.ts +5 -0
- package/Components/WorkflowsPermissions/useWorkflowsPermission.js +33 -0
- package/Components/WorkflowsPermissions/useWorkflowsPermission.js.map +1 -0
- package/Components/helpers/index.d.ts +2 -0
- package/Components/helpers/index.js +4 -0
- package/Components/helpers/index.js.map +1 -0
- package/Components/helpers/stateName.d.ts +2 -0
- package/Components/helpers/stateName.js +17 -0
- package/Components/helpers/stateName.js.map +1 -0
- package/Components/helpers/tagStateVariant.d.ts +3 -0
- package/Components/helpers/tagStateVariant.js +17 -0
- package/Components/helpers/tagStateVariant.js.map +1 -0
- package/Gateways/WorkflowNotificationTypesGateway.d.ts +10 -0
- package/Gateways/WorkflowNotificationTypesGateway.js +29 -0
- package/Gateways/WorkflowNotificationTypesGateway.js.map +1 -0
- package/Gateways/WorkflowStateGateway.d.ts +17 -0
- package/Gateways/WorkflowStateGateway.js +189 -0
- package/Gateways/WorkflowStateGateway.js.map +1 -0
- package/Gateways/WorkflowStateListGateway.d.ts +13 -0
- package/Gateways/WorkflowStateListGateway.js +88 -0
- package/Gateways/WorkflowStateListGateway.js.map +1 -0
- package/Gateways/WorkflowStatesWidgetGateway.d.ts +16 -0
- package/Gateways/WorkflowStatesWidgetGateway.js +133 -0
- package/Gateways/WorkflowStatesWidgetGateway.js.map +1 -0
- package/Gateways/WorkflowsGateway.d.ts +13 -0
- package/Gateways/WorkflowsGateway.js +77 -0
- package/Gateways/WorkflowsGateway.js.map +1 -0
- package/Gateways/abstraction/WorkflowNotificationTypesGateway.d.ts +16 -0
- package/Gateways/abstraction/WorkflowNotificationTypesGateway.js +3 -0
- package/Gateways/abstraction/WorkflowNotificationTypesGateway.js.map +1 -0
- package/Gateways/abstraction/WorkflowStateGateway.d.ts +107 -0
- package/Gateways/abstraction/WorkflowStateGateway.js +3 -0
- package/Gateways/abstraction/WorkflowStateGateway.js.map +1 -0
- package/Gateways/abstraction/WorkflowStateListGateway.d.ts +50 -0
- package/Gateways/abstraction/WorkflowStateListGateway.js +3 -0
- package/Gateways/abstraction/WorkflowStateListGateway.js.map +1 -0
- package/Gateways/abstraction/WorkflowStatesWidgetGateway.d.ts +69 -0
- package/Gateways/abstraction/WorkflowStatesWidgetGateway.js +3 -0
- package/Gateways/abstraction/WorkflowStatesWidgetGateway.js.map +1 -0
- package/Gateways/abstraction/WorkflowsGateway.d.ts +45 -0
- package/Gateways/abstraction/WorkflowsGateway.js +3 -0
- package/Gateways/abstraction/WorkflowsGateway.js.map +1 -0
- package/Gateways/graphql/workflowNotifications.d.ts +11 -0
- package/Gateways/graphql/workflowNotifications.js +26 -0
- package/Gateways/graphql/workflowNotifications.js.map +1 -0
- package/Gateways/graphql/workflowStates.d.ts +142 -0
- package/Gateways/graphql/workflowStates.js +171 -0
- package/Gateways/graphql/workflowStates.js.map +1 -0
- package/Gateways/graphql/workflows.d.ts +69 -0
- package/Gateways/graphql/workflows.js +67 -0
- package/Gateways/graphql/workflows.js.map +1 -0
- package/Gateways/index.d.ts +12 -0
- package/Gateways/index.js +7 -0
- package/Gateways/index.js.map +1 -0
- package/LICENSE +21 -0
- package/Models/WorkflowModel.d.ts +18 -0
- package/Models/WorkflowModel.js +78 -0
- package/Models/WorkflowModel.js.map +1 -0
- package/Models/WorkflowStateModel.d.ts +34 -0
- package/Models/WorkflowStateModel.js +117 -0
- package/Models/WorkflowStateModel.js.map +1 -0
- package/Models/WorkflowStateStepModel.d.ts +20 -0
- package/Models/WorkflowStateStepModel.js +44 -0
- package/Models/WorkflowStateStepModel.js.map +1 -0
- package/Models/WorkflowStepModel.d.ts +13 -0
- package/Models/WorkflowStepModel.js +29 -0
- package/Models/WorkflowStepModel.js.map +1 -0
- package/Models/abstractions/WorkflowModel.d.ts +13 -0
- package/Models/abstractions/WorkflowModel.js +3 -0
- package/Models/abstractions/WorkflowModel.js.map +1 -0
- package/Models/abstractions/WorkflowStateModel.d.ts +18 -0
- package/Models/abstractions/WorkflowStateModel.js +3 -0
- package/Models/abstractions/WorkflowStateModel.js.map +1 -0
- package/Models/abstractions/WorkflowStateStepModel.d.ts +5 -0
- package/Models/abstractions/WorkflowStateStepModel.js +3 -0
- package/Models/abstractions/WorkflowStateStepModel.js.map +1 -0
- package/Models/abstractions/WorkflowStepModel.d.ts +5 -0
- package/Models/abstractions/WorkflowStepModel.js +3 -0
- package/Models/abstractions/WorkflowStepModel.js.map +1 -0
- package/Models/index.d.ts +8 -0
- package/Models/index.js +6 -0
- package/Models/index.js.map +1 -0
- package/Presenters/WorkflowStateListPresenter.d.ts +24 -0
- package/Presenters/WorkflowStateListPresenter.js +54 -0
- package/Presenters/WorkflowStateListPresenter.js.map +1 -0
- package/Presenters/WorkflowStatePresenter.d.ts +51 -0
- package/Presenters/WorkflowStatePresenter.js +225 -0
- package/Presenters/WorkflowStatePresenter.js.map +1 -0
- package/Presenters/WorkflowStatesWidgetPresenter.d.ts +34 -0
- package/Presenters/WorkflowStatesWidgetPresenter.js +273 -0
- package/Presenters/WorkflowStatesWidgetPresenter.js.map +1 -0
- package/Presenters/WorkflowsPresenter.d.ts +31 -0
- package/Presenters/WorkflowsPresenter.js +108 -0
- package/Presenters/WorkflowsPresenter.js.map +1 -0
- package/Presenters/abstractions/WorkflowStateListPresenter.d.ts +58 -0
- package/Presenters/abstractions/WorkflowStateListPresenter.js +3 -0
- package/Presenters/abstractions/WorkflowStateListPresenter.js.map +1 -0
- package/Presenters/abstractions/WorkflowStatePresenter.d.ts +37 -0
- package/Presenters/abstractions/WorkflowStatePresenter.js +3 -0
- package/Presenters/abstractions/WorkflowStatePresenter.js.map +1 -0
- package/Presenters/abstractions/WorkflowStatesWidgetPresenter.d.ts +38 -0
- package/Presenters/abstractions/WorkflowStatesWidgetPresenter.js +3 -0
- package/Presenters/abstractions/WorkflowStatesWidgetPresenter.js.map +1 -0
- package/Presenters/abstractions/WorkflowsPresenter.d.ts +25 -0
- package/Presenters/abstractions/WorkflowsPresenter.js +3 -0
- package/Presenters/abstractions/WorkflowsPresenter.js.map +1 -0
- package/Presenters/index.d.ts +11 -0
- package/Presenters/index.js +6 -0
- package/Presenters/index.js.map +1 -0
- package/README.md +11 -0
- package/Repositories/WorkflowNotificationTypesRepository.d.ts +16 -0
- package/Repositories/WorkflowNotificationTypesRepository.js +29 -0
- package/Repositories/WorkflowNotificationTypesRepository.js.map +1 -0
- package/Repositories/WorkflowStateListRepository.d.ts +26 -0
- package/Repositories/WorkflowStateListRepository.js +74 -0
- package/Repositories/WorkflowStateListRepository.js.map +1 -0
- package/Repositories/WorkflowStateRepository.d.ts +22 -0
- package/Repositories/WorkflowStateRepository.js +131 -0
- package/Repositories/WorkflowStateRepository.js.map +1 -0
- package/Repositories/WorkflowStatesWidgetRepository.d.ts +24 -0
- package/Repositories/WorkflowStatesWidgetRepository.js +137 -0
- package/Repositories/WorkflowStatesWidgetRepository.js.map +1 -0
- package/Repositories/WorkflowsRepository.d.ts +21 -0
- package/Repositories/WorkflowsRepository.js +86 -0
- package/Repositories/WorkflowsRepository.js.map +1 -0
- package/Repositories/abstractions/WorkflowNotificationTypesRepository.d.ts +7 -0
- package/Repositories/abstractions/WorkflowNotificationTypesRepository.js +3 -0
- package/Repositories/abstractions/WorkflowNotificationTypesRepository.js.map +1 -0
- package/Repositories/abstractions/WorkflowStateListRepository.d.ts +13 -0
- package/Repositories/abstractions/WorkflowStateListRepository.js +3 -0
- package/Repositories/abstractions/WorkflowStateListRepository.js.map +1 -0
- package/Repositories/abstractions/WorkflowStateRepository.d.ts +37 -0
- package/Repositories/abstractions/WorkflowStateRepository.js +3 -0
- package/Repositories/abstractions/WorkflowStateRepository.js.map +1 -0
- package/Repositories/abstractions/WorkflowStatesWidgetRepository.d.ts +36 -0
- package/Repositories/abstractions/WorkflowStatesWidgetRepository.js +3 -0
- package/Repositories/abstractions/WorkflowStatesWidgetRepository.js.map +1 -0
- package/Repositories/abstractions/WorkflowsRepository.d.ts +17 -0
- package/Repositories/abstractions/WorkflowsRepository.js +3 -0
- package/Repositories/abstractions/WorkflowsRepository.js.map +1 -0
- package/Repositories/index.d.ts +13 -0
- package/Repositories/index.js +7 -0
- package/Repositories/index.js.map +1 -0
- package/hooks/canUseWorkflows.d.ts +3 -0
- package/hooks/canUseWorkflows.js +10 -0
- package/hooks/canUseWorkflows.js.map +1 -0
- package/index.d.ts +56 -0
- package/index.js +42 -0
- package/index.js.map +1 -0
- package/package.json +50 -0
- package/routes.d.ts +10 -0
- package/routes.js +18 -0
- package/routes.js.map +1 -0
- package/types.d.ts +90 -0
- package/types.js +19 -0
- package/types.js.map +1 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { IWorkflow, IWorkflowState, IWorkflowStateStep } from "../../types.js";
|
|
2
|
+
import type { IWorkflowStateError } from "../../Gateways/abstraction/WorkflowStateGateway.js";
|
|
3
|
+
export interface IWorkflowStatePresenterViewModelDialog {
|
|
4
|
+
type: "cancelReview" | "requestReview" | "start" | "start:success" | "approve" | "approve:success" | "reject" | "reject:success" | "comment" | "takeOver" | "takeOver:success";
|
|
5
|
+
step?: IWorkflowStateStep | null;
|
|
6
|
+
}
|
|
7
|
+
export interface IWorkflowStatePresenterViewModel {
|
|
8
|
+
id: string;
|
|
9
|
+
app: string;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
workflow: IWorkflow | null;
|
|
12
|
+
error: IWorkflowStateError | null;
|
|
13
|
+
state: IWorkflowState | null | undefined;
|
|
14
|
+
step: IWorkflowStateStep | null | undefined;
|
|
15
|
+
lastApprovedStep: IWorkflowStateStep | null;
|
|
16
|
+
lastRejectedStep: IWorkflowStateStep | null;
|
|
17
|
+
nextStep: IWorkflowStateStep | null;
|
|
18
|
+
canCancel: boolean;
|
|
19
|
+
dialog: IWorkflowStatePresenterViewModelDialog | null;
|
|
20
|
+
}
|
|
21
|
+
export interface IWorkflowStatePresenter {
|
|
22
|
+
vm: IWorkflowStatePresenterViewModel;
|
|
23
|
+
requestReview(): void;
|
|
24
|
+
hideDialog(): void;
|
|
25
|
+
showCancelReviewDialog(): void;
|
|
26
|
+
showRequestReviewDialog(): void;
|
|
27
|
+
showStartDialog(): void;
|
|
28
|
+
showApproveDialog(): void;
|
|
29
|
+
showRejectDialog(): void;
|
|
30
|
+
showCommentDialog(id: string): void;
|
|
31
|
+
showTakeOverDialog(): void;
|
|
32
|
+
start(): void;
|
|
33
|
+
approve(comment?: string): void;
|
|
34
|
+
reject(comment: string): void;
|
|
35
|
+
cancel(): void;
|
|
36
|
+
takeOver(): void;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["WorkflowStatePresenter.ts"],"sourcesContent":["import type { IWorkflow, IWorkflowState, IWorkflowStateStep } from \"~/types.js\";\nimport type { IWorkflowStateError } from \"~/Gateways/abstraction/WorkflowStateGateway.js\";\n\nexport interface IWorkflowStatePresenterViewModelDialog {\n type:\n | \"cancelReview\"\n | \"requestReview\"\n | \"start\"\n | \"start:success\"\n | \"approve\"\n | \"approve:success\"\n | \"reject\"\n | \"reject:success\"\n | \"comment\"\n | \"takeOver\"\n | \"takeOver:success\";\n step?: IWorkflowStateStep | null;\n}\n\nexport interface IWorkflowStatePresenterViewModel {\n id: string;\n app: string;\n loading: boolean;\n workflow: IWorkflow | null;\n error: IWorkflowStateError | null;\n state: IWorkflowState | null | undefined;\n step: IWorkflowStateStep | null | undefined;\n lastApprovedStep: IWorkflowStateStep | null;\n lastRejectedStep: IWorkflowStateStep | null;\n nextStep: IWorkflowStateStep | null;\n canCancel: boolean;\n dialog: IWorkflowStatePresenterViewModelDialog | null;\n}\n\nexport interface IWorkflowStatePresenter {\n vm: IWorkflowStatePresenterViewModel;\n requestReview(): void;\n hideDialog(): void;\n showCancelReviewDialog(): void;\n showRequestReviewDialog(): void;\n showStartDialog(): void;\n showApproveDialog(): void;\n showRejectDialog(): void;\n showCommentDialog(id: string): void;\n showTakeOverDialog(): void;\n start(): void;\n approve(comment?: string): void;\n reject(comment: string): void;\n cancel(): void;\n takeOver(): void;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type IGenericError, type IWorkflowState, WorkflowStateValue } from "../../types.js";
|
|
2
|
+
import type { NonEmptyArray } from "@webiny/app/types.js";
|
|
3
|
+
export interface IWorkflowStatesWidgetPresenterViewModelValuesItem {
|
|
4
|
+
items: IWorkflowState[];
|
|
5
|
+
total: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IWorkflowStatesWidgetPresenterViewModelValues {
|
|
8
|
+
[key: string]: IWorkflowStatesWidgetPresenterViewModelValuesItem;
|
|
9
|
+
}
|
|
10
|
+
export interface IWorkflowStatesWidgetPresenterViewModel {
|
|
11
|
+
type: "own" | "requested";
|
|
12
|
+
loading: boolean;
|
|
13
|
+
error: IGenericError | null;
|
|
14
|
+
dialogLoading: boolean;
|
|
15
|
+
dialogError: IGenericError | null;
|
|
16
|
+
values: IWorkflowStatesWidgetPresenterViewModelValues;
|
|
17
|
+
states: NonEmptyArray<WorkflowStateValue>;
|
|
18
|
+
showStartDialog: IWorkflowState | null;
|
|
19
|
+
showStartSuccessDialog: IWorkflowState | null;
|
|
20
|
+
showApproveDialog: IWorkflowState | null;
|
|
21
|
+
showApproveSuccessDialog: IWorkflowState | null;
|
|
22
|
+
showRejectDialog: IWorkflowState | null;
|
|
23
|
+
showRejectSuccessDialog: IWorkflowState | null;
|
|
24
|
+
showTakeOverDialog: IWorkflowState | null;
|
|
25
|
+
showTakeOverSuccessDialog: IWorkflowState | null;
|
|
26
|
+
}
|
|
27
|
+
export interface IWorkflowStatesWidgetPresenter {
|
|
28
|
+
vm: IWorkflowStatesWidgetPresenterViewModel;
|
|
29
|
+
takeOverStateStep(state: IWorkflowState): Promise<void>;
|
|
30
|
+
startStateStep(state: IWorkflowState): Promise<void>;
|
|
31
|
+
approveStateStep(state: IWorkflowState, comment?: string): Promise<void>;
|
|
32
|
+
rejectStateStep(state: IWorkflowState, comment: string): Promise<void>;
|
|
33
|
+
showStartStateStepDialog(state: IWorkflowState): void;
|
|
34
|
+
showApproveStateStepDialog(state: IWorkflowState): void;
|
|
35
|
+
showRejectStateStepDialog(state: IWorkflowState): void;
|
|
36
|
+
showTakeOverStateStepDialog(state: IWorkflowState): void;
|
|
37
|
+
hideDialog(): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["WorkflowStatesWidgetPresenter.ts"],"sourcesContent":["import { type IGenericError, type IWorkflowState, WorkflowStateValue } from \"~/types.js\";\nimport type { NonEmptyArray } from \"@webiny/app/types.js\";\n\nexport interface IWorkflowStatesWidgetPresenterViewModelValuesItem {\n items: IWorkflowState[];\n total: number;\n}\n\nexport interface IWorkflowStatesWidgetPresenterViewModelValues {\n [key: string]: IWorkflowStatesWidgetPresenterViewModelValuesItem;\n}\n\nexport interface IWorkflowStatesWidgetPresenterViewModel {\n type: \"own\" | \"requested\";\n loading: boolean;\n error: IGenericError | null;\n dialogLoading: boolean;\n dialogError: IGenericError | null;\n values: IWorkflowStatesWidgetPresenterViewModelValues;\n states: NonEmptyArray<WorkflowStateValue>;\n showStartDialog: IWorkflowState | null;\n showStartSuccessDialog: IWorkflowState | null;\n showApproveDialog: IWorkflowState | null;\n showApproveSuccessDialog: IWorkflowState | null;\n showRejectDialog: IWorkflowState | null;\n showRejectSuccessDialog: IWorkflowState | null;\n showTakeOverDialog: IWorkflowState | null;\n showTakeOverSuccessDialog: IWorkflowState | null;\n}\n\nexport interface IWorkflowStatesWidgetPresenter {\n vm: IWorkflowStatesWidgetPresenterViewModel;\n takeOverStateStep(state: IWorkflowState): Promise<void>;\n startStateStep(state: IWorkflowState): Promise<void>;\n approveStateStep(state: IWorkflowState, comment?: string): Promise<void>;\n rejectStateStep(state: IWorkflowState, comment: string): Promise<void>;\n showStartStateStepDialog(state: IWorkflowState): void;\n showApproveStateStepDialog(state: IWorkflowState): void;\n showRejectStateStepDialog(state: IWorkflowState): void;\n showTakeOverStateStepDialog(state: IWorkflowState): void;\n hideDialog(): void;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IWorkflow, IWorkflowApplication, IWorkflowNotificationType, IWorkflowStep } from "../../types.js";
|
|
2
|
+
import type { IWorkflowError } from "../../Gateways/index.js";
|
|
3
|
+
import type { IWorkflowModel } from "../../Models/index.js";
|
|
4
|
+
export interface IWorkflowsViewModel {
|
|
5
|
+
dirty: boolean;
|
|
6
|
+
workflows: IWorkflow[];
|
|
7
|
+
notifications: IWorkflowNotificationType[];
|
|
8
|
+
workflow: IWorkflow | null;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
error: IWorkflowError | null;
|
|
11
|
+
app: IWorkflowApplication;
|
|
12
|
+
}
|
|
13
|
+
export interface IWorkflowsPresenter {
|
|
14
|
+
vm: IWorkflowsViewModel;
|
|
15
|
+
getWorkflow(): IWorkflowModel;
|
|
16
|
+
updateWorkflow(workflow: IWorkflow): void;
|
|
17
|
+
deleteWorkflow(workflow: IWorkflow): void;
|
|
18
|
+
removeStep(step: Pick<IWorkflowStep, "id">): void;
|
|
19
|
+
updateStep(step: IWorkflowStep): void;
|
|
20
|
+
addStep(step: IWorkflowStep): void;
|
|
21
|
+
canMoveStepUp(step: Pick<IWorkflowStep, "id">): boolean;
|
|
22
|
+
moveStepUp(step: Pick<IWorkflowStep, "id">): void;
|
|
23
|
+
canMoveStepDown(step: Pick<IWorkflowStep, "id">): boolean;
|
|
24
|
+
moveStepDown(step: Pick<IWorkflowStep, "id">): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["WorkflowsPresenter.ts"],"sourcesContent":["import type {\n IWorkflow,\n IWorkflowApplication,\n IWorkflowNotificationType,\n IWorkflowStep\n} from \"~/types.js\";\nimport type { IWorkflowError } from \"~/Gateways/index.js\";\nimport type { IWorkflowModel } from \"~/Models/index.js\";\n\nexport interface IWorkflowsViewModel {\n dirty: boolean;\n workflows: IWorkflow[];\n notifications: IWorkflowNotificationType[];\n workflow: IWorkflow | null;\n loading: boolean;\n error: IWorkflowError | null;\n app: IWorkflowApplication;\n}\n\nexport interface IWorkflowsPresenter {\n vm: IWorkflowsViewModel;\n getWorkflow(): IWorkflowModel;\n updateWorkflow(workflow: IWorkflow): void;\n deleteWorkflow(workflow: IWorkflow): void;\n removeStep(step: Pick<IWorkflowStep, \"id\">): void;\n updateStep(step: IWorkflowStep): void;\n addStep(step: IWorkflowStep): void;\n canMoveStepUp(step: Pick<IWorkflowStep, \"id\">): boolean;\n moveStepUp(step: Pick<IWorkflowStep, \"id\">): void;\n canMoveStepDown(step: Pick<IWorkflowStep, \"id\">): boolean;\n moveStepDown(step: Pick<IWorkflowStep, \"id\">): void;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type { IWorkflowsViewModel, IWorkflowsPresenter } from "./abstractions/WorkflowsPresenter.js";
|
|
2
|
+
export { WorkflowsPresenter } from "./WorkflowsPresenter.js";
|
|
3
|
+
export type { IWorkflowsPresenterParams } from "./WorkflowsPresenter.js";
|
|
4
|
+
export type { IWorkflowStatePresenterViewModel, IWorkflowStatePresenter } from "./abstractions/WorkflowStatePresenter.js";
|
|
5
|
+
export { WorkflowStatePresenter } from "./WorkflowStatePresenter.js";
|
|
6
|
+
export type { IWorkflowStatePresenterParams } from "./WorkflowStatePresenter.js";
|
|
7
|
+
export type { IWorkflowStatesWidgetPresenterViewModel, IWorkflowStatesWidgetPresenter } from "./abstractions/WorkflowStatesWidgetPresenter.js";
|
|
8
|
+
export { WorkflowStatesWidgetPresenter } from "./WorkflowStatesWidgetPresenter.js";
|
|
9
|
+
export type { IWorkflowStatesWidgetPresenterParams } from "./WorkflowStatesWidgetPresenter.js";
|
|
10
|
+
export type { IWorkflowStateListPresenterViewModel, IWorkflowStateListPresenter, IWorkflowStateListPresenterListParams, IWorkflowStateListPresenterListParamsWhere, IWorkflowStateListPresenterListParamsWhereTeams, IWorkflowStateListPresenterListParamsWhereSteps, IWorkflowStateListPresenterListParamsWhereNotifications } from "./abstractions/WorkflowStateListPresenter.js";
|
|
11
|
+
export { WorkflowStateListPresenter } from "./WorkflowStateListPresenter.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { WorkflowsPresenter } from "./WorkflowsPresenter.js";
|
|
2
|
+
export { WorkflowStatePresenter } from "./WorkflowStatePresenter.js";
|
|
3
|
+
export { WorkflowStatesWidgetPresenter } from "./WorkflowStatesWidgetPresenter.js";
|
|
4
|
+
export { WorkflowStateListPresenter } from "./WorkflowStateListPresenter.js";
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["WorkflowsPresenter","WorkflowStatePresenter","WorkflowStatesWidgetPresenter","WorkflowStateListPresenter"],"sources":["index.ts"],"sourcesContent":["export type {\n IWorkflowsViewModel,\n IWorkflowsPresenter\n} from \"./abstractions/WorkflowsPresenter.js\";\nexport { WorkflowsPresenter } from \"./WorkflowsPresenter.js\";\nexport type { IWorkflowsPresenterParams } from \"./WorkflowsPresenter.js\";\n\nexport type {\n IWorkflowStatePresenterViewModel,\n IWorkflowStatePresenter\n} from \"./abstractions/WorkflowStatePresenter.js\";\n\nexport { WorkflowStatePresenter } from \"./WorkflowStatePresenter.js\";\nexport type { IWorkflowStatePresenterParams } from \"./WorkflowStatePresenter.js\";\n\nexport type {\n IWorkflowStatesWidgetPresenterViewModel,\n IWorkflowStatesWidgetPresenter\n} from \"./abstractions/WorkflowStatesWidgetPresenter.js\";\nexport { WorkflowStatesWidgetPresenter } from \"./WorkflowStatesWidgetPresenter.js\";\nexport type { IWorkflowStatesWidgetPresenterParams } from \"./WorkflowStatesWidgetPresenter.js\";\n\nexport type {\n IWorkflowStateListPresenterViewModel,\n IWorkflowStateListPresenter,\n IWorkflowStateListPresenterListParams,\n IWorkflowStateListPresenterListParamsWhere,\n IWorkflowStateListPresenterListParamsWhereTeams,\n IWorkflowStateListPresenterListParamsWhereSteps,\n IWorkflowStateListPresenterListParamsWhereNotifications\n} from \"./abstractions/WorkflowStateListPresenter.js\";\nexport { WorkflowStateListPresenter } from \"./WorkflowStateListPresenter.js\";\n"],"mappings":"AAIA,SAASA,kBAAkB;AAQ3B,SAASC,sBAAsB;AAO/B,SAASC,6BAA6B;AAYtC,SAASC,0BAA0B","ignoreList":[]}
|
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @webiny/app-workflows
|
|
2
|
+
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> This package is part of the [Webiny](https://www.webiny.com) monorepo.
|
|
5
|
+
> It’s **included in every Webiny project by default** and is not meant to be used as a standalone package.
|
|
6
|
+
|
|
7
|
+
📘 **Documentation:** [https://www.webiny.com/docs](https://www.webiny.com/docs)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
_This README file is automatically generated during the publish process._
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IWorkflowNotificationTypesRepository } from "./abstractions/WorkflowNotificationTypesRepository.js";
|
|
2
|
+
import type { IWorkflowNotificationType } from "../types.js";
|
|
3
|
+
import type { IWorkflowNotificationTypesGateway } from "../Gateways/abstraction/WorkflowNotificationTypesGateway.js";
|
|
4
|
+
import type { IWorkflowError } from "../Gateways/index.js";
|
|
5
|
+
export interface IWorkflowNotificationTypesRepositoryParams {
|
|
6
|
+
gateway: IWorkflowNotificationTypesGateway;
|
|
7
|
+
}
|
|
8
|
+
export declare class WorkflowNotificationTypesRepository implements IWorkflowNotificationTypesRepository {
|
|
9
|
+
private readonly gateway;
|
|
10
|
+
private _loading;
|
|
11
|
+
private _error;
|
|
12
|
+
get error(): IWorkflowError | null;
|
|
13
|
+
get loading(): boolean;
|
|
14
|
+
constructor(params: IWorkflowNotificationTypesRepositoryParams);
|
|
15
|
+
list(): Promise<IWorkflowNotificationType[]>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { makeAutoObservable, runInAction } from "mobx";
|
|
2
|
+
export class WorkflowNotificationTypesRepository {
|
|
3
|
+
_loading = true;
|
|
4
|
+
_error = null;
|
|
5
|
+
get error() {
|
|
6
|
+
return this._error;
|
|
7
|
+
}
|
|
8
|
+
get loading() {
|
|
9
|
+
return this._loading;
|
|
10
|
+
}
|
|
11
|
+
constructor(params) {
|
|
12
|
+
this.gateway = params.gateway;
|
|
13
|
+
makeAutoObservable(this);
|
|
14
|
+
}
|
|
15
|
+
async list() {
|
|
16
|
+
runInAction(() => {
|
|
17
|
+
this._loading = true;
|
|
18
|
+
this._error = null;
|
|
19
|
+
});
|
|
20
|
+
const results = await this.gateway.list();
|
|
21
|
+
runInAction(() => {
|
|
22
|
+
this._loading = false;
|
|
23
|
+
this._error = results.error;
|
|
24
|
+
});
|
|
25
|
+
return results.data || [];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=WorkflowNotificationTypesRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","runInAction","WorkflowNotificationTypesRepository","_loading","_error","error","loading","constructor","params","gateway","list","results","data"],"sources":["WorkflowNotificationTypesRepository.ts"],"sourcesContent":["import type { IWorkflowNotificationTypesRepository } from \"./abstractions/WorkflowNotificationTypesRepository.js\";\nimport { makeAutoObservable, runInAction } from \"mobx\";\nimport type { IWorkflowNotificationType } from \"~/types.js\";\nimport type { IWorkflowNotificationTypesGateway } from \"~/Gateways/abstraction/WorkflowNotificationTypesGateway.js\";\nimport type { IWorkflowError } from \"~/Gateways/index.js\";\n\nexport interface IWorkflowNotificationTypesRepositoryParams {\n gateway: IWorkflowNotificationTypesGateway;\n}\n\nexport class WorkflowNotificationTypesRepository implements IWorkflowNotificationTypesRepository {\n private readonly gateway;\n private _loading: boolean = true;\n private _error: IWorkflowError | null = null;\n\n public get error(): IWorkflowError | null {\n return this._error;\n }\n\n public get loading(): boolean {\n return this._loading;\n }\n\n public constructor(params: IWorkflowNotificationTypesRepositoryParams) {\n this.gateway = params.gateway;\n\n makeAutoObservable(this);\n }\n\n public async list(): Promise<IWorkflowNotificationType[]> {\n runInAction(() => {\n this._loading = true;\n this._error = null;\n });\n\n const results = await this.gateway.list();\n\n runInAction(() => {\n this._loading = false;\n this._error = results.error;\n });\n return results.data || [];\n }\n}\n"],"mappings":"AACA,SAASA,kBAAkB,EAAEC,WAAW,QAAQ,MAAM;AAStD,OAAO,MAAMC,mCAAmC,CAAiD;EAErFC,QAAQ,GAAY,IAAI;EACxBC,MAAM,GAA0B,IAAI;EAE5C,IAAWC,KAAKA,CAAA,EAA0B;IACtC,OAAO,IAAI,CAACD,MAAM;EACtB;EAEA,IAAWE,OAAOA,CAAA,EAAY;IAC1B,OAAO,IAAI,CAACH,QAAQ;EACxB;EAEOI,WAAWA,CAACC,MAAkD,EAAE;IACnE,IAAI,CAACC,OAAO,GAAGD,MAAM,CAACC,OAAO;IAE7BT,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEA,MAAaU,IAAIA,CAAA,EAAyC;IACtDT,WAAW,CAAC,MAAM;MACd,IAAI,CAACE,QAAQ,GAAG,IAAI;MACpB,IAAI,CAACC,MAAM,GAAG,IAAI;IACtB,CAAC,CAAC;IAEF,MAAMO,OAAO,GAAG,MAAM,IAAI,CAACF,OAAO,CAACC,IAAI,CAAC,CAAC;IAEzCT,WAAW,CAAC,MAAM;MACd,IAAI,CAACE,QAAQ,GAAG,KAAK;MACrB,IAAI,CAACC,MAAM,GAAGO,OAAO,CAACN,KAAK;IAC/B,CAAC,CAAC;IACF,OAAOM,OAAO,CAACC,IAAI,IAAI,EAAE;EAC7B;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IWorkflowStateListRepository, IWorkflowStateListRepositoryListParams, WorkflowStateListRepositoryType } from "../Repositories/abstractions/WorkflowStateListRepository.js";
|
|
2
|
+
import { type IGenericError, type IGenericMeta, type IWorkflowState } from "../types.js";
|
|
3
|
+
import type { IWorkflowStateListGateway } from "../Gateways/index.js";
|
|
4
|
+
interface IWorkflowStateListRepositoryParams {
|
|
5
|
+
gateway: IWorkflowStateListGateway;
|
|
6
|
+
type: WorkflowStateListRepositoryType;
|
|
7
|
+
}
|
|
8
|
+
export declare class WorkflowStateListRepository implements IWorkflowStateListRepository {
|
|
9
|
+
#private;
|
|
10
|
+
private _type;
|
|
11
|
+
readonly items: import("mobx").IObservableArray<IWorkflowState>;
|
|
12
|
+
private readonly _meta;
|
|
13
|
+
private _loading;
|
|
14
|
+
private _error;
|
|
15
|
+
private snapshot;
|
|
16
|
+
get meta(): IGenericMeta;
|
|
17
|
+
get loading(): boolean;
|
|
18
|
+
get error(): IGenericError | null;
|
|
19
|
+
get type(): WorkflowStateListRepositoryType;
|
|
20
|
+
constructor(params: IWorkflowStateListRepositoryParams);
|
|
21
|
+
setType(type: WorkflowStateListRepositoryType): void;
|
|
22
|
+
list(params: IWorkflowStateListRepositoryListParams): Promise<void>;
|
|
23
|
+
private listByType;
|
|
24
|
+
private createSnapshot;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { makeAutoObservable, observable, runInAction } from "mobx";
|
|
2
|
+
export class WorkflowStateListRepository {
|
|
3
|
+
#gateway;
|
|
4
|
+
_loading = false;
|
|
5
|
+
_error = null;
|
|
6
|
+
snapshot = "";
|
|
7
|
+
get meta() {
|
|
8
|
+
return this._meta;
|
|
9
|
+
}
|
|
10
|
+
get loading() {
|
|
11
|
+
return this._loading;
|
|
12
|
+
}
|
|
13
|
+
get error() {
|
|
14
|
+
return this._error;
|
|
15
|
+
}
|
|
16
|
+
get type() {
|
|
17
|
+
return this._type;
|
|
18
|
+
}
|
|
19
|
+
constructor(params) {
|
|
20
|
+
this.#gateway = params.gateway;
|
|
21
|
+
this._type = params.type;
|
|
22
|
+
this.items = observable.array([]);
|
|
23
|
+
this._meta = observable.object({
|
|
24
|
+
cursor: null,
|
|
25
|
+
hasMoreItems: false,
|
|
26
|
+
totalCount: 0
|
|
27
|
+
});
|
|
28
|
+
makeAutoObservable(this);
|
|
29
|
+
}
|
|
30
|
+
setType(type) {
|
|
31
|
+
runInAction(() => {
|
|
32
|
+
this._type = type;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
async list(params) {
|
|
36
|
+
const paramsSnapshot = this.createSnapshot(params);
|
|
37
|
+
runInAction(() => {
|
|
38
|
+
this._error = null;
|
|
39
|
+
this._loading = true;
|
|
40
|
+
});
|
|
41
|
+
const response = await this.listByType(params);
|
|
42
|
+
runInAction(() => {
|
|
43
|
+
this._error = response.error;
|
|
44
|
+
this._loading = false;
|
|
45
|
+
if (response.error || !response.data) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (paramsSnapshot !== this.snapshot) {
|
|
49
|
+
this.snapshot = paramsSnapshot;
|
|
50
|
+
this.items.replace(response.data);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
this.items.push(...response.data);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
listByType(params) {
|
|
57
|
+
if (this._type === "own") {
|
|
58
|
+
return this.#gateway.listOwn(params);
|
|
59
|
+
} else if (this._type === "requested") {
|
|
60
|
+
return this.#gateway.listRequested(params);
|
|
61
|
+
}
|
|
62
|
+
return this.#gateway.list(params);
|
|
63
|
+
}
|
|
64
|
+
createSnapshot(input) {
|
|
65
|
+
const value = structuredClone({
|
|
66
|
+
...input,
|
|
67
|
+
__repositoryType: this._type
|
|
68
|
+
});
|
|
69
|
+
delete value.after;
|
|
70
|
+
return JSON.stringify(value);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=WorkflowStateListRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","observable","runInAction","WorkflowStateListRepository","gateway","_loading","_error","snapshot","meta","_meta","loading","error","type","_type","constructor","params","items","array","object","cursor","hasMoreItems","totalCount","setType","list","paramsSnapshot","createSnapshot","response","listByType","data","replace","push","listOwn","listRequested","input","value","structuredClone","__repositoryType","after","JSON","stringify"],"sources":["WorkflowStateListRepository.ts"],"sourcesContent":["import type {\n IWorkflowStateListRepository,\n IWorkflowStateListRepositoryListParams,\n WorkflowStateListRepositoryType\n} from \"~/Repositories/abstractions/WorkflowStateListRepository.js\";\nimport { type IGenericError, type IGenericMeta, type IWorkflowState } from \"~/types.js\";\nimport { makeAutoObservable, observable, runInAction } from \"mobx\";\nimport type { IWorkflowStateListGateway } from \"~/Gateways/index.js\";\n\ninterface IWorkflowStateListRepositoryParams {\n gateway: IWorkflowStateListGateway;\n type: WorkflowStateListRepositoryType;\n}\n\nexport class WorkflowStateListRepository implements IWorkflowStateListRepository {\n readonly #gateway;\n private _type;\n\n public readonly items;\n private readonly _meta;\n private _loading: boolean = false;\n private _error: IGenericError | null = null;\n private snapshot = \"\";\n\n public get meta(): IGenericMeta {\n return this._meta;\n }\n\n public get loading(): boolean {\n return this._loading;\n }\n\n public get error(): IGenericError | null {\n return this._error;\n }\n\n public get type() {\n return this._type;\n }\n\n public constructor(params: IWorkflowStateListRepositoryParams) {\n this.#gateway = params.gateway;\n this._type = params.type;\n\n this.items = observable.array<IWorkflowState>([]);\n this._meta = observable.object<IGenericMeta>({\n cursor: null,\n hasMoreItems: false,\n totalCount: 0\n });\n\n makeAutoObservable(this);\n }\n\n public setType(type: WorkflowStateListRepositoryType) {\n runInAction(() => {\n this._type = type;\n });\n }\n\n public async list(params: IWorkflowStateListRepositoryListParams): Promise<void> {\n const paramsSnapshot = this.createSnapshot(params);\n runInAction(() => {\n this._error = null;\n this._loading = true;\n });\n\n const response = await this.listByType(params);\n\n runInAction(() => {\n this._error = response.error;\n this._loading = false;\n if (response.error || !response.data) {\n return;\n }\n\n if (paramsSnapshot !== this.snapshot) {\n this.snapshot = paramsSnapshot;\n this.items.replace(response.data);\n return;\n }\n this.items.push(...response.data);\n });\n }\n\n private listByType(params: IWorkflowStateListRepositoryListParams) {\n if (this._type === \"own\") {\n return this.#gateway.listOwn(params);\n } else if (this._type === \"requested\") {\n return this.#gateway.listRequested(params);\n }\n return this.#gateway.list(params);\n }\n\n private createSnapshot(input: IWorkflowStateListRepositoryListParams): string {\n const value = structuredClone({\n ...input,\n __repositoryType: this._type\n });\n delete value.after;\n return JSON.stringify(value);\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IWorkflowStateRepository, IWorkflowStateRepositoryApproveParams, IWorkflowStateRepositoryFindOneParams, IWorkflowStateRepositoryRejectParams, IWorkflowStateRepositoryRequestReviewParams, IWorkflowStateRepositoryStartParams, IWorkflowStateRepositoryTakeOverParams } from "./abstractions/WorkflowStateRepository.js";
|
|
2
|
+
import type { IWorkflowStateError, IWorkflowStateGateway } from "../Gateways/abstraction/WorkflowStateGateway.js";
|
|
3
|
+
import type { IWorkflowState } from "../types.js";
|
|
4
|
+
export interface IWorkflowStateRepositoryParams {
|
|
5
|
+
gateway: IWorkflowStateGateway;
|
|
6
|
+
}
|
|
7
|
+
export declare class WorkflowStateRepository implements IWorkflowStateRepository {
|
|
8
|
+
private readonly gateway;
|
|
9
|
+
private _error;
|
|
10
|
+
private _loading;
|
|
11
|
+
get error(): IWorkflowStateError | null;
|
|
12
|
+
get loading(): boolean;
|
|
13
|
+
constructor(params: IWorkflowStateRepositoryParams);
|
|
14
|
+
start(params: IWorkflowStateRepositoryStartParams): Promise<IWorkflowState | null>;
|
|
15
|
+
approve(params: IWorkflowStateRepositoryApproveParams): Promise<IWorkflowState | null>;
|
|
16
|
+
reject(params: IWorkflowStateRepositoryRejectParams): Promise<IWorkflowState | null>;
|
|
17
|
+
cancel(id: string): Promise<void>;
|
|
18
|
+
takeOver(params: IWorkflowStateRepositoryTakeOverParams): Promise<IWorkflowState | null>;
|
|
19
|
+
findOne(params: IWorkflowStateRepositoryFindOneParams): Promise<IWorkflowState | null>;
|
|
20
|
+
requestReview(params: IWorkflowStateRepositoryRequestReviewParams): Promise<IWorkflowState | null>;
|
|
21
|
+
getTargetState(app: string, targetRevisionId: string): Promise<IWorkflowState | null>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { makeAutoObservable, runInAction } from "mobx";
|
|
2
|
+
export class WorkflowStateRepository {
|
|
3
|
+
_error = null;
|
|
4
|
+
_loading = false;
|
|
5
|
+
get error() {
|
|
6
|
+
return this._error;
|
|
7
|
+
}
|
|
8
|
+
get loading() {
|
|
9
|
+
return this._loading;
|
|
10
|
+
}
|
|
11
|
+
constructor(params) {
|
|
12
|
+
this.gateway = params.gateway;
|
|
13
|
+
makeAutoObservable(this);
|
|
14
|
+
}
|
|
15
|
+
async start(params) {
|
|
16
|
+
runInAction(() => {
|
|
17
|
+
this._loading = true;
|
|
18
|
+
this._error = null;
|
|
19
|
+
});
|
|
20
|
+
const result = await this.gateway.startWorkflowStateStep(params);
|
|
21
|
+
runInAction(() => {
|
|
22
|
+
this._error = result.error;
|
|
23
|
+
this._loading = false;
|
|
24
|
+
});
|
|
25
|
+
return result.data;
|
|
26
|
+
}
|
|
27
|
+
async approve(params) {
|
|
28
|
+
runInAction(() => {
|
|
29
|
+
this._loading = true;
|
|
30
|
+
this._error = null;
|
|
31
|
+
});
|
|
32
|
+
const result = await this.gateway.approveWorkflowStateStep(params);
|
|
33
|
+
runInAction(() => {
|
|
34
|
+
this._error = result.error;
|
|
35
|
+
this._loading = false;
|
|
36
|
+
});
|
|
37
|
+
return result.data;
|
|
38
|
+
}
|
|
39
|
+
async reject(params) {
|
|
40
|
+
runInAction(() => {
|
|
41
|
+
this._loading = true;
|
|
42
|
+
this._error = null;
|
|
43
|
+
});
|
|
44
|
+
const result = await this.gateway.rejectWorkflowStateStep(params);
|
|
45
|
+
runInAction(() => {
|
|
46
|
+
this._error = result.error;
|
|
47
|
+
this._loading = false;
|
|
48
|
+
});
|
|
49
|
+
return result.data;
|
|
50
|
+
}
|
|
51
|
+
async cancel(id) {
|
|
52
|
+
runInAction(() => {
|
|
53
|
+
this._loading = true;
|
|
54
|
+
this._error = null;
|
|
55
|
+
});
|
|
56
|
+
const result = await this.gateway.cancelWorkflowState(id);
|
|
57
|
+
runInAction(() => {
|
|
58
|
+
this._error = result.error;
|
|
59
|
+
this._loading = false;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
async takeOver(params) {
|
|
63
|
+
runInAction(() => {
|
|
64
|
+
this._loading = true;
|
|
65
|
+
this._error = null;
|
|
66
|
+
});
|
|
67
|
+
const result = await this.gateway.takeOverWorkflowStateStep(params);
|
|
68
|
+
runInAction(() => {
|
|
69
|
+
this._error = result.error;
|
|
70
|
+
this._loading = false;
|
|
71
|
+
});
|
|
72
|
+
return result.data;
|
|
73
|
+
}
|
|
74
|
+
async findOne(params) {
|
|
75
|
+
const {
|
|
76
|
+
app,
|
|
77
|
+
targetRevisionId
|
|
78
|
+
} = params;
|
|
79
|
+
runInAction(() => {
|
|
80
|
+
this._loading = true;
|
|
81
|
+
this._error = null;
|
|
82
|
+
});
|
|
83
|
+
const result = await this.gateway.listWorkflowStates({
|
|
84
|
+
where: {
|
|
85
|
+
app,
|
|
86
|
+
targetRevisionId
|
|
87
|
+
},
|
|
88
|
+
limit: 1
|
|
89
|
+
});
|
|
90
|
+
runInAction(() => {
|
|
91
|
+
this._error = result.error;
|
|
92
|
+
this._loading = false;
|
|
93
|
+
});
|
|
94
|
+
return result.data?.[0] || null;
|
|
95
|
+
}
|
|
96
|
+
async requestReview(params) {
|
|
97
|
+
const {
|
|
98
|
+
app,
|
|
99
|
+
targetRevisionId,
|
|
100
|
+
title
|
|
101
|
+
} = params;
|
|
102
|
+
runInAction(() => {
|
|
103
|
+
this._loading = true;
|
|
104
|
+
this._error = null;
|
|
105
|
+
});
|
|
106
|
+
const result = await this.gateway.createWorkflowState({
|
|
107
|
+
app,
|
|
108
|
+
targetRevisionId,
|
|
109
|
+
title
|
|
110
|
+
});
|
|
111
|
+
runInAction(() => {
|
|
112
|
+
this._error = result.error;
|
|
113
|
+
this._loading = false;
|
|
114
|
+
});
|
|
115
|
+
return result.data || null;
|
|
116
|
+
}
|
|
117
|
+
async getTargetState(app, targetRevisionId) {
|
|
118
|
+
runInAction(() => {
|
|
119
|
+
this._loading = true;
|
|
120
|
+
this._error = null;
|
|
121
|
+
});
|
|
122
|
+
const result = await this.gateway.getTargetWorkflowState(app, targetRevisionId);
|
|
123
|
+
runInAction(() => {
|
|
124
|
+
this._error = result.error;
|
|
125
|
+
this._loading = false;
|
|
126
|
+
});
|
|
127
|
+
return result.data || null;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
//# sourceMappingURL=WorkflowStateRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","runInAction","WorkflowStateRepository","_error","_loading","error","loading","constructor","params","gateway","start","result","startWorkflowStateStep","data","approve","approveWorkflowStateStep","reject","rejectWorkflowStateStep","cancel","id","cancelWorkflowState","takeOver","takeOverWorkflowStateStep","findOne","app","targetRevisionId","listWorkflowStates","where","limit","requestReview","title","createWorkflowState","getTargetState","getTargetWorkflowState"],"sources":["WorkflowStateRepository.ts"],"sourcesContent":["import type {\n IWorkflowStateRepository,\n IWorkflowStateRepositoryApproveParams,\n IWorkflowStateRepositoryFindOneParams,\n IWorkflowStateRepositoryRejectParams,\n IWorkflowStateRepositoryRequestReviewParams,\n IWorkflowStateRepositoryStartParams,\n IWorkflowStateRepositoryTakeOverParams\n} from \"./abstractions/WorkflowStateRepository.js\";\nimport type {\n IWorkflowStateError,\n IWorkflowStateGateway\n} from \"~/Gateways/abstraction/WorkflowStateGateway.js\";\nimport { makeAutoObservable, runInAction } from \"mobx\";\nimport type { IWorkflowState } from \"~/types.js\";\n\nexport interface IWorkflowStateRepositoryParams {\n gateway: IWorkflowStateGateway;\n}\n\nexport class WorkflowStateRepository implements IWorkflowStateRepository {\n private readonly gateway;\n private _error: IWorkflowStateError | null = null;\n private _loading: boolean = false;\n\n public get error(): IWorkflowStateError | null {\n return this._error;\n }\n\n public get loading(): boolean {\n return this._loading;\n }\n\n public constructor(params: IWorkflowStateRepositoryParams) {\n this.gateway = params.gateway;\n\n makeAutoObservable(this);\n }\n\n public async start(\n params: IWorkflowStateRepositoryStartParams\n ): Promise<IWorkflowState | null> {\n runInAction(() => {\n this._loading = true;\n this._error = null;\n });\n const result = await this.gateway.startWorkflowStateStep(params);\n runInAction(() => {\n this._error = result.error;\n this._loading = false;\n });\n return result.data;\n }\n\n public async approve(\n params: IWorkflowStateRepositoryApproveParams\n ): Promise<IWorkflowState | null> {\n runInAction(() => {\n this._loading = true;\n this._error = null;\n });\n const result = await this.gateway.approveWorkflowStateStep(params);\n runInAction(() => {\n this._error = result.error;\n this._loading = false;\n });\n return result.data;\n }\n\n public async reject(\n params: IWorkflowStateRepositoryRejectParams\n ): Promise<IWorkflowState | null> {\n runInAction(() => {\n this._loading = true;\n this._error = null;\n });\n const result = await this.gateway.rejectWorkflowStateStep(params);\n runInAction(() => {\n this._error = result.error;\n this._loading = false;\n });\n return result.data;\n }\n\n public async cancel(id: string): Promise<void> {\n runInAction(() => {\n this._loading = true;\n this._error = null;\n });\n const result = await this.gateway.cancelWorkflowState(id);\n runInAction(() => {\n this._error = result.error;\n this._loading = false;\n });\n }\n\n public async takeOver(\n params: IWorkflowStateRepositoryTakeOverParams\n ): Promise<IWorkflowState | null> {\n runInAction(() => {\n this._loading = true;\n this._error = null;\n });\n const result = await this.gateway.takeOverWorkflowStateStep(params);\n runInAction(() => {\n this._error = result.error;\n this._loading = false;\n });\n return result.data;\n }\n\n public async findOne(\n params: IWorkflowStateRepositoryFindOneParams\n ): Promise<IWorkflowState | null> {\n const { app, targetRevisionId } = params;\n runInAction(() => {\n this._loading = true;\n this._error = null;\n });\n const result = await this.gateway.listWorkflowStates({\n where: {\n app,\n targetRevisionId\n },\n limit: 1\n });\n runInAction(() => {\n this._error = result.error;\n this._loading = false;\n });\n return result.data?.[0] || null;\n }\n\n public async requestReview(\n params: IWorkflowStateRepositoryRequestReviewParams\n ): Promise<IWorkflowState | null> {\n const { app, targetRevisionId, title } = params;\n runInAction(() => {\n this._loading = true;\n this._error = null;\n });\n const result = await this.gateway.createWorkflowState({\n app,\n targetRevisionId,\n title\n });\n runInAction(() => {\n this._error = result.error;\n this._loading = false;\n });\n return result.data || null;\n }\n\n public async getTargetState(\n app: string,\n targetRevisionId: string\n ): Promise<IWorkflowState | null> {\n runInAction(() => {\n this._loading = true;\n this._error = null;\n });\n const result = await this.gateway.getTargetWorkflowState(app, targetRevisionId);\n runInAction(() => {\n this._error = result.error;\n this._loading = false;\n });\n return result.data || null;\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IWorkflowStatesWidgetRepository, IWorkflowStatesWidgetRepositoryApproveStateStepParams, IWorkflowStatesWidgetRepositoryListResult, IWorkflowStatesWidgetRepositoryListStates, IWorkflowStatesWidgetRepositoryRejectStateStepParams, IWorkflowStatesWidgetRepositoryStartStateStepParams, IWorkflowStatesWidgetRepositoryTakeOverStateStepParams } from "./abstractions/WorkflowStatesWidgetRepository.js";
|
|
2
|
+
import type { IWorkflowStatesWidgetGateway } from "../Gateways/index.js";
|
|
3
|
+
import type { IGenericError, IWorkflowState } from "../types.js";
|
|
4
|
+
export interface IWorkflowStatesWidgetRepositoryParams {
|
|
5
|
+
gateway: IWorkflowStatesWidgetGateway;
|
|
6
|
+
}
|
|
7
|
+
export declare class WorkflowStatesWidgetRepository implements IWorkflowStatesWidgetRepository {
|
|
8
|
+
private readonly _loading;
|
|
9
|
+
private readonly _error;
|
|
10
|
+
private _actionLoading;
|
|
11
|
+
private _actionError;
|
|
12
|
+
private readonly gateway;
|
|
13
|
+
get actionLoading(): boolean;
|
|
14
|
+
get actionError(): IGenericError | null;
|
|
15
|
+
get loading(): boolean;
|
|
16
|
+
get error(): IGenericError | null;
|
|
17
|
+
constructor(params: IWorkflowStatesWidgetRepositoryParams);
|
|
18
|
+
listOwnStates(params: IWorkflowStatesWidgetRepositoryListStates): Promise<IWorkflowStatesWidgetRepositoryListResult>;
|
|
19
|
+
listRequestedStates(params: IWorkflowStatesWidgetRepositoryListStates): Promise<IWorkflowStatesWidgetRepositoryListResult>;
|
|
20
|
+
startStateStep(params: IWorkflowStatesWidgetRepositoryStartStateStepParams): Promise<IWorkflowState | null>;
|
|
21
|
+
takeOverStateStep(params: IWorkflowStatesWidgetRepositoryTakeOverStateStepParams): Promise<IWorkflowState | null>;
|
|
22
|
+
approveStateStep(params: IWorkflowStatesWidgetRepositoryApproveStateStepParams): Promise<IWorkflowState | null>;
|
|
23
|
+
rejectStateStep(params: IWorkflowStatesWidgetRepositoryRejectStateStepParams): Promise<IWorkflowState | null>;
|
|
24
|
+
}
|