@rentman/rm-core 1.1.3 → 1.1.5
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 +10 -0
- package/dist/dist/classes/CollectionMatcher.d.ts +2 -1
- package/dist/dist/classes/LocalCache.d.ts +6 -4
- package/dist/dist/factories/CollectionMatcherFactory.d.ts +1 -1
- package/dist/dist/models/CollectionEntry.d.ts +2 -2
- package/dist/rm-core.js +68 -53
- package/dist/rm-core.min.js +1 -1
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
#Changelog
|
|
2
2
|
Contains new features, breaking changes and their reasoning
|
|
3
3
|
|
|
4
|
+
##v1.1.5
|
|
5
|
+
- Added `clearItem` function to `LocalCache` class.
|
|
6
|
+
|
|
7
|
+
##v.1.1.4
|
|
8
|
+
- Fix issue where items where not added to the local cache automatically when they where added to a collection.
|
|
9
|
+
> This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add
|
|
10
|
+
the items to the local cache.
|
|
11
|
+
> In other instances this might be debatable because it doesn't do any real harm. *Not*
|
|
12
|
+
doing it however can definitely be harmful.
|
|
13
|
+
|
|
4
14
|
##v.1.1.3
|
|
5
15
|
- Fixed an issue where all collections in a local cache would be cleared.
|
|
6
16
|
- **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
|
|
@@ -5,6 +5,7 @@ export declare class CollectionMatcher {
|
|
|
5
5
|
private queryMatcherFactory;
|
|
6
6
|
private collectionCaches;
|
|
7
7
|
private updateInitial;
|
|
8
|
+
private callOnActivate;
|
|
8
9
|
map: {
|
|
9
10
|
[collectionEntryId: number]: {
|
|
10
11
|
collection: CollectionEntry;
|
|
@@ -16,7 +17,7 @@ export declare class CollectionMatcher {
|
|
|
16
17
|
};
|
|
17
18
|
};
|
|
18
19
|
};
|
|
19
|
-
constructor(queryMatcherFactory: QueryMatcherFactory, collectionCaches: CollectionCache[], updateInitial: boolean);
|
|
20
|
+
constructor(queryMatcherFactory: QueryMatcherFactory, collectionCaches: CollectionCache[], updateInitial: boolean, callOnActivate: boolean);
|
|
20
21
|
expand(itemEntry: ItemEntry): Window;
|
|
21
22
|
getCollectionsWithFittingItems(): CollectionEntry[];
|
|
22
23
|
addToCollections(resultResource?: CollectionResource | null): ItemResource[] | null;
|
|
@@ -26,6 +26,12 @@ export declare class LocalCache {
|
|
|
26
26
|
hasChanges: boolean;
|
|
27
27
|
rootItem: ItemEntry | undefined;
|
|
28
28
|
constructor(errorHandler: ErrorHandlerInterface, lockService: LockService, itemResourceFactory: ItemResourceFactory, collectionCacheFactory: CollectionCacheFactory, changesProcessorFactory: ChangesProcessorFactory, itemCacheFactory: ItemCacheFactory, collectionResourceFactory: CollectionResourceFactory, itemResourceService: ItemResourceService, promiseService: PromiseInterface);
|
|
29
|
+
createItemResource(itemEntry: ItemEntry, options: any, isRoot?: boolean): ItemResource;
|
|
30
|
+
createItemResources(itemEntries: ItemEntry[], options: any): ItemResource[];
|
|
31
|
+
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: any): CollectionResource;
|
|
32
|
+
createCollectionResources(collectionEntries: CollectionEntryParentIdMap, resourceOptions: any): {};
|
|
33
|
+
clearItem(itemResource: ItemResource): void;
|
|
34
|
+
clearItemEntry(itemEntry: ItemEntry): void;
|
|
29
35
|
clearCollection(collectionResource: CollectionResource): void;
|
|
30
36
|
clearResources(isSubTabChange?: boolean): void;
|
|
31
37
|
updateSingleItems(conversionMap: any): void;
|
|
@@ -39,10 +45,6 @@ export declare class LocalCache {
|
|
|
39
45
|
enableChangesWatcher(): void;
|
|
40
46
|
disableChangesWatcher(): void;
|
|
41
47
|
registerCallback(event: string, key: string, callback: any): () => boolean;
|
|
42
|
-
createItemResource(itemEntry: ItemEntry, options: any, isRoot?: boolean): ItemResource;
|
|
43
|
-
createItemResources(itemEntries: ItemEntry[], options: any): ItemResource[];
|
|
44
|
-
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: any): CollectionResource;
|
|
45
|
-
createCollectionResources(collectionEntries: CollectionEntryParentIdMap, resourceOptions: any): {};
|
|
46
48
|
onDeactivateItem(itemEntry: any): void;
|
|
47
49
|
onActivateItem(itemEntry: any): void;
|
|
48
50
|
}
|
|
@@ -3,5 +3,5 @@ import { QueryMatcherFactory } from '../factories';
|
|
|
3
3
|
export declare class CollectionMatcherFactory {
|
|
4
4
|
private queryMatcherFactory;
|
|
5
5
|
constructor(queryMatcherFactory: QueryMatcherFactory);
|
|
6
|
-
construct(collectionCaches: CollectionCache[], updateInitial: boolean): CollectionMatcher;
|
|
6
|
+
construct(collectionCaches: CollectionCache[], updateInitial: boolean, callOnActivate: boolean): CollectionMatcher;
|
|
7
7
|
}
|
|
@@ -32,13 +32,13 @@ export declare class CollectionEntry {
|
|
|
32
32
|
forEach(callback: (itemEntry: ItemEntry) => void): void;
|
|
33
33
|
getItemById(itemId: any): ItemEntry | undefined;
|
|
34
34
|
getIdArray(accumulator?: never[]): ItemId[];
|
|
35
|
-
addItems(itemEntries: any, resultResource: any, updateInitial?: boolean,
|
|
35
|
+
addItems(itemEntries: any, resultResource: any, updateInitial?: boolean, callOnAdd?: boolean, callOnActivate?: boolean): ItemResource[] | null;
|
|
36
36
|
removeItems(idArray: any, resultResource: any, updateInitial: any, enableCallback?: any): any;
|
|
37
37
|
clear(resultResource: any, updateInitial: any, enableCallback?: any): any;
|
|
38
38
|
handleRemovedItems(filterFunction: any, resultResource: any, updateInitial: any, enableCallback?: boolean): any;
|
|
39
39
|
expand(newColumns: any): Promise<any>;
|
|
40
40
|
extendQuery(callback: any): any;
|
|
41
|
-
extend(queryCallback: any, collectionResource: any,
|
|
41
|
+
extend(queryCallback: any, collectionResource: any, callOnAdd?: any, updateInitial?: any): Promise<any>;
|
|
42
42
|
queueReload(): void;
|
|
43
43
|
updateColumns(columnExpansion: any): void;
|
|
44
44
|
getAddedItems(returnItemIds?: boolean): (number | ItemEntry)[];
|