@rentman/rm-core 12.0.1 → 12.0.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 +4 -0
- package/dist/rm-core.js +73 -59
- package/dist/rm-core.min.js +1 -1
- package/dist/types/src/classes/ModuleChangesCompilation.d.ts +3 -4
- package/dist/types/src/classes/cache/AbstractCache.d.ts +7 -0
- package/dist/types/src/factories/ModuleChangesCompilationFactory.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ApiRequestItemMap, TransactionCache } from '../internal';
|
|
2
|
+
import { ApiRequestItemMap, LinkTreeServiceInterface, TransactionCache } from '../internal';
|
|
3
3
|
export declare type ModuleChangesCompilationResult = {
|
|
4
4
|
itemType: ApiEnumItemType;
|
|
5
5
|
itemId: ItemId;
|
|
6
6
|
items: ApiRequestItemMap;
|
|
7
7
|
};
|
|
8
8
|
export declare class ModuleChangesCompilation {
|
|
9
|
+
private linkTreeService;
|
|
9
10
|
private transaction;
|
|
10
|
-
parentMap: any;
|
|
11
11
|
destination: ApiRequestItemMap;
|
|
12
|
-
constructor(transaction: TransactionCache);
|
|
12
|
+
constructor(linkTreeService: LinkTreeServiceInterface, transaction: TransactionCache);
|
|
13
13
|
process(): ModuleChangesCompilationResult;
|
|
14
|
-
private createParentMap;
|
|
15
14
|
private processItems;
|
|
16
15
|
private processItem;
|
|
17
16
|
private getItemsByParent;
|
|
@@ -64,6 +64,13 @@ export declare abstract class AbstractCache {
|
|
|
64
64
|
abstract getParent<ItemTypeType extends ApiEnumItemType = any>(itemEntry: ItemEntry<ItemTypeType>, fromInitial?: boolean, providedFields?: FieldMap<ItemTypeType>): EntryParentNull;
|
|
65
65
|
abstract getLocalItemEntryChangesTuple<ItemTypeType extends ApiEnumItemType>(itemEntryId: ItemEntry<ItemTypeType>['id']): ItemEntryChangesTuple<ItemTypeType>;
|
|
66
66
|
abstract applyChangesDelta(changesDelta: ChangesDelta): PromiseInterface<ChangesDeltaResult>;
|
|
67
|
+
/**
|
|
68
|
+
* Differs from {@link getParent getParent} that it only does minimal field lookups (but you cannot provide it with fields) instead of doing {@link ItemHandlerBase.collectFields collectFields}
|
|
69
|
+
* todo: clean this up some time (merge the 2 functions)
|
|
70
|
+
*
|
|
71
|
+
* @param itemEntry
|
|
72
|
+
*/
|
|
73
|
+
getParentFast(itemEntry: ItemEntry): EntryParentNull;
|
|
67
74
|
protected getParentFromFields<ItemTypeType extends ApiEnumItemType = any>(itemEntry: ItemEntry<ItemTypeType>, fields?: FieldMap<ItemTypeType>): EntryParentNull;
|
|
68
75
|
/**
|
|
69
76
|
* @description
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { ModuleChangesCompilation, TransactionCache } from '../internal';
|
|
1
|
+
import { LinkTreeServiceInterface, ModuleChangesCompilation, TransactionCache } from '../internal';
|
|
2
2
|
export declare class ModuleChangesCompilationFactory {
|
|
3
|
+
private linkTreeService;
|
|
4
|
+
constructor(linkTreeService: LinkTreeServiceInterface);
|
|
3
5
|
construct(transaction: TransactionCache): ModuleChangesCompilation;
|
|
4
6
|
}
|