@rentman/rm-core 8.0.1-1 → 8.0.1-2

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.
Files changed (110) hide show
  1. package/changelog.md +875 -872
  2. package/dist/rm-core.js +10027 -10059
  3. package/dist/rm-core.min.js +2 -2
  4. package/dist/types/classes/ApiFormatter.d.ts +66 -66
  5. package/dist/types/classes/ApiRequestService.d.ts +21 -21
  6. package/dist/types/classes/ApiResponseProcessor.d.ts +30 -30
  7. package/dist/types/classes/ChangesCompilation.d.ts +36 -36
  8. package/dist/types/classes/ChangesDelta.d.ts +62 -62
  9. package/dist/types/classes/ChangesDeltaBase.d.ts +51 -51
  10. package/dist/types/classes/ChangesProcessor.d.ts +47 -47
  11. package/dist/types/classes/CollectionEntryService.d.ts +27 -27
  12. package/dist/types/classes/CollectionMatcherBase.d.ts +22 -22
  13. package/dist/types/classes/CollectionMatcherCachedCollectionProcessor.d.ts +32 -32
  14. package/dist/types/classes/CollectionResourceService.d.ts +7 -7
  15. package/dist/types/classes/ColumnCache.d.ts +22 -22
  16. package/dist/types/classes/ColumnExpansion.d.ts +23 -23
  17. package/dist/types/classes/ColumnHandler.d.ts +22 -22
  18. package/dist/types/classes/ColumnInfo.d.ts +14 -14
  19. package/dist/types/classes/ColumnSet.d.ts +39 -39
  20. package/dist/types/classes/ColumnSubsetCache.d.ts +15 -15
  21. package/dist/types/classes/ColumnUtil.d.ts +101 -101
  22. package/dist/types/classes/ConversionMapService.d.ts +28 -28
  23. package/dist/types/classes/CreateRequest.d.ts +20 -20
  24. package/dist/types/classes/CreatedChangesDelta.d.ts +17 -17
  25. package/dist/types/classes/InternalChangesDelta.d.ts +40 -40
  26. package/dist/types/classes/ItemCache.d.ts +30 -30
  27. package/dist/types/classes/ItemCreateService.d.ts +25 -25
  28. package/dist/types/classes/ItemEntryService.d.ts +35 -35
  29. package/dist/types/classes/KeyService.d.ts +18 -18
  30. package/dist/types/classes/LockService.d.ts +32 -32
  31. package/dist/types/classes/ModuleChangesCompilation.d.ts +19 -19
  32. package/dist/types/classes/QueryColumnExtractor.d.ts +20 -20
  33. package/dist/types/classes/QueryContainsLocalIdParser.d.ts +17 -17
  34. package/dist/types/classes/QueryLinkedToParser.d.ts +16 -16
  35. package/dist/types/classes/QueryLocallyMatchableParser.d.ts +19 -19
  36. package/dist/types/classes/QueryMatcher.d.ts +19 -19
  37. package/dist/types/classes/QueryParser.d.ts +26 -26
  38. package/dist/types/classes/QueryParserBase.d.ts +20 -20
  39. package/dist/types/classes/QueryParserIdUpdater.d.ts +16 -16
  40. package/dist/types/classes/QueryService.d.ts +13 -13
  41. package/dist/types/classes/RequestBuffer.d.ts +29 -29
  42. package/dist/types/classes/RequestBufferManager.d.ts +26 -26
  43. package/dist/types/classes/RequestColumnExpansion.d.ts +16 -16
  44. package/dist/types/classes/SocketMessageHandler.d.ts +43 -43
  45. package/dist/types/classes/TemplateCache.d.ts +67 -67
  46. package/dist/types/classes/Util.d.ts +31 -31
  47. package/dist/types/classes/cache/AbstractCache.d.ts +103 -103
  48. package/dist/types/classes/cache/CachedQueryHandlerBase.d.ts +75 -75
  49. package/dist/types/classes/cache/CollectionMatcherCachedQueryProcessor.d.ts +36 -36
  50. package/dist/types/classes/cache/ItemHandlerBase.d.ts +108 -108
  51. package/dist/types/classes/cache/server/ServerCache.d.ts +83 -83
  52. package/dist/types/classes/cache/server/ServerCachedQueryHandler.d.ts +34 -34
  53. package/dist/types/classes/cache/server/ServerItemHandler.d.ts +53 -53
  54. package/dist/types/classes/cache/transaction/TransactionCache.d.ts +325 -325
  55. package/dist/types/classes/cache/transaction/TransactionCachedQueryHandler.d.ts +23 -23
  56. package/dist/types/classes/cache/transaction/TransactionCollectionHandler.d.ts +29 -29
  57. package/dist/types/classes/cache/transaction/TransactionEventHandler.d.ts +24 -24
  58. package/dist/types/classes/cache/transaction/TransactionItemHandler.d.ts +94 -94
  59. package/dist/types/classes/cache/transaction/TransactionValidator.d.ts +35 -35
  60. package/dist/types/classes/index.d.ts +46 -46
  61. package/dist/types/constants.d.ts +7 -7
  62. package/dist/types/core.d.ts +51 -51
  63. package/dist/types/factories/ApiResponseProcessorFactory.d.ts +6 -6
  64. package/dist/types/factories/ChangesCompilationFactory.d.ts +6 -6
  65. package/dist/types/factories/ChangesDeltaFactory.d.ts +13 -13
  66. package/dist/types/factories/ChangesProcessorFactory.d.ts +22 -22
  67. package/dist/types/factories/CollectionEntryFactory.d.ts +14 -14
  68. package/dist/types/factories/CollectionMatcherFactory.d.ts +19 -19
  69. package/dist/types/factories/CollectionResourceFactory.d.ts +22 -22
  70. package/dist/types/factories/ColumnExpansionFactory.d.ts +9 -9
  71. package/dist/types/factories/ColumnInfoFactory.d.ts +8 -8
  72. package/dist/types/factories/ColumnSetFactory.d.ts +20 -20
  73. package/dist/types/factories/ColumnSubsetCacheFactory.d.ts +9 -9
  74. package/dist/types/factories/CreateRequestFactory.d.ts +11 -11
  75. package/dist/types/factories/ItemCacheFactory.d.ts +8 -8
  76. package/dist/types/factories/ItemEntryFactory.d.ts +15 -15
  77. package/dist/types/factories/ItemResourceFactory.d.ts +14 -14
  78. package/dist/types/factories/ModuleChangesCompilationFactory.d.ts +5 -5
  79. package/dist/types/factories/QueryMatcherFactory.d.ts +8 -8
  80. package/dist/types/factories/QueryParserFactory.d.ts +6 -6
  81. package/dist/types/factories/RequestColumnExpansionFactory.d.ts +6 -6
  82. package/dist/types/factories/TemplateFactory.d.ts +11 -11
  83. package/dist/types/factories/TransactionCacheFactory.d.ts +15 -15
  84. package/dist/types/factories/index.d.ts +21 -21
  85. package/dist/types/index.d.ts +7 -7
  86. package/dist/types/interfaces/AbstractCacheDependencyInterface.d.ts +43 -43
  87. package/dist/types/interfaces/ApiRequestServiceInterface.d.ts +12 -12
  88. package/dist/types/interfaces/AuthInterface.d.ts +10 -10
  89. package/dist/types/interfaces/ErrorHandlerInterface.d.ts +5 -5
  90. package/dist/types/interfaces/ExceptionHandlerInterface.d.ts +3 -3
  91. package/dist/types/interfaces/LinkTreeServiceInterface.d.ts +4 -4
  92. package/dist/types/interfaces/PromiseLibraryInterface.d.ts +25 -25
  93. package/dist/types/interfaces/ServerCacheDependencyInterface.d.ts +7 -7
  94. package/dist/types/interfaces/SocketMessageInterface.d.ts +3 -3
  95. package/dist/types/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +20 -20
  96. package/dist/types/interfaces/TransactionItemHandlerDependencyInterface.d.ts +26 -26
  97. package/dist/types/interfaces/index.d.ts +11 -11
  98. package/dist/types/models/CollectionEntry.d.ts +24 -24
  99. package/dist/types/models/CollectionOptions.d.ts +24 -24
  100. package/dist/types/models/CollectionResource.d.ts +78 -78
  101. package/dist/types/models/ItemEntry.d.ts +19 -19
  102. package/dist/types/models/ItemEntryOptions.d.ts +8 -8
  103. package/dist/types/models/ItemResource.d.ts +88 -88
  104. package/dist/types/models/Template.d.ts +12 -12
  105. package/dist/types/models/index.d.ts +7 -7
  106. package/dist/types/types/ItemTypesCollection.d.ts +345 -345
  107. package/dist/types/types/PromiseInterface.d.ts +2 -2
  108. package/dist/types/types/index.d.ts +2 -2
  109. package/package.json +38 -38
  110. package/readme.md +15 -15
