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