@rentman/rm-core 10.0.6 → 10.1.1-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/changelog.md +1411 -1397
  2. package/dist/rm-core.js +850 -800
  3. package/dist/rm-core.min.js +1 -1
  4. package/dist/types/classes/ApiFormatter.d.ts +79 -79
  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/BusinessLogicManager/BusinessLogicManager.d.ts +98 -98
  8. package/dist/types/classes/BusinessLogicManager/BusinessLogicRule.d.ts +94 -94
  9. package/dist/types/classes/BusinessLogicManager/Customfield/CustomFieldTypeBusinessLogicRule.d.ts +18 -18
  10. package/dist/types/classes/BusinessLogicManager/Documents/DocumentTemplateBusinessLogicRule.d.ts +25 -25
  11. package/dist/types/classes/BusinessLogicManager/Exemplaar/ExemplaarAanschafdatumBusinessLogicRule.d.ts +14 -14
  12. package/dist/types/classes/BusinessLogicManager/Factuur/FactuurBetalingsconditieBusinessLogicRule.d.ts +20 -20
  13. package/dist/types/classes/BusinessLogicManager/Factuur/FactuurDatumBusinessLogicRule.d.ts +19 -19
  14. package/dist/types/classes/BusinessLogicManager/Factuur/FactuurNumberseriesBusinessLogicRule.d.ts +14 -14
  15. package/dist/types/classes/BusinessLogicManager/Functie/FunctieNaaminternBusinessLogicRule.d.ts +18 -18
  16. package/dist/types/classes/BusinessLogicManager/Functie/FunctieTwowayBusinessLogicRule.d.ts +14 -14
  17. package/dist/types/classes/BusinessLogicManager/Materiaal/MateriaalTelexemplarenBusinessLogicRule.d.ts +15 -15
  18. package/dist/types/classes/BusinessLogicManager/Materiaal/MateriaalTypeBusinessLogicRule.d.ts +18 -18
  19. package/dist/types/classes/BusinessLogicManager/Materiaal/MateriaalVerhuurBusinessLogicRule.d.ts +18 -18
  20. package/dist/types/classes/BusinessLogicManager/Materiaal/SurfaceArticleSizeBusinessLogicRule.d.ts +19 -19
  21. package/dist/types/classes/BusinessLogicManager/OfferteContract/OfferteContractDatumBusinessLogicRule.d.ts +26 -26
  22. package/dist/types/classes/BusinessLogicManager/PlanningPersoneelTransport/PlanningPersoneelTransportBusinessLogicRule.d.ts +29 -29
  23. package/dist/types/classes/BusinessLogicManager/Project/ProjectClientNoteBusinessLogicRule.d.ts +23 -23
  24. package/dist/types/classes/BusinessLogicManager/Reparatie/ReparatieExemplaarBusinessLogicRule.d.ts +14 -14
  25. package/dist/types/classes/BusinessLogicManager/Rol/RolDocumentAccessBusinessLogicRule.d.ts +18 -18
  26. package/dist/types/classes/BusinessLogicManager/Rol/RolEditOwnDataBusinessLogicRule.d.ts +18 -18
  27. package/dist/types/classes/BusinessLogicManager/Rol/RolFileAccessBusinessLogicRule.d.ts +18 -18
  28. package/dist/types/classes/BusinessLogicManager/Rol/RolPersoneelsplannerToegangBusinessLogicRule.d.ts +18 -18
  29. package/dist/types/classes/BusinessLogicManager/Rol/RolProjectenBewerkenBusinessLogicRule.d.ts +18 -18
  30. package/dist/types/classes/BusinessLogicManager/Rol/RolProjectenToegangBusinessLogicRule.d.ts +18 -18
  31. package/dist/types/classes/CacheSyncer.d.ts +70 -70
  32. package/dist/types/classes/ChangesCompilation.d.ts +33 -33
  33. package/dist/types/classes/ChangesDelta.d.ts +65 -65
  34. package/dist/types/classes/ChangesDeltaBase.d.ts +79 -79
  35. package/dist/types/classes/ChangesProcessor.d.ts +40 -40
  36. package/dist/types/classes/CollectionEntryService.d.ts +24 -24
  37. package/dist/types/classes/CollectionResourceService.d.ts +6 -6
  38. package/dist/types/classes/ColumnCache.d.ts +19 -19
  39. package/dist/types/classes/ColumnExpansion.d.ts +19 -19
  40. package/dist/types/classes/ColumnHandler.d.ts +20 -20
  41. package/dist/types/classes/ColumnInfo.d.ts +15 -15
  42. package/dist/types/classes/ColumnSet.d.ts +37 -37
  43. package/dist/types/classes/ColumnSubsetCache.d.ts +14 -14
  44. package/dist/types/classes/ColumnUtil.d.ts +108 -108
  45. package/dist/types/classes/ConversionMapService.d.ts +25 -25
  46. package/dist/types/classes/CreateRequest.d.ts +17 -17
  47. package/dist/types/classes/CreatedChangesDelta.d.ts +17 -17
  48. package/dist/types/classes/InternalChangesDelta.d.ts +44 -44
  49. package/dist/types/classes/ItemCache.d.ts +27 -27
  50. package/dist/types/classes/ItemCreateService.d.ts +18 -18
  51. package/dist/types/classes/ItemEntryService.d.ts +32 -32
  52. package/dist/types/classes/KeyService.d.ts +18 -18
  53. package/dist/types/classes/LockService.d.ts +28 -28
  54. package/dist/types/classes/ModuleChangesCompilation.d.ts +18 -18
  55. package/dist/types/classes/ParentChangesDelta.d.ts +41 -41
  56. package/dist/types/classes/QueryColumnExtractor.d.ts +18 -18
  57. package/dist/types/classes/QueryContainsLocalIdParser.d.ts +17 -17
  58. package/dist/types/classes/QueryLinkedToParser.d.ts +17 -17
  59. package/dist/types/classes/QueryLocallyMatchableParser.d.ts +20 -20
  60. package/dist/types/classes/QueryMatcher.d.ts +24 -24
  61. package/dist/types/classes/QueryParser.d.ts +25 -25
  62. package/dist/types/classes/QueryParserBase.d.ts +20 -20
  63. package/dist/types/classes/QueryParserIdUpdater.d.ts +17 -17
  64. package/dist/types/classes/QueryService.d.ts +12 -12
  65. package/dist/types/classes/RequestBuffer.d.ts +24 -24
  66. package/dist/types/classes/RequestBufferManager.d.ts +32 -32
  67. package/dist/types/classes/RequestColumnExpansion.d.ts +15 -15
  68. package/dist/types/classes/SocketMessageHandler.d.ts +34 -34
  69. package/dist/types/classes/TemplateCache.d.ts +62 -62
  70. package/dist/types/classes/Util.d.ts +28 -28
  71. package/dist/types/classes/cache/AbstractCache.d.ts +86 -86
  72. package/dist/types/classes/cache/CachedQueryHandlerBase.d.ts +68 -68
  73. package/dist/types/classes/cache/ItemHandlerBase.d.ts +102 -102
  74. package/dist/types/classes/cache/server/ServerCache.d.ts +78 -78
  75. package/dist/types/classes/cache/server/ServerCachedQueryHandler.d.ts +25 -25
  76. package/dist/types/classes/cache/server/ServerItemHandler.d.ts +43 -43
  77. package/dist/types/classes/cache/transaction/TransactionCache.d.ts +318 -318
  78. package/dist/types/classes/cache/transaction/TransactionCachedQueryHandler.d.ts +37 -37
  79. package/dist/types/classes/cache/transaction/TransactionCollectionHandler.d.ts +24 -24
  80. package/dist/types/classes/cache/transaction/TransactionEventHandler.d.ts +21 -21
  81. package/dist/types/classes/cache/transaction/TransactionItemHandler.d.ts +90 -90
  82. package/dist/types/classes/cache/transaction/TransactionValidator.d.ts +33 -33
  83. package/dist/types/constants.d.ts +7 -7
  84. package/dist/types/core.d.ts +48 -48
  85. package/dist/types/factories/ApiResponseProcessorFactory.d.ts +6 -6
  86. package/dist/types/factories/CacheSyncerFactory.d.ts +10 -10
  87. package/dist/types/factories/ChangesCompilationFactory.d.ts +5 -5
  88. package/dist/types/factories/ChangesDeltaFactory.d.ts +13 -13
  89. package/dist/types/factories/ChangesProcessorFactory.d.ts +13 -13
  90. package/dist/types/factories/CollectionEntryFactory.d.ts +11 -11
  91. package/dist/types/factories/CollectionResourceFactory.d.ts +18 -18
  92. package/dist/types/factories/ColumnExpansionFactory.d.ts +7 -7
  93. package/dist/types/factories/ColumnInfoFactory.d.ts +7 -7
  94. package/dist/types/factories/ColumnSetFactory.d.ts +18 -18
  95. package/dist/types/factories/ColumnSubsetCacheFactory.d.ts +8 -8
  96. package/dist/types/factories/CreateRequestFactory.d.ts +9 -9
  97. package/dist/types/factories/ItemCacheFactory.d.ts +6 -6
  98. package/dist/types/factories/ItemEntryFactory.d.ts +12 -12
  99. package/dist/types/factories/ItemResourceFactory.d.ts +11 -11
  100. package/dist/types/factories/ModuleChangesCompilationFactory.d.ts +4 -4
  101. package/dist/types/factories/QueryMatcherFactory.d.ts +7 -7
  102. package/dist/types/factories/QueryParserFactory.d.ts +5 -5
  103. package/dist/types/factories/RequestColumnExpansionFactory.d.ts +8 -8
  104. package/dist/types/factories/TemplateFactory.d.ts +8 -8
  105. package/dist/types/factories/TransactionCacheFactory.d.ts +13 -13
  106. package/dist/types/index.d.ts +1 -1
  107. package/dist/types/interfaces/AbstractCacheDependencyInterface.d.ts +38 -38
  108. package/dist/types/interfaces/ApiRequestServiceInterface.d.ts +12 -12
  109. package/dist/types/interfaces/AuthInterface.d.ts +10 -10
  110. package/dist/types/interfaces/ErrorHandlerInterface.d.ts +6 -6
  111. package/dist/types/interfaces/ExceptionHandlerInterface.d.ts +3 -3
  112. package/dist/types/interfaces/LinkTreeServiceInterface.d.ts +4 -4
  113. package/dist/types/interfaces/PromiseLibraryInterface.d.ts +33 -33
  114. package/dist/types/interfaces/ServerCacheDependencyInterface.d.ts +5 -5
  115. package/dist/types/interfaces/SocketMessageInterface.d.ts +3 -3
  116. package/dist/types/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +17 -17
  117. package/dist/types/interfaces/TransactionItemHandlerDependencyInterface.d.ts +22 -22
  118. package/dist/types/internal.d.ts +128 -128
  119. package/dist/types/models/CachedQueryItem.d.ts +40 -19
  120. package/dist/types/models/CollectionEntry.d.ts +21 -21
  121. package/dist/types/models/CollectionOptions.d.ts +44 -44
  122. package/dist/types/models/CollectionResource.d.ts +87 -87
  123. package/dist/types/models/ItemEntry.d.ts +18 -18
  124. package/dist/types/models/ItemEntryOptions.d.ts +8 -8
  125. package/dist/types/models/ItemResource.d.ts +90 -90
  126. package/dist/types/models/Template.d.ts +11 -11
  127. package/dist/types/types/ItemTypesCollection.d.ts +345 -345
  128. package/dist/types/types/PromiseInterface.d.ts +2 -2
  129. package/package.json +50 -50
  130. package/readme.md +16 -16
