@object-ui/plugin-workflow 0.1.0 → 3.0.0

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 ADDED
@@ -0,0 +1,112 @@
1
+ # @object-ui/plugin-workflow
2
+
3
+ Workflow and approval components for Object UI — visual workflow designer and approval process handler.
4
+
5
+ ## Features
6
+
7
+ - 🔀 **Workflow Designer** - Visual workflow builder with drag-and-drop nodes and edges
8
+ - ✅ **Approval Process** - Multi-step approval handling with history and comments
9
+ - 🗺️ **Minimap** - Overview minimap for complex workflows
10
+ - 🛠️ **Toolbar** - Built-in toolbar for node creation and editing
11
+ - 📜 **Approval History** - View full approval chain and decision history
12
+ - 💬 **Comments** - Add comments to approval steps
13
+ - 📦 **Auto-registered** - Components register with `ComponentRegistry` on import
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @object-ui/plugin-workflow
19
+ ```
20
+
21
+ **Peer Dependencies:**
22
+ - `react` ^18.0.0 || ^19.0.0
23
+ - `react-dom` ^18.0.0 || ^19.0.0
24
+ - `@object-ui/core`
25
+
26
+ ## Quick Start
27
+
28
+ ```tsx
29
+ import { WorkflowDesigner, ApprovalProcess } from '@object-ui/plugin-workflow';
30
+
31
+ function WorkflowEditor() {
32
+ return (
33
+ <WorkflowDesigner
34
+ workflow={workflowDefinition}
35
+ showToolbar
36
+ showMinimap
37
+ readOnly={false}
38
+ />
39
+ );
40
+ }
41
+
42
+ function ApprovalView() {
43
+ return (
44
+ <ApprovalProcess
45
+ workflowId="wf-001"
46
+ instanceId="inst-001"
47
+ currentNodeId="review-step"
48
+ showHistory
49
+ showComments
50
+ />
51
+ );
52
+ }
53
+ ```
54
+
55
+ ## API
56
+
57
+ ### WorkflowDesigner
58
+
59
+ Visual workflow builder with nodes, edges, and conditions:
60
+
61
+ ```tsx
62
+ <WorkflowDesigner
63
+ workflow={workflowDefinition}
64
+ readOnly={false}
65
+ showToolbar
66
+ showMinimap={false}
67
+ />
68
+ ```
69
+
70
+ ### ApprovalProcess
71
+
72
+ Approval process handler with history and actions:
73
+
74
+ ```tsx
75
+ <ApprovalProcess
76
+ workflowId="wf-001"
77
+ instanceId="inst-001"
78
+ currentNodeId="manager-approval"
79
+ approvalRule={approvalRuleConfig}
80
+ history={approvalHistory}
81
+ showHistory
82
+ showComments
83
+ />
84
+ ```
85
+
86
+ ### Schema-Driven Usage
87
+
88
+ Components auto-register with `ComponentRegistry`:
89
+
90
+ ```json
91
+ {
92
+ "type": "workflow-designer",
93
+ "workflow": { "nodes": [], "edges": [] },
94
+ "showToolbar": true,
95
+ "showMinimap": false
96
+ }
97
+ ```
98
+
99
+ ```json
100
+ {
101
+ "type": "approval-process",
102
+ "workflowId": "wf-001",
103
+ "instanceId": "inst-001",
104
+ "currentNodeId": "review-step",
105
+ "showHistory": true,
106
+ "showComments": true
107
+ }
108
+ ```
109
+
110
+ ## License
111
+
112
+ MIT
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './src/index'
1
+ export * from './plugin-workflow/src/index'
2
2
  export {}
@@ -8,4 +8,3 @@ export interface ApprovalProcessProps {
8
8
  * Shows current approval status, history, and action buttons for pending approvals.
9
9
  */
10
10
  export declare const ApprovalProcess: React.FC<ApprovalProcessProps>;
11
- //# sourceMappingURL=ApprovalProcess.d.ts.map
@@ -8,4 +8,3 @@ export interface WorkflowDesignerProps {
8
8
  * Provides a visual interface for creating and editing workflow definitions.
9
9
  */
10
10
  export declare const WorkflowDesigner: React.FC<WorkflowDesignerProps>;
11
- //# sourceMappingURL=WorkflowDesigner.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import { WorkflowDesigner } from './WorkflowDesigner';
2
2
  import { ApprovalProcess } from './ApprovalProcess';
3
3
  export { WorkflowDesigner, ApprovalProcess };
4
- //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/plugin-workflow",
3
- "version": "0.1.0",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.umd.cjs",
6
6
  "module": "dist/index.js",
@@ -18,21 +18,21 @@
18
18
  "peerDependencies": {
19
19
  "react": "^18.0.0 || ^19.0.0",
20
20
  "react-dom": "^18.0.0 || ^19.0.0",
21
- "@object-ui/core": "0.5.0",
22
- "@object-ui/types": "0.5.0",
23
- "@object-ui/components": "0.5.0",
24
- "@object-ui/react": "0.5.0"
21
+ "@object-ui/components": "3.0.0",
22
+ "@object-ui/core": "3.0.0",
23
+ "@object-ui/react": "3.0.0",
24
+ "@object-ui/types": "3.0.0"
25
25
  },
26
26
  "dependencies": {
27
- "clsx": "^2.1.0",
27
+ "clsx": "^2.1.1",
28
28
  "lucide-react": "^0.344.0",
29
- "tailwind-merge": "^2.2.1"
29
+ "tailwind-merge": "^2.6.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@types/node": "^25.2.2",
33
- "@types/react": "^19.2.13",
34
- "@types/react-dom": "^19.2.3",
35
- "@vitejs/plugin-react": "^5.1.3",
32
+ "@types/node": "^25.2.3",
33
+ "@types/react": "19.2.13",
34
+ "@types/react-dom": "19.2.3",
35
+ "@vitejs/plugin-react": "^5.1.4",
36
36
  "vite": "^7.3.1",
37
37
  "vite-plugin-dts": "^4.5.4",
38
38
  "vitest": "^4.0.18"
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApprovalProcess.d.ts","sourceRoot":"","sources":["../../src/ApprovalProcess.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,qBAAqB,EAAuB,MAAM,kBAAkB,CAAC;AAGnF,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAyK1D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"WorkflowDesigner.d.ts","sourceRoot":"","sources":["../../src/WorkflowDesigner.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EACV,sBAAsB,EAEvB,MAAM,kBAAkB,CAAC;AAM1B,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,sBAAsB,CAAC;CAChC;AAkCD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA8W5D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}