@rentman/rm-core 1.1.7 → 1.1.8-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -1,164 +1,167 @@
1
- #Changelog
2
- Contains new features, breaking changes and their reasoning
3
-
4
- ##v1.1.7
5
- - Fixed issue where cached item entries or collection entries wouldn't be added to the local cache.
6
-
7
- ##v1.1.6
8
- - Fixed issue with deferred item entries.
9
- - Re-enable changes watcher after save.
10
- - Added optional `id` parameter to `LocalCache` constructor.
11
-
12
- ##v1.1.5
13
- - Added `clearItem` function to `LocalCache` class.
14
-
15
- ##v.1.1.4
16
- - Fix issue where items where not added to the local cache automatically when they where added to a collection.
17
- > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add
18
- the items to the local cache.
19
- > In other instances this might be debatable because it doesn't do any real harm. *Not*
20
- doing it however can definitely be harmful.
21
-
22
- ##v.1.1.3
23
- - Fixed an issue where all collections in a local cache would be cleared.
24
- - **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
25
- `LocalCacheManagerInterface`.
26
-
27
- ##v1.1.2
28
- - Fixed an issue concerning derived values.
29
-
30
- ## v1.1.1
31
- - Fixed an issue where changes wouldn't be detected.
32
- - **Breaking:** Removed the `_hasChanges` function in the `localCache` class. If you want to force changes detection,
33
- call `detectChanges` instead. Otherwise, rely on the `hasChanges` variable.
34
- - **Breaking:** Removed the `enableWatcher` and `disableWatcher` functions. Use `enableChangesWatcher` and
35
- `disableChangesWatcher` instead.
36
-
37
- ## v1.1.0
38
- ### Development
39
-
40
- #### Strict TypeScript compilation
41
- Added the following TypeScript compiler options:
42
- - noImplicitThis
43
- - noImplicitReturns
44
- - strictNullChecks
45
- - noUnusedLocals
46
- - noUnusedParameters
47
-
48
- I would advise enabling these for all TypeScript projects from now on.
49
-
50
- #### Ordered imports and dependencies
51
- Imports are now ordered alphabetically and grouped by folder. Added a TSLint option to enforce this.
52
- Please note that this also applies for imports from the folder the file is currently in.
53
- For example, in `models/ItemResource.ts`, `itemEntry` should be imported like so:
54
- `import { ItemEntry } from '../models';`
55
-
56
- Also, factory and class dependencies should be ordered alphabetically as well. This will make it easier to add and
57
- remove dependencies in the future.
58
-
59
- ### Breaking changes
60
-
61
- - Renamed `changesCompiler` to `changesCompilation`, `changesCompilerFactory` to `changesCompilationFactory`,
62
- `moduleChangesCompiler` to `moduleChangesCompilation` and `moduleChangesCompilerFactory` to
63
- `moduleChangesCompilationFactory`.
64
- - Removed the `allLinks` parameter from the `query` function definition in the `ApiRequestServiceInterface`. This is
65
- no longer supported in the back-end.
66
-
67
- #### Item and collection entries
68
- - Moved *all* functions that handle item entries from the `ItemEntryService` to the `ItemEntry` class.
69
- - Added the following functions to `ItemEntryService`:
70
- - `createLocalConversionMap`;
71
- - `expandLocalConversionMap`;
72
- - `expandConversionMap`;
73
- - `batchExpandConversionMap`;
74
- - `batchClone`.
75
- - Cloning of item entries now works slightly differently. The function will attempt to generate a new
76
- item ID, and update the conversion map accordingly, but will respect the item ID that is already there.
77
-
78
- #### Rework item caching
79
- Newly created item entries and collection entries are no longer added to the global *or* local cache by default.
80
- All entries are added to the global cache on save. Item entries are added to the local cache when resources are created
81
- using the item administrator or when resources are created when adding the items to a collection.
82
-
83
- > This will increase reliability by ensuring the global cache is no longer 'polluted' with local items. Also, this will
84
- > allow for the creation item and collection entries without caching them directly. This is required for the copying and
85
- > pasting of items.
86
-
87
- Other changes:
88
-
89
- - Moved `saveLocal` to `ItemAdministrator`;
90
- - `ItemAdministrator.fetchTitle` should now be called instead of `ItemHandler.fetchTitle`;
91
- - The `ItemAdministrator` collection matching functions (`addToCollections`, `removeFromCollections`) should now be
92
- called instead of those in the `CollectionHandler`. The `CollectionHandler` should only be used to reflect changes
93
- already on the backend. (Use `getCollectionMatcher`.)
94
-
95
-
96
- ##v1.0.33
97
- - Really fix types path
98
-
99
- ##v1.0.33
100
- - Fix types path
101
-
102
- ##v1.0.32
103
- - Update `tsconfig.json` to put definitions in the root folder
104
- > The app had an issue with AOT compilation because of this
105
-
106
- ##v1.0.31
107
- - Fix `columnHandler.fetchItemTypeTranslations`
108
- > It incorrectly looped over the response map, it should now work again
109
-
110
- ##v1.0.30
111
- - Remove `updateTabParams` from LocalCacheManagerInterface
112
- > The function wasn't used
113
-
114
- - Reworked class export
115
- > Imports are now done from @rentman/rm-core, old imports are broken. This is because the old export structure didn't always work
116
-
117
- ##v1.0.29
118
- - Fix inverted inArray check in CollectionEntry.removeItems
119
- > A delete message from the socket deleted all BUT the deleted items, this should now be fixed
120
-
121
- ##v1.0.28
122
- Bug fixes only
123
-
124
- ##v1.0.27
125
- - `ItemEntry.initial` is now undefined by default
126
- > In the SocketMessageHandler we use this check to see if an ItemEntry is a stub
127
-
128
- ##v1.0.26
129
- Bundle both minified and unminified code, include sourcemaps from dev build
130
-
131
- ##v1.0.24, v1.0.25
132
- ! Use version `v1.0.26` !
133
-
134
- - The core now expects a `promiseInterface` that should implement the provided `promiseInterface`
135
- > We need to be able to hook into the promises in order to call a digest cycle to update the ui in the frontend
136
-
137
- - Rename `ItemEntry.entryId` to `ItemEntry.id
138
- > It used to be called `id`, but it was changed in the seperation of the core.
139
- > You can use the `id` to uniquely identify an entry, since itemId can be updated (local to saved id)
140
-
141
- - Rename ItemResource `startTransaction` to `start`
142
- > Other functions are called `commit` and `rollback` so having 'transaction' only for start doesn't make much sense
143
-
144
- - `SocketMessageHandler.onMessageReceived` now returns a promise
145
- > You can now use the updated items or hook into the result to update the ui for example
146
-
147
-
148
- ##v1.0.23
149
- - Rename ResourceCache to LocalCache
150
- > LocalCache only caches local items (name better reflects functionality)
151
-
152
- - Remove getter/setter for hasChanges
153
- > hasChanges is called in a digest loop in the frontend, so for performance reasons we don't want to recompute the value every time
154
-
155
- - Remove `_getCollection` from ItemAdministrator
156
- > `_getCollection` is now named `getCollection` and the old `getCollection` is removed. The query is part of the
157
- > options and should not be given as a separate argument. This was included to support the frontend
158
-
159
- - Remove `saveCurrentTab` from ItemAdministrator
160
- > `saveCurrentTab` makes no sense because the core has no concept of tabs, you should use `saveCurrentLocalCache` instead
161
-
162
- - Remove `getTabEntry` and `resetTabEntry` from ItemAdministrator
163
- > `getTabEntry` and `resetTabEntry` make no sense because the core has no concept of tabs, you should use `getLocalCache` and `resetLocalCache` instead
164
-
1
+ #Changelog
2
+ Contains new features, breaking changes and their reasoning
3
+
4
+ ##v1.1.8
5
+ - Set default value for `params` to `{filter: false}` in `request` function in `ColumnHandler` class.
6
+
7
+ ##v1.1.7
8
+ - Fixed issue where cached item entries or collection entries wouldn't be added to the local cache.
9
+
10
+ ##v1.1.6
11
+ - Fixed issue with deferred item entries.
12
+ - Re-enable changes watcher after save.
13
+ - Added optional `id` parameter to `LocalCache` constructor.
14
+
15
+ ##v1.1.5
16
+ - Added `clearItem` function to `LocalCache` class.
17
+
18
+ ##v.1.1.4
19
+ - Fix issue where items where not added to the local cache automatically when they where added to a collection.
20
+ > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add
21
+ the items to the local cache.
22
+ > In other instances this might be debatable because it doesn't do any real harm. *Not*
23
+ doing it however can definitely be harmful.
24
+
25
+ ##v.1.1.3
26
+ - Fixed an issue where all collections in a local cache would be cleared.
27
+ - **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
28
+ `LocalCacheManagerInterface`.
29
+
30
+ ##v1.1.2
31
+ - Fixed an issue concerning derived values.
32
+
33
+ ## v1.1.1
34
+ - Fixed an issue where changes wouldn't be detected.
35
+ - **Breaking:** Removed the `_hasChanges` function in the `localCache` class. If you want to force changes detection,
36
+ call `detectChanges` instead. Otherwise, rely on the `hasChanges` variable.
37
+ - **Breaking:** Removed the `enableWatcher` and `disableWatcher` functions. Use `enableChangesWatcher` and
38
+ `disableChangesWatcher` instead.
39
+
40
+ ## v1.1.0
41
+ ### Development
42
+
43
+ #### Strict TypeScript compilation
44
+ Added the following TypeScript compiler options:
45
+ - noImplicitThis
46
+ - noImplicitReturns
47
+ - strictNullChecks
48
+ - noUnusedLocals
49
+ - noUnusedParameters
50
+
51
+ I would advise enabling these for all TypeScript projects from now on.
52
+
53
+ #### Ordered imports and dependencies
54
+ Imports are now ordered alphabetically and grouped by folder. Added a TSLint option to enforce this.
55
+ Please note that this also applies for imports from the folder the file is currently in.
56
+ For example, in `models/ItemResource.ts`, `itemEntry` should be imported like so:
57
+ `import { ItemEntry } from '../models';`
58
+
59
+ Also, factory and class dependencies should be ordered alphabetically as well. This will make it easier to add and
60
+ remove dependencies in the future.
61
+
62
+ ### Breaking changes
63
+
64
+ - Renamed `changesCompiler` to `changesCompilation`, `changesCompilerFactory` to `changesCompilationFactory`,
65
+ `moduleChangesCompiler` to `moduleChangesCompilation` and `moduleChangesCompilerFactory` to
66
+ `moduleChangesCompilationFactory`.
67
+ - Removed the `allLinks` parameter from the `query` function definition in the `ApiRequestServiceInterface`. This is
68
+ no longer supported in the back-end.
69
+
70
+ #### Item and collection entries
71
+ - Moved *all* functions that handle item entries from the `ItemEntryService` to the `ItemEntry` class.
72
+ - Added the following functions to `ItemEntryService`:
73
+ - `createLocalConversionMap`;
74
+ - `expandLocalConversionMap`;
75
+ - `expandConversionMap`;
76
+ - `batchExpandConversionMap`;
77
+ - `batchClone`.
78
+ - Cloning of item entries now works slightly differently. The function will attempt to generate a new
79
+ item ID, and update the conversion map accordingly, but will respect the item ID that is already there.
80
+
81
+ #### Rework item caching
82
+ Newly created item entries and collection entries are no longer added to the global *or* local cache by default.
83
+ All entries are added to the global cache on save. Item entries are added to the local cache when resources are created
84
+ using the item administrator or when resources are created when adding the items to a collection.
85
+
86
+ > This will increase reliability by ensuring the global cache is no longer 'polluted' with local items. Also, this will
87
+ > allow for the creation item and collection entries without caching them directly. This is required for the copying and
88
+ > pasting of items.
89
+
90
+ Other changes:
91
+
92
+ - Moved `saveLocal` to `ItemAdministrator`;
93
+ - `ItemAdministrator.fetchTitle` should now be called instead of `ItemHandler.fetchTitle`;
94
+ - The `ItemAdministrator` collection matching functions (`addToCollections`, `removeFromCollections`) should now be
95
+ called instead of those in the `CollectionHandler`. The `CollectionHandler` should only be used to reflect changes
96
+ already on the backend. (Use `getCollectionMatcher`.)
97
+
98
+
99
+ ##v1.0.33
100
+ - Really fix types path
101
+
102
+ ##v1.0.33
103
+ - Fix types path
104
+
105
+ ##v1.0.32
106
+ - Update `tsconfig.json` to put definitions in the root folder
107
+ > The app had an issue with AOT compilation because of this
108
+
109
+ ##v1.0.31
110
+ - Fix `columnHandler.fetchItemTypeTranslations`
111
+ > It incorrectly looped over the response map, it should now work again
112
+
113
+ ##v1.0.30
114
+ - Remove `updateTabParams` from LocalCacheManagerInterface
115
+ > The function wasn't used
116
+
117
+ - Reworked class export
118
+ > Imports are now done from @rentman/rm-core, old imports are broken. This is because the old export structure didn't always work
119
+
120
+ ##v1.0.29
121
+ - Fix inverted inArray check in CollectionEntry.removeItems
122
+ > A delete message from the socket deleted all BUT the deleted items, this should now be fixed
123
+
124
+ ##v1.0.28
125
+ Bug fixes only
126
+
127
+ ##v1.0.27
128
+ - `ItemEntry.initial` is now undefined by default
129
+ > In the SocketMessageHandler we use this check to see if an ItemEntry is a stub
130
+
131
+ ##v1.0.26
132
+ Bundle both minified and unminified code, include sourcemaps from dev build
133
+
134
+ ##v1.0.24, v1.0.25
135
+ ! Use version `v1.0.26` !
136
+
137
+ - The core now expects a `promiseInterface` that should implement the provided `promiseInterface`
138
+ > We need to be able to hook into the promises in order to call a digest cycle to update the ui in the frontend
139
+
140
+ - Rename `ItemEntry.entryId` to `ItemEntry.id
141
+ > It used to be called `id`, but it was changed in the seperation of the core.
142
+ > You can use the `id` to uniquely identify an entry, since itemId can be updated (local to saved id)
143
+
144
+ - Rename ItemResource `startTransaction` to `start`
145
+ > Other functions are called `commit` and `rollback` so having 'transaction' only for start doesn't make much sense
146
+
147
+ - `SocketMessageHandler.onMessageReceived` now returns a promise
148
+ > You can now use the updated items or hook into the result to update the ui for example
149
+
150
+
151
+ ##v1.0.23
152
+ - Rename ResourceCache to LocalCache
153
+ > LocalCache only caches local items (name better reflects functionality)
154
+
155
+ - Remove getter/setter for hasChanges
156
+ > hasChanges is called in a digest loop in the frontend, so for performance reasons we don't want to recompute the value every time
157
+
158
+ - Remove `_getCollection` from ItemAdministrator
159
+ > `_getCollection` is now named `getCollection` and the old `getCollection` is removed. The query is part of the
160
+ > options and should not be given as a separate argument. This was included to support the frontend
161
+
162
+ - Remove `saveCurrentTab` from ItemAdministrator
163
+ > `saveCurrentTab` makes no sense because the core has no concept of tabs, you should use `saveCurrentLocalCache` instead
164
+
165
+ - Remove `getTabEntry` and `resetTabEntry` from ItemAdministrator
166
+ > `getTabEntry` and `resetTabEntry` make no sense because the core has no concept of tabs, you should use `getLocalCache` and `resetLocalCache` instead
167
+
@@ -27,7 +27,7 @@ export declare class ApiFormatter {
27
27
  formatRequestDate(value: any): any;
28
28
  formatRequestDuration(value: any): any;
29
29
  formatRequestColor(value: any): any;
30
- getDefaultValue(columnType: any): false | 0 | "" | moment.Moment | moment.Duration | "0" | "#000000" | null;
30
+ getDefaultValue(columnType: any): false | moment.Moment | 0 | moment.Duration | "" | "0" | "#000000" | null;
31
31
  isDefaultValue(columnType: any, value: any): any;
32
32
  clone(columnType: any, value: any): any;
33
33
  getCloneFunction(columnType: any): (date: any) => any;
@@ -10,7 +10,9 @@ export declare class ColumnHandler {
10
10
  setColumn(itemType: any, responseColumn: any): any;
11
11
  setColumns(itemType: any, requestColumns: any, responseColumns: any): {};
12
12
  fetchItemTypeTranslations(itemTypes: any): Promise<any>;
13
- request(itemType: any, columns: any, params?: {}): Promise<any>;
14
- fetch(itemType: any, requestColumns: any, params?: {}): Promise<any>;
13
+ request(itemType: any, columns: any, params?: {
14
+ filter: boolean;
15
+ }): Promise<any>;
16
+ fetch(itemType: any, requestColumns: any, params?: any): Promise<any>;
15
17
  fetchAll(itemType: any): Promise<any>;
16
18
  }