sanity-plugin-workflow 1.0.0-beta.3 → 1.0.0-beta.5
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/README.md +6 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.esm.js +1536 -1393
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1535 -1392
- package/lib/index.js.map +1 -1
- package/package.json +4 -3
- package/src/actions/UpdateWorkflow.tsx +22 -24
- package/src/components/DocumentCard/Validate.tsx +21 -0
- package/src/components/DocumentCard/core/PublishedStatus.tsx +10 -3
- package/src/components/DocumentCard/index.tsx +94 -67
- package/src/components/DocumentList.tsx +122 -0
- package/src/components/Filters.tsx +3 -3
- package/src/components/{Validators.tsx → Verify.tsx} +42 -5
- package/src/components/WorkflowTool.tsx +107 -107
- package/src/constants/index.ts +2 -2
- package/src/helpers/filterItemsAndSort.ts +2 -0
- package/src/hooks/useWorkflowDocuments.tsx +6 -6
- package/src/index.ts +5 -5
- package/src/schema/workflow/workflow.metadata.ts +1 -1
- package/src/tools/index.ts +1 -1
- package/src/types/index.ts +1 -0
- package/src/actions/RequestReviewAction.js +0 -55
- package/src/actions/index.js +0 -21
package/README.md
CHANGED
|
@@ -12,6 +12,8 @@ With Sanity Studio you can [customize your content tools to support arbitrary wo
|
|
|
12
12
|
|
|
13
13
|
This plugin is distributed as a **reference implementation** of these customization APIs and is not considered to be a feature-complete implementation of what workflow management requires in production. It is a starting point intended to be forked and customized to the needs of your organization and content creators.
|
|
14
14
|
|
|
15
|
+

|
|
16
|
+
|
|
15
17
|
## Features
|
|
16
18
|
|
|
17
19
|
This work demonstrates how a single plugin can define:
|
|
@@ -69,10 +71,13 @@ Documents can be promoted and demoted in the Workflow with the provided Document
|
|
|
69
71
|
// Optional settings:
|
|
70
72
|
// Used for the color of the Document Badge
|
|
71
73
|
color: 'success',
|
|
72
|
-
// Will
|
|
74
|
+
// Will limit document actions and drag-and-drop for only users with these Role
|
|
73
75
|
roles: ['publisher', 'administrator'],
|
|
74
76
|
// Requires the user to be "assigned" in order to update to this State
|
|
75
77
|
requireAssignment: true,
|
|
78
|
+
// Requires the document to be valid before being promoted out of this State
|
|
79
|
+
// Warning: With many documents in the Kanban view this can negatively impact performance
|
|
80
|
+
requireValidation: true,
|
|
76
81
|
// Defines which States a document can be moved to from this one
|
|
77
82
|
transitions: ['changesRequested', 'approved']
|
|
78
83
|
}
|