@rentman/rm-core 1.0.34 → 1.1.0
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 +131 -72
- package/dist/dist/classes/ApiFormatter.d.ts +37 -37
- package/dist/dist/classes/ApiRequestService.d.ts +18 -17
- package/dist/dist/classes/ApiResponseProcessor.d.ts +33 -31
- package/dist/dist/classes/BatchStatus.d.ts +18 -18
- package/dist/dist/classes/ChangesCompilation.d.ts +26 -0
- package/dist/dist/classes/ChangesProcessor.d.ts +34 -41
- package/dist/dist/classes/CollectionCache.d.ts +33 -40
- package/dist/dist/classes/CollectionEntryService.d.ts +26 -23
- package/dist/dist/classes/CollectionHandler.d.ts +49 -64
- package/dist/dist/classes/CollectionMatcher.d.ts +28 -0
- package/dist/dist/classes/CollectionResourceService.d.ts +5 -5
- package/dist/dist/classes/ColumnCache.d.ts +18 -18
- package/dist/dist/classes/ColumnExpansion.d.ts +14 -16
- package/dist/dist/classes/ColumnHandler.d.ts +16 -17
- package/dist/dist/classes/ColumnInfo.d.ts +12 -0
- package/dist/dist/classes/ColumnSet.d.ts +34 -54
- package/dist/dist/classes/ColumnUtil.d.ts +79 -81
- package/dist/dist/classes/CreateRequest.d.ts +20 -20
- package/dist/dist/classes/ItemAdministrator.d.ts +99 -114
- package/dist/dist/classes/ItemCache.d.ts +25 -22
- package/dist/dist/classes/ItemEntryService.d.ts +18 -51
- package/dist/dist/classes/ItemHandler.d.ts +57 -82
- package/dist/dist/classes/ItemRequestService.d.ts +22 -28
- package/dist/dist/classes/ItemResourceService.d.ts +7 -7
- package/dist/dist/classes/KeyService.d.ts +25 -28
- package/dist/dist/classes/LocalCache.d.ts +57 -66
- package/dist/dist/classes/LockService.d.ts +23 -23
- package/dist/dist/classes/{ModuleChangesCompiler.d.ts → ModuleChangesCompilation.d.ts} +19 -22
- package/dist/dist/classes/QueryMatcher.d.ts +14 -14
- package/dist/dist/classes/QueryParser.d.ts +16 -16
- package/dist/dist/classes/QueryService.d.ts +19 -19
- package/dist/dist/classes/RequestColumnExpansion.d.ts +9 -9
- package/dist/dist/classes/SocketMessageHandler.d.ts +32 -32
- package/dist/dist/classes/Util.d.ts +25 -25
- package/dist/dist/classes/index.d.ts +34 -32
- package/dist/dist/constants.d.ts +15 -10
- package/dist/dist/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/dist/factories/BatchStatusFactory.d.ts +9 -8
- package/dist/dist/factories/ChangesCompilationFactory.d.ts +8 -0
- package/dist/dist/factories/ChangesProcessorFactory.d.ts +18 -23
- package/dist/dist/factories/CollectionCacheFactory.d.ts +7 -7
- package/dist/dist/factories/CollectionEntryFactory.d.ts +14 -14
- package/dist/dist/factories/CollectionMatcherFactory.d.ts +7 -0
- package/dist/dist/factories/CollectionResourceFactory.d.ts +16 -16
- package/dist/dist/factories/ColumnExpansionFactory.d.ts +8 -9
- package/dist/dist/factories/ColumnInfoFactory.d.ts +6 -0
- package/dist/dist/factories/ColumnSetFactory.d.ts +11 -7
- package/dist/dist/factories/CreateRequestFactory.d.ts +10 -10
- package/dist/dist/factories/ItemCacheFactory.d.ts +7 -8
- package/dist/dist/factories/ItemEntryFactory.d.ts +19 -5
- package/dist/dist/factories/ItemResourceFactory.d.ts +14 -16
- package/dist/dist/factories/LocalCacheFactory.d.ts +16 -25
- package/dist/dist/factories/ModuleChangesCompilationFactory.d.ts +5 -0
- package/dist/dist/factories/QueryMatcherFactory.d.ts +7 -6
- package/dist/dist/factories/QueryParserFactory.d.ts +5 -5
- package/dist/dist/factories/RequestColumnExpansionFactory.d.ts +6 -6
- package/dist/dist/factories/index.d.ts +20 -18
- package/dist/dist/index.d.ts +7 -7
- package/dist/dist/interfaces/ApiRequestServiceInterface.d.ts +11 -10
- package/dist/dist/interfaces/AuthInterface.d.ts +9 -9
- package/dist/dist/interfaces/ErrorHandlerInterface.d.ts +4 -4
- package/dist/dist/interfaces/LocalCacheManagerInterface.d.ts +5 -5
- package/dist/dist/interfaces/PromiseInterface.d.ts +11 -11
- package/dist/dist/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/dist/interfaces/index.d.ts +6 -6
- package/dist/dist/main.d.ts +46 -44
- package/dist/dist/models/CollectionEditResource.d.ts +21 -20
- package/dist/dist/models/CollectionEntry.d.ts +60 -57
- package/dist/dist/models/CollectionResource.d.ts +36 -37
- package/dist/dist/models/CollectionViewResource.d.ts +5 -13
- package/dist/dist/models/EditResource.d.ts +22 -25
- package/dist/dist/models/ItemEntry.d.ts +62 -18
- package/dist/dist/models/ItemResource.d.ts +16 -15
- package/dist/dist/models/ViewResource.d.ts +4 -6
- package/dist/dist/models/index.d.ts +8 -8
- package/dist/dist/types/ItemTypesCollection.d.ts +87 -49
- package/dist/dist/types/index.d.ts +1 -0
- package/dist/rm-core.js +6697 -6531
- package/dist/rm-core.min.js +1 -1
- package/package.json +35 -35
- package/readme.md +15 -15
- package/dist/dist/classes/ChangesCompiler.d.ts +0 -33
- package/dist/dist/factories/ChangesCompilerFactory.d.ts +0 -7
- package/dist/dist/factories/ModuleChangesCompilerFactory.d.ts +0 -7
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
private
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { QueryService } from '../classes';
|
|
2
|
+
import { QueryParserFactory } from '../factories';
|
|
3
|
+
import { ItemEntry } from '../models';
|
|
4
|
+
import { ItemId } from '../types';
|
|
5
|
+
export declare class CollectionEntryService {
|
|
6
|
+
private queryParserFactory;
|
|
7
|
+
private queryService;
|
|
8
|
+
constructor(queryParserFactory: QueryParserFactory, queryService: QueryService);
|
|
9
|
+
cloneOptions(options: any, parent: any): any;
|
|
10
|
+
cloneQueryParams(parameters: any): {};
|
|
11
|
+
processOptions(options: any): any;
|
|
12
|
+
createQuery(options: any): {
|
|
13
|
+
object: any;
|
|
14
|
+
string: any;
|
|
15
|
+
};
|
|
16
|
+
getIdArray(itemEntries: ItemEntry[], accumulator: any): ItemId[];
|
|
17
|
+
/**
|
|
18
|
+
* @param {ItemEntry[]} itemEntries
|
|
19
|
+
* @param {(itemEntry: ItemEntry) => boolean} callback
|
|
20
|
+
* @returns {ItemEntry[]}
|
|
21
|
+
*
|
|
22
|
+
* filter an array according to the callback function. Return the entries that failed the condition
|
|
23
|
+
* Replace the given array with the entries that didn't fail the condition.
|
|
24
|
+
*/
|
|
25
|
+
filterArray(itemEntries: ItemEntry[], callback: (itemEntry: ItemEntry) => boolean): ItemEntry[];
|
|
26
|
+
}
|
|
@@ -1,64 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
private
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
getDeferredEntryStatus(collectionEntry: CollectionEntry, options: any): EntryStatus<CollectionEntry>;
|
|
51
|
-
getEntryStatus(itemType: string, options: any, deferredEntries: CollectionCache): EntryStatus<CollectionEntry>;
|
|
52
|
-
getNewEntryStatus(itemType: string, query: any, options: any, deferredEntries: CollectionCache): EntryStatus<CollectionEntry>;
|
|
53
|
-
handleBatchResponse(statusResource: any, itemEntryResource: any): CollectionEntryParentIdMap;
|
|
54
|
-
/**
|
|
55
|
-
* @deprecated
|
|
56
|
-
*/
|
|
57
|
-
removeItemsFromAndAddItemsToCollections(itemEntries: ItemEntry[]): void;
|
|
58
|
-
/**
|
|
59
|
-
* @deprecated
|
|
60
|
-
*/
|
|
61
|
-
removeItemsFromCollections(itemEntries: ItemEntry[]): any;
|
|
62
|
-
resolveLocal(collectionEntry: CollectionEntry, itemCache: any): Promise<CollectionEntry>;
|
|
63
|
-
resolveRemote(collectionEntry: any, itemCache: any): Promise<CollectionEntry>;
|
|
64
|
-
}
|
|
1
|
+
import { CollectionCache, CollectionEntryService, CollectionMatcher, ColumnHandler, ColumnUtil, ItemCache, ItemRequestService, KeyService, QueryService } from '../classes';
|
|
2
|
+
import { CollectionCacheFactory, CollectionEntryFactory, CollectionMatcherFactory, ColumnSetFactory, QueryParserFactory } from '../factories';
|
|
3
|
+
import { ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
4
|
+
import { CollectionEntry, CollectionResource, ItemResource } from '../models';
|
|
5
|
+
import { CollectionEntryBatchStatusMap, CollectionEntryParentIdMap, EntryStatus, ItemResourceItemIdMap } from '../types';
|
|
6
|
+
export declare class CollectionHandler {
|
|
7
|
+
private errorHandler;
|
|
8
|
+
private itemRequestService;
|
|
9
|
+
private columnHandler;
|
|
10
|
+
private collectionEntryFactory;
|
|
11
|
+
private collectionCacheFactory;
|
|
12
|
+
private queryParserFactory;
|
|
13
|
+
private collectionEntryService;
|
|
14
|
+
private columnSetFactory;
|
|
15
|
+
private keyService;
|
|
16
|
+
private promiseService;
|
|
17
|
+
private queryService;
|
|
18
|
+
private columnUtil;
|
|
19
|
+
private collectionMatcherFactory;
|
|
20
|
+
entries: CollectionCache;
|
|
21
|
+
constructor(errorHandler: ErrorHandlerInterface, itemRequestService: ItemRequestService, columnHandler: ColumnHandler, collectionEntryFactory: CollectionEntryFactory, collectionCacheFactory: CollectionCacheFactory, queryParserFactory: QueryParserFactory, collectionEntryService: CollectionEntryService, columnSetFactory: ColumnSetFactory, keyService: KeyService, promiseService: PromiseInterface, queryService: QueryService, columnUtil: ColumnUtil, collectionMatcherFactory: CollectionMatcherFactory);
|
|
22
|
+
getPromises(statusResource: CollectionEntryBatchStatusMap): CollectionEntry[];
|
|
23
|
+
getRequestIds(statusResource: any): number[];
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated, use collectionMatcherFactory
|
|
26
|
+
*/
|
|
27
|
+
removeFromAndAddToCollections(collectionMap: any, updateInitial?: any): void;
|
|
28
|
+
getCollectionMatcher(): CollectionMatcher;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated, use collectionMatcherFactory
|
|
31
|
+
*/
|
|
32
|
+
removeFromCollections(collectionMap: any, updateInitial?: any, resultResource?: CollectionResource | null): any;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated, use collectionMatcherFactory
|
|
35
|
+
*/
|
|
36
|
+
addToCollections(collectionMap: any, updateInitial: boolean, resultResource?: CollectionResource | null): ItemResource[];
|
|
37
|
+
batchExpand(parentType: string, itemType: string, collections: CollectionResource[], newColumns: any): Promise<CollectionResource[]>;
|
|
38
|
+
batchExtend(parentType: string, itemType: string, options: any, queryCallback: any, collections: CollectionResource[], returnAllItems?: boolean): Promise<ItemResourceItemIdMap>;
|
|
39
|
+
batchFetch(parentType: string, parentIdArray: number[], itemType: string, options: any, itemCache: ItemCache, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): Promise<CollectionEntryParentIdMap>;
|
|
40
|
+
createStatusResource(parentType: string, parentIdArray: number[], itemType: string, options: any, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): CollectionEntryBatchStatusMap;
|
|
41
|
+
fetch(itemType: string, options: any, itemCache: ItemCache, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): Promise<CollectionEntry>;
|
|
42
|
+
getDeferredEntryStatus(collectionEntry: CollectionEntry, options: any): EntryStatus<CollectionEntry>;
|
|
43
|
+
getEntryStatus(itemType: string, options: any, localEntries: CollectionCache, deferredEntries: CollectionCache): EntryStatus<CollectionEntry>;
|
|
44
|
+
getNewEntryStatus(itemType: string, query: any, options: any, localEntries: CollectionCache, deferredEntries: CollectionCache): EntryStatus<CollectionEntry>;
|
|
45
|
+
handleBatchResponse(statusResource: any, itemEntryResource: any, itemCache: ItemCache): CollectionEntryParentIdMap;
|
|
46
|
+
resolveLocal(collectionEntry: CollectionEntry, itemCache: any): Promise<CollectionEntry>;
|
|
47
|
+
resolveRemote(collectionEntry: any, itemCache: any): Promise<CollectionEntry>;
|
|
48
|
+
isLocal(options: any): boolean;
|
|
49
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CollectionCache } from '../classes';
|
|
2
|
+
import { QueryMatcherFactory } from '../factories/';
|
|
3
|
+
import { CollectionEntry, CollectionResource, ItemEntry, ItemResource } from '../models';
|
|
4
|
+
export declare class CollectionMatcher {
|
|
5
|
+
private queryMatcherFactory;
|
|
6
|
+
private collectionCaches;
|
|
7
|
+
private updateInitial;
|
|
8
|
+
map: {
|
|
9
|
+
[collectionEntryId: number]: {
|
|
10
|
+
collection: CollectionEntry;
|
|
11
|
+
matches: {
|
|
12
|
+
[itemId: number]: {
|
|
13
|
+
item: ItemEntry;
|
|
14
|
+
isMatch: boolean;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
constructor(queryMatcherFactory: QueryMatcherFactory, collectionCaches: CollectionCache[], updateInitial: boolean);
|
|
20
|
+
expand(itemEntry: ItemEntry): Window;
|
|
21
|
+
getCollectionsWithFittingItems(): CollectionEntry[];
|
|
22
|
+
addToCollections(resultResource?: CollectionResource | null): ItemResource[] | null;
|
|
23
|
+
removeFromCollections(resultResource?: CollectionResource | null): ItemResource[] | null;
|
|
24
|
+
removeFromAndAddToCollections(): void;
|
|
25
|
+
private groupItemEntries(matches);
|
|
26
|
+
private groupItemIds(matches);
|
|
27
|
+
private hasFittingItems(matches);
|
|
28
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ItemResource } from
|
|
2
|
-
export declare class CollectionResourceService {
|
|
3
|
-
processOptions(options: any): any;
|
|
4
|
-
getIdArray(itemResources: ItemResource[]):
|
|
5
|
-
}
|
|
1
|
+
import { ItemResource } from '../models';
|
|
2
|
+
export declare class CollectionResourceService {
|
|
3
|
+
processOptions(options: any): any;
|
|
4
|
+
getIdArray(itemResources: ItemResource[]): number[];
|
|
5
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ColumnUtil } from './ColumnUtil';
|
|
2
|
-
export declare class ColumnCache {
|
|
3
|
-
private columnUtil;
|
|
4
|
-
cache: {};
|
|
5
|
-
allColumns: {};
|
|
6
|
-
constructor(columnUtil: ColumnUtil);
|
|
7
|
-
setColumn(itemType: any, responseColumn: any): any;
|
|
8
|
-
setColumns(itemType: any, requestColumns: any, responseColumns: any): {};
|
|
9
|
-
retrieve(itemType: any, requestColumns: any): {
|
|
10
|
-
missing: any[] | true;
|
|
11
|
-
cached: object;
|
|
12
|
-
};
|
|
13
|
-
containsAll(itemType: any): boolean;
|
|
14
|
-
getColumns(itemType: any): {};
|
|
15
|
-
private retrieveColumns(itemType, requestColumns, requestAccumulator, responseAccumulator);
|
|
16
|
-
private retrieveColumn(itemType, requestColumn, requestAccumulator, responseAccumulator);
|
|
17
|
-
private getColumn(itemType, columnId);
|
|
18
|
-
}
|
|
1
|
+
import { ColumnUtil } from './ColumnUtil';
|
|
2
|
+
export declare class ColumnCache {
|
|
3
|
+
private columnUtil;
|
|
4
|
+
cache: {};
|
|
5
|
+
allColumns: {};
|
|
6
|
+
constructor(columnUtil: ColumnUtil);
|
|
7
|
+
setColumn(itemType: any, responseColumn: any): any;
|
|
8
|
+
setColumns(itemType: any, requestColumns: any, responseColumns: any): {};
|
|
9
|
+
retrieve(itemType: any, requestColumns: any): {
|
|
10
|
+
missing: any[] | true;
|
|
11
|
+
cached: object;
|
|
12
|
+
};
|
|
13
|
+
containsAll(itemType: any): boolean;
|
|
14
|
+
getColumns(itemType: any): {};
|
|
15
|
+
private retrieveColumns(itemType, requestColumns, requestAccumulator, responseAccumulator);
|
|
16
|
+
private retrieveColumn(itemType, requestColumn, requestAccumulator, responseAccumulator);
|
|
17
|
+
private getColumn(itemType, columnId);
|
|
18
|
+
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
private
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
private expandColumnInfo(columnInfo);
|
|
16
|
-
}
|
|
1
|
+
import { ColumnUtil } from '../classes';
|
|
2
|
+
import { ColumnSetFactory } from '../factories';
|
|
3
|
+
export declare class ColumnExpansion {
|
|
4
|
+
private columnSetFactory;
|
|
5
|
+
private columnUtil;
|
|
6
|
+
itemType: string;
|
|
7
|
+
requestColumns: any | boolean;
|
|
8
|
+
responseColumns: any;
|
|
9
|
+
expansionMap: any;
|
|
10
|
+
requestColumnsTrue: boolean;
|
|
11
|
+
constructor(columnSetFactory: ColumnSetFactory, columnUtil: ColumnUtil, itemType: string, requestColumns: any | boolean, responseColumns: any);
|
|
12
|
+
run(columnInfo: any, returnExpansionResult: boolean): any;
|
|
13
|
+
private expandColumnInfo(columnSet);
|
|
14
|
+
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
private
|
|
6
|
-
private
|
|
7
|
-
private
|
|
8
|
-
private
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
1
|
+
import { ColumnCache, ColumnUtil } from '../classes';
|
|
2
|
+
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
3
|
+
export declare class ColumnHandler {
|
|
4
|
+
private apiRequestService;
|
|
5
|
+
private errorHandler;
|
|
6
|
+
private promiseService;
|
|
7
|
+
private cache;
|
|
8
|
+
private columnUtil;
|
|
9
|
+
constructor(apiRequestService: ApiRequestServiceInterface, errorHandler: ErrorHandlerInterface, promiseService: PromiseInterface, cache: ColumnCache, columnUtil: ColumnUtil);
|
|
10
|
+
setColumn(itemType: any, responseColumn: any): any;
|
|
11
|
+
setColumns(itemType: any, requestColumns: any, responseColumns: any): {};
|
|
12
|
+
fetchItemTypeTranslations(itemTypes: any): Promise<any>;
|
|
13
|
+
request(itemType: any, columns: any, params?: {}): Promise<any>;
|
|
14
|
+
fetch(itemType: any, requestColumns: any, params?: {}): Promise<any>;
|
|
15
|
+
fetchAll(itemType: any): Promise<any>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class ColumnInfo {
|
|
2
|
+
readonly apiColumn: any;
|
|
3
|
+
readonly parent: ColumnInfo | null;
|
|
4
|
+
id: string;
|
|
5
|
+
level: number;
|
|
6
|
+
path: string;
|
|
7
|
+
tailPath: string;
|
|
8
|
+
itemType: string;
|
|
9
|
+
children: ColumnInfo[];
|
|
10
|
+
isLeaf: boolean;
|
|
11
|
+
constructor(apiColumn: any, parent?: ColumnInfo | null);
|
|
12
|
+
}
|
|
@@ -1,54 +1,34 @@
|
|
|
1
|
-
import { ColumnHandler } from '
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
private
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
link:
|
|
14
|
-
main:
|
|
15
|
-
derived:
|
|
16
|
-
root:
|
|
17
|
-
leaf:
|
|
18
|
-
formatted: {
|
|
19
|
-
main:
|
|
20
|
-
derived:
|
|
21
|
-
};
|
|
22
|
-
filtered:
|
|
23
|
-
custom:
|
|
24
|
-
searchable:
|
|
25
|
-
item:
|
|
26
|
-
notItem:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
processResponseColumns()
|
|
31
|
-
processRequestColumns()
|
|
32
|
-
getRequestColumnInfo(requestColumn
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
apiColumn: any;
|
|
36
|
-
level: any;
|
|
37
|
-
isLeaf: boolean;
|
|
38
|
-
itemType: string;
|
|
39
|
-
children: any[];
|
|
40
|
-
parent: any;
|
|
41
|
-
tailPath: any;
|
|
42
|
-
};
|
|
43
|
-
getColumnInfo(responseColumn: any, children: any, parent: any): {
|
|
44
|
-
id: any;
|
|
45
|
-
path: any;
|
|
46
|
-
apiColumn: any;
|
|
47
|
-
level: any;
|
|
48
|
-
isLeaf: boolean;
|
|
49
|
-
itemType: string;
|
|
50
|
-
children: any[];
|
|
51
|
-
parent: any;
|
|
52
|
-
tailPath: any;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
1
|
+
import { ColumnHandler, ColumnInfo, ColumnUtil } from '../classes';
|
|
2
|
+
import { ColumnInfoFactory } from '../factories';
|
|
3
|
+
import { RequestColumns, ResponseColumnMap } from '../types';
|
|
4
|
+
export declare class ColumnSet {
|
|
5
|
+
private columnHandler;
|
|
6
|
+
private columnUtil;
|
|
7
|
+
private columnInfoFactory;
|
|
8
|
+
itemType: any;
|
|
9
|
+
request: RequestColumns;
|
|
10
|
+
id: number;
|
|
11
|
+
requestColumnsTrue: boolean;
|
|
12
|
+
response: ResponseColumnMap;
|
|
13
|
+
link: ColumnInfo | null;
|
|
14
|
+
main: ColumnInfo[];
|
|
15
|
+
derived: ColumnInfo[];
|
|
16
|
+
root: ColumnInfo[];
|
|
17
|
+
leaf: ColumnInfo[];
|
|
18
|
+
formatted: {
|
|
19
|
+
main: ColumnInfo[];
|
|
20
|
+
derived: ColumnInfo[];
|
|
21
|
+
};
|
|
22
|
+
filtered: ColumnInfo[];
|
|
23
|
+
custom: ColumnInfo[];
|
|
24
|
+
searchable: ColumnInfo[];
|
|
25
|
+
item: ColumnInfo[];
|
|
26
|
+
notItem: ColumnInfo[];
|
|
27
|
+
enableCaching: boolean;
|
|
28
|
+
constructor(columnHandler: ColumnHandler, columnUtil: ColumnUtil, columnInfoFactory: ColumnInfoFactory, itemType: any, request: RequestColumns);
|
|
29
|
+
resolve(responseColumns: ResponseColumnMap, enableCaching?: boolean, includeIdColumn?: boolean): this;
|
|
30
|
+
private processResponseColumns(responseColumns);
|
|
31
|
+
private processRequestColumns(responseColumns, includeIdColumn);
|
|
32
|
+
private getRequestColumnInfo(requestColumn, columnType, parent, responseColumns);
|
|
33
|
+
private getColumnInfo(columnId, columnType, children, parent, responseColumns);
|
|
34
|
+
}
|
|
@@ -1,81 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
'J-M': string;
|
|
7
|
-
'
|
|
8
|
-
'
|
|
9
|
-
'F': string;
|
|
10
|
-
'
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
* @param {Array}
|
|
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
|
-
findColumn(columnId: any, array: any): number;
|
|
81
|
-
}
|
|
1
|
+
import { RequestColumns } from '../types';
|
|
2
|
+
export declare class ColumnUtil {
|
|
3
|
+
constructor();
|
|
4
|
+
getColumnPath(columns: any, renderAs: any): string;
|
|
5
|
+
getDateFormatOptions(columnType: any): {
|
|
6
|
+
'J-M-Y': string;
|
|
7
|
+
'J-M': string;
|
|
8
|
+
'j+F+Y': string;
|
|
9
|
+
'D+j+F+Y': string;
|
|
10
|
+
'F': string;
|
|
11
|
+
'f': string;
|
|
12
|
+
'D': string;
|
|
13
|
+
'd': string;
|
|
14
|
+
};
|
|
15
|
+
isStringColumn(column: any): boolean;
|
|
16
|
+
isFloatColumn(column: any): boolean;
|
|
17
|
+
isIntColumn(column: any): boolean;
|
|
18
|
+
isNumberColumn(column: any): boolean;
|
|
19
|
+
isCustomColumn(column: any): boolean;
|
|
20
|
+
isItemColumn(column: any, includeId?: boolean): boolean;
|
|
21
|
+
isDateColumn(column: any): boolean;
|
|
22
|
+
isRenderedColumn(column: any): boolean;
|
|
23
|
+
isFilteredColumn(column: any): boolean;
|
|
24
|
+
isFormattedColumn(column: any): boolean;
|
|
25
|
+
isSelectableColumn(column: any): boolean;
|
|
26
|
+
hasLocationProperty(column: any, location: any): boolean;
|
|
27
|
+
isEditableColumn(column: any): boolean;
|
|
28
|
+
isSearchableColumn(column: any): boolean;
|
|
29
|
+
getDefaultWeight(column: any): 1 | 2 | 0.5 | 1.5;
|
|
30
|
+
getComparators(column: any): string[];
|
|
31
|
+
isColumnSubset(first: any, second: any, secondTrue: any): any;
|
|
32
|
+
containsColumn(requestColumn: any, destination: any): boolean;
|
|
33
|
+
responseColumnsAvailable(itemType: any, requestColumns: any, responseColumnMap: any): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Difference: columns that are in second, but not in first
|
|
36
|
+
* @param {Array} first
|
|
37
|
+
* @param {Array} second
|
|
38
|
+
* @returns {Object} An object containing 'merged' and 'difference' properties
|
|
39
|
+
*/
|
|
40
|
+
mergeRequestColumns(first: any, second: any): {
|
|
41
|
+
merged: RequestColumns;
|
|
42
|
+
difference: RequestColumns;
|
|
43
|
+
};
|
|
44
|
+
mergeRequestColumn(requestColumn: any, destination: any): any;
|
|
45
|
+
parseRequestColumn(requestColumn: any): {
|
|
46
|
+
id: any;
|
|
47
|
+
children: any;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Merges two sets of response columns.
|
|
51
|
+
* @param {object} first
|
|
52
|
+
* @param {object} second
|
|
53
|
+
* @returns {object} An object containing a 'merged' and a 'difference' property.
|
|
54
|
+
*/
|
|
55
|
+
mergeResponseColumns(first: any, second: any): {
|
|
56
|
+
merged: {};
|
|
57
|
+
difference: {};
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* @param {array} first
|
|
61
|
+
* @param {array} second
|
|
62
|
+
* @returns {object} difference: the columns that are in second, but not in first.
|
|
63
|
+
*/
|
|
64
|
+
mergeResponseColumnMap(first: any, second: any): {
|
|
65
|
+
merged: {};
|
|
66
|
+
difference: {};
|
|
67
|
+
};
|
|
68
|
+
isLocalColumnId(columnId: any): boolean;
|
|
69
|
+
processConfigColumns(columns: any): never[];
|
|
70
|
+
processLocalConfigColumns(configColumns: any, localColumns: any, remoteColumnCallback: any, localColumnCallback: any): void;
|
|
71
|
+
consolidateColumns(configColumns: any, localColumns: any, addRequestColumns: any): {
|
|
72
|
+
request: any;
|
|
73
|
+
local: object[];
|
|
74
|
+
};
|
|
75
|
+
parseConfigColumn(column: any): any;
|
|
76
|
+
processConfigColumn(columnArray: any, destination: any): void;
|
|
77
|
+
findColumnObject(columnId: any, array: any): number;
|
|
78
|
+
findColumn(columnId: any, array: any): number;
|
|
79
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
private
|
|
7
|
-
private
|
|
8
|
-
private
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
private parameterMap;
|
|
12
|
-
private breakupByParent;
|
|
13
|
-
requests:
|
|
14
|
-
constructor(collectionHandler: CollectionHandler,
|
|
15
|
-
finalizeRequest(requestResource:
|
|
16
|
-
setRequestParent(parentType: any, requestResource: any): boolean;
|
|
17
|
-
run():
|
|
18
|
-
initializeRequest():
|
|
19
|
-
private extendRequest(itemEntries, requestParentId, destination);
|
|
20
|
-
}
|
|
1
|
+
import { CollectionCache, CollectionHandler, KeyService } from '../classes';
|
|
2
|
+
import { CollectionMatcherFactory, RequestColumnExpansionFactory } from '../factories';
|
|
3
|
+
import { CreateRequestEntry } from '../types';
|
|
4
|
+
export declare class CreateRequest {
|
|
5
|
+
private collectionHandler;
|
|
6
|
+
private collectionMatcherFactory;
|
|
7
|
+
private keyService;
|
|
8
|
+
private requestColumnExpansionFactory;
|
|
9
|
+
private compilation;
|
|
10
|
+
private localCollectionCache;
|
|
11
|
+
private parameterMap;
|
|
12
|
+
private breakupByParent;
|
|
13
|
+
requests: CreateRequestEntry[];
|
|
14
|
+
constructor(collectionHandler: CollectionHandler, collectionMatcherFactory: CollectionMatcherFactory, keyService: KeyService, requestColumnExpansionFactory: RequestColumnExpansionFactory, compilation: any, localCollectionCache: CollectionCache, parameterMap: any, breakupByParent?: boolean);
|
|
15
|
+
finalizeRequest(requestResource: CreateRequestEntry): CreateRequestEntry;
|
|
16
|
+
setRequestParent(parentType: any, requestResource: any): boolean;
|
|
17
|
+
run(): CreateRequestEntry[];
|
|
18
|
+
initializeRequest(): CreateRequestEntry;
|
|
19
|
+
private extendRequest(itemEntries, requestParentId, destination);
|
|
20
|
+
}
|