@rentman/rm-core 1.4.0 → 1.5.1-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 +21 -0
- package/dist/rm-core.js +3059 -2805
- package/dist/rm-core.min.js +1 -1
- package/dist/src/classes/ApiFormatter.d.ts +0 -1
- package/dist/src/classes/BatchStatus.d.ts +4 -2
- package/dist/src/classes/ChangesCompilation.d.ts +12 -4
- package/dist/src/classes/ChangesProcessor.d.ts +11 -11
- package/dist/src/classes/CollectionEntryService.d.ts +4 -4
- package/dist/src/classes/CollectionHandler.d.ts +5 -4
- package/dist/src/classes/CollectionMatcher.d.ts +4 -4
- package/dist/src/classes/CollectionResourceService.d.ts +2 -2
- package/dist/src/classes/ColumnCache.d.ts +3 -3
- package/dist/src/classes/ColumnExpansion.d.ts +3 -2
- package/dist/src/classes/ColumnSet.d.ts +7 -7
- package/dist/src/classes/ColumnSubsetCache.d.ts +9 -0
- package/dist/src/classes/CreateRequest.d.ts +1 -1
- package/dist/src/classes/ItemAdministrator.d.ts +29 -67
- package/dist/src/classes/ItemCache.d.ts +2 -2
- package/dist/src/classes/ItemEntryService.d.ts +4 -4
- package/dist/src/classes/ItemHandler.d.ts +29 -46
- package/dist/src/classes/ItemRequestService.d.ts +2 -2
- package/dist/src/classes/LocalCache.d.ts +13 -12
- package/dist/src/classes/ModuleChangesCompilation.d.ts +4 -4
- package/dist/src/classes/QueryMatcher.d.ts +4 -4
- package/dist/src/classes/QueryParser.d.ts +10 -10
- package/dist/src/classes/SocketMessageHandler.d.ts +22 -18
- package/dist/src/classes/Util.d.ts +3 -1
- package/dist/src/classes/index.d.ts +1 -1
- package/dist/src/constants.d.ts +4 -2
- package/dist/src/core.d.ts +3 -3
- package/dist/src/factories/BatchStatusFactory.d.ts +2 -2
- package/dist/src/factories/CollectionEntryFactory.d.ts +9 -6
- package/dist/src/factories/CollectionResourceFactory.d.ts +4 -5
- package/dist/src/factories/ColumnSubsetCacheFactory.d.ts +7 -0
- package/dist/src/factories/ItemResourceFactory.d.ts +5 -6
- package/dist/src/factories/LocalCacheFactory.d.ts +2 -3
- package/dist/src/factories/index.d.ts +1 -0
- package/dist/src/interfaces/PromiseLibraryInterface.d.ts +2 -2
- package/dist/src/models/CollectionEditResource.d.ts +2 -2
- package/dist/src/models/CollectionEntry.d.ts +13 -10
- package/dist/src/models/CollectionEntryOptions.d.ts +20 -0
- package/dist/src/models/CollectionResource.d.ts +3 -3
- package/dist/src/models/CollectionResourceOptions.d.ts +38 -0
- package/dist/src/models/CollectionViewResource.d.ts +2 -2
- package/dist/src/models/EditResource.d.ts +2 -2
- package/dist/src/models/ItemEntry.d.ts +4 -4
- package/dist/src/models/ItemEntryOptions.d.ts +18 -0
- package/dist/src/models/ItemResource.d.ts +3 -3
- package/dist/src/models/ItemResourceOptions.d.ts +13 -0
- package/dist/src/models/ViewResource.d.ts +2 -2
- package/dist/src/models/index.d.ts +8 -4
- package/dist/src/types/ItemTypesCollection.d.ts +62 -4
- package/package.json +35 -35
- package/dist/src/classes/ItemResourceService.d.ts +0 -5
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { ENTRY_STATUS } from '../constants';
|
|
2
2
|
import { PromiseLibraryInterface } from '../interfaces';
|
|
3
|
-
import { EntryStatus, EntryStatusMap, ItemId, PromiseInterface } from '../types';
|
|
3
|
+
import { EntryStatus, EntryStatusMap, ItemId, ItemType, PromiseInterface } from '../types';
|
|
4
4
|
export declare class BatchStatus<T> {
|
|
5
5
|
private promiseService;
|
|
6
|
+
itemType: ItemType;
|
|
6
7
|
getItemId: (itemEntry: T) => ItemId;
|
|
7
8
|
getPromise: (itemEntry: T) => PromiseInterface<T>;
|
|
8
9
|
readonly requestStatus: ENTRY_STATUS[];
|
|
9
10
|
readonly remoteExpandStatus: ENTRY_STATUS[];
|
|
11
|
+
readonly localExpandStatus: ENTRY_STATUS[];
|
|
10
12
|
entries: EntryStatusMap<T>;
|
|
11
|
-
constructor(promiseService: PromiseLibraryInterface, getItemId: (itemEntry: T) => ItemId, getPromise: (itemEntry: T) => PromiseInterface<T>);
|
|
13
|
+
constructor(promiseService: PromiseLibraryInterface, itemType: ItemType, getItemId: (itemEntry: T) => ItemId, getPromise: (itemEntry: T) => PromiseInterface<T>);
|
|
12
14
|
add(entryStatus: EntryStatus<T>): void;
|
|
13
15
|
hasEntries(statusArray: ENTRY_STATUS[]): boolean;
|
|
14
16
|
hasRequests(): boolean;
|
|
@@ -2,6 +2,14 @@ import { CollectionCache, KeyService } from '../classes';
|
|
|
2
2
|
import { CollectionCacheFactory } from '../factories';
|
|
3
3
|
import { CollectionEntry, ItemEntry } from '../models';
|
|
4
4
|
import { EntryParent, EntryParentNull, ItemEntryMap, ItemId, ItemType } from '../types';
|
|
5
|
+
export declare type DeleteMapEntry = {
|
|
6
|
+
item: ItemEntry;
|
|
7
|
+
parent: EntryParentNull;
|
|
8
|
+
};
|
|
9
|
+
export declare type MoveMapEntry = {
|
|
10
|
+
item: ItemEntry;
|
|
11
|
+
parent: EntryParent;
|
|
12
|
+
};
|
|
5
13
|
export declare type CreateCompilation = {
|
|
6
14
|
[parentType: string]: {
|
|
7
15
|
[parentId: number]: ItemEntryMap;
|
|
@@ -13,7 +21,7 @@ export declare type DeleteCompilation = {
|
|
|
13
21
|
export declare type UpdateCompilation = ItemEntryMap;
|
|
14
22
|
export declare type MoveCompilation = {
|
|
15
23
|
[parentType: string]: {
|
|
16
|
-
[parentId: number]:
|
|
24
|
+
[parentId: number]: MoveMapEntry[];
|
|
17
25
|
};
|
|
18
26
|
};
|
|
19
27
|
export declare class ChangesCompilation {
|
|
@@ -36,8 +44,8 @@ export declare class ChangesCompilation {
|
|
|
36
44
|
addUpdateEntry(itemEntry: ItemEntry): void;
|
|
37
45
|
addCreateEntry(itemEntry: ItemEntry): void;
|
|
38
46
|
containsCreateEntry(itemType: ItemType, itemId: ItemId): boolean;
|
|
39
|
-
private createDeleteCompilation
|
|
47
|
+
private createDeleteCompilation;
|
|
40
48
|
postProcess(): void;
|
|
41
|
-
private processSingleItems
|
|
42
|
-
private processCollections
|
|
49
|
+
private processSingleItems;
|
|
50
|
+
private processCollections;
|
|
43
51
|
}
|
|
@@ -18,16 +18,16 @@ export declare class ChangesProcessor {
|
|
|
18
18
|
constructor(apiFormatter: ApiFormatter, apiRequestService: ApiRequestServiceInterface, changesCompilationFactory: ChangesCompilationFactory, collectionEntryService: CollectionEntryService, collectionHandler: CollectionHandler, columnExpansionFactory: ColumnExpansionFactory, createRequestFactory: CreateRequestFactory, errorHandler: ErrorHandlerInterface, itemHandler: ItemHandler, promiseService: PromiseLibraryInterface, requestColumnExpansionFactory: RequestColumnExpansionFactory);
|
|
19
19
|
buildMoveRequest(compilationEntries: any): {};
|
|
20
20
|
getMapValue(itemType: ItemType, itemId: number | string, map: ItemIdConversionMap): ItemId | undefined;
|
|
21
|
-
private executeCreateRequests
|
|
22
|
-
private executeCreateRequest
|
|
23
|
-
private executeUpdateRequests
|
|
24
|
-
private executeUpdateRequest
|
|
25
|
-
private executeDeleteRequests
|
|
26
|
-
private executeDeleteRequest
|
|
27
|
-
private executeMoveRequests
|
|
28
|
-
private processMoveResponse
|
|
29
|
-
private addCollectionMapEntry
|
|
30
|
-
private forEachCollection
|
|
31
|
-
private onItemsCreated
|
|
21
|
+
private executeCreateRequests;
|
|
22
|
+
private executeCreateRequest;
|
|
23
|
+
private executeUpdateRequests;
|
|
24
|
+
private executeUpdateRequest;
|
|
25
|
+
private executeDeleteRequests;
|
|
26
|
+
private executeDeleteRequest;
|
|
27
|
+
private executeMoveRequests;
|
|
28
|
+
private processMoveResponse;
|
|
29
|
+
private addCollectionMapEntry;
|
|
30
|
+
private forEachCollection;
|
|
31
|
+
private onItemsCreated;
|
|
32
32
|
execute(singleItems: ItemEntry[], collections: CollectionEntry[], parameters?: CreateRequestParameterMap, breakupByParent?: boolean, onAfterCreateCallback?: (conversionMap: ItemIdConversionMap) => void): PromiseInterface<ItemIdConversionMap>;
|
|
33
33
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { QueryService } from '../classes';
|
|
2
2
|
import { QueryParserFactory } from '../factories';
|
|
3
|
-
import { ItemEntry } from '../models';
|
|
4
|
-
import { ItemId } from '../types';
|
|
3
|
+
import { CollectionEntryOptions, ItemEntry } from '../models';
|
|
4
|
+
import { CollectionOptionsInterface, EntryParentNull, ItemId } from '../types';
|
|
5
5
|
export declare class CollectionEntryService {
|
|
6
6
|
private queryParserFactory;
|
|
7
7
|
private queryService;
|
|
8
8
|
constructor(queryParserFactory: QueryParserFactory, queryService: QueryService);
|
|
9
|
-
cloneOptions(options:
|
|
9
|
+
cloneOptions(options: CollectionEntryOptions, parent: EntryParentNull): CollectionEntryOptions;
|
|
10
|
+
processOptions(options: CollectionOptionsInterface): CollectionEntryOptions;
|
|
10
11
|
cloneQueryParams(parameters: any): {};
|
|
11
|
-
processOptions(options: any): any;
|
|
12
12
|
createQuery(options: any): {
|
|
13
13
|
object: any;
|
|
14
14
|
string: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PromiseInterface } from '../';
|
|
1
|
+
import { CollectionEntryOptions, PromiseInterface } from '../';
|
|
2
2
|
import { BatchStatus, CollectionCache, CollectionEntryService, CollectionMatcher, ColumnExpansion, ColumnHandler, ColumnSet, ItemCache, ItemHandler, ItemRequestService, KeyService, QueryService } from '../classes';
|
|
3
3
|
import { ENTRY_STATUS } from '../constants';
|
|
4
4
|
import { BatchStatusFactory, CollectionCacheFactory, CollectionEntryFactory, CollectionMatcherFactory, ColumnSetFactory, QueryParserFactory } from '../factories';
|
|
@@ -36,14 +36,14 @@ export declare class CollectionHandler {
|
|
|
36
36
|
*/
|
|
37
37
|
addToCollections(collectionMap: any, updateInitial: boolean, resultResource?: CollectionResource | null): ItemResource[];
|
|
38
38
|
batchExpand(parentType: ItemType, itemType: ItemType, collections: CollectionResource[], newColumns: ApiRequestColumn[]): PromiseInterface<CollectionResource[]>;
|
|
39
|
-
batchExtend(parentType:
|
|
40
|
-
batchFetch(parentType: ItemType, parentIdArray: ItemId[], itemType: ItemType, options:
|
|
39
|
+
batchExtend(parentType: ItemType, itemType: ItemType, options: any, queryCallback: any, collections: CollectionResource[], returnAllItems?: boolean): PromiseInterface<ItemResourceItemIdMap>;
|
|
40
|
+
batchFetch(parentType: ItemType, parentIdArray: ItemId[], itemType: ItemType, options: CollectionEntryOptions, itemCache: ItemCache, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): Promise<CollectionEntryParentIdMap>;
|
|
41
41
|
handleBatchResponse(batchStatus: BatchStatus<CollectionEntry>, itemEntryCompound: {
|
|
42
42
|
columns: ColumnSet;
|
|
43
43
|
columnExpansion?: ColumnExpansion;
|
|
44
44
|
items?: ItemEntryParentIdMap;
|
|
45
45
|
}, localItems: ItemEntryParentIdMap): CollectionEntryParentIdMap;
|
|
46
|
-
fetch(itemType: ItemType, options:
|
|
46
|
+
fetch(itemType: ItemType, options: CollectionEntryOptions, itemCache: ItemCache, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): PromiseInterface<CollectionEntry>;
|
|
47
47
|
getCachedEntryStatus(collectionEntry: CollectionEntry, options: any): ENTRY_STATUS;
|
|
48
48
|
getDeferredEntryStatus(itemType: ItemType, options: any, query: any, deferredEntries: CollectionCache): {
|
|
49
49
|
entry: CollectionEntry;
|
|
@@ -53,4 +53,5 @@ export declare class CollectionHandler {
|
|
|
53
53
|
resolveLocal(collectionEntry: CollectionEntry, itemCache: ItemCache): PromiseInterface<CollectionEntry>;
|
|
54
54
|
resolveRemote(collectionEntry: CollectionEntry, itemCache: ItemCache): PromiseInterface<CollectionEntry>;
|
|
55
55
|
isLocal(options: any): boolean;
|
|
56
|
+
private expandLocalItemEntries;
|
|
56
57
|
}
|
|
@@ -19,12 +19,12 @@ export declare class CollectionMatcher {
|
|
|
19
19
|
};
|
|
20
20
|
constructor(queryMatcherFactory: QueryMatcherFactory, collectionCaches: CollectionCache[], updateInitial: boolean, callOnActivate: boolean);
|
|
21
21
|
expand(itemEntry: ItemEntry): this;
|
|
22
|
-
private _expand
|
|
22
|
+
private _expand;
|
|
23
23
|
getCollectionsWithFittingItems(): CollectionEntry[];
|
|
24
24
|
addToCollections(resultResource?: CollectionResource | null): ItemResource[] | null;
|
|
25
25
|
removeFromCollections(resultResource?: CollectionResource | null): ItemResource[] | null;
|
|
26
26
|
removeFromAndAddToCollections(): void;
|
|
27
|
-
private groupItemEntries
|
|
28
|
-
private groupItemIds
|
|
29
|
-
private hasFittingItems
|
|
27
|
+
private groupItemEntries;
|
|
28
|
+
private groupItemIds;
|
|
29
|
+
private hasFittingItems;
|
|
30
30
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ItemResource } from '../models';
|
|
1
|
+
import { CollectionResourceOptions, CollectionResourceOptionsInterface, ItemResource } from '../models';
|
|
2
2
|
export declare class CollectionResourceService {
|
|
3
|
-
processOptions(options:
|
|
3
|
+
processOptions(options: CollectionResourceOptionsInterface): CollectionResourceOptions;
|
|
4
4
|
getIdArray(itemResources: ItemResource[]): number[];
|
|
5
5
|
}
|
|
@@ -15,7 +15,7 @@ export declare class ColumnCache {
|
|
|
15
15
|
};
|
|
16
16
|
containsAll(itemType: ItemType): boolean;
|
|
17
17
|
getColumns(itemType: ItemType): ResponseColumnMap;
|
|
18
|
-
private retrieveColumns
|
|
19
|
-
private retrieveColumn
|
|
20
|
-
private getColumn
|
|
18
|
+
private retrieveColumns;
|
|
19
|
+
private retrieveColumn;
|
|
20
|
+
private getColumn;
|
|
21
21
|
}
|
|
@@ -8,11 +8,12 @@ export declare class ColumnExpansion {
|
|
|
8
8
|
expansionMap: {
|
|
9
9
|
[columnSetId: number]: ColumnExpansionResult | null;
|
|
10
10
|
};
|
|
11
|
+
expansionMapSize: number;
|
|
11
12
|
requestColumnsTrue: boolean;
|
|
12
13
|
requestColumns: ApiRequestColumn[];
|
|
13
14
|
constructor(columnInfoFactory: any, columnUtil: ColumnUtil, itemType: ItemType, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnMap);
|
|
14
15
|
run(columnSet: ColumnSet): ColumnExpansionResult | null;
|
|
15
16
|
aggregateRootColumns(): ColumnInfo[];
|
|
16
|
-
private expandRootColumnMap
|
|
17
|
-
private processRootColumnMap
|
|
17
|
+
private expandRootColumnMap;
|
|
18
|
+
private processRootColumnMap;
|
|
18
19
|
}
|
|
@@ -34,13 +34,13 @@ export declare class ColumnSet {
|
|
|
34
34
|
resolve(responseColumns: ResponseColumnMap, enableCaching?: boolean, includeIdColumn?: boolean): this;
|
|
35
35
|
expandRequestColumns(columns: ApiRequestColumns): void;
|
|
36
36
|
isSupersetOf(columns: ApiRequestColumns): any;
|
|
37
|
-
private processResponseColumns
|
|
38
|
-
private requestColumnsIsTrue
|
|
39
|
-
private processRequestColumns
|
|
40
|
-
private getRequestColumnInfo
|
|
41
|
-
private getColumnInfo
|
|
42
|
-
private getColumnSetExpansion
|
|
43
|
-
private getMergedColumnSet
|
|
37
|
+
private processResponseColumns;
|
|
38
|
+
private requestColumnsIsTrue;
|
|
39
|
+
private processRequestColumns;
|
|
40
|
+
private getRequestColumnInfo;
|
|
41
|
+
private getColumnInfo;
|
|
42
|
+
private getColumnSetExpansion;
|
|
43
|
+
private getMergedColumnSet;
|
|
44
44
|
merge(columnSet: ColumnSet): ColumnSet;
|
|
45
45
|
expand(requestColumns: ApiRequestColumns, requestColumnsTrue: boolean, responseColumns: ResponseColumnMap): ColumnExpansionResult;
|
|
46
46
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ColumnSet, ColumnUtil } from '../classes';
|
|
2
|
+
import { ApiRequestColumns } from '../types';
|
|
3
|
+
export declare class ColumnSubsetCache {
|
|
4
|
+
private columnUtil;
|
|
5
|
+
requestColumns: ApiRequestColumns;
|
|
6
|
+
private cache;
|
|
7
|
+
constructor(columnUtil: ColumnUtil, requestColumns: ApiRequestColumns);
|
|
8
|
+
run(columnSet: ColumnSet): boolean;
|
|
9
|
+
}
|
|
@@ -16,5 +16,5 @@ export declare class CreateRequest {
|
|
|
16
16
|
setRequestParent(parentType: ItemType, requestEntry: CreateRequestEntry): boolean;
|
|
17
17
|
run(): CreateRequestEntry[];
|
|
18
18
|
initializeRequest(): CreateRequestEntry;
|
|
19
|
-
private extendRequest
|
|
19
|
+
private extendRequest;
|
|
20
20
|
}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { CollectionCache,
|
|
1
|
+
import { CollectionCache, CollectionHandler, CollectionMatcher, ItemCache, ItemHandler, ItemRequestService, KeyService, LocalCache, QueryService } from '../classes';
|
|
2
2
|
import { CollectionMatcherFactory, ColumnSetFactory, LocalCacheFactory, ModuleChangesCompilationFactory } from '../factories';
|
|
3
3
|
import { ApiRequestServiceInterface, AuthInterface, ErrorHandlerInterface, LocalCacheManagerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
4
|
-
import { CollectionEntry, CollectionResource, ItemEntry, ItemResource } from '../models';
|
|
5
|
-
import { CollectionResourceParentIdMap, CreateRequestParameterMap, ItemId, ItemIdConversionMap,
|
|
4
|
+
import { CollectionEntry, CollectionResource, CollectionResourceOptionsInterface, EditResource, ItemEntry, ItemResource, ItemResourceOptionsInterface } from '../models';
|
|
5
|
+
import { ApiQuery, CollectionDefinition, CollectionOptionsInterface, CollectionResourceParentIdMap, CreateRequestParameterMap, ItemId, ItemIdConversionMap, ItemOptionsInterface, ItemResourcesItemTypeMap, ItemType, LinkCollectionDefinition, LinkedItemEntryMap, LocalCacheCallbackCondition, OnSaveCallback, PromiseInterface, TemplateItemResourceMap } from '../types';
|
|
6
6
|
export declare class ItemAdministrator {
|
|
7
7
|
private apiRequestService;
|
|
8
8
|
private authInterface;
|
|
9
|
-
private collectionEntryService;
|
|
10
9
|
private collectionHandler;
|
|
11
10
|
private collectionMatcherFactory;
|
|
12
|
-
private collectionResourceService;
|
|
13
11
|
private columnSetFactory;
|
|
14
12
|
private errorHandler;
|
|
15
|
-
private itemEntryService;
|
|
16
13
|
private itemHandler;
|
|
17
14
|
private itemRequestService;
|
|
18
15
|
private keyService;
|
|
@@ -21,88 +18,53 @@ export declare class ItemAdministrator {
|
|
|
21
18
|
private moduleChangesCompilationFactory;
|
|
22
19
|
private promiseInterface;
|
|
23
20
|
private queryService;
|
|
24
|
-
constructor(apiRequestService: ApiRequestServiceInterface, authInterface: AuthInterface,
|
|
21
|
+
constructor(apiRequestService: ApiRequestServiceInterface, authInterface: AuthInterface, collectionHandler: CollectionHandler, collectionMatcherFactory: CollectionMatcherFactory, columnSetFactory: ColumnSetFactory, errorHandler: ErrorHandlerInterface, itemHandler: ItemHandler, itemRequestService: ItemRequestService, keyService: KeyService, localCacheFactory: LocalCacheFactory, localCacheManager: LocalCacheManagerInterface, moduleChangesCompilationFactory: ModuleChangesCompilationFactory, promiseInterface: PromiseLibraryInterface, queryService: QueryService);
|
|
25
22
|
invalidateCache(): void;
|
|
26
23
|
getCollectionMatcher(itemEntries: ItemEntry[], addToTab?: boolean): CollectionMatcher;
|
|
27
24
|
fetchTitle(itemType: ItemType, itemId: ItemId, deferRequest?: boolean): PromiseInterface<string>;
|
|
28
|
-
getItemById(itemType: ItemType, itemId: ItemId, options
|
|
29
|
-
getItemsById(itemType:
|
|
30
|
-
getItemsByQuery(itemType:
|
|
25
|
+
getItemById(itemType: ItemType, itemId: ItemId, options?: ItemOptionsInterface, isRoot?: boolean): PromiseInterface<ItemResource>;
|
|
26
|
+
getItemsById(itemType: ItemType, itemIds: ItemId[], options?: ItemOptionsInterface): PromiseInterface<ItemResource[]>;
|
|
27
|
+
getItemsByQuery(itemType: ItemType, query: ApiQuery, options?: ItemOptionsInterface): PromiseInterface<ItemResource[]>;
|
|
31
28
|
/**
|
|
32
29
|
* The return value is depended on the return links boolean. true returns the TemplateResponseItemEntryMap.
|
|
33
|
-
* The type has to be asserted at use since you only know the type of the return value when the function is called
|
|
34
|
-
*
|
|
35
|
-
* @param {string} itemType
|
|
36
|
-
* @param options
|
|
37
|
-
* @param {boolean} returnLinks
|
|
38
|
-
* @param {boolean} isRoot
|
|
39
|
-
* @returns {PromiseInterface<ItemResource | TemplateItemEntryMap>}
|
|
40
30
|
*/
|
|
41
|
-
getNewResource(itemType: ItemType, options?:
|
|
42
|
-
getDuplicateById(itemType: ItemType, duplicateId: ItemId, options?:
|
|
43
|
-
getItemByState(itemType: ItemType, stateKey: ItemId | string, options?:
|
|
44
|
-
getCollectionDef(itemType:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
resource: any;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
getLinkCollectionsDef(linkType: string, linkIdArray: number[], itemType: string, linkField: string, options: any): {
|
|
52
|
-
itemType: string;
|
|
53
|
-
linkType: string;
|
|
54
|
-
linkIdArray: number[];
|
|
55
|
-
linkField: string;
|
|
56
|
-
options: {
|
|
57
|
-
entry: any;
|
|
58
|
-
resource: any;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
getCollection(itemType: string, options: any): PromiseInterface<CollectionResource>;
|
|
62
|
-
getCollectionFromDef(definition: any): PromiseInterface<CollectionResource>;
|
|
31
|
+
getNewResource(itemType: ItemType, options?: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<EditResource | TemplateItemResourceMap>;
|
|
32
|
+
getDuplicateById(itemType: ItemType, duplicateId: ItemId, options?: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource | TemplateItemResourceMap>;
|
|
33
|
+
getItemByState(itemType: ItemType, stateKey: ItemId | string, options?: ItemOptionsInterface, isRoot?: boolean): PromiseInterface<ItemResource>;
|
|
34
|
+
getCollectionDef(itemType: ItemType, options: CollectionOptionsInterface): CollectionDefinition;
|
|
35
|
+
getLinkCollectionsDef(linkType: ItemType, linkIdArray: ItemId[] | (() => ItemId[]), itemType: ItemType, linkField: string, options: CollectionOptionsInterface): LinkCollectionDefinition;
|
|
36
|
+
getCollection(itemType: ItemType, options: CollectionOptionsInterface): PromiseInterface<CollectionResource>;
|
|
37
|
+
getCollectionFromDef(definition: CollectionDefinition): PromiseInterface<CollectionResource>;
|
|
63
38
|
/**
|
|
64
39
|
* @deprecated, use `parent` in options
|
|
65
40
|
*/
|
|
66
|
-
getLinkCollection(linkType:
|
|
67
|
-
getLinkCollections(linkType:
|
|
41
|
+
getLinkCollection(linkType: ItemType, linkId: ItemId, itemType: ItemType, options?: CollectionOptionsInterface): PromiseInterface<CollectionResource>;
|
|
42
|
+
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface): PromiseInterface<CollectionResourceParentIdMap>;
|
|
68
43
|
getLinkCollectionsFromDef(definition: any): PromiseInterface<CollectionResourceParentIdMap>;
|
|
69
|
-
getAllLinkCollections(linkType:
|
|
44
|
+
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface): PromiseInterface<CollectionResourceParentIdMap>;
|
|
70
45
|
cloneItem(itemResource: ItemResource, options: any): ItemResource;
|
|
71
46
|
cloneCollection(collectionResource: CollectionResource, options: any, conversionMap: any): CollectionResource;
|
|
72
47
|
saveCurrentLocalCache(closeTab?: boolean, parameters?: CreateRequestParameterMap, breakupByParent?: boolean, onAfterCreateCallback?: (conversionMap: ItemIdConversionMap) => void): any;
|
|
73
48
|
getCurrentCollections(): CollectionCache;
|
|
74
49
|
getCurrentItems(): ItemCache;
|
|
75
|
-
getModuleChanges(localCache?: LocalCache):
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
addSingleItem(itemEntry: ItemEntry, options: ItemOptions, isRoot?: boolean, localCache?: LocalCache): ItemResource;
|
|
90
|
-
addSingleItems(itemEntries: ItemEntry[], options: ItemOptions): ItemResource[];
|
|
91
|
-
addCollection(collectionEntry: CollectionEntry, options: any): CollectionResource;
|
|
92
|
-
private createItemResources(itemType, itemEntries, options, localCache);
|
|
93
|
-
processLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptions, addToCollections?: boolean): ItemResourcesItemTypeMap;
|
|
94
|
-
expandProcessLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptions): Promise<ItemResourcesItemTypeMap>;
|
|
95
|
-
private constructOnItemsExpanded(itemType, itemEntries, itemOptions, localCache);
|
|
96
|
-
private expandAddToCollections(itemType, itemEntries, resultCollectionResource?, localCache?);
|
|
97
|
-
private getColumnSuperset(collectionEntries);
|
|
50
|
+
getModuleChanges(localCache?: LocalCache): import("./ModuleChangesCompilation").ModuleChangesCompilationResult;
|
|
51
|
+
addSingleItem(itemEntry: ItemEntry, options?: ItemResourceOptionsInterface, isRoot?: boolean, localCache?: LocalCache): ItemResource;
|
|
52
|
+
addSingleItems(itemEntries: ItemEntry[], options: ItemResourceOptionsInterface): ItemResource[];
|
|
53
|
+
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface): CollectionResource;
|
|
54
|
+
private createItemResources;
|
|
55
|
+
processLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface, addToCollections?: boolean): ItemResourcesItemTypeMap;
|
|
56
|
+
expandProcessLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface): Promise<ItemResourcesItemTypeMap>;
|
|
57
|
+
private constructOnItemsExpanded;
|
|
58
|
+
private expandAddToCollections;
|
|
59
|
+
private getColumnSuperset;
|
|
98
60
|
getLocalCache(): LocalCache;
|
|
99
61
|
resetLocalCache(): void;
|
|
100
62
|
addToCollections(itemEntries: ItemEntry[], resultCollectionResource?: CollectionResource): ItemResource[] | null;
|
|
101
63
|
removeFromCollections(itemEntries: ItemEntry[], resultCollectionResource?: CollectionResource): ItemResource[] | null;
|
|
102
64
|
saveLocal(itemResource: ItemResource): PromiseInterface<ItemResource>;
|
|
103
65
|
updateItemIdMap(collectionMap: any, conversionMap: any): void;
|
|
104
|
-
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions:
|
|
105
|
-
createItemResource(itemEntry: ItemEntry, options:
|
|
66
|
+
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface): CollectionResource;
|
|
67
|
+
createItemResource(itemEntry: ItemEntry, options: ItemResourceOptionsInterface, isRoot: boolean): ItemResource;
|
|
106
68
|
onBeforeSave(key: string, callback: (localCache: LocalCache) => any, condition?: LocalCacheCallbackCondition): () => void;
|
|
107
69
|
onSaveSuccess(key: string, callback: OnSaveCallback, condition?: LocalCacheCallbackCondition): () => void;
|
|
108
70
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { QueryMatcherFactory } from '../factories';
|
|
2
2
|
import { ItemEntry } from '../models';
|
|
3
|
-
import {
|
|
3
|
+
import { ItemEntryParentIdMap, ItemId, ItemType } from '../types';
|
|
4
4
|
export declare class ItemCache {
|
|
5
5
|
private queryMatcherFactory;
|
|
6
|
-
entries
|
|
6
|
+
private entries;
|
|
7
7
|
constructor(queryMatcherFactory: QueryMatcherFactory);
|
|
8
8
|
some(callback: (itemEntry: ItemEntry) => boolean): boolean;
|
|
9
9
|
getByItemType(itemType: ItemType): ItemEntry[];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { KeyService } from '../classes';
|
|
2
2
|
import { AuthInterface } from '../interfaces';
|
|
3
|
-
import { ItemEntry } from '../models';
|
|
4
|
-
import { ApiResponse, FieldMap, ItemId, ItemIdConversionMap, ItemType } from '../types';
|
|
3
|
+
import { ItemEntry, ItemEntryOptions } from '../models';
|
|
4
|
+
import { ApiResponse, FieldMap, ItemError, ItemId, ItemIdConversionMap, ItemOptionsInterface, ItemType } from '../types';
|
|
5
5
|
export declare class ItemEntryService {
|
|
6
6
|
private authInterface;
|
|
7
7
|
private keyService;
|
|
8
|
-
undefinedItemError: string;
|
|
9
8
|
constructor(authInterface: AuthInterface, keyService: KeyService);
|
|
10
|
-
processOptions(options
|
|
9
|
+
processOptions(options: ItemOptionsInterface): ItemEntryOptions;
|
|
10
|
+
createUnfoundRemoteItemError(): ItemError;
|
|
11
11
|
createUnfoundLocalItemError(itemType: ItemType): {
|
|
12
12
|
message: string;
|
|
13
13
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ApiFormatter, ApiResponseProcessor, BatchStatus, ColumnExpansion, ColumnHandler, ColumnInfo,
|
|
1
|
+
import { ApiFormatter, ApiResponseProcessor, BatchStatus, ColumnExpansion, ColumnHandler, ColumnInfo, ColumnSubsetCache, ColumnUtil, ItemCache, ItemEntryService, KeyService } from '../classes';
|
|
2
2
|
import { ENTRY_STATUS } from '../constants';
|
|
3
|
-
import { BatchStatusFactory, ColumnExpansionFactory, ColumnSetFactory, ItemCacheFactory, ItemEntryFactory, TemplateFactory } from '../factories';
|
|
3
|
+
import { BatchStatusFactory, ColumnExpansionFactory, ColumnSetFactory, ColumnSubsetCacheFactory, ItemCacheFactory, ItemEntryFactory, TemplateFactory } from '../factories';
|
|
4
4
|
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
5
|
-
import { ItemEntry, Template } from '../models';
|
|
6
|
-
import { ApiResponse,
|
|
5
|
+
import { ItemEntry, ItemEntryOptions, Template } from '../models';
|
|
6
|
+
import { ApiRequestColumns, ApiResponse, EntryParentNull, EntryStatus, ItemId, ItemIdConversionMap, ItemType, LinkedItemEntryMap, PromiseInterface, ResponseColumnMap, TemplateItemEntryMap } from '../types';
|
|
7
7
|
export declare class ItemHandler {
|
|
8
8
|
private apiFormatter;
|
|
9
9
|
private apiRequestService;
|
|
@@ -11,6 +11,7 @@ export declare class ItemHandler {
|
|
|
11
11
|
private columnExpansionFactory;
|
|
12
12
|
private columnHandler;
|
|
13
13
|
private columnSetFactory;
|
|
14
|
+
private columnSubsetCacheFactory;
|
|
14
15
|
private columnUtil;
|
|
15
16
|
private errorHandler;
|
|
16
17
|
private itemCacheFactory;
|
|
@@ -23,55 +24,37 @@ export declare class ItemHandler {
|
|
|
23
24
|
templates: {
|
|
24
25
|
[itemType: string]: Template;
|
|
25
26
|
};
|
|
26
|
-
constructor(apiFormatter: ApiFormatter, apiRequestService: ApiRequestServiceInterface, batchStatusFactory: BatchStatusFactory, columnExpansionFactory: ColumnExpansionFactory, columnHandler: ColumnHandler, columnSetFactory: ColumnSetFactory, columnUtil: ColumnUtil, errorHandler: ErrorHandlerInterface, itemCacheFactory: ItemCacheFactory, itemEntryFactory: ItemEntryFactory, itemEntryService: ItemEntryService, keyService: KeyService, promiseService: PromiseLibraryInterface, templateFactory: TemplateFactory);
|
|
27
|
-
fetchItem(itemType: ItemType, itemId: ItemId, options:
|
|
28
|
-
fetchNewItem(itemType: ItemType, options:
|
|
27
|
+
constructor(apiFormatter: ApiFormatter, apiRequestService: ApiRequestServiceInterface, batchStatusFactory: BatchStatusFactory, columnExpansionFactory: ColumnExpansionFactory, columnHandler: ColumnHandler, columnSetFactory: ColumnSetFactory, columnSubsetCacheFactory: ColumnSubsetCacheFactory, columnUtil: ColumnUtil, errorHandler: ErrorHandlerInterface, itemCacheFactory: ItemCacheFactory, itemEntryFactory: ItemEntryFactory, itemEntryService: ItemEntryService, keyService: KeyService, promiseService: PromiseLibraryInterface, templateFactory: TemplateFactory);
|
|
28
|
+
fetchItem(itemType: ItemType, itemId: ItemId, options: ItemEntryOptions, localItemCache: ItemCache): PromiseInterface<ItemEntry>;
|
|
29
|
+
fetchNewItem(itemType: ItemType, options: ItemEntryOptions, localItemCache: ItemCache): PromiseInterface<TemplateItemEntryMap>;
|
|
30
|
+
createBatchStatus(itemType: ItemType, itemIds: ItemId[], parent: EntryParentNull, requestColumns: ApiRequestColumns, deferRequest: boolean, localItemCache: ItemCache, addToLocalCache: boolean): {
|
|
31
|
+
batchStatus: BatchStatus<ItemEntry>;
|
|
32
|
+
success: boolean;
|
|
33
|
+
};
|
|
29
34
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @param itemType
|
|
32
|
-
* @param itemIds
|
|
33
|
-
* @param options
|
|
34
|
-
* @returns {PromiseInterface<ItemEntry[]>}
|
|
35
|
-
*
|
|
36
|
-
* For every itemid find the status of the ItemEntry and resolve the promises so the result is
|
|
35
|
+
* For every item ID find the status of the ItemEntry and resolve the promises so the result is
|
|
37
36
|
* a usable ItemEntry
|
|
38
37
|
*/
|
|
39
|
-
fetchItems(itemType: ItemType, itemIds: ItemId[], options:
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
fetchItems(itemType: ItemType, itemIds: ItemId[], options: ItemEntryOptions, localItemCache: ItemCache): PromiseInterface<ItemEntry[]>;
|
|
39
|
+
handleBatchResponse(batchStatus: BatchStatus<ItemEntry>, localItemCache: ItemCache, requestColumns: ApiRequestColumns, response: ApiResponseProcessor | null, responseColumns: ResponseColumnMap | null, columnExpansion?: ColumnExpansion): PromiseInterface<boolean>;
|
|
40
|
+
resolveCached(itemEntry: ItemEntry, status: ENTRY_STATUS, options: ItemEntryOptions, localItemCache: ItemCache): PromiseInterface<ItemEntry>;
|
|
41
|
+
private getColumnDifference;
|
|
42
|
+
resolveLocal(itemEntry: ItemEntry, parent: EntryParentNull, template: Template, localItemCache: ItemCache): TemplateItemEntryMap;
|
|
42
43
|
resolveExpansion(itemEntry: ItemEntry, columnExpansion: ColumnExpansion, response: ApiResponse): ItemEntry;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
getEntryStatus(itemType: ItemType, itemId: ItemId, options: any, localItemCache: ItemCache): EntryStatus<ItemEntry> | null;
|
|
51
|
-
isColumnSuperset(itemEntry: ItemEntry, columns: ApiRequestColumns): any;
|
|
52
|
-
getCachedEntryStatus(itemEntry: ItemEntry, options: any): ENTRY_STATUS;
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
* @param itemType
|
|
56
|
-
* @param {BatchStatus} batchStatus
|
|
57
|
-
* @param requestColumns
|
|
58
|
-
* @param resolved
|
|
59
|
-
* @returns {ItemEntry[]}
|
|
60
|
-
*
|
|
61
|
-
* for every type of entry status there is in this batch request make sure the entries get resolved.
|
|
62
|
-
* then return a array of the resulting ItemEntryArray
|
|
63
|
-
*/
|
|
64
|
-
batchResolve(itemType: ItemType, batchStatus: BatchStatus<ItemEntry>, requestColumns: ApiRequestColumns, resolved: {
|
|
65
|
-
entries: ItemEntry[];
|
|
66
|
-
requests?: ApiResponseProcessor;
|
|
67
|
-
}): ItemEntry[] | PromiseInterface<any>;
|
|
44
|
+
private clearItem;
|
|
45
|
+
private resolveRemote;
|
|
46
|
+
private resolveRemoteValues;
|
|
47
|
+
private getResponseFields;
|
|
48
|
+
fetchTemplate(itemType: ItemType, templateOptions?: any, templateColumns?: any): PromiseInterface<Template>;
|
|
49
|
+
getEntryStatus(itemType: ItemType, itemId: ItemId, parent: EntryParentNull, deferRequest: boolean, localItemCache: ItemCache, addToLocalCache: boolean, columnSubsetCache: ColumnSubsetCache): EntryStatus<ItemEntry> | null;
|
|
50
|
+
getCachedEntryStatus(itemEntry: ItemEntry, columnSubsetCache: ColumnSubsetCache): ENTRY_STATUS;
|
|
68
51
|
fetchTitle(itemType: ItemType, itemId: ItemId, deferRequest: boolean | undefined, localItemCache: ItemCache): PromiseInterface<string>;
|
|
69
52
|
createLocalEntries(parentType: ItemType, localParentId: ItemId, template: Template, itemIdConversion: ItemIdConversionMap, localItemCache: ItemCache, filterItemEntry?: (itemEntry: ItemEntry) => boolean): LinkedItemEntryMap[];
|
|
70
|
-
expandLocalEntries(itemType: ItemType, itemEntries: ItemEntry[],
|
|
53
|
+
expandLocalEntries(itemType: ItemType, itemEntries: ItemEntry[], requestColumns: ApiRequestColumns, responseColumns: ResponseColumnMap, localItemCache: ItemCache): PromiseInterface<ItemEntry[]>;
|
|
71
54
|
resolveDerivedValues(itemEntries: ItemEntry[], columns: ColumnInfo[], localItemCache: ItemCache): PromiseInterface<ItemEntry[]>;
|
|
72
|
-
private
|
|
73
|
-
private getItemIdByColumn
|
|
74
|
-
private fetchDerivedValuesByColumn
|
|
55
|
+
private setDefaultValuesByColumn;
|
|
56
|
+
private getItemIdByColumn;
|
|
57
|
+
private fetchDerivedValuesByColumn;
|
|
75
58
|
requestItem(itemEntry: ItemEntry, requestColumns?: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
76
59
|
requestItems(itemType: ItemType, itemIds: ItemId[], columns: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
77
60
|
}
|
|
@@ -2,7 +2,7 @@ import { ApiResponseProcessor, ColumnExpansion, ColumnSet, ItemHandler, QuerySer
|
|
|
2
2
|
import { ColumnExpansionFactory, ColumnSetFactory, ItemEntryFactory } from '../factories';
|
|
3
3
|
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
4
4
|
import { CollectionEntry, ItemEntry } from '../models';
|
|
5
|
-
import { ApiRequestColumns, ApiResponse, EntryParentNull, ItemId, ItemType, PromiseInterface } from '../types';
|
|
5
|
+
import { ApiQuery, ApiRequestColumns, ApiResponse, EntryParentNull, ItemId, ItemType, PromiseInterface } from '../types';
|
|
6
6
|
export declare class ItemRequestService {
|
|
7
7
|
private apiRequestService;
|
|
8
8
|
private errorHandler;
|
|
@@ -14,7 +14,7 @@ export declare class ItemRequestService {
|
|
|
14
14
|
private promiseService;
|
|
15
15
|
constructor(apiRequestService: ApiRequestServiceInterface, errorHandler: ErrorHandlerInterface, itemHandler: ItemHandler, columnExpansionFactory: ColumnExpansionFactory, columnSetFactory: ColumnSetFactory, itemEntryFactory: ItemEntryFactory, queryService: QueryService, promiseService: PromiseLibraryInterface);
|
|
16
16
|
requestItem(itemType: any, itemId: any, columns: any): PromiseInterface<ApiResponseProcessor>;
|
|
17
|
-
requestItems(collectionEntry: CollectionEntry, query?:
|
|
17
|
+
requestItems(collectionEntry: CollectionEntry, query?: ApiQuery, columns?: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
18
18
|
requestLinkItems(parentType: any, parentIdArray: any, itemType: any, query: any, columns: any): PromiseInterface<ApiResponseProcessor>;
|
|
19
19
|
processExpansion(requestColumns: ApiRequestColumns, response: ApiResponse, itemType: ItemType, itemEntries: ItemEntry[]): ColumnExpansion;
|
|
20
20
|
processResponse(response: ApiResponse, idArray: ItemId[], parent: EntryParentNull, columnSet: ColumnSet, columnExpansion?: ColumnExpansion): PromiseInterface<ItemEntry[]>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CollectionCache, ItemCache,
|
|
1
|
+
import { CollectionCache, ItemCache, LockService } from '../classes';
|
|
2
2
|
import { ChangesProcessorFactory, CollectionCacheFactory, CollectionResourceFactory, ItemCacheFactory, ItemResourceFactory } from '../factories';
|
|
3
3
|
import { ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
4
|
-
import { CollectionEntry, CollectionResource, ItemEntry, ItemResource } from '../models';
|
|
5
|
-
import { CollectionEntryParentIdMap, CreateRequestParameterMap, ItemIdConversionMap,
|
|
4
|
+
import { CollectionEntry, CollectionResource, CollectionResourceOptionsInterface, ItemEntry, ItemResource } from '../models';
|
|
5
|
+
import { CollectionEntryParentIdMap, CreateRequestParameterMap, ItemIdConversionMap, ItemOptionsInterface, LocalCacheCallbackCondition, OnSaveCallback } from '../types';
|
|
6
6
|
export declare class LocalCache {
|
|
7
7
|
private errorHandler;
|
|
8
8
|
private lockService;
|
|
@@ -11,7 +11,6 @@ export declare class LocalCache {
|
|
|
11
11
|
private changesProcessorFactory;
|
|
12
12
|
private itemCacheFactory;
|
|
13
13
|
private collectionResourceFactory;
|
|
14
|
-
private itemResourceService;
|
|
15
14
|
private promiseService;
|
|
16
15
|
id: string;
|
|
17
16
|
items: ItemCache;
|
|
@@ -23,11 +22,13 @@ export declare class LocalCache {
|
|
|
23
22
|
private callbacks;
|
|
24
23
|
private changesInterval;
|
|
25
24
|
hasChanges: boolean;
|
|
26
|
-
constructor(errorHandler: ErrorHandlerInterface, lockService: LockService, itemResourceFactory: ItemResourceFactory, collectionCacheFactory: CollectionCacheFactory, changesProcessorFactory: ChangesProcessorFactory, itemCacheFactory: ItemCacheFactory, collectionResourceFactory: CollectionResourceFactory,
|
|
27
|
-
createItemResource(itemEntry: ItemEntry, options:
|
|
28
|
-
createItemResources(itemEntries: ItemEntry[], options:
|
|
29
|
-
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions:
|
|
30
|
-
createCollectionResources(collectionEntries: CollectionEntryParentIdMap, resourceOptions:
|
|
25
|
+
constructor(errorHandler: ErrorHandlerInterface, lockService: LockService, itemResourceFactory: ItemResourceFactory, collectionCacheFactory: CollectionCacheFactory, changesProcessorFactory: ChangesProcessorFactory, itemCacheFactory: ItemCacheFactory, collectionResourceFactory: CollectionResourceFactory, promiseService: PromiseLibraryInterface, id?: string);
|
|
26
|
+
createItemResource(itemEntry: ItemEntry, options: ItemOptionsInterface, isRoot?: boolean, isNew?: boolean): ItemResource;
|
|
27
|
+
createItemResources(itemEntries: ItemEntry[], options: ItemOptionsInterface): ItemResource[];
|
|
28
|
+
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface): CollectionResource;
|
|
29
|
+
createCollectionResources(collectionEntries: CollectionEntryParentIdMap, resourceOptions: CollectionResourceOptionsInterface): {
|
|
30
|
+
[parentId: string]: CollectionResource;
|
|
31
|
+
};
|
|
31
32
|
clearItem(itemResource: ItemResource): void;
|
|
32
33
|
clearItemEntry(itemEntry: ItemEntry): void;
|
|
33
34
|
clearCollection(collectionResource: CollectionResource): void;
|
|
@@ -36,13 +37,13 @@ export declare class LocalCache {
|
|
|
36
37
|
revertChanges(): any;
|
|
37
38
|
resetCollection(collectionEntry: CollectionEntry): void;
|
|
38
39
|
detectChanges(): boolean;
|
|
39
|
-
private collectionHasChanges
|
|
40
|
+
private collectionHasChanges;
|
|
40
41
|
isLockable(): boolean;
|
|
41
42
|
save(closeTab?: boolean, parameters?: CreateRequestParameterMap, breakUpByParent?: boolean, onAfterCreateCallback?: (conversionMap: ItemIdConversionMap) => void): any;
|
|
42
43
|
onBeforeSave(key: string, callback: (localCache: LocalCache) => any, condition?: LocalCacheCallbackCondition): () => void;
|
|
43
44
|
onSaveSuccess(key: string, callback: OnSaveCallback, condition?: LocalCacheCallbackCondition): () => void;
|
|
44
|
-
private executeCallbackEvent
|
|
45
|
-
private executeCallbacks
|
|
45
|
+
private executeCallbackEvent;
|
|
46
|
+
private executeCallbacks;
|
|
46
47
|
enableChangesWatcher(): void;
|
|
47
48
|
disableChangesWatcher(): void;
|
|
48
49
|
onDeactivateItem(itemEntry: any): void;
|
|
@@ -14,8 +14,8 @@ export declare class ModuleChangesCompilation {
|
|
|
14
14
|
destination: ApiRequestItemMap;
|
|
15
15
|
constructor(rootItemEntry: ItemEntry, singleItemCache: ItemCache, collectionCache: CollectionCache);
|
|
16
16
|
process(): ModuleChangesCompilationResult;
|
|
17
|
-
private createParentMap
|
|
18
|
-
private processItems
|
|
19
|
-
private processItem
|
|
20
|
-
private getItemsByParent
|
|
17
|
+
private createParentMap;
|
|
18
|
+
private processItems;
|
|
19
|
+
private processItem;
|
|
20
|
+
private getItemsByParent;
|
|
21
21
|
}
|