@rentman/rm-core 10.1.1 → 11.0.1

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