package/changelog.md CHANGED
@@ -1,872 +1,875 @@
1
- #Changelog
2
- Contains new features, breaking changes and their reasoning
3
-
4
- ## 8.0.1-1
5
- - Allow core-mapped TS types instead of backend-mapped TS types in `ApiFormatter.compareFields`
6
-
7
- ## 8.0.1
8
- - Uppercase operators and comparators in QueryMatcher, QueryParser and QueryService
9
- - Fix parsing short-hand `IN` queryies
10
-
11
- ## 8.0.0
12
- - Implement `@rentman/backend-types`
13
- > You will now have autocomplete and typing checking on all columns/fields 🥳
14
- - Remove `ChangesDeltaResult.rollback`
15
- > It was never really used/implemented
16
-
17
- ## 7.2.0
18
- - Add the `preventCaching` option to `CollectionOptions`
19
- > Prevents a CachedQueryItem from being cached (the CollectionResource will still be cached), you can use this when you fetch an Itemtype for which the backend doesn't send socket messages (so it never automatically updates)
20
-
21
- ## 7.1.1
22
- - Properly handle moved items in ServerCache.applyChangesFromParent (technically the backend won't ever generate a linkTo (only updates)) but it can happen when manually syncing the server cache (by doing `InternalChangesDelta.setItemMoved`)
23
-
24
- ## 7.1.0
25
- - Automatically keep aggregated values up-to-date by always refetching them
26
-
27
- ## 7.0.15
28
- - Remove an accidentally left in place debugger
29
-
30
- ## 7.0.14
31
- - Take into account collections with a 'limit' (of which the query result isn't cached) when matching socket items
32
-
33
- ## 7.0.13
34
- - Only overwrite the displayname if the required columns are present, instead of defaulting to an empty string
35
-
36
- ## 7.0.12
37
- - Fixed a bug where the core would try to update the cache key (ID) of `fieldChangeCallbacks` even when there were no callbacks for the given itemType
38
-
39
- ## 7.0.11
40
- - Fixed a bug where date values would not be compared if the descriptor was uncalled, this could lead to problems when applying changes from a parent transaction
41
-
42
- ## 7.0.10
43
- - Update references to local IDs in other items when a local ID gets updated
44
-
45
- ## 7.0.9
46
- - Take over `tabRequestParameters` when saving TransactionCache -> TransactionCache
47
-
48
- ## 7.0.8
49
- - Fixed a race condition and loop iteration error which in very rare cases caused itemEntries to be `undefined` and erroring
50
- - Add missing error handling in transaction functions
51
-
52
- ## 7.0.7
53
- - Properly handle `reverse` linkedTo's in QueryColumnExtractor and QueryLocallyMatchableParser
54
- - Implement refreshing of cached queries/collections
55
-
56
- ## 7.0.6
57
- Move fetching of lock from `TransactionItemHandler.processItemEntryChanges` to `TransactionCache.appyChangesDelta` to also capture creates and deletes.
58
-
59
- ## 7.0.5
60
- - Remove automatic fetching of derived values for not-yet-created items
61
-
62
- ## 7.0.4
63
- - Automatically resolve derived values when a new item is created
64
- - Fixed a bug where `AbstractCache.getParentFromFields` would still return `null` incorrectly
65
-
66
- ## 7.0.3
67
- - Fixed a bug where `AbstractCache.getParentFromFields` would still return `undefined` parent values
68
-
69
- ## 7.0.2
70
- - Check if any of the parent fields (`itemtype`, `item`) is `null`, in which case it won't be treated as a valid parent in `AbstractCache.getParentFromFields`
71
-
72
- ## 7.0.1
73
- - Ignore columns in ApiFormatter::hasChanges if the `modified` object does not contain a value for it.
74
-
75
- ## 7.0.0
76
- - **Breaking**: Remove `enableChangesWatcher` and `disableChangesWatcher` in `TransactionCache`.
77
- - Fetch lock token in `TransactionItemHandler.processItemEntryChanges`.
78
-
79
- ## 6.3.10
80
- - Only call `onRemove` of a collection if there are actually any items removed
81
- - Expand cached columns anyways if there are no items to expand in `TransactionCachedQueryHandler.__expandCachedQuery`
82
-
83
- ## 6.3.9
84
- - Fixed a bug where deleted local items would still appear as unsaved changes
85
-
86
- ## 6.3.8
87
- - Always fetch 'id' and 'permissions' columns so that they are always available
88
-
89
- ## 6.3.7
90
- - Fixed a bug where items in a socket message that _might_ fit (`MAYBE`) in a collection would not be checked/added.
91
-
92
- ## 6.3.6
93
- - Fixed a bug where `AbstractCache.fetchUpdatedDerivedValuesFromDelta` would attempt to use ItemChanges not cached on the transaction
94
- resulting in an error
95
-
96
- ## 6.3.5
97
- - Fixed a bug where after creating items derived values would needlessly be refetched
98
- > The core now properly detect that even though an ItemId is updated (after a create) it's still the same item so no request has to be done
99
- - Fixed a bug where ItemEntry's would not be re-cached under their new ItemIds
100
-
101
- ## 6.3.4
102
- - Fixed a bug where already cached itemEntries would not properly be detected when calling `ServerCache.processResponse`
103
- - Fixed a bug where calling `CreatedChangesDelta.remove` would add `empty` values in the array instead of removing the entry
104
-
105
- ## 6.3.3
106
- - Fixed a bug where local ItemEntries were not properly updated after saving
107
-
108
- ## 6.3.2
109
- - Fixed updating item entry itemId field after processing changes
110
-
111
- ## 6.3.1
112
-
113
- - Fixed a bug where query with a local ID would do a request to the server
114
- ```
115
- // This example should now no longer do a request
116
- transaction.getItemsByQuery(
117
- 'Tijd',
118
- {
119
- project: -11,
120
- }
121
- );
122
- ```
123
-
124
- ## 6.3.0
125
- - Allow strict typing of `FieldMap`
126
-
127
- ## 6.2.5
128
- - Remove overwriting itemType with itemType of rootItem during create
129
-
130
- ## 6.2.4
131
- - Fixed a bug where items would not appear in a collection after changes propagated from a parent transaction
132
-
133
- ## 6.2.3
134
- - Fixed a bug where `previous` would actually contain new values because the `previous` object was made after the values were already synced
135
-
136
- ## 6.2.2
137
- - Fixed a bug in syncing of initial values after saving an item causing the item to still be marked having changes
138
-
139
- ## 6.2.1
140
- - Fixed a bug where `ItemEntry`s created on the `ServerCache` where not matched on child `TransactionCache`s
141
-
142
- ## 6.2.0
143
- - Fixed a bug where synchronous validators would leave the validator in `pending` state
144
- - Only re-match items when values are actually changed
145
- - Removed `defered` from `CachedQueryItem` and added `resolve` and `reject`
146
- - Check if ItemEntries are already created before creating new ones, if that is the case treat it like an update
147
- > What could happen was that a faster request created an ItemEntry for the same item as another request
148
- > which caused the double creation of an ItemEntry
149
-
150
- ## 6.1.3
151
- - Add `isPending` function to `TransactionValidator`
152
- - `TransactionCache`s will now be invalid until all pending transaction validators are done
153
-
154
- ## 6.1.2
155
- - Check if an error key exists before deleting it in `TransactionCache.clearItemError`
156
-
157
- ## 6.1.1
158
- - Correctly pass `ErrorHandlerInterface` to `ChangesDeltaFactory`.
159
-
160
- ## 6.1.0
161
- - Return `ChangesDelta` instance in `setItemUpdated`, `setItemDeleted`, `setItemsDeleted` methods, and a promise that resolves to the instance in `setItemCreated` and `setItemsCreated`.
162
-
163
- ## 6.0.2
164
- - Update `query` parameter of `getByQuery`, `getLocalByQuery`, `batchGetLocalByParent`, and `matchQuery` in `ItemCache`.
165
-
166
- ## 6.0.1
167
- - Fixed a bug where a local item wouldn't be found when using `TransactionCache.getItemByState` on a child transaction
168
-
169
- ## 6.0.0
170
- - Refactored query caching structure
171
- - Properly implemented `limit` in collections
172
- - Removed extending of collections
173
-
174
- ## 5.0.1
175
- - Add 'icon' column type to non-selectable column types
176
-
177
- ## 5.0.0
178
- - Fixed a bug where created, creator and permissions was always set to default values
179
- - **Breaking:** Remove `onItemsCreated` collection callback.
180
-
181
- ## 4.0.4
182
- - Fixed a bug where ModuleChangesCompilation wouldn't include all changes
183
-
184
- ## 4.0.3
185
- - Local collections are now correctly identified when using a local ID in a linkTo request instead of the `parent` option
186
- - Fix issue where local collection entries were not moved to server cache after save.
187
-
188
- ## 4.0.2
189
- - Fixed a bug where clearing collections would error after saving a transaction
190
-
191
- ## 4.0.1
192
- - Remove thrown error in `ItemResource.callOnChange`
193
- > The frontend still relied on this and we won't refactor that at this point
194
-
195
- ## 4.0.0
196
- - Removed `ItemResourceOptions.onChange`, this is replaced by `TransactionCache.registerFieldChangeCallback`
197
- > Because the `onChange` is no longer stored on the ItemResource, the ItemResource doesn't have to be cached.
198
- > This way you don't have to call `ItemResource.clearResource` anymore (you do need to deregister the fieldChange callbacks)
199
-
200
- ## 3.1.0
201
- - **Breaking:** Remove `fields` property, add `getFields` method in `Template` class.
202
- - **Breaking:** Add `ConversionMapService`. Update `updateItemValues` to take a `source` and `destination` parameter.
203
- - Update `entry.itemId` for items created items in `TransactionCache.getDelta`.
204
- > This fixes an issue with updating IDs of local items.
205
- - Add dependency interfaces for `AbstractCache`, `ServerCache`, `TransactionCache`, `TransactionCollectionHandler`, `TransactionItemHandler`.
206
- - Add `CreatedChangesDelta` class, which replaces the `created` component of the `ChangesDelta` and includes some query methods. Add `isEmpty` method to `ChangesDelta`.
207
-
208
- ## 3.0.1
209
- - Fixed a bug where the `StateKeyType` enum couldn't be used when imported
210
-
211
- ## 3.0.0
212
- - Remove ViewResource, EditResource, CollectionViewResource and CollectionEditResource
213
- > There was no real distinction between them anymore since the core 2.0 update.
214
- > You can now use the base ItemResource and CollectionResource types instead
215
-
216
- ## 2.4.0
217
- - Update Typescript version to `3.7.2`, also update other plugins
218
-
219
- ## 2.3.0
220
- - Add callbacks when errors are set/cleared to `TransactionEventHandler`
221
- - Added the possibility to differentiate between errors to display below a field and on the save button in `TransactionValidator`
222
- - Changed the format of the error translations from `string` to `() => string` in `TransactionValidator`
223
- > Now the translation function will only be called when the error is actually set, not when it's cleared
224
-
225
- ## 2.2.1
226
- - Fixed a bug where resolving derived values for new items (in `TransactionCache.applyChangesDelta`) would sometimes error
227
-
228
- ## 2.2.0
229
- - `ChangesDelta.setItem(s)Created` will now accept incomplete input values
230
- > It will now fetch a template for you and process the items, so you no longer need to do that yourself
231
-
232
- ## 2.1.2
233
- - Fixed a bug where deleted ItemEntries weren't picked up when detecting transaction changes
234
-
235
- ## 2.1.1
236
- - Fixed a bug where an ItemEntry's errors wouldn't be deleted when the ItemEntry was deleted on a transaction
237
-
238
- ## 2.1.0
239
- - Refactor `TransactionCache.getItemsByQuery` to check cached entries (just like a collection)
240
- - Add `TransactionValidator`, allow passing of a `TransactionValidatorFactory` to a transaction
241
- > You can use these validators to set errors using `setItemError` and `setGlobalError`
242
- - Fixed a bug where `TransactionItemHandler.cloneItemEntry` could only clone entry with changes on the target transaction.
243
- > It will not look for changes recursively on the transaction change
244
-
245
- ## 2.0.19
246
- - Ensure all requestColumns for newly created ItemEntries from a template are available
247
- - Ensure derived values for newly created ItemEntries from a template are available
248
-
249
- ## 2.0.18
250
- - Include read-only columns when detecting changes in TransactionItemHandler.processItemEntryChanges
251
- > Read-only columns shouldn't count as changes on the tab, but they should be taking into account when deciding whether or not to call `onChange`
252
-
253
- ## 2.0.17
254
- - Fixed a bug where deleting an item that isn't in the transaction's item entry cache would result in an error
255
- - Fixed a bug where response columns weren't set for newly created local CollectionEntries
256
- - Fixed a bug where items weren't matched for newly created local CollectionEntries
257
-
258
- ## 2.0.16
259
- - Fixed a bug where queries with a link to a local parent item weren't updated on save
260
-
261
- ## 2.0.15
262
- - Cache ItemEntries that fit collections on the CollectionEntry's query instead of the CollectionEntry's id
263
- - Add a 'hint' to ChangesDeltas which allows skipping the extra request to validate `maybe` query matches
264
- - Create transaction changes for ItemEntry updates in the changesDelta if non exist yet when calling `TransactionCache.applyChangesDelta`
265
- > This allows you to update values on a transaction without having to fetch a resource for it by calling
266
- > `ChangesDelta.setItemUpdated()`
267
-
268
- ## 2.0.14
269
- - Fixed reading of derived values in `getItemIdByColumn` when a ChangesDelta is passed
270
-
271
- ## 2.0.13
272
- - Fixed a bug where the incorrect fields where applied to the ChangesDelta in `TransactionItemHandler.cloneItemEntry`
273
- - A RequestBuffer's promise will now resolve after the ServerCache.processResponse promise is done, ensuring all values are present before continuing
274
- - Request columns for the request ItemType will now properly be taken into account in ServerCache.processResponse ensuring root columns are always properly set. (This is used to update derived values)
275
-
276
- ## 2.0.12
277
- - Fixed a bug where created changes weren't copied to the itemchanges
278
- - Only take readonly parent columns instead of all readonly columns in `ApiFormatter.hasChanges`
279
- - Fixed a bug where ItemEntry's where still in `ItemCache.entriesByEntryId` after clearing them
280
-
281
- ## 2.0.11
282
- - Fixed a bug where changes weren't copied to the itemchanges
283
- - Fixed correct isCalledAfterApiSave values on calls to ServerCache.processResponse
284
-
285
- ## 2.0.10
286
- - Construct `ColumnSet` with proper `requestColumns` when creating a `Template` with additional columns
287
-
288
- ## 2.0.9
289
- - Properly process linked items from the template request in `TransactionItemHandler.createItems`
290
-
291
- ## 2.0.8
292
- - Fixed a bug where not all fields where available even tough an ItemResource with specific columns was created
293
-
294
- ## 2.0.7
295
- - Define abstract copyTransactionItemEntryChanges on ItemHandlerBase
296
- - Implement copyTransactionItemEntryChanges on TransactionItemHandler and ServerItemHandler
297
- - Fix AbstractCache/ServerCache/TransactionCache `getParent` function arguments
298
- > With the newly added arguments the function definitions didn't align anymore causing typescript errors
299
- > Even though the arguments aren't used in the `ServerCache` they're added in there
300
-
301
- ## 2.0.6
302
- - Remove `ApiFormatter.lazyClone`
303
- > You can't lazily clone moment objects because the moment you wanted to clone could be changed in the time the getter isn't invoked, resulting in a different value
304
-
305
- - Create a copy of the child transaction's field instead of copying the object reference in `TransactionCache.applyChangeFromChild` and `ChangesProcessor.executeCreateRequest`
306
- > When writing to the object references you're changing multiple transactions at once, while this should be handled by applyCHangesFromParent
307
-
308
- ## 2.0.5
309
- - Add `callOnAddWithInitialItems` option to `CollectionResourceOptions`
310
- > If `true` the `onAdd` callback will be called with the initial set of items
311
-
312
-
313
- ## 2.0.4
314
- - Add `isCalledAfterSocketUpdate` to `onAdd`, `onRemove` and `onChange` callbacks
315
- > You can use this if a data change should only trigger an action when the user caused it himself
316
-
317
- ## 2.0.3
318
- - Fix `CollectionEditResource.removeItems`
319
- - Move `getCurrentCollectionEntryCache` and `getCurrentItemEntryCache` from `TransactionCache` to `AbstractCache`
320
-
321
- ## 2.0.2
322
- - Fix marking entries as deleted and compiling this into a request
323
-
324
- ## 2.0.1
325
- - Expand CollectionEntry's columns in `ServerCollectionHandler.fetchCollectionData`
326
-
327
- ## 2.0.0 - Major caching refactor
328
- - Completely reworked internal caching structure, see [this Confluence page](https://rentman.atlassian.net/wiki/spaces/DEV/pages/704872456/) for the motivations behind it.
329
-
330
-
331
- ## 1.9.0
332
- - Don't create ItemResources when not returning links in `ItemAdministrator.getNewResourceWithId` and in `ItemAdministrator.constructOnItemsExpanded`
333
-
334
- ## 1.8.0
335
- - Remove `ResourceCache` and `resourceLevel`
336
- > You should now manually call `resource.clearResource` when you no longer need a resource
337
- - Add `onConstruct` function to `ItemResource` and `CollectionResource`
338
- > This is overwritten by the frontend to track resource creation
339
-
340
- ## 1.7.6
341
- - Add priority parameter to local cache callbacks. The callback condition (`always` / `onClose` / `skipOnClose`) no longer has any effect on the order in which the callbacks get executed.
342
- - **Breaking:** Remove `LocalCacheCallbackCondition` enum.
343
- - Add `itemId` parameter to `ItemHandler.fetchNewItem`. An error is thrown when an ID already exists. Add `getNewResourceWithId` to ItemAdministrator. Deprecate `getItemByState`.
344
-
345
- ## 1.7.5
346
- - For template column sets it is no longer assumed all columns are present. This fixes an issue with incomplete column
347
- sets in the front-end.
348
- - Fix issue where `changesProcessor` instance was undefined in `itemResourceFactory` and `collectionResourceFactory`.
349
- Create variables for each core service in order to get a TypeScript error when a dependency hasn't been initialized yet.
350
-
351
- ## 1.7.4
352
- - Add support for strict ItemType type checking in `FieldMap`
353
-
354
- ## 1.7.3
355
- - Add support for strict ItemType type checking
356
- > This is temporarily defaulted to `any` to prevent compile errors in the frontend
357
-
358
- ## 1.7.2
359
- - Fix some typing issues in:
360
- - ApiResponseProcessor
361
- - ItemCache
362
- - KeyService
363
-
364
- ## 1.7.1
365
- - Fix issue where `CreateRequestFactory` would be undefined in `ChangesProcessor`.
366
-
367
- ## 1.7.0
368
- - **Breaking:** remove `ChangesProcessorFactory`. Add `ChangesProcessor` instance to core directly.
369
-
370
- ### Resource caching
371
- - **Breaking:** the following properties are removed:
372
- - On `ItemEntry`: `clearResources`, `deactivateResources`.
373
- - On `CollectionEntry`: `clearResources`, `getCurrentResource`.
374
- - On `CollectionResourceOptions`: `clearOnTabChange`, `clearOnSubTabChange`.
375
- - An additional `level` parameter has been added to all methods that return resources.
376
- - When creating resources using `ItemResourceFactory` or `CollectionResourceFactory`, this parameter is mandatory.
377
- A `defaultResourceLevel` parameter has been added to the `LocalCache` constructor.
378
- - A `clearResources` method has been added to `ItemAdministrator`. When calling this method, all item / collection
379
- and collection resources with a level of `level` or higher will be removed.
380
- - The `clearResources` method has been removed from `LocalCache`.
381
- - The `setCurrentLocalCache` function has been removed from `LocalCacheManagerInterface`.
382
-
383
- ## 1.6.13
384
- - When encountering a collection entry with `PROMISED_EXPAND` status, call `getCachedEntryStatus` after the initial
385
- promise has been resolved.
386
-
387
- > This is the likely cause of the issue where `_resolve` is called on a non-deferred collection entry.
388
-
389
- ## 1.6.12
390
- - Fix error that occurs when trying to resolve a non-deferred collection entry.
391
-
392
- ## 1.6.11
393
- - Fix issue where `QueryMatcher.matchComplexQuery` would return the wrong value.
394
-
395
- ## 1.6.10
396
- - **Breaking**: Remove `linkType`, `linkIdArray` properties from `LinkCollectionDefinition`. Add `linkType`,
397
- `linkIdArray` parameters to `ItemAdministrator.getLinkCollectionsFromDef`.
398
-
399
- ## 1.6.9
400
- - Redeploy of `1.6.8`
401
-
402
- ## 1.6.8
403
- - Add support for `not` in queries
404
-
405
- ## 1.6.7
406
- - Fix issue where `CollectionMatcher.addToCollections` wouldn't return the correct type.
407
-
408
- ## 1.6.6
409
- - Add `callOnAdd` parameter in `CollectionHandler.batchExtend`. Set `updateInitial` to true. Remove `updateInitial` parameter in `CollectionEntry.extend`, as it should always be true.
410
- > The `extend` function only concerns itself with remote items, so no local changes should be generated.
411
-
412
- ## 1.6.5
413
- - Fix issue where a derived column could be marked as the `link` (parent) column in the column set.
414
- > This could lead to instances where a different column would be set to the value of the parent.
415
-
416
- ## 1.6.4
417
- - Fix issue where the `onChange` collection callback would not be called when updating it in the options.
418
- - Add `callOnAdd` parameter to collection matcher. When set to `false`, `onAdd` is not called for the `resultCollectionResource`.
419
-
420
- ## 1.6.3
421
- - Properly type ApiResponseProcessor - fetchObjectArray
422
-
423
- ## 1.6.2
424
- - Fix issue where the collection handler would return collection entries before they were resolved when calling `batchFetch`.
425
-
426
- ## 1.6.1-3
427
- - Check for linkedTo before checking for subqueries in QueryMatcher
428
- > Linkedto also has `.query` and was incorrectly marked as a subquery
429
-
430
- ## 1.6.1-2
431
- - Fixed shorthand query with null values
432
- > The QueryParser would incorrectly identify subqueries when using null in a shorthand
433
-
434
- ## 1.6.1-1
435
- - Fixed shorthand query with Moment values
436
- > The QueryParser would incorrectly identify Moment objects as a subquery
437
-
438
- ## 1.6.1
439
- - Added support for subqueries in QueryParser and QueryMatcher
440
- > Collections using subqueries will always return 'maybe' in the QueryMatcher
441
-
442
- ## 1.6.0
443
- - All external callbacks are now wrapped in a `try ... catch` block. This prevents them from breaking core functionality.
444
- - **Breaking**: Add `ExceptionHandlerInterface` parameter to core constructor.
445
-
446
- ## 1.5.9
447
- - Fix issue that occurs when trying to resolve a `ColumnSet` using a single non-existing column.
448
- Catch exceptions that might occur when resolving an `ItemEntry`.
449
- - Add `mergeRequestColumns`, `mergeResponseColumns` to `ColumnSet`. When encountering new items while expanding a collection, add them to the collection.
450
-
451
- ## 1.5.8
452
- - Introduce `RemoteViewResource` and `LocalViewResource`.
453
- > The `fields` property of a `RemoteViewResource` represents
454
- server values, while the `fields` property of a `LocalViewResource` represents local values.
455
- - The `fields` property of a `ViewResource` is now read only.
456
-
457
- ## 1.5.7-1
458
- - Make ItemResource/CollectionResource base class abstract
459
- - Add missing overload functions in some places
460
- - Fix default comparator `QueryMatcher.parseSimpleQuery`
461
- - Fix `ExtendedCollectionMatchResult` `collection` property type
462
-
463
- ## 1.5.7
464
- - Properly type Collections & ItemResources (and return values) in the whole core.
465
- > The core will now properly return Collections & ItemResources based on the passed CollectionOptions.
466
- > You can now also type the expected collection type
467
-
468
- ```
469
- // Expects a collection with editCollection and editItems both `true`
470
- // Will properly return EditResources for all collection functions
471
- const collection: CollectionEditResource<EditResource>;
472
-
473
- // other variations are:
474
- // CollectionViewResource<ViewResource>
475
- // CollectionViewResource<EditResource>
476
- // CollectionEditResource<ViewResource>
477
-
478
- this.core.itemAdministrator.getCollection(
479
- 'Notitie',
480
- {
481
- editCollection: true, // Will return a CollectionEditResource
482
- editItems: true // Will return EditResources instead of ViewResources in `.items`
483
- }
484
- )
485
- ```
486
-
487
- ## 1.5.6
488
- - Add `getAllLocalCaches` to `LocalCacheManagerInterface`, remove item entries from all local caches on socket delete.
489
-
490
- ## 1.5.5
491
- - Add 'order' column type handling to ApiFormatter functions
492
-
493
- ## 1.5.4
494
- - Fix issue where parent would be incorrectly set when cloning a single item.
495
- - Type functions related to expansion maps in `ItemEntryService`.
496
-
497
- ## 1.5.3
498
- - Fix issue where the `enableSave` collection resource option would default to `false`. This would throw an error when
499
- calling `save` on a collection resource where this option was not explicitly set.
500
-
501
- ## 1.5.2
502
- - Type functions in `ColumnUtil` class.
503
- - Add `getRequestColumnId` and `containsDerivedColumns` to `ColumnUtil`.
504
- > `getRequestColumnId` should be used instead of `Util.getFirstProperty` when retrieving a column ID.
505
- - **Breaking:** Remove `ColumnUtil.isColumnSubset`. Use `ColumnSet.isSuperSetOf` instead.
506
- - Remove `findColumnObject`. Rename `findColumn` to `findRequestColumn`.
507
-
508
- ## 1.5.1
509
- - Properly remove item entry stub from (local) cache when request fails.
510
- - Fix issue where item or collection options could be set to undefined.
511
-
512
- ## 1.5.0
513
- - Add `SocketMessage` type and add types to `SocketMessageHandler`
514
- - Expand local items requested using `getItemById` or `getItemsById` in `ItemAdministrator`.
515
- (`fetchItem` or `fetchItems` in `ItemHandler`.)
516
- - Implement expanding of local collections. This no longer leads to invalid requests.
517
- - **Breaking:** The `expand` function in `CollectionEntry` now has an `ItemCache` parameter.
518
- - **Warning:** This version contains major changes.
519
-
520
- ### Introduce typing of item and collection options
521
- - **Breaking:** Removed `QueryItemType` collection entry option.
522
- - **Breaking:** Removed `ItemResourceService`.
523
- - Removed `processOptions` parameter from `createCollectionResource` (`ItemAdministrator`). It is now equivalent to
524
- `addCollection`.
525
- - When creating an item resource using `ItemResourceFactory`, a collection entry using `CollectionResourceFactory` or a
526
- collection resource using `CollectionResourceFactory` it is no longer necessary to process options beforehand. It is
527
- still necessary when interacting with `CollectionHandler` or `ItemHandler` directly.
528
-
529
- ## v1.4.0
530
- - Add `expandProcessLinkedItems` and `expandAddToCollections` to `ItemAdministrator`. These are analogues to
531
- `processLinkedItems` and `addToCollections`, but also expand the items with (derived) values and columns as necessary.
532
- They have a slightly different type signature.
533
- - Whenever a collection is requested, the `CollectionHandler` now makes sure that added local items are expanded as
534
- necessary.
535
- - **Breaking:** Last parameter of `ItemHandler.createLocalEntries` is now a callback function.
536
- - **Breaking:** Rename `TemplateLinkedItemEntryMap` type to `TemplateItemEntryMap`.
537
-
538
- ## v1.3.8
539
- - Add `isSaving` to `LocalCache`
540
- > We use this to disable the cancel/save buttons while the localCache is saving in the frontend
541
-
542
- ## v1.3.7
543
- - Fix issues that generate invalid requests / changes when moving existing item to another collection, then deleting the parent.
544
- - Remove slip workarounds
545
- - Add api request types
546
- - Add types to `ModuleChangesCompilation`
547
-
548
- ## v1.3.6
549
- - Skip add / remove collection callbacks when calling `revertChanges` (`LocalCache`).
550
-
551
- ## v1.3.5
552
- - Fix issue where items added to collections when resolving wouldn't be removed in `revertChanges` (`LocalCache`).
553
-
554
- ## v1.3.4
555
- - Add country to isFilteredColumn in ColumnUtil
556
-
557
- ## v1.3.3
558
- - Move processLocalConfigColumns and consolidateColumns from ColumnUtil to frontend
559
- > These functions are specifically used for rendering ui-grid in the frontend, so there's
560
- no reason to have them in the core
561
-
562
- ## v1.3.2
563
- - Fix types path in package.json
564
-
565
- ## v1.3.1
566
- - Fix types path in package.json
567
-
568
- ## v1.3.0
569
- - Rename PromiseInterface to PromiseLibraryInterface
570
- > PromiseInterface is now used for the internal promise type
571
-
572
- - Use PromiseInterface instead of Promise as internal promise type
573
- > This allows us to overwrite the PromiseInterface definition in the frontend indicate usage of ng.IPromise
574
-
575
- ## v1.2.9
576
- - Call processOptions in fetchDerivedValuesByColumn
577
- > Bug was introduced earlier but got enabled in v1.2.7
578
-
579
- ## v1.2.8
580
- - Add toJSON methods for ItemResources, ItemEntries, and ColumnSets to fix circular dependencies in JSON.stringify
581
-
582
- ## v1.2.7
583
- - Set itemEntry parent when generating a stub
584
-
585
- ## v1.2.6
586
- - Fix an issue introduced in v1.2.5.
587
-
588
- ## v1.2.5
589
- - When a local item cannot by found, return a newly created item in `getItemByState` (`ItemAdministrator`) only. This
590
- solves an issue with refreshing on a local edit view.
591
-
592
- ## v1.2.4
593
- - **Breaking:** When a local item cannot by found, instead of a new item being created an error is thrown. This means it
594
- is no longer possible to create local items using `getItemById` or `getItemsById` in the `ItemAdministrator` class.
595
- - **Breaking:** Removed `getItemDefinition` and `getItemByDef` in the `ItemAdministrator` class. Added `getItemByState`.
596
- - Renamed types `TemplateResponseItemEntryMap` to `TemplateItemEntryMap` and `TemplateResponseLinkedItemEntryMap` to
597
- `TemplateLinkedItemEntryMap`.
598
- - Removed `getCollectionCacheKey` in `KeyService`. (Legacy code.)
599
-
600
- ## v1.2.3
601
- - Fixed issue where derived values deeper than one layer couldn't be resolved.
602
-
603
- ## v1.2.2
604
- - Fixed issue where in derived values weren't set after create request.
605
-
606
- ## v1.2.1
607
- - **Breaking:** Replaced the `initial` parameter with the `callOnChange` parameter (`true` by default) in the `commit`
608
- function of the `EditResource` class.
609
- - Fixed issue in `setLocalFields` (`ItemEntry`) where some values were wrongly assumed to be present in `initialValues`.
610
- - Optimization: Disabled automatic resolution of derived values in `addItems` (`CollectionEditResource`) when `modInstant` is set to true.
611
-
612
- ## v1.2.0
613
- - **Breaking:** When calling `addItems` or `addItem` on the `CollectionEditResource` class derived values are now
614
- resolved automatically. Instead of a compound object like `{fields: {key: 'value'}, derived: {}}` an object like
615
- `{key: 'value'}` should now be used as argument when calling these functions.
616
- - **Breaking:** Added `localCache` parameter to `CollectionResource` constructor.
617
-
618
- ## v1.1.20
619
- - Fixed minor issue where collection wouldn't be deferred properly before expanding.
620
- - `onChange` is now called automatically when when calling `commit` on an edit resource.
621
-
622
- ## v1.1.19
623
- - **Breaking:** Renamed `getCurrentChanges` to `getModuleChanges` in the `ItemAdministrator` class. Added optional
624
- `localCache` parameter.
625
-
626
- ### Local cache callback refactoring
627
- - Removed `onSaveWithoutClosing` event.
628
- - Added `condition` parameter to `onBeforeSave` and `onSaveSuccess` (possible values are `always`, `onClose` or
629
- `skipOnClose`, defaults to `always`). Callbacks registered with `condition: always` will get executed before other
630
- callbacks.
631
- - Pass the local cache itself to all registered callback functions. Pass the item ID conversion map as second argument
632
- to `onSaveSuccess` callback functions.
633
-
634
- ## v1.1.18
635
- - Calling `expand` on a `CollectionEntry` manually no longer defers the collection entry.
636
- - The `batchFetch` and `batchExpand` functions in the `CollectionHandler` class now properly defer and resolve the
637
- collection entries.
638
-
639
- ## v1.1.17
640
- - Fixed issue where the `getLocalByQuery` function in the `ItemCache` class wouldn't return any items.
641
- - When batch resolving collection entries, `CollectionHandler` now looks for matching items using `getByQuery` instead
642
- of `getByParent`.
643
-
644
- ### Cache invalidation
645
- - Added `queueReload` function to `ItemEntry` class. This will reload the item when the item entry itself or a
646
- collection entry containing the item is requested.
647
- - The `queueReload` function in the `CollectionEntry` class no longer directly defers the item.
648
- - Added `invalidateCache` function to the `ItemAdministrator` class. This will call `queueReload` on all item entries
649
- and collection entries.
650
-
651
- ### Item entry refactoring
652
- - Renamed `process` to `setFields`.
653
- - Replaced `processLocal` with `setLocalFields`. This function no longer has a `modified` parameter.
654
- - `setModified` now also sets local default values.
655
- - Removed `setCreator`. This function was called twice in some instances.
656
- - **Breaking:** Added `derived` parameter to `updateFields`
657
-
658
- ##v1.16
659
- - Pass `hasChanges` as second argument to `onBeforeSave` callbacks in the `LocalCache` class. This fixes an issue with
660
- project financial values in the front-end. [RM4-9577]
661
- - Added `callOnActivate` parameter to `addItems` function in `CollectionEditResource` class. Use this to prevent items
662
- from being added to the local cache.
663
-
664
- ##v1.15
665
- - Fix `fetchItemTypesTranslations` function in `ColumnHandler` class.
666
- - Fix type definition of `PromiseInterface.all`.
667
-
668
- ##v1.14
669
- - The `ChangesCompiler` now always processes local collections. (Even if they don't have edit resources.) This fixes an
670
- issue with recurring appointments in the front-end.
671
-
672
- ##v1.13
673
- - Add option to exclude itemTypes during createLocalEntries.
674
-
675
- ##v1.12
676
- - **Breaking:** `ItemResource.isNew` returns true *only* if the resource was created using
677
- `ItemAdministrator.getNewResource` or `ItemAdministrator.getItemByDef`. This fixes an issue where items where removed
678
- from the local cache inadvertently.
679
- - The `start`, `commit` and `rollback` functions of `EditResource` now return the resource itself to facilitate chaining.
680
- - When calling `CollectionEntry.revertChanges`, callbacks like `onAdd` / `onRemove` and `onActivate` / `onDeactivate`
681
- are now respected. This fixes an issue where items where *not* removed from the local cache.
682
- - When removing *local* items from collections, they are removed from `initial` as well as `modified`. This fixes an
683
- issue where changes were being detected continuously.
684
- - Updated the order of requests in `changesProcessor`. The `update` request is now executed before the `delete` request,
685
- except when updating documents. This fixes several issues.
686
- - `CollectionCache` now uses a map instead of an array to store collections. This fixes an issue where the same
687
- collection was added multiple times.
688
- - Updated all models to use dependency objects. This increases ease of debugging.
689
-
690
- ##v.1.11
691
- - Fixed issue that occurs when saving when having an existing item refer to a newly created item.
692
- - **Breaking:** Removed `ItemResourceService.isNewResource`.
693
- - **Breaking:** Renamed `ItemResource.isNewResource` to `ItemResource.isNew`. Removed parameter.
694
- - `ItemResource.isNew` is equivalent to `ItemResource.isLocal`, while `EditResource.isNew` checks also checks for
695
- completed transactions.
696
-
697
- ##v.1.10
698
- - Fixed issue where changes on different subtabs were not detected.
699
-
700
- ##v1.1.9
701
- - Exposed `noop` function on `RmCore` class.
702
- > This is used in order to check whether a callback has a default value.
703
- - Added `copyRequestColumns` function to `ColumnUtil` class.
704
- - Made parameters of `ItemAdministrator.saveCurrentLocalCache` and `LocalCache.save` optional.
705
- - **Breaking:** Reordered parameters of `ChangesProcessor.execute` to be consistent with
706
- `ItemAdministrator.saveCurrentLocalCache`. The new order is `singleItems` - `collections` - `parameters` -
707
- `breakUpByParent` - `onAfterCreateCallback`.
708
-
709
- ##v1.1.8
710
- - Set default value for `params` to `{filter: false}` in `request` function in `ColumnHandler` class.
711
-
712
- ##v1.1.7
713
- - Fixed issue where cached item entries or collection entries wouldn't be added to the local cache.
714
-
715
- ##v1.1.6
716
- - Fixed issue with deferred item entries.
717
- - Re-enable changes watcher after save.
718
- - Added optional `id` parameter to `LocalCache` constructor.
719
-
720
- ##v1.1.5
721
- - Added `clearItem` function to `LocalCache` class.
722
-
723
- ##v.1.1.4
724
- - Fix issue where items where not added to the local cache automatically when they where added to a collection.
725
- > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add
726
- the items to the local cache.
727
- > In other instances this might be debatable because it doesn't do any real harm. *Not*
728
- doing it however can definitely be harmful.
729
-
730
- ##v.1.1.3
731
- - Fixed an issue where all collections in a local cache would be cleared.
732
- - **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
733
- `LocalCacheManagerInterface`.
734
-
735
- ##v1.1.2
736
- - Fixed an issue concerning derived values.
737
-
738
- ## v1.1.1
739
- - Fixed an issue where changes wouldn't be detected.
740
- - **Breaking:** Removed the `_hasChanges` function in the `localCache` class. If you want to force changes detection,
741
- call `detectChanges` instead. Otherwise, rely on the `hasChanges` variable.
742
- - **Breaking:** Removed the `enableWatcher` and `disableWatcher` functions. Use `enableChangesWatcher` and
743
- `disableChangesWatcher` instead.
744
-
745
- ## v1.1.0
746
- ### Development
747
-
748
- #### Strict TypeScript compilation
749
- Added the following TypeScript compiler options:
750
- - noImplicitThis
751
- - noImplicitReturns
752
- - strictNullChecks
753
- - noUnusedLocals
754
- - noUnusedParameters
755
-
756
- I would advise enabling these for all TypeScript projects from now on.
757
-
758
- #### Ordered imports and dependencies
759
- Imports are now ordered alphabetically and grouped by folder. Added a TSLint option to enforce this.
760
- Please note that this also applies for imports from the folder the file is currently in.
761
- For example, in `models/ItemResource.ts`, `itemEntry` should be imported like so:
762
- `import { ItemEntry } from '../models';`
763
-
764
- Also, factory and class dependencies should be ordered alphabetically as well. This will make it easier to add and
765
- remove dependencies in the future.
766
-
767
- ### Breaking changes
768
-
769
- - Renamed `changesCompiler` to `changesCompilation`, `changesCompilerFactory` to `changesCompilationFactory`,
770
- `moduleChangesCompiler` to `moduleChangesCompilation` and `moduleChangesCompilerFactory` to
771
- `moduleChangesCompilationFactory`.
772
- - Removed the `allLinks` parameter from the `query` function definition in the `ApiRequestServiceInterface`. This is
773
- no longer supported in the back-end.
774
-
775
- #### Item and collection entries
776
- - Moved *all* functions that handle item entries from the `ItemEntryService` to the `ItemEntry` class.
777
- - Added the following functions to `ItemEntryService`:
778
- - `createLocalConversionMap`;
779
- - `expandLocalConversionMap`;
780
- - `expandConversionMap`;
781
- - `batchExpandConversionMap`;
782
- - `batchClone`.
783
- - Cloning of item entries now works slightly differently. The function will attempt to generate a new
784
- item ID, and update the conversion map accordingly, but will respect the item ID that is already there.
785
-
786
- #### Rework item caching
787
- Newly created item entries and collection entries are no longer added to the global *or* local cache by default.
788
- All entries are added to the global cache on save. Item entries are added to the local cache when resources are created
789
- using the item administrator or when resources are created when adding the items to a collection.
790
-
791
- > This will increase reliability by ensuring the global cache is no longer 'polluted' with local items. Also, this will
792
- > allow for the creation item and collection entries without caching them directly. This is required for the copying and
793
- > pasting of items.
794
-
795
- Other changes:
796
-
797
- - Moved `saveLocal` to `ItemAdministrator`;
798
- - `ItemAdministrator.fetchTitle` should now be called instead of `ItemHandler.fetchTitle`;
799
- - The `ItemAdministrator` collection matching functions (`addToCollections`, `removeFromCollections`) should now be
800
- called instead of those in the `CollectionHandler`. The `CollectionHandler` should only be used to reflect changes
801
- already on the backend. (Use `getCollectionMatcher`.)
802
-
803
-
804
- ##v1.0.33
805
- - Really fix types path
806
-
807
- ##v1.0.33
808
- - Fix types path
809
-
810
- ##v1.0.32
811
- - Update `tsconfig.json` to put definitions in the root folder
812
- > The app had an issue with AOT compilation because of this
813
-
814
- ##v1.0.31
815
- - Fix `columnHandler.fetchItemTypeTranslations`
816
- > It incorrectly looped over the response map, it should now work again
817
-
818
- ##v1.0.30
819
- - Remove `updateTabParams` from LocalCacheManagerInterface
820
- > The function wasn't used
821
-
822
- - Reworked class export
823
- > Imports are now done from @rentman/rm-core, old imports are broken. This is because the old export structure didn't always work
824
-
825
- ##v1.0.29
826
- - Fix inverted inArray check in CollectionEntry.removeItems
827
- > A delete message from the socket deleted all BUT the deleted items, this should now be fixed
828
-
829
- ##v1.0.28
830
- Bug fixes only
831
-
832
- ##v1.0.27
833
- - `ItemEntry.initial` is now undefined by default
834
- > In the SocketMessageHandler we use this check to see if an ItemEntry is a stub
835
-
836
- ##v1.0.26
837
- Bundle both minified and unminified code, include sourcemaps from dev build
838
-
839
- ##v1.0.24, v1.0.25
840
- ! Use version `v1.0.26` !
841
-
842
- - The core now expects a `promiseInterface` that should implement the provided `promiseInterface`
843
- > We need to be able to hook into the promises in order to call a digest cycle to update the ui in the frontend
844
-
845
- - Rename `ItemEntry.entryId` to `ItemEntry.id
846
- > It used to be called `id`, but it was changed in the seperation of the core.
847
- > You can use the `id` to uniquely identify an entry, since itemId can be updated (local to saved id)
848
-
849
- - Rename ItemResource `startTransaction` to `start`
850
- > Other functions are called `commit` and `rollback` so having 'transaction' only for start doesn't make much sense
851
-
852
- - `SocketMessageHandler.onMessageReceived` now returns a promise
853
- > You can now use the updated items or hook into the result to update the ui for example
854
-
855
-
856
- ##v1.0.23
857
- - Rename ResourceCache to LocalCache
858
- > LocalCache only caches local items (name better reflects functionality)
859
-
860
- - Remove getter/setter for hasChanges
861
- > hasChanges is called in a digest loop in the frontend, so for performance reasons we don't want to recompute the value every time
862
-
863
- - Remove `_getCollection` from ItemAdministrator
864
- > `_getCollection` is now named `getCollection` and the old `getCollection` is removed. The query is part of the
865
- > options and should not be given as a separate argument. This was included to support the frontend
866
-
867
- - Remove `saveCurrentTab` from ItemAdministrator
868
- > `saveCurrentTab` makes no sense because the core has no concept of tabs, you should use `saveCurrentLocalCache` instead
869
-
870
- - Remove `getTabEntry` and `resetTabEntry` from ItemAdministrator
871
- > `getTabEntry` and `resetTabEntry` make no sense because the core has no concept of tabs, you should use `getLocalCache` and `resetLocalCache` instead
872
-
1
+ #Changelog
2
+ Contains new features, breaking changes and their reasoning
3
+
4
+ ## 8.0.1-2
5
+ - Add `cloneCreatedChanges` function to `ChangesDeltaFactory`.
6
+
7
+ ## 8.0.1-1
8
+ - Allow core-mapped TS types instead of backend-mapped TS types in `ApiFormatter.compareFields`
9
+
10
+ ## 8.0.1
11
+ - Uppercase operators and comparators in QueryMatcher, QueryParser and QueryService
12
+ - Fix parsing short-hand `IN` queryies
13
+
14
+ ## 8.0.0
15
+ - Implement `@rentman/backend-types`
16
+ > You will now have autocomplete and typing checking on all columns/fields 🥳
17
+ - Remove `ChangesDeltaResult.rollback`
18
+ > It was never really used/implemented
19
+
20
+ ## 7.2.0
21
+ - Add the `preventCaching` option to `CollectionOptions`
22
+ > Prevents a CachedQueryItem from being cached (the CollectionResource will still be cached), you can use this when you fetch an Itemtype for which the backend doesn't send socket messages (so it never automatically updates)
23
+
24
+ ## 7.1.1
25
+ - Properly handle moved items in ServerCache.applyChangesFromParent (technically the backend won't ever generate a linkTo (only updates)) but it can happen when manually syncing the server cache (by doing `InternalChangesDelta.setItemMoved`)
26
+
27
+ ## 7.1.0
28
+ - Automatically keep aggregated values up-to-date by always refetching them
29
+
30
+ ## 7.0.15
31
+ - Remove an accidentally left in place debugger
32
+
33
+ ## 7.0.14
34
+ - Take into account collections with a 'limit' (of which the query result isn't cached) when matching socket items
35
+
36
+ ## 7.0.13
37
+ - Only overwrite the displayname if the required columns are present, instead of defaulting to an empty string
38
+
39
+ ## 7.0.12
40
+ - Fixed a bug where the core would try to update the cache key (ID) of `fieldChangeCallbacks` even when there were no callbacks for the given itemType
41
+
42
+ ## 7.0.11
43
+ - Fixed a bug where date values would not be compared if the descriptor was uncalled, this could lead to problems when applying changes from a parent transaction
44
+
45
+ ## 7.0.10
46
+ - Update references to local IDs in other items when a local ID gets updated
47
+
48
+ ## 7.0.9
49
+ - Take over `tabRequestParameters` when saving TransactionCache -> TransactionCache
50
+
51
+ ## 7.0.8
52
+ - Fixed a race condition and loop iteration error which in very rare cases caused itemEntries to be `undefined` and erroring
53
+ - Add missing error handling in transaction functions
54
+
55
+ ## 7.0.7
56
+ - Properly handle `reverse` linkedTo's in QueryColumnExtractor and QueryLocallyMatchableParser
57
+ - Implement refreshing of cached queries/collections
58
+
59
+ ## 7.0.6
60
+ Move fetching of lock from `TransactionItemHandler.processItemEntryChanges` to `TransactionCache.appyChangesDelta` to also capture creates and deletes.
61
+
62
+ ## 7.0.5
63
+ - Remove automatic fetching of derived values for not-yet-created items
64
+
65
+ ## 7.0.4
66
+ - Automatically resolve derived values when a new item is created
67
+ - Fixed a bug where `AbstractCache.getParentFromFields` would still return `null` incorrectly
68
+
69
+ ## 7.0.3
70
+ - Fixed a bug where `AbstractCache.getParentFromFields` would still return `undefined` parent values
71
+
72
+ ## 7.0.2
73
+ - Check if any of the parent fields (`itemtype`, `item`) is `null`, in which case it won't be treated as a valid parent in `AbstractCache.getParentFromFields`
74
+
75
+ ## 7.0.1
76
+ - Ignore columns in ApiFormatter::hasChanges if the `modified` object does not contain a value for it.
77
+
78
+ ## 7.0.0
79
+ - **Breaking**: Remove `enableChangesWatcher` and `disableChangesWatcher` in `TransactionCache`.
80
+ - Fetch lock token in `TransactionItemHandler.processItemEntryChanges`.
81
+
82
+ ## 6.3.10
83
+ - Only call `onRemove` of a collection if there are actually any items removed
84
+ - Expand cached columns anyways if there are no items to expand in `TransactionCachedQueryHandler.__expandCachedQuery`
85
+
86
+ ## 6.3.9
87
+ - Fixed a bug where deleted local items would still appear as unsaved changes
88
+
89
+ ## 6.3.8
90
+ - Always fetch 'id' and 'permissions' columns so that they are always available
91
+
92
+ ## 6.3.7
93
+ - Fixed a bug where items in a socket message that _might_ fit (`MAYBE`) in a collection would not be checked/added.
94
+
95
+ ## 6.3.6
96
+ - Fixed a bug where `AbstractCache.fetchUpdatedDerivedValuesFromDelta` would attempt to use ItemChanges not cached on the transaction
97
+ resulting in an error
98
+
99
+ ## 6.3.5
100
+ - Fixed a bug where after creating items derived values would needlessly be refetched
101
+ > The core now properly detect that even though an ItemId is updated (after a create) it's still the same item so no request has to be done
102
+ - Fixed a bug where ItemEntry's would not be re-cached under their new ItemIds
103
+
104
+ ## 6.3.4
105
+ - Fixed a bug where already cached itemEntries would not properly be detected when calling `ServerCache.processResponse`
106
+ - Fixed a bug where calling `CreatedChangesDelta.remove` would add `empty` values in the array instead of removing the entry
107
+
108
+ ## 6.3.3
109
+ - Fixed a bug where local ItemEntries were not properly updated after saving
110
+
111
+ ## 6.3.2
112
+ - Fixed updating item entry itemId field after processing changes
113
+
114
+ ## 6.3.1
115
+
116
+ - Fixed a bug where query with a local ID would do a request to the server
117
+ ```
118
+ // This example should now no longer do a request
119
+ transaction.getItemsByQuery(
120
+ 'Tijd',
121
+ {
122
+ project: -11,
123
+ }
124
+ );
125
+ ```
126
+
127
+ ## 6.3.0
128
+ - Allow strict typing of `FieldMap`
129
+
130
+ ## 6.2.5
131
+ - Remove overwriting itemType with itemType of rootItem during create
132
+
133
+ ## 6.2.4
134
+ - Fixed a bug where items would not appear in a collection after changes propagated from a parent transaction
135
+
136
+ ## 6.2.3
137
+ - Fixed a bug where `previous` would actually contain new values because the `previous` object was made after the values were already synced
138
+
139
+ ## 6.2.2
140
+ - Fixed a bug in syncing of initial values after saving an item causing the item to still be marked having changes
141
+
142
+ ## 6.2.1
143
+ - Fixed a bug where `ItemEntry`s created on the `ServerCache` where not matched on child `TransactionCache`s
144
+
145
+ ## 6.2.0
146
+ - Fixed a bug where synchronous validators would leave the validator in `pending` state
147
+ - Only re-match items when values are actually changed
148
+ - Removed `defered` from `CachedQueryItem` and added `resolve` and `reject`
149
+ - Check if ItemEntries are already created before creating new ones, if that is the case treat it like an update
150
+ > What could happen was that a faster request created an ItemEntry for the same item as another request
151
+ > which caused the double creation of an ItemEntry
152
+
153
+ ## 6.1.3
154
+ - Add `isPending` function to `TransactionValidator`
155
+ - `TransactionCache`s will now be invalid until all pending transaction validators are done
156
+
157
+ ## 6.1.2
158
+ - Check if an error key exists before deleting it in `TransactionCache.clearItemError`
159
+
160
+ ## 6.1.1
161
+ - Correctly pass `ErrorHandlerInterface` to `ChangesDeltaFactory`.
162
+
163
+ ## 6.1.0
164
+ - Return `ChangesDelta` instance in `setItemUpdated`, `setItemDeleted`, `setItemsDeleted` methods, and a promise that resolves to the instance in `setItemCreated` and `setItemsCreated`.
165
+
166
+ ## 6.0.2
167
+ - Update `query` parameter of `getByQuery`, `getLocalByQuery`, `batchGetLocalByParent`, and `matchQuery` in `ItemCache`.
168
+
169
+ ## 6.0.1
170
+ - Fixed a bug where a local item wouldn't be found when using `TransactionCache.getItemByState` on a child transaction
171
+
172
+ ## 6.0.0
173
+ - Refactored query caching structure
174
+ - Properly implemented `limit` in collections
175
+ - Removed extending of collections
176
+
177
+ ## 5.0.1
178
+ - Add 'icon' column type to non-selectable column types
179
+
180
+ ## 5.0.0
181
+ - Fixed a bug where created, creator and permissions was always set to default values
182
+ - **Breaking:** Remove `onItemsCreated` collection callback.
183
+
184
+ ## 4.0.4
185
+ - Fixed a bug where ModuleChangesCompilation wouldn't include all changes
186
+
187
+ ## 4.0.3
188
+ - Local collections are now correctly identified when using a local ID in a linkTo request instead of the `parent` option
189
+ - Fix issue where local collection entries were not moved to server cache after save.
190
+
191
+ ## 4.0.2
192
+ - Fixed a bug where clearing collections would error after saving a transaction
193
+
194
+ ## 4.0.1
195
+ - Remove thrown error in `ItemResource.callOnChange`
196
+ > The frontend still relied on this and we won't refactor that at this point
197
+
198
+ ## 4.0.0
199
+ - Removed `ItemResourceOptions.onChange`, this is replaced by `TransactionCache.registerFieldChangeCallback`
200
+ > Because the `onChange` is no longer stored on the ItemResource, the ItemResource doesn't have to be cached.
201
+ > This way you don't have to call `ItemResource.clearResource` anymore (you do need to deregister the fieldChange callbacks)
202
+
203
+ ## 3.1.0
204
+ - **Breaking:** Remove `fields` property, add `getFields` method in `Template` class.
205
+ - **Breaking:** Add `ConversionMapService`. Update `updateItemValues` to take a `source` and `destination` parameter.
206
+ - Update `entry.itemId` for items created items in `TransactionCache.getDelta`.
207
+ > This fixes an issue with updating IDs of local items.
208
+ - Add dependency interfaces for `AbstractCache`, `ServerCache`, `TransactionCache`, `TransactionCollectionHandler`, `TransactionItemHandler`.
209
+ - Add `CreatedChangesDelta` class, which replaces the `created` component of the `ChangesDelta` and includes some query methods. Add `isEmpty` method to `ChangesDelta`.
210
+
211
+ ## 3.0.1
212
+ - Fixed a bug where the `StateKeyType` enum couldn't be used when imported
213
+
214
+ ## 3.0.0
215
+ - Remove ViewResource, EditResource, CollectionViewResource and CollectionEditResource
216
+ > There was no real distinction between them anymore since the core 2.0 update.
217
+ > You can now use the base ItemResource and CollectionResource types instead
218
+
219
+ ## 2.4.0
220
+ - Update Typescript version to `3.7.2`, also update other plugins
221
+
222
+ ## 2.3.0
223
+ - Add callbacks when errors are set/cleared to `TransactionEventHandler`
224
+ - Added the possibility to differentiate between errors to display below a field and on the save button in `TransactionValidator`
225
+ - Changed the format of the error translations from `string` to `() => string` in `TransactionValidator`
226
+ > Now the translation function will only be called when the error is actually set, not when it's cleared
227
+
228
+ ## 2.2.1
229
+ - Fixed a bug where resolving derived values for new items (in `TransactionCache.applyChangesDelta`) would sometimes error
230
+
231
+ ## 2.2.0
232
+ - `ChangesDelta.setItem(s)Created` will now accept incomplete input values
233
+ > It will now fetch a template for you and process the items, so you no longer need to do that yourself
234
+
235
+ ## 2.1.2
236
+ - Fixed a bug where deleted ItemEntries weren't picked up when detecting transaction changes
237
+
238
+ ## 2.1.1
239
+ - Fixed a bug where an ItemEntry's errors wouldn't be deleted when the ItemEntry was deleted on a transaction
240
+
241
+ ## 2.1.0
242
+ - Refactor `TransactionCache.getItemsByQuery` to check cached entries (just like a collection)
243
+ - Add `TransactionValidator`, allow passing of a `TransactionValidatorFactory` to a transaction
244
+ > You can use these validators to set errors using `setItemError` and `setGlobalError`
245
+ - Fixed a bug where `TransactionItemHandler.cloneItemEntry` could only clone entry with changes on the target transaction.
246
+ > It will not look for changes recursively on the transaction change
247
+
248
+ ## 2.0.19
249
+ - Ensure all requestColumns for newly created ItemEntries from a template are available
250
+ - Ensure derived values for newly created ItemEntries from a template are available
251
+
252
+ ## 2.0.18
253
+ - Include read-only columns when detecting changes in TransactionItemHandler.processItemEntryChanges
254
+ > Read-only columns shouldn't count as changes on the tab, but they should be taking into account when deciding whether or not to call `onChange`
255
+
256
+ ## 2.0.17
257
+ - Fixed a bug where deleting an item that isn't in the transaction's item entry cache would result in an error
258
+ - Fixed a bug where response columns weren't set for newly created local CollectionEntries
259
+ - Fixed a bug where items weren't matched for newly created local CollectionEntries
260
+
261
+ ## 2.0.16
262
+ - Fixed a bug where queries with a link to a local parent item weren't updated on save
263
+
264
+ ## 2.0.15
265
+ - Cache ItemEntries that fit collections on the CollectionEntry's query instead of the CollectionEntry's id
266
+ - Add a 'hint' to ChangesDeltas which allows skipping the extra request to validate `maybe` query matches
267
+ - Create transaction changes for ItemEntry updates in the changesDelta if non exist yet when calling `TransactionCache.applyChangesDelta`
268
+ > This allows you to update values on a transaction without having to fetch a resource for it by calling
269
+ > `ChangesDelta.setItemUpdated()`
270
+
271
+ ## 2.0.14
272
+ - Fixed reading of derived values in `getItemIdByColumn` when a ChangesDelta is passed
273
+
274
+ ## 2.0.13
275
+ - Fixed a bug where the incorrect fields where applied to the ChangesDelta in `TransactionItemHandler.cloneItemEntry`
276
+ - A RequestBuffer's promise will now resolve after the ServerCache.processResponse promise is done, ensuring all values are present before continuing
277
+ - Request columns for the request ItemType will now properly be taken into account in ServerCache.processResponse ensuring root columns are always properly set. (This is used to update derived values)
278
+
279
+ ## 2.0.12
280
+ - Fixed a bug where created changes weren't copied to the itemchanges
281
+ - Only take readonly parent columns instead of all readonly columns in `ApiFormatter.hasChanges`
282
+ - Fixed a bug where ItemEntry's where still in `ItemCache.entriesByEntryId` after clearing them
283
+
284
+ ## 2.0.11
285
+ - Fixed a bug where changes weren't copied to the itemchanges
286
+ - Fixed correct isCalledAfterApiSave values on calls to ServerCache.processResponse
287
+
288
+ ## 2.0.10
289
+ - Construct `ColumnSet` with proper `requestColumns` when creating a `Template` with additional columns
290
+
291
+ ## 2.0.9
292
+ - Properly process linked items from the template request in `TransactionItemHandler.createItems`
293
+
294
+ ## 2.0.8
295
+ - Fixed a bug where not all fields where available even tough an ItemResource with specific columns was created
296
+
297
+ ## 2.0.7
298
+ - Define abstract copyTransactionItemEntryChanges on ItemHandlerBase
299
+ - Implement copyTransactionItemEntryChanges on TransactionItemHandler and ServerItemHandler
300
+ - Fix AbstractCache/ServerCache/TransactionCache `getParent` function arguments
301
+ > With the newly added arguments the function definitions didn't align anymore causing typescript errors
302
+ > Even though the arguments aren't used in the `ServerCache` they're added in there
303
+
304
+ ## 2.0.6
305
+ - Remove `ApiFormatter.lazyClone`
306
+ > You can't lazily clone moment objects because the moment you wanted to clone could be changed in the time the getter isn't invoked, resulting in a different value
307
+
308
+ - Create a copy of the child transaction's field instead of copying the object reference in `TransactionCache.applyChangeFromChild` and `ChangesProcessor.executeCreateRequest`
309
+ > When writing to the object references you're changing multiple transactions at once, while this should be handled by applyCHangesFromParent
310
+
311
+ ## 2.0.5
312
+ - Add `callOnAddWithInitialItems` option to `CollectionResourceOptions`
313
+ > If `true` the `onAdd` callback will be called with the initial set of items
314
+
315
+
316
+ ## 2.0.4
317
+ - Add `isCalledAfterSocketUpdate` to `onAdd`, `onRemove` and `onChange` callbacks
318
+ > You can use this if a data change should only trigger an action when the user caused it himself
319
+
320
+ ## 2.0.3
321
+ - Fix `CollectionEditResource.removeItems`
322
+ - Move `getCurrentCollectionEntryCache` and `getCurrentItemEntryCache` from `TransactionCache` to `AbstractCache`
323
+
324
+ ## 2.0.2
325
+ - Fix marking entries as deleted and compiling this into a request
326
+
327
+ ## 2.0.1
328
+ - Expand CollectionEntry's columns in `ServerCollectionHandler.fetchCollectionData`
329
+
330
+ ## 2.0.0 - Major caching refactor
331
+ - Completely reworked internal caching structure, see [this Confluence page](https://rentman.atlassian.net/wiki/spaces/DEV/pages/704872456/) for the motivations behind it.
332
+
333
+
334
+ ## 1.9.0
335
+ - Don't create ItemResources when not returning links in `ItemAdministrator.getNewResourceWithId` and in `ItemAdministrator.constructOnItemsExpanded`
336
+
337
+ ## 1.8.0
338
+ - Remove `ResourceCache` and `resourceLevel`
339
+ > You should now manually call `resource.clearResource` when you no longer need a resource
340
+ - Add `onConstruct` function to `ItemResource` and `CollectionResource`
341
+ > This is overwritten by the frontend to track resource creation
342
+
343
+ ## 1.7.6
344
+ - Add priority parameter to local cache callbacks. The callback condition (`always` / `onClose` / `skipOnClose`) no longer has any effect on the order in which the callbacks get executed.
345
+ - **Breaking:** Remove `LocalCacheCallbackCondition` enum.
346
+ - Add `itemId` parameter to `ItemHandler.fetchNewItem`. An error is thrown when an ID already exists. Add `getNewResourceWithId` to ItemAdministrator. Deprecate `getItemByState`.
347
+
348
+ ## 1.7.5
349
+ - For template column sets it is no longer assumed all columns are present. This fixes an issue with incomplete column
350
+ sets in the front-end.
351
+ - Fix issue where `changesProcessor` instance was undefined in `itemResourceFactory` and `collectionResourceFactory`.
352
+ Create variables for each core service in order to get a TypeScript error when a dependency hasn't been initialized yet.
353
+
354
+ ## 1.7.4
355
+ - Add support for strict ItemType type checking in `FieldMap`
356
+
357
+ ## 1.7.3
358
+ - Add support for strict ItemType type checking
359
+ > This is temporarily defaulted to `any` to prevent compile errors in the frontend
360
+
361
+ ## 1.7.2
362
+ - Fix some typing issues in:
363
+ - ApiResponseProcessor
364
+ - ItemCache
365
+ - KeyService
366
+
367
+ ## 1.7.1
368
+ - Fix issue where `CreateRequestFactory` would be undefined in `ChangesProcessor`.
369
+
370
+ ## 1.7.0
371
+ - **Breaking:** remove `ChangesProcessorFactory`. Add `ChangesProcessor` instance to core directly.
372
+
373
+ ### Resource caching
374
+ - **Breaking:** the following properties are removed:
375
+ - On `ItemEntry`: `clearResources`, `deactivateResources`.
376
+ - On `CollectionEntry`: `clearResources`, `getCurrentResource`.
377
+ - On `CollectionResourceOptions`: `clearOnTabChange`, `clearOnSubTabChange`.
378
+ - An additional `level` parameter has been added to all methods that return resources.
379
+ - When creating resources using `ItemResourceFactory` or `CollectionResourceFactory`, this parameter is mandatory.
380
+ A `defaultResourceLevel` parameter has been added to the `LocalCache` constructor.
381
+ - A `clearResources` method has been added to `ItemAdministrator`. When calling this method, all item / collection
382
+ and collection resources with a level of `level` or higher will be removed.
383
+ - The `clearResources` method has been removed from `LocalCache`.
384
+ - The `setCurrentLocalCache` function has been removed from `LocalCacheManagerInterface`.
385
+
386
+ ## 1.6.13
387
+ - When encountering a collection entry with `PROMISED_EXPAND` status, call `getCachedEntryStatus` after the initial
388
+ promise has been resolved.
389
+
390
+ > This is the likely cause of the issue where `_resolve` is called on a non-deferred collection entry.
391
+
392
+ ## 1.6.12
393
+ - Fix error that occurs when trying to resolve a non-deferred collection entry.
394
+
395
+ ## 1.6.11
396
+ - Fix issue where `QueryMatcher.matchComplexQuery` would return the wrong value.
397
+
398
+ ## 1.6.10
399
+ - **Breaking**: Remove `linkType`, `linkIdArray` properties from `LinkCollectionDefinition`. Add `linkType`,
400
+ `linkIdArray` parameters to `ItemAdministrator.getLinkCollectionsFromDef`.
401
+
402
+ ## 1.6.9
403
+ - Redeploy of `1.6.8`
404
+
405
+ ## 1.6.8
406
+ - Add support for `not` in queries
407
+
408
+ ## 1.6.7
409
+ - Fix issue where `CollectionMatcher.addToCollections` wouldn't return the correct type.
410
+
411
+ ## 1.6.6
412
+ - Add `callOnAdd` parameter in `CollectionHandler.batchExtend`. Set `updateInitial` to true. Remove `updateInitial` parameter in `CollectionEntry.extend`, as it should always be true.
413
+ > The `extend` function only concerns itself with remote items, so no local changes should be generated.
414
+
415
+ ## 1.6.5
416
+ - Fix issue where a derived column could be marked as the `link` (parent) column in the column set.
417
+ > This could lead to instances where a different column would be set to the value of the parent.
418
+
419
+ ## 1.6.4
420
+ - Fix issue where the `onChange` collection callback would not be called when updating it in the options.
421
+ - Add `callOnAdd` parameter to collection matcher. When set to `false`, `onAdd` is not called for the `resultCollectionResource`.
422
+
423
+ ## 1.6.3
424
+ - Properly type ApiResponseProcessor - fetchObjectArray
425
+
426
+ ## 1.6.2
427
+ - Fix issue where the collection handler would return collection entries before they were resolved when calling `batchFetch`.
428
+
429
+ ## 1.6.1-3
430
+ - Check for linkedTo before checking for subqueries in QueryMatcher
431
+ > Linkedto also has `.query` and was incorrectly marked as a subquery
432
+
433
+ ## 1.6.1-2
434
+ - Fixed shorthand query with null values
435
+ > The QueryParser would incorrectly identify subqueries when using null in a shorthand
436
+
437
+ ## 1.6.1-1
438
+ - Fixed shorthand query with Moment values
439
+ > The QueryParser would incorrectly identify Moment objects as a subquery
440
+
441
+ ## 1.6.1
442
+ - Added support for subqueries in QueryParser and QueryMatcher
443
+ > Collections using subqueries will always return 'maybe' in the QueryMatcher
444
+
445
+ ## 1.6.0
446
+ - All external callbacks are now wrapped in a `try ... catch` block. This prevents them from breaking core functionality.
447
+ - **Breaking**: Add `ExceptionHandlerInterface` parameter to core constructor.
448
+
449
+ ## 1.5.9
450
+ - Fix issue that occurs when trying to resolve a `ColumnSet` using a single non-existing column.
451
+ Catch exceptions that might occur when resolving an `ItemEntry`.
452
+ - Add `mergeRequestColumns`, `mergeResponseColumns` to `ColumnSet`. When encountering new items while expanding a collection, add them to the collection.
453
+
454
+ ## 1.5.8
455
+ - Introduce `RemoteViewResource` and `LocalViewResource`.
456
+ > The `fields` property of a `RemoteViewResource` represents
457
+ server values, while the `fields` property of a `LocalViewResource` represents local values.
458
+ - The `fields` property of a `ViewResource` is now read only.
459
+
460
+ ## 1.5.7-1
461
+ - Make ItemResource/CollectionResource base class abstract
462
+ - Add missing overload functions in some places
463
+ - Fix default comparator `QueryMatcher.parseSimpleQuery`
464
+ - Fix `ExtendedCollectionMatchResult` `collection` property type
465
+
466
+ ## 1.5.7
467
+ - Properly type Collections & ItemResources (and return values) in the whole core.
468
+ > The core will now properly return Collections & ItemResources based on the passed CollectionOptions.
469
+ > You can now also type the expected collection type
470
+
471
+ ```
472
+ // Expects a collection with editCollection and editItems both `true`
473
+ // Will properly return EditResources for all collection functions
474
+ const collection: CollectionEditResource<EditResource>;
475
+
476
+ // other variations are:
477
+ // CollectionViewResource<ViewResource>
478
+ // CollectionViewResource<EditResource>
479
+ // CollectionEditResource<ViewResource>
480
+
481
+ this.core.itemAdministrator.getCollection(
482
+ 'Notitie',
483
+ {
484
+ editCollection: true, // Will return a CollectionEditResource
485
+ editItems: true // Will return EditResources instead of ViewResources in `.items`
486
+ }
487
+ )
488
+ ```
489
+
490
+ ## 1.5.6
491
+ - Add `getAllLocalCaches` to `LocalCacheManagerInterface`, remove item entries from all local caches on socket delete.
492
+
493
+ ## 1.5.5
494
+ - Add 'order' column type handling to ApiFormatter functions
495
+
496
+ ## 1.5.4
497
+ - Fix issue where parent would be incorrectly set when cloning a single item.
498
+ - Type functions related to expansion maps in `ItemEntryService`.
499
+
500
+ ## 1.5.3
501
+ - Fix issue where the `enableSave` collection resource option would default to `false`. This would throw an error when
502
+ calling `save` on a collection resource where this option was not explicitly set.
503
+
504
+ ## 1.5.2
505
+ - Type functions in `ColumnUtil` class.
506
+ - Add `getRequestColumnId` and `containsDerivedColumns` to `ColumnUtil`.
507
+ > `getRequestColumnId` should be used instead of `Util.getFirstProperty` when retrieving a column ID.
508
+ - **Breaking:** Remove `ColumnUtil.isColumnSubset`. Use `ColumnSet.isSuperSetOf` instead.
509
+ - Remove `findColumnObject`. Rename `findColumn` to `findRequestColumn`.
510
+
511
+ ## 1.5.1
512
+ - Properly remove item entry stub from (local) cache when request fails.
513
+ - Fix issue where item or collection options could be set to undefined.
514
+
515
+ ## 1.5.0
516
+ - Add `SocketMessage` type and add types to `SocketMessageHandler`
517
+ - Expand local items requested using `getItemById` or `getItemsById` in `ItemAdministrator`.
518
+ (`fetchItem` or `fetchItems` in `ItemHandler`.)
519
+ - Implement expanding of local collections. This no longer leads to invalid requests.
520
+ - **Breaking:** The `expand` function in `CollectionEntry` now has an `ItemCache` parameter.
521
+ - **Warning:** This version contains major changes.
522
+
523
+ ### Introduce typing of item and collection options
524
+ - **Breaking:** Removed `QueryItemType` collection entry option.
525
+ - **Breaking:** Removed `ItemResourceService`.
526
+ - Removed `processOptions` parameter from `createCollectionResource` (`ItemAdministrator`). It is now equivalent to
527
+ `addCollection`.
528
+ - When creating an item resource using `ItemResourceFactory`, a collection entry using `CollectionResourceFactory` or a
529
+ collection resource using `CollectionResourceFactory` it is no longer necessary to process options beforehand. It is
530
+ still necessary when interacting with `CollectionHandler` or `ItemHandler` directly.
531
+
532
+ ## v1.4.0
533
+ - Add `expandProcessLinkedItems` and `expandAddToCollections` to `ItemAdministrator`. These are analogues to
534
+ `processLinkedItems` and `addToCollections`, but also expand the items with (derived) values and columns as necessary.
535
+ They have a slightly different type signature.
536
+ - Whenever a collection is requested, the `CollectionHandler` now makes sure that added local items are expanded as
537
+ necessary.
538
+ - **Breaking:** Last parameter of `ItemHandler.createLocalEntries` is now a callback function.
539
+ - **Breaking:** Rename `TemplateLinkedItemEntryMap` type to `TemplateItemEntryMap`.
540
+
541
+ ## v1.3.8
542
+ - Add `isSaving` to `LocalCache`
543
+ > We use this to disable the cancel/save buttons while the localCache is saving in the frontend
544
+
545
+ ## v1.3.7
546
+ - Fix issues that generate invalid requests / changes when moving existing item to another collection, then deleting the parent.
547
+ - Remove slip workarounds
548
+ - Add api request types
549
+ - Add types to `ModuleChangesCompilation`
550
+
551
+ ## v1.3.6
552
+ - Skip add / remove collection callbacks when calling `revertChanges` (`LocalCache`).
553
+
554
+ ## v1.3.5
555
+ - Fix issue where items added to collections when resolving wouldn't be removed in `revertChanges` (`LocalCache`).
556
+
557
+ ## v1.3.4
558
+ - Add country to isFilteredColumn in ColumnUtil
559
+
560
+ ## v1.3.3
561
+ - Move processLocalConfigColumns and consolidateColumns from ColumnUtil to frontend
562
+ > These functions are specifically used for rendering ui-grid in the frontend, so there's
563
+ no reason to have them in the core
564
+
565
+ ## v1.3.2
566
+ - Fix types path in package.json
567
+
568
+ ## v1.3.1
569
+ - Fix types path in package.json
570
+
571
+ ## v1.3.0
572
+ - Rename PromiseInterface to PromiseLibraryInterface
573
+ > PromiseInterface is now used for the internal promise type
574
+
575
+ - Use PromiseInterface instead of Promise as internal promise type
576
+ > This allows us to overwrite the PromiseInterface definition in the frontend indicate usage of ng.IPromise
577
+
578
+ ## v1.2.9
579
+ - Call processOptions in fetchDerivedValuesByColumn
580
+ > Bug was introduced earlier but got enabled in v1.2.7
581
+
582
+ ## v1.2.8
583
+ - Add toJSON methods for ItemResources, ItemEntries, and ColumnSets to fix circular dependencies in JSON.stringify
584
+
585
+ ## v1.2.7
586
+ - Set itemEntry parent when generating a stub
587
+
588
+ ## v1.2.6
589
+ - Fix an issue introduced in v1.2.5.
590
+
591
+ ## v1.2.5
592
+ - When a local item cannot by found, return a newly created item in `getItemByState` (`ItemAdministrator`) only. This
593
+ solves an issue with refreshing on a local edit view.
594
+
595
+ ## v1.2.4
596
+ - **Breaking:** When a local item cannot by found, instead of a new item being created an error is thrown. This means it
597
+ is no longer possible to create local items using `getItemById` or `getItemsById` in the `ItemAdministrator` class.
598
+ - **Breaking:** Removed `getItemDefinition` and `getItemByDef` in the `ItemAdministrator` class. Added `getItemByState`.
599
+ - Renamed types `TemplateResponseItemEntryMap` to `TemplateItemEntryMap` and `TemplateResponseLinkedItemEntryMap` to
600
+ `TemplateLinkedItemEntryMap`.
601
+ - Removed `getCollectionCacheKey` in `KeyService`. (Legacy code.)
602
+
603
+ ## v1.2.3
604
+ - Fixed issue where derived values deeper than one layer couldn't be resolved.
605
+
606
+ ## v1.2.2
607
+ - Fixed issue where in derived values weren't set after create request.
608
+
609
+ ## v1.2.1
610
+ - **Breaking:** Replaced the `initial` parameter with the `callOnChange` parameter (`true` by default) in the `commit`
611
+ function of the `EditResource` class.
612
+ - Fixed issue in `setLocalFields` (`ItemEntry`) where some values were wrongly assumed to be present in `initialValues`.
613
+ - Optimization: Disabled automatic resolution of derived values in `addItems` (`CollectionEditResource`) when `modInstant` is set to true.
614
+
615
+ ## v1.2.0
616
+ - **Breaking:** When calling `addItems` or `addItem` on the `CollectionEditResource` class derived values are now
617
+ resolved automatically. Instead of a compound object like `{fields: {key: 'value'}, derived: {}}` an object like
618
+ `{key: 'value'}` should now be used as argument when calling these functions.
619
+ - **Breaking:** Added `localCache` parameter to `CollectionResource` constructor.
620
+
621
+ ## v1.1.20
622
+ - Fixed minor issue where collection wouldn't be deferred properly before expanding.
623
+ - `onChange` is now called automatically when when calling `commit` on an edit resource.
624
+
625
+ ## v1.1.19
626
+ - **Breaking:** Renamed `getCurrentChanges` to `getModuleChanges` in the `ItemAdministrator` class. Added optional
627
+ `localCache` parameter.
628
+
629
+ ### Local cache callback refactoring
630
+ - Removed `onSaveWithoutClosing` event.
631
+ - Added `condition` parameter to `onBeforeSave` and `onSaveSuccess` (possible values are `always`, `onClose` or
632
+ `skipOnClose`, defaults to `always`). Callbacks registered with `condition: always` will get executed before other
633
+ callbacks.
634
+ - Pass the local cache itself to all registered callback functions. Pass the item ID conversion map as second argument
635
+ to `onSaveSuccess` callback functions.
636
+
637
+ ## v1.1.18
638
+ - Calling `expand` on a `CollectionEntry` manually no longer defers the collection entry.
639
+ - The `batchFetch` and `batchExpand` functions in the `CollectionHandler` class now properly defer and resolve the
640
+ collection entries.
641
+
642
+ ## v1.1.17
643
+ - Fixed issue where the `getLocalByQuery` function in the `ItemCache` class wouldn't return any items.
644
+ - When batch resolving collection entries, `CollectionHandler` now looks for matching items using `getByQuery` instead
645
+ of `getByParent`.
646
+
647
+ ### Cache invalidation
648
+ - Added `queueReload` function to `ItemEntry` class. This will reload the item when the item entry itself or a
649
+ collection entry containing the item is requested.
650
+ - The `queueReload` function in the `CollectionEntry` class no longer directly defers the item.
651
+ - Added `invalidateCache` function to the `ItemAdministrator` class. This will call `queueReload` on all item entries
652
+ and collection entries.
653
+
654
+ ### Item entry refactoring
655
+ - Renamed `process` to `setFields`.
656
+ - Replaced `processLocal` with `setLocalFields`. This function no longer has a `modified` parameter.
657
+ - `setModified` now also sets local default values.
658
+ - Removed `setCreator`. This function was called twice in some instances.
659
+ - **Breaking:** Added `derived` parameter to `updateFields`
660
+
661
+ ##v1.16
662
+ - Pass `hasChanges` as second argument to `onBeforeSave` callbacks in the `LocalCache` class. This fixes an issue with
663
+ project financial values in the front-end. [RM4-9577]
664
+ - Added `callOnActivate` parameter to `addItems` function in `CollectionEditResource` class. Use this to prevent items
665
+ from being added to the local cache.
666
+
667
+ ##v1.15
668
+ - Fix `fetchItemTypesTranslations` function in `ColumnHandler` class.
669
+ - Fix type definition of `PromiseInterface.all`.
670
+
671
+ ##v1.14
672
+ - The `ChangesCompiler` now always processes local collections. (Even if they don't have edit resources.) This fixes an
673
+ issue with recurring appointments in the front-end.
674
+
675
+ ##v1.13
676
+ - Add option to exclude itemTypes during createLocalEntries.
677
+
678
+ ##v1.12
679
+ - **Breaking:** `ItemResource.isNew` returns true *only* if the resource was created using
680
+ `ItemAdministrator.getNewResource` or `ItemAdministrator.getItemByDef`. This fixes an issue where items where removed
681
+ from the local cache inadvertently.
682
+ - The `start`, `commit` and `rollback` functions of `EditResource` now return the resource itself to facilitate chaining.
683
+ - When calling `CollectionEntry.revertChanges`, callbacks like `onAdd` / `onRemove` and `onActivate` / `onDeactivate`
684
+ are now respected. This fixes an issue where items where *not* removed from the local cache.
685
+ - When removing *local* items from collections, they are removed from `initial` as well as `modified`. This fixes an
686
+ issue where changes were being detected continuously.
687
+ - Updated the order of requests in `changesProcessor`. The `update` request is now executed before the `delete` request,
688
+ except when updating documents. This fixes several issues.
689
+ - `CollectionCache` now uses a map instead of an array to store collections. This fixes an issue where the same
690
+ collection was added multiple times.
691
+ - Updated all models to use dependency objects. This increases ease of debugging.
692
+
693
+ ##v.1.11
694
+ - Fixed issue that occurs when saving when having an existing item refer to a newly created item.
695
+ - **Breaking:** Removed `ItemResourceService.isNewResource`.
696
+ - **Breaking:** Renamed `ItemResource.isNewResource` to `ItemResource.isNew`. Removed parameter.
697
+ - `ItemResource.isNew` is equivalent to `ItemResource.isLocal`, while `EditResource.isNew` checks also checks for
698
+ completed transactions.
699
+
700
+ ##v.1.10
701
+ - Fixed issue where changes on different subtabs were not detected.
702
+
703
+ ##v1.1.9
704
+ - Exposed `noop` function on `RmCore` class.
705
+ > This is used in order to check whether a callback has a default value.
706
+ - Added `copyRequestColumns` function to `ColumnUtil` class.
707
+ - Made parameters of `ItemAdministrator.saveCurrentLocalCache` and `LocalCache.save` optional.
708
+ - **Breaking:** Reordered parameters of `ChangesProcessor.execute` to be consistent with
709
+ `ItemAdministrator.saveCurrentLocalCache`. The new order is `singleItems` - `collections` - `parameters` -
710
+ `breakUpByParent` - `onAfterCreateCallback`.
711
+
712
+ ##v1.1.8
713
+ - Set default value for `params` to `{filter: false}` in `request` function in `ColumnHandler` class.
714
+
715
+ ##v1.1.7
716
+ - Fixed issue where cached item entries or collection entries wouldn't be added to the local cache.
717
+
718
+ ##v1.1.6
719
+ - Fixed issue with deferred item entries.
720
+ - Re-enable changes watcher after save.
721
+ - Added optional `id` parameter to `LocalCache` constructor.
722
+
723
+ ##v1.1.5
724
+ - Added `clearItem` function to `LocalCache` class.
725
+
726
+ ##v.1.1.4
727
+ - Fix issue where items where not added to the local cache automatically when they where added to a collection.
728
+ > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add
729
+ the items to the local cache.
730
+ > In other instances this might be debatable because it doesn't do any real harm. *Not*
731
+ doing it however can definitely be harmful.
732
+
733
+ ##v.1.1.3
734
+ - Fixed an issue where all collections in a local cache would be cleared.
735
+ - **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
736
+ `LocalCacheManagerInterface`.
737
+
738
+ ##v1.1.2
739
+ - Fixed an issue concerning derived values.
740
+
741
+ ## v1.1.1
742
+ - Fixed an issue where changes wouldn't be detected.
743
+ - **Breaking:** Removed the `_hasChanges` function in the `localCache` class. If you want to force changes detection,
744
+ call `detectChanges` instead. Otherwise, rely on the `hasChanges` variable.
745
+ - **Breaking:** Removed the `enableWatcher` and `disableWatcher` functions. Use `enableChangesWatcher` and
746
+ `disableChangesWatcher` instead.
747
+
748
+ ## v1.1.0
749
+ ### Development
750
+
751
+ #### Strict TypeScript compilation
752
+ Added the following TypeScript compiler options:
753
+ - noImplicitThis
754
+ - noImplicitReturns
755
+ - strictNullChecks
756
+ - noUnusedLocals
757
+ - noUnusedParameters
758
+
759
+ I would advise enabling these for all TypeScript projects from now on.
760
+
761
+ #### Ordered imports and dependencies
762
+ Imports are now ordered alphabetically and grouped by folder. Added a TSLint option to enforce this.
763
+ Please note that this also applies for imports from the folder the file is currently in.
764
+ For example, in `models/ItemResource.ts`, `itemEntry` should be imported like so:
765
+ `import { ItemEntry } from '../models';`
766
+
767
+ Also, factory and class dependencies should be ordered alphabetically as well. This will make it easier to add and
768
+ remove dependencies in the future.
769
+
770
+ ### Breaking changes
771
+
772
+ - Renamed `changesCompiler` to `changesCompilation`, `changesCompilerFactory` to `changesCompilationFactory`,
773
+ `moduleChangesCompiler` to `moduleChangesCompilation` and `moduleChangesCompilerFactory` to
774
+ `moduleChangesCompilationFactory`.
775
+ - Removed the `allLinks` parameter from the `query` function definition in the `ApiRequestServiceInterface`. This is
776
+ no longer supported in the back-end.
777
+
778
+ #### Item and collection entries
779
+ - Moved *all* functions that handle item entries from the `ItemEntryService` to the `ItemEntry` class.
780
+ - Added the following functions to `ItemEntryService`:
781
+ - `createLocalConversionMap`;
782
+ - `expandLocalConversionMap`;
783
+ - `expandConversionMap`;
784
+ - `batchExpandConversionMap`;
785
+ - `batchClone`.
786
+ - Cloning of item entries now works slightly differently. The function will attempt to generate a new
787
+ item ID, and update the conversion map accordingly, but will respect the item ID that is already there.
788
+
789
+ #### Rework item caching
790
+ Newly created item entries and collection entries are no longer added to the global *or* local cache by default.
791
+ All entries are added to the global cache on save. Item entries are added to the local cache when resources are created
792
+ using the item administrator or when resources are created when adding the items to a collection.
793
+
794
+ > This will increase reliability by ensuring the global cache is no longer 'polluted' with local items. Also, this will
795
+ > allow for the creation item and collection entries without caching them directly. This is required for the copying and
796
+ > pasting of items.
797
+
798
+ Other changes:
799
+
800
+ - Moved `saveLocal` to `ItemAdministrator`;
801
+ - `ItemAdministrator.fetchTitle` should now be called instead of `ItemHandler.fetchTitle`;
802
+ - The `ItemAdministrator` collection matching functions (`addToCollections`, `removeFromCollections`) should now be
803
+ called instead of those in the `CollectionHandler`. The `CollectionHandler` should only be used to reflect changes
804
+ already on the backend. (Use `getCollectionMatcher`.)
805
+
806
+
807
+ ##v1.0.33
808
+ - Really fix types path
809
+
810
+ ##v1.0.33
811
+ - Fix types path
812
+
813
+ ##v1.0.32
814
+ - Update `tsconfig.json` to put definitions in the root folder
815
+ > The app had an issue with AOT compilation because of this
816
+
817
+ ##v1.0.31
818
+ - Fix `columnHandler.fetchItemTypeTranslations`
819
+ > It incorrectly looped over the response map, it should now work again
820
+
821
+ ##v1.0.30
822
+ - Remove `updateTabParams` from LocalCacheManagerInterface
823
+ > The function wasn't used
824
+
825
+ - Reworked class export
826
+ > Imports are now done from @rentman/rm-core, old imports are broken. This is because the old export structure didn't always work
827
+
828
+ ##v1.0.29
829
+ - Fix inverted inArray check in CollectionEntry.removeItems
830
+ > A delete message from the socket deleted all BUT the deleted items, this should now be fixed
831
+
832
+ ##v1.0.28
833
+ Bug fixes only
834
+
835
+ ##v1.0.27
836
+ - `ItemEntry.initial` is now undefined by default
837
+ > In the SocketMessageHandler we use this check to see if an ItemEntry is a stub
838
+
839
+ ##v1.0.26
840
+ Bundle both minified and unminified code, include sourcemaps from dev build
841
+
842
+ ##v1.0.24, v1.0.25
843
+ ! Use version `v1.0.26` !
844
+
845
+ - The core now expects a `promiseInterface` that should implement the provided `promiseInterface`
846
+ > We need to be able to hook into the promises in order to call a digest cycle to update the ui in the frontend
847
+
848
+ - Rename `ItemEntry.entryId` to `ItemEntry.id
849
+ > It used to be called `id`, but it was changed in the seperation of the core.
850
+ > You can use the `id` to uniquely identify an entry, since itemId can be updated (local to saved id)
851
+
852
+ - Rename ItemResource `startTransaction` to `start`
853
+ > Other functions are called `commit` and `rollback` so having 'transaction' only for start doesn't make much sense
854
+
855
+ - `SocketMessageHandler.onMessageReceived` now returns a promise
856
+ > You can now use the updated items or hook into the result to update the ui for example
857
+
858
+
859
+ ##v1.0.23
860
+ - Rename ResourceCache to LocalCache
861
+ > LocalCache only caches local items (name better reflects functionality)
862
+
863
+ - Remove getter/setter for hasChanges
864
+ > hasChanges is called in a digest loop in the frontend, so for performance reasons we don't want to recompute the value every time
865
+
866
+ - Remove `_getCollection` from ItemAdministrator
867
+ > `_getCollection` is now named `getCollection` and the old `getCollection` is removed. The query is part of the
868
+ > options and should not be given as a separate argument. This was included to support the frontend
869
+
870
+ - Remove `saveCurrentTab` from ItemAdministrator
871
+ > `saveCurrentTab` makes no sense because the core has no concept of tabs, you should use `saveCurrentLocalCache` instead
872
+
873
+ - Remove `getTabEntry` and `resetTabEntry` from ItemAdministrator
874
+ > `getTabEntry` and `resetTabEntry` make no sense because the core has no concept of tabs, you should use `getLocalCache` and `resetLocalCache` instead
875
+