@rentman/rm-core 10.0.6 → 10.1.0

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