@rentman/rm-core 10.1.1 → 11.0.0

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