package/changelog.md CHANGED
@@ -1,1397 +1,1411 @@
1
- # Changelog
2
-
3
- Contains new features, breaking changes and their reasoning
4
-
5
- ## 10.0.6
6
-
7
- - Fixed issue where multiple locktockens could be requested when multiple calls to `fetchLocktoken` were made in quick
8
- succession.
9
-
10
- ## 10.0.5
11
-
12
- - Refactor mapping of deleted entries in ChangesDeltas to be a map instead of an array
13
- - Prevent setting items as updated on ChangesDeltas if it's also in deleted entries
14
- - Remove updated and restored entries in ChangesDeltas if it's also in deleted entries
15
-
16
- ## 10.0.4
17
-
18
- - Fixed a bug introduced in 10.0.3 when trying to load a local item
19
-
20
- ## 10.0.3
21
-
22
- - Fixed a bug in which remotely fetched changes could overwrite changes of a parent transaction if there was a child
23
- transaction
24
-
25
- ## 10.0.2
26
-
27
- - Use the promise library instead of native promises in BusinessLogicManager
28
-
29
- ## 10.0.1
30
-
31
- - Add the `MateriaalTelexemplarenBusinessLogicRule` to the core
32
-
33
- ## 10.0.0
34
-
35
- - Introduce `BusinessLogicManager` and `BusinessLogicRule`s to the core
36
-
37
- ## 10.0.0-alpha.3
38
-
39
- - Only set invoice module permissions when project permissions change if 'projecten_facturen_maken' is enabled
40
-
41
- ## 10.0.0-alpha.2
42
-
43
- - Fix infinite loop in Rol business logic
44
-
45
- ## 10.0.0-alpha.1
46
-
47
- - Introduce `BusinessLogicManager` and `BusinessLogicRule`s to the core
48
-
49
- ## 9.3.1
50
-
51
- - Fixed a bug where items that were both moved and updated could end up in a collection twice
52
-
53
- ## 9.3.0
54
-
55
- - Added order to the CacheSyncer functions ensuring that it's always in order of 1. removing 2. adding
56
-
57
- ## 9.2.4
58
-
59
- - Fixed a bug where incorrect request columns where added because of the query (in reverse linkedTo queries)
60
-
61
- ## 9.2.3
62
-
63
- - Fixed a bug in which multiple requests for the same item could result in incorrect expanded columns
64
- - Increased performance of ColumnUtil by using string comparison over enums
65
- - Increased performance of caching new items (in ChangesDelta._setItemCreated) by not creating default local values for
66
- items from API responses
67
-
68
- ## 9.2.2
69
-
70
- - Optimize requests for collection trees with three levels. (E.g. MateriaalCat -> Planningmateriaal -> Missing)
71
-
72
- ## 9.2.1
73
-
74
- - Fix bug in 9.2.0 that caused updates of date fields not to be processed.
75
-
76
- ## 9.2.0
77
-
78
- - Greatly speed up core processing on large datasets
79
- - Refactor the way ChangesDeltaBase.setItemUpdated processes fields to reduce `Object.getOwnPropertyDescriptor`
80
- calls
81
- - Refactor the way CacheSyncer.processDelta processes updated values to prevent unneeded field copying
82
- and `Object.getOwnPropertyDescriptor` calls
83
- - Add `RequestBufferManagerPrioritySettings` to give finer control over request buffering to the caller
84
-
85
- ## 9.1.2
86
-
87
- - Delete item lock when transaction is destroyed
88
-
89
- > We never deleted item locks causing the items to be locked forever, even though a user wasn't editing them anymore
90
-
91
- ## 9.1.1
92
-
93
- - Fix handling of multiple create requests in one transaction
94
-
95
- ## 9.1.0
96
-
97
- - Implement cascading deletes based on backend delete relations
98
-
99
- ## 9.0.5
100
-
101
- - Prevent an error occurring when `fetchItemEntryData` did not return an itemEntry
102
-
103
- ## 9.0.4
104
-
105
- - Remove `MAYBE` matches that did not get returned after the API query from cached queries and collections
106
- in `CacheSyncer`
107
-
108
- ## 9.0.3
109
-
110
- - Check for empty changesDeltas in `TransactionCache.applyChangesFromParent` to prevent unnecessary calls
111
-
112
- ## 9.0.2
113
-
114
- - Improve the way `getLinkCollections` fetches its data to greatly improve performance
115
-
116
- ## 9.0.1
117
-
118
- - Accept any version (apposed to `latest`) for @rentman/backend-types
119
-
120
- ## 9.0.0
121
-
122
- - **Breaking:** Align item changes in server cache and transaction cache: add `fields` property in server item changes,
123
- rename `changes` in transaction item changes to fields. Remove `getChangesFromItemChanges`.
124
-
125
- ## 8.2.11
126
-
127
- - Only copy over cachedQueries when saving child transactions if the parent transaction doesn't have one with the query
128
- yet
129
-
130
- ## 8.2.10
131
-
132
- - Fix displayname for 'CustomfieldGroup'
133
- - Also set displayname when creating ItemEntries
134
-
135
- ## 8.2.9
136
-
137
- - Fixes a bug in which items on the ServerCache would not properly be added to collections
138
-
139
- ## 8.2.8
140
-
141
- - Fixes a bug in which newly created items do not appear in collections caused in 8.2.6
142
-
143
- ## 8.2.7
144
-
145
- - Merge tabRequestParameters when saving a TransactionCache into another TransactionCache
146
-
147
- ## 8.2.6
148
-
149
- - Fixed issue where deleted equipment re-appear
150
-
151
- ## 8.2.5
152
-
153
- - Skipped
154
-
155
- ## 8.2.4
156
-
157
- - Fixed issue where non-local items were expanded locally.
158
- - Fixed hypothetical situation where an item entry in a local cached query could have an incomplete column set.
159
-
160
- ## 8.2.3
161
-
162
- - Did a performance optimization which will cause aggregated columns not to be re-fetched unnecessarily
163
-
164
- ## 8.2.2
165
-
166
- - Fixed a bug where derived values would not be fetched for newly created local items
167
- - Did a performance optimization which will cause aggregated columns not to be re-fetched unnecessarily
168
-
169
- ## 8.2.1
170
-
171
- - Skipped
172
-
173
- ## 8.2.0
174
-
175
- - Added support for collection trees. Now, when requesting a collection you can add the `children` property, which is a
176
- map of collection options. The collection resources will be available in the item resources of the resulting
177
- collection resource. For more information,
178
- see [Confluence](https://rentman.atlassian.net/wiki/spaces/~652789241/pages/948404231/Child+collections).
179
-
180
- ## 8.1.9
181
-
182
- - RM4-16796 Fixed a bug where loading the same query in quick succession would cause columns/data to be missing
183
-
184
- ## 8.1.8
185
-
186
- - Reorganize imports: move all exports to `internal.ts`. This is the only place where things should be exported. All
187
- files should import from this file. Resolve duplicate declaration of `InternalCreateDelta` type.
188
- - Improve performance of copying over values in `ChangesDelta`s and `CollectionMatcherBase`
189
- - Merge all `CollectionMatcher` classes into one `CacheSyncer`, so that `processDelta` only has to be done once
190
- - Increase performance of the ApiFormatter on large datasets
191
-
192
- ## 8.1.7
193
-
194
- - Fixed a bug where copied over CachedQueryItems weren't resolved (causing them to hang forever)
195
-
196
- ## 8.1.6
197
-
198
- - Add missing return statement in ServerCache.applyChangesDelta
199
-
200
- ## 8.1.5
201
-
202
- - Only extend missing derived values while resolving local items
203
- in `TransactionCachedQueryHandler.__fetchItemEntriesByQueryData`
204
-
205
- ## 8.1.4
206
-
207
- - Remove non-created items if they are not returned in the response of a Create request
208
-
209
- > If a create would fail, the whole request would fail. So we can assume that if an item isn't returned from a create
210
- > request, the backend has left it out on purpose
211
-
212
- - Move cached queries to parent transactions only when saving a child transaction
213
-
214
- > Only then you know for sure that items that matched on the child transaction will also match in the parent transaction,
215
- > since you're taking over the changes, this behaviour was changed somewhere in a refactor but was incorrect
216
-
217
- - No longer move cached queries to the ServerCache when saving a root transaction
218
-
219
- > 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)
220
-
221
- - No longer wait for child transactions to sync when applying changes in a parent
222
-
223
- > A child transaction can only influence a parent transaction by calling `TransactionCache.save`, which doens't happen whilst applying changes,
224
- > so you don't have to wait for child transactions when applying changes in a parent
225
-
226
- ## 8.1.3
227
-
228
- - Allow passing TransactionOptions to TransactionCacheFactory.construct
229
-
230
- ## 8.1.2
231
-
232
- - Fixed a bug in which derived values for local items wouldn't be properly be fetched
233
-
234
- ## 8.1.1
235
-
236
- - Fixed a bug in which a `Template` request's columns weren't processed
237
-
238
- ## 8.1.0
239
-
240
- - Add `cloneCreatedChanges` function to `ChangesDeltaFactory`. This function clone the `created` component of a changes
241
- delta into a destination changes delta.
242
- - Add `TransactionOptions`, implement `transparent` transaction option
243
- - Allow core-mapped TS types instead of backend-mapped TS types in `ApiFormatter.compareFields`
244
- - Fixed a bug where empty update requests where sometimes done
245
- - Fixed a bug where derived values of items returned in a Template request weren't properly resolved
246
-
247
- ## 8.0.3
248
-
249
- - Changed the flow of a create request so that it includes all the required columns for all transactions and also
250
- processes additionally returned (derived) items
251
- - Fixed a bug where fields referencing local items would already be updated in the `previous` before the `onChange`
252
- callbacks were called
253
- - Moved logic of updating IDs in cached queries/collections to TransactionCachedQueryHandler and
254
- TransactionCollectionHandler
255
-
256
- ## 8.0.2
257
-
258
- - Fixed a bug where deleted entries on a child transaction where not handled properly
259
- - Fixed a bug where saving a child transaction, and then undoing those changes and saving again would not update the
260
- parent transaction
261
-
262
- ## 8.0.1
263
-
264
- - Uppercase operators and comparators in QueryMatcher, QueryParser and QueryService
265
- - Fix parsing short-hand `IN` queryies
266
-
267
- ## 8.0.0
268
-
269
- - Implement `@rentman/backend-types`
270
-
271
- > You will now have autocomplete and typing checking on all columns/fields 🥳
272
-
273
- - Remove `ChangesDeltaResult.rollback`
274
-
275
- > It was never really used/implemented
276
-
277
- ## 7.2.0
278
-
279
- - Add the `preventCaching` option to `CollectionOptions`
280
-
281
- > 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)
282
-
283
- ## 7.1.1
284
-
285
- - Properly handle moved items in ServerCache.applyChangesFromParent (technically the backend won't ever generate a
286
- linkTo (only updates)) but it can happen when manually syncing the server cache (by
287
- doing `InternalChangesDelta.setItemMoved`)
288
-
289
- ## 7.1.0
290
-
291
- - Automatically keep aggregated values up-to-date by always refetching them
292
-
293
- ## 7.0.15
294
-
295
- - Remove an accidentally left in place debugger
296
-
297
- ## 7.0.14
298
-
299
- - Take into account collections with a 'limit' (of which the query result isn't cached) when matching socket items
300
-
301
- ## 7.0.13
302
-
303
- - Only overwrite the displayname if the required columns are present, instead of defaulting to an empty string
304
-
305
- ## 7.0.12
306
-
307
- - Fixed a bug where the core would try to update the cache key (ID) of `fieldChangeCallbacks` even when there were no
308
- callbacks for the given itemType
309
-
310
- ## 7.0.11
311
-
312
- - Fixed a bug where date values would not be compared if the descriptor was uncalled, this could lead to problems when
313
- applying changes from a parent transaction
314
-
315
- ## 7.0.10
316
-
317
- - Update references to local IDs in other items when a local ID gets updated
318
-
319
- ## 7.0.9
320
-
321
- - Take over `tabRequestParameters` when saving TransactionCache -> TransactionCache
322
-
323
- ## 7.0.8
324
-
325
- - Fixed a race condition and loop iteration error which in very rare cases caused itemEntries to be `undefined` and
326
- erroring
327
- - Add missing error handling in transaction functions
328
-
329
- ## 7.0.7
330
-
331
- - Properly handle `reverse` linkedTo's in QueryColumnExtractor and QueryLocallyMatchableParser
332
- - Implement refreshing of cached queries/collections
333
-
334
- ## 7.0.6
335
-
336
- Move fetching of lock from `TransactionItemHandler.processItemEntryChanges` to `TransactionCache.appyChangesDelta` to
337
- also capture creates and deletes.
338
-
339
- ## 7.0.5
340
-
341
- - Remove automatic fetching of derived values for not-yet-created items
342
-
343
- ## 7.0.4
344
-
345
- - Automatically resolve derived values when a new item is created
346
- - Fixed a bug where `AbstractCache.getParentFromFields` would still return `null` incorrectly
347
-
348
- ## 7.0.3
349
-
350
- - Fixed a bug where `AbstractCache.getParentFromFields` would still return `undefined` parent values
351
-
352
- ## 7.0.2
353
-
354
- - Check if any of the parent fields (`itemtype`, `item`) is `null`, in which case it won't be treated as a valid parent
355
- in `AbstractCache.getParentFromFields`
356
-
357
- ## 7.0.1
358
-
359
- - Ignore columns in ApiFormatter::hasChanges if the `modified` object does not contain a value for it.
360
-
361
- ## 7.0.0
362
-
363
- - **Breaking**: Remove `enableChangesWatcher` and `disableChangesWatcher` in `TransactionCache`.
364
- - Fetch lock token in `TransactionItemHandler.processItemEntryChanges`.
365
-
366
- ## 6.3.10
367
-
368
- - Only call `onRemove` of a collection if there are actually any items removed
369
- - Expand cached columns anyways if there are no items to expand in `TransactionCachedQueryHandler.__expandCachedQuery`
370
-
371
- ## 6.3.9
372
-
373
- - Fixed a bug where deleted local items would still appear as unsaved changes
374
-
375
- ## 6.3.8
376
-
377
- - Always fetch 'id' and 'permissions' columns so that they are always available
378
-
379
- ## 6.3.7
380
-
381
- - Fixed a bug where items in a socket message that _might_ fit (`MAYBE`) in a collection would not be checked/added.
382
-
383
- ## 6.3.6
384
-
385
- - Fixed a bug where `AbstractCache.fetchUpdatedDerivedValuesFromDelta` would attempt to use ItemChanges not cached on
386
- the transaction resulting in an error
387
-
388
- ## 6.3.5
389
-
390
- - Fixed a bug where after creating items derived values would needlessly be refetched
391
-
392
- > 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
393
-
394
- - Fixed a bug where ItemEntry's would not be re-cached under their new ItemIds
395
-
396
- ## 6.3.4
397
-
398
- - Fixed a bug where already cached itemEntries would not properly be detected when calling `ServerCache.processResponse`
399
- - Fixed a bug where calling `CreatedChangesDelta.remove` would add `empty` values in the array instead of removing the
400
- entry
401
-
402
- ## 6.3.3
403
-
404
- - Fixed a bug where local ItemEntries were not properly updated after saving
405
-
406
- ## 6.3.2
407
-
408
- - Fixed updating item entry itemId field after processing changes
409
-
410
- ## 6.3.1
411
-
412
- - Fixed a bug where query with a local ID would do a request to the server
413
-
414
- ```
415
- // This example should now no longer do a request
416
- transaction.getItemsByQuery(
417
- 'Tijd',
418
- {
419
- project: -11,
420
- }
421
- );
422
- ```
423
-
424
- ## 6.3.0
425
-
426
- - Allow strict typing of `FieldMap`
427
-
428
- ## 6.2.5
429
-
430
- - Remove overwriting itemType with itemType of rootItem during create
431
-
432
- ## 6.2.4
433
-
434
- - Fixed a bug where items would not appear in a collection after changes propagated from a parent transaction
435
-
436
- ## 6.2.3
437
-
438
- - Fixed a bug where `previous` would actually contain new values because the `previous` object was made after the values
439
- were already synced
440
-
441
- ## 6.2.2
442
-
443
- - Fixed a bug in syncing of initial values after saving an item causing the item to still be marked having changes
444
-
445
- ## 6.2.1
446
-
447
- - Fixed a bug where `ItemEntry`s created on the `ServerCache` where not matched on child `TransactionCache`s
448
-
449
- ## 6.2.0
450
-
451
- - Fixed a bug where synchronous validators would leave the validator in `pending` state
452
- - Only re-match items when values are actually changed
453
- - Removed `defered` from `CachedQueryItem` and added `resolve` and `reject`
454
- - Check if ItemEntries are already created before creating new ones, if that is the case treat it like an update
455
-
456
- > What could happen was that a faster request created an ItemEntry for the same item as another request
457
- > which caused the double creation of an ItemEntry
458
-
459
- ## 6.1.3
460
-
461
- - Add `isPending` function to `TransactionValidator`
462
- - `TransactionCache`s will now be invalid until all pending transaction validators are done
463
-
464
- ## 6.1.2
465
-
466
- - Check if an error key exists before deleting it in `TransactionCache.clearItemError`
467
-
468
- ## 6.1.1
469
-
470
- - Correctly pass `ErrorHandlerInterface` to `ChangesDeltaFactory`.
471
-
472
- ## 6.1.0
473
-
474
- - Return `ChangesDelta` instance in `setItemUpdated`, `setItemDeleted`, `setItemsDeleted` methods, and a promise that
475
- resolves to the instance in `setItemCreated` and `setItemsCreated`.
476
-
477
- ## 6.0.2
478
-
479
- - Update `query` parameter of `getByQuery`, `getLocalByQuery`, `batchGetLocalByParent`, and `matchQuery` in `ItemCache`.
480
-
481
- ## 6.0.1
482
-
483
- - Fixed a bug where a local item wouldn't be found when using `TransactionCache.getItemByState` on a child transaction
484
-
485
- ## 6.0.0
486
-
487
- - Refactored query caching structure
488
- - Properly implemented `limit` in collections
489
- - Removed extending of collections
490
-
491
- ## 5.0.1
492
-
493
- - Add 'icon' column type to non-selectable column types
494
-
495
- ## 5.0.0
496
-
497
- - Fixed a bug where created, creator and permissions was always set to default values
498
- - **Breaking:** Remove `onItemsCreated` collection callback.
499
-
500
- ## 4.0.4
501
-
502
- - Fixed a bug where ModuleChangesCompilation wouldn't include all changes
503
-
504
- ## 4.0.3
505
-
506
- - Local collections are now correctly identified when using a local ID in a linkTo request instead of the `parent`
507
- option
508
- - Fix issue where local collection entries were not moved to server cache after save.
509
-
510
- ## 4.0.2
511
-
512
- - Fixed a bug where clearing collections would error after saving a transaction
513
-
514
- ## 4.0.1
515
-
516
- - Remove thrown error in `ItemResource.callOnChange`
517
-
518
- > The frontend still relied on this and we won't refactor that at this point
519
-
520
- ## 4.0.0
521
-
522
- - Removed `ItemResourceOptions.onChange`, this is replaced by `TransactionCache.registerFieldChangeCallback`
523
-
524
- > Because the `onChange` is no longer stored on the ItemResource, the ItemResource doesn't have to be cached.
525
- > This way you don't have to call `ItemResource.clearResource` anymore (you do need to deregister the fieldChange callbacks)
526
-
527
- ## 3.1.0
528
-
529
- - **Breaking:** Remove `fields` property, add `getFields` method in `Template` class.
530
- - **Breaking:** Add `ConversionMapService`. Update `updateItemValues` to take a `source` and `destination` parameter.
531
- - Update `entry.itemId` for items created items in `TransactionCache.getDelta`.
532
-
533
- > This fixes an issue with updating IDs of local items.
534
-
535
- - Add dependency interfaces for `AbstractCache`, `ServerCache`, `TransactionCache`, `TransactionCollectionHandler`
536
- , `TransactionItemHandler`.
537
- - Add `CreatedChangesDelta` class, which replaces the `created` component of the `ChangesDelta` and includes some query
538
- methods. Add `isEmpty` method to `ChangesDelta`.
539
-
540
- ## 3.0.1
541
-
542
- - Fixed a bug where the `StateKeyType` enum couldn't be used when imported
543
-
544
- ## 3.0.0
545
-
546
- - Remove ViewResource, EditResource, CollectionViewResource and CollectionEditResource
547
-
548
- > There was no real distinction between them anymore since the core 2.0 update.
549
- > You can now use the base ItemResource and CollectionResource types instead
550
-
551
- ## 2.4.0
552
-
553
- - Update Typescript version to `3.7.2`, also update other plugins
554
-
555
- ## 2.3.0
556
-
557
- - Add callbacks when errors are set/cleared to `TransactionEventHandler`
558
- - Added the possibility to differentiate between errors to display below a field and on the save button
559
- in `TransactionValidator`
560
- - Changed the format of the error translations from `string` to `() => string` in `TransactionValidator`
561
-
562
- > Now the translation function will only be called when the error is actually set, not when it's cleared
563
-
564
- ## 2.2.1
565
-
566
- - Fixed a bug where resolving derived values for new items (in `TransactionCache.applyChangesDelta`) would sometimes
567
- error
568
-
569
- ## 2.2.0
570
-
571
- - `ChangesDelta.setItem(s)Created` will now accept incomplete input values
572
-
573
- > It will now fetch a template for you and process the items, so you no longer need to do that yourself
574
-
575
- ## 2.1.2
576
-
577
- - Fixed a bug where deleted ItemEntries weren't picked up when detecting transaction changes
578
-
579
- ## 2.1.1
580
-
581
- - Fixed a bug where an ItemEntry's errors wouldn't be deleted when the ItemEntry was deleted on a transaction
582
-
583
- ## 2.1.0
584
-
585
- - Refactor `TransactionCache.getItemsByQuery` to check cached entries (just like a collection)
586
- - Add `TransactionValidator`, allow passing of a `TransactionValidatorFactory` to a transaction
587
-
588
- > You can use these validators to set errors using `setItemError` and `setGlobalError`
589
-
590
- - Fixed a bug where `TransactionItemHandler.cloneItemEntry` could only clone entry with changes on the target
591
- transaction.
592
-
593
- > It will not look for changes recursively on the transaction change
594
-
595
- ## 2.0.19
596
-
597
- - Ensure all requestColumns for newly created ItemEntries from a template are available
598
- - Ensure derived values for newly created ItemEntries from a template are available
599
-
600
- ## 2.0.18
601
-
602
- - Include read-only columns when detecting changes in TransactionItemHandler.processItemEntryChanges
603
-
604
- > 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`
605
-
606
- ## 2.0.17
607
-
608
- - Fixed a bug where deleting an item that isn't in the transaction's item entry cache would result in an error
609
- - Fixed a bug where response columns weren't set for newly created local CollectionEntries
610
- - Fixed a bug where items weren't matched for newly created local CollectionEntries
611
-
612
- ## 2.0.16
613
-
614
- - Fixed a bug where queries with a link to a local parent item weren't updated on save
615
-
616
- ## 2.0.15
617
-
618
- - Cache ItemEntries that fit collections on the CollectionEntry's query instead of the CollectionEntry's id
619
- - Add a 'hint' to ChangesDeltas which allows skipping the extra request to validate `maybe` query matches
620
- - Create transaction changes for ItemEntry updates in the changesDelta if non exist yet when
621
- calling `TransactionCache.applyChangesDelta`
622
-
623
- > This allows you to update values on a transaction without having to fetch a resource for it by calling
624
- > `ChangesDelta.setItemUpdated()`
625
-
626
- ## 2.0.14
627
-
628
- - Fixed reading of derived values in `getItemIdByColumn` when a ChangesDelta is passed
629
-
630
- ## 2.0.13
631
-
632
- - Fixed a bug where the incorrect fields where applied to the ChangesDelta in `TransactionItemHandler.cloneItemEntry`
633
- - A RequestBuffer's promise will now resolve after the ServerCache.processResponse promise is done, ensuring all values
634
- are present before continuing
635
- - Request columns for the request ItemType will now properly be taken into account in ServerCache.processResponse
636
- ensuring root columns are always properly set. (This is used to update derived values)
637
-
638
- ## 2.0.12
639
-
640
- - Fixed a bug where created changes weren't copied to the itemchanges
641
- - Only take readonly parent columns instead of all readonly columns in `ApiFormatter.hasChanges`
642
- - Fixed a bug where ItemEntry's where still in `ItemCache.entriesByEntryId` after clearing them
643
-
644
- ## 2.0.11
645
-
646
- - Fixed a bug where changes weren't copied to the itemchanges
647
- - Fixed correct isCalledAfterApiSave values on calls to ServerCache.processResponse
648
-
649
- ## 2.0.10
650
-
651
- - Construct `ColumnSet` with proper `requestColumns` when creating a `Template` with additional columns
652
-
653
- ## 2.0.9
654
-
655
- - Properly process linked items from the template request in `TransactionItemHandler.createItems`
656
-
657
- ## 2.0.8
658
-
659
- - Fixed a bug where not all fields where available even tough an ItemResource with specific columns was created
660
-
661
- ## 2.0.7
662
-
663
- - Define abstract copyTransactionItemEntryChanges on ItemHandlerBase
664
- - Implement copyTransactionItemEntryChanges on TransactionItemHandler and ServerItemHandler
665
- - Fix AbstractCache/ServerCache/TransactionCache `getParent` function arguments
666
-
667
- > With the newly added arguments the function definitions didn't align anymore causing typescript errors
668
- > Even though the arguments aren't used in the `ServerCache` they're added in there
669
-
670
- ## 2.0.6
671
-
672
- - Remove `ApiFormatter.lazyClone`
673
-
674
- > 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
675
-
676
- - Create a copy of the child transaction's field instead of copying the object reference
677
- in `TransactionCache.applyChangeFromChild` and `ChangesProcessor.executeCreateRequest`
678
-
679
- > When writing to the object references you're changing multiple transactions at once, while this should be handled by applyCHangesFromParent
680
-
681
- ## 2.0.5
682
-
683
- - Add `callOnAddWithInitialItems` option to `CollectionResourceOptions`
684
-
685
- > If `true` the `onAdd` callback will be called with the initial set of items
686
-
687
- ## 2.0.4
688
-
689
- - Add `isCalledAfterSocketUpdate` to `onAdd`, `onRemove` and `onChange` callbacks
690
-
691
- > You can use this if a data change should only trigger an action when the user caused it himself
692
-
693
- ## 2.0.3
694
-
695
- - Fix `CollectionEditResource.removeItems`
696
- - Move `getCurrentCollectionEntryCache` and `getCurrentItemEntryCache` from `TransactionCache` to `AbstractCache`
697
-
698
- ## 2.0.2
699
-
700
- - Fix marking entries as deleted and compiling this into a request
701
-
702
- ## 2.0.1
703
-
704
- - Expand CollectionEntry's columns in `ServerCollectionHandler.fetchCollectionData`
705
-
706
- ## 2.0.0 - Major caching refactor
707
-
708
- - Completely reworked internal caching structure,
709
- see [this Confluence page](https://rentman.atlassian.net/wiki/spaces/DEV/pages/704872456/) for the motivations behind
710
- it.
711
-
712
- ## 1.9.0
713
-
714
- - Don't create ItemResources when not returning links in `ItemAdministrator.getNewResourceWithId` and
715
- in `ItemAdministrator.constructOnItemsExpanded`
716
-
717
- ## 1.8.0
718
-
719
- - Remove `ResourceCache` and `resourceLevel`
720
-
721
- > You should now manually call `resource.clearResource` when you no longer need a resource
722
-
723
- - Add `onConstruct` function to `ItemResource` and `CollectionResource`
724
-
725
- > This is overwritten by the frontend to track resource creation
726
-
727
- ## 1.7.6
728
-
729
- - Add priority parameter to local cache callbacks. The callback condition (`always` / `onClose` / `skipOnClose`) no
730
- longer has any effect on the order in which the callbacks get executed.
731
- - **Breaking:** Remove `LocalCacheCallbackCondition` enum.
732
- - Add `itemId` parameter to `ItemHandler.fetchNewItem`. An error is thrown when an ID already exists.
733
- Add `getNewResourceWithId` to ItemAdministrator. Deprecate `getItemByState`.
734
-
735
- ## 1.7.5
736
-
737
- - For template column sets it is no longer assumed all columns are present. This fixes an issue with incomplete column
738
- sets in the front-end.
739
- - Fix issue where `changesProcessor` instance was undefined in `itemResourceFactory` and `collectionResourceFactory`.
740
- Create variables for each core service in order to get a TypeScript error when a dependency hasn't been initialized
741
- yet.
742
-
743
- ## 1.7.4
744
-
745
- - Add support for strict ItemType type checking in `FieldMap`
746
-
747
- ## 1.7.3
748
-
749
- - Add support for strict ItemType type checking
750
-
751
- > This is temporarily defaulted to `any` to prevent compile errors in the frontend
752
-
753
- ## 1.7.2
754
-
755
- - Fix some typing issues in:
756
- - ApiResponseProcessor
757
- - ItemCache
758
- - KeyService
759
-
760
- ## 1.7.1
761
-
762
- - Fix issue where `CreateRequestFactory` would be undefined in `ChangesProcessor`.
763
-
764
- ## 1.7.0
765
-
766
- - **Breaking:** remove `ChangesProcessorFactory`. Add `ChangesProcessor` instance to core directly.
767
-
768
- ### Resource caching
769
-
770
- - **Breaking:** the following properties are removed:
771
- - On `ItemEntry`: `clearResources`, `deactivateResources`.
772
- - On `CollectionEntry`: `clearResources`, `getCurrentResource`.
773
- - On `CollectionResourceOptions`: `clearOnTabChange`, `clearOnSubTabChange`.
774
- - An additional `level` parameter has been added to all methods that return resources.
775
- - When creating resources using `ItemResourceFactory` or `CollectionResourceFactory`, this parameter is mandatory.
776
- A `defaultResourceLevel` parameter has been added to the `LocalCache` constructor.
777
- - A `clearResources` method has been added to `ItemAdministrator`. When calling this method, all item / collection and
778
- collection resources with a level of `level` or higher will be removed.
779
- - The `clearResources` method has been removed from `LocalCache`.
780
- - The `setCurrentLocalCache` function has been removed from `LocalCacheManagerInterface`.
781
-
782
- ## 1.6.13
783
-
784
- - When encountering a collection entry with `PROMISED_EXPAND` status, call `getCachedEntryStatus` after the initial
785
- promise has been resolved.
786
-
787
- > This is the likely cause of the issue where `_resolve` is called on a non-deferred collection entry.
788
-
789
- ## 1.6.12
790
-
791
- - Fix error that occurs when trying to resolve a non-deferred collection entry.
792
-
793
- ## 1.6.11
794
-
795
- - Fix issue where `QueryMatcher.matchComplexQuery` would return the wrong value.
796
-
797
- ## 1.6.10
798
-
799
- - **Breaking**: Remove `linkType`, `linkIdArray` properties from `LinkCollectionDefinition`. Add `linkType`,
800
- `linkIdArray` parameters to `ItemAdministrator.getLinkCollectionsFromDef`.
801
-
802
- ## 1.6.9
803
-
804
- - Redeploy of `1.6.8`
805
-
806
- ## 1.6.8
807
-
808
- - Add support for `not` in queries
809
-
810
- ## 1.6.7
811
-
812
- - Fix issue where `CollectionMatcher.addToCollections` wouldn't return the correct type.
813
-
814
- ## 1.6.6
815
-
816
- - Add `callOnAdd` parameter in `CollectionHandler.batchExtend`. Set `updateInitial` to true. Remove `updateInitial`
817
- parameter in `CollectionEntry.extend`, as it should always be true.
818
-
819
- > The `extend` function only concerns itself with remote items, so no local changes should be generated.
820
-
821
- ## 1.6.5
822
-
823
- - Fix issue where a derived column could be marked as the `link` (parent) column in the column set.
824
-
825
- > This could lead to instances where a different column would be set to the value of the parent.
826
-
827
- ## 1.6.4
828
-
829
- - Fix issue where the `onChange` collection callback would not be called when updating it in the options.
830
- - Add `callOnAdd` parameter to collection matcher. When set to `false`, `onAdd` is not called for
831
- the `resultCollectionResource`.
832
-
833
- ## 1.6.3
834
-
835
- - Properly type ApiResponseProcessor - fetchObjectArray
836
-
837
- ## 1.6.2
838
-
839
- - Fix issue where the collection handler would return collection entries before they were resolved when
840
- calling `batchFetch`.
841
-
842
- ## 1.6.1-3
843
-
844
- - Check for linkedTo before checking for subqueries in QueryMatcher
845
-
846
- > Linkedto also has `.query` and was incorrectly marked as a subquery
847
-
848
- ## 1.6.1-2
849
-
850
- - Fixed shorthand query with null values
851
-
852
- > The QueryParser would incorrectly identify subqueries when using null in a shorthand
853
-
854
- ## 1.6.1-1
855
-
856
- - Fixed shorthand query with Moment values
857
-
858
- > The QueryParser would incorrectly identify Moment objects as a subquery
859
-
860
- ## 1.6.1
861
-
862
- - Added support for subqueries in QueryParser and QueryMatcher
863
-
864
- > Collections using subqueries will always return 'maybe' in the QueryMatcher
865
-
866
- ## 1.6.0
867
-
868
- - All external callbacks are now wrapped in a `try ... catch` block. This prevents them from breaking core
869
- functionality.
870
- - **Breaking**: Add `ExceptionHandlerInterface` parameter to core constructor.
871
-
872
- ## 1.5.9
873
-
874
- - Fix issue that occurs when trying to resolve a `ColumnSet` using a single non-existing column. Catch exceptions that
875
- might occur when resolving an `ItemEntry`.
876
- - Add `mergeRequestColumns`, `mergeResponseColumns` to `ColumnSet`. When encountering new items while expanding a
877
- collection, add them to the collection.
878
-
879
- ## 1.5.8
880
-
881
- - Introduce `RemoteViewResource` and `LocalViewResource`.
882
-
883
- > The `fields` property of a `RemoteViewResource` represents server values, while the `fields` property of a `LocalViewResource` represents local values.
884
-
885
- - The `fields` property of a `ViewResource` is now read only.
886
-
887
- ## 1.5.7-1
888
-
889
- - Make ItemResource/CollectionResource base class abstract
890
- - Add missing overload functions in some places
891
- - Fix default comparator `QueryMatcher.parseSimpleQuery`
892
- - Fix `ExtendedCollectionMatchResult` `collection` property type
893
-
894
- ## 1.5.7
895
-
896
- - Properly type Collections & ItemResources (and return values) in the whole core.
897
-
898
- > The core will now properly return Collections & ItemResources based on the passed CollectionOptions.
899
- > You can now also type the expected collection type
900
-
901
- ```
902
- // Expects a collection with editCollection and editItems both `true`
903
- // Will properly return EditResources for all collection functions
904
- const collection: CollectionEditResource<EditResource>;
905
-
906
- // other variations are:
907
- // CollectionViewResource<ViewResource>
908
- // CollectionViewResource<EditResource>
909
- // CollectionEditResource<ViewResource>
910
-
911
- this.core.itemAdministrator.getCollection(
912
- 'Notitie',
913
- {
914
- editCollection: true, // Will return a CollectionEditResource
915
- editItems: true // Will return EditResources instead of ViewResources in `.items`
916
- }
917
- )
918
- ```
919
-
920
- ## 1.5.6
921
-
922
- - Add `getAllLocalCaches` to `LocalCacheManagerInterface`, remove item entries from all local caches on socket delete.
923
-
924
- ## 1.5.5
925
-
926
- - Add 'order' column type handling to ApiFormatter functions
927
-
928
- ## 1.5.4
929
-
930
- - Fix issue where parent would be incorrectly set when cloning a single item.
931
- - Type functions related to expansion maps in `ItemEntryService`.
932
-
933
- ## 1.5.3
934
-
935
- - Fix issue where the `enableSave` collection resource option would default to `false`. This would throw an error when
936
- calling `save` on a collection resource where this option was not explicitly set.
937
-
938
- ## 1.5.2
939
-
940
- - Type functions in `ColumnUtil` class.
941
- - Add `getRequestColumnId` and `containsDerivedColumns` to `ColumnUtil`.
942
-
943
- > `getRequestColumnId` should be used instead of `Util.getFirstProperty` when retrieving a column ID.
944
-
945
- - **Breaking:** Remove `ColumnUtil.isColumnSubset`. Use `ColumnSet.isSuperSetOf` instead.
946
- - Remove `findColumnObject`. Rename `findColumn` to `findRequestColumn`.
947
-
948
- ## 1.5.1
949
-
950
- - Properly remove item entry stub from (local) cache when request fails.
951
- - Fix issue where item or collection options could be set to undefined.
952
-
953
- ## 1.5.0
954
-
955
- - Add `SocketMessage` type and add types to `SocketMessageHandler`
956
- - Expand local items requested using `getItemById` or `getItemsById` in `ItemAdministrator`.
957
- (`fetchItem` or `fetchItems` in `ItemHandler`.)
958
- - Implement expanding of local collections. This no longer leads to invalid requests.
959
- - **Breaking:** The `expand` function in `CollectionEntry` now has an `ItemCache` parameter.
960
- - **Warning:** This version contains major changes.
961
-
962
- ### Introduce typing of item and collection options
963
-
964
- - **Breaking:** Removed `QueryItemType` collection entry option.
965
- - **Breaking:** Removed `ItemResourceService`.
966
- - Removed `processOptions` parameter from `createCollectionResource` (`ItemAdministrator`). It is now equivalent to
967
- `addCollection`.
968
- - When creating an item resource using `ItemResourceFactory`, a collection entry using `CollectionResourceFactory` or a
969
- collection resource using `CollectionResourceFactory` it is no longer necessary to process options beforehand. It is
970
- still necessary when interacting with `CollectionHandler` or `ItemHandler` directly.
971
-
972
- ## v1.4.0
973
-
974
- - Add `expandProcessLinkedItems` and `expandAddToCollections` to `ItemAdministrator`. These are analogues to
975
- `processLinkedItems` and `addToCollections`, but also expand the items with (derived) values and columns as necessary.
976
- They have a slightly different type signature.
977
- - Whenever a collection is requested, the `CollectionHandler` now makes sure that added local items are expanded as
978
- necessary.
979
- - **Breaking:** Last parameter of `ItemHandler.createLocalEntries` is now a callback function.
980
- - **Breaking:** Rename `TemplateLinkedItemEntryMap` type to `TemplateItemEntryMap`.
981
-
982
- ## v1.3.8
983
-
984
- - Add `isSaving` to `LocalCache`
985
-
986
- > We use this to disable the cancel/save buttons while the localCache is saving in the frontend
987
-
988
- ## v1.3.7
989
-
990
- - Fix issues that generate invalid requests / changes when moving existing item to another collection, then deleting the
991
- parent.
992
- - Remove slip workarounds
993
- - Add api request types
994
- - Add types to `ModuleChangesCompilation`
995
-
996
- ## v1.3.6
997
-
998
- - Skip add / remove collection callbacks when calling `revertChanges` (`LocalCache`).
999
-
1000
- ## v1.3.5
1001
-
1002
- - Fix issue where items added to collections when resolving wouldn't be removed in `revertChanges` (`LocalCache`).
1003
-
1004
- ## v1.3.4
1005
-
1006
- - Add country to isFilteredColumn in ColumnUtil
1007
-
1008
- ## v1.3.3
1009
-
1010
- - Move processLocalConfigColumns and consolidateColumns from ColumnUtil to frontend
1011
-
1012
- > These functions are specifically used for rendering ui-grid in the frontend, so there's no reason to have them in the core
1013
-
1014
- ## v1.3.2
1015
-
1016
- - Fix types path in package.json
1017
-
1018
- ## v1.3.1
1019
-
1020
- - Fix types path in package.json
1021
-
1022
- ## v1.3.0
1023
-
1024
- - Rename PromiseInterface to PromiseLibraryInterface
1025
-
1026
- > PromiseInterface is now used for the internal promise type
1027
-
1028
- - Use PromiseInterface instead of Promise as internal promise type
1029
-
1030
- > This allows us to overwrite the PromiseInterface definition in the frontend indicate usage of ng.IPromise
1031
-
1032
- ## v1.2.9
1033
-
1034
- - Call processOptions in fetchDerivedValuesByColumn
1035
-
1036
- > Bug was introduced earlier but got enabled in v1.2.7
1037
-
1038
- ## v1.2.8
1039
-
1040
- - Add toJSON methods for ItemResources, ItemEntries, and ColumnSets to fix circular dependencies in JSON.stringify
1041
-
1042
- ## v1.2.7
1043
-
1044
- - Set itemEntry parent when generating a stub
1045
-
1046
- ## v1.2.6
1047
-
1048
- - Fix an issue introduced in v1.2.5.
1049
-
1050
- ## v1.2.5
1051
-
1052
- - When a local item cannot by found, return a newly created item in `getItemByState` (`ItemAdministrator`) only. This
1053
- solves an issue with refreshing on a local edit view.
1054
-
1055
- ## v1.2.4
1056
-
1057
- - **Breaking:** When a local item cannot by found, instead of a new item being created an error is thrown. This means it
1058
- is no longer possible to create local items using `getItemById` or `getItemsById` in the `ItemAdministrator` class.
1059
- - **Breaking:** Removed `getItemDefinition` and `getItemByDef` in the `ItemAdministrator` class. Added `getItemByState`.
1060
- - Renamed types `TemplateResponseItemEntryMap` to `TemplateItemEntryMap` and `TemplateResponseLinkedItemEntryMap` to
1061
- `TemplateLinkedItemEntryMap`.
1062
- - Removed `getCollectionCacheKey` in `KeyService`. (Legacy code.)
1063
-
1064
- ## v1.2.3
1065
-
1066
- - Fixed issue where derived values deeper than one layer couldn't be resolved.
1067
-
1068
- ## v1.2.2
1069
-
1070
- - Fixed issue where in derived values weren't set after create request.
1071
-
1072
- ## v1.2.1
1073
-
1074
- - **Breaking:** Replaced the `initial` parameter with the `callOnChange` parameter (`true` by default) in the `commit`
1075
- function of the `EditResource` class.
1076
- - Fixed issue in `setLocalFields` (`ItemEntry`) where some values were wrongly assumed to be present in `initialValues`.
1077
- - Optimization: Disabled automatic resolution of derived values in `addItems` (`CollectionEditResource`)
1078
- when `modInstant` is set to true.
1079
-
1080
- ## v1.2.0
1081
-
1082
- - **Breaking:** When calling `addItems` or `addItem` on the `CollectionEditResource` class derived values are now
1083
- resolved automatically. Instead of a compound object like `{fields: {key: 'value'}, derived: {}}` an object like
1084
- `{key: 'value'}` should now be used as argument when calling these functions.
1085
- - **Breaking:** Added `localCache` parameter to `CollectionResource` constructor.
1086
-
1087
- ## v1.1.20
1088
-
1089
- - Fixed minor issue where collection wouldn't be deferred properly before expanding.
1090
- - `onChange` is now called automatically when when calling `commit` on an edit resource.
1091
-
1092
- ## v1.1.19
1093
-
1094
- - **Breaking:** Renamed `getCurrentChanges` to `getModuleChanges` in the `ItemAdministrator` class. Added optional
1095
- `localCache` parameter.
1096
-
1097
- ### Local cache callback refactoring
1098
-
1099
- - Removed `onSaveWithoutClosing` event.
1100
- - Added `condition` parameter to `onBeforeSave` and `onSaveSuccess` (possible values are `always`, `onClose` or
1101
- `skipOnClose`, defaults to `always`). Callbacks registered with `condition: always` will get executed before other
1102
- callbacks.
1103
- - Pass the local cache itself to all registered callback functions. Pass the item ID conversion map as second argument
1104
- to `onSaveSuccess` callback functions.
1105
-
1106
- ## v1.1.18
1107
-
1108
- - Calling `expand` on a `CollectionEntry` manually no longer defers the collection entry.
1109
- - The `batchFetch` and `batchExpand` functions in the `CollectionHandler` class now properly defer and resolve the
1110
- collection entries.
1111
-
1112
- ## v1.1.17
1113
-
1114
- - Fixed issue where the `getLocalByQuery` function in the `ItemCache` class wouldn't return any items.
1115
- - When batch resolving collection entries, `CollectionHandler` now looks for matching items using `getByQuery` instead
1116
- of `getByParent`.
1117
-
1118
- ### Cache invalidation
1119
-
1120
- - Added `queueReload` function to `ItemEntry` class. This will reload the item when the item entry itself or a
1121
- collection entry containing the item is requested.
1122
- - The `queueReload` function in the `CollectionEntry` class no longer directly defers the item.
1123
- - Added `invalidateCache` function to the `ItemAdministrator` class. This will call `queueReload` on all item entries
1124
- and collection entries.
1125
-
1126
- ### Item entry refactoring
1127
-
1128
- - Renamed `process` to `setFields`.
1129
- - Replaced `processLocal` with `setLocalFields`. This function no longer has a `modified` parameter.
1130
- - `setModified` now also sets local default values.
1131
- - Removed `setCreator`. This function was called twice in some instances.
1132
- - **Breaking:** Added `derived` parameter to `updateFields`
1133
-
1134
- ## v1.16
1135
-
1136
- - Pass `hasChanges` as second argument to `onBeforeSave` callbacks in the `LocalCache` class. This fixes an issue with
1137
- project financial values in the front-end. [RM4-9577]
1138
- - Added `callOnActivate` parameter to `addItems` function in `CollectionEditResource` class. Use this to prevent items
1139
- from being added to the local cache.
1140
-
1141
- ## v1.15
1142
-
1143
- - Fix `fetchItemTypesTranslations` function in `ColumnHandler` class.
1144
- - Fix type definition of `PromiseInterface.all`.
1145
-
1146
- ## v1.14
1147
-
1148
- - The `ChangesCompiler` now always processes local collections. (Even if they don't have edit resources.) This fixes an
1149
- issue with recurring appointments in the front-end.
1150
-
1151
- ## v1.13
1152
-
1153
- - Add option to exclude itemTypes during createLocalEntries.
1154
-
1155
- ## v1.12
1156
-
1157
- - **Breaking:** `ItemResource.isNew` returns true *only* if the resource was created using
1158
- `ItemAdministrator.getNewResource` or `ItemAdministrator.getItemByDef`. This fixes an issue where items where removed
1159
- from the local cache inadvertently.
1160
- - The `start`, `commit` and `rollback` functions of `EditResource` now return the resource itself to facilitate
1161
- chaining.
1162
- - When calling `CollectionEntry.revertChanges`, callbacks like `onAdd` / `onRemove` and `onActivate` / `onDeactivate`
1163
- are now respected. This fixes an issue where items where *not* removed from the local cache.
1164
- - When removing *local* items from collections, they are removed from `initial` as well as `modified`. This fixes an
1165
- issue where changes were being detected continuously.
1166
- - Updated the order of requests in `changesProcessor`. The `update` request is now executed before the `delete` request,
1167
- except when updating documents. This fixes several issues.
1168
- - `CollectionCache` now uses a map instead of an array to store collections. This fixes an issue where the same
1169
- collection was added multiple times.
1170
- - Updated all models to use dependency objects. This increases ease of debugging.
1171
-
1172
- ## v.1.11
1173
-
1174
- - Fixed issue that occurs when saving when having an existing item refer to a newly created item.
1175
- - **Breaking:** Removed `ItemResourceService.isNewResource`.
1176
- - **Breaking:** Renamed `ItemResource.isNewResource` to `ItemResource.isNew`. Removed parameter.
1177
- - `ItemResource.isNew` is equivalent to `ItemResource.isLocal`, while `EditResource.isNew` checks also checks for
1178
- completed transactions.
1179
-
1180
- ## v.1.10
1181
-
1182
- - Fixed issue where changes on different subtabs were not detected.
1183
-
1184
- ## v1.1.9
1185
-
1186
- - Exposed `noop` function on `RmCore` class.
1187
-
1188
- > This is used in order to check whether a callback has a default value.
1189
-
1190
- - Added `copyRequestColumns` function to `ColumnUtil` class.
1191
- - Made parameters of `ItemAdministrator.saveCurrentLocalCache` and `LocalCache.save` optional.
1192
- - **Breaking:** Reordered parameters of `ChangesProcessor.execute` to be consistent with
1193
- `ItemAdministrator.saveCurrentLocalCache`. The new order is `singleItems` - `collections` - `parameters` -
1194
- `breakUpByParent` - `onAfterCreateCallback`.
1195
-
1196
- ## v1.1.8
1197
-
1198
- - Set default value for `params` to `{filter: false}` in `request` function in `ColumnHandler` class.
1199
-
1200
- ## v1.1.7
1201
-
1202
- - Fixed issue where cached item entries or collection entries wouldn't be added to the local cache.
1203
-
1204
- ## v1.1.6
1205
-
1206
- - Fixed issue with deferred item entries.
1207
- - Re-enable changes watcher after save.
1208
- - Added optional `id` parameter to `LocalCache` constructor.
1209
-
1210
- ## v1.1.5
1211
-
1212
- - Added `clearItem` function to `LocalCache` class.
1213
-
1214
- ## v.1.1.4
1215
-
1216
- - Fix issue where items where not added to the local cache automatically when they where added to a collection.
1217
-
1218
- > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add the items to the local cache.
1219
- > In other instances this might be debatable because it doesn't do any real harm. *Not*
1220
- doing it however can definitely be harmful.
1221
-
1222
- ## v.1.1.3
1223
-
1224
- - Fixed an issue where all collections in a local cache would be cleared.
1225
- - **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
1226
- `LocalCacheManagerInterface`.
1227
-
1228
- ## v1.1.2
1229
-
1230
- - Fixed an issue concerning derived values.
1231
-
1232
- ## v1.1.1
1233
-
1234
- - Fixed an issue where changes wouldn't be detected.
1235
- - **Breaking:** Removed the `_hasChanges` function in the `localCache` class. If you want to force changes detection,
1236
- call `detectChanges` instead. Otherwise, rely on the `hasChanges` variable.
1237
- - **Breaking:** Removed the `enableWatcher` and `disableWatcher` functions. Use `enableChangesWatcher` and
1238
- `disableChangesWatcher` instead.
1239
-
1240
- ## v1.1.0
1241
-
1242
- ### Development
1243
-
1244
- #### Strict TypeScript compilation
1245
-
1246
- Added the following TypeScript compiler options:
1247
-
1248
- - noImplicitThis
1249
- - noImplicitReturns
1250
- - strictNullChecks
1251
- - noUnusedLocals
1252
- - noUnusedParameters
1253
-
1254
- I would advise enabling these for all TypeScript projects from now on.
1255
-
1256
- #### Ordered imports and dependencies
1257
-
1258
- Imports are now ordered alphabetically and grouped by folder. Added a TSLint option to enforce this. Please note that
1259
- this also applies for imports from the folder the file is currently in. For example, in `models/ItemResource.ts`
1260
- , `itemEntry` should be imported like so:
1261
- `import { ItemEntry } from '../models';`
1262
-
1263
- Also, factory and class dependencies should be ordered alphabetically as well. This will make it easier to add and
1264
- remove dependencies in the future.
1265
-
1266
- ### Breaking changes
1267
-
1268
- - Renamed `changesCompiler` to `changesCompilation`, `changesCompilerFactory` to `changesCompilationFactory`,
1269
- `moduleChangesCompiler` to `moduleChangesCompilation` and `moduleChangesCompilerFactory` to
1270
- `moduleChangesCompilationFactory`.
1271
- - Removed the `allLinks` parameter from the `query` function definition in the `ApiRequestServiceInterface`. This is no
1272
- longer supported in the back-end.
1273
-
1274
- #### Item and collection entries
1275
-
1276
- - Moved *all* functions that handle item entries from the `ItemEntryService` to the `ItemEntry` class.
1277
- - Added the following functions to `ItemEntryService`:
1278
- - `createLocalConversionMap`;
1279
- - `expandLocalConversionMap`;
1280
- - `expandConversionMap`;
1281
- - `batchExpandConversionMap`;
1282
- - `batchClone`.
1283
- - Cloning of item entries now works slightly differently. The function will attempt to generate a new item ID, and
1284
- update the conversion map accordingly, but will respect the item ID that is already there.
1285
-
1286
- #### Rework item caching
1287
-
1288
- Newly created item entries and collection entries are no longer added to the global *or* local cache by default. All
1289
- entries are added to the global cache on save. Item entries are added to the local cache when resources are created
1290
- using the item administrator or when resources are created when adding the items to a collection.
1291
-
1292
- > This will increase reliability by ensuring the global cache is no longer 'polluted' with local items. Also, this will
1293
- > allow for the creation item and collection entries without caching them directly. This is required for the copying and
1294
- > pasting of items.
1295
-
1296
- Other changes:
1297
-
1298
- - Moved `saveLocal` to `ItemAdministrator`;
1299
- - `ItemAdministrator.fetchTitle` should now be called instead of `ItemHandler.fetchTitle`;
1300
- - The `ItemAdministrator` collection matching functions (`addToCollections`, `removeFromCollections`) should now be
1301
- called instead of those in the `CollectionHandler`. The `CollectionHandler` should only be used to reflect changes
1302
- already on the backend. (Use `getCollectionMatcher`.)
1303
-
1304
- ## v1.0.33
1305
-
1306
- - Really fix types path
1307
-
1308
- ## v1.0.33
1309
-
1310
- - Fix types path
1311
-
1312
- ## v1.0.32
1313
-
1314
- - Update `tsconfig.json` to put definitions in the root folder
1315
-
1316
- > The app had an issue with AOT compilation because of this
1317
-
1318
- ## v1.0.31
1319
-
1320
- - Fix `columnHandler.fetchItemTypeTranslations`
1321
-
1322
- > It incorrectly looped over the response map, it should now work again
1323
-
1324
- ## v1.0.30
1325
-
1326
- - Remove `updateTabParams` from LocalCacheManagerInterface
1327
-
1328
- > The function wasn't used
1329
-
1330
- - Reworked class export
1331
-
1332
- > Imports are now done from @rentman/rm-core, old imports are broken. This is because the old export structure didn't always work
1333
-
1334
- ## v1.0.29
1335
-
1336
- - Fix inverted inArray check in CollectionEntry.removeItems
1337
-
1338
- > A delete message from the socket deleted all BUT the deleted items, this should now be fixed
1339
-
1340
- ## v1.0.28
1341
-
1342
- Bug fixes only
1343
-
1344
- ## v1.0.27
1345
-
1346
- - `ItemEntry.initial` is now undefined by default
1347
-
1348
- > In the SocketMessageHandler we use this check to see if an ItemEntry is a stub
1349
-
1350
- ## v1.0.26
1351
-
1352
- Bundle both minified and unminified code, include sourcemaps from dev build
1353
-
1354
- ## v1.0.24, v1.0.25
1355
-
1356
- ! Use version `v1.0.26` !
1357
-
1358
- - The core now expects a `promiseInterface` that should implement the provided `promiseInterface`
1359
-
1360
- > We need to be able to hook into the promises in order to call a digest cycle to update the ui in the frontend
1361
-
1362
- - Rename `ItemEntry.entryId` to `ItemEntry.id
1363
-
1364
- > It used to be called `id`, but it was changed in the seperation of the core.
1365
- > You can use the `id` to uniquely identify an entry, since itemId can be updated (local to saved id)
1366
-
1367
- - Rename ItemResource `startTransaction` to `start`
1368
-
1369
- > Other functions are called `commit` and `rollback` so having 'transaction' only for start doesn't make much sense
1370
-
1371
- - `SocketMessageHandler.onMessageReceived` now returns a promise
1372
-
1373
- > You can now use the updated items or hook into the result to update the ui for example
1374
-
1375
- ## v1.0.23
1376
-
1377
- - Rename ResourceCache to LocalCache
1378
-
1379
- > LocalCache only caches local items (name better reflects functionality)
1380
-
1381
- - Remove getter/setter for hasChanges
1382
-
1383
- > hasChanges is called in a digest loop in the frontend, so for performance reasons we don't want to recompute the value every time
1384
-
1385
- - Remove `_getCollection` from ItemAdministrator
1386
-
1387
- > `_getCollection` is now named `getCollection` and the old `getCollection` is removed. The query is part of the
1388
- > options and should not be given as a separate argument. This was included to support the frontend
1389
-
1390
- - Remove `saveCurrentTab` from ItemAdministrator
1391
-
1392
- > `saveCurrentTab` makes no sense because the core has no concept of tabs, you should use `saveCurrentLocalCache` instead
1393
-
1394
- - Remove `getTabEntry` and `resetTabEntry` from ItemAdministrator
1395
-
1396
- > `getTabEntry` and `resetTabEntry` make no sense because the core has no concept of tabs, you should use `getLocalCache` and `resetLocalCache` instead
1397
-
1
+ # Changelog
2
+
3
+ Contains new features, breaking changes and their reasoning
4
+
5
+ ## 10.1.1-2
6
+
7
+ - Add tracking of match attempts on CachedQueryItems
8
+
9
+ ## 10.1.1
10
+
11
+ - Add tracking of cache hits on CachedQueryItems
12
+
13
+ ## 10.1.0
14
+
15
+ - Performance: Removed caching of non-matchable queries, we now lose the ability to automatically add new items to these
16
+ collections (they still update upon re-requesting them)
17
+ but this saves a ton of matching requests.
18
+
19
+ ## 10.0.6
20
+
21
+ - Fixed issue where multiple locktockens could be requested when multiple calls to `fetchLocktoken` were made in quick
22
+ succession.
23
+
24
+ ## 10.0.5
25
+
26
+ - Refactor mapping of deleted entries in ChangesDeltas to be a map instead of an array
27
+ - Prevent setting items as updated on ChangesDeltas if it's also in deleted entries
28
+ - Remove updated and restored entries in ChangesDeltas if it's also in deleted entries
29
+
30
+ ## 10.0.4
31
+
32
+ - Fixed a bug introduced in 10.0.3 when trying to load a local item
33
+
34
+ ## 10.0.3
35
+
36
+ - Fixed a bug in which remotely fetched changes could overwrite changes of a parent transaction if there was a child
37
+ transaction
38
+
39
+ ## 10.0.2
40
+
41
+ - Use the promise library instead of native promises in BusinessLogicManager
42
+
43
+ ## 10.0.1
44
+
45
+ - Add the `MateriaalTelexemplarenBusinessLogicRule` to the core
46
+
47
+ ## 10.0.0
48
+
49
+ - Introduce `BusinessLogicManager` and `BusinessLogicRule`s to the core
50
+
51
+ ## 10.0.0-alpha.3
52
+
53
+ - Only set invoice module permissions when project permissions change if 'projecten_facturen_maken' is enabled
54
+
55
+ ## 10.0.0-alpha.2
56
+
57
+ - Fix infinite loop in Rol business logic
58
+
59
+ ## 10.0.0-alpha.1
60
+
61
+ - Introduce `BusinessLogicManager` and `BusinessLogicRule`s to the core
62
+
63
+ ## 9.3.1
64
+
65
+ - Fixed a bug where items that were both moved and updated could end up in a collection twice
66
+
67
+ ## 9.3.0
68
+
69
+ - Added order to the CacheSyncer functions ensuring that it's always in order of 1. removing 2. adding
70
+
71
+ ## 9.2.4
72
+
73
+ - Fixed a bug where incorrect request columns where added because of the query (in reverse linkedTo queries)
74
+
75
+ ## 9.2.3
76
+
77
+ - Fixed a bug in which multiple requests for the same item could result in incorrect expanded columns
78
+ - Increased performance of ColumnUtil by using string comparison over enums
79
+ - Increased performance of caching new items (in ChangesDelta._setItemCreated) by not creating default local values for
80
+ items from API responses
81
+
82
+ ## 9.2.2
83
+
84
+ - Optimize requests for collection trees with three levels. (E.g. MateriaalCat -> Planningmateriaal -> Missing)
85
+
86
+ ## 9.2.1
87
+
88
+ - Fix bug in 9.2.0 that caused updates of date fields not to be processed.
89
+
90
+ ## 9.2.0
91
+
92
+ - Greatly speed up core processing on large datasets
93
+ - Refactor the way ChangesDeltaBase.setItemUpdated processes fields to reduce `Object.getOwnPropertyDescriptor`
94
+ calls
95
+ - Refactor the way CacheSyncer.processDelta processes updated values to prevent unneeded field copying
96
+ and `Object.getOwnPropertyDescriptor` calls
97
+ - Add `RequestBufferManagerPrioritySettings` to give finer control over request buffering to the caller
98
+
99
+ ## 9.1.2
100
+
101
+ - Delete item lock when transaction is destroyed
102
+
103
+ > We never deleted item locks causing the items to be locked forever, even though a user wasn't editing them anymore
104
+
105
+ ## 9.1.1
106
+
107
+ - Fix handling of multiple create requests in one transaction
108
+
109
+ ## 9.1.0
110
+
111
+ - Implement cascading deletes based on backend delete relations
112
+
113
+ ## 9.0.5
114
+
115
+ - Prevent an error occurring when `fetchItemEntryData` did not return an itemEntry
116
+
117
+ ## 9.0.4
118
+
119
+ - Remove `MAYBE` matches that did not get returned after the API query from cached queries and collections
120
+ in `CacheSyncer`
121
+
122
+ ## 9.0.3
123
+
124
+ - Check for empty changesDeltas in `TransactionCache.applyChangesFromParent` to prevent unnecessary calls
125
+
126
+ ## 9.0.2
127
+
128
+ - Improve the way `getLinkCollections` fetches its data to greatly improve performance
129
+
130
+ ## 9.0.1
131
+
132
+ - Accept any version (apposed to `latest`) for @rentman/backend-types
133
+
134
+ ## 9.0.0
135
+
136
+ - **Breaking:** Align item changes in server cache and transaction cache: add `fields` property in server item changes,
137
+ rename `changes` in transaction item changes to fields. Remove `getChangesFromItemChanges`.
138
+
139
+ ## 8.2.11
140
+
141
+ - Only copy over cachedQueries when saving child transactions if the parent transaction doesn't have one with the query
142
+ yet
143
+
144
+ ## 8.2.10
145
+
146
+ - Fix displayname for 'CustomfieldGroup'
147
+ - Also set displayname when creating ItemEntries
148
+
149
+ ## 8.2.9
150
+
151
+ - Fixes a bug in which items on the ServerCache would not properly be added to collections
152
+
153
+ ## 8.2.8
154
+
155
+ - Fixes a bug in which newly created items do not appear in collections caused in 8.2.6
156
+
157
+ ## 8.2.7
158
+
159
+ - Merge tabRequestParameters when saving a TransactionCache into another TransactionCache
160
+
161
+ ## 8.2.6
162
+
163
+ - Fixed issue where deleted equipment re-appear
164
+
165
+ ## 8.2.5
166
+
167
+ - Skipped
168
+
169
+ ## 8.2.4
170
+
171
+ - Fixed issue where non-local items were expanded locally.
172
+ - Fixed hypothetical situation where an item entry in a local cached query could have an incomplete column set.
173
+
174
+ ## 8.2.3
175
+
176
+ - Did a performance optimization which will cause aggregated columns not to be re-fetched unnecessarily
177
+
178
+ ## 8.2.2
179
+
180
+ - Fixed a bug where derived values would not be fetched for newly created local items
181
+ - Did a performance optimization which will cause aggregated columns not to be re-fetched unnecessarily
182
+
183
+ ## 8.2.1
184
+
185
+ - Skipped
186
+
187
+ ## 8.2.0
188
+
189
+ - Added support for collection trees. Now, when requesting a collection you can add the `children` property, which is a
190
+ map of collection options. The collection resources will be available in the item resources of the resulting
191
+ collection resource. For more information,
192
+ see [Confluence](https://rentman.atlassian.net/wiki/spaces/~652789241/pages/948404231/Child+collections).
193
+
194
+ ## 8.1.9
195
+
196
+ - RM4-16796 Fixed a bug where loading the same query in quick succession would cause columns/data to be missing
197
+
198
+ ## 8.1.8
199
+
200
+ - Reorganize imports: move all exports to `internal.ts`. This is the only place where things should be exported. All
201
+ files should import from this file. Resolve duplicate declaration of `InternalCreateDelta` type.
202
+ - Improve performance of copying over values in `ChangesDelta`s and `CollectionMatcherBase`
203
+ - Merge all `CollectionMatcher` classes into one `CacheSyncer`, so that `processDelta` only has to be done once
204
+ - Increase performance of the ApiFormatter on large datasets
205
+
206
+ ## 8.1.7
207
+
208
+ - Fixed a bug where copied over CachedQueryItems weren't resolved (causing them to hang forever)
209
+
210
+ ## 8.1.6
211
+
212
+ - Add missing return statement in ServerCache.applyChangesDelta
213
+
214
+ ## 8.1.5
215
+
216
+ - Only extend missing derived values while resolving local items
217
+ in `TransactionCachedQueryHandler.__fetchItemEntriesByQueryData`
218
+
219
+ ## 8.1.4
220
+
221
+ - Remove non-created items if they are not returned in the response of a Create request
222
+
223
+ > If a create would fail, the whole request would fail. So we can assume that if an item isn't returned from a create
224
+ > request, the backend has left it out on purpose
225
+
226
+ - Move cached queries to parent transactions only when saving a child transaction
227
+
228
+ > Only then you know for sure that items that matched on the child transaction will also match in the parent transaction,
229
+ > since you're taking over the changes, this behaviour was changed somewhere in a refactor but was incorrect
230
+
231
+ - No longer move cached queries to the ServerCache when saving a root transaction
232
+
233
+ > 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)
234
+
235
+ - No longer wait for child transactions to sync when applying changes in a parent
236
+
237
+ > A child transaction can only influence a parent transaction by calling `TransactionCache.save`, which doens't happen whilst applying changes,
238
+ > so you don't have to wait for child transactions when applying changes in a parent
239
+
240
+ ## 8.1.3
241
+
242
+ - Allow passing TransactionOptions to TransactionCacheFactory.construct
243
+
244
+ ## 8.1.2
245
+
246
+ - Fixed a bug in which derived values for local items wouldn't be properly be fetched
247
+
248
+ ## 8.1.1
249
+
250
+ - Fixed a bug in which a `Template` request's columns weren't processed
251
+
252
+ ## 8.1.0
253
+
254
+ - Add `cloneCreatedChanges` function to `ChangesDeltaFactory`. This function clone the `created` component of a changes
255
+ delta into a destination changes delta.
256
+ - Add `TransactionOptions`, implement `transparent` transaction option
257
+ - Allow core-mapped TS types instead of backend-mapped TS types in `ApiFormatter.compareFields`
258
+ - Fixed a bug where empty update requests where sometimes done
259
+ - Fixed a bug where derived values of items returned in a Template request weren't properly resolved
260
+
261
+ ## 8.0.3
262
+
263
+ - Changed the flow of a create request so that it includes all the required columns for all transactions and also
264
+ processes additionally returned (derived) items
265
+ - Fixed a bug where fields referencing local items would already be updated in the `previous` before the `onChange`
266
+ callbacks were called
267
+ - Moved logic of updating IDs in cached queries/collections to TransactionCachedQueryHandler and
268
+ TransactionCollectionHandler
269
+
270
+ ## 8.0.2
271
+
272
+ - Fixed a bug where deleted entries on a child transaction where not handled properly
273
+ - Fixed a bug where saving a child transaction, and then undoing those changes and saving again would not update the
274
+ parent transaction
275
+
276
+ ## 8.0.1
277
+
278
+ - Uppercase operators and comparators in QueryMatcher, QueryParser and QueryService
279
+ - Fix parsing short-hand `IN` queryies
280
+
281
+ ## 8.0.0
282
+
283
+ - Implement `@rentman/backend-types`
284
+
285
+ > You will now have autocomplete and typing checking on all columns/fields 🥳
286
+
287
+ - Remove `ChangesDeltaResult.rollback`
288
+
289
+ > It was never really used/implemented
290
+
291
+ ## 7.2.0
292
+
293
+ - Add the `preventCaching` option to `CollectionOptions`
294
+
295
+ > 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)
296
+
297
+ ## 7.1.1
298
+
299
+ - Properly handle moved items in ServerCache.applyChangesFromParent (technically the backend won't ever generate a
300
+ linkTo (only updates)) but it can happen when manually syncing the server cache (by
301
+ doing `InternalChangesDelta.setItemMoved`)
302
+
303
+ ## 7.1.0
304
+
305
+ - Automatically keep aggregated values up-to-date by always refetching them
306
+
307
+ ## 7.0.15
308
+
309
+ - Remove an accidentally left in place debugger
310
+
311
+ ## 7.0.14
312
+
313
+ - Take into account collections with a 'limit' (of which the query result isn't cached) when matching socket items
314
+
315
+ ## 7.0.13
316
+
317
+ - Only overwrite the displayname if the required columns are present, instead of defaulting to an empty string
318
+
319
+ ## 7.0.12
320
+
321
+ - Fixed a bug where the core would try to update the cache key (ID) of `fieldChangeCallbacks` even when there were no
322
+ callbacks for the given itemType
323
+
324
+ ## 7.0.11
325
+
326
+ - Fixed a bug where date values would not be compared if the descriptor was uncalled, this could lead to problems when
327
+ applying changes from a parent transaction
328
+
329
+ ## 7.0.10
330
+
331
+ - Update references to local IDs in other items when a local ID gets updated
332
+
333
+ ## 7.0.9
334
+
335
+ - Take over `tabRequestParameters` when saving TransactionCache -> TransactionCache
336
+
337
+ ## 7.0.8
338
+
339
+ - Fixed a race condition and loop iteration error which in very rare cases caused itemEntries to be `undefined` and
340
+ erroring
341
+ - Add missing error handling in transaction functions
342
+
343
+ ## 7.0.7
344
+
345
+ - Properly handle `reverse` linkedTo's in QueryColumnExtractor and QueryLocallyMatchableParser
346
+ - Implement refreshing of cached queries/collections
347
+
348
+ ## 7.0.6
349
+
350
+ Move fetching of lock from `TransactionItemHandler.processItemEntryChanges` to `TransactionCache.appyChangesDelta` to
351
+ also capture creates and deletes.
352
+
353
+ ## 7.0.5
354
+
355
+ - Remove automatic fetching of derived values for not-yet-created items
356
+
357
+ ## 7.0.4
358
+
359
+ - Automatically resolve derived values when a new item is created
360
+ - Fixed a bug where `AbstractCache.getParentFromFields` would still return `null` incorrectly
361
+
362
+ ## 7.0.3
363
+
364
+ - Fixed a bug where `AbstractCache.getParentFromFields` would still return `undefined` parent values
365
+
366
+ ## 7.0.2
367
+
368
+ - Check if any of the parent fields (`itemtype`, `item`) is `null`, in which case it won't be treated as a valid parent
369
+ in `AbstractCache.getParentFromFields`
370
+
371
+ ## 7.0.1
372
+
373
+ - Ignore columns in ApiFormatter::hasChanges if the `modified` object does not contain a value for it.
374
+
375
+ ## 7.0.0
376
+
377
+ - **Breaking**: Remove `enableChangesWatcher` and `disableChangesWatcher` in `TransactionCache`.
378
+ - Fetch lock token in `TransactionItemHandler.processItemEntryChanges`.
379
+
380
+ ## 6.3.10
381
+
382
+ - Only call `onRemove` of a collection if there are actually any items removed
383
+ - Expand cached columns anyways if there are no items to expand in `TransactionCachedQueryHandler.__expandCachedQuery`
384
+
385
+ ## 6.3.9
386
+
387
+ - Fixed a bug where deleted local items would still appear as unsaved changes
388
+
389
+ ## 6.3.8
390
+
391
+ - Always fetch 'id' and 'permissions' columns so that they are always available
392
+
393
+ ## 6.3.7
394
+
395
+ - Fixed a bug where items in a socket message that _might_ fit (`MAYBE`) in a collection would not be checked/added.
396
+
397
+ ## 6.3.6
398
+
399
+ - Fixed a bug where `AbstractCache.fetchUpdatedDerivedValuesFromDelta` would attempt to use ItemChanges not cached on
400
+ the transaction resulting in an error
401
+
402
+ ## 6.3.5
403
+
404
+ - Fixed a bug where after creating items derived values would needlessly be refetched
405
+
406
+ > 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
407
+
408
+ - Fixed a bug where ItemEntry's would not be re-cached under their new ItemIds
409
+
410
+ ## 6.3.4
411
+
412
+ - Fixed a bug where already cached itemEntries would not properly be detected when calling `ServerCache.processResponse`
413
+ - Fixed a bug where calling `CreatedChangesDelta.remove` would add `empty` values in the array instead of removing the
414
+ entry
415
+
416
+ ## 6.3.3
417
+
418
+ - Fixed a bug where local ItemEntries were not properly updated after saving
419
+
420
+ ## 6.3.2
421
+
422
+ - Fixed updating item entry itemId field after processing changes
423
+
424
+ ## 6.3.1
425
+
426
+ - Fixed a bug where query with a local ID would do a request to the server
427
+
428
+ ```
429
+ // This example should now no longer do a request
430
+ transaction.getItemsByQuery(
431
+ 'Tijd',
432
+ {
433
+ project: -11,
434
+ }
435
+ );
436
+ ```
437
+
438
+ ## 6.3.0
439
+
440
+ - Allow strict typing of `FieldMap`
441
+
442
+ ## 6.2.5
443
+
444
+ - Remove overwriting itemType with itemType of rootItem during create
445
+
446
+ ## 6.2.4
447
+
448
+ - Fixed a bug where items would not appear in a collection after changes propagated from a parent transaction
449
+
450
+ ## 6.2.3
451
+
452
+ - Fixed a bug where `previous` would actually contain new values because the `previous` object was made after the values
453
+ were already synced
454
+
455
+ ## 6.2.2
456
+
457
+ - Fixed a bug in syncing of initial values after saving an item causing the item to still be marked having changes
458
+
459
+ ## 6.2.1
460
+
461
+ - Fixed a bug where `ItemEntry`s created on the `ServerCache` where not matched on child `TransactionCache`s
462
+
463
+ ## 6.2.0
464
+
465
+ - Fixed a bug where synchronous validators would leave the validator in `pending` state
466
+ - Only re-match items when values are actually changed
467
+ - Removed `defered` from `CachedQueryItem` and added `resolve` and `reject`
468
+ - Check if ItemEntries are already created before creating new ones, if that is the case treat it like an update
469
+
470
+ > What could happen was that a faster request created an ItemEntry for the same item as another request
471
+ > which caused the double creation of an ItemEntry
472
+
473
+ ## 6.1.3
474
+
475
+ - Add `isPending` function to `TransactionValidator`
476
+ - `TransactionCache`s will now be invalid until all pending transaction validators are done
477
+
478
+ ## 6.1.2
479
+
480
+ - Check if an error key exists before deleting it in `TransactionCache.clearItemError`
481
+
482
+ ## 6.1.1
483
+
484
+ - Correctly pass `ErrorHandlerInterface` to `ChangesDeltaFactory`.
485
+
486
+ ## 6.1.0
487
+
488
+ - Return `ChangesDelta` instance in `setItemUpdated`, `setItemDeleted`, `setItemsDeleted` methods, and a promise that
489
+ resolves to the instance in `setItemCreated` and `setItemsCreated`.
490
+
491
+ ## 6.0.2
492
+
493
+ - Update `query` parameter of `getByQuery`, `getLocalByQuery`, `batchGetLocalByParent`, and `matchQuery` in `ItemCache`.
494
+
495
+ ## 6.0.1
496
+
497
+ - Fixed a bug where a local item wouldn't be found when using `TransactionCache.getItemByState` on a child transaction
498
+
499
+ ## 6.0.0
500
+
501
+ - Refactored query caching structure
502
+ - Properly implemented `limit` in collections
503
+ - Removed extending of collections
504
+
505
+ ## 5.0.1
506
+
507
+ - Add 'icon' column type to non-selectable column types
508
+
509
+ ## 5.0.0
510
+
511
+ - Fixed a bug where created, creator and permissions was always set to default values
512
+ - **Breaking:** Remove `onItemsCreated` collection callback.
513
+
514
+ ## 4.0.4
515
+
516
+ - Fixed a bug where ModuleChangesCompilation wouldn't include all changes
517
+
518
+ ## 4.0.3
519
+
520
+ - Local collections are now correctly identified when using a local ID in a linkTo request instead of the `parent`
521
+ option
522
+ - Fix issue where local collection entries were not moved to server cache after save.
523
+
524
+ ## 4.0.2
525
+
526
+ - Fixed a bug where clearing collections would error after saving a transaction
527
+
528
+ ## 4.0.1
529
+
530
+ - Remove thrown error in `ItemResource.callOnChange`
531
+
532
+ > The frontend still relied on this and we won't refactor that at this point
533
+
534
+ ## 4.0.0
535
+
536
+ - Removed `ItemResourceOptions.onChange`, this is replaced by `TransactionCache.registerFieldChangeCallback`
537
+
538
+ > Because the `onChange` is no longer stored on the ItemResource, the ItemResource doesn't have to be cached.
539
+ > This way you don't have to call `ItemResource.clearResource` anymore (you do need to deregister the fieldChange callbacks)
540
+
541
+ ## 3.1.0
542
+
543
+ - **Breaking:** Remove `fields` property, add `getFields` method in `Template` class.
544
+ - **Breaking:** Add `ConversionMapService`. Update `updateItemValues` to take a `source` and `destination` parameter.
545
+ - Update `entry.itemId` for items created items in `TransactionCache.getDelta`.
546
+
547
+ > This fixes an issue with updating IDs of local items.
548
+
549
+ - Add dependency interfaces for `AbstractCache`, `ServerCache`, `TransactionCache`, `TransactionCollectionHandler`
550
+ , `TransactionItemHandler`.
551
+ - Add `CreatedChangesDelta` class, which replaces the `created` component of the `ChangesDelta` and includes some query
552
+ methods. Add `isEmpty` method to `ChangesDelta`.
553
+
554
+ ## 3.0.1
555
+
556
+ - Fixed a bug where the `StateKeyType` enum couldn't be used when imported
557
+
558
+ ## 3.0.0
559
+
560
+ - Remove ViewResource, EditResource, CollectionViewResource and CollectionEditResource
561
+
562
+ > There was no real distinction between them anymore since the core 2.0 update.
563
+ > You can now use the base ItemResource and CollectionResource types instead
564
+
565
+ ## 2.4.0
566
+
567
+ - Update Typescript version to `3.7.2`, also update other plugins
568
+
569
+ ## 2.3.0
570
+
571
+ - Add callbacks when errors are set/cleared to `TransactionEventHandler`
572
+ - Added the possibility to differentiate between errors to display below a field and on the save button
573
+ in `TransactionValidator`
574
+ - Changed the format of the error translations from `string` to `() => string` in `TransactionValidator`
575
+
576
+ > Now the translation function will only be called when the error is actually set, not when it's cleared
577
+
578
+ ## 2.2.1
579
+
580
+ - Fixed a bug where resolving derived values for new items (in `TransactionCache.applyChangesDelta`) would sometimes
581
+ error
582
+
583
+ ## 2.2.0
584
+
585
+ - `ChangesDelta.setItem(s)Created` will now accept incomplete input values
586
+
587
+ > It will now fetch a template for you and process the items, so you no longer need to do that yourself
588
+
589
+ ## 2.1.2
590
+
591
+ - Fixed a bug where deleted ItemEntries weren't picked up when detecting transaction changes
592
+
593
+ ## 2.1.1
594
+
595
+ - Fixed a bug where an ItemEntry's errors wouldn't be deleted when the ItemEntry was deleted on a transaction
596
+
597
+ ## 2.1.0
598
+
599
+ - Refactor `TransactionCache.getItemsByQuery` to check cached entries (just like a collection)
600
+ - Add `TransactionValidator`, allow passing of a `TransactionValidatorFactory` to a transaction
601
+
602
+ > You can use these validators to set errors using `setItemError` and `setGlobalError`
603
+
604
+ - Fixed a bug where `TransactionItemHandler.cloneItemEntry` could only clone entry with changes on the target
605
+ transaction.
606
+
607
+ > It will not look for changes recursively on the transaction change
608
+
609
+ ## 2.0.19
610
+
611
+ - Ensure all requestColumns for newly created ItemEntries from a template are available
612
+ - Ensure derived values for newly created ItemEntries from a template are available
613
+
614
+ ## 2.0.18
615
+
616
+ - Include read-only columns when detecting changes in TransactionItemHandler.processItemEntryChanges
617
+
618
+ > 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`
619
+
620
+ ## 2.0.17
621
+
622
+ - Fixed a bug where deleting an item that isn't in the transaction's item entry cache would result in an error
623
+ - Fixed a bug where response columns weren't set for newly created local CollectionEntries
624
+ - Fixed a bug where items weren't matched for newly created local CollectionEntries
625
+
626
+ ## 2.0.16
627
+
628
+ - Fixed a bug where queries with a link to a local parent item weren't updated on save
629
+
630
+ ## 2.0.15
631
+
632
+ - Cache ItemEntries that fit collections on the CollectionEntry's query instead of the CollectionEntry's id
633
+ - Add a 'hint' to ChangesDeltas which allows skipping the extra request to validate `maybe` query matches
634
+ - Create transaction changes for ItemEntry updates in the changesDelta if non exist yet when
635
+ calling `TransactionCache.applyChangesDelta`
636
+
637
+ > This allows you to update values on a transaction without having to fetch a resource for it by calling
638
+ > `ChangesDelta.setItemUpdated()`
639
+
640
+ ## 2.0.14
641
+
642
+ - Fixed reading of derived values in `getItemIdByColumn` when a ChangesDelta is passed
643
+
644
+ ## 2.0.13
645
+
646
+ - Fixed a bug where the incorrect fields where applied to the ChangesDelta in `TransactionItemHandler.cloneItemEntry`
647
+ - A RequestBuffer's promise will now resolve after the ServerCache.processResponse promise is done, ensuring all values
648
+ are present before continuing
649
+ - Request columns for the request ItemType will now properly be taken into account in ServerCache.processResponse
650
+ ensuring root columns are always properly set. (This is used to update derived values)
651
+
652
+ ## 2.0.12
653
+
654
+ - Fixed a bug where created changes weren't copied to the itemchanges
655
+ - Only take readonly parent columns instead of all readonly columns in `ApiFormatter.hasChanges`
656
+ - Fixed a bug where ItemEntry's where still in `ItemCache.entriesByEntryId` after clearing them
657
+
658
+ ## 2.0.11
659
+
660
+ - Fixed a bug where changes weren't copied to the itemchanges
661
+ - Fixed correct isCalledAfterApiSave values on calls to ServerCache.processResponse
662
+
663
+ ## 2.0.10
664
+
665
+ - Construct `ColumnSet` with proper `requestColumns` when creating a `Template` with additional columns
666
+
667
+ ## 2.0.9
668
+
669
+ - Properly process linked items from the template request in `TransactionItemHandler.createItems`
670
+
671
+ ## 2.0.8
672
+
673
+ - Fixed a bug where not all fields where available even tough an ItemResource with specific columns was created
674
+
675
+ ## 2.0.7
676
+
677
+ - Define abstract copyTransactionItemEntryChanges on ItemHandlerBase
678
+ - Implement copyTransactionItemEntryChanges on TransactionItemHandler and ServerItemHandler
679
+ - Fix AbstractCache/ServerCache/TransactionCache `getParent` function arguments
680
+
681
+ > With the newly added arguments the function definitions didn't align anymore causing typescript errors
682
+ > Even though the arguments aren't used in the `ServerCache` they're added in there
683
+
684
+ ## 2.0.6
685
+
686
+ - Remove `ApiFormatter.lazyClone`
687
+
688
+ > 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
689
+
690
+ - Create a copy of the child transaction's field instead of copying the object reference
691
+ in `TransactionCache.applyChangeFromChild` and `ChangesProcessor.executeCreateRequest`
692
+
693
+ > When writing to the object references you're changing multiple transactions at once, while this should be handled by applyCHangesFromParent
694
+
695
+ ## 2.0.5
696
+
697
+ - Add `callOnAddWithInitialItems` option to `CollectionResourceOptions`
698
+
699
+ > If `true` the `onAdd` callback will be called with the initial set of items
700
+
701
+ ## 2.0.4
702
+
703
+ - Add `isCalledAfterSocketUpdate` to `onAdd`, `onRemove` and `onChange` callbacks
704
+
705
+ > You can use this if a data change should only trigger an action when the user caused it himself
706
+
707
+ ## 2.0.3
708
+
709
+ - Fix `CollectionEditResource.removeItems`
710
+ - Move `getCurrentCollectionEntryCache` and `getCurrentItemEntryCache` from `TransactionCache` to `AbstractCache`
711
+
712
+ ## 2.0.2
713
+
714
+ - Fix marking entries as deleted and compiling this into a request
715
+
716
+ ## 2.0.1
717
+
718
+ - Expand CollectionEntry's columns in `ServerCollectionHandler.fetchCollectionData`
719
+
720
+ ## 2.0.0 - Major caching refactor
721
+
722
+ - Completely reworked internal caching structure,
723
+ see [this Confluence page](https://rentman.atlassian.net/wiki/spaces/DEV/pages/704872456/) for the motivations behind
724
+ it.
725
+
726
+ ## 1.9.0
727
+
728
+ - Don't create ItemResources when not returning links in `ItemAdministrator.getNewResourceWithId` and
729
+ in `ItemAdministrator.constructOnItemsExpanded`
730
+
731
+ ## 1.8.0
732
+
733
+ - Remove `ResourceCache` and `resourceLevel`
734
+
735
+ > You should now manually call `resource.clearResource` when you no longer need a resource
736
+
737
+ - Add `onConstruct` function to `ItemResource` and `CollectionResource`
738
+
739
+ > This is overwritten by the frontend to track resource creation
740
+
741
+ ## 1.7.6
742
+
743
+ - Add priority parameter to local cache callbacks. The callback condition (`always` / `onClose` / `skipOnClose`) no
744
+ longer has any effect on the order in which the callbacks get executed.
745
+ - **Breaking:** Remove `LocalCacheCallbackCondition` enum.
746
+ - Add `itemId` parameter to `ItemHandler.fetchNewItem`. An error is thrown when an ID already exists.
747
+ Add `getNewResourceWithId` to ItemAdministrator. Deprecate `getItemByState`.
748
+
749
+ ## 1.7.5
750
+
751
+ - For template column sets it is no longer assumed all columns are present. This fixes an issue with incomplete column
752
+ sets in the front-end.
753
+ - Fix issue where `changesProcessor` instance was undefined in `itemResourceFactory` and `collectionResourceFactory`.
754
+ Create variables for each core service in order to get a TypeScript error when a dependency hasn't been initialized
755
+ yet.
756
+
757
+ ## 1.7.4
758
+
759
+ - Add support for strict ItemType type checking in `FieldMap`
760
+
761
+ ## 1.7.3
762
+
763
+ - Add support for strict ItemType type checking
764
+
765
+ > This is temporarily defaulted to `any` to prevent compile errors in the frontend
766
+
767
+ ## 1.7.2
768
+
769
+ - Fix some typing issues in:
770
+ - ApiResponseProcessor
771
+ - ItemCache
772
+ - KeyService
773
+
774
+ ## 1.7.1
775
+
776
+ - Fix issue where `CreateRequestFactory` would be undefined in `ChangesProcessor`.
777
+
778
+ ## 1.7.0
779
+
780
+ - **Breaking:** remove `ChangesProcessorFactory`. Add `ChangesProcessor` instance to core directly.
781
+
782
+ ### Resource caching
783
+
784
+ - **Breaking:** the following properties are removed:
785
+ - On `ItemEntry`: `clearResources`, `deactivateResources`.
786
+ - On `CollectionEntry`: `clearResources`, `getCurrentResource`.
787
+ - On `CollectionResourceOptions`: `clearOnTabChange`, `clearOnSubTabChange`.
788
+ - An additional `level` parameter has been added to all methods that return resources.
789
+ - When creating resources using `ItemResourceFactory` or `CollectionResourceFactory`, this parameter is mandatory.
790
+ A `defaultResourceLevel` parameter has been added to the `LocalCache` constructor.
791
+ - A `clearResources` method has been added to `ItemAdministrator`. When calling this method, all item / collection and
792
+ collection resources with a level of `level` or higher will be removed.
793
+ - The `clearResources` method has been removed from `LocalCache`.
794
+ - The `setCurrentLocalCache` function has been removed from `LocalCacheManagerInterface`.
795
+
796
+ ## 1.6.13
797
+
798
+ - When encountering a collection entry with `PROMISED_EXPAND` status, call `getCachedEntryStatus` after the initial
799
+ promise has been resolved.
800
+
801
+ > This is the likely cause of the issue where `_resolve` is called on a non-deferred collection entry.
802
+
803
+ ## 1.6.12
804
+
805
+ - Fix error that occurs when trying to resolve a non-deferred collection entry.
806
+
807
+ ## 1.6.11
808
+
809
+ - Fix issue where `QueryMatcher.matchComplexQuery` would return the wrong value.
810
+
811
+ ## 1.6.10
812
+
813
+ - **Breaking**: Remove `linkType`, `linkIdArray` properties from `LinkCollectionDefinition`. Add `linkType`,
814
+ `linkIdArray` parameters to `ItemAdministrator.getLinkCollectionsFromDef`.
815
+
816
+ ## 1.6.9
817
+
818
+ - Redeploy of `1.6.8`
819
+
820
+ ## 1.6.8
821
+
822
+ - Add support for `not` in queries
823
+
824
+ ## 1.6.7
825
+
826
+ - Fix issue where `CollectionMatcher.addToCollections` wouldn't return the correct type.
827
+
828
+ ## 1.6.6
829
+
830
+ - Add `callOnAdd` parameter in `CollectionHandler.batchExtend`. Set `updateInitial` to true. Remove `updateInitial`
831
+ parameter in `CollectionEntry.extend`, as it should always be true.
832
+
833
+ > The `extend` function only concerns itself with remote items, so no local changes should be generated.
834
+
835
+ ## 1.6.5
836
+
837
+ - Fix issue where a derived column could be marked as the `link` (parent) column in the column set.
838
+
839
+ > This could lead to instances where a different column would be set to the value of the parent.
840
+
841
+ ## 1.6.4
842
+
843
+ - Fix issue where the `onChange` collection callback would not be called when updating it in the options.
844
+ - Add `callOnAdd` parameter to collection matcher. When set to `false`, `onAdd` is not called for
845
+ the `resultCollectionResource`.
846
+
847
+ ## 1.6.3
848
+
849
+ - Properly type ApiResponseProcessor - fetchObjectArray
850
+
851
+ ## 1.6.2
852
+
853
+ - Fix issue where the collection handler would return collection entries before they were resolved when
854
+ calling `batchFetch`.
855
+
856
+ ## 1.6.1-3
857
+
858
+ - Check for linkedTo before checking for subqueries in QueryMatcher
859
+
860
+ > Linkedto also has `.query` and was incorrectly marked as a subquery
861
+
862
+ ## 1.6.1-2
863
+
864
+ - Fixed shorthand query with null values
865
+
866
+ > The QueryParser would incorrectly identify subqueries when using null in a shorthand
867
+
868
+ ## 1.6.1-1
869
+
870
+ - Fixed shorthand query with Moment values
871
+
872
+ > The QueryParser would incorrectly identify Moment objects as a subquery
873
+
874
+ ## 1.6.1
875
+
876
+ - Added support for subqueries in QueryParser and QueryMatcher
877
+
878
+ > Collections using subqueries will always return 'maybe' in the QueryMatcher
879
+
880
+ ## 1.6.0
881
+
882
+ - All external callbacks are now wrapped in a `try ... catch` block. This prevents them from breaking core
883
+ functionality.
884
+ - **Breaking**: Add `ExceptionHandlerInterface` parameter to core constructor.
885
+
886
+ ## 1.5.9
887
+
888
+ - Fix issue that occurs when trying to resolve a `ColumnSet` using a single non-existing column. Catch exceptions that
889
+ might occur when resolving an `ItemEntry`.
890
+ - Add `mergeRequestColumns`, `mergeResponseColumns` to `ColumnSet`. When encountering new items while expanding a
891
+ collection, add them to the collection.
892
+
893
+ ## 1.5.8
894
+
895
+ - Introduce `RemoteViewResource` and `LocalViewResource`.
896
+
897
+ > The `fields` property of a `RemoteViewResource` represents server values, while the `fields` property of a `LocalViewResource` represents local values.
898
+
899
+ - The `fields` property of a `ViewResource` is now read only.
900
+
901
+ ## 1.5.7-1
902
+
903
+ - Make ItemResource/CollectionResource base class abstract
904
+ - Add missing overload functions in some places
905
+ - Fix default comparator `QueryMatcher.parseSimpleQuery`
906
+ - Fix `ExtendedCollectionMatchResult` `collection` property type
907
+
908
+ ## 1.5.7
909
+
910
+ - Properly type Collections & ItemResources (and return values) in the whole core.
911
+
912
+ > The core will now properly return Collections & ItemResources based on the passed CollectionOptions.
913
+ > You can now also type the expected collection type
914
+
915
+ ```
916
+ // Expects a collection with editCollection and editItems both `true`
917
+ // Will properly return EditResources for all collection functions
918
+ const collection: CollectionEditResource<EditResource>;
919
+
920
+ // other variations are:
921
+ // CollectionViewResource<ViewResource>
922
+ // CollectionViewResource<EditResource>
923
+ // CollectionEditResource<ViewResource>
924
+
925
+ this.core.itemAdministrator.getCollection(
926
+ 'Notitie',
927
+ {
928
+ editCollection: true, // Will return a CollectionEditResource
929
+ editItems: true // Will return EditResources instead of ViewResources in `.items`
930
+ }
931
+ )
932
+ ```
933
+
934
+ ## 1.5.6
935
+
936
+ - Add `getAllLocalCaches` to `LocalCacheManagerInterface`, remove item entries from all local caches on socket delete.
937
+
938
+ ## 1.5.5
939
+
940
+ - Add 'order' column type handling to ApiFormatter functions
941
+
942
+ ## 1.5.4
943
+
944
+ - Fix issue where parent would be incorrectly set when cloning a single item.
945
+ - Type functions related to expansion maps in `ItemEntryService`.
946
+
947
+ ## 1.5.3
948
+
949
+ - Fix issue where the `enableSave` collection resource option would default to `false`. This would throw an error when
950
+ calling `save` on a collection resource where this option was not explicitly set.
951
+
952
+ ## 1.5.2
953
+
954
+ - Type functions in `ColumnUtil` class.
955
+ - Add `getRequestColumnId` and `containsDerivedColumns` to `ColumnUtil`.
956
+
957
+ > `getRequestColumnId` should be used instead of `Util.getFirstProperty` when retrieving a column ID.
958
+
959
+ - **Breaking:** Remove `ColumnUtil.isColumnSubset`. Use `ColumnSet.isSuperSetOf` instead.
960
+ - Remove `findColumnObject`. Rename `findColumn` to `findRequestColumn`.
961
+
962
+ ## 1.5.1
963
+
964
+ - Properly remove item entry stub from (local) cache when request fails.
965
+ - Fix issue where item or collection options could be set to undefined.
966
+
967
+ ## 1.5.0
968
+
969
+ - Add `SocketMessage` type and add types to `SocketMessageHandler`
970
+ - Expand local items requested using `getItemById` or `getItemsById` in `ItemAdministrator`.
971
+ (`fetchItem` or `fetchItems` in `ItemHandler`.)
972
+ - Implement expanding of local collections. This no longer leads to invalid requests.
973
+ - **Breaking:** The `expand` function in `CollectionEntry` now has an `ItemCache` parameter.
974
+ - **Warning:** This version contains major changes.
975
+
976
+ ### Introduce typing of item and collection options
977
+
978
+ - **Breaking:** Removed `QueryItemType` collection entry option.
979
+ - **Breaking:** Removed `ItemResourceService`.
980
+ - Removed `processOptions` parameter from `createCollectionResource` (`ItemAdministrator`). It is now equivalent to
981
+ `addCollection`.
982
+ - When creating an item resource using `ItemResourceFactory`, a collection entry using `CollectionResourceFactory` or a
983
+ collection resource using `CollectionResourceFactory` it is no longer necessary to process options beforehand. It is
984
+ still necessary when interacting with `CollectionHandler` or `ItemHandler` directly.
985
+
986
+ ## v1.4.0
987
+
988
+ - Add `expandProcessLinkedItems` and `expandAddToCollections` to `ItemAdministrator`. These are analogues to
989
+ `processLinkedItems` and `addToCollections`, but also expand the items with (derived) values and columns as necessary.
990
+ They have a slightly different type signature.
991
+ - Whenever a collection is requested, the `CollectionHandler` now makes sure that added local items are expanded as
992
+ necessary.
993
+ - **Breaking:** Last parameter of `ItemHandler.createLocalEntries` is now a callback function.
994
+ - **Breaking:** Rename `TemplateLinkedItemEntryMap` type to `TemplateItemEntryMap`.
995
+
996
+ ## v1.3.8
997
+
998
+ - Add `isSaving` to `LocalCache`
999
+
1000
+ > We use this to disable the cancel/save buttons while the localCache is saving in the frontend
1001
+
1002
+ ## v1.3.7
1003
+
1004
+ - Fix issues that generate invalid requests / changes when moving existing item to another collection, then deleting the
1005
+ parent.
1006
+ - Remove slip workarounds
1007
+ - Add api request types
1008
+ - Add types to `ModuleChangesCompilation`
1009
+
1010
+ ## v1.3.6
1011
+
1012
+ - Skip add / remove collection callbacks when calling `revertChanges` (`LocalCache`).
1013
+
1014
+ ## v1.3.5
1015
+
1016
+ - Fix issue where items added to collections when resolving wouldn't be removed in `revertChanges` (`LocalCache`).
1017
+
1018
+ ## v1.3.4
1019
+
1020
+ - Add country to isFilteredColumn in ColumnUtil
1021
+
1022
+ ## v1.3.3
1023
+
1024
+ - Move processLocalConfigColumns and consolidateColumns from ColumnUtil to frontend
1025
+
1026
+ > These functions are specifically used for rendering ui-grid in the frontend, so there's no reason to have them in the core
1027
+
1028
+ ## v1.3.2
1029
+
1030
+ - Fix types path in package.json
1031
+
1032
+ ## v1.3.1
1033
+
1034
+ - Fix types path in package.json
1035
+
1036
+ ## v1.3.0
1037
+
1038
+ - Rename PromiseInterface to PromiseLibraryInterface
1039
+
1040
+ > PromiseInterface is now used for the internal promise type
1041
+
1042
+ - Use PromiseInterface instead of Promise as internal promise type
1043
+
1044
+ > This allows us to overwrite the PromiseInterface definition in the frontend indicate usage of ng.IPromise
1045
+
1046
+ ## v1.2.9
1047
+
1048
+ - Call processOptions in fetchDerivedValuesByColumn
1049
+
1050
+ > Bug was introduced earlier but got enabled in v1.2.7
1051
+
1052
+ ## v1.2.8
1053
+
1054
+ - Add toJSON methods for ItemResources, ItemEntries, and ColumnSets to fix circular dependencies in JSON.stringify
1055
+
1056
+ ## v1.2.7
1057
+
1058
+ - Set itemEntry parent when generating a stub
1059
+
1060
+ ## v1.2.6
1061
+
1062
+ - Fix an issue introduced in v1.2.5.
1063
+
1064
+ ## v1.2.5
1065
+
1066
+ - When a local item cannot by found, return a newly created item in `getItemByState` (`ItemAdministrator`) only. This
1067
+ solves an issue with refreshing on a local edit view.
1068
+
1069
+ ## v1.2.4
1070
+
1071
+ - **Breaking:** When a local item cannot by found, instead of a new item being created an error is thrown. This means it
1072
+ is no longer possible to create local items using `getItemById` or `getItemsById` in the `ItemAdministrator` class.
1073
+ - **Breaking:** Removed `getItemDefinition` and `getItemByDef` in the `ItemAdministrator` class. Added `getItemByState`.
1074
+ - Renamed types `TemplateResponseItemEntryMap` to `TemplateItemEntryMap` and `TemplateResponseLinkedItemEntryMap` to
1075
+ `TemplateLinkedItemEntryMap`.
1076
+ - Removed `getCollectionCacheKey` in `KeyService`. (Legacy code.)
1077
+
1078
+ ## v1.2.3
1079
+
1080
+ - Fixed issue where derived values deeper than one layer couldn't be resolved.
1081
+
1082
+ ## v1.2.2
1083
+
1084
+ - Fixed issue where in derived values weren't set after create request.
1085
+
1086
+ ## v1.2.1
1087
+
1088
+ - **Breaking:** Replaced the `initial` parameter with the `callOnChange` parameter (`true` by default) in the `commit`
1089
+ function of the `EditResource` class.
1090
+ - Fixed issue in `setLocalFields` (`ItemEntry`) where some values were wrongly assumed to be present in `initialValues`.
1091
+ - Optimization: Disabled automatic resolution of derived values in `addItems` (`CollectionEditResource`)
1092
+ when `modInstant` is set to true.
1093
+
1094
+ ## v1.2.0
1095
+
1096
+ - **Breaking:** When calling `addItems` or `addItem` on the `CollectionEditResource` class derived values are now
1097
+ resolved automatically. Instead of a compound object like `{fields: {key: 'value'}, derived: {}}` an object like
1098
+ `{key: 'value'}` should now be used as argument when calling these functions.
1099
+ - **Breaking:** Added `localCache` parameter to `CollectionResource` constructor.
1100
+
1101
+ ## v1.1.20
1102
+
1103
+ - Fixed minor issue where collection wouldn't be deferred properly before expanding.
1104
+ - `onChange` is now called automatically when when calling `commit` on an edit resource.
1105
+
1106
+ ## v1.1.19
1107
+
1108
+ - **Breaking:** Renamed `getCurrentChanges` to `getModuleChanges` in the `ItemAdministrator` class. Added optional
1109
+ `localCache` parameter.
1110
+
1111
+ ### Local cache callback refactoring
1112
+
1113
+ - Removed `onSaveWithoutClosing` event.
1114
+ - Added `condition` parameter to `onBeforeSave` and `onSaveSuccess` (possible values are `always`, `onClose` or
1115
+ `skipOnClose`, defaults to `always`). Callbacks registered with `condition: always` will get executed before other
1116
+ callbacks.
1117
+ - Pass the local cache itself to all registered callback functions. Pass the item ID conversion map as second argument
1118
+ to `onSaveSuccess` callback functions.
1119
+
1120
+ ## v1.1.18
1121
+
1122
+ - Calling `expand` on a `CollectionEntry` manually no longer defers the collection entry.
1123
+ - The `batchFetch` and `batchExpand` functions in the `CollectionHandler` class now properly defer and resolve the
1124
+ collection entries.
1125
+
1126
+ ## v1.1.17
1127
+
1128
+ - Fixed issue where the `getLocalByQuery` function in the `ItemCache` class wouldn't return any items.
1129
+ - When batch resolving collection entries, `CollectionHandler` now looks for matching items using `getByQuery` instead
1130
+ of `getByParent`.
1131
+
1132
+ ### Cache invalidation
1133
+
1134
+ - Added `queueReload` function to `ItemEntry` class. This will reload the item when the item entry itself or a
1135
+ collection entry containing the item is requested.
1136
+ - The `queueReload` function in the `CollectionEntry` class no longer directly defers the item.
1137
+ - Added `invalidateCache` function to the `ItemAdministrator` class. This will call `queueReload` on all item entries
1138
+ and collection entries.
1139
+
1140
+ ### Item entry refactoring
1141
+
1142
+ - Renamed `process` to `setFields`.
1143
+ - Replaced `processLocal` with `setLocalFields`. This function no longer has a `modified` parameter.
1144
+ - `setModified` now also sets local default values.
1145
+ - Removed `setCreator`. This function was called twice in some instances.
1146
+ - **Breaking:** Added `derived` parameter to `updateFields`
1147
+
1148
+ ## v1.16
1149
+
1150
+ - Pass `hasChanges` as second argument to `onBeforeSave` callbacks in the `LocalCache` class. This fixes an issue with
1151
+ project financial values in the front-end. [RM4-9577]
1152
+ - Added `callOnActivate` parameter to `addItems` function in `CollectionEditResource` class. Use this to prevent items
1153
+ from being added to the local cache.
1154
+
1155
+ ## v1.15
1156
+
1157
+ - Fix `fetchItemTypesTranslations` function in `ColumnHandler` class.
1158
+ - Fix type definition of `PromiseInterface.all`.
1159
+
1160
+ ## v1.14
1161
+
1162
+ - The `ChangesCompiler` now always processes local collections. (Even if they don't have edit resources.) This fixes an
1163
+ issue with recurring appointments in the front-end.
1164
+
1165
+ ## v1.13
1166
+
1167
+ - Add option to exclude itemTypes during createLocalEntries.
1168
+
1169
+ ## v1.12
1170
+
1171
+ - **Breaking:** `ItemResource.isNew` returns true *only* if the resource was created using
1172
+ `ItemAdministrator.getNewResource` or `ItemAdministrator.getItemByDef`. This fixes an issue where items where removed
1173
+ from the local cache inadvertently.
1174
+ - The `start`, `commit` and `rollback` functions of `EditResource` now return the resource itself to facilitate
1175
+ chaining.
1176
+ - When calling `CollectionEntry.revertChanges`, callbacks like `onAdd` / `onRemove` and `onActivate` / `onDeactivate`
1177
+ are now respected. This fixes an issue where items where *not* removed from the local cache.
1178
+ - When removing *local* items from collections, they are removed from `initial` as well as `modified`. This fixes an
1179
+ issue where changes were being detected continuously.
1180
+ - Updated the order of requests in `changesProcessor`. The `update` request is now executed before the `delete` request,
1181
+ except when updating documents. This fixes several issues.
1182
+ - `CollectionCache` now uses a map instead of an array to store collections. This fixes an issue where the same
1183
+ collection was added multiple times.
1184
+ - Updated all models to use dependency objects. This increases ease of debugging.
1185
+
1186
+ ## v.1.11
1187
+
1188
+ - Fixed issue that occurs when saving when having an existing item refer to a newly created item.
1189
+ - **Breaking:** Removed `ItemResourceService.isNewResource`.
1190
+ - **Breaking:** Renamed `ItemResource.isNewResource` to `ItemResource.isNew`. Removed parameter.
1191
+ - `ItemResource.isNew` is equivalent to `ItemResource.isLocal`, while `EditResource.isNew` checks also checks for
1192
+ completed transactions.
1193
+
1194
+ ## v.1.10
1195
+
1196
+ - Fixed issue where changes on different subtabs were not detected.
1197
+
1198
+ ## v1.1.9
1199
+
1200
+ - Exposed `noop` function on `RmCore` class.
1201
+
1202
+ > This is used in order to check whether a callback has a default value.
1203
+
1204
+ - Added `copyRequestColumns` function to `ColumnUtil` class.
1205
+ - Made parameters of `ItemAdministrator.saveCurrentLocalCache` and `LocalCache.save` optional.
1206
+ - **Breaking:** Reordered parameters of `ChangesProcessor.execute` to be consistent with
1207
+ `ItemAdministrator.saveCurrentLocalCache`. The new order is `singleItems` - `collections` - `parameters` -
1208
+ `breakUpByParent` - `onAfterCreateCallback`.
1209
+
1210
+ ## v1.1.8
1211
+
1212
+ - Set default value for `params` to `{filter: false}` in `request` function in `ColumnHandler` class.
1213
+
1214
+ ## v1.1.7
1215
+
1216
+ - Fixed issue where cached item entries or collection entries wouldn't be added to the local cache.
1217
+
1218
+ ## v1.1.6
1219
+
1220
+ - Fixed issue with deferred item entries.
1221
+ - Re-enable changes watcher after save.
1222
+ - Added optional `id` parameter to `LocalCache` constructor.
1223
+
1224
+ ## v1.1.5
1225
+
1226
+ - Added `clearItem` function to `LocalCache` class.
1227
+
1228
+ ## v.1.1.4
1229
+
1230
+ - Fix issue where items where not added to the local cache automatically when they where added to a collection.
1231
+
1232
+ > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add the items to the local cache.
1233
+ > In other instances this might be debatable because it doesn't do any real harm. *Not*
1234
+ doing it however can definitely be harmful.
1235
+
1236
+ ## v.1.1.3
1237
+
1238
+ - Fixed an issue where all collections in a local cache would be cleared.
1239
+ - **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
1240
+ `LocalCacheManagerInterface`.
1241
+
1242
+ ## v1.1.2
1243
+
1244
+ - Fixed an issue concerning derived values.
1245
+
1246
+ ## v1.1.1
1247
+
1248
+ - Fixed an issue where changes wouldn't be detected.
1249
+ - **Breaking:** Removed the `_hasChanges` function in the `localCache` class. If you want to force changes detection,
1250
+ call `detectChanges` instead. Otherwise, rely on the `hasChanges` variable.
1251
+ - **Breaking:** Removed the `enableWatcher` and `disableWatcher` functions. Use `enableChangesWatcher` and
1252
+ `disableChangesWatcher` instead.
1253
+
1254
+ ## v1.1.0
1255
+
1256
+ ### Development
1257
+
1258
+ #### Strict TypeScript compilation
1259
+
1260
+ Added the following TypeScript compiler options:
1261
+
1262
+ - noImplicitThis
1263
+ - noImplicitReturns
1264
+ - strictNullChecks
1265
+ - noUnusedLocals
1266
+ - noUnusedParameters
1267
+
1268
+ I would advise enabling these for all TypeScript projects from now on.
1269
+
1270
+ #### Ordered imports and dependencies
1271
+
1272
+ Imports are now ordered alphabetically and grouped by folder. Added a TSLint option to enforce this. Please note that
1273
+ this also applies for imports from the folder the file is currently in. For example, in `models/ItemResource.ts`
1274
+ , `itemEntry` should be imported like so:
1275
+ `import { ItemEntry } from '../models';`
1276
+
1277
+ Also, factory and class dependencies should be ordered alphabetically as well. This will make it easier to add and
1278
+ remove dependencies in the future.
1279
+
1280
+ ### Breaking changes
1281
+
1282
+ - Renamed `changesCompiler` to `changesCompilation`, `changesCompilerFactory` to `changesCompilationFactory`,
1283
+ `moduleChangesCompiler` to `moduleChangesCompilation` and `moduleChangesCompilerFactory` to
1284
+ `moduleChangesCompilationFactory`.
1285
+ - Removed the `allLinks` parameter from the `query` function definition in the `ApiRequestServiceInterface`. This is no
1286
+ longer supported in the back-end.
1287
+
1288
+ #### Item and collection entries
1289
+
1290
+ - Moved *all* functions that handle item entries from the `ItemEntryService` to the `ItemEntry` class.
1291
+ - Added the following functions to `ItemEntryService`:
1292
+ - `createLocalConversionMap`;
1293
+ - `expandLocalConversionMap`;
1294
+ - `expandConversionMap`;
1295
+ - `batchExpandConversionMap`;
1296
+ - `batchClone`.
1297
+ - Cloning of item entries now works slightly differently. The function will attempt to generate a new item ID, and
1298
+ update the conversion map accordingly, but will respect the item ID that is already there.
1299
+
1300
+ #### Rework item caching
1301
+
1302
+ Newly created item entries and collection entries are no longer added to the global *or* local cache by default. All
1303
+ entries are added to the global cache on save. Item entries are added to the local cache when resources are created
1304
+ using the item administrator or when resources are created when adding the items to a collection.
1305
+
1306
+ > This will increase reliability by ensuring the global cache is no longer 'polluted' with local items. Also, this will
1307
+ > allow for the creation item and collection entries without caching them directly. This is required for the copying and
1308
+ > pasting of items.
1309
+
1310
+ Other changes:
1311
+
1312
+ - Moved `saveLocal` to `ItemAdministrator`;
1313
+ - `ItemAdministrator.fetchTitle` should now be called instead of `ItemHandler.fetchTitle`;
1314
+ - The `ItemAdministrator` collection matching functions (`addToCollections`, `removeFromCollections`) should now be
1315
+ called instead of those in the `CollectionHandler`. The `CollectionHandler` should only be used to reflect changes
1316
+ already on the backend. (Use `getCollectionMatcher`.)
1317
+
1318
+ ## v1.0.33
1319
+
1320
+ - Really fix types path
1321
+
1322
+ ## v1.0.33
1323
+
1324
+ - Fix types path
1325
+
1326
+ ## v1.0.32
1327
+
1328
+ - Update `tsconfig.json` to put definitions in the root folder
1329
+
1330
+ > The app had an issue with AOT compilation because of this
1331
+
1332
+ ## v1.0.31
1333
+
1334
+ - Fix `columnHandler.fetchItemTypeTranslations`
1335
+
1336
+ > It incorrectly looped over the response map, it should now work again
1337
+
1338
+ ## v1.0.30
1339
+
1340
+ - Remove `updateTabParams` from LocalCacheManagerInterface
1341
+
1342
+ > The function wasn't used
1343
+
1344
+ - Reworked class export
1345
+
1346
+ > Imports are now done from @rentman/rm-core, old imports are broken. This is because the old export structure didn't always work
1347
+
1348
+ ## v1.0.29
1349
+
1350
+ - Fix inverted inArray check in CollectionEntry.removeItems
1351
+
1352
+ > A delete message from the socket deleted all BUT the deleted items, this should now be fixed
1353
+
1354
+ ## v1.0.28
1355
+
1356
+ Bug fixes only
1357
+
1358
+ ## v1.0.27
1359
+
1360
+ - `ItemEntry.initial` is now undefined by default
1361
+
1362
+ > In the SocketMessageHandler we use this check to see if an ItemEntry is a stub
1363
+
1364
+ ## v1.0.26
1365
+
1366
+ Bundle both minified and unminified code, include sourcemaps from dev build
1367
+
1368
+ ## v1.0.24, v1.0.25
1369
+
1370
+ ! Use version `v1.0.26` !
1371
+
1372
+ - The core now expects a `promiseInterface` that should implement the provided `promiseInterface`
1373
+
1374
+ > We need to be able to hook into the promises in order to call a digest cycle to update the ui in the frontend
1375
+
1376
+ - Rename `ItemEntry.entryId` to `ItemEntry.id
1377
+
1378
+ > It used to be called `id`, but it was changed in the seperation of the core.
1379
+ > You can use the `id` to uniquely identify an entry, since itemId can be updated (local to saved id)
1380
+
1381
+ - Rename ItemResource `startTransaction` to `start`
1382
+
1383
+ > Other functions are called `commit` and `rollback` so having 'transaction' only for start doesn't make much sense
1384
+
1385
+ - `SocketMessageHandler.onMessageReceived` now returns a promise
1386
+
1387
+ > You can now use the updated items or hook into the result to update the ui for example
1388
+
1389
+ ## v1.0.23
1390
+
1391
+ - Rename ResourceCache to LocalCache
1392
+
1393
+ > LocalCache only caches local items (name better reflects functionality)
1394
+
1395
+ - Remove getter/setter for hasChanges
1396
+
1397
+ > hasChanges is called in a digest loop in the frontend, so for performance reasons we don't want to recompute the value every time
1398
+
1399
+ - Remove `_getCollection` from ItemAdministrator
1400
+
1401
+ > `_getCollection` is now named `getCollection` and the old `getCollection` is removed. The query is part of the
1402
+ > options and should not be given as a separate argument. This was included to support the frontend
1403
+
1404
+ - Remove `saveCurrentTab` from ItemAdministrator
1405
+
1406
+ > `saveCurrentTab` makes no sense because the core has no concept of tabs, you should use `saveCurrentLocalCache` instead
1407
+
1408
+ - Remove `getTabEntry` and `resetTabEntry` from ItemAdministrator
1409
+
1410
+ > `getTabEntry` and `resetTabEntry` make no sense because the core has no concept of tabs, you should use `getLocalCache` and `resetLocalCache` instead
1411
+