@rentman/rm-core 4.0.3 → 4.0.4

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 (109) hide show
  1. package/changelog.md +695 -692
  2. package/dist/rm-core.js +9496 -9488
  3. package/dist/rm-core.min.js +2 -2
  4. package/dist/types/classes/ApiFormatter.d.ts +55 -55
  5. package/dist/types/classes/ApiRequestService.d.ts +20 -20
  6. package/dist/types/classes/ApiResponseProcessor.d.ts +31 -31
  7. package/dist/types/classes/ChangesCompilation.d.ts +34 -34
  8. package/dist/types/classes/ChangesDelta.d.ts +59 -59
  9. package/dist/types/classes/ChangesDeltaBase.d.ts +50 -50
  10. package/dist/types/classes/ChangesProcessor.d.ts +47 -47
  11. package/dist/types/classes/CollectionCache.d.ts +38 -38
  12. package/dist/types/classes/CollectionEntryService.d.ts +25 -25
  13. package/dist/types/classes/CollectionMatcher.d.ts +9 -9
  14. package/dist/types/classes/CollectionMatcherBase.d.ts +26 -26
  15. package/dist/types/classes/CollectionResourceService.d.ts +6 -6
  16. package/dist/types/classes/ColumnCache.d.ts +21 -21
  17. package/dist/types/classes/ColumnExpansion.d.ts +22 -22
  18. package/dist/types/classes/ColumnHandler.d.ts +21 -21
  19. package/dist/types/classes/ColumnInfo.d.ts +14 -14
  20. package/dist/types/classes/ColumnSet.d.ts +39 -39
  21. package/dist/types/classes/ColumnSubsetCache.d.ts +8 -8
  22. package/dist/types/classes/ColumnUtil.d.ts +99 -99
  23. package/dist/types/classes/ConversionMapService.d.ts +27 -27
  24. package/dist/types/classes/CreateRequest.d.ts +19 -19
  25. package/dist/types/classes/CreatedChangesDelta.d.ts +15 -15
  26. package/dist/types/classes/InternalChangesDelta.d.ts +39 -39
  27. package/dist/types/classes/ItemCache.d.ts +29 -29
  28. package/dist/types/classes/ItemCreateService.d.ts +24 -24
  29. package/dist/types/classes/ItemEntryService.d.ts +34 -34
  30. package/dist/types/classes/KeyService.d.ts +16 -16
  31. package/dist/types/classes/LockService.d.ts +32 -32
  32. package/dist/types/classes/ModuleChangesCompilation.d.ts +18 -18
  33. package/dist/types/classes/QueryColumnExtractor.d.ts +20 -20
  34. package/dist/types/classes/QueryLocalLinkedToParser.d.ts +17 -17
  35. package/dist/types/classes/QueryMatcher.d.ts +14 -14
  36. package/dist/types/classes/QueryParser.d.ts +25 -25
  37. package/dist/types/classes/QueryParserBase.d.ts +29 -29
  38. package/dist/types/classes/QueryService.d.ts +17 -17
  39. package/dist/types/classes/RequestBuffer.d.ts +28 -28
  40. package/dist/types/classes/RequestBufferManager.d.ts +24 -24
  41. package/dist/types/classes/RequestColumnExpansion.d.ts +15 -15
  42. package/dist/types/classes/SocketMessageHandler.d.ts +31 -31
  43. package/dist/types/classes/TemplateCache.d.ts +66 -66
  44. package/dist/types/classes/Util.d.ts +30 -30
  45. package/dist/types/classes/cache/AbstractCache.d.ts +101 -101
  46. package/dist/types/classes/cache/CollectionHandlerBase.d.ts +68 -68
  47. package/dist/types/classes/cache/CollectionMatcherCacheProcessor.d.ts +26 -26
  48. package/dist/types/classes/cache/ItemHandlerBase.d.ts +95 -95
  49. package/dist/types/classes/cache/server/ServerCache.d.ts +83 -83
  50. package/dist/types/classes/cache/server/ServerCollectionHandler.d.ts +44 -44
  51. package/dist/types/classes/cache/server/ServerItemHandler.d.ts +51 -51
  52. package/dist/types/classes/cache/transaction/TransactionCache.d.ts +336 -336
  53. package/dist/types/classes/cache/transaction/TransactionCollectionHandler.d.ts +62 -62
  54. package/dist/types/classes/cache/transaction/TransactionEventHandler.d.ts +24 -24
  55. package/dist/types/classes/cache/transaction/TransactionItemHandler.d.ts +90 -90
  56. package/dist/types/classes/cache/transaction/TransactionValidator.d.ts +28 -28
  57. package/dist/types/classes/index.d.ts +46 -46
  58. package/dist/types/constants.d.ts +7 -7
  59. package/dist/types/core.d.ts +52 -52
  60. package/dist/types/factories/ApiResponseProcessorFactory.d.ts +6 -6
  61. package/dist/types/factories/ChangesCompilationFactory.d.ts +6 -6
  62. package/dist/types/factories/ChangesDeltaFactory.d.ts +11 -11
  63. package/dist/types/factories/ChangesProcessorFactory.d.ts +22 -22
  64. package/dist/types/factories/CollectionCacheFactory.d.ts +8 -8
  65. package/dist/types/factories/CollectionEntryFactory.d.ts +11 -11
  66. package/dist/types/factories/CollectionMatcherFactory.d.ts +9 -9
  67. package/dist/types/factories/CollectionResourceFactory.d.ts +16 -16
  68. package/dist/types/factories/ColumnExpansionFactory.d.ts +8 -8
  69. package/dist/types/factories/ColumnInfoFactory.d.ts +7 -7
  70. package/dist/types/factories/ColumnSetFactory.d.ts +19 -19
  71. package/dist/types/factories/ColumnSubsetCacheFactory.d.ts +6 -6
  72. package/dist/types/factories/CreateRequestFactory.d.ts +11 -11
  73. package/dist/types/factories/ItemCacheFactory.d.ts +8 -8
  74. package/dist/types/factories/ItemEntryFactory.d.ts +15 -15
  75. package/dist/types/factories/ItemResourceFactory.d.ts +14 -14
  76. package/dist/types/factories/ModuleChangesCompilationFactory.d.ts +5 -5
  77. package/dist/types/factories/QueryMatcherFactory.d.ts +7 -7
  78. package/dist/types/factories/QueryParserFactory.d.ts +6 -6
  79. package/dist/types/factories/RequestColumnExpansionFactory.d.ts +6 -6
  80. package/dist/types/factories/TemplateFactory.d.ts +10 -10
  81. package/dist/types/factories/TransactionCacheFactory.d.ts +15 -15
  82. package/dist/types/factories/index.d.ts +22 -22
  83. package/dist/types/index.d.ts +7 -7
  84. package/dist/types/interfaces/AbstractCacheDependencyInterface.d.ts +44 -44
  85. package/dist/types/interfaces/ApiRequestServiceInterface.d.ts +11 -11
  86. package/dist/types/interfaces/AuthInterface.d.ts +9 -9
  87. package/dist/types/interfaces/ErrorHandlerInterface.d.ts +5 -5
  88. package/dist/types/interfaces/ExceptionHandlerInterface.d.ts +3 -3
  89. package/dist/types/interfaces/LinkTreeServiceInterface.d.ts +4 -4
  90. package/dist/types/interfaces/PromiseLibraryInterface.d.ts +25 -25
  91. package/dist/types/interfaces/ServerCacheDependencyInterface.d.ts +7 -7
  92. package/dist/types/interfaces/SocketMessageInterface.d.ts +3 -3
  93. package/dist/types/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +21 -21
  94. package/dist/types/interfaces/TransactionItemHandlerDependencyInterface.d.ts +26 -26
  95. package/dist/types/interfaces/index.d.ts +11 -11
  96. package/dist/types/models/CollectionEntry.d.ts +27 -27
  97. package/dist/types/models/CollectionEntryOptions.d.ts +13 -13
  98. package/dist/types/models/CollectionResource.d.ts +63 -63
  99. package/dist/types/models/CollectionResourceOptions.d.ts +23 -23
  100. package/dist/types/models/ItemEntry.d.ts +19 -19
  101. package/dist/types/models/ItemEntryOptions.d.ts +8 -8
  102. package/dist/types/models/ItemResource.d.ts +84 -84
  103. package/dist/types/models/Template.d.ts +11 -11
  104. package/dist/types/models/index.d.ts +8 -8
  105. package/dist/types/types/ItemTypesCollection.d.ts +263 -263
  106. package/dist/types/types/PromiseInterface.d.ts +2 -2
  107. package/dist/types/types/index.d.ts +2 -2
  108. package/package.json +36 -36
  109. package/readme.md +15 -15
