@rentman/rm-core 1.0.33 → 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 -69
- 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
package/dist/dist/main.d.ts
CHANGED
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
import { ApiFormatter, ApiRequestService, CollectionEntryService, CollectionHandler, CollectionResourceService, ColumnCache, ColumnHandler, ColumnUtil, ItemAdministrator, ItemEntryService, ItemHandler, ItemRequestService, ItemResourceService, KeyService, LockService, QueryService, SocketMessageHandler } from './classes';
|
|
2
|
-
import { ApiResponseProcessorFactory, BatchStatusFactory,
|
|
3
|
-
import { ApiRequestServiceInterface, AuthInterface, ErrorHandlerInterface, LocalCacheManagerInterface, PromiseInterface } from './interfaces';
|
|
4
|
-
export declare class RmCore {
|
|
5
|
-
version: string;
|
|
6
|
-
apiFormatter: ApiFormatter;
|
|
7
|
-
keyService: KeyService;
|
|
8
|
-
queryService: QueryService;
|
|
9
|
-
columnUtil: ColumnUtil;
|
|
10
|
-
apiResponseProcessorFactory: ApiResponseProcessorFactory;
|
|
11
|
-
itemEntryService: ItemEntryService;
|
|
12
|
-
itemResourceService: ItemResourceService;
|
|
13
|
-
itemAdministrator: ItemAdministrator;
|
|
14
|
-
itemRequestService: ItemRequestService;
|
|
15
|
-
columnCache: ColumnCache;
|
|
16
|
-
columnHandler: ColumnHandler;
|
|
17
|
-
itemEntryFactory: ItemEntryFactory;
|
|
18
|
-
collectionEntryFactory: CollectionEntryFactory;
|
|
19
|
-
collectionCacheFactory: CollectionCacheFactory;
|
|
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
|
-
|
|
1
|
+
import { ApiFormatter, ApiRequestService, CollectionEntryService, CollectionHandler, CollectionResourceService, ColumnCache, ColumnHandler, ColumnUtil, ItemAdministrator, ItemEntryService, ItemHandler, ItemRequestService, ItemResourceService, KeyService, LockService, QueryService, SocketMessageHandler } from './classes';
|
|
2
|
+
import { ApiResponseProcessorFactory, BatchStatusFactory, ChangesCompilationFactory, ChangesProcessorFactory, CollectionCacheFactory, CollectionEntryFactory, CollectionMatcherFactory, CollectionResourceFactory, ColumnExpansionFactory, ColumnInfoFactory, ColumnSetFactory, CreateRequestFactory, ItemCacheFactory, ItemEntryFactory, ItemResourceFactory, LocalCacheFactory, ModuleChangesCompilationFactory, QueryMatcherFactory, QueryParserFactory, RequestColumnExpansionFactory } from './factories';
|
|
3
|
+
import { ApiRequestServiceInterface, AuthInterface, ErrorHandlerInterface, LocalCacheManagerInterface, PromiseInterface } from './interfaces';
|
|
4
|
+
export declare class RmCore {
|
|
5
|
+
version: string;
|
|
6
|
+
apiFormatter: ApiFormatter;
|
|
7
|
+
keyService: KeyService;
|
|
8
|
+
queryService: QueryService;
|
|
9
|
+
columnUtil: ColumnUtil;
|
|
10
|
+
apiResponseProcessorFactory: ApiResponseProcessorFactory;
|
|
11
|
+
itemEntryService: ItemEntryService;
|
|
12
|
+
itemResourceService: ItemResourceService;
|
|
13
|
+
itemAdministrator: ItemAdministrator;
|
|
14
|
+
itemRequestService: ItemRequestService;
|
|
15
|
+
columnCache: ColumnCache;
|
|
16
|
+
columnHandler: ColumnHandler;
|
|
17
|
+
itemEntryFactory: ItemEntryFactory;
|
|
18
|
+
collectionEntryFactory: CollectionEntryFactory;
|
|
19
|
+
collectionCacheFactory: CollectionCacheFactory;
|
|
20
|
+
collectionMatcherFactory: CollectionMatcherFactory;
|
|
21
|
+
itemHandler: ItemHandler;
|
|
22
|
+
collectionHandler: CollectionHandler;
|
|
23
|
+
lockService: LockService;
|
|
24
|
+
collectionEntryService: CollectionEntryService;
|
|
25
|
+
collectionResourceService: CollectionResourceService;
|
|
26
|
+
collectionResourceFactory: CollectionResourceFactory;
|
|
27
|
+
queryMatcherFactory: QueryMatcherFactory;
|
|
28
|
+
itemCacheFactory: ItemCacheFactory;
|
|
29
|
+
requestColumnExpansionFactory: RequestColumnExpansionFactory;
|
|
30
|
+
changesCompilationFactory: ChangesCompilationFactory;
|
|
31
|
+
changesProcessorFactory: ChangesProcessorFactory;
|
|
32
|
+
columnExpansionFactory: ColumnExpansionFactory;
|
|
33
|
+
columnSetFactory: ColumnSetFactory;
|
|
34
|
+
columnInfoFactory: ColumnInfoFactory;
|
|
35
|
+
createRequestFactory: CreateRequestFactory;
|
|
36
|
+
itemResourceFactory: ItemResourceFactory;
|
|
37
|
+
localCacheFactory: LocalCacheFactory;
|
|
38
|
+
moduleChangesCompilationFactory: ModuleChangesCompilationFactory;
|
|
39
|
+
queryParserFactory: QueryParserFactory;
|
|
40
|
+
batchStatusFactory: BatchStatusFactory;
|
|
41
|
+
socketMessageHandler: SocketMessageHandler;
|
|
42
|
+
apiRequestService: ApiRequestService;
|
|
43
|
+
constructor(externalApiRequestService: ApiRequestServiceInterface, localCacheManager: LocalCacheManagerInterface, authInterface: AuthInterface, errorHandlerInterface: ErrorHandlerInterface, promiseInterface: PromiseInterface);
|
|
44
|
+
}
|
|
45
|
+
export declare function noop(): void;
|
|
46
|
+
export declare function identity(value: any): any;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { ItemHandler, KeyService } from
|
|
2
|
-
import { ChangesProcessorFactory, ItemResourceFactory } from '../factories';
|
|
3
|
-
import { ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
4
|
-
import { CollectionEntry } from './CollectionEntry';
|
|
5
|
-
import { CollectionResource } from './CollectionResource';
|
|
6
|
-
export declare class CollectionEditResource extends CollectionResource {
|
|
7
|
-
private errorHandler;
|
|
8
|
-
private itemHandler;
|
|
9
|
-
private changesProcessorFactory;
|
|
10
|
-
private keyService;
|
|
11
|
-
private promiseService;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { ItemHandler, KeyService } from '../classes';
|
|
2
|
+
import { ChangesProcessorFactory, ItemEntryFactory, ItemResourceFactory } from '../factories';
|
|
3
|
+
import { ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
4
|
+
import { CollectionEntry } from './CollectionEntry';
|
|
5
|
+
import { CollectionResource } from './CollectionResource';
|
|
6
|
+
export declare class CollectionEditResource extends CollectionResource {
|
|
7
|
+
private errorHandler;
|
|
8
|
+
private itemHandler;
|
|
9
|
+
private changesProcessorFactory;
|
|
10
|
+
private keyService;
|
|
11
|
+
private promiseService;
|
|
12
|
+
private itemEntryFactory;
|
|
13
|
+
constructor(errorHandler: ErrorHandlerInterface, itemHandler: ItemHandler, itemResourceFactory: ItemResourceFactory, changesProcessorFactory: ChangesProcessorFactory, keyService: KeyService, promiseService: PromiseInterface, itemEntryFactory: ItemEntryFactory, collectionEntry: CollectionEntry, options: any);
|
|
14
|
+
save(): Promise<any>;
|
|
15
|
+
moveItems(idArray: any, destination: any, enableCallbacks: any): any;
|
|
16
|
+
removeItems(idArray: any, enableCallbacks: any): Promise<any>;
|
|
17
|
+
removeItem(itemId: any, enableCallbacks: any): Promise<any>;
|
|
18
|
+
addItems(valuesArray: any, enableCallbacks?: boolean): Promise<any>;
|
|
19
|
+
addItem(values: any, enableCallbacks: any): Promise<any>;
|
|
20
|
+
clear(enableCallbacks: any): any;
|
|
21
|
+
}
|
|
@@ -1,57 +1,60 @@
|
|
|
1
|
-
import { CollectionEntryService, ItemEntryService, ItemRequestService, KeyService, QueryService } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ItemEntry } from
|
|
5
|
-
import {
|
|
6
|
-
export declare class CollectionEntry {
|
|
7
|
-
private
|
|
8
|
-
private collectionEntryService;
|
|
9
|
-
private
|
|
10
|
-
private itemEntryService;
|
|
11
|
-
private
|
|
12
|
-
private
|
|
13
|
-
private promiseService;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
import { CollectionEntryService, ColumnInfo, ColumnSet, ItemEntryService, ItemRequestService, KeyService, QueryService } from '../classes';
|
|
2
|
+
import { CollectionEntryFactory } from '../factories';
|
|
3
|
+
import { ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
4
|
+
import { CollectionResource, ItemEntry, ItemResource } from '../models';
|
|
5
|
+
import { EntryParentNull, ItemId, ItemIdConversionMap, ItemType } from '../types';
|
|
6
|
+
export declare class CollectionEntry {
|
|
7
|
+
private collectionEntryFactory;
|
|
8
|
+
private collectionEntryService;
|
|
9
|
+
private errorHandler;
|
|
10
|
+
private itemEntryService;
|
|
11
|
+
private itemRequestService;
|
|
12
|
+
private keyService;
|
|
13
|
+
private promiseService;
|
|
14
|
+
private queryService;
|
|
15
|
+
itemType: ItemType;
|
|
16
|
+
options: any;
|
|
17
|
+
id: number;
|
|
18
|
+
query: any;
|
|
19
|
+
columns: ColumnSet;
|
|
20
|
+
parent: EntryParentNull;
|
|
21
|
+
initial: ItemEntry[];
|
|
22
|
+
items: ItemEntry[];
|
|
23
|
+
resources: CollectionResource[];
|
|
24
|
+
deferred: any;
|
|
25
|
+
promise: Promise<CollectionEntry>;
|
|
26
|
+
reloadQueued: boolean;
|
|
27
|
+
constructor(collectionEntryFactory: CollectionEntryFactory, collectionEntryService: CollectionEntryService, errorHandler: ErrorHandlerInterface, itemEntryService: ItemEntryService, itemRequestService: ItemRequestService, keyService: KeyService, promiseService: PromiseInterface, queryService: QueryService, itemType: ItemType, options: any);
|
|
28
|
+
isDeferred(): boolean;
|
|
29
|
+
resolve(itemEntryCompound: any): CollectionEntry;
|
|
30
|
+
isLocal(): boolean;
|
|
31
|
+
matchParent(itemType: any, itemId: any): boolean;
|
|
32
|
+
forEach(callback: (itemEntry: ItemEntry) => void): void;
|
|
33
|
+
getItemById(itemId: any): ItemEntry | undefined;
|
|
34
|
+
getIdArray(accumulator?: never[]): ItemId[];
|
|
35
|
+
addItems(itemEntries: any, resultResource: any, updateInitial?: boolean, enableCallback?: boolean): ItemResource[] | null;
|
|
36
|
+
removeItems(idArray: any, resultResource: any, updateInitial: any, enableCallback?: any): any;
|
|
37
|
+
clear(resultResource: any, updateInitial: any, enableCallback?: any): any;
|
|
38
|
+
handleRemovedItems(filterFunction: any, resultResource: any, updateInitial: any, enableCallback?: boolean): any;
|
|
39
|
+
expand(newColumns: any): Promise<any>;
|
|
40
|
+
extendQuery(callback: any): any;
|
|
41
|
+
extend(queryCallback: any, collectionResource: any, enableCallback?: any, updateInitial?: any): Promise<any>;
|
|
42
|
+
queueReload(): void;
|
|
43
|
+
updateColumns(columnExpansion: any): void;
|
|
44
|
+
getAddedItems(returnItemIds?: boolean): (number | ItemEntry)[];
|
|
45
|
+
getRemovedItems(returnItemIds?: boolean): (number | ItemEntry)[];
|
|
46
|
+
getUpdatedItems(): ItemEntry[];
|
|
47
|
+
hasAddedItems(): boolean;
|
|
48
|
+
hasRemovedItems(): boolean;
|
|
49
|
+
hasUpdatedItems(): boolean;
|
|
50
|
+
getCurrentResource(): CollectionResource;
|
|
51
|
+
clearResources(isSubtabChange?: boolean): void;
|
|
52
|
+
revertChanges(): void;
|
|
53
|
+
onItemsCreated(conversionMap: any): void;
|
|
54
|
+
getUpdatedItemColumns(conversionMap: any): {
|
|
55
|
+
[columnId: string]: ColumnInfo;
|
|
56
|
+
};
|
|
57
|
+
clone(parent: any, conversionMap?: ItemIdConversionMap): CollectionEntry;
|
|
58
|
+
hasEditResources(): boolean;
|
|
59
|
+
hasItemEditResources(): boolean;
|
|
60
|
+
}
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
import { ItemResourceFactory } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
37
|
-
}
|
|
1
|
+
import { ItemResourceFactory } from '../factories';
|
|
2
|
+
import { ItemEntry, ItemResource } from '../models';
|
|
3
|
+
import { ItemResourceItemIdMap } from '../types';
|
|
4
|
+
import { CollectionEntry } from './CollectionEntry';
|
|
5
|
+
export declare class CollectionResource {
|
|
6
|
+
private itemResourceFactory;
|
|
7
|
+
entry: CollectionEntry;
|
|
8
|
+
options: any;
|
|
9
|
+
items: ItemResource[];
|
|
10
|
+
itemIdMap: ItemResourceItemIdMap;
|
|
11
|
+
columns: any;
|
|
12
|
+
constructor(itemResourceFactory: ItemResourceFactory, entry: CollectionEntry, options: any);
|
|
13
|
+
getItemById(itemId: number): ItemResource;
|
|
14
|
+
rebuildMap(): void;
|
|
15
|
+
addItemResources(itemEntries: ItemEntry[]): ItemResource[];
|
|
16
|
+
/**
|
|
17
|
+
* @param itemEntries
|
|
18
|
+
* @returns {ItemResource[]}
|
|
19
|
+
*
|
|
20
|
+
* Returns the Itemresources that where removed Collection.
|
|
21
|
+
* Filters on ItemResource.entry === ItemEntry
|
|
22
|
+
*/
|
|
23
|
+
removeItemResources(itemEntries: ItemEntry[]): ItemResource[];
|
|
24
|
+
callOnAdd(itemResources: ItemResource[]): void;
|
|
25
|
+
callOnRemove(itemResources: ItemResource[]): void;
|
|
26
|
+
forEach(callback: (itemResource: ItemResource) => void): void;
|
|
27
|
+
filter(callback: (itemResource: ItemResource) => boolean): ItemResource[];
|
|
28
|
+
first(callback: (itemResource: ItemResource) => boolean): ItemResource | null;
|
|
29
|
+
some(callback: (itemResource: ItemResource) => boolean): boolean;
|
|
30
|
+
groupBy(argument: any): {};
|
|
31
|
+
map(argument: any): any[];
|
|
32
|
+
reduce<T>(callback: (itemResource: ItemResource, value: T) => T, value: T): T;
|
|
33
|
+
extend(queryCallback: any, returnAllItems: any, enableCallbacks: any): Promise<ItemResource[]>;
|
|
34
|
+
deactivate(): void;
|
|
35
|
+
clearResource(): void;
|
|
36
|
+
}
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare class CollectionViewResource extends CollectionResource {
|
|
7
|
-
private errorHandler;
|
|
8
|
-
private itemHandler;
|
|
9
|
-
private changesProcessorFactory;
|
|
10
|
-
private keyService;
|
|
11
|
-
private promiseService;
|
|
12
|
-
constructor(errorHandler: ErrorHandlerInterface, itemHandler: ItemHandler, itemResourceFactory: ItemResourceFactory, changesProcessorFactory: ChangesProcessorFactory, keyService: KeyService, promiseService: PromiseInterface, collectionEntry: CollectionEntry, options: any);
|
|
13
|
-
}
|
|
1
|
+
import { ItemResourceFactory } from '../factories';
|
|
2
|
+
import { CollectionEntry, CollectionResource } from '../models';
|
|
3
|
+
export declare class CollectionViewResource extends CollectionResource {
|
|
4
|
+
constructor(itemResourceFactory: ItemResourceFactory, collectionEntry: CollectionEntry, options: any);
|
|
5
|
+
}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
import { ApiFormatter, ChangesProcessor,
|
|
2
|
-
import { ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
3
|
-
import {
|
|
4
|
-
import { ItemResource } from
|
|
5
|
-
export declare class EditResource extends ItemResource {
|
|
6
|
-
private apiFormatter;
|
|
7
|
-
private lockService;
|
|
8
|
-
private changesProcessor;
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
save(parameters?: any): any;
|
|
24
|
-
saveLocal(): Promise<any>;
|
|
25
|
-
}
|
|
1
|
+
import { ApiFormatter, ChangesProcessor, LockService } from '../classes';
|
|
2
|
+
import { ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
3
|
+
import { FieldMap } from '../types';
|
|
4
|
+
import { ItemEntry, ItemResource } from './';
|
|
5
|
+
export declare class EditResource extends ItemResource {
|
|
6
|
+
private apiFormatter;
|
|
7
|
+
private lockService;
|
|
8
|
+
private changesProcessor;
|
|
9
|
+
private errorHandler;
|
|
10
|
+
private promiseService;
|
|
11
|
+
localCopies: FieldMap[];
|
|
12
|
+
transactions: number;
|
|
13
|
+
constructor(apiFormatter: ApiFormatter, lockService: LockService, changesProcessor: ChangesProcessor, errorHandler: ErrorHandlerInterface, promiseService: PromiseInterface, entry: ItemEntry, options: any);
|
|
14
|
+
start(): void;
|
|
15
|
+
rollback(): void;
|
|
16
|
+
commit(initial: any): void;
|
|
17
|
+
getLocalCopy(): FieldMap | null;
|
|
18
|
+
copyFields(destination?: any): any;
|
|
19
|
+
setFields(values: any, callOnChange: any): this;
|
|
20
|
+
callOnChange(previous: any): void;
|
|
21
|
+
save(parameters?: any): any;
|
|
22
|
+
}
|
|
@@ -1,18 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { ApiFormatter, ColumnSet, ItemEntryService, KeyService } from '../classes';
|
|
2
|
+
import { ItemEntryFactory } from '../factories';
|
|
3
|
+
import { AuthInterface, PromiseInterface } from '../interfaces';
|
|
4
|
+
import { ItemResource } from '../models';
|
|
5
|
+
import { EntryParentNull, FieldMap, ItemId, ItemIdConversionMap } from '../types';
|
|
6
|
+
export declare class ItemEntry {
|
|
7
|
+
private promiseService;
|
|
8
|
+
private authInterface;
|
|
9
|
+
private itemEntryFactory;
|
|
10
|
+
private apiFormatter;
|
|
11
|
+
private itemEntryService;
|
|
12
|
+
private keyService;
|
|
13
|
+
itemType: string;
|
|
14
|
+
itemId: ItemId;
|
|
15
|
+
columns: ColumnSet;
|
|
16
|
+
id: number;
|
|
17
|
+
deferRequest: boolean;
|
|
18
|
+
deferred: any;
|
|
19
|
+
parent: EntryParentNull;
|
|
20
|
+
initial: FieldMap;
|
|
21
|
+
modified: FieldMap;
|
|
22
|
+
derived: FieldMap;
|
|
23
|
+
resources: ItemResource[];
|
|
24
|
+
constructor(promiseService: PromiseInterface, authInterface: AuthInterface, itemEntryFactory: ItemEntryFactory, apiFormatter: ApiFormatter, itemEntryService: ItemEntryService, keyService: KeyService, itemType: string, itemId: ItemId, columns: ColumnSet);
|
|
25
|
+
defer(deferRequest: any): this;
|
|
26
|
+
resolve(): this;
|
|
27
|
+
resolveDeferred(initial: any, derived: any, columns: any): this;
|
|
28
|
+
isDeferred(): boolean;
|
|
29
|
+
reject(error?: any): this;
|
|
30
|
+
process(initial: any, derived: any): this;
|
|
31
|
+
processLocal(initial: any, modified: any, derived: any, conversionMap: ItemIdConversionMap): this;
|
|
32
|
+
setCreator(): this;
|
|
33
|
+
clone(conversionMap?: ItemIdConversionMap): ItemEntry;
|
|
34
|
+
resetDerived(columnIds: any): this;
|
|
35
|
+
clearResources(): this;
|
|
36
|
+
deactivateResources(): this;
|
|
37
|
+
getFields(): FieldMap;
|
|
38
|
+
expand(main: any, derived: any, columnExpansionResult: any): this;
|
|
39
|
+
updateFields(source: any, overwrite?: boolean): this;
|
|
40
|
+
updateItemValue(fields: any, apiColumn: any, conversionMap: any): this;
|
|
41
|
+
updateItemFields(conversionMap: any): this;
|
|
42
|
+
formatRequest(): {};
|
|
43
|
+
setDisplayName(): this;
|
|
44
|
+
getDisplayName(): any;
|
|
45
|
+
/**
|
|
46
|
+
* @param {Boolean} returnAll Returns all initial values if true
|
|
47
|
+
* @returns {Object}
|
|
48
|
+
*/
|
|
49
|
+
getChanges(returnAll?: boolean): object[];
|
|
50
|
+
isLocal(): boolean;
|
|
51
|
+
isLockable(): boolean;
|
|
52
|
+
hasChanges(): boolean;
|
|
53
|
+
resetModified(): this;
|
|
54
|
+
setInitial(values: any, enableCallbacks?: any): this;
|
|
55
|
+
/**
|
|
56
|
+
* Does a shallow copy of values!
|
|
57
|
+
*/
|
|
58
|
+
setModified(values?: any): this;
|
|
59
|
+
setDerived(values: any): this;
|
|
60
|
+
setParent(parentType: any, parentId: any): this;
|
|
61
|
+
callOnChange(previous: any): this;
|
|
62
|
+
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export declare class ItemResource {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
fields:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { ItemEntry } from '../models';
|
|
2
|
+
import { FieldMap, ResponseColumn } from '../types';
|
|
3
|
+
export declare class ItemResource {
|
|
4
|
+
entry: ItemEntry;
|
|
5
|
+
options: any;
|
|
6
|
+
columns: {
|
|
7
|
+
[columnId: string]: ResponseColumn;
|
|
8
|
+
};
|
|
9
|
+
fields: FieldMap;
|
|
10
|
+
derived: FieldMap;
|
|
11
|
+
constructor(entry: ItemEntry, options: any);
|
|
12
|
+
isNewResource(resource: any): boolean;
|
|
13
|
+
isLocal(): boolean;
|
|
14
|
+
clearResource(): void;
|
|
15
|
+
deactivate(): void;
|
|
16
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
constructor(itemEntryService: ItemEntryService, entry: ItemEntry, options: any);
|
|
6
|
-
}
|
|
1
|
+
import { ItemEntry, ItemResource } from '../models';
|
|
2
|
+
export declare class ViewResource extends ItemResource {
|
|
3
|
+
constructor(entry: ItemEntry, options: any);
|
|
4
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './EditResource';
|
|
1
|
+
export * from './CollectionEntry';
|
|
2
|
+
export * from './CollectionResource';
|
|
3
|
+
export * from './CollectionViewResource';
|
|
4
|
+
export * from './CollectionEditResource';
|
|
5
|
+
export * from './ItemEntry';
|
|
6
|
+
export * from './ItemResource';
|
|
7
|
+
export * from './ViewResource';
|
|
8
|
+
export * from './EditResource';
|