treege 0.10.4 → 0.11.1

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 CHANGED
@@ -1,8 +1,4 @@
1
1
  # [Versions](https://github.com/Tracktor/treege/releases)
2
2
 
3
- ## v0.10.4
4
- - **[build]** : Exclude unused `public` directory from build
5
- - **[build]** : Exclude unused `App.tsx` from build
6
- - **[refactor]** : Improve fetching handler
7
- - **[refactor]** : Change icon save button
8
- - **[fix]** : Infinite loading when reset tree white `API` context
3
+ ## v0.11.1
4
+ - **[build]** : Improve build process
package/README.md CHANGED
@@ -52,14 +52,49 @@ export default App;
52
52
 
53
53
  | Props | Type | Default | Required | Detail |
54
54
  |---------------|--------|-----------|----------|-----------------------------------------------------------------------------------------------|
55
- | authToken | string | undefined | false | Authentication token |
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
- Form can be easily generated with the React library [treege-consumer](https://github.com/Tracktor/treege-consumer)
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