package/changelog.md CHANGED
@@ -1,692 +1,695 @@
1
- #Changelog
2
- Contains new features, breaking changes and their reasoning
3
-
4
- ## 4.0.3
5
- - Local collections are now correctly identified when using a local ID in a linkTo request instead of the `parent` option
6
- - Fix issue where local collection entries were not moved to server cache after save.
7
-
8
- ## 4.0.2
9
- - Fixed a bug where clearing collections would error after saving a transaction
10
-
11
- ## 4.0.1
12
- - Remove thrown error in `ItemResource.callOnChange`
13
- > The frontend still relied on this and we won't refactor that at this point
14
-
15
- ## 4.0.0
16
- - Removed `ItemResourceOptions.onChange`, this is replaced by `TransactionCache.registerFieldChangeCallback`
17
- > Because the `onChange` is no longer stored on the ItemResource, the ItemResource doesn't have to be cached.
18
- > This way you don't have to call `ItemResource.clearResource` anymore (you do need to deregister the fieldChange callbacks)
19
-
20
- ## 3.1.0
21
- - **Breaking:** Remove `fields` property, add `getFields` method in `Template` class.
22
- - **Breaking:** Add `ConversionMapService`. Update `updateItemValues` to take a `source` and `destination` parameter.
23
- - Update `entry.itemId` for items created items in `TransactionCache.getDelta`.
24
- > This fixes an issue with updating IDs of local items.
25
- - Add dependency interfaces for `AbstractCache`, `ServerCache`, `TransactionCache`, `TransactionCollectionHandler`, `TransactionItemHandler`.
26
- - Add `CreatedChangesDelta` class, which replaces the `created` component of the `ChangesDelta` and includes some query methods. Add `isEmpty` method to `ChangesDelta`.
27
-
28
- ## 3.0.1
29
- - Fixed a bug where the `StateKeyType` enum couldn't be used when imported
30
-
31
- ## 3.0.0
32
- - Remove ViewResource, EditResource, CollectionViewResource and CollectionEditResource
33
- > There was no real distinction between them anymore since the core 2.0 update.
34
- > You can now use the base ItemResource and CollectionResource types instead
35
-
36
- ## 2.4.0
37
- - Update Typescript version to `3.7.2`, also update other plugins
38
-
39
- ## 2.3.0
40
- - Add callbacks when errors are set/cleared to `TransactionEventHandler`
41
- - Added the possibility to differentiate between errors to display below a field and on the save button in `TransactionValidator`
42
- - Changed the format of the error translations from `string` to `() => string` in `TransactionValidator`
43
- > Now the translation function will only be called when the error is actually set, not when it's cleared
44
-
45
- ## 2.2.1
46
- - Fixed a bug where resolving derived values for new items (in `TransactionCache.applyChangesDelta`) would sometimes error
47
-
48
- ## 2.2.0
49
- - `ChangesDelta.setItem(s)Created` will now accept incomplete input values
50
- > It will now fetch a template for you and process the items, so you no longer need to do that yourself
51
-
52
- ## 2.1.2
53
- - Fixed a bug where deleted ItemEntries weren't picked up when detecting transaction changes
54
-
55
- ## 2.1.1
56
- - Fixed a bug where an ItemEntry's errors wouldn't be deleted when the ItemEntry was deleted on a transaction
57
-
58
- ## 2.1.0
59
- - Refactor `TransactionCache.getItemsByQuery` to check cached entries (just like a collection)
60
- - Add `TransactionValidator`, allow passing of a `TransactionValidatorFactory` to a transaction
61
- > You can use these validators to set errors using `setItemError` and `setGlobalError`
62
- - Fixed a bug where `TransactionItemHandler.cloneItemEntry` could only clone entry with changes on the target transaction.
63
- > It will not look for changes recursively on the transaction change
64
-
65
- ## 2.0.19
66
- - Ensure all requestColumns for newly created ItemEntries from a template are available
67
- - Ensure derived values for newly created ItemEntries from a template are available
68
-
69
- ## 2.0.18
70
- - Include read-only columns when detecting changes in TransactionItemHandler.processItemEntryChanges
71
- > 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`
72
-
73
- ## 2.0.17
74
- - Fixed a bug where deleting an item that isn't in the transaction's item entry cache would result in an error
75
- - Fixed a bug where response columns weren't set for newly created local CollectionEntries
76
- - Fixed a bug where items weren't matched for newly created local CollectionEntries
77
-
78
- ## 2.0.16
79
- - Fixed a bug where queries with a link to a local parent item weren't updated on save
80
-
81
- ## 2.0.15
82
- - Cache ItemEntries that fit collections on the CollectionEntry's query instead of the CollectionEntry's id
83
- - Add a 'hint' to ChangesDeltas which allows skipping the extra request to validate `maybe` query matches
84
- - Create transaction changes for ItemEntry updates in the changesDelta if non exist yet when calling `TransactionCache.applyChangesDelta`
85
- > This allows you to update values on a transaction without having to fetch a resource for it by calling
86
- > `ChangesDelta.setItemUpdated()`
87
-
88
- ## 2.0.14
89
- - Fixed reading of derived values in `getItemIdByColumn` when a ChangesDelta is passed
90
-
91
- ## 2.0.13
92
- - Fixed a bug where the incorrect fields where applied to the ChangesDelta in `TransactionItemHandler.cloneItemEntry`
93
- - A RequestBuffer's promise will now resolve after the ServerCache.processResponse promise is done, ensuring all values are present before continuing
94
- - Request columns for the request ItemType will now properly be taken into account in ServerCache.processResponse ensuring root columns are always properly set. (This is used to update derived values)
95
-
96
- ## 2.0.12
97
- - Fixed a bug where created changes weren't copied to the itemchanges
98
- - Only take readonly parent columns instead of all readonly columns in `ApiFormatter.hasChanges`
99
- - Fixed a bug where ItemEntry's where still in `ItemCache.entriesByEntryId` after clearing them
100
-
101
- ## 2.0.11
102
- - Fixed a bug where changes weren't copied to the itemchanges
103
- - Fixed correct isCalledAfterApiSave values on calls to ServerCache.processResponse
104
-
105
- ## 2.0.10
106
- - Construct `ColumnSet` with proper `requestColumns` when creating a `Template` with additional columns
107
-
108
- ## 2.0.9
109
- - Properly process linked items from the template request in `TransactionItemHandler.createItems`
110
-
111
- ## 2.0.8
112
- - Fixed a bug where not all fields where available even tough an ItemResource with specific columns was created
113
-
114
- ## 2.0.7
115
- - Define abstract copyTransactionItemEntryChanges on ItemHandlerBase
116
- - Implement copyTransactionItemEntryChanges on TransactionItemHandler and ServerItemHandler
117
- - Fix AbstractCache/ServerCache/TransactionCache `getParent` function arguments
118
- > With the newly added arguments the function definitions didn't align anymore causing typescript errors
119
- > Even though the arguments aren't used in the `ServerCache` they're added in there
120
-
121
- ## 2.0.6
122
- - Remove `ApiFormatter.lazyClone`
123
- > 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
124
-
125
- - Create a copy of the child transaction's field instead of copying the object reference in `TransactionCache.applyChangeFromChild` and `ChangesProcessor.executeCreateRequest`
126
- > When writing to the object references you're changing multiple transactions at once, while this should be handled by applyCHangesFromParent
127
-
128
- ## 2.0.5
129
- - Add `callOnAddWithInitialItems` option to `CollectionResourceOptions`
130
- > If `true` the `onAdd` callback will be called with the initial set of items
131
-
132
-
133
- ## 2.0.4
134
- - Add `isCalledAfterSocketUpdate` to `onAdd`, `onRemove` and `onChange` callbacks
135
- > You can use this if a data change should only trigger an action when the user caused it himself
136
-
137
- ## 2.0.3
138
- - Fix `CollectionEditResource.removeItems`
139
- - Move `getCurrentCollectionEntryCache` and `getCurrentItemEntryCache` from `TransactionCache` to `AbstractCache`
140
-
141
- ## 2.0.2
142
- - Fix marking entries as deleted and compiling this into a request
143
-
144
- ## 2.0.1
145
- - Expand CollectionEntry's columns in `ServerCollectionHandler.fetchCollectionData`
146
-
147
- ## 2.0.0 - Major caching refactor
148
- - Completely reworked internal caching structure, see [this Confluence page](https://rentman.atlassian.net/wiki/spaces/DEV/pages/704872456/) for the motivations behind it.
149
-
150
-
151
- ## 1.9.0
152
- - Don't create ItemResources when not returning links in `ItemAdministrator.getNewResourceWithId` and in `ItemAdministrator.constructOnItemsExpanded`
153
-
154
- ## 1.8.0
155
- - Remove `ResourceCache` and `resourceLevel`
156
- > You should now manually call `resource.clearResource` when you no longer need a resource
157
- - Add `onConstruct` function to `ItemResource` and `CollectionResource`
158
- > This is overwritten by the frontend to track resource creation
159
-
160
- ## 1.7.6
161
- - Add priority parameter to local cache callbacks. The callback condition (`always` / `onClose` / `skipOnClose`) no longer has any effect on the order in which the callbacks get executed.
162
- - **Breaking:** Remove `LocalCacheCallbackCondition` enum.
163
- - Add `itemId` parameter to `ItemHandler.fetchNewItem`. An error is thrown when an ID already exists. Add `getNewResourceWithId` to ItemAdministrator. Deprecate `getItemByState`.
164
-
165
- ## 1.7.5
166
- - For template column sets it is no longer assumed all columns are present. This fixes an issue with incomplete column
167
- sets in the front-end.
168
- - Fix issue where `changesProcessor` instance was undefined in `itemResourceFactory` and `collectionResourceFactory`.
169
- Create variables for each core service in order to get a TypeScript error when a dependency hasn't been initialized yet.
170
-
171
- ## 1.7.4
172
- - Add support for strict ItemType type checking in `FieldMap`
173
-
174
- ## 1.7.3
175
- - Add support for strict ItemType type checking
176
- > This is temporarily defaulted to `any` to prevent compile errors in the frontend
177
-
178
- ## 1.7.2
179
- - Fix some typing issues in:
180
- - ApiResponseProcessor
181
- - ItemCache
182
- - KeyService
183
-
184
- ## 1.7.1
185
- - Fix issue where `CreateRequestFactory` would be undefined in `ChangesProcessor`.
186
-
187
- ## 1.7.0
188
- - **Breaking:** remove `ChangesProcessorFactory`. Add `ChangesProcessor` instance to core directly.
189
-
190
- ### Resource caching
191
- - **Breaking:** the following properties are removed:
192
- - On `ItemEntry`: `clearResources`, `deactivateResources`.
193
- - On `CollectionEntry`: `clearResources`, `getCurrentResource`.
194
- - On `CollectionResourceOptions`: `clearOnTabChange`, `clearOnSubTabChange`.
195
- - An additional `level` parameter has been added to all methods that return resources.
196
- - When creating resources using `ItemResourceFactory` or `CollectionResourceFactory`, this parameter is mandatory.
197
- A `defaultResourceLevel` parameter has been added to the `LocalCache` constructor.
198
- - A `clearResources` method has been added to `ItemAdministrator`. When calling this method, all item / collection
199
- and collection resources with a level of `level` or higher will be removed.
200
- - The `clearResources` method has been removed from `LocalCache`.
201
- - The `setCurrentLocalCache` function has been removed from `LocalCacheManagerInterface`.
202
-
203
- ## 1.6.13
204
- - When encountering a collection entry with `PROMISED_EXPAND` status, call `getCachedEntryStatus` after the initial
205
- promise has been resolved.
206
-
207
- > This is the likely cause of the issue where `_resolve` is called on a non-deferred collection entry.
208
-
209
- ## 1.6.12
210
- - Fix error that occurs when trying to resolve a non-deferred collection entry.
211
-
212
- ## 1.6.11
213
- - Fix issue where `QueryMatcher.matchComplexQuery` would return the wrong value.
214
-
215
- ## 1.6.10
216
- - **Breaking**: Remove `linkType`, `linkIdArray` properties from `LinkCollectionDefinition`. Add `linkType`,
217
- `linkIdArray` parameters to `ItemAdministrator.getLinkCollectionsFromDef`.
218
-
219
- ## 1.6.9
220
- - Redeploy of `1.6.8`
221
-
222
- ## 1.6.8
223
- - Add support for `not` in queries
224
-
225
- ## 1.6.7
226
- - Fix issue where `CollectionMatcher.addToCollections` wouldn't return the correct type.
227
-
228
- ## 1.6.6
229
- - Add `callOnAdd` parameter in `CollectionHandler.batchExtend`. Set `updateInitial` to true. Remove `updateInitial` parameter in `CollectionEntry.extend`, as it should always be true.
230
- > The `extend` function only concerns itself with remote items, so no local changes should be generated.
231
-
232
- ## 1.6.5
233
- - Fix issue where a derived column could be marked as the `link` (parent) column in the column set.
234
- > This could lead to instances where a different column would be set to the value of the parent.
235
-
236
- ## 1.6.4
237
- - Fix issue where the `onChange` collection callback would not be called when updating it in the options.
238
- - Add `callOnAdd` parameter to collection matcher. When set to `false`, `onAdd` is not called for the `resultCollectionResource`.
239
-
240
- ## 1.6.3
241
- - Properly type ApiResponseProcessor - fetchObjectArray
242
-
243
- ## 1.6.2
244
- - Fix issue where the collection handler would return collection entries before they were resolved when calling `batchFetch`.
245
-
246
- ## 1.6.1-3
247
- - Check for linkedTo before checking for subqueries in QueryMatcher
248
- > Linkedto also has `.query` and was incorrectly marked as a subquery
249
-
250
- ## 1.6.1-2
251
- - Fixed shorthand query with null values
252
- > The QueryParser would incorrectly identify subqueries when using null in a shorthand
253
-
254
- ## 1.6.1-1
255
- - Fixed shorthand query with Moment values
256
- > The QueryParser would incorrectly identify Moment objects as a subquery
257
-
258
- ## 1.6.1
259
- - Added support for subqueries in QueryParser and QueryMatcher
260
- > Collections using subqueries will always return 'maybe' in the QueryMatcher
261
-
262
- ## 1.6.0
263
- - All external callbacks are now wrapped in a `try ... catch` block. This prevents them from breaking core functionality.
264
- - **Breaking**: Add `ExceptionHandlerInterface` parameter to core constructor.
265
-
266
- ## 1.5.9
267
- - Fix issue that occurs when trying to resolve a `ColumnSet` using a single non-existing column.
268
- Catch exceptions that might occur when resolving an `ItemEntry`.
269
- - Add `mergeRequestColumns`, `mergeResponseColumns` to `ColumnSet`. When encountering new items while expanding a collection, add them to the collection.
270
-
271
- ## 1.5.8
272
- - Introduce `RemoteViewResource` and `LocalViewResource`.
273
- > The `fields` property of a `RemoteViewResource` represents
274
- server values, while the `fields` property of a `LocalViewResource` represents local values.
275
- - The `fields` property of a `ViewResource` is now read only.
276
-
277
- ## 1.5.7-1
278
- - Make ItemResource/CollectionResource base class abstract
279
- - Add missing overload functions in some places
280
- - Fix default comparator `QueryMatcher.parseSimpleQuery`
281
- - Fix `ExtendedCollectionMatchResult` `collection` property type
282
-
283
- ## 1.5.7
284
- - Properly type Collections & ItemResources (and return values) in the whole core.
285
- > The core will now properly return Collections & ItemResources based on the passed CollectionOptions.
286
- > You can now also type the expected collection type
287
-
288
- ```
289
- // Expects a collection with editCollection and editItems both `true`
290
- // Will properly return EditResources for all collection functions
291
- const collection: CollectionEditResource<EditResource>;
292
-
293
- // other variations are:
294
- // CollectionViewResource<ViewResource>
295
- // CollectionViewResource<EditResource>
296
- // CollectionEditResource<ViewResource>
297
-
298
- this.core.itemAdministrator.getCollection(
299
- 'Notitie',
300
- {
301
- editCollection: true, // Will return a CollectionEditResource
302
- editItems: true // Will return EditResources instead of ViewResources in `.items`
303
- }
304
- )
305
- ```
306
-
307
- ## 1.5.6
308
- - Add `getAllLocalCaches` to `LocalCacheManagerInterface`, remove item entries from all local caches on socket delete.
309
-
310
- ## 1.5.5
311
- - Add 'order' column type handling to ApiFormatter functions
312
-
313
- ## 1.5.4
314
- - Fix issue where parent would be incorrectly set when cloning a single item.
315
- - Type functions related to expansion maps in `ItemEntryService`.
316
-
317
- ## 1.5.3
318
- - Fix issue where the `enableSave` collection resource option would default to `false`. This would throw an error when
319
- calling `save` on a collection resource where this option was not explicitly set.
320
-
321
- ## 1.5.2
322
- - Type functions in `ColumnUtil` class.
323
- - Add `getRequestColumnId` and `containsDerivedColumns` to `ColumnUtil`.
324
- > `getRequestColumnId` should be used instead of `Util.getFirstProperty` when retrieving a column ID.
325
- - **Breaking:** Remove `ColumnUtil.isColumnSubset`. Use `ColumnSet.isSuperSetOf` instead.
326
- - Remove `findColumnObject`. Rename `findColumn` to `findRequestColumn`.
327
-
328
- ## 1.5.1
329
- - Properly remove item entry stub from (local) cache when request fails.
330
- - Fix issue where item or collection options could be set to undefined.
331
-
332
- ## 1.5.0
333
- - Add `SocketMessage` type and add types to `SocketMessageHandler`
334
- - Expand local items requested using `getItemById` or `getItemsById` in `ItemAdministrator`.
335
- (`fetchItem` or `fetchItems` in `ItemHandler`.)
336
- - Implement expanding of local collections. This no longer leads to invalid requests.
337
- - **Breaking:** The `expand` function in `CollectionEntry` now has an `ItemCache` parameter.
338
- - **Warning:** This version contains major changes.
339
-
340
- ### Introduce typing of item and collection options
341
- - **Breaking:** Removed `QueryItemType` collection entry option.
342
- - **Breaking:** Removed `ItemResourceService`.
343
- - Removed `processOptions` parameter from `createCollectionResource` (`ItemAdministrator`). It is now equivalent to
344
- `addCollection`.
345
- - When creating an item resource using `ItemResourceFactory`, a collection entry using `CollectionResourceFactory` or a
346
- collection resource using `CollectionResourceFactory` it is no longer necessary to process options beforehand. It is
347
- still necessary when interacting with `CollectionHandler` or `ItemHandler` directly.
348
-
349
- ## v1.4.0
350
- - Add `expandProcessLinkedItems` and `expandAddToCollections` to `ItemAdministrator`. These are analogues to
351
- `processLinkedItems` and `addToCollections`, but also expand the items with (derived) values and columns as necessary.
352
- They have a slightly different type signature.
353
- - Whenever a collection is requested, the `CollectionHandler` now makes sure that added local items are expanded as
354
- necessary.
355
- - **Breaking:** Last parameter of `ItemHandler.createLocalEntries` is now a callback function.
356
- - **Breaking:** Rename `TemplateLinkedItemEntryMap` type to `TemplateItemEntryMap`.
357
-
358
- ## v1.3.8
359
- - Add `isSaving` to `LocalCache`
360
- > We use this to disable the cancel/save buttons while the localCache is saving in the frontend
361
-
362
- ## v1.3.7
363
- - Fix issues that generate invalid requests / changes when moving existing item to another collection, then deleting the parent.
364
- - Remove slip workarounds
365
- - Add api request types
366
- - Add types to `ModuleChangesCompilation`
367
-
368
- ## v1.3.6
369
- - Skip add / remove collection callbacks when calling `revertChanges` (`LocalCache`).
370
-
371
- ## v1.3.5
372
- - Fix issue where items added to collections when resolving wouldn't be removed in `revertChanges` (`LocalCache`).
373
-
374
- ## v1.3.4
375
- - Add country to isFilteredColumn in ColumnUtil
376
-
377
- ## v1.3.3
378
- - Move processLocalConfigColumns and consolidateColumns from ColumnUtil to frontend
379
- > These functions are specifically used for rendering ui-grid in the frontend, so there's
380
- no reason to have them in the core
381
-
382
- ## v1.3.2
383
- - Fix types path in package.json
384
-
385
- ## v1.3.1
386
- - Fix types path in package.json
387
-
388
- ## v1.3.0
389
- - Rename PromiseInterface to PromiseLibraryInterface
390
- > PromiseInterface is now used for the internal promise type
391
-
392
- - Use PromiseInterface instead of Promise as internal promise type
393
- > This allows us to overwrite the PromiseInterface definition in the frontend indicate usage of ng.IPromise
394
-
395
- ## v1.2.9
396
- - Call processOptions in fetchDerivedValuesByColumn
397
- > Bug was introduced earlier but got enabled in v1.2.7
398
-
399
- ## v1.2.8
400
- - Add toJSON methods for ItemResources, ItemEntries, and ColumnSets to fix circular dependencies in JSON.stringify
401
-
402
- ## v1.2.7
403
- - Set itemEntry parent when generating a stub
404
-
405
- ## v1.2.6
406
- - Fix an issue introduced in v1.2.5.
407
-
408
- ## v1.2.5
409
- - When a local item cannot by found, return a newly created item in `getItemByState` (`ItemAdministrator`) only. This
410
- solves an issue with refreshing on a local edit view.
411
-
412
- ## v1.2.4
413
- - **Breaking:** When a local item cannot by found, instead of a new item being created an error is thrown. This means it
414
- is no longer possible to create local items using `getItemById` or `getItemsById` in the `ItemAdministrator` class.
415
- - **Breaking:** Removed `getItemDefinition` and `getItemByDef` in the `ItemAdministrator` class. Added `getItemByState`.
416
- - Renamed types `TemplateResponseItemEntryMap` to `TemplateItemEntryMap` and `TemplateResponseLinkedItemEntryMap` to
417
- `TemplateLinkedItemEntryMap`.
418
- - Removed `getCollectionCacheKey` in `KeyService`. (Legacy code.)
419
-
420
- ## v1.2.3
421
- - Fixed issue where derived values deeper than one layer couldn't be resolved.
422
-
423
- ## v1.2.2
424
- - Fixed issue where in derived values weren't set after create request.
425
-
426
- ## v1.2.1
427
- - **Breaking:** Replaced the `initial` parameter with the `callOnChange` parameter (`true` by default) in the `commit`
428
- function of the `EditResource` class.
429
- - Fixed issue in `setLocalFields` (`ItemEntry`) where some values were wrongly assumed to be present in `initialValues`.
430
- - Optimization: Disabled automatic resolution of derived values in `addItems` (`CollectionEditResource`) when `modInstant` is set to true.
431
-
432
- ## v1.2.0
433
- - **Breaking:** When calling `addItems` or `addItem` on the `CollectionEditResource` class derived values are now
434
- resolved automatically. Instead of a compound object like `{fields: {key: 'value'}, derived: {}}` an object like
435
- `{key: 'value'}` should now be used as argument when calling these functions.
436
- - **Breaking:** Added `localCache` parameter to `CollectionResource` constructor.
437
-
438
- ## v1.1.20
439
- - Fixed minor issue where collection wouldn't be deferred properly before expanding.
440
- - `onChange` is now called automatically when when calling `commit` on an edit resource.
441
-
442
- ## v1.1.19
443
- - **Breaking:** Renamed `getCurrentChanges` to `getModuleChanges` in the `ItemAdministrator` class. Added optional
444
- `localCache` parameter.
445
-
446
- ### Local cache callback refactoring
447
- - Removed `onSaveWithoutClosing` event.
448
- - Added `condition` parameter to `onBeforeSave` and `onSaveSuccess` (possible values are `always`, `onClose` or
449
- `skipOnClose`, defaults to `always`). Callbacks registered with `condition: always` will get executed before other
450
- callbacks.
451
- - Pass the local cache itself to all registered callback functions. Pass the item ID conversion map as second argument
452
- to `onSaveSuccess` callback functions.
453
-
454
- ## v1.1.18
455
- - Calling `expand` on a `CollectionEntry` manually no longer defers the collection entry.
456
- - The `batchFetch` and `batchExpand` functions in the `CollectionHandler` class now properly defer and resolve the
457
- collection entries.
458
-
459
- ## v1.1.17
460
- - Fixed issue where the `getLocalByQuery` function in the `ItemCache` class wouldn't return any items.
461
- - When batch resolving collection entries, `CollectionHandler` now looks for matching items using `getByQuery` instead
462
- of `getByParent`.
463
-
464
- ### Cache invalidation
465
- - Added `queueReload` function to `ItemEntry` class. This will reload the item when the item entry itself or a
466
- collection entry containing the item is requested.
467
- - The `queueReload` function in the `CollectionEntry` class no longer directly defers the item.
468
- - Added `invalidateCache` function to the `ItemAdministrator` class. This will call `queueReload` on all item entries
469
- and collection entries.
470
-
471
- ### Item entry refactoring
472
- - Renamed `process` to `setFields`.
473
- - Replaced `processLocal` with `setLocalFields`. This function no longer has a `modified` parameter.
474
- - `setModified` now also sets local default values.
475
- - Removed `setCreator`. This function was called twice in some instances.
476
- - **Breaking:** Added `derived` parameter to `updateFields`
477
-
478
- ##v1.16
479
- - Pass `hasChanges` as second argument to `onBeforeSave` callbacks in the `LocalCache` class. This fixes an issue with
480
- project financial values in the front-end. [RM4-9577]
481
- - Added `callOnActivate` parameter to `addItems` function in `CollectionEditResource` class. Use this to prevent items
482
- from being added to the local cache.
483
-
484
- ##v1.15
485
- - Fix `fetchItemTypesTranslations` function in `ColumnHandler` class.
486
- - Fix type definition of `PromiseInterface.all`.
487
-
488
- ##v1.14
489
- - The `ChangesCompiler` now always processes local collections. (Even if they don't have edit resources.) This fixes an
490
- issue with recurring appointments in the front-end.
491
-
492
- ##v1.13
493
- - Add option to exclude itemTypes during createLocalEntries.
494
-
495
- ##v1.12
496
- - **Breaking:** `ItemResource.isNew` returns true *only* if the resource was created using
497
- `ItemAdministrator.getNewResource` or `ItemAdministrator.getItemByDef`. This fixes an issue where items where removed
498
- from the local cache inadvertently.
499
- - The `start`, `commit` and `rollback` functions of `EditResource` now return the resource itself to facilitate chaining.
500
- - When calling `CollectionEntry.revertChanges`, callbacks like `onAdd` / `onRemove` and `onActivate` / `onDeactivate`
501
- are now respected. This fixes an issue where items where *not* removed from the local cache.
502
- - When removing *local* items from collections, they are removed from `initial` as well as `modified`. This fixes an
503
- issue where changes were being detected continuously.
504
- - Updated the order of requests in `changesProcessor`. The `update` request is now executed before the `delete` request,
505
- except when updating documents. This fixes several issues.
506
- - `CollectionCache` now uses a map instead of an array to store collections. This fixes an issue where the same
507
- collection was added multiple times.
508
- - Updated all models to use dependency objects. This increases ease of debugging.
509
-
510
- ##v.1.11
511
- - Fixed issue that occurs when saving when having an existing item refer to a newly created item.
512
- - **Breaking:** Removed `ItemResourceService.isNewResource`.
513
- - **Breaking:** Renamed `ItemResource.isNewResource` to `ItemResource.isNew`. Removed parameter.
514
- - `ItemResource.isNew` is equivalent to `ItemResource.isLocal`, while `EditResource.isNew` checks also checks for
515
- completed transactions.
516
-
517
- ##v.1.10
518
- - Fixed issue where changes on different subtabs were not detected.
519
-
520
- ##v1.1.9
521
- - Exposed `noop` function on `RmCore` class.
522
- > This is used in order to check whether a callback has a default value.
523
- - Added `copyRequestColumns` function to `ColumnUtil` class.
524
- - Made parameters of `ItemAdministrator.saveCurrentLocalCache` and `LocalCache.save` optional.
525
- - **Breaking:** Reordered parameters of `ChangesProcessor.execute` to be consistent with
526
- `ItemAdministrator.saveCurrentLocalCache`. The new order is `singleItems` - `collections` - `parameters` -
527
- `breakUpByParent` - `onAfterCreateCallback`.
528
-
529
- ##v1.1.8
530
- - Set default value for `params` to `{filter: false}` in `request` function in `ColumnHandler` class.
531
-
532
- ##v1.1.7
533
- - Fixed issue where cached item entries or collection entries wouldn't be added to the local cache.
534
-
535
- ##v1.1.6
536
- - Fixed issue with deferred item entries.
537
- - Re-enable changes watcher after save.
538
- - Added optional `id` parameter to `LocalCache` constructor.
539
-
540
- ##v1.1.5
541
- - Added `clearItem` function to `LocalCache` class.
542
-
543
- ##v.1.1.4
544
- - Fix issue where items where not added to the local cache automatically when they where added to a collection.
545
- > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add
546
- the items to the local cache.
547
- > In other instances this might be debatable because it doesn't do any real harm. *Not*
548
- doing it however can definitely be harmful.
549
-
550
- ##v.1.1.3
551
- - Fixed an issue where all collections in a local cache would be cleared.
552
- - **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
553
- `LocalCacheManagerInterface`.
554
-
555
- ##v1.1.2
556
- - Fixed an issue concerning derived values.
557
-
558
- ## v1.1.1
559
- - Fixed an issue where changes wouldn't be detected.
560
- - **Breaking:** Removed the `_hasChanges` function in the `localCache` class. If you want to force changes detection,
561
- call `detectChanges` instead. Otherwise, rely on the `hasChanges` variable.
562
- - **Breaking:** Removed the `enableWatcher` and `disableWatcher` functions. Use `enableChangesWatcher` and
563
- `disableChangesWatcher` instead.
564
-
565
- ## v1.1.0
566
- ### Development
567
-
568
- #### Strict TypeScript compilation
569
- Added the following TypeScript compiler options:
570
- - noImplicitThis
571
- - noImplicitReturns
572
- - strictNullChecks
573
- - noUnusedLocals
574
- - noUnusedParameters
575
-
576
- I would advise enabling these for all TypeScript projects from now on.
577
-
578
- #### Ordered imports and dependencies
579
- Imports are now ordered alphabetically and grouped by folder. Added a TSLint option to enforce this.
580
- Please note that this also applies for imports from the folder the file is currently in.
581
- For example, in `models/ItemResource.ts`, `itemEntry` should be imported like so:
582
- `import { ItemEntry } from '../models';`
583
-
584
- Also, factory and class dependencies should be ordered alphabetically as well. This will make it easier to add and
585
- remove dependencies in the future.
586
-
587
- ### Breaking changes
588
-
589
- - Renamed `changesCompiler` to `changesCompilation`, `changesCompilerFactory` to `changesCompilationFactory`,
590
- `moduleChangesCompiler` to `moduleChangesCompilation` and `moduleChangesCompilerFactory` to
591
- `moduleChangesCompilationFactory`.
592
- - Removed the `allLinks` parameter from the `query` function definition in the `ApiRequestServiceInterface`. This is
593
- no longer supported in the back-end.
594
-
595
- #### Item and collection entries
596
- - Moved *all* functions that handle item entries from the `ItemEntryService` to the `ItemEntry` class.
597
- - Added the following functions to `ItemEntryService`:
598
- - `createLocalConversionMap`;
599
- - `expandLocalConversionMap`;
600
- - `expandConversionMap`;
601
- - `batchExpandConversionMap`;
602
- - `batchClone`.
603
- - Cloning of item entries now works slightly differently. The function will attempt to generate a new
604
- item ID, and update the conversion map accordingly, but will respect the item ID that is already there.
605
-
606
- #### Rework item caching
607
- Newly created item entries and collection entries are no longer added to the global *or* local cache by default.
608
- All entries are added to the global cache on save. Item entries are added to the local cache when resources are created
609
- using the item administrator or when resources are created when adding the items to a collection.
610
-
611
- > This will increase reliability by ensuring the global cache is no longer 'polluted' with local items. Also, this will
612
- > allow for the creation item and collection entries without caching them directly. This is required for the copying and
613
- > pasting of items.
614
-
615
- Other changes:
616
-
617
- - Moved `saveLocal` to `ItemAdministrator`;
618
- - `ItemAdministrator.fetchTitle` should now be called instead of `ItemHandler.fetchTitle`;
619
- - The `ItemAdministrator` collection matching functions (`addToCollections`, `removeFromCollections`) should now be
620
- called instead of those in the `CollectionHandler`. The `CollectionHandler` should only be used to reflect changes
621
- already on the backend. (Use `getCollectionMatcher`.)
622
-
623
-
624
- ##v1.0.33
625
- - Really fix types path
626
-
627
- ##v1.0.33
628
- - Fix types path
629
-
630
- ##v1.0.32
631
- - Update `tsconfig.json` to put definitions in the root folder
632
- > The app had an issue with AOT compilation because of this
633
-
634
- ##v1.0.31
635
- - Fix `columnHandler.fetchItemTypeTranslations`
636
- > It incorrectly looped over the response map, it should now work again
637
-
638
- ##v1.0.30
639
- - Remove `updateTabParams` from LocalCacheManagerInterface
640
- > The function wasn't used
641
-
642
- - Reworked class export
643
- > Imports are now done from @rentman/rm-core, old imports are broken. This is because the old export structure didn't always work
644
-
645
- ##v1.0.29
646
- - Fix inverted inArray check in CollectionEntry.removeItems
647
- > A delete message from the socket deleted all BUT the deleted items, this should now be fixed
648
-
649
- ##v1.0.28
650
- Bug fixes only
651
-
652
- ##v1.0.27
653
- - `ItemEntry.initial` is now undefined by default
654
- > In the SocketMessageHandler we use this check to see if an ItemEntry is a stub
655
-
656
- ##v1.0.26
657
- Bundle both minified and unminified code, include sourcemaps from dev build
658
-
659
- ##v1.0.24, v1.0.25
660
- ! Use version `v1.0.26` !
661
-
662
- - The core now expects a `promiseInterface` that should implement the provided `promiseInterface`
663
- > We need to be able to hook into the promises in order to call a digest cycle to update the ui in the frontend
664
-
665
- - Rename `ItemEntry.entryId` to `ItemEntry.id
666
- > It used to be called `id`, but it was changed in the seperation of the core.
667
- > You can use the `id` to uniquely identify an entry, since itemId can be updated (local to saved id)
668
-
669
- - Rename ItemResource `startTransaction` to `start`
670
- > Other functions are called `commit` and `rollback` so having 'transaction' only for start doesn't make much sense
671
-
672
- - `SocketMessageHandler.onMessageReceived` now returns a promise
673
- > You can now use the updated items or hook into the result to update the ui for example
674
-
675
-
676
- ##v1.0.23
677
- - Rename ResourceCache to LocalCache
678
- > LocalCache only caches local items (name better reflects functionality)
679
-
680
- - Remove getter/setter for hasChanges
681
- > hasChanges is called in a digest loop in the frontend, so for performance reasons we don't want to recompute the value every time
682
-
683
- - Remove `_getCollection` from ItemAdministrator
684
- > `_getCollection` is now named `getCollection` and the old `getCollection` is removed. The query is part of the
685
- > options and should not be given as a separate argument. This was included to support the frontend
686
-
687
- - Remove `saveCurrentTab` from ItemAdministrator
688
- > `saveCurrentTab` makes no sense because the core has no concept of tabs, you should use `saveCurrentLocalCache` instead
689
-
690
- - Remove `getTabEntry` and `resetTabEntry` from ItemAdministrator
691
- > `getTabEntry` and `resetTabEntry` make no sense because the core has no concept of tabs, you should use `getLocalCache` and `resetLocalCache` instead
692
-
1
+ #Changelog
2
+ Contains new features, breaking changes and their reasoning
3
+
4
+ ## 4.0.4
5
+ - Fixed a bug where ModuleChangesCompilation wouldn't include all changes
6
+
7
+ ## 4.0.3
8
+ - Local collections are now correctly identified when using a local ID in a linkTo request instead of the `parent` option
9
+ - Fix issue where local collection entries were not moved to server cache after save.
10
+
11
+ ## 4.0.2
12
+ - Fixed a bug where clearing collections would error after saving a transaction
13
+
14
+ ## 4.0.1
15
+ - Remove thrown error in `ItemResource.callOnChange`
16
+ > The frontend still relied on this and we won't refactor that at this point
17
+
18
+ ## 4.0.0
19
+ - Removed `ItemResourceOptions.onChange`, this is replaced by `TransactionCache.registerFieldChangeCallback`
20
+ > Because the `onChange` is no longer stored on the ItemResource, the ItemResource doesn't have to be cached.
21
+ > This way you don't have to call `ItemResource.clearResource` anymore (you do need to deregister the fieldChange callbacks)
22
+
23
+ ## 3.1.0
24
+ - **Breaking:** Remove `fields` property, add `getFields` method in `Template` class.
25
+ - **Breaking:** Add `ConversionMapService`. Update `updateItemValues` to take a `source` and `destination` parameter.
26
+ - Update `entry.itemId` for items created items in `TransactionCache.getDelta`.
27
+ > This fixes an issue with updating IDs of local items.
28
+ - Add dependency interfaces for `AbstractCache`, `ServerCache`, `TransactionCache`, `TransactionCollectionHandler`, `TransactionItemHandler`.
29
+ - Add `CreatedChangesDelta` class, which replaces the `created` component of the `ChangesDelta` and includes some query methods. Add `isEmpty` method to `ChangesDelta`.
30
+
31
+ ## 3.0.1
32
+ - Fixed a bug where the `StateKeyType` enum couldn't be used when imported
33
+
34
+ ## 3.0.0
35
+ - Remove ViewResource, EditResource, CollectionViewResource and CollectionEditResource
36
+ > There was no real distinction between them anymore since the core 2.0 update.
37
+ > You can now use the base ItemResource and CollectionResource types instead
38
+
39
+ ## 2.4.0
40
+ - Update Typescript version to `3.7.2`, also update other plugins
41
+
42
+ ## 2.3.0
43
+ - Add callbacks when errors are set/cleared to `TransactionEventHandler`
44
+ - Added the possibility to differentiate between errors to display below a field and on the save button in `TransactionValidator`
45
+ - Changed the format of the error translations from `string` to `() => string` in `TransactionValidator`
46
+ > Now the translation function will only be called when the error is actually set, not when it's cleared
47
+
48
+ ## 2.2.1
49
+ - Fixed a bug where resolving derived values for new items (in `TransactionCache.applyChangesDelta`) would sometimes error
50
+
51
+ ## 2.2.0
52
+ - `ChangesDelta.setItem(s)Created` will now accept incomplete input values
53
+ > It will now fetch a template for you and process the items, so you no longer need to do that yourself
54
+
55
+ ## 2.1.2
56
+ - Fixed a bug where deleted ItemEntries weren't picked up when detecting transaction changes
57
+
58
+ ## 2.1.1
59
+ - Fixed a bug where an ItemEntry's errors wouldn't be deleted when the ItemEntry was deleted on a transaction
60
+
61
+ ## 2.1.0
62
+ - Refactor `TransactionCache.getItemsByQuery` to check cached entries (just like a collection)
63
+ - Add `TransactionValidator`, allow passing of a `TransactionValidatorFactory` to a transaction
64
+ > You can use these validators to set errors using `setItemError` and `setGlobalError`
65
+ - Fixed a bug where `TransactionItemHandler.cloneItemEntry` could only clone entry with changes on the target transaction.
66
+ > It will not look for changes recursively on the transaction change
67
+
68
+ ## 2.0.19
69
+ - Ensure all requestColumns for newly created ItemEntries from a template are available
70
+ - Ensure derived values for newly created ItemEntries from a template are available
71
+
72
+ ## 2.0.18
73
+ - Include read-only columns when detecting changes in TransactionItemHandler.processItemEntryChanges
74
+ > 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`
75
+
76
+ ## 2.0.17
77
+ - Fixed a bug where deleting an item that isn't in the transaction's item entry cache would result in an error
78
+ - Fixed a bug where response columns weren't set for newly created local CollectionEntries
79
+ - Fixed a bug where items weren't matched for newly created local CollectionEntries
80
+
81
+ ## 2.0.16
82
+ - Fixed a bug where queries with a link to a local parent item weren't updated on save
83
+
84
+ ## 2.0.15
85
+ - Cache ItemEntries that fit collections on the CollectionEntry's query instead of the CollectionEntry's id
86
+ - Add a 'hint' to ChangesDeltas which allows skipping the extra request to validate `maybe` query matches
87
+ - Create transaction changes for ItemEntry updates in the changesDelta if non exist yet when calling `TransactionCache.applyChangesDelta`
88
+ > This allows you to update values on a transaction without having to fetch a resource for it by calling
89
+ > `ChangesDelta.setItemUpdated()`
90
+
91
+ ## 2.0.14
92
+ - Fixed reading of derived values in `getItemIdByColumn` when a ChangesDelta is passed
93
+
94
+ ## 2.0.13
95
+ - Fixed a bug where the incorrect fields where applied to the ChangesDelta in `TransactionItemHandler.cloneItemEntry`
96
+ - A RequestBuffer's promise will now resolve after the ServerCache.processResponse promise is done, ensuring all values are present before continuing
97
+ - Request columns for the request ItemType will now properly be taken into account in ServerCache.processResponse ensuring root columns are always properly set. (This is used to update derived values)
98
+
99
+ ## 2.0.12
100
+ - Fixed a bug where created changes weren't copied to the itemchanges
101
+ - Only take readonly parent columns instead of all readonly columns in `ApiFormatter.hasChanges`
102
+ - Fixed a bug where ItemEntry's where still in `ItemCache.entriesByEntryId` after clearing them
103
+
104
+ ## 2.0.11
105
+ - Fixed a bug where changes weren't copied to the itemchanges
106
+ - Fixed correct isCalledAfterApiSave values on calls to ServerCache.processResponse
107
+
108
+ ## 2.0.10
109
+ - Construct `ColumnSet` with proper `requestColumns` when creating a `Template` with additional columns
110
+
111
+ ## 2.0.9
112
+ - Properly process linked items from the template request in `TransactionItemHandler.createItems`
113
+
114
+ ## 2.0.8
115
+ - Fixed a bug where not all fields where available even tough an ItemResource with specific columns was created
116
+
117
+ ## 2.0.7
118
+ - Define abstract copyTransactionItemEntryChanges on ItemHandlerBase
119
+ - Implement copyTransactionItemEntryChanges on TransactionItemHandler and ServerItemHandler
120
+ - Fix AbstractCache/ServerCache/TransactionCache `getParent` function arguments
121
+ > With the newly added arguments the function definitions didn't align anymore causing typescript errors
122
+ > Even though the arguments aren't used in the `ServerCache` they're added in there
123
+
124
+ ## 2.0.6
125
+ - Remove `ApiFormatter.lazyClone`
126
+ > 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
127
+
128
+ - Create a copy of the child transaction's field instead of copying the object reference in `TransactionCache.applyChangeFromChild` and `ChangesProcessor.executeCreateRequest`
129
+ > When writing to the object references you're changing multiple transactions at once, while this should be handled by applyCHangesFromParent
130
+
131
+ ## 2.0.5
132
+ - Add `callOnAddWithInitialItems` option to `CollectionResourceOptions`
133
+ > If `true` the `onAdd` callback will be called with the initial set of items
134
+
135
+
136
+ ## 2.0.4
137
+ - Add `isCalledAfterSocketUpdate` to `onAdd`, `onRemove` and `onChange` callbacks
138
+ > You can use this if a data change should only trigger an action when the user caused it himself
139
+
140
+ ## 2.0.3
141
+ - Fix `CollectionEditResource.removeItems`
142
+ - Move `getCurrentCollectionEntryCache` and `getCurrentItemEntryCache` from `TransactionCache` to `AbstractCache`
143
+
144
+ ## 2.0.2
145
+ - Fix marking entries as deleted and compiling this into a request
146
+
147
+ ## 2.0.1
148
+ - Expand CollectionEntry's columns in `ServerCollectionHandler.fetchCollectionData`
149
+
150
+ ## 2.0.0 - Major caching refactor
151
+ - Completely reworked internal caching structure, see [this Confluence page](https://rentman.atlassian.net/wiki/spaces/DEV/pages/704872456/) for the motivations behind it.
152
+
153
+
154
+ ## 1.9.0
155
+ - Don't create ItemResources when not returning links in `ItemAdministrator.getNewResourceWithId` and in `ItemAdministrator.constructOnItemsExpanded`
156
+
157
+ ## 1.8.0
158
+ - Remove `ResourceCache` and `resourceLevel`
159
+ > You should now manually call `resource.clearResource` when you no longer need a resource
160
+ - Add `onConstruct` function to `ItemResource` and `CollectionResource`
161
+ > This is overwritten by the frontend to track resource creation
162
+
163
+ ## 1.7.6
164
+ - Add priority parameter to local cache callbacks. The callback condition (`always` / `onClose` / `skipOnClose`) no longer has any effect on the order in which the callbacks get executed.
165
+ - **Breaking:** Remove `LocalCacheCallbackCondition` enum.
166
+ - Add `itemId` parameter to `ItemHandler.fetchNewItem`. An error is thrown when an ID already exists. Add `getNewResourceWithId` to ItemAdministrator. Deprecate `getItemByState`.
167
+
168
+ ## 1.7.5
169
+ - For template column sets it is no longer assumed all columns are present. This fixes an issue with incomplete column
170
+ sets in the front-end.
171
+ - Fix issue where `changesProcessor` instance was undefined in `itemResourceFactory` and `collectionResourceFactory`.
172
+ Create variables for each core service in order to get a TypeScript error when a dependency hasn't been initialized yet.
173
+
174
+ ## 1.7.4
175
+ - Add support for strict ItemType type checking in `FieldMap`
176
+
177
+ ## 1.7.3
178
+ - Add support for strict ItemType type checking
179
+ > This is temporarily defaulted to `any` to prevent compile errors in the frontend
180
+
181
+ ## 1.7.2
182
+ - Fix some typing issues in:
183
+ - ApiResponseProcessor
184
+ - ItemCache
185
+ - KeyService
186
+
187
+ ## 1.7.1
188
+ - Fix issue where `CreateRequestFactory` would be undefined in `ChangesProcessor`.
189
+
190
+ ## 1.7.0
191
+ - **Breaking:** remove `ChangesProcessorFactory`. Add `ChangesProcessor` instance to core directly.
192
+
193
+ ### Resource caching
194
+ - **Breaking:** the following properties are removed:
195
+ - On `ItemEntry`: `clearResources`, `deactivateResources`.
196
+ - On `CollectionEntry`: `clearResources`, `getCurrentResource`.
197
+ - On `CollectionResourceOptions`: `clearOnTabChange`, `clearOnSubTabChange`.
198
+ - An additional `level` parameter has been added to all methods that return resources.
199
+ - When creating resources using `ItemResourceFactory` or `CollectionResourceFactory`, this parameter is mandatory.
200
+ A `defaultResourceLevel` parameter has been added to the `LocalCache` constructor.
201
+ - A `clearResources` method has been added to `ItemAdministrator`. When calling this method, all item / collection
202
+ and collection resources with a level of `level` or higher will be removed.
203
+ - The `clearResources` method has been removed from `LocalCache`.
204
+ - The `setCurrentLocalCache` function has been removed from `LocalCacheManagerInterface`.
205
+
206
+ ## 1.6.13
207
+ - When encountering a collection entry with `PROMISED_EXPAND` status, call `getCachedEntryStatus` after the initial
208
+ promise has been resolved.
209
+
210
+ > This is the likely cause of the issue where `_resolve` is called on a non-deferred collection entry.
211
+
212
+ ## 1.6.12
213
+ - Fix error that occurs when trying to resolve a non-deferred collection entry.
214
+
215
+ ## 1.6.11
216
+ - Fix issue where `QueryMatcher.matchComplexQuery` would return the wrong value.
217
+
218
+ ## 1.6.10
219
+ - **Breaking**: Remove `linkType`, `linkIdArray` properties from `LinkCollectionDefinition`. Add `linkType`,
220
+ `linkIdArray` parameters to `ItemAdministrator.getLinkCollectionsFromDef`.
221
+
222
+ ## 1.6.9
223
+ - Redeploy of `1.6.8`
224
+
225
+ ## 1.6.8
226
+ - Add support for `not` in queries
227
+
228
+ ## 1.6.7
229
+ - Fix issue where `CollectionMatcher.addToCollections` wouldn't return the correct type.
230
+
231
+ ## 1.6.6
232
+ - Add `callOnAdd` parameter in `CollectionHandler.batchExtend`. Set `updateInitial` to true. Remove `updateInitial` parameter in `CollectionEntry.extend`, as it should always be true.
233
+ > The `extend` function only concerns itself with remote items, so no local changes should be generated.
234
+
235
+ ## 1.6.5
236
+ - Fix issue where a derived column could be marked as the `link` (parent) column in the column set.
237
+ > This could lead to instances where a different column would be set to the value of the parent.
238
+
239
+ ## 1.6.4
240
+ - Fix issue where the `onChange` collection callback would not be called when updating it in the options.
241
+ - Add `callOnAdd` parameter to collection matcher. When set to `false`, `onAdd` is not called for the `resultCollectionResource`.
242
+
243
+ ## 1.6.3
244
+ - Properly type ApiResponseProcessor - fetchObjectArray
245
+
246
+ ## 1.6.2
247
+ - Fix issue where the collection handler would return collection entries before they were resolved when calling `batchFetch`.
248
+
249
+ ## 1.6.1-3
250
+ - Check for linkedTo before checking for subqueries in QueryMatcher
251
+ > Linkedto also has `.query` and was incorrectly marked as a subquery
252
+
253
+ ## 1.6.1-2
254
+ - Fixed shorthand query with null values
255
+ > The QueryParser would incorrectly identify subqueries when using null in a shorthand
256
+
257
+ ## 1.6.1-1
258
+ - Fixed shorthand query with Moment values
259
+ > The QueryParser would incorrectly identify Moment objects as a subquery
260
+
261
+ ## 1.6.1
262
+ - Added support for subqueries in QueryParser and QueryMatcher
263
+ > Collections using subqueries will always return 'maybe' in the QueryMatcher
264
+
265
+ ## 1.6.0
266
+ - All external callbacks are now wrapped in a `try ... catch` block. This prevents them from breaking core functionality.
267
+ - **Breaking**: Add `ExceptionHandlerInterface` parameter to core constructor.
268
+
269
+ ## 1.5.9
270
+ - Fix issue that occurs when trying to resolve a `ColumnSet` using a single non-existing column.
271
+ Catch exceptions that might occur when resolving an `ItemEntry`.
272
+ - Add `mergeRequestColumns`, `mergeResponseColumns` to `ColumnSet`. When encountering new items while expanding a collection, add them to the collection.
273
+
274
+ ## 1.5.8
275
+ - Introduce `RemoteViewResource` and `LocalViewResource`.
276
+ > The `fields` property of a `RemoteViewResource` represents
277
+ server values, while the `fields` property of a `LocalViewResource` represents local values.
278
+ - The `fields` property of a `ViewResource` is now read only.
279
+
280
+ ## 1.5.7-1
281
+ - Make ItemResource/CollectionResource base class abstract
282
+ - Add missing overload functions in some places
283
+ - Fix default comparator `QueryMatcher.parseSimpleQuery`
284
+ - Fix `ExtendedCollectionMatchResult` `collection` property type
285
+
286
+ ## 1.5.7
287
+ - Properly type Collections & ItemResources (and return values) in the whole core.
288
+ > The core will now properly return Collections & ItemResources based on the passed CollectionOptions.
289
+ > You can now also type the expected collection type
290
+
291
+ ```
292
+ // Expects a collection with editCollection and editItems both `true`
293
+ // Will properly return EditResources for all collection functions
294
+ const collection: CollectionEditResource<EditResource>;
295
+
296
+ // other variations are:
297
+ // CollectionViewResource<ViewResource>
298
+ // CollectionViewResource<EditResource>
299
+ // CollectionEditResource<ViewResource>
300
+
301
+ this.core.itemAdministrator.getCollection(
302
+ 'Notitie',
303
+ {
304
+ editCollection: true, // Will return a CollectionEditResource
305
+ editItems: true // Will return EditResources instead of ViewResources in `.items`
306
+ }
307
+ )
308
+ ```
309
+
310
+ ## 1.5.6
311
+ - Add `getAllLocalCaches` to `LocalCacheManagerInterface`, remove item entries from all local caches on socket delete.
312
+
313
+ ## 1.5.5
314
+ - Add 'order' column type handling to ApiFormatter functions
315
+
316
+ ## 1.5.4
317
+ - Fix issue where parent would be incorrectly set when cloning a single item.
318
+ - Type functions related to expansion maps in `ItemEntryService`.
319
+
320
+ ## 1.5.3
321
+ - Fix issue where the `enableSave` collection resource option would default to `false`. This would throw an error when
322
+ calling `save` on a collection resource where this option was not explicitly set.
323
+
324
+ ## 1.5.2
325
+ - Type functions in `ColumnUtil` class.
326
+ - Add `getRequestColumnId` and `containsDerivedColumns` to `ColumnUtil`.
327
+ > `getRequestColumnId` should be used instead of `Util.getFirstProperty` when retrieving a column ID.
328
+ - **Breaking:** Remove `ColumnUtil.isColumnSubset`. Use `ColumnSet.isSuperSetOf` instead.
329
+ - Remove `findColumnObject`. Rename `findColumn` to `findRequestColumn`.
330
+
331
+ ## 1.5.1
332
+ - Properly remove item entry stub from (local) cache when request fails.
333
+ - Fix issue where item or collection options could be set to undefined.
334
+
335
+ ## 1.5.0
336
+ - Add `SocketMessage` type and add types to `SocketMessageHandler`
337
+ - Expand local items requested using `getItemById` or `getItemsById` in `ItemAdministrator`.
338
+ (`fetchItem` or `fetchItems` in `ItemHandler`.)
339
+ - Implement expanding of local collections. This no longer leads to invalid requests.
340
+ - **Breaking:** The `expand` function in `CollectionEntry` now has an `ItemCache` parameter.
341
+ - **Warning:** This version contains major changes.
342
+
343
+ ### Introduce typing of item and collection options
344
+ - **Breaking:** Removed `QueryItemType` collection entry option.
345
+ - **Breaking:** Removed `ItemResourceService`.
346
+ - Removed `processOptions` parameter from `createCollectionResource` (`ItemAdministrator`). It is now equivalent to
347
+ `addCollection`.
348
+ - When creating an item resource using `ItemResourceFactory`, a collection entry using `CollectionResourceFactory` or a
349
+ collection resource using `CollectionResourceFactory` it is no longer necessary to process options beforehand. It is
350
+ still necessary when interacting with `CollectionHandler` or `ItemHandler` directly.
351
+
352
+ ## v1.4.0
353
+ - Add `expandProcessLinkedItems` and `expandAddToCollections` to `ItemAdministrator`. These are analogues to
354
+ `processLinkedItems` and `addToCollections`, but also expand the items with (derived) values and columns as necessary.
355
+ They have a slightly different type signature.
356
+ - Whenever a collection is requested, the `CollectionHandler` now makes sure that added local items are expanded as
357
+ necessary.
358
+ - **Breaking:** Last parameter of `ItemHandler.createLocalEntries` is now a callback function.
359
+ - **Breaking:** Rename `TemplateLinkedItemEntryMap` type to `TemplateItemEntryMap`.
360
+
361
+ ## v1.3.8
362
+ - Add `isSaving` to `LocalCache`
363
+ > We use this to disable the cancel/save buttons while the localCache is saving in the frontend
364
+
365
+ ## v1.3.7
366
+ - Fix issues that generate invalid requests / changes when moving existing item to another collection, then deleting the parent.
367
+ - Remove slip workarounds
368
+ - Add api request types
369
+ - Add types to `ModuleChangesCompilation`
370
+
371
+ ## v1.3.6
372
+ - Skip add / remove collection callbacks when calling `revertChanges` (`LocalCache`).
373
+
374
+ ## v1.3.5
375
+ - Fix issue where items added to collections when resolving wouldn't be removed in `revertChanges` (`LocalCache`).
376
+
377
+ ## v1.3.4
378
+ - Add country to isFilteredColumn in ColumnUtil
379
+
380
+ ## v1.3.3
381
+ - Move processLocalConfigColumns and consolidateColumns from ColumnUtil to frontend
382
+ > These functions are specifically used for rendering ui-grid in the frontend, so there's
383
+ no reason to have them in the core
384
+
385
+ ## v1.3.2
386
+ - Fix types path in package.json
387
+
388
+ ## v1.3.1
389
+ - Fix types path in package.json
390
+
391
+ ## v1.3.0
392
+ - Rename PromiseInterface to PromiseLibraryInterface
393
+ > PromiseInterface is now used for the internal promise type
394
+
395
+ - Use PromiseInterface instead of Promise as internal promise type
396
+ > This allows us to overwrite the PromiseInterface definition in the frontend indicate usage of ng.IPromise
397
+
398
+ ## v1.2.9
399
+ - Call processOptions in fetchDerivedValuesByColumn
400
+ > Bug was introduced earlier but got enabled in v1.2.7
401
+
402
+ ## v1.2.8
403
+ - Add toJSON methods for ItemResources, ItemEntries, and ColumnSets to fix circular dependencies in JSON.stringify
404
+
405
+ ## v1.2.7
406
+ - Set itemEntry parent when generating a stub
407
+
408
+ ## v1.2.6
409
+ - Fix an issue introduced in v1.2.5.
410
+
411
+ ## v1.2.5
412
+ - When a local item cannot by found, return a newly created item in `getItemByState` (`ItemAdministrator`) only. This
413
+ solves an issue with refreshing on a local edit view.
414
+
415
+ ## v1.2.4
416
+ - **Breaking:** When a local item cannot by found, instead of a new item being created an error is thrown. This means it
417
+ is no longer possible to create local items using `getItemById` or `getItemsById` in the `ItemAdministrator` class.
418
+ - **Breaking:** Removed `getItemDefinition` and `getItemByDef` in the `ItemAdministrator` class. Added `getItemByState`.
419
+ - Renamed types `TemplateResponseItemEntryMap` to `TemplateItemEntryMap` and `TemplateResponseLinkedItemEntryMap` to
420
+ `TemplateLinkedItemEntryMap`.
421
+ - Removed `getCollectionCacheKey` in `KeyService`. (Legacy code.)
422
+
423
+ ## v1.2.3
424
+ - Fixed issue where derived values deeper than one layer couldn't be resolved.
425
+
426
+ ## v1.2.2
427
+ - Fixed issue where in derived values weren't set after create request.
428
+
429
+ ## v1.2.1
430
+ - **Breaking:** Replaced the `initial` parameter with the `callOnChange` parameter (`true` by default) in the `commit`
431
+ function of the `EditResource` class.
432
+ - Fixed issue in `setLocalFields` (`ItemEntry`) where some values were wrongly assumed to be present in `initialValues`.
433
+ - Optimization: Disabled automatic resolution of derived values in `addItems` (`CollectionEditResource`) when `modInstant` is set to true.
434
+
435
+ ## v1.2.0
436
+ - **Breaking:** When calling `addItems` or `addItem` on the `CollectionEditResource` class derived values are now
437
+ resolved automatically. Instead of a compound object like `{fields: {key: 'value'}, derived: {}}` an object like
438
+ `{key: 'value'}` should now be used as argument when calling these functions.
439
+ - **Breaking:** Added `localCache` parameter to `CollectionResource` constructor.
440
+
441
+ ## v1.1.20
442
+ - Fixed minor issue where collection wouldn't be deferred properly before expanding.
443
+ - `onChange` is now called automatically when when calling `commit` on an edit resource.
444
+
445
+ ## v1.1.19
446
+ - **Breaking:** Renamed `getCurrentChanges` to `getModuleChanges` in the `ItemAdministrator` class. Added optional
447
+ `localCache` parameter.
448
+
449
+ ### Local cache callback refactoring
450
+ - Removed `onSaveWithoutClosing` event.
451
+ - Added `condition` parameter to `onBeforeSave` and `onSaveSuccess` (possible values are `always`, `onClose` or
452
+ `skipOnClose`, defaults to `always`). Callbacks registered with `condition: always` will get executed before other
453
+ callbacks.
454
+ - Pass the local cache itself to all registered callback functions. Pass the item ID conversion map as second argument
455
+ to `onSaveSuccess` callback functions.
456
+
457
+ ## v1.1.18
458
+ - Calling `expand` on a `CollectionEntry` manually no longer defers the collection entry.
459
+ - The `batchFetch` and `batchExpand` functions in the `CollectionHandler` class now properly defer and resolve the
460
+ collection entries.
461
+
462
+ ## v1.1.17
463
+ - Fixed issue where the `getLocalByQuery` function in the `ItemCache` class wouldn't return any items.
464
+ - When batch resolving collection entries, `CollectionHandler` now looks for matching items using `getByQuery` instead
465
+ of `getByParent`.
466
+
467
+ ### Cache invalidation
468
+ - Added `queueReload` function to `ItemEntry` class. This will reload the item when the item entry itself or a
469
+ collection entry containing the item is requested.
470
+ - The `queueReload` function in the `CollectionEntry` class no longer directly defers the item.
471
+ - Added `invalidateCache` function to the `ItemAdministrator` class. This will call `queueReload` on all item entries
472
+ and collection entries.
473
+
474
+ ### Item entry refactoring
475
+ - Renamed `process` to `setFields`.
476
+ - Replaced `processLocal` with `setLocalFields`. This function no longer has a `modified` parameter.
477
+ - `setModified` now also sets local default values.
478
+ - Removed `setCreator`. This function was called twice in some instances.
479
+ - **Breaking:** Added `derived` parameter to `updateFields`
480
+
481
+ ##v1.16
482
+ - Pass `hasChanges` as second argument to `onBeforeSave` callbacks in the `LocalCache` class. This fixes an issue with
483
+ project financial values in the front-end. [RM4-9577]
484
+ - Added `callOnActivate` parameter to `addItems` function in `CollectionEditResource` class. Use this to prevent items
485
+ from being added to the local cache.
486
+
487
+ ##v1.15
488
+ - Fix `fetchItemTypesTranslations` function in `ColumnHandler` class.
489
+ - Fix type definition of `PromiseInterface.all`.
490
+
491
+ ##v1.14
492
+ - The `ChangesCompiler` now always processes local collections. (Even if they don't have edit resources.) This fixes an
493
+ issue with recurring appointments in the front-end.
494
+
495
+ ##v1.13
496
+ - Add option to exclude itemTypes during createLocalEntries.
497
+
498
+ ##v1.12
499
+ - **Breaking:** `ItemResource.isNew` returns true *only* if the resource was created using
500
+ `ItemAdministrator.getNewResource` or `ItemAdministrator.getItemByDef`. This fixes an issue where items where removed
501
+ from the local cache inadvertently.
502
+ - The `start`, `commit` and `rollback` functions of `EditResource` now return the resource itself to facilitate chaining.
503
+ - When calling `CollectionEntry.revertChanges`, callbacks like `onAdd` / `onRemove` and `onActivate` / `onDeactivate`
504
+ are now respected. This fixes an issue where items where *not* removed from the local cache.
505
+ - When removing *local* items from collections, they are removed from `initial` as well as `modified`. This fixes an
506
+ issue where changes were being detected continuously.
507
+ - Updated the order of requests in `changesProcessor`. The `update` request is now executed before the `delete` request,
508
+ except when updating documents. This fixes several issues.
509
+ - `CollectionCache` now uses a map instead of an array to store collections. This fixes an issue where the same
510
+ collection was added multiple times.
511
+ - Updated all models to use dependency objects. This increases ease of debugging.
512
+
513
+ ##v.1.11
514
+ - Fixed issue that occurs when saving when having an existing item refer to a newly created item.
515
+ - **Breaking:** Removed `ItemResourceService.isNewResource`.
516
+ - **Breaking:** Renamed `ItemResource.isNewResource` to `ItemResource.isNew`. Removed parameter.
517
+ - `ItemResource.isNew` is equivalent to `ItemResource.isLocal`, while `EditResource.isNew` checks also checks for
518
+ completed transactions.
519
+
520
+ ##v.1.10
521
+ - Fixed issue where changes on different subtabs were not detected.
522
+
523
+ ##v1.1.9
524
+ - Exposed `noop` function on `RmCore` class.
525
+ > This is used in order to check whether a callback has a default value.
526
+ - Added `copyRequestColumns` function to `ColumnUtil` class.
527
+ - Made parameters of `ItemAdministrator.saveCurrentLocalCache` and `LocalCache.save` optional.
528
+ - **Breaking:** Reordered parameters of `ChangesProcessor.execute` to be consistent with
529
+ `ItemAdministrator.saveCurrentLocalCache`. The new order is `singleItems` - `collections` - `parameters` -
530
+ `breakUpByParent` - `onAfterCreateCallback`.
531
+
532
+ ##v1.1.8
533
+ - Set default value for `params` to `{filter: false}` in `request` function in `ColumnHandler` class.
534
+
535
+ ##v1.1.7
536
+ - Fixed issue where cached item entries or collection entries wouldn't be added to the local cache.
537
+
538
+ ##v1.1.6
539
+ - Fixed issue with deferred item entries.
540
+ - Re-enable changes watcher after save.
541
+ - Added optional `id` parameter to `LocalCache` constructor.
542
+
543
+ ##v1.1.5
544
+ - Added `clearItem` function to `LocalCache` class.
545
+
546
+ ##v.1.1.4
547
+ - Fix issue where items where not added to the local cache automatically when they where added to a collection.
548
+ > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add
549
+ the items to the local cache.
550
+ > In other instances this might be debatable because it doesn't do any real harm. *Not*
551
+ doing it however can definitely be harmful.
552
+
553
+ ##v.1.1.3
554
+ - Fixed an issue where all collections in a local cache would be cleared.
555
+ - **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
556
+ `LocalCacheManagerInterface`.
557
+
558
+ ##v1.1.2
559
+ - Fixed an issue concerning derived values.
560
+
561
+ ## v1.1.1
562
+ - Fixed an issue where changes wouldn't be detected.
563
+ - **Breaking:** Removed the `_hasChanges` function in the `localCache` class. If you want to force changes detection,
564
+ call `detectChanges` instead. Otherwise, rely on the `hasChanges` variable.
565
+ - **Breaking:** Removed the `enableWatcher` and `disableWatcher` functions. Use `enableChangesWatcher` and
566
+ `disableChangesWatcher` instead.
567
+
568
+ ## v1.1.0
569
+ ### Development
570
+
571
+ #### Strict TypeScript compilation
572
+ Added the following TypeScript compiler options:
573
+ - noImplicitThis
574
+ - noImplicitReturns
575
+ - strictNullChecks
576
+ - noUnusedLocals
577
+ - noUnusedParameters
578
+
579
+ I would advise enabling these for all TypeScript projects from now on.
580
+
581
+ #### Ordered imports and dependencies
582
+ Imports are now ordered alphabetically and grouped by folder. Added a TSLint option to enforce this.
583
+ Please note that this also applies for imports from the folder the file is currently in.
584
+ For example, in `models/ItemResource.ts`, `itemEntry` should be imported like so:
585
+ `import { ItemEntry } from '../models';`
586
+
587
+ Also, factory and class dependencies should be ordered alphabetically as well. This will make it easier to add and
588
+ remove dependencies in the future.
589
+
590
+ ### Breaking changes
591
+
592
+ - Renamed `changesCompiler` to `changesCompilation`, `changesCompilerFactory` to `changesCompilationFactory`,
593
+ `moduleChangesCompiler` to `moduleChangesCompilation` and `moduleChangesCompilerFactory` to
594
+ `moduleChangesCompilationFactory`.
595
+ - Removed the `allLinks` parameter from the `query` function definition in the `ApiRequestServiceInterface`. This is
596
+ no longer supported in the back-end.
597
+
598
+ #### Item and collection entries
599
+ - Moved *all* functions that handle item entries from the `ItemEntryService` to the `ItemEntry` class.
600
+ - Added the following functions to `ItemEntryService`:
601
+ - `createLocalConversionMap`;
602
+ - `expandLocalConversionMap`;
603
+ - `expandConversionMap`;
604
+ - `batchExpandConversionMap`;
605
+ - `batchClone`.
606
+ - Cloning of item entries now works slightly differently. The function will attempt to generate a new
607
+ item ID, and update the conversion map accordingly, but will respect the item ID that is already there.
608
+
609
+ #### Rework item caching
610
+ Newly created item entries and collection entries are no longer added to the global *or* local cache by default.
611
+ All entries are added to the global cache on save. Item entries are added to the local cache when resources are created
612
+ using the item administrator or when resources are created when adding the items to a collection.
613
+
614
+ > This will increase reliability by ensuring the global cache is no longer 'polluted' with local items. Also, this will
615
+ > allow for the creation item and collection entries without caching them directly. This is required for the copying and
616
+ > pasting of items.
617
+
618
+ Other changes:
619
+
620
+ - Moved `saveLocal` to `ItemAdministrator`;
621
+ - `ItemAdministrator.fetchTitle` should now be called instead of `ItemHandler.fetchTitle`;
622
+ - The `ItemAdministrator` collection matching functions (`addToCollections`, `removeFromCollections`) should now be
623
+ called instead of those in the `CollectionHandler`. The `CollectionHandler` should only be used to reflect changes
624
+ already on the backend. (Use `getCollectionMatcher`.)
625
+
626
+
627
+ ##v1.0.33
628
+ - Really fix types path
629
+
630
+ ##v1.0.33
631
+ - Fix types path
632
+
633
+ ##v1.0.32
634
+ - Update `tsconfig.json` to put definitions in the root folder
635
+ > The app had an issue with AOT compilation because of this
636
+
637
+ ##v1.0.31
638
+ - Fix `columnHandler.fetchItemTypeTranslations`
639
+ > It incorrectly looped over the response map, it should now work again
640
+
641
+ ##v1.0.30
642
+ - Remove `updateTabParams` from LocalCacheManagerInterface
643
+ > The function wasn't used
644
+
645
+ - Reworked class export
646
+ > Imports are now done from @rentman/rm-core, old imports are broken. This is because the old export structure didn't always work
647
+
648
+ ##v1.0.29
649
+ - Fix inverted inArray check in CollectionEntry.removeItems
650
+ > A delete message from the socket deleted all BUT the deleted items, this should now be fixed
651
+
652
+ ##v1.0.28
653
+ Bug fixes only
654
+
655
+ ##v1.0.27
656
+ - `ItemEntry.initial` is now undefined by default
657
+ > In the SocketMessageHandler we use this check to see if an ItemEntry is a stub
658
+
659
+ ##v1.0.26
660
+ Bundle both minified and unminified code, include sourcemaps from dev build
661
+
662
+ ##v1.0.24, v1.0.25
663
+ ! Use version `v1.0.26` !
664
+
665
+ - The core now expects a `promiseInterface` that should implement the provided `promiseInterface`
666
+ > We need to be able to hook into the promises in order to call a digest cycle to update the ui in the frontend
667
+
668
+ - Rename `ItemEntry.entryId` to `ItemEntry.id
669
+ > It used to be called `id`, but it was changed in the seperation of the core.
670
+ > You can use the `id` to uniquely identify an entry, since itemId can be updated (local to saved id)
671
+
672
+ - Rename ItemResource `startTransaction` to `start`
673
+ > Other functions are called `commit` and `rollback` so having 'transaction' only for start doesn't make much sense
674
+
675
+ - `SocketMessageHandler.onMessageReceived` now returns a promise
676
+ > You can now use the updated items or hook into the result to update the ui for example
677
+
678
+
679
+ ##v1.0.23
680
+ - Rename ResourceCache to LocalCache
681
+ > LocalCache only caches local items (name better reflects functionality)
682
+
683
+ - Remove getter/setter for hasChanges
684
+ > hasChanges is called in a digest loop in the frontend, so for performance reasons we don't want to recompute the value every time
685
+
686
+ - Remove `_getCollection` from ItemAdministrator
687
+ > `_getCollection` is now named `getCollection` and the old `getCollection` is removed. The query is part of the
688
+ > options and should not be given as a separate argument. This was included to support the frontend
689
+
690
+ - Remove `saveCurrentTab` from ItemAdministrator
691
+ > `saveCurrentTab` makes no sense because the core has no concept of tabs, you should use `saveCurrentLocalCache` instead
692
+
693
+ - Remove `getTabEntry` and `resetTabEntry` from ItemAdministrator
694
+ > `getTabEntry` and `resetTabEntry` make no sense because the core has no concept of tabs, you should use `getLocalCache` and `resetLocalCache` instead
695
+