@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,5 +1,5 @@
|
|
|
1
|
-
import { LocalCache } from '../classes';
|
|
2
|
-
export interface LocalCacheManagerInterface {
|
|
3
|
-
getCurrentLocalCache(userId: string): LocalCache;
|
|
4
|
-
getAllLocalCaches(): LocalCache[];
|
|
5
|
-
}
|
|
1
|
+
import { LocalCache } from '../classes';
|
|
2
|
+
export interface LocalCacheManagerInterface {
|
|
3
|
+
getCurrentLocalCache(userId: string): LocalCache;
|
|
4
|
+
getAllLocalCaches(): LocalCache[];
|
|
5
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { PromiseInterface } from '../types';
|
|
2
|
-
export interface Deferred<T> {
|
|
3
|
-
resolve(value?: T | PromiseInterface<T>): void;
|
|
4
|
-
reject(reason?: any): void;
|
|
5
|
-
promise: PromiseInterface<T>;
|
|
6
|
-
}
|
|
7
|
-
export interface PromiseLibraryInterface {
|
|
8
|
-
all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>, T8 | PromiseInterface<T8>, T9 | PromiseInterface<T9>, T10 | PromiseInterface<T10>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
|
|
9
|
-
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>, T8 | PromiseInterface<T8>, T9 | PromiseInterface<T9>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
|
10
|
-
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>, T8 | PromiseInterface<T8>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
|
11
|
-
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7]>;
|
|
12
|
-
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>]): PromiseInterface<[T1, T2, T3, T4, T5, T6]>;
|
|
13
|
-
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>]): PromiseInterface<[T1, T2, T3, T4, T5]>;
|
|
14
|
-
all<T1, T2, T3, T4>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>]): PromiseInterface<[T1, T2, T3, T4]>;
|
|
15
|
-
all<T1, T2, T3>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>]): PromiseInterface<[T1, T2, T3]>;
|
|
16
|
-
all<T1, T2>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>]): PromiseInterface<[T1, T2]>;
|
|
17
|
-
all<TAll>(promises: Array<TAll | PromiseInterface<TAll>>): PromiseInterface<TAll[]>;
|
|
18
|
-
all(iterable: Array<PromiseInterface<any> | any>): PromiseInterface<any[]>;
|
|
19
|
-
all<T>(promises: {
|
|
20
|
-
[K in keyof T]: (PromiseInterface<T[K]> | T[K] | null);
|
|
21
|
-
}): PromiseInterface<T>;
|
|
22
|
-
when<T>(value?: PromiseInterface<T> | T): PromiseInterface<T>;
|
|
23
|
-
reject(value?: any): PromiseInterface<any>;
|
|
24
|
-
defer<T>(): Deferred<T>;
|
|
25
|
-
}
|
|
1
|
+
import { PromiseInterface } from '../types';
|
|
2
|
+
export interface Deferred<T> {
|
|
3
|
+
resolve(value?: T | PromiseInterface<T>): void;
|
|
4
|
+
reject(reason?: any): void;
|
|
5
|
+
promise: PromiseInterface<T>;
|
|
6
|
+
}
|
|
7
|
+
export interface PromiseLibraryInterface {
|
|
8
|
+
all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>, T8 | PromiseInterface<T8>, T9 | PromiseInterface<T9>, T10 | PromiseInterface<T10>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
|
|
9
|
+
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>, T8 | PromiseInterface<T8>, T9 | PromiseInterface<T9>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
|
10
|
+
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>, T8 | PromiseInterface<T8>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
|
11
|
+
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7]>;
|
|
12
|
+
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>]): PromiseInterface<[T1, T2, T3, T4, T5, T6]>;
|
|
13
|
+
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>]): PromiseInterface<[T1, T2, T3, T4, T5]>;
|
|
14
|
+
all<T1, T2, T3, T4>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>]): PromiseInterface<[T1, T2, T3, T4]>;
|
|
15
|
+
all<T1, T2, T3>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>]): PromiseInterface<[T1, T2, T3]>;
|
|
16
|
+
all<T1, T2>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>]): PromiseInterface<[T1, T2]>;
|
|
17
|
+
all<TAll>(promises: Array<TAll | PromiseInterface<TAll>>): PromiseInterface<TAll[]>;
|
|
18
|
+
all(iterable: Array<PromiseInterface<any> | any>): PromiseInterface<any[]>;
|
|
19
|
+
all<T>(promises: {
|
|
20
|
+
[K in keyof T]: (PromiseInterface<T[K]> | T[K] | null);
|
|
21
|
+
}): PromiseInterface<T>;
|
|
22
|
+
when<T>(value?: PromiseInterface<T> | T): PromiseInterface<T>;
|
|
23
|
+
reject(value?: any): PromiseInterface<any>;
|
|
24
|
+
defer<T>(): Deferred<T>;
|
|
25
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export interface SocketMessageInterface {
|
|
2
|
-
on(event: string, messageHandler: (message: any) => void): () => boolean;
|
|
3
|
-
}
|
|
1
|
+
export interface SocketMessageInterface {
|
|
2
|
+
on(event: string, messageHandler: (message: any) => void): () => boolean;
|
|
3
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './PromiseLibraryInterface';
|
|
2
|
-
export * from './LocalCacheManagerInterface';
|
|
3
|
-
export * from './ErrorHandlerInterface';
|
|
4
|
-
export * from './ExceptionHandlerInterface';
|
|
5
|
-
export * from './AuthInterface';
|
|
6
|
-
export * from './ApiRequestServiceInterface';
|
|
7
|
-
export * from './SocketMessageInterface';
|
|
1
|
+
export * from './PromiseLibraryInterface';
|
|
2
|
+
export * from './LocalCacheManagerInterface';
|
|
3
|
+
export * from './ErrorHandlerInterface';
|
|
4
|
+
export * from './ExceptionHandlerInterface';
|
|
5
|
+
export * from './AuthInterface';
|
|
6
|
+
export * from './ApiRequestServiceInterface';
|
|
7
|
+
export * from './SocketMessageInterface';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { LocalCache } from '../classes';
|
|
2
|
-
import { CollectionResourceFactory } from '../factories';
|
|
3
|
-
import { CollectionEntry, CollectionResource, CollectionResourceOptions, ItemResource, LocalViewResource } from '../models';
|
|
4
|
-
import { FieldMap, ItemId, ItemIdConversionMap, ItemType, PromiseInterface } from '../types';
|
|
5
|
-
export declare class CollectionEditResource<ItemTypeType extends ItemType = any, T extends ItemResource<ItemTypeType> = LocalViewResource<ItemTypeType>> extends CollectionResource<ItemTypeType, T> {
|
|
6
|
-
constructor(factory: CollectionResourceFactory, collectionEntry: CollectionEntry<ItemTypeType>, options: CollectionResourceOptions<ItemTypeType>, level: number, localCache: LocalCache | null);
|
|
7
|
-
save(): PromiseInterface<ItemIdConversionMap>;
|
|
8
|
-
moveItems(idArray: ItemId[], destination: CollectionResource<ItemTypeType>, enableCallbacks?: boolean): T[];
|
|
9
|
-
removeItems(idArray: ItemId[], callOnRemove?: boolean): PromiseInterface<T[]>;
|
|
10
|
-
removeItem(itemId: ItemId, callOnRemove?: boolean): PromiseInterface<T>;
|
|
11
|
-
addItems(valuesArray: FieldMap
|
|
12
|
-
addItem(values: FieldMap
|
|
13
|
-
clear(enableCallbacks: boolean): this["items"];
|
|
14
|
-
}
|
|
1
|
+
import { LocalCache } from '../classes';
|
|
2
|
+
import { CollectionResourceFactory } from '../factories';
|
|
3
|
+
import { CollectionEntry, CollectionResource, CollectionResourceOptions, ItemResource, LocalViewResource } from '../models';
|
|
4
|
+
import { FieldMap, ItemId, ItemIdConversionMap, ItemType, PromiseInterface } from '../types';
|
|
5
|
+
export declare class CollectionEditResource<ItemTypeType extends ItemType = any, T extends ItemResource<ItemTypeType> = LocalViewResource<ItemTypeType>> extends CollectionResource<ItemTypeType, T> {
|
|
6
|
+
constructor(factory: CollectionResourceFactory, collectionEntry: CollectionEntry<ItemTypeType>, options: CollectionResourceOptions<ItemTypeType>, level: number, localCache: LocalCache | null);
|
|
7
|
+
save(): PromiseInterface<ItemIdConversionMap>;
|
|
8
|
+
moveItems(idArray: ItemId[], destination: CollectionResource<ItemTypeType>, enableCallbacks?: boolean): T[];
|
|
9
|
+
removeItems(idArray: ItemId[], callOnRemove?: boolean): PromiseInterface<T[]>;
|
|
10
|
+
removeItem(itemId: ItemId, callOnRemove?: boolean): PromiseInterface<T>;
|
|
11
|
+
addItems(valuesArray: Array<FieldMap<ItemTypeType>>, callOnAdd?: boolean, callOnActivate?: boolean): PromiseInterface<T[]>;
|
|
12
|
+
addItem(values: FieldMap<ItemTypeType>, callOnAdd?: boolean, callOnActivate?: boolean): PromiseInterface<T>;
|
|
13
|
+
clear(enableCallbacks: boolean): this["items"];
|
|
14
|
+
}
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import { ColumnExpansion, ColumnInfo, ColumnSet, ItemCache } from '../classes';
|
|
2
|
-
import { CollectionEntryFactory } from '../factories';
|
|
3
|
-
import { Deferred } from '../interfaces';
|
|
4
|
-
import { CollectionEntryOptions, CollectionResource, ItemEntry } from '../models';
|
|
5
|
-
import { ApiRequestColumns, CollectionQuery, ConversionMap, EntryParentNull, FieldMap, ItemId, ItemIdConversionMap, ItemType, PromiseInterface, QueryCallback } from '../types';
|
|
6
|
-
export declare class CollectionEntry<ItemTypeType extends ItemType = any> {
|
|
7
|
-
private factory;
|
|
8
|
-
itemType: ItemTypeType;
|
|
9
|
-
options: CollectionEntryOptions;
|
|
10
|
-
id: number;
|
|
11
|
-
parent: EntryParentNull;
|
|
12
|
-
query: CollectionQuery;
|
|
13
|
-
columns: ColumnSet<ItemTypeType>;
|
|
14
|
-
private templateColumns;
|
|
15
|
-
initial: Array<ItemEntry<ItemTypeType>>;
|
|
16
|
-
items: Array<ItemEntry<ItemTypeType>>;
|
|
17
|
-
deferred?: Deferred<this>;
|
|
18
|
-
promise: PromiseInterface<this>;
|
|
19
|
-
reloadQueued: boolean;
|
|
20
|
-
hasEditResources: boolean;
|
|
21
|
-
hasItemEditResources: boolean;
|
|
22
|
-
constructor(factory: CollectionEntryFactory, itemType: ItemTypeType, options: CollectionEntryOptions);
|
|
23
|
-
private getResources;
|
|
24
|
-
defer(): this;
|
|
25
|
-
isDeferred(): boolean;
|
|
26
|
-
_resolve(): this;
|
|
27
|
-
resolve(itemEntryCompound: {
|
|
28
|
-
columns: ColumnSet<ItemTypeType>;
|
|
29
|
-
initial: Array<ItemEntry<ItemTypeType>>;
|
|
30
|
-
modified?: Array<ItemEntry<ItemTypeType>>;
|
|
31
|
-
}): this;
|
|
32
|
-
isLocal(): boolean;
|
|
33
|
-
matchParent(itemType: ItemType, itemId: ItemId): boolean;
|
|
34
|
-
forEach(callback: (itemEntry: this['items'][0]) => void): void;
|
|
35
|
-
getItemById(itemId: ItemId): this['items'][0] | undefined;
|
|
36
|
-
getIdArray(accumulator?: ItemId[]): ItemId[];
|
|
37
|
-
createItems(valuesArray: FieldMap
|
|
38
|
-
resolveDerivedValues(itemEntries: Array<ItemEntry<ItemTypeType>>, localItemCache: ItemCache): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
39
|
-
addItems<U extends CollectionResource<ItemTypeType>>(itemEntries: Array<ItemEntry<ItemTypeType>>, resultResource: U, updateInitial?: boolean, callOnAdd?: boolean, callOnActivate?: boolean): U['items'];
|
|
40
|
-
addItems(itemEntries: Array<ItemEntry<ItemTypeType>>, resultResource?: null, updateInitial?: boolean, callOnAdd?: boolean, callOnActivate?: boolean): null;
|
|
41
|
-
addItems<U extends CollectionResource<ItemTypeType>>(itemEntries: Array<ItemEntry<ItemTypeType>>, resultResource?: U | null, updateInitial?: boolean, callOnAdd?: boolean, callOnActivate?: boolean): U['items'] | null;
|
|
42
|
-
private handleAddedItemCallbacks;
|
|
43
|
-
removeItems<U extends CollectionResource<ItemTypeType>>(idArray: ItemId[], resultResource: U, updateInitial?: boolean, callOnRemove?: boolean): U['items'];
|
|
44
|
-
removeItems(idArray: ItemId[], resultResource?: null, updateInitial?: boolean, callOnRemove?: boolean): null;
|
|
45
|
-
removeItems<U extends CollectionResource<ItemTypeType>>(idArray: ItemId[], resultResource?: U | null, updateInitial?: boolean, callOnRemove?: boolean): U['items'] | null;
|
|
46
|
-
clear<U extends CollectionResource<ItemTypeType>>(resultResource: U, updateInitial?: boolean, callOnRemove?: boolean): U['items'];
|
|
47
|
-
clear(resultResource?: null, updateInitial?: boolean, callOnRemove?: boolean): null;
|
|
48
|
-
handleRemovedItems<U extends CollectionResource<ItemTypeType>>(filterFunction: (itemEntry: this['items'][0]) => boolean, resultResource: U, updateInitial?: boolean, callOnRemove?: boolean): U['items'];
|
|
49
|
-
handleRemovedItems(filterFunction: (itemEntry: this['items'][0]) => boolean, resultResource?: null, updateInitial?: boolean, callOnRemove?: boolean): null;
|
|
50
|
-
handleRemovedItems<U extends CollectionResource<ItemTypeType>>(filterFunction: (itemEntry: this['items'][0]) => boolean, resultResource?: U | null, updateInitial?: boolean, callOnRemove?: boolean): U['items'] | null;
|
|
51
|
-
private handleRemovedItemCallbacks;
|
|
52
|
-
private createBatchStatus;
|
|
53
|
-
private expandLocal;
|
|
54
|
-
private expandRemote;
|
|
55
|
-
expand(newColumns: ApiRequestColumns, localItemCache: ItemCache): PromiseInterface<this>;
|
|
56
|
-
extendQuery(callback?: QueryCallback): CollectionQuery;
|
|
57
|
-
extend<U extends CollectionResource<ItemTypeType>>(queryCallback: QueryCallback, collectionResource?: U, callOnAdd?: boolean): PromiseInterface<U['items']>;
|
|
58
|
-
extend(queryCallback: QueryCallback, collectionResource?: null, callOnAdd?: boolean): PromiseInterface<null>;
|
|
59
|
-
queueReload(): void;
|
|
60
|
-
expandColumns(columnExpansion: ColumnExpansion<ItemTypeType>): void;
|
|
61
|
-
expandRequestColumns(requestColumns: ApiRequestColumns): void;
|
|
62
|
-
getAddedItems(returnItemIds: true): ItemId[];
|
|
63
|
-
getAddedItems(returnItemIds?: boolean): Array<ItemEntry<ItemTypeType>>;
|
|
64
|
-
getRemovedItems(returnItemIds: true): ItemId[];
|
|
65
|
-
getRemovedItems(returnItemIds?: boolean): Array<ItemEntry<ItemTypeType>>;
|
|
66
|
-
getUpdatedItems(): Array<ItemEntry<ItemTypeType>>;
|
|
67
|
-
hasAddedItems(): boolean;
|
|
68
|
-
hasRemovedItems(): boolean;
|
|
69
|
-
hasUpdatedItems(): boolean;
|
|
70
|
-
/**
|
|
71
|
-
* @description
|
|
72
|
-
* this doesn't revert updates
|
|
73
|
-
*/
|
|
74
|
-
revertChanges(): void;
|
|
75
|
-
onItemsCreated(conversionMap: ConversionMap): void;
|
|
76
|
-
private onAddInitial;
|
|
77
|
-
private onRemoveInitial;
|
|
78
|
-
getUpdatedItemColumns(conversionMap: ItemIdConversionMap): {
|
|
79
|
-
[columnId: string]: ColumnInfo<ItemTypeType>;
|
|
80
|
-
};
|
|
81
|
-
clone(parent: EntryParentNull, conversionMap?: ItemIdConversionMap): CollectionEntry<ItemTypeType>;
|
|
82
|
-
}
|
|
1
|
+
import { ColumnExpansion, ColumnInfo, ColumnSet, ItemCache } from '../classes';
|
|
2
|
+
import { CollectionEntryFactory } from '../factories';
|
|
3
|
+
import { Deferred } from '../interfaces';
|
|
4
|
+
import { CollectionEntryOptions, CollectionResource, ItemEntry } from '../models';
|
|
5
|
+
import { ApiRequestColumns, CollectionQuery, ConversionMap, EntryParentNull, FieldMap, ItemId, ItemIdConversionMap, ItemType, PromiseInterface, QueryCallback } from '../types';
|
|
6
|
+
export declare class CollectionEntry<ItemTypeType extends ItemType = any> {
|
|
7
|
+
private factory;
|
|
8
|
+
itemType: ItemTypeType;
|
|
9
|
+
options: CollectionEntryOptions;
|
|
10
|
+
id: number;
|
|
11
|
+
parent: EntryParentNull;
|
|
12
|
+
query: CollectionQuery;
|
|
13
|
+
columns: ColumnSet<ItemTypeType>;
|
|
14
|
+
private templateColumns;
|
|
15
|
+
initial: Array<ItemEntry<ItemTypeType>>;
|
|
16
|
+
items: Array<ItemEntry<ItemTypeType>>;
|
|
17
|
+
deferred?: Deferred<this>;
|
|
18
|
+
promise: PromiseInterface<this>;
|
|
19
|
+
reloadQueued: boolean;
|
|
20
|
+
hasEditResources: boolean;
|
|
21
|
+
hasItemEditResources: boolean;
|
|
22
|
+
constructor(factory: CollectionEntryFactory, itemType: ItemTypeType, options: CollectionEntryOptions);
|
|
23
|
+
private getResources;
|
|
24
|
+
defer(): this;
|
|
25
|
+
isDeferred(): boolean;
|
|
26
|
+
_resolve(): this;
|
|
27
|
+
resolve(itemEntryCompound: {
|
|
28
|
+
columns: ColumnSet<ItemTypeType>;
|
|
29
|
+
initial: Array<ItemEntry<ItemTypeType>>;
|
|
30
|
+
modified?: Array<ItemEntry<ItemTypeType>>;
|
|
31
|
+
}): this;
|
|
32
|
+
isLocal(): boolean;
|
|
33
|
+
matchParent(itemType: ItemType, itemId: ItemId): boolean;
|
|
34
|
+
forEach(callback: (itemEntry: this['items'][0]) => void): void;
|
|
35
|
+
getItemById(itemId: ItemId): this['items'][0] | undefined;
|
|
36
|
+
getIdArray(accumulator?: ItemId[]): ItemId[];
|
|
37
|
+
createItems(valuesArray: Array<FieldMap<ItemTypeType>>): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
38
|
+
resolveDerivedValues(itemEntries: Array<ItemEntry<ItemTypeType>>, localItemCache: ItemCache): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
39
|
+
addItems<U extends CollectionResource<ItemTypeType>>(itemEntries: Array<ItemEntry<ItemTypeType>>, resultResource: U, updateInitial?: boolean, callOnAdd?: boolean, callOnActivate?: boolean): U['items'];
|
|
40
|
+
addItems(itemEntries: Array<ItemEntry<ItemTypeType>>, resultResource?: null, updateInitial?: boolean, callOnAdd?: boolean, callOnActivate?: boolean): null;
|
|
41
|
+
addItems<U extends CollectionResource<ItemTypeType>>(itemEntries: Array<ItemEntry<ItemTypeType>>, resultResource?: U | null, updateInitial?: boolean, callOnAdd?: boolean, callOnActivate?: boolean): U['items'] | null;
|
|
42
|
+
private handleAddedItemCallbacks;
|
|
43
|
+
removeItems<U extends CollectionResource<ItemTypeType>>(idArray: ItemId[], resultResource: U, updateInitial?: boolean, callOnRemove?: boolean): U['items'];
|
|
44
|
+
removeItems(idArray: ItemId[], resultResource?: null, updateInitial?: boolean, callOnRemove?: boolean): null;
|
|
45
|
+
removeItems<U extends CollectionResource<ItemTypeType>>(idArray: ItemId[], resultResource?: U | null, updateInitial?: boolean, callOnRemove?: boolean): U['items'] | null;
|
|
46
|
+
clear<U extends CollectionResource<ItemTypeType>>(resultResource: U, updateInitial?: boolean, callOnRemove?: boolean): U['items'];
|
|
47
|
+
clear(resultResource?: null, updateInitial?: boolean, callOnRemove?: boolean): null;
|
|
48
|
+
handleRemovedItems<U extends CollectionResource<ItemTypeType>>(filterFunction: (itemEntry: this['items'][0]) => boolean, resultResource: U, updateInitial?: boolean, callOnRemove?: boolean): U['items'];
|
|
49
|
+
handleRemovedItems(filterFunction: (itemEntry: this['items'][0]) => boolean, resultResource?: null, updateInitial?: boolean, callOnRemove?: boolean): null;
|
|
50
|
+
handleRemovedItems<U extends CollectionResource<ItemTypeType>>(filterFunction: (itemEntry: this['items'][0]) => boolean, resultResource?: U | null, updateInitial?: boolean, callOnRemove?: boolean): U['items'] | null;
|
|
51
|
+
private handleRemovedItemCallbacks;
|
|
52
|
+
private createBatchStatus;
|
|
53
|
+
private expandLocal;
|
|
54
|
+
private expandRemote;
|
|
55
|
+
expand(newColumns: ApiRequestColumns, localItemCache: ItemCache): PromiseInterface<this>;
|
|
56
|
+
extendQuery(callback?: QueryCallback): CollectionQuery;
|
|
57
|
+
extend<U extends CollectionResource<ItemTypeType>>(queryCallback: QueryCallback, collectionResource?: U, callOnAdd?: boolean): PromiseInterface<U['items']>;
|
|
58
|
+
extend(queryCallback: QueryCallback, collectionResource?: null, callOnAdd?: boolean): PromiseInterface<null>;
|
|
59
|
+
queueReload(): void;
|
|
60
|
+
expandColumns(columnExpansion: ColumnExpansion<ItemTypeType>): void;
|
|
61
|
+
expandRequestColumns(requestColumns: ApiRequestColumns): void;
|
|
62
|
+
getAddedItems(returnItemIds: true): ItemId[];
|
|
63
|
+
getAddedItems(returnItemIds?: boolean): Array<ItemEntry<ItemTypeType>>;
|
|
64
|
+
getRemovedItems(returnItemIds: true): ItemId[];
|
|
65
|
+
getRemovedItems(returnItemIds?: boolean): Array<ItemEntry<ItemTypeType>>;
|
|
66
|
+
getUpdatedItems(): Array<ItemEntry<ItemTypeType>>;
|
|
67
|
+
hasAddedItems(): boolean;
|
|
68
|
+
hasRemovedItems(): boolean;
|
|
69
|
+
hasUpdatedItems(): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* @description
|
|
72
|
+
* this doesn't revert updates
|
|
73
|
+
*/
|
|
74
|
+
revertChanges(): void;
|
|
75
|
+
onItemsCreated(conversionMap: ConversionMap): void;
|
|
76
|
+
private onAddInitial;
|
|
77
|
+
private onRemoveInitial;
|
|
78
|
+
getUpdatedItemColumns(conversionMap: ItemIdConversionMap): {
|
|
79
|
+
[columnId: string]: ColumnInfo<ItemTypeType>;
|
|
80
|
+
};
|
|
81
|
+
clone(parent: EntryParentNull, conversionMap?: ItemIdConversionMap): CollectionEntry<ItemTypeType>;
|
|
82
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ApiQuery, ApiRequestColumns, ApiRequestLimit, EntryParentNull } from '../types';
|
|
2
|
-
export declare type CollectionEntryOptionsInterface = Partial<CollectionEntryOptions>;
|
|
3
|
-
export declare class CollectionEntryOptions {
|
|
4
|
-
columns: ApiRequestColumns;
|
|
5
|
-
query: ApiQuery | null;
|
|
6
|
-
queryParams: any;
|
|
7
|
-
parent: EntryParentNull;
|
|
8
|
-
deferRequest: boolean;
|
|
9
|
-
limit: ApiRequestLimit | null;
|
|
10
|
-
entryKey: string | null;
|
|
11
|
-
constructor(values: CollectionEntryOptionsInterface);
|
|
12
|
-
}
|
|
1
|
+
import { ApiQuery, ApiRequestColumns, ApiRequestLimit, EntryParentNull } from '../types';
|
|
2
|
+
export declare type CollectionEntryOptionsInterface = Partial<CollectionEntryOptions>;
|
|
3
|
+
export declare class CollectionEntryOptions {
|
|
4
|
+
columns: ApiRequestColumns;
|
|
5
|
+
query: ApiQuery | null;
|
|
6
|
+
queryParams: any;
|
|
7
|
+
parent: EntryParentNull;
|
|
8
|
+
deferRequest: boolean;
|
|
9
|
+
limit: ApiRequestLimit | null;
|
|
10
|
+
entryKey: string | null;
|
|
11
|
+
constructor(values: CollectionEntryOptionsInterface);
|
|
12
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { LocalCache } from '../classes';
|
|
2
|
-
import { CollectionResourceFactory } from '../factories';
|
|
3
|
-
import { CollectionEntry, CollectionResourceOptions, ItemEntry, ItemResource, LocalViewResource } from '../models';
|
|
4
|
-
import { ItemResourceItemIdMap, ItemType, PromiseInterface, QueryCallback, ResponseColumnMap } from '../types';
|
|
5
|
-
export declare abstract class CollectionResource<ItemTypeType extends ItemType = any, T extends ItemResource<ItemTypeType> = LocalViewResource<ItemTypeType>> {
|
|
6
|
-
protected factory: CollectionResourceFactory;
|
|
7
|
-
entry: CollectionEntry<ItemTypeType>;
|
|
8
|
-
options: CollectionResourceOptions<ItemTypeType>;
|
|
9
|
-
level: number;
|
|
10
|
-
localCache: LocalCache | null;
|
|
11
|
-
items: T[];
|
|
12
|
-
columns: ResponseColumnMap;
|
|
13
|
-
protected itemIdMap: ItemResourceItemIdMap<T>;
|
|
14
|
-
private readonly onChange;
|
|
15
|
-
protected constructor(factory: CollectionResourceFactory, entry: CollectionEntry<ItemTypeType>, options: CollectionResourceOptions<ItemTypeType>, level: number, localCache: LocalCache | null);
|
|
16
|
-
getItemById(itemId: number): T;
|
|
17
|
-
rebuildMap(): void;
|
|
18
|
-
addItemResources(itemEntries: Array<ItemEntry<ItemTypeType>>): T[];
|
|
19
|
-
/**
|
|
20
|
-
* @param itemEntries
|
|
21
|
-
* @returns {ItemResource[]}
|
|
22
|
-
*
|
|
23
|
-
* Returns the Itemresources that where removed Collection.
|
|
24
|
-
* Filters on ItemResource.entry === ItemEntry
|
|
25
|
-
*/
|
|
26
|
-
removeItemResources(itemEntries: Array<ItemEntry<ItemTypeType>>): T[];
|
|
27
|
-
callOnAdd(itemResources: T[]): void;
|
|
28
|
-
callOnRemove(itemResources: T[]): void;
|
|
29
|
-
forEach(callback: (itemResource: T) => void): void;
|
|
30
|
-
filter(callback: (itemResource: T) => boolean): T[];
|
|
31
|
-
first(callback: (itemResource: T) => boolean): T | null;
|
|
32
|
-
some(callback: (itemResource: T) => boolean): boolean;
|
|
33
|
-
groupBy(argument: string | ((itemResource: T) => string | null)): {
|
|
34
|
-
[key: string]: T[];
|
|
35
|
-
};
|
|
36
|
-
map<U>(argument: string | ((itemResource: T) => U)): U[];
|
|
37
|
-
reduce<U>(callback: (itemResource: T, value: U) => U, value: U): U;
|
|
38
|
-
extend(queryCallback: QueryCallback, returnAllItems?: boolean, callOnAdd?: boolean): PromiseInterface<T[]>;
|
|
39
|
-
clearResource(): void;
|
|
40
|
-
deactivate(): void;
|
|
41
|
-
}
|
|
1
|
+
import { LocalCache } from '../classes';
|
|
2
|
+
import { CollectionResourceFactory } from '../factories';
|
|
3
|
+
import { CollectionEntry, CollectionResourceOptions, ItemEntry, ItemResource, LocalViewResource } from '../models';
|
|
4
|
+
import { ItemResourceItemIdMap, ItemType, PromiseInterface, QueryCallback, ResponseColumnMap } from '../types';
|
|
5
|
+
export declare abstract class CollectionResource<ItemTypeType extends ItemType = any, T extends ItemResource<ItemTypeType> = LocalViewResource<ItemTypeType>> {
|
|
6
|
+
protected factory: CollectionResourceFactory;
|
|
7
|
+
entry: CollectionEntry<ItemTypeType>;
|
|
8
|
+
options: CollectionResourceOptions<ItemTypeType>;
|
|
9
|
+
level: number;
|
|
10
|
+
localCache: LocalCache | null;
|
|
11
|
+
items: T[];
|
|
12
|
+
columns: ResponseColumnMap;
|
|
13
|
+
protected itemIdMap: ItemResourceItemIdMap<T>;
|
|
14
|
+
private readonly onChange;
|
|
15
|
+
protected constructor(factory: CollectionResourceFactory, entry: CollectionEntry<ItemTypeType>, options: CollectionResourceOptions<ItemTypeType>, level: number, localCache: LocalCache | null);
|
|
16
|
+
getItemById(itemId: number): T;
|
|
17
|
+
rebuildMap(): void;
|
|
18
|
+
addItemResources(itemEntries: Array<ItemEntry<ItemTypeType>>): T[];
|
|
19
|
+
/**
|
|
20
|
+
* @param itemEntries
|
|
21
|
+
* @returns {ItemResource[]}
|
|
22
|
+
*
|
|
23
|
+
* Returns the Itemresources that where removed Collection.
|
|
24
|
+
* Filters on ItemResource.entry === ItemEntry
|
|
25
|
+
*/
|
|
26
|
+
removeItemResources(itemEntries: Array<ItemEntry<ItemTypeType>>): T[];
|
|
27
|
+
callOnAdd(itemResources: T[]): void;
|
|
28
|
+
callOnRemove(itemResources: T[]): void;
|
|
29
|
+
forEach(callback: (itemResource: T) => void): void;
|
|
30
|
+
filter(callback: (itemResource: T) => boolean): T[];
|
|
31
|
+
first(callback: (itemResource: T) => boolean): T | null;
|
|
32
|
+
some(callback: (itemResource: T) => boolean): boolean;
|
|
33
|
+
groupBy(argument: string | ((itemResource: T) => string | null)): {
|
|
34
|
+
[key: string]: T[];
|
|
35
|
+
};
|
|
36
|
+
map<U>(argument: string | ((itemResource: T) => U)): U[];
|
|
37
|
+
reduce<U>(callback: (itemResource: T, value: U) => U, value: U): U;
|
|
38
|
+
extend(queryCallback: QueryCallback, returnAllItems?: boolean, callOnAdd?: boolean): PromiseInterface<T[]>;
|
|
39
|
+
clearResource(): void;
|
|
40
|
+
deactivate(): void;
|
|
41
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { CollectionEntry, CollectionResource, ItemEntry, ItemResource } from '../models';
|
|
2
|
-
import { ConversionMap, ItemType, OnChangeFunction } from '../types';
|
|
3
|
-
export declare type CollectionResourceCallback<ItemTypeType extends ItemType> = (itemResources: Array<ItemResource<ItemTypeType>>, collectionResource: CollectionResource<ItemTypeType>) => void;
|
|
4
|
-
export declare type CollectionResourceInitialCallback<ItemTypeType extends ItemType> = (itemEntries: Array<ItemEntry<ItemTypeType>>, collectionEntry: CollectionEntry<ItemTypeType>) => void;
|
|
5
|
-
export declare type OnItemsCreatedCallback = (conversionMap: ConversionMap) => void;
|
|
6
|
-
export declare type CollectionResourceOptionsInterface<ItemTypeType extends ItemType> = Partial<CollectionResourceOptions<ItemTypeType>>;
|
|
7
|
-
export declare class CollectionResourceOptions<ItemTypeType extends ItemType> {
|
|
8
|
-
editItems: boolean;
|
|
9
|
-
remoteItems: boolean;
|
|
10
|
-
editCollection: boolean;
|
|
11
|
-
modInstant: boolean;
|
|
12
|
-
enableSave: boolean;
|
|
13
|
-
onItemsCreated: OnItemsCreatedCallback;
|
|
14
|
-
onChange: OnChangeFunction;
|
|
15
|
-
onAdd: CollectionResourceCallback<ItemTypeType>;
|
|
16
|
-
onRemove: CollectionResourceCallback<ItemTypeType>;
|
|
17
|
-
onAddInitial: CollectionResourceInitialCallback<ItemTypeType>;
|
|
18
|
-
onRemoveInitial: CollectionResourceInitialCallback<ItemTypeType>;
|
|
19
|
-
resourceKey: string | null;
|
|
20
|
-
custom: any;
|
|
21
|
-
constructor(values: CollectionResourceOptionsInterface<ItemTypeType>);
|
|
22
|
-
}
|
|
1
|
+
import { CollectionEntry, CollectionResource, ItemEntry, ItemResource } from '../models';
|
|
2
|
+
import { ConversionMap, ItemType, OnChangeFunction } from '../types';
|
|
3
|
+
export declare type CollectionResourceCallback<ItemTypeType extends ItemType> = (itemResources: Array<ItemResource<ItemTypeType>>, collectionResource: CollectionResource<ItemTypeType>) => void;
|
|
4
|
+
export declare type CollectionResourceInitialCallback<ItemTypeType extends ItemType> = (itemEntries: Array<ItemEntry<ItemTypeType>>, collectionEntry: CollectionEntry<ItemTypeType>) => void;
|
|
5
|
+
export declare type OnItemsCreatedCallback = (conversionMap: ConversionMap) => void;
|
|
6
|
+
export declare type CollectionResourceOptionsInterface<ItemTypeType extends ItemType> = Partial<CollectionResourceOptions<ItemTypeType>>;
|
|
7
|
+
export declare class CollectionResourceOptions<ItemTypeType extends ItemType> {
|
|
8
|
+
editItems: boolean;
|
|
9
|
+
remoteItems: boolean;
|
|
10
|
+
editCollection: boolean;
|
|
11
|
+
modInstant: boolean;
|
|
12
|
+
enableSave: boolean;
|
|
13
|
+
onItemsCreated: OnItemsCreatedCallback;
|
|
14
|
+
onChange: OnChangeFunction;
|
|
15
|
+
onAdd: CollectionResourceCallback<ItemTypeType>;
|
|
16
|
+
onRemove: CollectionResourceCallback<ItemTypeType>;
|
|
17
|
+
onAddInitial: CollectionResourceInitialCallback<ItemTypeType>;
|
|
18
|
+
onRemoveInitial: CollectionResourceInitialCallback<ItemTypeType>;
|
|
19
|
+
resourceKey: string | null;
|
|
20
|
+
custom: any;
|
|
21
|
+
constructor(values: CollectionResourceOptionsInterface<ItemTypeType>);
|
|
22
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { LocalCache } from '../classes';
|
|
2
|
-
import { CollectionResourceFactory } from '../factories';
|
|
3
|
-
import { CollectionEntry, CollectionResource, CollectionResourceOptions, ItemResource, LocalViewResource } from '../models';
|
|
4
|
-
import { ItemType } from '../types';
|
|
5
|
-
export declare class CollectionViewResource<ItemTypeType extends ItemType = any, T extends ItemResource<ItemTypeType> = LocalViewResource<ItemTypeType>> extends CollectionResource<ItemTypeType, T> {
|
|
6
|
-
constructor(collectionResourceFactory: CollectionResourceFactory, collectionEntry: CollectionEntry<ItemTypeType>, options: CollectionResourceOptions<ItemTypeType>, level: number, localCache: LocalCache | null);
|
|
7
|
-
}
|
|
1
|
+
import { LocalCache } from '../classes';
|
|
2
|
+
import { CollectionResourceFactory } from '../factories';
|
|
3
|
+
import { CollectionEntry, CollectionResource, CollectionResourceOptions, ItemResource, LocalViewResource } from '../models';
|
|
4
|
+
import { ItemType } from '../types';
|
|
5
|
+
export declare class CollectionViewResource<ItemTypeType extends ItemType = any, T extends ItemResource<ItemTypeType> = LocalViewResource<ItemTypeType>> extends CollectionResource<ItemTypeType, T> {
|
|
6
|
+
constructor(collectionResourceFactory: CollectionResourceFactory, collectionEntry: CollectionEntry<ItemTypeType>, options: CollectionResourceOptions<ItemTypeType>, level: number, localCache: LocalCache | null);
|
|
7
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { LocalCache } from '../classes';
|
|
2
|
-
import { ItemResourceFactory } from '../factories';
|
|
3
|
-
import { ItemEntry, ItemResource, ItemResourceOptions } from '../models';
|
|
4
|
-
import { FieldMap, ItemType, PromiseInterface } from '../types';
|
|
5
|
-
export declare class EditResource<ItemTypeType extends ItemType = any> extends ItemResource<ItemTypeType> {
|
|
6
|
-
protected localCopies: FieldMap
|
|
7
|
-
protected transactions: number;
|
|
8
|
-
constructor(factory: ItemResourceFactory, entry: ItemEntry<ItemTypeType>, options: ItemResourceOptions, isNew: boolean, localCache: LocalCache | null);
|
|
9
|
-
isNew(): boolean;
|
|
10
|
-
start(): this;
|
|
11
|
-
rollback(): this;
|
|
12
|
-
commit(callOnChange?: boolean): this;
|
|
13
|
-
getLocalCopy(): FieldMap | null;
|
|
14
|
-
copyFields(destination?: FieldMap): FieldMap
|
|
15
|
-
setFields(values: FieldMap
|
|
16
|
-
callOnChange(previous?: FieldMap): this;
|
|
17
|
-
save(parameters?: any): PromiseInterface<this>;
|
|
18
|
-
}
|
|
1
|
+
import { LocalCache } from '../classes';
|
|
2
|
+
import { ItemResourceFactory } from '../factories';
|
|
3
|
+
import { ItemEntry, ItemResource, ItemResourceOptions } from '../models';
|
|
4
|
+
import { FieldMap, ItemType, PromiseInterface } from '../types';
|
|
5
|
+
export declare class EditResource<ItemTypeType extends ItemType = any> extends ItemResource<ItemTypeType> {
|
|
6
|
+
protected localCopies: Array<FieldMap<ItemTypeType>>;
|
|
7
|
+
protected transactions: number;
|
|
8
|
+
constructor(factory: ItemResourceFactory, entry: ItemEntry<ItemTypeType>, options: ItemResourceOptions, isNew: boolean, localCache: LocalCache | null);
|
|
9
|
+
isNew(): boolean;
|
|
10
|
+
start(): this;
|
|
11
|
+
rollback(): this;
|
|
12
|
+
commit(callOnChange?: boolean): this;
|
|
13
|
+
getLocalCopy(): FieldMap<ItemTypeType> | null;
|
|
14
|
+
copyFields(destination?: FieldMap<ItemTypeType>): FieldMap<ItemTypeType>;
|
|
15
|
+
setFields(values: FieldMap<ItemTypeType>, callOnChange?: boolean): this;
|
|
16
|
+
callOnChange(previous?: FieldMap<ItemTypeType>): this;
|
|
17
|
+
save(parameters?: any): PromiseInterface<this>;
|
|
18
|
+
}
|