@rentman/rm-core 3.0.0 → 3.1.0

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