@rentman/rm-core 1.7.3 → 1.7.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 +9 -0
- package/dist/rm-core.js +7525 -7481
- package/dist/rm-core.min.js +1 -1
- package/dist/src/classes/ApiFormatter.d.ts +39 -39
- package/dist/src/classes/ApiRequestService.d.ts +20 -20
- package/dist/src/classes/ApiResponseProcessor.d.ts +39 -41
- package/dist/src/classes/BatchStatus.d.ts +28 -28
- package/dist/src/classes/ChangesCompilation.d.ts +51 -51
- package/dist/src/classes/ChangesProcessor.d.ts +33 -33
- package/dist/src/classes/CollectionCache.d.ts +34 -34
- package/dist/src/classes/CollectionEntryService.d.ts +23 -23
- package/dist/src/classes/CollectionHandler.d.ts +54 -54
- package/dist/src/classes/CollectionMatcher.d.ts +42 -42
- package/dist/src/classes/CollectionResourceService.d.ts +6 -6
- package/dist/src/classes/ColumnCache.d.ts +21 -21
- package/dist/src/classes/ColumnExpansion.d.ts +18 -18
- package/dist/src/classes/ColumnHandler.d.ts +21 -21
- package/dist/src/classes/ColumnInfo.d.ts +14 -14
- package/dist/src/classes/ColumnSet.d.ts +39 -46
- package/dist/src/classes/ColumnSubsetCache.d.ts +8 -8
- package/dist/src/classes/ColumnUtil.d.ts +89 -89
- package/dist/src/classes/CreateRequest.d.ts +20 -20
- package/dist/src/classes/ItemAdministrator.d.ts +238 -238
- package/dist/src/classes/ItemCache.d.ts +23 -23
- package/dist/src/classes/ItemEntryService.d.ts +24 -24
- package/dist/src/classes/ItemHandler.d.ts +60 -60
- package/dist/src/classes/ItemRequestService.d.ts +23 -23
- package/dist/src/classes/KeyService.d.ts +16 -16
- package/dist/src/classes/LocalCache.d.ts +97 -97
- package/dist/src/classes/LockService.d.ts +32 -32
- package/dist/src/classes/ModuleChangesCompilation.d.ts +21 -21
- package/dist/src/classes/QueryMatcher.d.ts +14 -14
- package/dist/src/classes/QueryParser.d.ts +34 -34
- package/dist/src/classes/QueryService.d.ts +14 -14
- package/dist/src/classes/RequestColumnExpansion.d.ts +14 -14
- package/dist/src/classes/ResourceCache.d.ts +25 -25
- package/dist/src/classes/SocketMessageHandler.d.ts +41 -41
- package/dist/src/classes/Util.d.ts +28 -28
- package/dist/src/classes/index.d.ts +35 -35
- package/dist/src/constants.d.ts +18 -18
- package/dist/src/core.d.ts +48 -48
- package/dist/src/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/src/factories/BatchStatusFactory.d.ts +9 -9
- package/dist/src/factories/ChangesCompilationFactory.d.ts +10 -10
- package/dist/src/factories/CollectionCacheFactory.d.ts +8 -8
- package/dist/src/factories/CollectionEntryFactory.d.ts +23 -23
- package/dist/src/factories/CollectionMatcherFactory.d.ts +8 -8
- package/dist/src/factories/CollectionResourceFactory.d.ts +33 -33
- package/dist/src/factories/ColumnExpansionFactory.d.ts +8 -8
- package/dist/src/factories/ColumnInfoFactory.d.ts +7 -7
- package/dist/src/factories/ColumnSetFactory.d.ts +17 -11
- package/dist/src/factories/ColumnSubsetCacheFactory.d.ts +6 -6
- package/dist/src/factories/CreateRequestFactory.d.ts +11 -11
- package/dist/src/factories/ItemCacheFactory.d.ts +7 -7
- package/dist/src/factories/ItemEntryFactory.d.ts +21 -21
- package/dist/src/factories/ItemResourceFactory.d.ts +29 -29
- package/dist/src/factories/LocalCacheFactory.d.ts +16 -16
- package/dist/src/factories/ModuleChangesCompilationFactory.d.ts +6 -6
- package/dist/src/factories/QueryMatcherFactory.d.ts +7 -7
- package/dist/src/factories/QueryParserFactory.d.ts +6 -6
- package/dist/src/factories/RequestColumnExpansionFactory.d.ts +6 -6
- package/dist/src/factories/TemplateFactory.d.ts +10 -10
- package/dist/src/factories/index.d.ts +21 -21
- package/dist/src/index.d.ts +7 -7
- package/dist/src/interfaces/ApiRequestServiceInterface.d.ts +11 -11
- package/dist/src/interfaces/AuthInterface.d.ts +9 -9
- package/dist/src/interfaces/ErrorHandlerInterface.d.ts +5 -5
- package/dist/src/interfaces/ExceptionHandlerInterface.d.ts +3 -3
- package/dist/src/interfaces/LocalCacheManagerInterface.d.ts +5 -5
- package/dist/src/interfaces/PromiseLibraryInterface.d.ts +25 -25
- package/dist/src/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/src/interfaces/index.d.ts +7 -7
- package/dist/src/models/CollectionEditResource.d.ts +14 -14
- package/dist/src/models/CollectionEntry.d.ts +82 -82
- package/dist/src/models/CollectionEntryOptions.d.ts +12 -12
- package/dist/src/models/CollectionResource.d.ts +41 -41
- package/dist/src/models/CollectionResourceOptions.d.ts +22 -22
- package/dist/src/models/CollectionViewResource.d.ts +7 -7
- package/dist/src/models/EditResource.d.ts +18 -18
- package/dist/src/models/ItemEntry.d.ts +70 -70
- package/dist/src/models/ItemEntryOptions.d.ts +11 -11
- package/dist/src/models/ItemResource.d.ts +27 -27
- package/dist/src/models/ItemResourceOptions.d.ts +9 -9
- package/dist/src/models/LocalViewResource.d.ts +7 -7
- package/dist/src/models/RemoteViewResource.d.ts +7 -7
- package/dist/src/models/Template.d.ts +11 -11
- package/dist/src/models/ViewResource.d.ts +8 -8
- package/dist/src/models/index.d.ts +15 -15
- package/dist/src/types/ItemTypesCollection.d.ts +213 -213
- package/dist/src/types/PromiseInterface.d.ts +2 -2
- package/dist/src/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/readme.md +15 -15
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { KeyService } from '../classes';
|
|
2
|
-
import { AuthInterface } from '../interfaces';
|
|
3
|
-
import { ItemEntry, ItemEntryOptions } from '../models';
|
|
4
|
-
import { ApiResponse, FieldMap, ItemError, ItemId, ItemIdConversionMap, ItemOptionsInterface, ItemType } from '../types';
|
|
5
|
-
export declare class ItemEntryService {
|
|
6
|
-
private authInterface;
|
|
7
|
-
private keyService;
|
|
8
|
-
constructor(authInterface: AuthInterface, keyService: KeyService);
|
|
9
|
-
processOptions(options: ItemOptionsInterface): ItemEntryOptions;
|
|
10
|
-
createUnfoundRemoteItemError(): ItemError;
|
|
11
|
-
createUnfoundLocalItemError(itemType: ItemType): {
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
createLocalConversionMap(itemType: ItemType, itemId: ItemId, doExtend: boolean | undefined, apiResponse: ApiResponse): ItemIdConversionMap;
|
|
15
|
-
expandLocalConversionMap(parentType: ItemType, parentId: ItemId, apiResponse: ApiResponse, conversionMap: ItemIdConversionMap): void;
|
|
16
|
-
expandConversionMap(itemEntry: ItemEntry<any>, conversionMap: ItemIdConversionMap, newItemId?: ItemId): ItemId;
|
|
17
|
-
batchExpandConversionMap(itemEntries: Array<ItemEntry<any>>, conversionMap: ItemIdConversionMap): ItemIdConversionMap;
|
|
18
|
-
getConversionValue(itemType: ItemType, itemId: ItemId, map: ItemIdConversionMap): ItemId | undefined;
|
|
19
|
-
batchClone<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>, conversionMap?: ItemIdConversionMap): Array<ItemEntry<ItemTypeType>>;
|
|
20
|
-
getFullName(firstName: string, infix: string, lastName: string): string;
|
|
21
|
-
getTitleField(itemType: ItemType): string;
|
|
22
|
-
getLocalDefaultValues(): FieldMap;
|
|
23
|
-
hasLocalDefaultValue(columnId: string): boolean;
|
|
24
|
-
}
|
|
1
|
+
import { KeyService } from '../classes';
|
|
2
|
+
import { AuthInterface } from '../interfaces';
|
|
3
|
+
import { ItemEntry, ItemEntryOptions } from '../models';
|
|
4
|
+
import { ApiResponse, FieldMap, ItemError, ItemId, ItemIdConversionMap, ItemOptionsInterface, ItemType } from '../types';
|
|
5
|
+
export declare class ItemEntryService {
|
|
6
|
+
private authInterface;
|
|
7
|
+
private keyService;
|
|
8
|
+
constructor(authInterface: AuthInterface, keyService: KeyService);
|
|
9
|
+
processOptions(options: ItemOptionsInterface): ItemEntryOptions;
|
|
10
|
+
createUnfoundRemoteItemError(): ItemError;
|
|
11
|
+
createUnfoundLocalItemError(itemType: ItemType): {
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
createLocalConversionMap(itemType: ItemType, itemId: ItemId, doExtend: boolean | undefined, apiResponse: ApiResponse): ItemIdConversionMap;
|
|
15
|
+
expandLocalConversionMap(parentType: ItemType, parentId: ItemId, apiResponse: ApiResponse, conversionMap: ItemIdConversionMap): void;
|
|
16
|
+
expandConversionMap(itemEntry: ItemEntry<any>, conversionMap: ItemIdConversionMap, newItemId?: ItemId): ItemId;
|
|
17
|
+
batchExpandConversionMap(itemEntries: Array<ItemEntry<any>>, conversionMap: ItemIdConversionMap): ItemIdConversionMap;
|
|
18
|
+
getConversionValue(itemType: ItemType, itemId: ItemId, map: ItemIdConversionMap): ItemId | undefined;
|
|
19
|
+
batchClone<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>, conversionMap?: ItemIdConversionMap): Array<ItemEntry<ItemTypeType>>;
|
|
20
|
+
getFullName(firstName: string, infix: string, lastName: string): string;
|
|
21
|
+
getTitleField(itemType: ItemType): string;
|
|
22
|
+
getLocalDefaultValues(): FieldMap;
|
|
23
|
+
hasLocalDefaultValue(columnId: string): boolean;
|
|
24
|
+
}
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { ApiFormatter, ApiResponseProcessor, BatchStatus, ColumnExpansion, ColumnHandler, ColumnInfo, ColumnSubsetCache, ColumnUtil, ItemCache, ItemEntryService, KeyService } from '../classes';
|
|
2
|
-
import { ENTRY_STATUS } from '../constants';
|
|
3
|
-
import { BatchStatusFactory, ColumnExpansionFactory, ColumnSetFactory, ColumnSubsetCacheFactory, ItemCacheFactory, ItemEntryFactory, TemplateFactory } from '../factories';
|
|
4
|
-
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
5
|
-
import { ItemEntry, ItemEntryOptions, Template } from '../models';
|
|
6
|
-
import { ApiRequestColumns, ApiResponse, EntryParentNull, EntryStatus, ItemId, ItemIdConversionMap, ItemType, LinkedItemEntryMap, PromiseInterface, ResponseColumnMap, TemplateItemEntryMap } from '../types';
|
|
7
|
-
export declare class ItemHandler {
|
|
8
|
-
private apiFormatter;
|
|
9
|
-
private apiRequestService;
|
|
10
|
-
private batchStatusFactory;
|
|
11
|
-
private columnExpansionFactory;
|
|
12
|
-
private columnHandler;
|
|
13
|
-
private columnSetFactory;
|
|
14
|
-
private columnSubsetCacheFactory;
|
|
15
|
-
private columnUtil;
|
|
16
|
-
private errorHandler;
|
|
17
|
-
private itemCacheFactory;
|
|
18
|
-
private itemEntryFactory;
|
|
19
|
-
private itemEntryService;
|
|
20
|
-
private keyService;
|
|
21
|
-
private promiseService;
|
|
22
|
-
private templateFactory;
|
|
23
|
-
entries: ItemCache;
|
|
24
|
-
templates: {
|
|
25
|
-
[itemType: string]: Template<any>;
|
|
26
|
-
};
|
|
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<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: ItemEntryOptions, localItemCache: ItemCache): PromiseInterface<ItemEntry<ItemTypeType>>;
|
|
29
|
-
fetchNewItem<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: ItemEntryOptions, localItemCache: ItemCache): PromiseInterface<TemplateItemEntryMap<ItemTypeType>>;
|
|
30
|
-
createBatchStatus<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], parent: EntryParentNull, requestColumns: ApiRequestColumns, deferRequest: boolean, localItemCache: ItemCache, addToLocalCache: boolean): {
|
|
31
|
-
batchStatus: BatchStatus<ItemTypeType, ItemEntry<ItemTypeType>>;
|
|
32
|
-
success: boolean;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* For every item ID find the status of the ItemEntry and resolve the promises so the result is
|
|
36
|
-
* a usable ItemEntry
|
|
37
|
-
*/
|
|
38
|
-
fetchItems<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options: ItemEntryOptions, localItemCache: ItemCache): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
39
|
-
handleBatchResponse<ItemTypeType extends ItemType>(batchStatus: BatchStatus<ItemTypeType, ItemEntry<ItemTypeType>>, localItemCache: ItemCache, requestColumns: ApiRequestColumns, response: ApiResponseProcessor | null, responseColumns: ResponseColumnMap | null, columnExpansion?: ColumnExpansion<ItemTypeType>): PromiseInterface<boolean>;
|
|
40
|
-
resolveCached<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, status: ENTRY_STATUS, options: ItemEntryOptions, localItemCache: ItemCache): PromiseInterface<ItemEntry<ItemTypeType>>;
|
|
41
|
-
private getColumnDifference;
|
|
42
|
-
resolveLocal<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, parent: EntryParentNull, template: Template<ItemTypeType>, localItemCache: ItemCache): TemplateItemEntryMap<ItemTypeType>;
|
|
43
|
-
resolveExpansion<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, columnExpansion: ColumnExpansion<ItemTypeType>, response: ApiResponse): ItemEntry<ItemTypeType>;
|
|
44
|
-
private clearItem;
|
|
45
|
-
private resolveRemote;
|
|
46
|
-
private resolveRemoteValues;
|
|
47
|
-
private getResponseFields;
|
|
48
|
-
fetchTemplate<ItemTypeType extends ItemType>(itemType: ItemTypeType, templateOptions?: any, templateColumns?: any): PromiseInterface<Template<ItemTypeType>>;
|
|
49
|
-
getEntryStatus<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, parent: EntryParentNull, deferRequest: boolean, localItemCache: ItemCache, addToLocalCache: boolean, columnSubsetCache: ColumnSubsetCache<ItemTypeType>): EntryStatus<ItemEntry<ItemTypeType>> | null;
|
|
50
|
-
getCachedEntryStatus<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, columnSubsetCache: ColumnSubsetCache<ItemTypeType>): ENTRY_STATUS;
|
|
51
|
-
fetchTitle(itemType: ItemType, itemId: ItemId, deferRequest: boolean | undefined, localItemCache: ItemCache): PromiseInterface<string>;
|
|
52
|
-
createLocalEntries(parentType: ItemType, localParentId: ItemId, template: Template<ItemType>, itemIdConversion: ItemIdConversionMap, localItemCache: ItemCache, filterItemEntry?: (itemEntry: ItemEntry<ItemType>) => boolean): Array<LinkedItemEntryMap<ItemType>>;
|
|
53
|
-
expandLocalEntries<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemEntries: Array<ItemEntry<ItemTypeType>>, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnMap, localItemCache: ItemCache): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
54
|
-
resolveDerivedValues<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>, columns: Array<ColumnInfo<ItemTypeType>>, localItemCache: ItemCache): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
55
|
-
private setDefaultValuesByColumn;
|
|
56
|
-
private getItemIdByColumn;
|
|
57
|
-
private fetchDerivedValuesByColumn;
|
|
58
|
-
requestItem(itemEntry: ItemEntry<any>, requestColumns?: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
59
|
-
requestItems(itemType: ItemType, itemIds: ItemId[], columns: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
60
|
-
}
|
|
1
|
+
import { ApiFormatter, ApiResponseProcessor, BatchStatus, ColumnExpansion, ColumnHandler, ColumnInfo, ColumnSubsetCache, ColumnUtil, ItemCache, ItemEntryService, KeyService } from '../classes';
|
|
2
|
+
import { ENTRY_STATUS } from '../constants';
|
|
3
|
+
import { BatchStatusFactory, ColumnExpansionFactory, ColumnSetFactory, ColumnSubsetCacheFactory, ItemCacheFactory, ItemEntryFactory, TemplateFactory } from '../factories';
|
|
4
|
+
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
5
|
+
import { ItemEntry, ItemEntryOptions, Template } from '../models';
|
|
6
|
+
import { ApiRequestColumns, ApiResponse, EntryParentNull, EntryStatus, ItemId, ItemIdConversionMap, ItemType, LinkedItemEntryMap, PromiseInterface, ResponseColumnMap, TemplateItemEntryMap } from '../types';
|
|
7
|
+
export declare class ItemHandler {
|
|
8
|
+
private apiFormatter;
|
|
9
|
+
private apiRequestService;
|
|
10
|
+
private batchStatusFactory;
|
|
11
|
+
private columnExpansionFactory;
|
|
12
|
+
private columnHandler;
|
|
13
|
+
private columnSetFactory;
|
|
14
|
+
private columnSubsetCacheFactory;
|
|
15
|
+
private columnUtil;
|
|
16
|
+
private errorHandler;
|
|
17
|
+
private itemCacheFactory;
|
|
18
|
+
private itemEntryFactory;
|
|
19
|
+
private itemEntryService;
|
|
20
|
+
private keyService;
|
|
21
|
+
private promiseService;
|
|
22
|
+
private templateFactory;
|
|
23
|
+
entries: ItemCache;
|
|
24
|
+
templates: {
|
|
25
|
+
[itemType: string]: Template<any>;
|
|
26
|
+
};
|
|
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<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: ItemEntryOptions, localItemCache: ItemCache): PromiseInterface<ItemEntry<ItemTypeType>>;
|
|
29
|
+
fetchNewItem<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: ItemEntryOptions, localItemCache: ItemCache): PromiseInterface<TemplateItemEntryMap<ItemTypeType>>;
|
|
30
|
+
createBatchStatus<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], parent: EntryParentNull, requestColumns: ApiRequestColumns, deferRequest: boolean, localItemCache: ItemCache, addToLocalCache: boolean): {
|
|
31
|
+
batchStatus: BatchStatus<ItemTypeType, ItemEntry<ItemTypeType>>;
|
|
32
|
+
success: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* For every item ID find the status of the ItemEntry and resolve the promises so the result is
|
|
36
|
+
* a usable ItemEntry
|
|
37
|
+
*/
|
|
38
|
+
fetchItems<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options: ItemEntryOptions, localItemCache: ItemCache): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
39
|
+
handleBatchResponse<ItemTypeType extends ItemType>(batchStatus: BatchStatus<ItemTypeType, ItemEntry<ItemTypeType>>, localItemCache: ItemCache, requestColumns: ApiRequestColumns, response: ApiResponseProcessor | null, responseColumns: ResponseColumnMap | null, columnExpansion?: ColumnExpansion<ItemTypeType>): PromiseInterface<boolean>;
|
|
40
|
+
resolveCached<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, status: ENTRY_STATUS, options: ItemEntryOptions, localItemCache: ItemCache): PromiseInterface<ItemEntry<ItemTypeType>>;
|
|
41
|
+
private getColumnDifference;
|
|
42
|
+
resolveLocal<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, parent: EntryParentNull, template: Template<ItemTypeType>, localItemCache: ItemCache): TemplateItemEntryMap<ItemTypeType>;
|
|
43
|
+
resolveExpansion<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, columnExpansion: ColumnExpansion<ItemTypeType>, response: ApiResponse): ItemEntry<ItemTypeType>;
|
|
44
|
+
private clearItem;
|
|
45
|
+
private resolveRemote;
|
|
46
|
+
private resolveRemoteValues;
|
|
47
|
+
private getResponseFields;
|
|
48
|
+
fetchTemplate<ItemTypeType extends ItemType>(itemType: ItemTypeType, templateOptions?: any, templateColumns?: any): PromiseInterface<Template<ItemTypeType>>;
|
|
49
|
+
getEntryStatus<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, parent: EntryParentNull, deferRequest: boolean, localItemCache: ItemCache, addToLocalCache: boolean, columnSubsetCache: ColumnSubsetCache<ItemTypeType>): EntryStatus<ItemEntry<ItemTypeType>> | null;
|
|
50
|
+
getCachedEntryStatus<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, columnSubsetCache: ColumnSubsetCache<ItemTypeType>): ENTRY_STATUS;
|
|
51
|
+
fetchTitle(itemType: ItemType, itemId: ItemId, deferRequest: boolean | undefined, localItemCache: ItemCache): PromiseInterface<string>;
|
|
52
|
+
createLocalEntries(parentType: ItemType, localParentId: ItemId, template: Template<ItemType>, itemIdConversion: ItemIdConversionMap, localItemCache: ItemCache, filterItemEntry?: (itemEntry: ItemEntry<ItemType>) => boolean): Array<LinkedItemEntryMap<ItemType>>;
|
|
53
|
+
expandLocalEntries<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemEntries: Array<ItemEntry<ItemTypeType>>, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnMap, localItemCache: ItemCache): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
54
|
+
resolveDerivedValues<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>, columns: Array<ColumnInfo<ItemTypeType>>, localItemCache: ItemCache): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
55
|
+
private setDefaultValuesByColumn;
|
|
56
|
+
private getItemIdByColumn;
|
|
57
|
+
private fetchDerivedValuesByColumn;
|
|
58
|
+
requestItem(itemEntry: ItemEntry<any>, requestColumns?: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
59
|
+
requestItems(itemType: ItemType, itemIds: ItemId[], columns: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
60
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { ApiResponseProcessor, ColumnExpansion, ColumnSet, ItemHandler, QueryService } from '../classes';
|
|
2
|
-
import { ColumnExpansionFactory, ColumnSetFactory, ItemEntryFactory } from '../factories';
|
|
3
|
-
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
4
|
-
import { CollectionEntry, ItemEntry } from '../models';
|
|
5
|
-
import { ApiQuery, ApiRequestColumns, ApiResponse, EntryParentNull, ItemId, ItemType, PromiseInterface } from '../types';
|
|
6
|
-
export declare class ItemRequestService {
|
|
7
|
-
private apiRequestService;
|
|
8
|
-
private errorHandler;
|
|
9
|
-
private itemHandler;
|
|
10
|
-
private columnExpansionFactory;
|
|
11
|
-
private columnSetFactory;
|
|
12
|
-
private itemEntryFactory;
|
|
13
|
-
private queryService;
|
|
14
|
-
private promiseService;
|
|
15
|
-
constructor(apiRequestService: ApiRequestServiceInterface, errorHandler: ErrorHandlerInterface, itemHandler: ItemHandler, columnExpansionFactory: ColumnExpansionFactory, columnSetFactory: ColumnSetFactory, itemEntryFactory: ItemEntryFactory, queryService: QueryService, promiseService: PromiseLibraryInterface);
|
|
16
|
-
requestItem(itemType: ItemType, itemId: ItemId, columns: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
17
|
-
requestItems<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, query?: ApiQuery, columns?: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
18
|
-
requestLinkItems(parentType: ItemType, parentIdArray: ItemId[], itemType: ItemType, query: ApiQuery, columns: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
19
|
-
processExpansion<ItemTypeType extends ItemType>(requestColumns: ApiRequestColumns, response: ApiResponse, itemType: ItemTypeType, itemEntries: Array<ItemEntry<ItemTypeType>>): ColumnExpansion<ItemTypeType>;
|
|
20
|
-
processResponse<ItemTypeType extends ItemType>(response: ApiResponse, idArray: ItemId[], parent: EntryParentNull, columnSet: ColumnSet<ItemTypeType>, columnExpansion?: ColumnExpansion<ItemTypeType>): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
21
|
-
handleCachedItem<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, response: ApiResponse, columnExpansion: ColumnExpansion<ItemTypeType>): ItemEntry<ItemTypeType>;
|
|
22
|
-
processLinkResponse<ItemTypeType extends ItemType>(response: ApiResponse, parentType: ItemType, parentIdArray: ItemId[], itemType: ItemTypeType, options: any): Promise<any>;
|
|
23
|
-
}
|
|
1
|
+
import { ApiResponseProcessor, ColumnExpansion, ColumnSet, ItemHandler, QueryService } from '../classes';
|
|
2
|
+
import { ColumnExpansionFactory, ColumnSetFactory, ItemEntryFactory } from '../factories';
|
|
3
|
+
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
4
|
+
import { CollectionEntry, ItemEntry } from '../models';
|
|
5
|
+
import { ApiQuery, ApiRequestColumns, ApiResponse, EntryParentNull, ItemId, ItemType, PromiseInterface } from '../types';
|
|
6
|
+
export declare class ItemRequestService {
|
|
7
|
+
private apiRequestService;
|
|
8
|
+
private errorHandler;
|
|
9
|
+
private itemHandler;
|
|
10
|
+
private columnExpansionFactory;
|
|
11
|
+
private columnSetFactory;
|
|
12
|
+
private itemEntryFactory;
|
|
13
|
+
private queryService;
|
|
14
|
+
private promiseService;
|
|
15
|
+
constructor(apiRequestService: ApiRequestServiceInterface, errorHandler: ErrorHandlerInterface, itemHandler: ItemHandler, columnExpansionFactory: ColumnExpansionFactory, columnSetFactory: ColumnSetFactory, itemEntryFactory: ItemEntryFactory, queryService: QueryService, promiseService: PromiseLibraryInterface);
|
|
16
|
+
requestItem(itemType: ItemType, itemId: ItemId, columns: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
17
|
+
requestItems<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, query?: ApiQuery, columns?: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
18
|
+
requestLinkItems(parentType: ItemType, parentIdArray: ItemId[], itemType: ItemType, query: ApiQuery, columns: ApiRequestColumns): PromiseInterface<ApiResponseProcessor>;
|
|
19
|
+
processExpansion<ItemTypeType extends ItemType>(requestColumns: ApiRequestColumns, response: ApiResponse, itemType: ItemTypeType, itemEntries: Array<ItemEntry<ItemTypeType>>): ColumnExpansion<ItemTypeType>;
|
|
20
|
+
processResponse<ItemTypeType extends ItemType>(response: ApiResponse, idArray: ItemId[], parent: EntryParentNull, columnSet: ColumnSet<ItemTypeType>, columnExpansion?: ColumnExpansion<ItemTypeType>): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
21
|
+
handleCachedItem<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, response: ApiResponse, columnExpansion: ColumnExpansion<ItemTypeType>): ItemEntry<ItemTypeType>;
|
|
22
|
+
processLinkResponse<ItemTypeType extends ItemType>(response: ApiResponse, parentType: ItemType, parentIdArray: ItemId[], itemType: ItemTypeType, options: any): Promise<any>;
|
|
23
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ItemId, StateKey } from '../types';
|
|
2
|
-
export declare class KeyService {
|
|
3
|
-
separator: string;
|
|
4
|
-
constructor();
|
|
5
|
-
getSingleKey(itemType: string, itemId: number | string): string;
|
|
6
|
-
getCssKey(...args: any[]): string;
|
|
7
|
-
parseStateKey(stateKey: string): StateKey | null;
|
|
8
|
-
getDuplicateStateKey(itemId: string | number): string;
|
|
9
|
-
getNewStateKey(templateType: string): string;
|
|
10
|
-
getLocalId(): ItemId;
|
|
11
|
-
getLocalDuplicateId(): ItemId;
|
|
12
|
-
getRandomString(): string;
|
|
13
|
-
isLocalId(itemId: ItemId | string): boolean;
|
|
14
|
-
isNewId(itemId: ItemId | string): boolean;
|
|
15
|
-
isDuplicateId(itemId: ItemId | string): boolean;
|
|
16
|
-
}
|
|
1
|
+
import { ItemId, StateKey } from '../types';
|
|
2
|
+
export declare class KeyService {
|
|
3
|
+
separator: string;
|
|
4
|
+
constructor();
|
|
5
|
+
getSingleKey(itemType: string, itemId: number | string): string;
|
|
6
|
+
getCssKey(...args: any[]): string;
|
|
7
|
+
parseStateKey(stateKey: string): StateKey | null;
|
|
8
|
+
getDuplicateStateKey(itemId: string | number): string;
|
|
9
|
+
getNewStateKey(templateType: string): string;
|
|
10
|
+
getLocalId(): ItemId;
|
|
11
|
+
getLocalDuplicateId(): ItemId;
|
|
12
|
+
getRandomString(): string;
|
|
13
|
+
isLocalId(itemId: ItemId | string): boolean;
|
|
14
|
+
isNewId(itemId: ItemId | string): boolean;
|
|
15
|
+
isDuplicateId(itemId: ItemId | string): boolean;
|
|
16
|
+
}
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import { ChangesProcessor, CollectionCache, ItemCache, LockService } from '../classes';
|
|
2
|
-
import { CollectionCacheFactory, CollectionResourceFactory, ItemCacheFactory, ItemResourceFactory } from '../factories';
|
|
3
|
-
import { ErrorHandlerInterface, ExceptionHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
4
|
-
import { CollectionEditResource, CollectionEntry, CollectionResource, CollectionResourceOptionsInterface, CollectionViewResource, EditResource, ItemEntry, ItemResource, LocalViewResource, RemoteViewResource } from '../models';
|
|
5
|
-
import { CollectionEntryParentIdMap, CollectionResourceParentIdMap, CreateRequestParameterMap, ItemIdConversionMap, ItemOptionsInterface, ItemType, LocalCacheCallbackCondition, OnSaveCallback, PromiseInterface } from '../types';
|
|
6
|
-
export declare class LocalCache {
|
|
7
|
-
private changesProcessor;
|
|
8
|
-
private collectionCacheFactory;
|
|
9
|
-
private collectionResourceFactory;
|
|
10
|
-
private errorHandler;
|
|
11
|
-
private exceptionHandler;
|
|
12
|
-
private itemCacheFactory;
|
|
13
|
-
private itemResourceFactory;
|
|
14
|
-
private lockService;
|
|
15
|
-
private promiseService;
|
|
16
|
-
id: string;
|
|
17
|
-
readonly defaultResourceLevel: number;
|
|
18
|
-
readonly items: ItemCache;
|
|
19
|
-
readonly collections: CollectionCache;
|
|
20
|
-
readonly deferredCollections: CollectionCache;
|
|
21
|
-
rootItem: ItemEntry<any> | undefined;
|
|
22
|
-
tabRequestParameters: {};
|
|
23
|
-
isSaving: boolean;
|
|
24
|
-
private callbacks;
|
|
25
|
-
private changesInterval;
|
|
26
|
-
hasChanges: boolean;
|
|
27
|
-
constructor(changesProcessor: ChangesProcessor, collectionCacheFactory: CollectionCacheFactory, collectionResourceFactory: CollectionResourceFactory, errorHandler: ErrorHandlerInterface, exceptionHandler: ExceptionHandlerInterface, itemCacheFactory: ItemCacheFactory, itemResourceFactory: ItemResourceFactory, lockService: LockService, promiseService: PromiseLibraryInterface, id: string, defaultResourceLevel: number);
|
|
28
|
-
createItemResource<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, options: ItemOptionsInterface & {
|
|
29
|
-
edit: true;
|
|
30
|
-
}, level?: number, isRoot?: boolean, isNew?: boolean): EditResource<ItemTypeType>;
|
|
31
|
-
createItemResource<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, options: ItemOptionsInterface & {
|
|
32
|
-
remote: true;
|
|
33
|
-
}, level?: number, isRoot?: boolean, isNew?: boolean): RemoteViewResource<ItemTypeType>;
|
|
34
|
-
createItemResource<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, options: ItemOptionsInterface, level?: number, isRoot?: boolean, isNew?: boolean): LocalViewResource<ItemTypeType>;
|
|
35
|
-
createItemResources<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>, options: ItemOptionsInterface & {
|
|
36
|
-
edit: true;
|
|
37
|
-
}, level?: number): Array<EditResource<ItemTypeType>>;
|
|
38
|
-
createItemResources<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>, options: ItemOptionsInterface & {
|
|
39
|
-
remote: true;
|
|
40
|
-
}, level?: number): Array<RemoteViewResource<ItemTypeType>>;
|
|
41
|
-
createItemResources<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>, options: ItemOptionsInterface, level?: number): Array<LocalViewResource<ItemTypeType>>;
|
|
42
|
-
createCollectionResource<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
43
|
-
editItems: true;
|
|
44
|
-
editCollection: true;
|
|
45
|
-
}, level?: number): CollectionEditResource<ItemTypeType, EditResource<ItemTypeType>>;
|
|
46
|
-
createCollectionResource<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
47
|
-
remoteItems: true;
|
|
48
|
-
editCollection: true;
|
|
49
|
-
}, level?: number): CollectionEditResource<ItemTypeType, RemoteViewResource<ItemTypeType>>;
|
|
50
|
-
createCollectionResource<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
51
|
-
editCollection: true;
|
|
52
|
-
}, level?: number): CollectionEditResource<ItemTypeType, LocalViewResource<ItemTypeType>>;
|
|
53
|
-
createCollectionResource<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
54
|
-
editItems: true;
|
|
55
|
-
}, level?: number): CollectionViewResource<ItemTypeType, EditResource<ItemTypeType>>;
|
|
56
|
-
createCollectionResource<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
57
|
-
remoteItems: true;
|
|
58
|
-
}, level?: number): CollectionViewResource<ItemTypeType, RemoteViewResource<ItemTypeType>>;
|
|
59
|
-
createCollectionResource<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType>, level?: number): CollectionViewResource<ItemTypeType, LocalViewResource<ItemTypeType>>;
|
|
60
|
-
createCollectionResources<ItemTypeType extends ItemType>(collectionEntries: CollectionEntryParentIdMap<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
61
|
-
editItems: true;
|
|
62
|
-
editCollection: true;
|
|
63
|
-
}, level?: number): CollectionResourceParentIdMap<CollectionEditResource<ItemTypeType, EditResource<ItemTypeType>>>;
|
|
64
|
-
createCollectionResources<ItemTypeType extends ItemType>(collectionEntries: CollectionEntryParentIdMap<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
65
|
-
remoteItems: true;
|
|
66
|
-
editCollection: true;
|
|
67
|
-
}, level?: number): CollectionResourceParentIdMap<CollectionEditResource<ItemTypeType, RemoteViewResource<ItemTypeType>>>;
|
|
68
|
-
createCollectionResources<ItemTypeType extends ItemType>(collectionEntries: CollectionEntryParentIdMap<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
69
|
-
editCollection: true;
|
|
70
|
-
}, level?: number): CollectionResourceParentIdMap<CollectionEditResource<ItemTypeType, LocalViewResource<ItemTypeType>>>;
|
|
71
|
-
createCollectionResources<ItemTypeType extends ItemType>(collectionEntries: CollectionEntryParentIdMap<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
72
|
-
editItems: true;
|
|
73
|
-
}, level?: number): CollectionResourceParentIdMap<CollectionViewResource<ItemTypeType, EditResource<ItemTypeType>>>;
|
|
74
|
-
createCollectionResources<ItemTypeType extends ItemType>(collectionEntries: CollectionEntryParentIdMap<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
75
|
-
remoteItems: true;
|
|
76
|
-
}, level?: number): CollectionResourceParentIdMap<CollectionViewResource<ItemTypeType, RemoteViewResource<ItemTypeType>>>;
|
|
77
|
-
createCollectionResources<ItemTypeType extends ItemType>(collectionEntries: CollectionEntryParentIdMap<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType>, level?: number): CollectionResourceParentIdMap<CollectionViewResource<ItemTypeType, LocalViewResource<ItemTypeType>>>;
|
|
78
|
-
clearItem(itemResource: ItemResource<any>): void;
|
|
79
|
-
clearItemEntry(itemEntry: ItemEntry<any>): void;
|
|
80
|
-
clearCollection(collectionResource: CollectionResource<any>): void;
|
|
81
|
-
clearDeferredCollections(): void;
|
|
82
|
-
updateSingleItems(conversionMap: ItemIdConversionMap): void;
|
|
83
|
-
revertChanges(): PromiseInterface<void>;
|
|
84
|
-
resetCollection(collectionEntry: CollectionEntry<any>): void;
|
|
85
|
-
detectChanges(): boolean;
|
|
86
|
-
private collectionHasChanges;
|
|
87
|
-
isLockable(): boolean;
|
|
88
|
-
save(closeTab?: boolean, parameters?: CreateRequestParameterMap, breakUpByParent?: boolean, onAfterCreateCallback?: (conversionMap: ItemIdConversionMap) => void): PromiseInterface<ItemIdConversionMap>;
|
|
89
|
-
onBeforeSave(key: string, callback: (localCache: LocalCache) => any, condition?: LocalCacheCallbackCondition): () => void;
|
|
90
|
-
onSaveSuccess(key: string, callback: OnSaveCallback, condition?: LocalCacheCallbackCondition): () => void;
|
|
91
|
-
private executeCallbackEvent;
|
|
92
|
-
private executeCallbacks;
|
|
93
|
-
enableChangesWatcher(): void;
|
|
94
|
-
disableChangesWatcher(): void;
|
|
95
|
-
onDeactivateItem(itemEntry: ItemEntry<any>): void;
|
|
96
|
-
onActivateItem(itemEntry: ItemEntry<any>): void;
|
|
97
|
-
}
|
|
1
|
+
import { ChangesProcessor, CollectionCache, ItemCache, LockService } from '../classes';
|
|
2
|
+
import { CollectionCacheFactory, CollectionResourceFactory, ItemCacheFactory, ItemResourceFactory } from '../factories';
|
|
3
|
+
import { ErrorHandlerInterface, ExceptionHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
4
|
+
import { CollectionEditResource, CollectionEntry, CollectionResource, CollectionResourceOptionsInterface, CollectionViewResource, EditResource, ItemEntry, ItemResource, LocalViewResource, RemoteViewResource } from '../models';
|
|
5
|
+
import { CollectionEntryParentIdMap, CollectionResourceParentIdMap, CreateRequestParameterMap, ItemIdConversionMap, ItemOptionsInterface, ItemType, LocalCacheCallbackCondition, OnSaveCallback, PromiseInterface } from '../types';
|
|
6
|
+
export declare class LocalCache {
|
|
7
|
+
private changesProcessor;
|
|
8
|
+
private collectionCacheFactory;
|
|
9
|
+
private collectionResourceFactory;
|
|
10
|
+
private errorHandler;
|
|
11
|
+
private exceptionHandler;
|
|
12
|
+
private itemCacheFactory;
|
|
13
|
+
private itemResourceFactory;
|
|
14
|
+
private lockService;
|
|
15
|
+
private promiseService;
|
|
16
|
+
id: string;
|
|
17
|
+
readonly defaultResourceLevel: number;
|
|
18
|
+
readonly items: ItemCache;
|
|
19
|
+
readonly collections: CollectionCache;
|
|
20
|
+
readonly deferredCollections: CollectionCache;
|
|
21
|
+
rootItem: ItemEntry<any> | undefined;
|
|
22
|
+
tabRequestParameters: {};
|
|
23
|
+
isSaving: boolean;
|
|
24
|
+
private callbacks;
|
|
25
|
+
private changesInterval;
|
|
26
|
+
hasChanges: boolean;
|
|
27
|
+
constructor(changesProcessor: ChangesProcessor, collectionCacheFactory: CollectionCacheFactory, collectionResourceFactory: CollectionResourceFactory, errorHandler: ErrorHandlerInterface, exceptionHandler: ExceptionHandlerInterface, itemCacheFactory: ItemCacheFactory, itemResourceFactory: ItemResourceFactory, lockService: LockService, promiseService: PromiseLibraryInterface, id: string, defaultResourceLevel: number);
|
|
28
|
+
createItemResource<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, options: ItemOptionsInterface & {
|
|
29
|
+
edit: true;
|
|
30
|
+
}, level?: number, isRoot?: boolean, isNew?: boolean): EditResource<ItemTypeType>;
|
|
31
|
+
createItemResource<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, options: ItemOptionsInterface & {
|
|
32
|
+
remote: true;
|
|
33
|
+
}, level?: number, isRoot?: boolean, isNew?: boolean): RemoteViewResource<ItemTypeType>;
|
|
34
|
+
createItemResource<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, options: ItemOptionsInterface, level?: number, isRoot?: boolean, isNew?: boolean): LocalViewResource<ItemTypeType>;
|
|
35
|
+
createItemResources<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>, options: ItemOptionsInterface & {
|
|
36
|
+
edit: true;
|
|
37
|
+
}, level?: number): Array<EditResource<ItemTypeType>>;
|
|
38
|
+
createItemResources<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>, options: ItemOptionsInterface & {
|
|
39
|
+
remote: true;
|
|
40
|
+
}, level?: number): Array<RemoteViewResource<ItemTypeType>>;
|
|
41
|
+
createItemResources<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>, options: ItemOptionsInterface, level?: number): Array<LocalViewResource<ItemTypeType>>;
|
|
42
|
+
createCollectionResource<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
43
|
+
editItems: true;
|
|
44
|
+
editCollection: true;
|
|
45
|
+
}, level?: number): CollectionEditResource<ItemTypeType, EditResource<ItemTypeType>>;
|
|
46
|
+
createCollectionResource<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
47
|
+
remoteItems: true;
|
|
48
|
+
editCollection: true;
|
|
49
|
+
}, level?: number): CollectionEditResource<ItemTypeType, RemoteViewResource<ItemTypeType>>;
|
|
50
|
+
createCollectionResource<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
51
|
+
editCollection: true;
|
|
52
|
+
}, level?: number): CollectionEditResource<ItemTypeType, LocalViewResource<ItemTypeType>>;
|
|
53
|
+
createCollectionResource<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
54
|
+
editItems: true;
|
|
55
|
+
}, level?: number): CollectionViewResource<ItemTypeType, EditResource<ItemTypeType>>;
|
|
56
|
+
createCollectionResource<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
57
|
+
remoteItems: true;
|
|
58
|
+
}, level?: number): CollectionViewResource<ItemTypeType, RemoteViewResource<ItemTypeType>>;
|
|
59
|
+
createCollectionResource<ItemTypeType extends ItemType>(collectionEntry: CollectionEntry<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType>, level?: number): CollectionViewResource<ItemTypeType, LocalViewResource<ItemTypeType>>;
|
|
60
|
+
createCollectionResources<ItemTypeType extends ItemType>(collectionEntries: CollectionEntryParentIdMap<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
61
|
+
editItems: true;
|
|
62
|
+
editCollection: true;
|
|
63
|
+
}, level?: number): CollectionResourceParentIdMap<CollectionEditResource<ItemTypeType, EditResource<ItemTypeType>>>;
|
|
64
|
+
createCollectionResources<ItemTypeType extends ItemType>(collectionEntries: CollectionEntryParentIdMap<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
65
|
+
remoteItems: true;
|
|
66
|
+
editCollection: true;
|
|
67
|
+
}, level?: number): CollectionResourceParentIdMap<CollectionEditResource<ItemTypeType, RemoteViewResource<ItemTypeType>>>;
|
|
68
|
+
createCollectionResources<ItemTypeType extends ItemType>(collectionEntries: CollectionEntryParentIdMap<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
69
|
+
editCollection: true;
|
|
70
|
+
}, level?: number): CollectionResourceParentIdMap<CollectionEditResource<ItemTypeType, LocalViewResource<ItemTypeType>>>;
|
|
71
|
+
createCollectionResources<ItemTypeType extends ItemType>(collectionEntries: CollectionEntryParentIdMap<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
72
|
+
editItems: true;
|
|
73
|
+
}, level?: number): CollectionResourceParentIdMap<CollectionViewResource<ItemTypeType, EditResource<ItemTypeType>>>;
|
|
74
|
+
createCollectionResources<ItemTypeType extends ItemType>(collectionEntries: CollectionEntryParentIdMap<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType> & {
|
|
75
|
+
remoteItems: true;
|
|
76
|
+
}, level?: number): CollectionResourceParentIdMap<CollectionViewResource<ItemTypeType, RemoteViewResource<ItemTypeType>>>;
|
|
77
|
+
createCollectionResources<ItemTypeType extends ItemType>(collectionEntries: CollectionEntryParentIdMap<ItemTypeType>, resourceOptions: CollectionResourceOptionsInterface<ItemTypeType>, level?: number): CollectionResourceParentIdMap<CollectionViewResource<ItemTypeType, LocalViewResource<ItemTypeType>>>;
|
|
78
|
+
clearItem(itemResource: ItemResource<any>): void;
|
|
79
|
+
clearItemEntry(itemEntry: ItemEntry<any>): void;
|
|
80
|
+
clearCollection(collectionResource: CollectionResource<any>): void;
|
|
81
|
+
clearDeferredCollections(): void;
|
|
82
|
+
updateSingleItems(conversionMap: ItemIdConversionMap): void;
|
|
83
|
+
revertChanges(): PromiseInterface<void>;
|
|
84
|
+
resetCollection(collectionEntry: CollectionEntry<any>): void;
|
|
85
|
+
detectChanges(): boolean;
|
|
86
|
+
private collectionHasChanges;
|
|
87
|
+
isLockable(): boolean;
|
|
88
|
+
save(closeTab?: boolean, parameters?: CreateRequestParameterMap, breakUpByParent?: boolean, onAfterCreateCallback?: (conversionMap: ItemIdConversionMap) => void): PromiseInterface<ItemIdConversionMap>;
|
|
89
|
+
onBeforeSave(key: string, callback: (localCache: LocalCache) => any, condition?: LocalCacheCallbackCondition): () => void;
|
|
90
|
+
onSaveSuccess(key: string, callback: OnSaveCallback, condition?: LocalCacheCallbackCondition): () => void;
|
|
91
|
+
private executeCallbackEvent;
|
|
92
|
+
private executeCallbacks;
|
|
93
|
+
enableChangesWatcher(): void;
|
|
94
|
+
disableChangesWatcher(): void;
|
|
95
|
+
onDeactivateItem(itemEntry: ItemEntry<any>): void;
|
|
96
|
+
onActivateItem(itemEntry: ItemEntry<any>): void;
|
|
97
|
+
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { KeyService } from '../classes';
|
|
2
|
-
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
3
|
-
import { ItemEntry } from '../models';
|
|
4
|
-
import { ItemId, ItemMap, PromiseInterface } from '../types';
|
|
5
|
-
export declare type LockToken = {
|
|
6
|
-
isForeign: false;
|
|
7
|
-
id: number;
|
|
8
|
-
token: string;
|
|
9
|
-
} | {
|
|
10
|
-
isForeign: true;
|
|
11
|
-
message: string;
|
|
12
|
-
};
|
|
13
|
-
export declare class LockService {
|
|
14
|
-
private apiRequestService;
|
|
15
|
-
private errorHandler;
|
|
16
|
-
private keyService;
|
|
17
|
-
private promiseService;
|
|
18
|
-
lockItems: ItemMap<LockToken>;
|
|
19
|
-
promises: ItemMap<PromiseInterface<LockToken>>;
|
|
20
|
-
constructor(apiRequestService: ApiRequestServiceInterface, errorHandler: ErrorHandlerInterface, keyService: KeyService, promiseService: PromiseLibraryInterface);
|
|
21
|
-
private getValue;
|
|
22
|
-
private setValue;
|
|
23
|
-
getLocks(): this['lockItems'];
|
|
24
|
-
hasLock(lockTokenId: ItemId): boolean;
|
|
25
|
-
isLocked(itemEntry: ItemEntry<any>): boolean;
|
|
26
|
-
getMessage(itemEntry: ItemEntry<any>): undefined | string;
|
|
27
|
-
fetchCachedLock(itemEntry: ItemEntry<any>): PromiseInterface<undefined | LockToken>;
|
|
28
|
-
fetchLock(itemEntry: ItemEntry<any>): PromiseInterface<string>;
|
|
29
|
-
requestLock(itemEntry: ItemEntry<any>): PromiseInterface<LockToken>;
|
|
30
|
-
deleteLock(itemEntry: ItemEntry<any>): PromiseInterface<void>;
|
|
31
|
-
clearLock(itemEntry: ItemEntry<any>): boolean;
|
|
32
|
-
}
|
|
1
|
+
import { KeyService } from '../classes';
|
|
2
|
+
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
3
|
+
import { ItemEntry } from '../models';
|
|
4
|
+
import { ItemId, ItemMap, PromiseInterface } from '../types';
|
|
5
|
+
export declare type LockToken = {
|
|
6
|
+
isForeign: false;
|
|
7
|
+
id: number;
|
|
8
|
+
token: string;
|
|
9
|
+
} | {
|
|
10
|
+
isForeign: true;
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
export declare class LockService {
|
|
14
|
+
private apiRequestService;
|
|
15
|
+
private errorHandler;
|
|
16
|
+
private keyService;
|
|
17
|
+
private promiseService;
|
|
18
|
+
lockItems: ItemMap<LockToken>;
|
|
19
|
+
promises: ItemMap<PromiseInterface<LockToken>>;
|
|
20
|
+
constructor(apiRequestService: ApiRequestServiceInterface, errorHandler: ErrorHandlerInterface, keyService: KeyService, promiseService: PromiseLibraryInterface);
|
|
21
|
+
private getValue;
|
|
22
|
+
private setValue;
|
|
23
|
+
getLocks(): this['lockItems'];
|
|
24
|
+
hasLock(lockTokenId: ItemId): boolean;
|
|
25
|
+
isLocked(itemEntry: ItemEntry<any>): boolean;
|
|
26
|
+
getMessage(itemEntry: ItemEntry<any>): undefined | string;
|
|
27
|
+
fetchCachedLock(itemEntry: ItemEntry<any>): PromiseInterface<undefined | LockToken>;
|
|
28
|
+
fetchLock(itemEntry: ItemEntry<any>): PromiseInterface<string>;
|
|
29
|
+
requestLock(itemEntry: ItemEntry<any>): PromiseInterface<LockToken>;
|
|
30
|
+
deleteLock(itemEntry: ItemEntry<any>): PromiseInterface<void>;
|
|
31
|
+
clearLock(itemEntry: ItemEntry<any>): boolean;
|
|
32
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { CollectionCache, ItemCache } from '../classes';
|
|
2
|
-
import { ItemEntry } from '../models';
|
|
3
|
-
import { ApiRequestItemMap, ItemId, ItemType } from '../types';
|
|
4
|
-
export declare type ModuleChangesCompilationResult = {
|
|
5
|
-
itemType: ItemType;
|
|
6
|
-
itemId: ItemId;
|
|
7
|
-
items: ApiRequestItemMap;
|
|
8
|
-
};
|
|
9
|
-
export declare class ModuleChangesCompilation<RootItemEntryItemTypeType extends ItemType> {
|
|
10
|
-
private rootItemEntry;
|
|
11
|
-
private singleItemCache;
|
|
12
|
-
private collectionCache;
|
|
13
|
-
parentMap: any;
|
|
14
|
-
destination: ApiRequestItemMap;
|
|
15
|
-
constructor(rootItemEntry: ItemEntry<RootItemEntryItemTypeType>, singleItemCache: ItemCache, collectionCache: CollectionCache);
|
|
16
|
-
process(): ModuleChangesCompilationResult;
|
|
17
|
-
private createParentMap;
|
|
18
|
-
private processItems;
|
|
19
|
-
private processItem;
|
|
20
|
-
private getItemsByParent;
|
|
21
|
-
}
|
|
1
|
+
import { CollectionCache, ItemCache } from '../classes';
|
|
2
|
+
import { ItemEntry } from '../models';
|
|
3
|
+
import { ApiRequestItemMap, ItemId, ItemType } from '../types';
|
|
4
|
+
export declare type ModuleChangesCompilationResult = {
|
|
5
|
+
itemType: ItemType;
|
|
6
|
+
itemId: ItemId;
|
|
7
|
+
items: ApiRequestItemMap;
|
|
8
|
+
};
|
|
9
|
+
export declare class ModuleChangesCompilation<RootItemEntryItemTypeType extends ItemType> {
|
|
10
|
+
private rootItemEntry;
|
|
11
|
+
private singleItemCache;
|
|
12
|
+
private collectionCache;
|
|
13
|
+
parentMap: any;
|
|
14
|
+
destination: ApiRequestItemMap;
|
|
15
|
+
constructor(rootItemEntry: ItemEntry<RootItemEntryItemTypeType>, singleItemCache: ItemCache, collectionCache: CollectionCache);
|
|
16
|
+
process(): ModuleChangesCompilationResult;
|
|
17
|
+
private createParentMap;
|
|
18
|
+
private processItems;
|
|
19
|
+
private processItem;
|
|
20
|
+
private getItemsByParent;
|
|
21
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ApiFormatter } from '../classes';
|
|
2
|
-
import { ApiQuery, EntryParentNull, FieldMap, ItemType } from '../types';
|
|
3
|
-
export declare class QueryMatcher {
|
|
4
|
-
private apiFormatter;
|
|
5
|
-
itemType: ItemType;
|
|
6
|
-
fields: FieldMap;
|
|
7
|
-
parent: EntryParentNull;
|
|
8
|
-
constructor(apiFormatter: ApiFormatter, itemType: ItemType, fields: FieldMap, parent?: EntryParentNull);
|
|
9
|
-
private compareValues;
|
|
10
|
-
matchQuery(query: ApiQuery): boolean | 'maybe';
|
|
11
|
-
private matchLinkedToQuery;
|
|
12
|
-
private matchComplexQuery;
|
|
13
|
-
private matchSimpleQuery;
|
|
14
|
-
}
|
|
1
|
+
import { ApiFormatter } from '../classes';
|
|
2
|
+
import { ApiQuery, EntryParentNull, FieldMap, ItemType } from '../types';
|
|
3
|
+
export declare class QueryMatcher {
|
|
4
|
+
private apiFormatter;
|
|
5
|
+
itemType: ItemType;
|
|
6
|
+
fields: FieldMap;
|
|
7
|
+
parent: EntryParentNull;
|
|
8
|
+
constructor(apiFormatter: ApiFormatter, itemType: ItemType, fields: FieldMap, parent?: EntryParentNull);
|
|
9
|
+
private compareValues;
|
|
10
|
+
matchQuery(query: ApiQuery): boolean | 'maybe';
|
|
11
|
+
private matchLinkedToQuery;
|
|
12
|
+
private matchComplexQuery;
|
|
13
|
+
private matchSimpleQuery;
|
|
14
|
+
}
|