@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.
Files changed (58) hide show
  1. package/features/EntryWorkflows/decorators/CmsWorkflowStateContextProvider.d.ts +15 -0
  2. package/features/EntryWorkflows/decorators/CmsWorkflowStateContextProvider.js +35 -0
  3. package/features/EntryWorkflows/decorators/CmsWorkflowStateContextProvider.js.map +1 -0
  4. package/features/EntryWorkflows/decorators/CmsWorkflowStateFilter.d.ts +13 -0
  5. package/features/EntryWorkflows/decorators/CmsWorkflowStateFilter.js +45 -0
  6. package/features/EntryWorkflows/decorators/CmsWorkflowStateFilter.js.map +1 -0
  7. package/features/EntryWorkflows/errors.d.ts +11 -0
  8. package/features/EntryWorkflows/errors.js +12 -0
  9. package/features/EntryWorkflows/errors.js.map +1 -0
  10. package/features/EntryWorkflows/feature.d.ts +4 -1
  11. package/features/EntryWorkflows/feature.js +19 -10
  12. package/features/EntryWorkflows/feature.js.map +1 -1
  13. package/features/EntryWorkflows/handlers/BlockMoveOnActiveWorkflowState.d.ts +11 -0
  14. package/features/EntryWorkflows/handlers/BlockMoveOnActiveWorkflowState.js +37 -0
  15. package/features/EntryWorkflows/handlers/BlockMoveOnActiveWorkflowState.js.map +1 -0
  16. package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateAfterDelete.d.ts +1 -1
  17. package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateAfterDelete.js +24 -24
  18. package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateAfterDelete.js.map +1 -1
  19. package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateCancel.d.ts +13 -0
  20. package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateCancel.js +35 -0
  21. package/features/EntryWorkflows/handlers/ClearEntryStateOnWorkflowStateCancel.js.map +1 -0
  22. package/features/EntryWorkflows/handlers/DeleteWorkflowStateOnEntryAfterDelete.d.ts +1 -1
  23. package/features/EntryWorkflows/handlers/DeleteWorkflowStateOnEntryAfterDelete.js +16 -19
  24. package/features/EntryWorkflows/handlers/DeleteWorkflowStateOnEntryAfterDelete.js.map +1 -1
  25. package/features/EntryWorkflows/handlers/DeleteWorkflowsOnModelAfterDelete.d.ts +1 -1
  26. package/features/EntryWorkflows/handlers/DeleteWorkflowsOnModelAfterDelete.js +29 -32
  27. package/features/EntryWorkflows/handlers/DeleteWorkflowsOnModelAfterDelete.js.map +1 -1
  28. package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterCreate.d.ts +1 -1
  29. package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterCreate.js +25 -25
  30. package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterCreate.js.map +1 -1
  31. package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterUpdate.d.ts +1 -1
  32. package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterUpdate.js +24 -25
  33. package/features/EntryWorkflows/handlers/UpdateEntryOnWorkflowStateAfterUpdate.js.map +1 -1
  34. package/features/EntryWorkflows/handlers/ValidateWorkflowStateOnEntryBeforePublish.d.ts +1 -1
  35. package/features/EntryWorkflows/handlers/ValidateWorkflowStateOnEntryBeforePublish.js +34 -39
  36. package/features/EntryWorkflows/handlers/ValidateWorkflowStateOnEntryBeforePublish.js.map +1 -1
  37. package/features/EntryWorkflows/index.js +0 -2
  38. package/features/Workflows/feature.d.ts +4 -1
  39. package/features/Workflows/feature.js +6 -5
  40. package/features/Workflows/feature.js.map +1 -1
  41. package/features/Workflows/handlers/DisallowUnpublishableModelsOnBeforeCreate.d.ts +1 -1
  42. package/features/Workflows/handlers/DisallowUnpublishableModelsOnBeforeCreate.js +17 -22
  43. package/features/Workflows/handlers/DisallowUnpublishableModelsOnBeforeCreate.js.map +1 -1
  44. package/features/Workflows/index.js +0 -2
  45. package/graphql/entrySystemSchema.d.ts +2 -0
  46. package/graphql/entrySystemSchema.js +18 -0
  47. package/graphql/entrySystemSchema.js.map +1 -0
  48. package/index.js +12 -13
  49. package/index.js.map +1 -1
  50. package/package.json +25 -18
  51. package/utils/appName.js +6 -11
  52. package/utils/appName.js.map +1 -1
  53. package/utils/modelAllowed.js +5 -9
  54. package/utils/modelAllowed.js.map +1 -1
  55. package/utils/state.js +9 -8
  56. package/utils/state.js.map +1 -1
  57. package/features/EntryWorkflows/index.js.map +0 -1
  58. package/features/Workflows/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["CMS_MODEL_SINGLETON_TAG","isModelAllowed","model","isPrivate","tags","includes"],"sources":["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"],"mappings":"AACA,SAASA,uBAAuB,QAAQ,uCAAuC;AAE/E,OAAO,MAAMC,cAAc,GAAIC,KAA2C,IAAc;EACpF,IAAIA,KAAK,CAACC,SAAS,EAAE;IACjB,OAAO,KAAK;EAChB;EACA;EAAA,KACK,IAAID,KAAK,CAACE,IAAI,EAAEC,QAAQ,CAACL,uBAAuB,CAAC,EAAE;IACpD,OAAO,KAAK;EAChB;EACA,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
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
- export 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
- };
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
@@ -1 +1 @@
1
- {"version":3,"names":["getStateValues","state","activeStep","currentStep","workflowId","stepId","id","stepName","title"],"sources":["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"],"mappings":"AAGA,OAAO,MAAMA,cAAc,GAAIC,KAAoB,IAA6B;EAC5E,MAAMC,UAAU,GAAGD,KAAK,CAACE,WAAW;EAEpC,OAAO;IACHC,UAAU,EAAEH,KAAK,CAACG,UAAU;IAC5BC,MAAM,EAAEH,UAAU,CAACI,EAAE;IACrBC,QAAQ,EAAEL,UAAU,CAACM,KAAK;IAC1BP,KAAK,EAAEC,UAAU,CAACD;EACtB,CAAC;AACL,CAAC","ignoreList":[]}
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":[]}