@rentman/rm-core 1.1.20 → 1.2.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.
package/changelog.md CHANGED
@@ -1,258 +1,264 @@
1
- #Changelog
2
- Contains new features, breaking changes and their reasoning
3
-
4
- ## v1.1.20
5
- - Fixed minor issue where collection wouldn't be deferred properly before expanding.
6
- - `onChange` is now called automatically when when calling `commit` on an edit resource.
7
-
8
- ## v1.1.19
9
- - **Breaking:** Renamed `getCurrentChanges` to `getModuleChanges` in the `ItemAdministrator` class. Added optional
10
- `localCache` parameter.
11
-
12
- ### Local cache callback refactoring
13
- - Removed `onSaveWithoutClosing` event.
14
- - Added `condition` parameter to `onBeforeSave` and `onSaveSuccess` (possible values are `always`, `onClose` or
15
- `skipOnClose`, defaults to `always`). Callbacks registered with `condition: always` will get executed before other
16
- callbacks.
17
- - Pass the local cache itself to all registered callback functions. Pass the item ID conversion map as second argument
18
- to `onSaveSuccess` callback functions.
19
-
20
- ## v1.1.18
21
- - Calling `expand` on a `CollectionEntry` manually no longer defers the collection entry.
22
- - The `batchFetch` and `batchExpand` functions in the `CollectionHandler` class now properly defer and resolve the
23
- collection entries.
24
-
25
- ## v1.1.17
26
- - Fixed issue where the `getLocalByQuery` function in the `ItemCache` class wouldn't return any items.
27
- - When batch resolving collection entries, `CollectionHandler` now looks for matching items using `getByQuery` instead
28
- of `getByParent`.
29
-
30
- ### Cache invalidation
31
- - Added `queueReload` function to `ItemEntry` class. This will reload the item when the item entry itself or a
32
- collection entry containing the item is requested.
33
- - The `queueReload` function in the `CollectionEntry` class no longer directly defers the item.
34
- - Added `invalidateCache` function to the `ItemAdministrator` class. This will call `queueReload` on all item entries
35
- and collection entries.
36
-
37
- ### Item entry refactoring
38
- - Renamed `process` to `setFields`.
39
- - Replaced `processLocal` with `setLocalFields`. This function no longer has a `modified` parameter.
40
- - `setModified` now also sets local default values.
41
- - Removed `setCreator`. This function was called twice in some instances.
42
- - **Breaking:** Added `derived` parameter to `updateFields`
43
-
44
- ##v1.16
45
- - Pass `hasChanges` as second argument to `onBeforeSave` callbacks in the `LocalCache` class. This fixes an issue with
46
- project financial values in the front-end. [RM4-9577]
47
- - Added `callOnActivate` parameter to `addItems` function in `CollectionEditResource` class. Use this to prevent items
48
- from being added to the local cache.
49
-
50
- ##v1.15
51
- - Fix `fetchItemTypesTranslations` function in `ColumnHandler` class.
52
- - Fix type definition of `PromiseInterface.all`.
53
-
54
- ##v1.14
55
- - The `ChangesCompiler` now always processes local collections. (Even if they don't have edit resources.) This fixes an
56
- issue with recurring appointments in the front-end.
57
-
58
- ##v1.13
59
- - Add option to exclude itemTypes during createLocalEntries.
60
-
61
- ##v1.12
62
- - **Breaking:** `ItemResource.isNew` returns true *only* if the resource was created using
63
- `ItemAdministrator.getNewResource` or `ItemAdministrator.getItemByDef`. This fixes an issue where items where removed
64
- from the local cache inadvertently.
65
- - The `start`, `commit` and `rollback` functions of `EditResource` now return the resource itself to facilitate chaining.
66
- - When calling `CollectionEntry.revertChanges`, callbacks like `onAdd` / `onRemove` and `onActivate` / `onDeactivate`
67
- are now respected. This fixes an issue where items where *not* removed from the local cache.
68
- - When removing *local* items from collections, they are removed from `initial` as well as `modified`. This fixes an
69
- issue where changes were being detected continuously.
70
- - Updated the order of requests in `changesProcessor`. The `update` request is now executed before the `delete` request,
71
- except when updating documents. This fixes several issues.
72
- - `CollectionCache` now uses a map instead of an array to store collections. This fixes an issue where the same
73
- collection was added multiple times.
74
- - Updated all models to use dependency objects. This increases ease of debugging.
75
-
76
- ##v.1.11
77
- - Fixed issue that occurs when saving when having an existing item refer to a newly created item.
78
- - **Breaking:** Removed `ItemResourceService.isNewResource`.
79
- - **Breaking:** Renamed `ItemResource.isNewResource` to `ItemResource.isNew`. Removed parameter.
80
- - `ItemResource.isNew` is equivalent to `ItemResource.isLocal`, while `EditResource.isNew` checks also checks for
81
- completed transactions.
82
-
83
- ##v.1.10
84
- - Fixed issue where changes on different subtabs were not detected.
85
-
86
- ##v1.1.9
87
- - Exposed `noop` function on `RmCore` class.
88
- > This is used in order to check whether a callback has a default value.
89
- - Added `copyRequestColumns` function to `ColumnUtil` class.
90
- - Made parameters of `ItemAdministrator.saveCurrentLocalCache` and `LocalCache.save` optional.
91
- - **Breaking:** Reordered parameters of `ChangesProcessor.execute` to be consistent with
92
- `ItemAdministrator.saveCurrentLocalCache`. The new order is `singleItems` - `collections` - `parameters` -
93
- `breakUpByParent` - `onAfterCreateCallback`.
94
-
95
- ##v1.1.8
96
- - Set default value for `params` to `{filter: false}` in `request` function in `ColumnHandler` class.
97
-
98
- ##v1.1.7
99
- - Fixed issue where cached item entries or collection entries wouldn't be added to the local cache.
100
-
101
- ##v1.1.6
102
- - Fixed issue with deferred item entries.
103
- - Re-enable changes watcher after save.
104
- - Added optional `id` parameter to `LocalCache` constructor.
105
-
106
- ##v1.1.5
107
- - Added `clearItem` function to `LocalCache` class.
108
-
109
- ##v.1.1.4
110
- - Fix issue where items where not added to the local cache automatically when they where added to a collection.
111
- > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add
112
- the items to the local cache.
113
- > In other instances this might be debatable because it doesn't do any real harm. *Not*
114
- doing it however can definitely be harmful.
115
-
116
- ##v.1.1.3
117
- - Fixed an issue where all collections in a local cache would be cleared.
118
- - **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
119
- `LocalCacheManagerInterface`.
120
-
121
- ##v1.1.2
122
- - Fixed an issue concerning derived values.
123
-
124
- ## v1.1.1
125
- - Fixed an issue where changes wouldn't be detected.
126
- - **Breaking:** Removed the `_hasChanges` function in the `localCache` class. If you want to force changes detection,
127
- call `detectChanges` instead. Otherwise, rely on the `hasChanges` variable.
128
- - **Breaking:** Removed the `enableWatcher` and `disableWatcher` functions. Use `enableChangesWatcher` and
129
- `disableChangesWatcher` instead.
130
-
131
- ## v1.1.0
132
- ### Development
133
-
134
- #### Strict TypeScript compilation
135
- Added the following TypeScript compiler options:
136
- - noImplicitThis
137
- - noImplicitReturns
138
- - strictNullChecks
139
- - noUnusedLocals
140
- - noUnusedParameters
141
-
142
- I would advise enabling these for all TypeScript projects from now on.
143
-
144
- #### Ordered imports and dependencies
145
- Imports are now ordered alphabetically and grouped by folder. Added a TSLint option to enforce this.
146
- Please note that this also applies for imports from the folder the file is currently in.
147
- For example, in `models/ItemResource.ts`, `itemEntry` should be imported like so:
148
- `import { ItemEntry } from '../models';`
149
-
150
- Also, factory and class dependencies should be ordered alphabetically as well. This will make it easier to add and
151
- remove dependencies in the future.
152
-
153
- ### Breaking changes
154
-
155
- - Renamed `changesCompiler` to `changesCompilation`, `changesCompilerFactory` to `changesCompilationFactory`,
156
- `moduleChangesCompiler` to `moduleChangesCompilation` and `moduleChangesCompilerFactory` to
157
- `moduleChangesCompilationFactory`.
158
- - Removed the `allLinks` parameter from the `query` function definition in the `ApiRequestServiceInterface`. This is
159
- no longer supported in the back-end.
160
-
161
- #### Item and collection entries
162
- - Moved *all* functions that handle item entries from the `ItemEntryService` to the `ItemEntry` class.
163
- - Added the following functions to `ItemEntryService`:
164
- - `createLocalConversionMap`;
165
- - `expandLocalConversionMap`;
166
- - `expandConversionMap`;
167
- - `batchExpandConversionMap`;
168
- - `batchClone`.
169
- - Cloning of item entries now works slightly differently. The function will attempt to generate a new
170
- item ID, and update the conversion map accordingly, but will respect the item ID that is already there.
171
-
172
- #### Rework item caching
173
- Newly created item entries and collection entries are no longer added to the global *or* local cache by default.
174
- All entries are added to the global cache on save. Item entries are added to the local cache when resources are created
175
- using the item administrator or when resources are created when adding the items to a collection.
176
-
177
- > This will increase reliability by ensuring the global cache is no longer 'polluted' with local items. Also, this will
178
- > allow for the creation item and collection entries without caching them directly. This is required for the copying and
179
- > pasting of items.
180
-
181
- Other changes:
182
-
183
- - Moved `saveLocal` to `ItemAdministrator`;
184
- - `ItemAdministrator.fetchTitle` should now be called instead of `ItemHandler.fetchTitle`;
185
- - The `ItemAdministrator` collection matching functions (`addToCollections`, `removeFromCollections`) should now be
186
- called instead of those in the `CollectionHandler`. The `CollectionHandler` should only be used to reflect changes
187
- already on the backend. (Use `getCollectionMatcher`.)
188
-
189
-
190
- ##v1.0.33
191
- - Really fix types path
192
-
193
- ##v1.0.33
194
- - Fix types path
195
-
196
- ##v1.0.32
197
- - Update `tsconfig.json` to put definitions in the root folder
198
- > The app had an issue with AOT compilation because of this
199
-
200
- ##v1.0.31
201
- - Fix `columnHandler.fetchItemTypeTranslations`
202
- > It incorrectly looped over the response map, it should now work again
203
-
204
- ##v1.0.30
205
- - Remove `updateTabParams` from LocalCacheManagerInterface
206
- > The function wasn't used
207
-
208
- - Reworked class export
209
- > Imports are now done from @rentman/rm-core, old imports are broken. This is because the old export structure didn't always work
210
-
211
- ##v1.0.29
212
- - Fix inverted inArray check in CollectionEntry.removeItems
213
- > A delete message from the socket deleted all BUT the deleted items, this should now be fixed
214
-
215
- ##v1.0.28
216
- Bug fixes only
217
-
218
- ##v1.0.27
219
- - `ItemEntry.initial` is now undefined by default
220
- > In the SocketMessageHandler we use this check to see if an ItemEntry is a stub
221
-
222
- ##v1.0.26
223
- Bundle both minified and unminified code, include sourcemaps from dev build
224
-
225
- ##v1.0.24, v1.0.25
226
- ! Use version `v1.0.26` !
227
-
228
- - The core now expects a `promiseInterface` that should implement the provided `promiseInterface`
229
- > We need to be able to hook into the promises in order to call a digest cycle to update the ui in the frontend
230
-
231
- - Rename `ItemEntry.entryId` to `ItemEntry.id
232
- > It used to be called `id`, but it was changed in the seperation of the core.
233
- > You can use the `id` to uniquely identify an entry, since itemId can be updated (local to saved id)
234
-
235
- - Rename ItemResource `startTransaction` to `start`
236
- > Other functions are called `commit` and `rollback` so having 'transaction' only for start doesn't make much sense
237
-
238
- - `SocketMessageHandler.onMessageReceived` now returns a promise
239
- > You can now use the updated items or hook into the result to update the ui for example
240
-
241
-
242
- ##v1.0.23
243
- - Rename ResourceCache to LocalCache
244
- > LocalCache only caches local items (name better reflects functionality)
245
-
246
- - Remove getter/setter for hasChanges
247
- > hasChanges is called in a digest loop in the frontend, so for performance reasons we don't want to recompute the value every time
248
-
249
- - Remove `_getCollection` from ItemAdministrator
250
- > `_getCollection` is now named `getCollection` and the old `getCollection` is removed. The query is part of the
251
- > options and should not be given as a separate argument. This was included to support the frontend
252
-
253
- - Remove `saveCurrentTab` from ItemAdministrator
254
- > `saveCurrentTab` makes no sense because the core has no concept of tabs, you should use `saveCurrentLocalCache` instead
255
-
256
- - Remove `getTabEntry` and `resetTabEntry` from ItemAdministrator
257
- > `getTabEntry` and `resetTabEntry` make no sense because the core has no concept of tabs, you should use `getLocalCache` and `resetLocalCache` instead
258
-
1
+ #Changelog
2
+ Contains new features, breaking changes and their reasoning
3
+
4
+ ## v1.2.0
5
+ - **Breaking:** When calling `addItems` or `addItem` on the `CollectionEditResource` class derived values are now
6
+ resolved automatically. Instead of a compound object like `{fields: {key: 'value'}, derived: {}}` an object like
7
+ `{key: 'value'}` should now be used as argument when calling these functions.
8
+ - **Breaking:** Added `localCache` parameter to `CollectionResource` constructor.
9
+
10
+ ## v1.1.20
11
+ - Fixed minor issue where collection wouldn't be deferred properly before expanding.
12
+ - `onChange` is now called automatically when when calling `commit` on an edit resource.
13
+
14
+ ## v1.1.19
15
+ - **Breaking:** Renamed `getCurrentChanges` to `getModuleChanges` in the `ItemAdministrator` class. Added optional
16
+ `localCache` parameter.
17
+
18
+ ### Local cache callback refactoring
19
+ - Removed `onSaveWithoutClosing` event.
20
+ - Added `condition` parameter to `onBeforeSave` and `onSaveSuccess` (possible values are `always`, `onClose` or
21
+ `skipOnClose`, defaults to `always`). Callbacks registered with `condition: always` will get executed before other
22
+ callbacks.
23
+ - Pass the local cache itself to all registered callback functions. Pass the item ID conversion map as second argument
24
+ to `onSaveSuccess` callback functions.
25
+
26
+ ## v1.1.18
27
+ - Calling `expand` on a `CollectionEntry` manually no longer defers the collection entry.
28
+ - The `batchFetch` and `batchExpand` functions in the `CollectionHandler` class now properly defer and resolve the
29
+ collection entries.
30
+
31
+ ## v1.1.17
32
+ - Fixed issue where the `getLocalByQuery` function in the `ItemCache` class wouldn't return any items.
33
+ - When batch resolving collection entries, `CollectionHandler` now looks for matching items using `getByQuery` instead
34
+ of `getByParent`.
35
+
36
+ ### Cache invalidation
37
+ - Added `queueReload` function to `ItemEntry` class. This will reload the item when the item entry itself or a
38
+ collection entry containing the item is requested.
39
+ - The `queueReload` function in the `CollectionEntry` class no longer directly defers the item.
40
+ - Added `invalidateCache` function to the `ItemAdministrator` class. This will call `queueReload` on all item entries
41
+ and collection entries.
42
+
43
+ ### Item entry refactoring
44
+ - Renamed `process` to `setFields`.
45
+ - Replaced `processLocal` with `setLocalFields`. This function no longer has a `modified` parameter.
46
+ - `setModified` now also sets local default values.
47
+ - Removed `setCreator`. This function was called twice in some instances.
48
+ - **Breaking:** Added `derived` parameter to `updateFields`
49
+
50
+ ##v1.16
51
+ - Pass `hasChanges` as second argument to `onBeforeSave` callbacks in the `LocalCache` class. This fixes an issue with
52
+ project financial values in the front-end. [RM4-9577]
53
+ - Added `callOnActivate` parameter to `addItems` function in `CollectionEditResource` class. Use this to prevent items
54
+ from being added to the local cache.
55
+
56
+ ##v1.15
57
+ - Fix `fetchItemTypesTranslations` function in `ColumnHandler` class.
58
+ - Fix type definition of `PromiseInterface.all`.
59
+
60
+ ##v1.14
61
+ - The `ChangesCompiler` now always processes local collections. (Even if they don't have edit resources.) This fixes an
62
+ issue with recurring appointments in the front-end.
63
+
64
+ ##v1.13
65
+ - Add option to exclude itemTypes during createLocalEntries.
66
+
67
+ ##v1.12
68
+ - **Breaking:** `ItemResource.isNew` returns true *only* if the resource was created using
69
+ `ItemAdministrator.getNewResource` or `ItemAdministrator.getItemByDef`. This fixes an issue where items where removed
70
+ from the local cache inadvertently.
71
+ - The `start`, `commit` and `rollback` functions of `EditResource` now return the resource itself to facilitate chaining.
72
+ - When calling `CollectionEntry.revertChanges`, callbacks like `onAdd` / `onRemove` and `onActivate` / `onDeactivate`
73
+ are now respected. This fixes an issue where items where *not* removed from the local cache.
74
+ - When removing *local* items from collections, they are removed from `initial` as well as `modified`. This fixes an
75
+ issue where changes were being detected continuously.
76
+ - Updated the order of requests in `changesProcessor`. The `update` request is now executed before the `delete` request,
77
+ except when updating documents. This fixes several issues.
78
+ - `CollectionCache` now uses a map instead of an array to store collections. This fixes an issue where the same
79
+ collection was added multiple times.
80
+ - Updated all models to use dependency objects. This increases ease of debugging.
81
+
82
+ ##v.1.11
83
+ - Fixed issue that occurs when saving when having an existing item refer to a newly created item.
84
+ - **Breaking:** Removed `ItemResourceService.isNewResource`.
85
+ - **Breaking:** Renamed `ItemResource.isNewResource` to `ItemResource.isNew`. Removed parameter.
86
+ - `ItemResource.isNew` is equivalent to `ItemResource.isLocal`, while `EditResource.isNew` checks also checks for
87
+ completed transactions.
88
+
89
+ ##v.1.10
90
+ - Fixed issue where changes on different subtabs were not detected.
91
+
92
+ ##v1.1.9
93
+ - Exposed `noop` function on `RmCore` class.
94
+ > This is used in order to check whether a callback has a default value.
95
+ - Added `copyRequestColumns` function to `ColumnUtil` class.
96
+ - Made parameters of `ItemAdministrator.saveCurrentLocalCache` and `LocalCache.save` optional.
97
+ - **Breaking:** Reordered parameters of `ChangesProcessor.execute` to be consistent with
98
+ `ItemAdministrator.saveCurrentLocalCache`. The new order is `singleItems` - `collections` - `parameters` -
99
+ `breakUpByParent` - `onAfterCreateCallback`.
100
+
101
+ ##v1.1.8
102
+ - Set default value for `params` to `{filter: false}` in `request` function in `ColumnHandler` class.
103
+
104
+ ##v1.1.7
105
+ - Fixed issue where cached item entries or collection entries wouldn't be added to the local cache.
106
+
107
+ ##v1.1.6
108
+ - Fixed issue with deferred item entries.
109
+ - Re-enable changes watcher after save.
110
+ - Added optional `id` parameter to `LocalCache` constructor.
111
+
112
+ ##v1.1.5
113
+ - Added `clearItem` function to `LocalCache` class.
114
+
115
+ ##v.1.1.4
116
+ - Fix issue where items where not added to the local cache automatically when they where added to a collection.
117
+ > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add
118
+ the items to the local cache.
119
+ > In other instances this might be debatable because it doesn't do any real harm. *Not*
120
+ doing it however can definitely be harmful.
121
+
122
+ ##v.1.1.3
123
+ - Fixed an issue where all collections in a local cache would be cleared.
124
+ - **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
125
+ `LocalCacheManagerInterface`.
126
+
127
+ ##v1.1.2
128
+ - Fixed an issue concerning derived values.
129
+
130
+ ## v1.1.1
131
+ - Fixed an issue where changes wouldn't be detected.
132
+ - **Breaking:** Removed the `_hasChanges` function in the `localCache` class. If you want to force changes detection,
133
+ call `detectChanges` instead. Otherwise, rely on the `hasChanges` variable.
134
+ - **Breaking:** Removed the `enableWatcher` and `disableWatcher` functions. Use `enableChangesWatcher` and
135
+ `disableChangesWatcher` instead.
136
+
137
+ ## v1.1.0
138
+ ### Development
139
+
140
+ #### Strict TypeScript compilation
141
+ Added the following TypeScript compiler options:
142
+ - noImplicitThis
143
+ - noImplicitReturns
144
+ - strictNullChecks
145
+ - noUnusedLocals
146
+ - noUnusedParameters
147
+
148
+ I would advise enabling these for all TypeScript projects from now on.
149
+
150
+ #### Ordered imports and dependencies
151
+ Imports are now ordered alphabetically and grouped by folder. Added a TSLint option to enforce this.
152
+ Please note that this also applies for imports from the folder the file is currently in.
153
+ For example, in `models/ItemResource.ts`, `itemEntry` should be imported like so:
154
+ `import { ItemEntry } from '../models';`
155
+
156
+ Also, factory and class dependencies should be ordered alphabetically as well. This will make it easier to add and
157
+ remove dependencies in the future.
158
+
159
+ ### Breaking changes
160
+
161
+ - Renamed `changesCompiler` to `changesCompilation`, `changesCompilerFactory` to `changesCompilationFactory`,
162
+ `moduleChangesCompiler` to `moduleChangesCompilation` and `moduleChangesCompilerFactory` to
163
+ `moduleChangesCompilationFactory`.
164
+ - Removed the `allLinks` parameter from the `query` function definition in the `ApiRequestServiceInterface`. This is
165
+ no longer supported in the back-end.
166
+
167
+ #### Item and collection entries
168
+ - Moved *all* functions that handle item entries from the `ItemEntryService` to the `ItemEntry` class.
169
+ - Added the following functions to `ItemEntryService`:
170
+ - `createLocalConversionMap`;
171
+ - `expandLocalConversionMap`;
172
+ - `expandConversionMap`;
173
+ - `batchExpandConversionMap`;
174
+ - `batchClone`.
175
+ - Cloning of item entries now works slightly differently. The function will attempt to generate a new
176
+ item ID, and update the conversion map accordingly, but will respect the item ID that is already there.
177
+
178
+ #### Rework item caching
179
+ Newly created item entries and collection entries are no longer added to the global *or* local cache by default.
180
+ All entries are added to the global cache on save. Item entries are added to the local cache when resources are created
181
+ using the item administrator or when resources are created when adding the items to a collection.
182
+
183
+ > This will increase reliability by ensuring the global cache is no longer 'polluted' with local items. Also, this will
184
+ > allow for the creation item and collection entries without caching them directly. This is required for the copying and
185
+ > pasting of items.
186
+
187
+ Other changes:
188
+
189
+ - Moved `saveLocal` to `ItemAdministrator`;
190
+ - `ItemAdministrator.fetchTitle` should now be called instead of `ItemHandler.fetchTitle`;
191
+ - The `ItemAdministrator` collection matching functions (`addToCollections`, `removeFromCollections`) should now be
192
+ called instead of those in the `CollectionHandler`. The `CollectionHandler` should only be used to reflect changes
193
+ already on the backend. (Use `getCollectionMatcher`.)
194
+
195
+
196
+ ##v1.0.33
197
+ - Really fix types path
198
+
199
+ ##v1.0.33
200
+ - Fix types path
201
+
202
+ ##v1.0.32
203
+ - Update `tsconfig.json` to put definitions in the root folder
204
+ > The app had an issue with AOT compilation because of this
205
+
206
+ ##v1.0.31
207
+ - Fix `columnHandler.fetchItemTypeTranslations`
208
+ > It incorrectly looped over the response map, it should now work again
209
+
210
+ ##v1.0.30
211
+ - Remove `updateTabParams` from LocalCacheManagerInterface
212
+ > The function wasn't used
213
+
214
+ - Reworked class export
215
+ > Imports are now done from @rentman/rm-core, old imports are broken. This is because the old export structure didn't always work
216
+
217
+ ##v1.0.29
218
+ - Fix inverted inArray check in CollectionEntry.removeItems
219
+ > A delete message from the socket deleted all BUT the deleted items, this should now be fixed
220
+
221
+ ##v1.0.28
222
+ Bug fixes only
223
+
224
+ ##v1.0.27
225
+ - `ItemEntry.initial` is now undefined by default
226
+ > In the SocketMessageHandler we use this check to see if an ItemEntry is a stub
227
+
228
+ ##v1.0.26
229
+ Bundle both minified and unminified code, include sourcemaps from dev build
230
+
231
+ ##v1.0.24, v1.0.25
232
+ ! Use version `v1.0.26` !
233
+
234
+ - The core now expects a `promiseInterface` that should implement the provided `promiseInterface`
235
+ > We need to be able to hook into the promises in order to call a digest cycle to update the ui in the frontend
236
+
237
+ - Rename `ItemEntry.entryId` to `ItemEntry.id
238
+ > It used to be called `id`, but it was changed in the seperation of the core.
239
+ > You can use the `id` to uniquely identify an entry, since itemId can be updated (local to saved id)
240
+
241
+ - Rename ItemResource `startTransaction` to `start`
242
+ > Other functions are called `commit` and `rollback` so having 'transaction' only for start doesn't make much sense
243
+
244
+ - `SocketMessageHandler.onMessageReceived` now returns a promise
245
+ > You can now use the updated items or hook into the result to update the ui for example
246
+
247
+
248
+ ##v1.0.23
249
+ - Rename ResourceCache to LocalCache
250
+ > LocalCache only caches local items (name better reflects functionality)
251
+
252
+ - Remove getter/setter for hasChanges
253
+ > hasChanges is called in a digest loop in the frontend, so for performance reasons we don't want to recompute the value every time
254
+
255
+ - Remove `_getCollection` from ItemAdministrator
256
+ > `_getCollection` is now named `getCollection` and the old `getCollection` is removed. The query is part of the
257
+ > options and should not be given as a separate argument. This was included to support the frontend
258
+
259
+ - Remove `saveCurrentTab` from ItemAdministrator
260
+ > `saveCurrentTab` makes no sense because the core has no concept of tabs, you should use `saveCurrentLocalCache` instead
261
+
262
+ - Remove `getTabEntry` and `resetTabEntry` from ItemAdministrator
263
+ > `getTabEntry` and `resetTabEntry` make no sense because the core has no concept of tabs, you should use `getLocalCache` and `resetLocalCache` instead
264
+
@@ -30,7 +30,7 @@ export declare class ApiFormatter {
30
30
  formatRequestDate(value: any): any;
31
31
  formatRequestDuration(value: any): any;
32
32
  formatRequestColor(value: any): any;
33
- getDefaultValue(columnType: any): false | "" | 0 | moment.Moment | moment.Duration | "0" | "#000000" | null;
33
+ getDefaultValue(columnType: any): false | 0 | "" | moment.Moment | moment.Duration | "0" | "#000000" | null;
34
34
  isDefaultValue(columnType: any, value: any): boolean;
35
35
  clone(columnType: any, value: any): any;
36
36
  getCloneFunction(columnType: any): (date: any) => any;
@@ -1,17 +1,14 @@
1
1
  import { ColumnSet, ColumnUtil } from '../classes';
2
- import { ColumnSetFactory } from '../factories';
3
- import { ColumnExpansionResult, ItemType, RequestColumns, ResponseColumnMap } from '../types';
2
+ import { ColumnExpansionResult, ItemType, RequestColumn, RequestColumns, ResponseColumnMap } from '../types';
4
3
  export declare class ColumnExpansion {
5
- private columnSetFactory;
6
4
  private columnUtil;
7
5
  itemType: ItemType;
8
- requestColumns: RequestColumns;
9
6
  responseColumns: ResponseColumnMap;
10
7
  expansionMap: {
11
8
  [columnSetId: number]: ColumnExpansionResult;
12
9
  };
13
10
  requestColumnsTrue: boolean;
14
- constructor(columnSetFactory: ColumnSetFactory, columnUtil: ColumnUtil, itemType: ItemType, requestColumns: RequestColumns, responseColumns: ResponseColumnMap);
11
+ requestColumns: RequestColumn[];
12
+ constructor(columnUtil: ColumnUtil, itemType: ItemType, requestColumns: RequestColumns, responseColumns: ResponseColumnMap);
15
13
  run(columnSet: ColumnSet): ColumnExpansionResult | null;
16
- private expandColumnInfo(columnSet);
17
14
  }
@@ -1,10 +1,11 @@
1
1
  import { ColumnHandler, ColumnInfo, ColumnUtil } from '../classes';
2
- import { ColumnInfoFactory } from '../factories';
3
- import { RequestColumns, ResponseColumnMap } from '../types';
2
+ import { ColumnInfoFactory, ColumnSetFactory } from '../factories';
3
+ import { ColumnExpansionResult, RequestColumns, ResponseColumnMap } from '../types';
4
4
  export declare class ColumnSet {
5
5
  private columnHandler;
6
6
  private columnUtil;
7
7
  private columnInfoFactory;
8
+ private columnSetFactory;
8
9
  itemType: any;
9
10
  request: RequestColumns;
10
11
  id: number;
@@ -25,7 +26,7 @@ export declare class ColumnSet {
25
26
  item: ColumnInfo[];
26
27
  notItem: ColumnInfo[];
27
28
  enableCaching: boolean;
28
- constructor(columnHandler: ColumnHandler, columnUtil: ColumnUtil, columnInfoFactory: ColumnInfoFactory, itemType: any, request: RequestColumns);
29
+ constructor(columnHandler: ColumnHandler, columnUtil: ColumnUtil, columnInfoFactory: ColumnInfoFactory, columnSetFactory: ColumnSetFactory, itemType: any, request: RequestColumns);
29
30
  resolve(responseColumns: ResponseColumnMap, enableCaching?: boolean, includeIdColumn?: boolean): this;
30
31
  expandRequestColumns(columns: RequestColumns): void;
31
32
  isSupersetOf(columns: RequestColumns): any;
@@ -33,4 +34,5 @@ export declare class ColumnSet {
33
34
  private processRequestColumns(responseColumns, includeIdColumn);
34
35
  private getRequestColumnInfo(requestColumn, itemType, parent, responseColumns);
35
36
  private getColumnInfo(columnId, itemType, children, parent, responseColumns);
37
+ expand(requestColumns: RequestColumns, requestColumnsTrue: boolean, responseColumns: ResponseColumnMap): ColumnExpansionResult;
36
38
  }
@@ -86,7 +86,7 @@ export declare class ItemAdministrator {
86
86
  resetLocalCache(): void;
87
87
  addToCollections(itemEntries: ItemEntry[], resultCollectionResource?: CollectionResource): ItemResource[] | null;
88
88
  removeFromCollections(itemEntries: ItemEntry[], resultCollectionResource?: CollectionResource): ItemResource[] | null;
89
- saveLocal(itemResource: ItemResource): Promise<any>;
89
+ saveLocal(itemResource: ItemResource): Promise<ItemResource>;
90
90
  updateItemIdMap(collectionMap: any, conversionMap: any): void;
91
91
  createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: any, processOptions?: boolean): CollectionResource;
92
92
  createItemResource(itemEntry: ItemEntry, options: any, isRoot: boolean): ItemResource;