@webiny/api-headless-cms-workflows 0.0.0-unstable.81ae05e56b → 0.0.0-unstable.a4f3e4ea8b
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/features/EntryWorkflows/decorators/CmsWorkflowStateContextProvider.d.ts +15 -0
- package/features/EntryWorkflows/decorators/CmsWorkflowStateContextProvider.js +35 -0
- package/features/EntryWorkflows/decorators/CmsWorkflowStateContextProvider.js.map +1 -0
- package/features/EntryWorkflows/decorators/CmsWorkflowStateFilter.d.ts +13 -0
- package/features/EntryWorkflows/decorators/CmsWorkflowStateFilter.js +45 -0
- package/features/EntryWorkflows/decorators/CmsWorkflowStateFilter.js.map +1 -0
- package/features/EntryWorkflows/errors.d.ts +11 -0
- package/features/EntryWorkflows/errors.js +12 -0
- package/features/EntryWorkflows/errors.js.map +1 -0
- package/features/EntryWorkflows/feature.d.ts +4 -1
- package/features/EntryWorkflows/feature.js +19 -10
- package/features/EntryWorkflows/feature.js.map +1 -1
- package/features/EntryWorkflows/handlers/BlockMoveOnActiveWorkflowState.d.ts +11 -0
- package/features/EntryWorkflows/handlers/BlockMoveOnActiveWorkflowState.js +37 -0
- package/features/EntryWorkflows/handlers/BlockMoveOnActiveWorkflowState.js.map +1 -0
- package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateAfterDelete.d.ts +1 -1
- package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateAfterDelete.js +24 -24
- package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateAfterDelete.js.map +1 -1
- package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateCancel.d.ts +13 -0
- package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateCancel.js +35 -0
- package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateCancel.js.map +1 -0
- package/features/EntryWorkflows/handlers/DeleteWorkflowStateOnEntryAfterDelete.d.ts +1 -1
- package/features/EntryWorkflows/handlers/DeleteWorkflowStateOnEntryAfterDelete.js +16 -19
- package/features/EntryWorkflows/handlers/DeleteWorkflowStateOnEntryAfterDelete.js.map +1 -1
- package/features/EntryWorkflows/handlers/DeleteWorkflowsOnModelAfterDelete.d.ts +1 -1
- package/features/EntryWorkflows/handlers/DeleteWorkflowsOnModelAfterDelete.js +29 -32
- package/features/EntryWorkflows/handlers/DeleteWorkflowsOnModelAfterDelete.js.map +1 -1
- package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterCreate.d.ts +1 -1
- package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterCreate.js +25 -25
- package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterCreate.js.map +1 -1
- package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterUpdate.d.ts +1 -1
- package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterUpdate.js +24 -25
- package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterUpdate.js.map +1 -1
- package/features/EntryWorkflows/handlers/ValidateWorkflowStateOnEntryBeforePublish.d.ts +1 -1
- package/features/EntryWorkflows/handlers/ValidateWorkflowStateOnEntryBeforePublish.js +34 -39
- package/features/EntryWorkflows/handlers/ValidateWorkflowStateOnEntryBeforePublish.js.map +1 -1
- package/features/EntryWorkflows/index.js +0 -2
- package/features/Workflows/feature.d.ts +4 -1
- package/features/Workflows/feature.js +6 -5
- package/features/Workflows/feature.js.map +1 -1
- package/features/Workflows/handlers/DisallowUnpublishableModelsOnBeforeCreate.d.ts +1 -1
- package/features/Workflows/handlers/DisallowUnpublishableModelsOnBeforeCreate.js +17 -22
- package/features/Workflows/handlers/DisallowUnpublishableModelsOnBeforeCreate.js.map +1 -1
- package/features/Workflows/index.js +0 -2
- package/graphql/entrySystemSchema.d.ts +2 -0
- package/graphql/entrySystemSchema.js +18 -0
- package/graphql/entrySystemSchema.js.map +1 -0
- package/index.js +12 -13
- package/index.js.map +1 -1
- package/package.json +25 -18
- package/utils/appName.js +6 -11
- package/utils/appName.js.map +1 -1
- package/utils/modelAllowed.js +5 -9
- package/utils/modelAllowed.js.map +1 -1
- package/utils/state.js +9 -8
- package/utils/state.js.map +1 -1
- package/features/EntryWorkflows/index.js.map +0 -1
- package/features/Workflows/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"utils/modelAllowed.js","sources":["../../src/utils/modelAllowed.ts"],"sourcesContent":["import type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport { CMS_MODEL_SINGLETON_TAG } from \"@webiny/api-headless-cms/constants.js\";\n\nexport const isModelAllowed = (model: Pick<CmsModel, \"isPrivate\" | \"tags\">): boolean => {\n if (model.isPrivate) {\n return false;\n }\n // TODO remove when we allow singleton models to have workflows.\n else if (model.tags?.includes(CMS_MODEL_SINGLETON_TAG)) {\n return false;\n }\n return true;\n};\n"],"names":["isModelAllowed","model","CMS_MODEL_SINGLETON_TAG"],"mappings":";AAGO,MAAMA,iBAAiB,CAACC;IAC3B,IAAIA,MAAM,SAAS,EACf,OAAO;IAGN,IAAIA,MAAM,IAAI,EAAE,SAASC,0BAC1B,OAAO;IAEX,OAAO;AACX"}
|
package/utils/state.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
const getStateValues = (state)=>{
|
|
2
|
+
const activeStep = state.currentStep;
|
|
3
|
+
return {
|
|
4
|
+
workflowId: state.workflowId,
|
|
5
|
+
stepId: activeStep.id,
|
|
6
|
+
stepName: activeStep.title,
|
|
7
|
+
state: activeStep.state
|
|
8
|
+
};
|
|
9
9
|
};
|
|
10
|
+
export { getStateValues };
|
|
10
11
|
|
|
11
12
|
//# sourceMappingURL=state.js.map
|
package/utils/state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"utils/state.js","sources":["../../src/utils/state.ts"],"sourcesContent":["import type { ICmsEntryWorkflowState } from \"@webiny/api-workflows/types.js\";\nimport type { WorkflowState } from \"@webiny/api-workflows/domain/workflowState/WorkflowState.js\";\n\nexport const getStateValues = (state: WorkflowState): ICmsEntryWorkflowState => {\n const activeStep = state.currentStep;\n\n return {\n workflowId: state.workflowId,\n stepId: activeStep.id,\n stepName: activeStep.title,\n state: activeStep.state\n };\n};\n"],"names":["getStateValues","state","activeStep"],"mappings":"AAGO,MAAMA,iBAAiB,CAACC;IAC3B,MAAMC,aAAaD,MAAM,WAAW;IAEpC,OAAO;QACH,YAAYA,MAAM,UAAU;QAC5B,QAAQC,WAAW,EAAE;QACrB,UAAUA,WAAW,KAAK;QAC1B,OAAOA,WAAW,KAAK;IAC3B;AACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["EntryWorkflowsFeature"],"sources":["index.ts"],"sourcesContent":["export { EntryWorkflowsFeature } from \"./feature.js\";\n"],"mappings":"AAAA,SAASA,qBAAqB","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["WorkflowsFeature"],"sources":["index.ts"],"sourcesContent":["export { WorkflowsFeature } from \"./feature.js\";\n"],"mappings":"AAAA,SAASA,gBAAgB","ignoreList":[]}
|