@@ -172,68 +172,6 @@ For example Agile Logs are by default purple.
172
172
173
173
174
174
175
- ## ` StorageMethods `
176
-
177
- The ` StorageMethodsInterface ` is used in the creation of a Agile [ Storage] ( ./packages/core/features/storage/Introduction.md ) Interface.
178
- Here is a Typescript Interface for quick reference,
179
- however each property will be explained in more detail below.
180
- ``` ts
181
- export interface StorageMethodsInterface {
182
- get: (key : string ) => any ;
183
- set: (key : string , value : any ) => void ;
184
- remove: (key : string ) => void ;
185
- }
186
- ```
187
-
188
- <br />
189
-
190
- #### ` get `
191
-
192
- Method to get a specific value at ` primaryKey ` from the external Storage.
193
- ``` ts
194
- myStorage .get (" item1" ); // Calls the here defined get method
195
- ```
196
-
197
- | Type | Default | Required |
198
- | --------------------------| -----------| ----------|
199
- | ` (key: string) => any ` | undefined | Yes |
200
-
201
- <br />
202
-
203
- #### ` set `
204
-
205
- Method to set a specific value at ` primaryKey ` into the external Storage.
206
- ``` ts
207
- myStorage .set (" item1" , {my: " value" }); // Calls the here defined set method
208
- ```
209
-
210
- | Type | Default | Required |
211
- | ---------------------------------------| -----------| ----------|
212
- | ` (key: string, value: any) => void ` | undefined | Yes |
213
-
214
- <br />
215
-
216
- #### ` remove `
217
-
218
- Method to remove a specific value at ` primaryKey ` from the external Storage.
219
- ``` ts
220
- myStorage .remove (" item1" ); // Calls the here defined remove method
221
- ```
222
-
223
- | Type | Default | Required |
224
- | ----------------------------| -----------| ----------|
225
- | ` (key: string) => void ` | undefined | Yes |
226
-
227
-
228
-
229
- <br />
230
-
231
- ---
232
-
233
- <br />
234
-
235
-
236
-
237
175
## ` StateIngestConfig `
238
176
239
177
The ` StateIngestConfigInterface ` is used as configuration object in functions like ` set() ` or ` undo() ` .
@@ -247,7 +185,7 @@ export interface StateIngestConfigInterface
247
185
}
248
186
```
249
187
The ` StateIngestConfigInterface ` extends some other Interfaces:
250
- - [ StateRuntimeJobConfigInterface] ( #stateruntimejobconfiginterface )
188
+ - [ StateRuntimeJobConfigInterface] ( #stateruntimejobconfig )
251
189
- [ IngestConfigInterface] ( #ingestconfiginterface )
252
190
253
191
<br />
@@ -280,7 +218,7 @@ to see when which change has been passed through the `runtime`.
280
218
281
219
282
220
283
- ## ` StateRuntimeJobConfigInterface `
221
+ ## ` StateRuntimeJobConfig `
284
222
285
223
The ` StateRuntimeJobConfigInterface ` is used as configuration object in functions like ` replace() ` or ` select() ` .
286
224
Here is a Typescript Interface for quick reference,
@@ -935,12 +873,14 @@ The `GroupAddConfigInterface` is used as configuration object in functions like
935
873
Here is a Typescript Interface for quick reference,
936
874
however each property will be explained in more detail below.
937
875
``` ts
938
- export interface GroupAddConfig {
876
+ export interface GroupAddConfig extends StateIngestConfigInterface {
939
877
method? : ' unshift' | ' push' ;
940
878
overwrite? : boolean ;
941
- background? : boolean ;
942
879
}
943
880
```
881
+ The ` GroupAddConfig ` extends some other Interfaces:
882
+ - [ StateIngestConfigInterface] ( #stateingestconfig )
883
+
944
884
945
885
<br />
946
886
@@ -982,24 +922,6 @@ MY_GROUP.add(5); // Group value is '[1, 5, 6, 2]'
982
922
| --------------------------| -----------| ----------|
983
923
| ` boolean ` | false | No |
984
924
985
- <br />
986
-
987
- #### ` background `
988
-
989
- If the ` itemKey ` should be added in ` background ` ,
990
- so that no Component rerender which has bound the Group to itself.
991
- ``` ts {5}
992
- // Causes rerender on Components
993
- MY_GROUP .add (1 );
994
-
995
- // Doesn't cause rerender on Components
996
- MY_GROUP .add (1 , {background: true });
997
- ```
998
-
999
- | Type | Default | Required |
1000
- | --------------------------| -----------| ----------|
1001
- | ` boolean ` | false | No |
1002
-
1003
925
1004
926
1005
927
<br />
@@ -1049,31 +971,96 @@ MY_COLLECTION.updateItemKey([1, 3], {background: true});
1049
971
1050
972
1051
973
1052
- ## ` GroupRemoveConfig `
974
+ ## ` ComputeConfig `
1053
975
1054
- The ` GroupRemoveConfigInterface ` is used as configuration object in functions like ` remove ()` .
976
+ The ` RecomputeConfigInterface ` is used as configuration object in functions like ` compute ()` .
1055
977
Here is a Typescript Interface for quick reference,
1056
978
however each property will be explained in more detail below.
1057
979
``` ts
1058
- export interface GroupRemoveConfigInterface {
1059
- background ? : boolean ;
980
+ export interface ComputeConfigInterface {
981
+ autodetect ? : boolean ;
1060
982
}
1061
983
```
1062
984
1063
985
<br />
1064
986
1065
- #### ` background `
987
+ #### ` autodetect `
1066
988
1067
- If the ` itemKey ` should be removed in ` background ` ,
1068
- so that no Component rerender which has bound the Group to itself.
1069
- ``` ts {5}
1070
- // Causes rerender on Components
1071
- MY_GROUP .remove (1 );
989
+ If the Computed should autodetect dependencies used in the ` computeFunction ` .
990
+ ``` ts {2,4}
991
+ MY_COMPUTED .computeFunction = () => MY_NAME .value + MY_AGE .value ;
992
+ MY_COMPUTED .recompute ({autodetect: false });
993
+ MY_COMPUTED .deps ; // Returns '[]'
994
+ MY_COMPUTED .recompute ({autodetect: true });
995
+ MY_COMPUTED .deps ; // Returns '[Obserrver(MY_NAME), Observer(MY_AGE)]'
996
+ ```
1072
997
1073
- // Doesn't cause rerender on Components
1074
- MY_GROUP .remove (1 , {background: true });
998
+ | Type | Default | Required |
999
+ | --------------------------| -----------| ----------|
1000
+ | ` boolean ` | true | No |
1001
+
1002
+
1003
+
1004
+ <br />
1005
+
1006
+ ---
1007
+
1008
+ <br />
1009
+
1010
+
1011
+
1012
+ ## ` RecomputeConfig `
1013
+
1014
+ The ` RecomputeConfigInterface ` is used as configuration object in functions like ` recompute() ` .
1015
+ Here is a Typescript Interface for quick reference,
1016
+ however each property will be explained in more detail below.
1017
+ ``` ts
1018
+ export interface RecomputeConfigInterface
1019
+ extends StateIngestConfigInterface ,
1020
+ ComputeConfigInterface {}
1021
+ ```
1022
+ The ` RecomputeConfig ` extends some other Interfaces:
1023
+ - [ StateIngestConfigInterface] ( #stateingestconfig )
1024
+ - [ ComputeConfigInterface] ( #computeconfig )
1025
+
1026
+
1027
+
1028
+ <br />
1029
+
1030
+ ---
1031
+
1032
+ <br />
1033
+
1034
+
1035
+
1036
+ ## ` UpdateComputeFunctionConfig `
1037
+
1038
+ The ` UpdateComputeFunctionConfigInterface ` is used as configuration object in functions like ` updateComputeFunction() ` .
1039
+ Here is a Typescript Interface for quick reference,
1040
+ however each property will be explained in more detail below.
1041
+ ``` ts
1042
+ export interface UpdateComputeFunctionConfigInterface
1043
+ extends RecomputeConfigInterface {
1044
+ overwriteDeps? : boolean ;
1045
+ }
1046
+ ```
1047
+ The ` RecomputeConfig ` extends some other Interfaces:
1048
+ - [ RecomputeConfigInterface] ( #recomputeconfig )
1049
+
1050
+ <br />
1051
+
1052
+ #### ` overwriteDeps `
1053
+
1054
+ If the new hard coded dependencies should entirely overwrite the old hard coded dependencies or get merged into them.
1055
+ ``` ts {2,4}
1056
+ MY_COMPUTED .deps ; // // Returns '[Obserrver(MY_NAME), Observer(MY_AGE)]'
1057
+ MY_COMPUTED .updateComputeFunction (() => {}, [MY_LOCATION ], {overwriteDeps: false });
1058
+ MY_COMPUTED .deps ; // // Returns '[Obserrver(MY_NAME), Observer(MY_AGE), Observer(MY_LOCATION)]'
1059
+ MY_COMPUTED .updateComputeFunction (() => {}, [MY_LOCATION ], {overwriteDeps: true });
1060
+ MY_COMPUTED .deps ; // // Returns '[Observer(MY_LOCATION)]'
1075
1061
```
1076
1062
1077
1063
| Type | Default | Required |
1078
1064
| --------------------------| -----------| ----------|
1079
- | ` boolean ` | false | No |
1065
+ | ` boolean ` | true | No |
1066
+
0 commit comments