@rentman/rm-core 8.2.6 → 8.2.8

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