treege 0.10.3 → 0.11.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/CHANGELOG.md +2 -2
- package/README.md +39 -4
- package/dist/main.js +1890 -1857
- package/dist/main.umd.cjs +35 -35
- package/dist/src/components/DataDisplay/Tree/Tree.d.ts +1 -1
- package/dist/src/features/Treege/Treege.d.ts +12 -7
- package/dist/src/features/Treege/components/TreeSelect/useTreeSelect.d.ts +1 -1
- package/dist/src/features/Treege/context/TreegeContext.d.ts +60 -5
- package/dist/src/features/Treege/context/TreegeProvider.d.ts +3 -2
- package/package.json +1 -1
- package/dist/.readme.md +0 -1
- package/dist/favicon.svg +0 -12
- package/dist/src/App.d.ts +0 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -52,14 +52,49 @@ export default App;
|
|
|
52
52
|
|
|
53
53
|
| Props | Type | Default | Required | Detail |
|
|
54
54
|
|---------------|--------|-----------|----------|-----------------------------------------------------------------------------------------------|
|
|
55
|
-
|
|
|
56
|
-
| endPoint | string | undefined | false | Endpoint for API communication |
|
|
55
|
+
| backendConfig | object | undefined | false | Backend configuration. Only necessary if you want backend communication. |
|
|
57
56
|
| initialTreeId | string | undefined | false | If provided, this will fetch initial tree id. Cannot provided with `initialTree` in same time |
|
|
58
57
|
| initialTree | object | undefined | false | Initial tree data. Cannot provided with `initialTreeId` in same time |
|
|
59
58
|
|
|
60
|
-
## Generate form from Treege data
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
#### `backendConfig`
|
|
61
|
+
| Props | Type | Default | Required | Detail |
|
|
62
|
+
|-----------|--------|-----------|----------|-------------------------------------------------------------|
|
|
63
|
+
| baseUrl | string | undefined | true | Base url for API communication. ex : https://api.treege.com |
|
|
64
|
+
| authToken | string | undefined | false | Authentication token |
|
|
65
|
+
| endpoints | object | undefined | false | Endpoints configuration |
|
|
66
|
+
|
|
67
|
+
#### `endpoints`
|
|
68
|
+
| Props | Type | Default | Required | Detail |
|
|
69
|
+
|-----------|--------|-----------|-----------------|-------------------------------------------------------------|
|
|
70
|
+
| workflow | string | undefined | "/v1/workflow" | Endpoint for `get/post/patch` single `workflow` |
|
|
71
|
+
| workflows | string | undefined | "/v1/workflows" | Endpoint for get all workflows. It is a array on `workflow` |
|
|
72
|
+
|
|
73
|
+
Backend model need to be compatible with the following interface:
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
interface Workflow {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
description: string;
|
|
80
|
+
tree: Tree;
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`Tree` is a JSON object generated by `Treege` with the following interface:
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
interface Tree {
|
|
88
|
+
name: string;
|
|
89
|
+
attributes: any;
|
|
90
|
+
children: Tree[];
|
|
91
|
+
treeId?: string;
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## How use Treege data ?
|
|
96
|
+
|
|
97
|
+
You can easily generate a form with the `React library` [treege-consumer](https://github.com/Tracktor/treege-consumer) or use our own application !
|
|
63
98
|
|
|
64
99
|
## Local installation
|
|
65
100
|
|