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