@webiny/app-workflows 0.0.0-unstable.3c5210ad37
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 +13 -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 +30 -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 +36 -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 +23 -0
- package/Components/WorkflowState/Bar/WorkflowStateBar.js +37 -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 +29 -0
- package/Components/WorkflowStatesWidget/WorkflowStatesOwnWidget.js.map +1 -0
- package/Components/WorkflowStatesWidget/WorkflowStatesRequestedWidget.d.ts +6 -0
- package/Components/WorkflowStatesWidget/WorkflowStatesRequestedWidget.js +29 -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 +37 -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 +146 -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/SecurityPermissions.d.ts +2 -0
- package/Components/WorkflowsPermissions/SecurityPermissions.js +22 -0
- package/Components/WorkflowsPermissions/SecurityPermissions.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/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 +112 -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 +49 -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 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","observable","runInAction","toJS","WorkflowStateStepModel","WorkflowStateValue","createSnapshot","input","JSON","stringify","WorkflowStateModel","dirty","snapshot","lastApproved","steps","toReversed","step","state","approved","lastRejected","rejected","constructor","params","id","app","title","targetId","targetRevisionId","comment","createdBy","savedBy","createdOn","savedOn","isActive","array","currentStep","create","previousStep","nextStep","map","replace","setSteps","updateSnapshot","addStep","push","updateStep","existingStep","findStep","removeStep","index","findIndex","s","splice","find"],"sources":["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"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IWorkflowStateStep } from "../types.js";
|
|
2
|
+
import type { IWorkflowStateStepModel } from "./abstractions/WorkflowStateStepModel.js";
|
|
3
|
+
export declare class WorkflowStateStepModel implements IWorkflowStateStepModel {
|
|
4
|
+
id: string;
|
|
5
|
+
comment: string | null | undefined;
|
|
6
|
+
savedBy: import("~/types.js").IIdentity | null | undefined;
|
|
7
|
+
state: import("~/types.js").WorkflowStateValue;
|
|
8
|
+
title: string;
|
|
9
|
+
teams: import("@webiny/app/types.js").NonEmptyArray<import("~/types.js").IWorkflowStepTeam>;
|
|
10
|
+
notifications: import("~/types.js").IWorkflowStepNotification[] | undefined;
|
|
11
|
+
color: string;
|
|
12
|
+
description: string | undefined;
|
|
13
|
+
canReview: boolean;
|
|
14
|
+
canTakeOver: boolean;
|
|
15
|
+
isOwner: boolean;
|
|
16
|
+
constructor(params: IWorkflowStateStep);
|
|
17
|
+
toJS(): IWorkflowStateStep;
|
|
18
|
+
updateStep(input: Partial<IWorkflowStateStep>): void;
|
|
19
|
+
static create(input: IWorkflowStateStep): IWorkflowStateStepModel;
|
|
20
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { makeAutoObservable, runInAction, toJS } from "mobx";
|
|
2
|
+
export 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
|
+
}
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=WorkflowStateStepModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","runInAction","toJS","WorkflowStateStepModel","constructor","params","id","title","color","description","notifications","teams","comment","savedBy","state","canReview","canTakeOver","isOwner","updateStep","input","Object","assign","create"],"sources":["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"],"mappings":"AACA,SAASA,kBAAkB,EAAEC,WAAW,EAAEC,IAAI,QAAQ,MAAM;AAG5D,OAAO,MAAMC,sBAAsB,CAAoC;EAc5DC,WAAWA,CAACC,MAA0B,EAAE;IAC3C,IAAI,CAACC,EAAE,GAAGD,MAAM,CAACC,EAAE;IACnB,IAAI,CAACC,KAAK,GAAGF,MAAM,CAACE,KAAK;IACzB,IAAI,CAACC,KAAK,GAAGH,MAAM,CAACG,KAAK;IACzB,IAAI,CAACC,WAAW,GAAGJ,MAAM,CAACI,WAAW;IACrC,IAAI,CAACC,aAAa,GAAGL,MAAM,CAACK,aAAa;IACzC,IAAI,CAACC,KAAK,GAAGN,MAAM,CAACM,KAAK;IACzB,IAAI,CAACC,OAAO,GAAGP,MAAM,CAACO,OAAO;IAC7B,IAAI,CAACC,OAAO,GAAGR,MAAM,CAACQ,OAAO;IAC7B,IAAI,CAACC,KAAK,GAAGT,MAAM,CAACS,KAAK;IACzB,IAAI,CAACC,SAAS,GAAGV,MAAM,CAACU,SAAS;IACjC,IAAI,CAACC,WAAW,GAAGX,MAAM,CAACW,WAAW;IACrC,IAAI,CAACC,OAAO,GAAGZ,MAAM,CAACY,OAAO;IAE7BjB,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEOE,IAAIA,CAAA,EAAuB;IAC9B,OAAOA,IAAI,CAAC;MACRI,EAAE,EAAE,IAAI,CAACA,EAAE;MACXM,OAAO,EAAE,IAAI,CAACA,OAAO;MACrBC,OAAO,EAAE,IAAI,CAACA,OAAO;MACrBC,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBP,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBG,aAAa,EAAE,IAAI,CAACA,aAAa;MACjCC,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBH,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBC,WAAW,EAAE,IAAI,CAACA,WAAW;MAC7BM,SAAS,EAAE,IAAI,CAACA,SAAS;MACzBC,WAAW,EAAE,IAAI,CAACA,WAAW;MAC7BC,OAAO,EAAE,IAAI,CAACA;IAClB,CAAC,CAAC;EACN;EAEOC,UAAUA,CAACC,KAAkC,EAAE;IAClDlB,WAAW,CAAC,MAAM;MACdmB,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEF,KAAK,CAAC;IAC9B,CAAC,CAAC;EACN;EAEA,OAAcG,MAAMA,CAACH,KAAyB,EAA2B;IACrE,OAAO,IAAIhB,sBAAsB,CAACgB,KAAK,CAAC;EAC5C;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IWorkflowStep } from "../types.js";
|
|
2
|
+
import type { IWorkflowStepModel } from "./abstractions/WorkflowStepModel.js";
|
|
3
|
+
export declare class WorkflowStepModel implements IWorkflowStepModel {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
color: string;
|
|
7
|
+
description: string | undefined;
|
|
8
|
+
teams: import("@webiny/app/types.js").NonEmptyArray<import("~/types.js").IWorkflowStepTeam>;
|
|
9
|
+
notifications: import("~/types.js").IWorkflowStepNotification[];
|
|
10
|
+
constructor(data: IWorkflowStep);
|
|
11
|
+
toJS(): IWorkflowStep;
|
|
12
|
+
updateStep(input: Partial<IWorkflowStep>): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { makeAutoObservable, runInAction, toJS } from "mobx";
|
|
2
|
+
export 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
|
+
}
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=WorkflowStepModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","runInAction","toJS","WorkflowStepModel","constructor","data","id","title","color","description","teams","notifications","updateStep","input","Object","assign"],"sources":["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"],"mappings":"AACA,SAASA,kBAAkB,EAAEC,WAAW,EAAEC,IAAI,QAAQ,MAAM;AAG5D,OAAO,MAAMC,iBAAiB,CAA+B;EAQlDC,WAAWA,CAACC,IAAmB,EAAE;IACpC,IAAI,CAACC,EAAE,GAAGD,IAAI,CAACC,EAAE;IACjB,IAAI,CAACC,KAAK,GAAGF,IAAI,CAACE,KAAK;IACvB,IAAI,CAACC,KAAK,GAAGH,IAAI,CAACG,KAAK;IACvB,IAAI,CAACC,WAAW,GAAGJ,IAAI,CAACI,WAAW;IACnC,IAAI,CAACC,KAAK,GAAGL,IAAI,CAACK,KAAK;IACvB,IAAI,CAACC,aAAa,GAAGN,IAAI,CAACM,aAAa,IAAI,EAAE;IAE7CX,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEOE,IAAIA,CAAA,EAAkB;IACzB,OAAOA,IAAI,CAAC;MACRI,EAAE,EAAE,IAAI,CAACA,EAAE;MACXC,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBC,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBC,WAAW,EAAE,IAAI,CAACA,WAAW;MAC7BC,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBC,aAAa,EAAE,IAAI,CAACA;IACxB,CAAC,CAAC;EACN;EAEOC,UAAUA,CAACC,KAA6B,EAAE;IAC7CZ,WAAW,CAAC,MAAM;MACda,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEF,KAAK,CAAC;IAC9B,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IWorkflow, IWorkflowStep } from "../../types.js";
|
|
2
|
+
import type { IWorkflowStepModel } from "./WorkflowStepModel.js";
|
|
3
|
+
import type { IObservableArray } from "mobx";
|
|
4
|
+
export interface IWorkflowModel extends Omit<IWorkflow, "steps"> {
|
|
5
|
+
readonly dirty: boolean;
|
|
6
|
+
steps: IObservableArray<IWorkflowStepModel>;
|
|
7
|
+
setSteps(steps: IWorkflowStep[]): void;
|
|
8
|
+
addStep(step: IWorkflowStep): void;
|
|
9
|
+
updateStep(step: IWorkflowStep): void;
|
|
10
|
+
removeStep(id: string): void;
|
|
11
|
+
findStep(id: string): IWorkflowStepModel | undefined;
|
|
12
|
+
toJS(): IWorkflow;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["WorkflowModel.ts"],"sourcesContent":["import type { IWorkflow, IWorkflowStep } from \"~/types.js\";\nimport type { IWorkflowStepModel } from \"./WorkflowStepModel.js\";\nimport type { IObservableArray } from \"mobx\";\n\nexport interface IWorkflowModel extends Omit<IWorkflow, \"steps\"> {\n readonly dirty: boolean;\n steps: IObservableArray<IWorkflowStepModel>;\n setSteps(steps: IWorkflowStep[]): void;\n addStep(step: IWorkflowStep): void;\n updateStep(step: IWorkflowStep): void;\n removeStep(id: string): void;\n findStep(id: string): IWorkflowStepModel | undefined;\n toJS(): IWorkflow;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IWorkflowState, IWorkflowStateStep } from "../../types.js";
|
|
2
|
+
import type { IWorkflowStateStepModel } from "./WorkflowStateStepModel.js";
|
|
3
|
+
import type { IObservableArray } from "mobx";
|
|
4
|
+
export interface IWorkflowStateModel extends Omit<IWorkflowState, "steps"> {
|
|
5
|
+
readonly dirty: boolean;
|
|
6
|
+
steps: IObservableArray<IWorkflowStateStepModel>;
|
|
7
|
+
currentStep: IWorkflowStateStepModel;
|
|
8
|
+
nextStep: IWorkflowStateStepModel | null;
|
|
9
|
+
previousStep: IWorkflowStateStepModel | null;
|
|
10
|
+
lastRejected: IWorkflowStateStepModel | null;
|
|
11
|
+
lastApproved: IWorkflowStateStepModel | null;
|
|
12
|
+
setSteps(steps: IWorkflowStateStep[]): void;
|
|
13
|
+
addStep(step: IWorkflowStateStep): void;
|
|
14
|
+
updateStep(step: IWorkflowStateStep): void;
|
|
15
|
+
removeStep(id: string): void;
|
|
16
|
+
findStep(id: string): IWorkflowStateStepModel | undefined;
|
|
17
|
+
toJS(): IWorkflowState;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["WorkflowStateModel.ts"],"sourcesContent":["import type { IWorkflowState, IWorkflowStateStep } from \"~/types.js\";\nimport type { IWorkflowStateStepModel } from \"./WorkflowStateStepModel.js\";\nimport type { IObservableArray } from \"mobx\";\n\nexport interface IWorkflowStateModel extends Omit<IWorkflowState, \"steps\"> {\n readonly dirty: boolean;\n steps: IObservableArray<IWorkflowStateStepModel>;\n currentStep: IWorkflowStateStepModel;\n nextStep: IWorkflowStateStepModel | null;\n previousStep: IWorkflowStateStepModel | null;\n lastRejected: IWorkflowStateStepModel | null;\n lastApproved: IWorkflowStateStepModel | null;\n setSteps(steps: IWorkflowStateStep[]): void;\n addStep(step: IWorkflowStateStep): void;\n updateStep(step: IWorkflowStateStep): void;\n removeStep(id: string): void;\n findStep(id: string): IWorkflowStateStepModel | undefined;\n toJS(): IWorkflowState;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["WorkflowStateStepModel.ts"],"sourcesContent":["import type { IWorkflowStateStep } from \"~/types.js\";\n\nexport interface IWorkflowStateStepModel extends IWorkflowStateStep {\n toJS(): IWorkflowStateStep;\n updateStep(input: Partial<IWorkflowStateStep>): void;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["WorkflowStepModel.ts"],"sourcesContent":["import type { IWorkflowStep } from \"~/types.js\";\n\nexport interface IWorkflowStepModel extends IWorkflowStep {\n toJS(): IWorkflowStep;\n updateStep(input: Partial<IWorkflowStep>): void;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { IWorkflowModel } from "./abstractions/WorkflowModel.js";
|
|
2
|
+
export type { IWorkflowStepModel } from "./abstractions/WorkflowStepModel.js";
|
|
3
|
+
export type { IWorkflowStateModel } from "./abstractions/WorkflowStateModel.js";
|
|
4
|
+
export type { IWorkflowStateStepModel } from "./abstractions/WorkflowStateStepModel.js";
|
|
5
|
+
export { WorkflowModel } from "./WorkflowModel.js";
|
|
6
|
+
export { WorkflowStepModel } from "./WorkflowStepModel.js";
|
|
7
|
+
export { WorkflowStateModel } from "./WorkflowStateModel.js";
|
|
8
|
+
export { WorkflowStateStepModel } from "./WorkflowStateStepModel.js";
|
package/Models/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { WorkflowModel } from "./WorkflowModel.js";
|
|
2
|
+
export { WorkflowStepModel } from "./WorkflowStepModel.js";
|
|
3
|
+
export { WorkflowStateModel } from "./WorkflowStateModel.js";
|
|
4
|
+
export { WorkflowStateStepModel } from "./WorkflowStateStepModel.js";
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["WorkflowModel","WorkflowStepModel","WorkflowStateModel","WorkflowStateStepModel"],"sources":["index.ts"],"sourcesContent":["export type { IWorkflowModel } from \"./abstractions/WorkflowModel.js\";\nexport type { IWorkflowStepModel } from \"./abstractions/WorkflowStepModel.js\";\nexport type { IWorkflowStateModel } from \"./abstractions/WorkflowStateModel.js\";\nexport type { IWorkflowStateStepModel } from \"./abstractions/WorkflowStateStepModel.js\";\nexport { WorkflowModel } from \"./WorkflowModel.js\";\nexport { WorkflowStepModel } from \"./WorkflowStepModel.js\";\nexport { WorkflowStateModel } from \"./WorkflowStateModel.js\";\nexport { WorkflowStateStepModel } from \"./WorkflowStateStepModel.js\";\n"],"mappings":"AAIA,SAASA,aAAa;AACtB,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAC3B,SAASC,sBAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IWorkflowStateListPresenter, IWorkflowStateListPresenterListParams, IWorkflowStateListPresenterListParamsWhere } from "./abstractions/WorkflowStateListPresenter.js";
|
|
2
|
+
import type { IWorkflowStateListRepository, WorkflowStateListRepositoryType } from "../Repositories/index.js";
|
|
3
|
+
interface IWorkflowStateListPresenterParams {
|
|
4
|
+
repository: IWorkflowStateListRepository;
|
|
5
|
+
}
|
|
6
|
+
export declare class WorkflowStateListPresenter implements IWorkflowStateListPresenter {
|
|
7
|
+
private readonly repository;
|
|
8
|
+
private listParams;
|
|
9
|
+
get vm(): {
|
|
10
|
+
items: import("../types.js").IWorkflowState[];
|
|
11
|
+
loading: boolean;
|
|
12
|
+
error: import("../types.js").IGenericError | null;
|
|
13
|
+
totalCount: number;
|
|
14
|
+
hasMoreItems: boolean;
|
|
15
|
+
where: IWorkflowStateListPresenterListParamsWhere;
|
|
16
|
+
type: WorkflowStateListRepositoryType;
|
|
17
|
+
};
|
|
18
|
+
constructor(params: IWorkflowStateListPresenterParams);
|
|
19
|
+
filterBy: (where: IWorkflowStateListPresenterListParamsWhere) => Promise<void>;
|
|
20
|
+
nextPage: () => Promise<void>;
|
|
21
|
+
list: (params?: IWorkflowStateListPresenterListParams) => Promise<void>;
|
|
22
|
+
setType: (type: WorkflowStateListRepositoryType) => Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { makeAutoObservable } from "mobx";
|
|
2
|
+
export class WorkflowStateListPresenter {
|
|
3
|
+
listParams = undefined;
|
|
4
|
+
get vm() {
|
|
5
|
+
return {
|
|
6
|
+
items: this.repository.items,
|
|
7
|
+
loading: this.repository.loading,
|
|
8
|
+
error: this.repository.error,
|
|
9
|
+
totalCount: this.repository.meta?.totalCount || 0,
|
|
10
|
+
hasMoreItems: this.repository.meta?.hasMoreItems || false,
|
|
11
|
+
where: this.listParams?.where || {},
|
|
12
|
+
type: this.repository.type
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
constructor(params) {
|
|
16
|
+
this.repository = params.repository;
|
|
17
|
+
makeAutoObservable(this);
|
|
18
|
+
}
|
|
19
|
+
filterBy = async where => {
|
|
20
|
+
return await this.list({
|
|
21
|
+
...this.listParams,
|
|
22
|
+
after: undefined,
|
|
23
|
+
where
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
nextPage = async () => {
|
|
27
|
+
if (!this.repository.meta?.hasMoreItems) {
|
|
28
|
+
console.warn("No more items to load.");
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
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
|
+
}
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=WorkflowStateListPresenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","WorkflowStateListPresenter","listParams","undefined","vm","items","repository","loading","error","totalCount","meta","hasMoreItems","where","type","constructor","params","filterBy","list","after","nextPage","console","warn","cursor","limit","isActive","setType"],"sources":["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"],"mappings":"AASA,SAASA,kBAAkB,QAAQ,MAAM;AAMzC,OAAO,MAAMC,0BAA0B,CAAwC;EAGnEC,UAAU,GAAsDC,SAAS;EAEjF,IAAWC,EAAEA,CAAA,EAAG;IACZ,OAAO;MACHC,KAAK,EAAE,IAAI,CAACC,UAAU,CAACD,KAAK;MAC5BE,OAAO,EAAE,IAAI,CAACD,UAAU,CAACC,OAAO;MAChCC,KAAK,EAAE,IAAI,CAACF,UAAU,CAACE,KAAK;MAC5BC,UAAU,EAAE,IAAI,CAACH,UAAU,CAACI,IAAI,EAAED,UAAU,IAAI,CAAC;MACjDE,YAAY,EAAE,IAAI,CAACL,UAAU,CAACI,IAAI,EAAEC,YAAY,IAAI,KAAK;MACzDC,KAAK,EAAE,IAAI,CAACV,UAAU,EAAEU,KAAK,IAAI,CAAC,CAAC;MACnCC,IAAI,EAAE,IAAI,CAACP,UAAU,CAACO;IAC1B,CAAC;EACL;EAEOC,WAAWA,CAACC,MAAyC,EAAE;IAC1D,IAAI,CAACT,UAAU,GAAGS,MAAM,CAACT,UAAU;IAEnCN,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEAgB,QAAQ,GAAG,MAAOJ,KAAiD,IAAoB;IACnF,OAAO,MAAM,IAAI,CAACK,IAAI,CAAC;MACnB,GAAG,IAAI,CAACf,UAAU;MAClBgB,KAAK,EAAEf,SAAS;MAChBS;IACJ,CAAC,CAAC;EACN,CAAC;EAEDO,QAAQ,GAAG,MAAAA,CAAA,KAA2B;IAClC,IAAI,CAAC,IAAI,CAACb,UAAU,CAACI,IAAI,EAAEC,YAAY,EAAE;MACrCS,OAAO,CAACC,IAAI,CAAC,wBAAwB,CAAC;MACtC;IACJ;IACA,OAAO,MAAM,IAAI,CAACf,UAAU,CAACW,IAAI,CAAC;MAC9B,GAAG,IAAI,CAACf,UAAU;MAClBgB,KAAK,EAAE,IAAI,CAACZ,UAAU,CAACI,IAAI,EAAEY,MAAM,IAAInB;IAC3C,CAAC,CAAC;EACN,CAAC;EAEDc,IAAI,GAAG,MAAOF,MAA8C,IAAoB;IAC5E,IAAI,CAACb,UAAU,GAAG;MACdgB,KAAK,EAAEf,SAAS;MAChB,GAAGY,MAAM;MACTQ,KAAK,EAAE,EAAE;MACTX,KAAK,EAAE;QACH,GAAGG,MAAM,EAAEH,KAAK;QAChBY,QAAQ,EAAE;MACd;IACJ,CAAC;IACD,OAAO,MAAM,IAAI,CAAClB,UAAU,CAACW,IAAI,CAAC,IAAI,CAACf,UAAU,CAAC;EACtD,CAAC;EAEDuB,OAAO,GAAG,MAAOZ,IAAqC,IAAoB;IACtE,IAAI,CAACP,UAAU,CAACmB,OAAO,CAACZ,IAAI,CAAC;IAC7B,OAAO,MAAM,IAAI,CAACP,UAAU,CAACW,IAAI,CAAC,IAAI,CAACf,UAAU,CAAC;EACtD,CAAC;AACL","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { IWorkflowStatePresenter, IWorkflowStatePresenterViewModel } from "./abstractions/WorkflowStatePresenter.js";
|
|
2
|
+
import type { IWorkflowsRepository, IWorkflowStateRepository } from "../Repositories/index.js";
|
|
3
|
+
import { type IWorkflowStateStepModel } from "../Models/index.js";
|
|
4
|
+
import { type IIdentity } from "../types.js";
|
|
5
|
+
export interface IWorkflowStatePresenterParams {
|
|
6
|
+
repository: IWorkflowStateRepository;
|
|
7
|
+
workflowsRepository: IWorkflowsRepository;
|
|
8
|
+
app: string;
|
|
9
|
+
targetRevisionId: string;
|
|
10
|
+
title: string;
|
|
11
|
+
identity: IIdentity | null;
|
|
12
|
+
}
|
|
13
|
+
export declare class WorkflowStatePresenter implements IWorkflowStatePresenter {
|
|
14
|
+
private readonly repository;
|
|
15
|
+
private readonly workflowsRepository;
|
|
16
|
+
private workflow;
|
|
17
|
+
private readonly app;
|
|
18
|
+
private readonly targetRevisionId;
|
|
19
|
+
private readonly title;
|
|
20
|
+
private readonly identity;
|
|
21
|
+
private state;
|
|
22
|
+
private dialog;
|
|
23
|
+
step: IWorkflowStateStepModel | null;
|
|
24
|
+
private get isOwner();
|
|
25
|
+
/**
|
|
26
|
+
* Determines whether the current user can cancel the review request.
|
|
27
|
+
* User must be the owner of the requested review.
|
|
28
|
+
* Previous step must not exist (only the initial request can be cancelled).
|
|
29
|
+
* Current step must be in pending state.
|
|
30
|
+
*/
|
|
31
|
+
private get canCancel();
|
|
32
|
+
get vm(): IWorkflowStatePresenterViewModel;
|
|
33
|
+
constructor(params: IWorkflowStatePresenterParams);
|
|
34
|
+
private init;
|
|
35
|
+
private clearDialog;
|
|
36
|
+
private setDialog;
|
|
37
|
+
requestReview: () => Promise<void>;
|
|
38
|
+
start: () => Promise<void>;
|
|
39
|
+
approve: (comment?: string) => Promise<void>;
|
|
40
|
+
reject: (comment: string) => Promise<void>;
|
|
41
|
+
cancel: () => Promise<void>;
|
|
42
|
+
takeOver: () => Promise<void>;
|
|
43
|
+
showCancelReviewDialog: () => void;
|
|
44
|
+
showRequestReviewDialog: () => void;
|
|
45
|
+
showStartDialog: () => void;
|
|
46
|
+
showApproveDialog: () => void;
|
|
47
|
+
hideDialog: () => void;
|
|
48
|
+
showRejectDialog: () => void;
|
|
49
|
+
showCommentDialog: (id: string) => void;
|
|
50
|
+
showTakeOverDialog: () => void;
|
|
51
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { makeAutoObservable, runInAction, toJS } from "mobx";
|
|
2
|
+
import { WorkflowStateModel } from "../Models/index.js";
|
|
3
|
+
import { WorkflowStateValue } from "../types.js";
|
|
4
|
+
export class WorkflowStatePresenter {
|
|
5
|
+
workflow = null;
|
|
6
|
+
state = undefined;
|
|
7
|
+
dialog = null;
|
|
8
|
+
step = null;
|
|
9
|
+
get isOwner() {
|
|
10
|
+
if (!this.identity) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
return this.state?.createdBy?.id === this.identity.id;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Determines whether the current user can cancel the review request.
|
|
17
|
+
* User must be the owner of the requested review.
|
|
18
|
+
* Previous step must not exist (only the initial request can be cancelled).
|
|
19
|
+
* Current step must be in pending state.
|
|
20
|
+
*/
|
|
21
|
+
get canCancel() {
|
|
22
|
+
if (!this.isOwner) {
|
|
23
|
+
return false;
|
|
24
|
+
} else if (this.state?.previousStep) {
|
|
25
|
+
return false;
|
|
26
|
+
} else if (this.state?.state === WorkflowStateValue.approved || this.state?.state === WorkflowStateValue.rejected) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
get vm() {
|
|
32
|
+
return {
|
|
33
|
+
workflow: toJS(this.workflow),
|
|
34
|
+
state: this.state?.toJS(),
|
|
35
|
+
step: this.state?.currentStep?.toJS(),
|
|
36
|
+
lastApprovedStep: toJS(this.state?.lastApproved || null),
|
|
37
|
+
lastRejectedStep: toJS(this.state?.lastRejected || null),
|
|
38
|
+
nextStep: toJS(this.state ? this.state.nextStep : null),
|
|
39
|
+
loading: this.repository.loading || this.workflowsRepository.loading,
|
|
40
|
+
error: toJS(this.repository.error || this.workflowsRepository.error),
|
|
41
|
+
app: this.app,
|
|
42
|
+
id: this.targetRevisionId,
|
|
43
|
+
canCancel: this.canCancel,
|
|
44
|
+
dialog: this.dialog
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
constructor(params) {
|
|
48
|
+
this.repository = params.repository;
|
|
49
|
+
this.workflowsRepository = params.workflowsRepository;
|
|
50
|
+
this.app = params.app;
|
|
51
|
+
this.title = params.title;
|
|
52
|
+
this.identity = params.identity;
|
|
53
|
+
this.targetRevisionId = params.targetRevisionId;
|
|
54
|
+
makeAutoObservable(this);
|
|
55
|
+
this.init();
|
|
56
|
+
}
|
|
57
|
+
async init() {
|
|
58
|
+
const workflows = await this.workflowsRepository.listWorkflows({
|
|
59
|
+
where: {
|
|
60
|
+
app: this.app
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
runInAction(() => {
|
|
64
|
+
if (workflows.length === 0) {
|
|
65
|
+
this.workflow = null;
|
|
66
|
+
this.state = null;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.workflow = workflows[0];
|
|
70
|
+
});
|
|
71
|
+
if (!this.workflow) {
|
|
72
|
+
return;
|
|
73
|
+
} else if (!this.targetRevisionId) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const state = await this.repository.getTargetState(this.app, this.targetRevisionId);
|
|
77
|
+
runInAction(() => {
|
|
78
|
+
this.state = state ? WorkflowStateModel.create(state) : null;
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
clearDialog() {
|
|
82
|
+
this.dialog = null;
|
|
83
|
+
}
|
|
84
|
+
setDialog(dialog) {
|
|
85
|
+
this.dialog = dialog;
|
|
86
|
+
}
|
|
87
|
+
requestReview = async () => {
|
|
88
|
+
const item = await this.repository.requestReview({
|
|
89
|
+
app: this.app,
|
|
90
|
+
targetRevisionId: this.targetRevisionId,
|
|
91
|
+
title: this.title
|
|
92
|
+
});
|
|
93
|
+
runInAction(() => {
|
|
94
|
+
this.state = item ? WorkflowStateModel.create(item) : null;
|
|
95
|
+
this.clearDialog();
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
start = async () => {
|
|
99
|
+
const item = await this.repository.start({
|
|
100
|
+
id: this.state.id
|
|
101
|
+
});
|
|
102
|
+
runInAction(() => {
|
|
103
|
+
this.state = item ? WorkflowStateModel.create(item) : null;
|
|
104
|
+
if (!item) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
this.setDialog({
|
|
108
|
+
type: "start:success"
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
approve = async comment => {
|
|
113
|
+
const item = await this.repository.approve({
|
|
114
|
+
id: this.state.id,
|
|
115
|
+
comment
|
|
116
|
+
});
|
|
117
|
+
runInAction(() => {
|
|
118
|
+
this.state = item ? WorkflowStateModel.create(item) : null;
|
|
119
|
+
if (!item) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
this.setDialog({
|
|
123
|
+
type: "approve:success"
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
reject = async comment => {
|
|
128
|
+
const item = await this.repository.reject({
|
|
129
|
+
id: this.state.id,
|
|
130
|
+
comment
|
|
131
|
+
});
|
|
132
|
+
runInAction(() => {
|
|
133
|
+
this.state = item ? WorkflowStateModel.create(item) : null;
|
|
134
|
+
if (!item) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
this.setDialog({
|
|
138
|
+
type: "reject:success"
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
cancel = async () => {
|
|
143
|
+
await this.repository.cancel(this.state.id);
|
|
144
|
+
runInAction(() => {
|
|
145
|
+
this.state = null;
|
|
146
|
+
this.clearDialog();
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
takeOver = async () => {
|
|
150
|
+
const item = await this.repository.takeOver({
|
|
151
|
+
id: this.state.id
|
|
152
|
+
});
|
|
153
|
+
runInAction(() => {
|
|
154
|
+
this.state = item ? WorkflowStateModel.create(item) : null;
|
|
155
|
+
if (!item) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
this.setDialog({
|
|
159
|
+
type: "takeOver:success",
|
|
160
|
+
step: null
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
showCancelReviewDialog = () => {
|
|
165
|
+
runInAction(() => {
|
|
166
|
+
this.setDialog({
|
|
167
|
+
type: "cancelReview"
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
showRequestReviewDialog = () => {
|
|
172
|
+
runInAction(() => {
|
|
173
|
+
this.setDialog({
|
|
174
|
+
type: "requestReview"
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
showStartDialog = () => {
|
|
179
|
+
runInAction(() => {
|
|
180
|
+
this.setDialog({
|
|
181
|
+
type: "start"
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
showApproveDialog = () => {
|
|
186
|
+
runInAction(() => {
|
|
187
|
+
this.setDialog({
|
|
188
|
+
type: "approve"
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
hideDialog = () => {
|
|
193
|
+
runInAction(() => {
|
|
194
|
+
this.clearDialog();
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
showRejectDialog = () => {
|
|
198
|
+
runInAction(() => {
|
|
199
|
+
this.setDialog({
|
|
200
|
+
type: "reject"
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
showCommentDialog = id => {
|
|
205
|
+
const step = this.state?.steps.find(step => step.id === id);
|
|
206
|
+
if (!step) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
runInAction(() => {
|
|
210
|
+
this.setDialog({
|
|
211
|
+
type: "comment",
|
|
212
|
+
step
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
};
|
|
216
|
+
showTakeOverDialog = () => {
|
|
217
|
+
runInAction(() => {
|
|
218
|
+
this.setDialog({
|
|
219
|
+
type: "takeOver"
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
//# sourceMappingURL=WorkflowStatePresenter.js.map
|