@rentman/rm-core 11.0.2 → 11.0.3

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