@rentman/rm-core 10.0.4 → 10.0.6

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