@rentman/rm-core 1.1.7 → 1.1.8-2
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 +167 -164
- package/dist/dist/classes/ColumnHandler.d.ts +4 -2
- package/dist/rm-core.js +44 -39
- package/dist/rm-core.min.js +1 -1
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,164 +1,167 @@
|
|
|
1
|
-
#Changelog
|
|
2
|
-
Contains new features, breaking changes and their reasoning
|
|
3
|
-
|
|
4
|
-
##v1.1.
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
##v1.1.
|
|
8
|
-
- Fixed issue
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- Added `
|
|
14
|
-
|
|
15
|
-
##
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
##
|
|
31
|
-
- Fixed an issue
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
`
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
- `
|
|
74
|
-
- `
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
##v1.0.33
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
##v1.0.
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
##v1.0.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
##v1.0.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
>
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
>
|
|
143
|
-
|
|
144
|
-
- `
|
|
145
|
-
>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
>
|
|
154
|
-
|
|
155
|
-
- Remove
|
|
156
|
-
>
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
>
|
|
161
|
-
|
|
162
|
-
- Remove `
|
|
163
|
-
> `
|
|
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
|
+
|
|
@@ -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?: {
|
|
14
|
-
|
|
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
|
}
|