@bpmnkit/user-tasks 0.0.21 → 0.0.23
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 +29 -21
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -9,31 +9,34 @@
|
|
|
9
9
|
[](https://github.com/bpmnkit/monorepo)
|
|
10
10
|
[](https://github.com/bpmnkit/monorepo)
|
|
11
11
|
|
|
12
|
-
[Website](https://bpmnkit.com) · [Documentation](https://
|
|
12
|
+
[Website](https://bpmnkit.com) · [Documentation](https://bpmnkit.com/docs) · [GitHub](https://github.com/bpmnkit/monorepo) · [Changelog](https://github.com/bpmnkit/monorepo/blob/main/packages/user-tasks/CHANGELOG.md)
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
## Overview
|
|
18
18
|
|
|
19
|
-
`@bpmnkit/user-tasks`
|
|
19
|
+
`@bpmnkit/user-tasks` renders a Camunda 8 user task, and the actions that go with it, into any
|
|
20
|
+
HTML element. Mount it and you get the task's linked Camunda Form, its metadata, and buttons for
|
|
21
|
+
claim, complete and — when you ask for it — reject.
|
|
20
22
|
|
|
21
|
-
It
|
|
23
|
+
It talks to a running [`@bpmnkit/proxy`](https://www.npmjs.com/package/@bpmnkit/proxy), which
|
|
24
|
+
holds the credentials and forwards to the Camunda REST API, so no cluster secret reaches the page.
|
|
22
25
|
|
|
23
26
|
## Features
|
|
24
27
|
|
|
25
|
-
- **Form rendering** — loads the task's linked Camunda Form and renders it
|
|
26
|
-
- **Claim /
|
|
27
|
-
- **Complete** — submits
|
|
28
|
-
- **Reject** — optional
|
|
29
|
-
- **Metadata
|
|
30
|
-
- **
|
|
31
|
-
- **
|
|
28
|
+
- **Form rendering** — loads the task's linked Camunda Form and renders it through `@bpmnkit/plugins/form-viewer`
|
|
29
|
+
- **Claim / unclaim** — sets or clears the task assignee
|
|
30
|
+
- **Complete** — submits the form's collected variables
|
|
31
|
+
- **Reject** — an optional return action with a reason; the button is hidden unless you pass `onReject`
|
|
32
|
+
- **Metadata** — assignee, priority, and a due date that highlights once it is overdue
|
|
33
|
+
- **Themed** — `light`, `dark`, `auto` or `neon`, drawn with the `@bpmnkit/ui` design tokens
|
|
34
|
+
- **No framework** — a function and an `HTMLElement`; it works inside React, Vue, Astro or a plain page
|
|
32
35
|
|
|
33
36
|
## Installation
|
|
34
37
|
|
|
35
38
|
```sh
|
|
36
|
-
npm install @bpmnkit/user-tasks
|
|
39
|
+
npm install @bpmnkit/user-tasks
|
|
37
40
|
```
|
|
38
41
|
|
|
39
42
|
## Quick Start
|
|
@@ -50,7 +53,7 @@ const widget = createUserTaskWidget({
|
|
|
50
53
|
dueDate: "2025-06-01T12:00:00Z",
|
|
51
54
|
priority: 50,
|
|
52
55
|
},
|
|
53
|
-
proxyUrl: "http://localhost:3033",
|
|
56
|
+
proxyUrl: "http://localhost:3033", // default
|
|
54
57
|
theme: "dark",
|
|
55
58
|
onComplete(variables) {
|
|
56
59
|
console.log("Task completed with", variables)
|
|
@@ -66,10 +69,10 @@ const widget = createUserTaskWidget({
|
|
|
66
69
|
},
|
|
67
70
|
})
|
|
68
71
|
|
|
69
|
-
//
|
|
72
|
+
// Show a different task in the same widget — the form reloads.
|
|
70
73
|
widget.setTask({ userTaskKey: "2251799813685999", name: "Approve invoice" })
|
|
71
74
|
|
|
72
|
-
//
|
|
75
|
+
// Remove it from the DOM.
|
|
73
76
|
widget.destroy()
|
|
74
77
|
```
|
|
75
78
|
|
|
@@ -85,17 +88,17 @@ interface UserTaskWidgetOptions {
|
|
|
85
88
|
task: UserTask
|
|
86
89
|
/** Base URL of the proxy server. Default: "http://localhost:3033" */
|
|
87
90
|
proxyUrl?: string
|
|
88
|
-
/** Active profile name
|
|
91
|
+
/** Active profile name, sent as the x-profile header. */
|
|
89
92
|
profile?: string | null
|
|
90
|
-
/** Visual theme. Default: "neon" */
|
|
91
|
-
theme?: "light" | "dark" | "neon"
|
|
93
|
+
/** Visual theme (`Theme` from @bpmnkit/ui). Default: "neon" */
|
|
94
|
+
theme?: "light" | "dark" | "auto" | "neon"
|
|
92
95
|
/** Called when the user completes the task. */
|
|
93
96
|
onComplete(variables: Record<string, unknown>): void
|
|
94
97
|
/** Called when the user claims the task. */
|
|
95
98
|
onClaim(): void
|
|
96
99
|
/** Called when the user unclaims the task. */
|
|
97
100
|
onUnclaim(): void
|
|
98
|
-
/** Called when the user rejects
|
|
101
|
+
/** Called when the user rejects the task. Omit to hide the Reject button. */
|
|
99
102
|
onReject?(reason: string): void
|
|
100
103
|
}
|
|
101
104
|
```
|
|
@@ -104,7 +107,7 @@ Returns a `UserTaskWidgetApi`:
|
|
|
104
107
|
|
|
105
108
|
```typescript
|
|
106
109
|
interface UserTaskWidgetApi {
|
|
107
|
-
/**
|
|
110
|
+
/** Show a different task and reload its form. */
|
|
108
111
|
setTask(task: UserTask): void
|
|
109
112
|
/** Remove the widget from the DOM and clean up. */
|
|
110
113
|
destroy(): void
|
|
@@ -119,7 +122,7 @@ interface UserTask {
|
|
|
119
122
|
name?: string
|
|
120
123
|
assignee?: string
|
|
121
124
|
candidateGroups?: string[]
|
|
122
|
-
dueDate?: string
|
|
125
|
+
dueDate?: string // ISO 8601
|
|
123
126
|
priority?: number
|
|
124
127
|
processInstanceKey?: string
|
|
125
128
|
processDefinitionKey?: string
|
|
@@ -139,14 +142,19 @@ interface UserTask {
|
|
|
139
142
|
| [`@bpmnkit/engine`](https://www.npmjs.com/package/@bpmnkit/engine) | Lightweight BPMN process execution engine |
|
|
140
143
|
| [`@bpmnkit/feel`](https://www.npmjs.com/package/@bpmnkit/feel) | FEEL expression language parser & evaluator |
|
|
141
144
|
| [`@bpmnkit/plugins`](https://www.npmjs.com/package/@bpmnkit/plugins) | 22 composable canvas plugins |
|
|
142
|
-
| [`@bpmnkit/operate`](https://www.npmjs.com/package/@bpmnkit/operate) | Monitoring and operations frontend for Camunda 8 |
|
|
143
145
|
| [`@bpmnkit/api`](https://www.npmjs.com/package/@bpmnkit/api) | Camunda 8 REST API TypeScript client |
|
|
144
146
|
| [`@bpmnkit/ascii`](https://www.npmjs.com/package/@bpmnkit/ascii) | Render BPMN diagrams as Unicode ASCII art |
|
|
147
|
+
| [`@bpmnkit/docspack`](https://www.npmjs.com/package/@bpmnkit/docspack) | BPMN Kit docs as an offline docspack package for AI agents |
|
|
145
148
|
| [`@bpmnkit/ui`](https://www.npmjs.com/package/@bpmnkit/ui) | Shared design tokens and UI components |
|
|
146
149
|
| [`@bpmnkit/profiles`](https://www.npmjs.com/package/@bpmnkit/profiles) | Shared auth, profile storage, and client factories for CLI & proxy |
|
|
150
|
+
| [`@bpmnkit/operate`](https://www.npmjs.com/package/@bpmnkit/operate) | Monitoring & operations frontend for Camunda clusters |
|
|
147
151
|
| [`@bpmnkit/connector-gen`](https://www.npmjs.com/package/@bpmnkit/connector-gen) | Generate connector templates from OpenAPI specs |
|
|
152
|
+
| [`@bpmnkit/connectors`](https://www.npmjs.com/package/@bpmnkit/connectors) | Camunda 8 OOTB connector catalog and deterministic template application |
|
|
148
153
|
| [`@bpmnkit/cli`](https://www.npmjs.com/package/@bpmnkit/cli) | Camunda 8 command-line interface (casen) |
|
|
149
154
|
| [`@bpmnkit/proxy`](https://www.npmjs.com/package/@bpmnkit/proxy) | Local AI bridge and Camunda API proxy server |
|
|
155
|
+
| [`@bpmnkit/patterns`](https://www.npmjs.com/package/@bpmnkit/patterns) | Domain process patterns for BPMNKit AIKit |
|
|
156
|
+
| [`@bpmnkit/reebe-wasm`](https://www.npmjs.com/package/@bpmnkit/reebe-wasm) | WebAssembly BPMN engine for browser simulation |
|
|
157
|
+
| [`@bpmnkit/worker-client`](https://www.npmjs.com/package/@bpmnkit/worker-client) | Thin Zeebe REST client for standalone workers |
|
|
150
158
|
| [`@bpmnkit/cli-sdk`](https://www.npmjs.com/package/@bpmnkit/cli-sdk) | Plugin authoring SDK for the casen CLI |
|
|
151
159
|
| [`@bpmnkit/create-casen-plugin`](https://www.npmjs.com/package/@bpmnkit/create-casen-plugin) | Scaffold a new casen CLI plugin in seconds |
|
|
152
160
|
| [`@bpmnkit/casen-report`](https://www.npmjs.com/package/@bpmnkit/casen-report) | HTML reports from Camunda 8 incident and SLA data |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmnkit/user-tasks",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "Embeddable user task widget for Camunda 8 — form rendering, claim/complete actions, zero dependencies",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"dist/**/*.d.ts"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@bpmnkit/api": "0.0.
|
|
22
|
-
"@bpmnkit/
|
|
23
|
-
"@bpmnkit/plugins": "0.3.
|
|
24
|
-
"@bpmnkit/
|
|
21
|
+
"@bpmnkit/api": "0.0.21",
|
|
22
|
+
"@bpmnkit/core": "0.6.0",
|
|
23
|
+
"@bpmnkit/plugins": "0.3.3",
|
|
24
|
+
"@bpmnkit/ui": "0.2.0"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
27
27
|
"bpmn",
|