@rentman/rm-core 4.0.2 → 4.0.3
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 +692 -688
- package/dist/rm-core.js +9521 -9462
- package/dist/rm-core.min.js +2 -2
- package/dist/types/classes/ApiFormatter.d.ts +55 -55
- package/dist/types/classes/ApiRequestService.d.ts +20 -20
- package/dist/types/classes/ApiResponseProcessor.d.ts +31 -31
- package/dist/types/classes/ChangesCompilation.d.ts +34 -34
- package/dist/types/classes/ChangesDelta.d.ts +59 -59
- package/dist/types/classes/ChangesDeltaBase.d.ts +50 -50
- package/dist/types/classes/ChangesProcessor.d.ts +47 -47
- package/dist/types/classes/CollectionCache.d.ts +38 -38
- package/dist/types/classes/CollectionEntryService.d.ts +25 -25
- package/dist/types/classes/CollectionMatcher.d.ts +9 -9
- package/dist/types/classes/CollectionMatcherBase.d.ts +26 -26
- package/dist/types/classes/CollectionResourceService.d.ts +6 -6
- package/dist/types/classes/ColumnCache.d.ts +21 -21
- package/dist/types/classes/ColumnExpansion.d.ts +22 -22
- package/dist/types/classes/ColumnHandler.d.ts +21 -21
- package/dist/types/classes/ColumnInfo.d.ts +14 -14
- package/dist/types/classes/ColumnSet.d.ts +39 -39
- package/dist/types/classes/ColumnSubsetCache.d.ts +8 -8
- package/dist/types/classes/ColumnUtil.d.ts +99 -99
- package/dist/types/classes/ConversionMapService.d.ts +27 -27
- package/dist/types/classes/CreateRequest.d.ts +19 -19
- package/dist/types/classes/CreatedChangesDelta.d.ts +15 -15
- package/dist/types/classes/InternalChangesDelta.d.ts +39 -39
- package/dist/types/classes/ItemCache.d.ts +29 -29
- package/dist/types/classes/ItemCreateService.d.ts +24 -24
- package/dist/types/classes/ItemEntryService.d.ts +34 -34
- package/dist/types/classes/KeyService.d.ts +16 -16
- package/dist/types/classes/LockService.d.ts +32 -32
- package/dist/types/classes/ModuleChangesCompilation.d.ts +18 -18
- package/dist/types/classes/QueryColumnExtractor.d.ts +20 -20
- package/dist/types/classes/QueryLocalLinkedToParser.d.ts +17 -0
- package/dist/types/classes/QueryMatcher.d.ts +14 -14
- package/dist/types/classes/QueryParser.d.ts +25 -25
- package/dist/types/classes/QueryParserBase.d.ts +29 -29
- package/dist/types/classes/QueryService.d.ts +17 -14
- package/dist/types/classes/RequestBuffer.d.ts +28 -28
- package/dist/types/classes/RequestBufferManager.d.ts +24 -24
- package/dist/types/classes/RequestColumnExpansion.d.ts +15 -15
- package/dist/types/classes/SocketMessageHandler.d.ts +31 -31
- package/dist/types/classes/TemplateCache.d.ts +66 -66
- package/dist/types/classes/Util.d.ts +30 -30
- package/dist/types/classes/cache/AbstractCache.d.ts +101 -101
- package/dist/types/classes/cache/CollectionHandlerBase.d.ts +68 -68
- package/dist/types/classes/cache/CollectionMatcherCacheProcessor.d.ts +26 -26
- package/dist/types/classes/cache/ItemHandlerBase.d.ts +95 -95
- package/dist/types/classes/cache/server/ServerCache.d.ts +83 -83
- package/dist/types/classes/cache/server/ServerCollectionHandler.d.ts +44 -44
- package/dist/types/classes/cache/server/ServerItemHandler.d.ts +51 -51
- package/dist/types/classes/cache/transaction/TransactionCache.d.ts +336 -336
- package/dist/types/classes/cache/transaction/TransactionCollectionHandler.d.ts +62 -62
- package/dist/types/classes/cache/transaction/TransactionEventHandler.d.ts +24 -24
- package/dist/types/classes/cache/transaction/TransactionItemHandler.d.ts +90 -90
- package/dist/types/classes/cache/transaction/TransactionValidator.d.ts +28 -28
- package/dist/types/classes/index.d.ts +46 -46
- package/dist/types/constants.d.ts +7 -7
- package/dist/types/core.d.ts +52 -52
- package/dist/types/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/types/factories/ChangesCompilationFactory.d.ts +6 -6
- package/dist/types/factories/ChangesDeltaFactory.d.ts +11 -11
- package/dist/types/factories/ChangesProcessorFactory.d.ts +22 -22
- package/dist/types/factories/CollectionCacheFactory.d.ts +8 -8
- package/dist/types/factories/CollectionEntryFactory.d.ts +11 -11
- package/dist/types/factories/CollectionMatcherFactory.d.ts +9 -9
- package/dist/types/factories/CollectionResourceFactory.d.ts +16 -16
- package/dist/types/factories/ColumnExpansionFactory.d.ts +8 -8
- package/dist/types/factories/ColumnInfoFactory.d.ts +7 -7
- package/dist/types/factories/ColumnSetFactory.d.ts +19 -19
- package/dist/types/factories/ColumnSubsetCacheFactory.d.ts +6 -6
- package/dist/types/factories/CreateRequestFactory.d.ts +11 -11
- package/dist/types/factories/ItemCacheFactory.d.ts +8 -8
- package/dist/types/factories/ItemEntryFactory.d.ts +15 -15
- package/dist/types/factories/ItemResourceFactory.d.ts +14 -14
- package/dist/types/factories/ModuleChangesCompilationFactory.d.ts +5 -5
- package/dist/types/factories/QueryMatcherFactory.d.ts +7 -7
- package/dist/types/factories/QueryParserFactory.d.ts +6 -6
- package/dist/types/factories/RequestColumnExpansionFactory.d.ts +6 -6
- package/dist/types/factories/TemplateFactory.d.ts +10 -10
- package/dist/types/factories/TransactionCacheFactory.d.ts +15 -15
- package/dist/types/factories/index.d.ts +22 -22
- package/dist/types/index.d.ts +7 -7
- package/dist/types/interfaces/AbstractCacheDependencyInterface.d.ts +44 -44
- package/dist/types/interfaces/ApiRequestServiceInterface.d.ts +11 -11
- package/dist/types/interfaces/AuthInterface.d.ts +9 -9
- package/dist/types/interfaces/ErrorHandlerInterface.d.ts +5 -5
- package/dist/types/interfaces/ExceptionHandlerInterface.d.ts +3 -3
- package/dist/types/interfaces/LinkTreeServiceInterface.d.ts +4 -4
- package/dist/types/interfaces/PromiseLibraryInterface.d.ts +25 -25
- package/dist/types/interfaces/ServerCacheDependencyInterface.d.ts +7 -7
- package/dist/types/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/types/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +21 -20
- package/dist/types/interfaces/TransactionItemHandlerDependencyInterface.d.ts +26 -26
- package/dist/types/interfaces/index.d.ts +11 -11
- package/dist/types/models/CollectionEntry.d.ts +27 -27
- package/dist/types/models/CollectionEntryOptions.d.ts +13 -13
- package/dist/types/models/CollectionResource.d.ts +63 -63
- package/dist/types/models/CollectionResourceOptions.d.ts +23 -23
- package/dist/types/models/ItemEntry.d.ts +19 -19
- package/dist/types/models/ItemEntryOptions.d.ts +8 -8
- package/dist/types/models/ItemResource.d.ts +84 -84
- package/dist/types/models/Template.d.ts +11 -11
- package/dist/types/models/index.d.ts +8 -8
- package/dist/types/types/ItemTypesCollection.d.ts +263 -263
- package/dist/types/types/PromiseInterface.d.ts +2 -2
- package/dist/types/types/index.d.ts +2 -2
- package/package.json +36 -36
- package/readme.md +15 -15
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { ApiQuery, ApiRequestColumns, ChangesDelta, CollectionEntryOptions, CollectionResource, ConversionMap, ItemEntryOptions, ItemIdConversionMap, ModifyFieldsCallback, PromiseInterface, TransactionCollectionHandlerDependencyInterface, TransactionItemHandler } from '../../../index';
|
|
2
|
-
import { CollectionEntry, ItemEntry } from '../../../models';
|
|
3
|
-
import { ApiRequestColumn, CollectionEntryParentIdMap, CollectionResourceParentIdMap, ItemId, ItemType, QueryCallback } from '../../../types';
|
|
4
|
-
import { CollectionMatcher } from '../../index';
|
|
5
|
-
import { CollectionHandlerBase } from '../CollectionHandlerBase';
|
|
6
|
-
import { TransactionCache } from './TransactionCache';
|
|
7
|
-
export declare class TransactionCollectionHandler extends CollectionHandlerBase {
|
|
8
|
-
private dependencies;
|
|
9
|
-
private itemHandler;
|
|
10
|
-
protected transaction: TransactionCache;
|
|
11
|
-
collectionResources: {
|
|
12
|
-
[collectionEntryId: number]: CollectionResource[];
|
|
13
|
-
};
|
|
14
|
-
constructor(dependencies: TransactionCollectionHandlerDependencyInterface, itemHandler: TransactionItemHandler, transaction: TransactionCache);
|
|
15
|
-
fetchItemEntriesByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, options: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
16
|
-
getAllCollectionsByItemType<ItemTypeType extends ItemType>(itemType: ItemTypeType): Array<CollectionEntry<ItemTypeType>>;
|
|
17
|
-
createCollectionEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionEntryOptions): CollectionEntry<ItemTypeType>;
|
|
18
|
-
/**
|
|
19
|
-
* @description
|
|
20
|
-
* Calls the {@link CollectionResourceOptions.onItemsCreated onItemsCreated} callback whenever a create request is done on {@link ItemEntry ItemEntries} that fit in the collection
|
|
21
|
-
* Can be used to update maps that use {@link ItemEntry.itemId ItemEntry.itemId}
|
|
22
|
-
*
|
|
23
|
-
* @deprecated
|
|
24
|
-
* You should use register a {@link TransactionCache.registerFieldChangeCallback field change callback} and compare previous.id with fields.id
|
|
25
|
-
*/
|
|
26
|
-
onItemEntriesCreated(collectionEntry: CollectionEntry, conversionMap: ConversionMap): void;
|
|
27
|
-
clearEntry(entry: CollectionEntry): void;
|
|
28
|
-
addResource(resource: CollectionResource): void;
|
|
29
|
-
clearResource(resource: CollectionResource): void;
|
|
30
|
-
/**
|
|
31
|
-
* @description
|
|
32
|
-
* Updates the parents of the passed {@link ItemEntry ItemEntries}, returns `void` because you should use the {@link CollectionResourceOptions.onAdd onAdd} and {@link CollectionResourceOptions.onRemove onRemove} callbacks
|
|
33
|
-
*/
|
|
34
|
-
moveItems<CollectionEntryType extends CollectionEntry>(sourceCollectionEntry: CollectionEntryType, destinationCollectionEntry: CollectionEntryType, itemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>): void;
|
|
35
|
-
extendCollectionEntry<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, queryCallback: QueryCallback): PromiseInterface<CollectionEntryType>;
|
|
36
|
-
cloneCollectionEntry<CollectionEntryType extends CollectionEntry>(changesDelta: ChangesDelta, sourceEntry: CollectionEntryType, conversionMap?: ItemIdConversionMap, modifyFieldsCallback?: ModifyFieldsCallback): void;
|
|
37
|
-
getCollectionMatcher(): CollectionMatcher;
|
|
38
|
-
fetchCollectionEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionEntryOptions): PromiseInterface<CollectionEntry<ItemTypeType>>;
|
|
39
|
-
fetchLinkedCollectionEntries<ItemTypeType extends ItemType>(parentType: ItemType, parentIdArray: ItemId[] | (() => ItemId[]), itemType: ItemTypeType, options: CollectionEntryOptions): PromiseInterface<CollectionEntryParentIdMap<ItemTypeType>>;
|
|
40
|
-
expandCollectionEntries<ItemTypeType extends ItemType>(parentType: ItemType, itemType: ItemTypeType, collections: CollectionResourceParentIdMap, newColumns: ApiRequestColumn[]): PromiseInterface<CollectionResourceParentIdMap>;
|
|
41
|
-
extendCollectionEntries<T extends CollectionResourceParentIdMap>(parentType: ItemType, itemType: ItemType, options: CollectionEntryOptions, queryCallback: QueryCallback, collections: T): PromiseInterface<void>;
|
|
42
|
-
addItemEntriesToCollectionChanges<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, itemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>, isCalledAfterSocketUpdate?: boolean): void;
|
|
43
|
-
isLocal(options: CollectionEntryOptions | ItemEntryOptions): boolean;
|
|
44
|
-
expandCollectionEntry<CollectionEntryType extends CollectionEntry>(changesDelta: ChangesDelta, collectionEntry: CollectionEntryType, newColumns: ApiRequestColumns): PromiseInterface<CollectionEntryType>;
|
|
45
|
-
/**
|
|
46
|
-
* @description
|
|
47
|
-
* When {@link ItemEntry ItemEntries} are added to the changes of a {@link CollectionEntry CollectionEntry} all {@link CollectionResource CollectionResources}
|
|
48
|
-
* should get new {@link ItemResource ItemResources} for the newly added entries
|
|
49
|
-
*/
|
|
50
|
-
protected handleAddedItemEntriesCallback<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, addedEntries: Array<ItemEntry<CollectionEntryType['itemType']>>): void;
|
|
51
|
-
/**
|
|
52
|
-
* @description
|
|
53
|
-
* When {@link ItemEntry ItemEntries} are removed from the changes of a {@link CollectionEntry CollectionEntry} the {@link ItemResource ItemResources} of the ItemEntries should be removed from all {@link CollectionResource CollectionResources}
|
|
54
|
-
*/
|
|
55
|
-
protected handleRemovedItemEntriesCallback<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, removedItemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>): void;
|
|
56
|
-
private fetchCollectionData;
|
|
57
|
-
/**
|
|
58
|
-
* @description
|
|
59
|
-
* Fetches {@link CollectionEntry CollectionEntries} of which the parents are local
|
|
60
|
-
*/
|
|
61
|
-
private fetchLinkedLocalCollectionEntries;
|
|
62
|
-
}
|
|
1
|
+
import { ApiQuery, ApiRequestColumns, ChangesDelta, CollectionEntryOptions, CollectionResource, ConversionMap, ItemEntryOptions, ItemIdConversionMap, ModifyFieldsCallback, PromiseInterface, TransactionCollectionHandlerDependencyInterface, TransactionItemHandler } from '../../../index';
|
|
2
|
+
import { CollectionEntry, ItemEntry } from '../../../models';
|
|
3
|
+
import { ApiRequestColumn, CollectionEntryParentIdMap, CollectionResourceParentIdMap, ItemId, ItemType, QueryCallback } from '../../../types';
|
|
4
|
+
import { CollectionMatcher } from '../../index';
|
|
5
|
+
import { CollectionHandlerBase } from '../CollectionHandlerBase';
|
|
6
|
+
import { TransactionCache } from './TransactionCache';
|
|
7
|
+
export declare class TransactionCollectionHandler extends CollectionHandlerBase {
|
|
8
|
+
private dependencies;
|
|
9
|
+
private itemHandler;
|
|
10
|
+
protected transaction: TransactionCache;
|
|
11
|
+
collectionResources: {
|
|
12
|
+
[collectionEntryId: number]: CollectionResource[];
|
|
13
|
+
};
|
|
14
|
+
constructor(dependencies: TransactionCollectionHandlerDependencyInterface, itemHandler: TransactionItemHandler, transaction: TransactionCache);
|
|
15
|
+
fetchItemEntriesByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, options: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
16
|
+
getAllCollectionsByItemType<ItemTypeType extends ItemType>(itemType: ItemTypeType): Array<CollectionEntry<ItemTypeType>>;
|
|
17
|
+
createCollectionEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionEntryOptions): CollectionEntry<ItemTypeType>;
|
|
18
|
+
/**
|
|
19
|
+
* @description
|
|
20
|
+
* Calls the {@link CollectionResourceOptions.onItemsCreated onItemsCreated} callback whenever a create request is done on {@link ItemEntry ItemEntries} that fit in the collection
|
|
21
|
+
* Can be used to update maps that use {@link ItemEntry.itemId ItemEntry.itemId}
|
|
22
|
+
*
|
|
23
|
+
* @deprecated
|
|
24
|
+
* You should use register a {@link TransactionCache.registerFieldChangeCallback field change callback} and compare previous.id with fields.id
|
|
25
|
+
*/
|
|
26
|
+
onItemEntriesCreated(collectionEntry: CollectionEntry, conversionMap: ConversionMap): void;
|
|
27
|
+
clearEntry(entry: CollectionEntry): void;
|
|
28
|
+
addResource(resource: CollectionResource): void;
|
|
29
|
+
clearResource(resource: CollectionResource): void;
|
|
30
|
+
/**
|
|
31
|
+
* @description
|
|
32
|
+
* Updates the parents of the passed {@link ItemEntry ItemEntries}, returns `void` because you should use the {@link CollectionResourceOptions.onAdd onAdd} and {@link CollectionResourceOptions.onRemove onRemove} callbacks
|
|
33
|
+
*/
|
|
34
|
+
moveItems<CollectionEntryType extends CollectionEntry>(sourceCollectionEntry: CollectionEntryType, destinationCollectionEntry: CollectionEntryType, itemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>): void;
|
|
35
|
+
extendCollectionEntry<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, queryCallback: QueryCallback): PromiseInterface<CollectionEntryType>;
|
|
36
|
+
cloneCollectionEntry<CollectionEntryType extends CollectionEntry>(changesDelta: ChangesDelta, sourceEntry: CollectionEntryType, conversionMap?: ItemIdConversionMap, modifyFieldsCallback?: ModifyFieldsCallback): void;
|
|
37
|
+
getCollectionMatcher(): CollectionMatcher;
|
|
38
|
+
fetchCollectionEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionEntryOptions): PromiseInterface<CollectionEntry<ItemTypeType>>;
|
|
39
|
+
fetchLinkedCollectionEntries<ItemTypeType extends ItemType>(parentType: ItemType, parentIdArray: ItemId[] | (() => ItemId[]), itemType: ItemTypeType, options: CollectionEntryOptions): PromiseInterface<CollectionEntryParentIdMap<ItemTypeType>>;
|
|
40
|
+
expandCollectionEntries<ItemTypeType extends ItemType>(parentType: ItemType, itemType: ItemTypeType, collections: CollectionResourceParentIdMap, newColumns: ApiRequestColumn[]): PromiseInterface<CollectionResourceParentIdMap>;
|
|
41
|
+
extendCollectionEntries<T extends CollectionResourceParentIdMap>(parentType: ItemType, itemType: ItemType, options: CollectionEntryOptions, queryCallback: QueryCallback, collections: T): PromiseInterface<void>;
|
|
42
|
+
addItemEntriesToCollectionChanges<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, itemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>, isCalledAfterSocketUpdate?: boolean): void;
|
|
43
|
+
isLocal(options: CollectionEntryOptions | ItemEntryOptions, query: ApiQuery): boolean;
|
|
44
|
+
expandCollectionEntry<CollectionEntryType extends CollectionEntry>(changesDelta: ChangesDelta, collectionEntry: CollectionEntryType, newColumns: ApiRequestColumns): PromiseInterface<CollectionEntryType>;
|
|
45
|
+
/**
|
|
46
|
+
* @description
|
|
47
|
+
* When {@link ItemEntry ItemEntries} are added to the changes of a {@link CollectionEntry CollectionEntry} all {@link CollectionResource CollectionResources}
|
|
48
|
+
* should get new {@link ItemResource ItemResources} for the newly added entries
|
|
49
|
+
*/
|
|
50
|
+
protected handleAddedItemEntriesCallback<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, addedEntries: Array<ItemEntry<CollectionEntryType['itemType']>>): void;
|
|
51
|
+
/**
|
|
52
|
+
* @description
|
|
53
|
+
* When {@link ItemEntry ItemEntries} are removed from the changes of a {@link CollectionEntry CollectionEntry} the {@link ItemResource ItemResources} of the ItemEntries should be removed from all {@link CollectionResource CollectionResources}
|
|
54
|
+
*/
|
|
55
|
+
protected handleRemovedItemEntriesCallback<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, removedItemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>): void;
|
|
56
|
+
private fetchCollectionData;
|
|
57
|
+
/**
|
|
58
|
+
* @description
|
|
59
|
+
* Fetches {@link CollectionEntry CollectionEntries} of which the parents are local
|
|
60
|
+
*/
|
|
61
|
+
private fetchLinkedLocalCollectionEntries;
|
|
62
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { ErrorHandlerInterface, ExceptionHandlerInterface, PromiseLibraryInterface } from '../../../interfaces';
|
|
2
|
-
import { ItemEntry } from '../../../models';
|
|
3
|
-
import { ItemIdConversionMap, PromiseInterface } from '../../../types';
|
|
4
|
-
import { TransactionCache, TransactionErrorLevel } from './TransactionCache';
|
|
5
|
-
export declare type TransactionCacheCallbackCondition = 'always' | 'onClose' | 'skipOnClose';
|
|
6
|
-
export declare type TransactionCacheCallbackType = {
|
|
7
|
-
onBeforeSave: (transaction: TransactionCache) => any;
|
|
8
|
-
onSaveSuccess: (transaction: TransactionCache, conversionMap: ItemIdConversionMap) => any;
|
|
9
|
-
onSetItemError: (itemEntryId: ItemEntry['id'], columnId: string, key: string) => void;
|
|
10
|
-
onClearItemError: (itemEntryId: ItemEntry['id'], columnId: string, key: string) => void;
|
|
11
|
-
onSetGlobalError: (key: string, level: TransactionErrorLevel) => void;
|
|
12
|
-
onClearGlobalError: (key: string) => void;
|
|
13
|
-
};
|
|
14
|
-
export declare class TransactionEventHandler {
|
|
15
|
-
private errorHandler;
|
|
16
|
-
private exceptionHandler;
|
|
17
|
-
private promiseService;
|
|
18
|
-
private callbacks;
|
|
19
|
-
constructor(errorHandler: ErrorHandlerInterface, exceptionHandler: ExceptionHandlerInterface, promiseService: PromiseLibraryInterface);
|
|
20
|
-
registerCallback<T extends keyof TransactionCacheCallbackType>(type: T, key: string, callback: TransactionCacheCallbackType[T], condition?: TransactionCacheCallbackCondition, priority?: number): () => void;
|
|
21
|
-
executeCallbacks<T extends keyof TransactionCacheCallbackType>(type: T, execute: (callback: TransactionCacheCallbackType[T]) => any, closeTab: boolean): PromiseInterface<any>;
|
|
22
|
-
private getPriorityLevel;
|
|
23
|
-
private executeCallbacksPriorityLevel;
|
|
24
|
-
}
|
|
1
|
+
import { ErrorHandlerInterface, ExceptionHandlerInterface, PromiseLibraryInterface } from '../../../interfaces';
|
|
2
|
+
import { ItemEntry } from '../../../models';
|
|
3
|
+
import { ItemIdConversionMap, PromiseInterface } from '../../../types';
|
|
4
|
+
import { TransactionCache, TransactionErrorLevel } from './TransactionCache';
|
|
5
|
+
export declare type TransactionCacheCallbackCondition = 'always' | 'onClose' | 'skipOnClose';
|
|
6
|
+
export declare type TransactionCacheCallbackType = {
|
|
7
|
+
onBeforeSave: (transaction: TransactionCache) => any;
|
|
8
|
+
onSaveSuccess: (transaction: TransactionCache, conversionMap: ItemIdConversionMap) => any;
|
|
9
|
+
onSetItemError: (itemEntryId: ItemEntry['id'], columnId: string, key: string) => void;
|
|
10
|
+
onClearItemError: (itemEntryId: ItemEntry['id'], columnId: string, key: string) => void;
|
|
11
|
+
onSetGlobalError: (key: string, level: TransactionErrorLevel) => void;
|
|
12
|
+
onClearGlobalError: (key: string) => void;
|
|
13
|
+
};
|
|
14
|
+
export declare class TransactionEventHandler {
|
|
15
|
+
private errorHandler;
|
|
16
|
+
private exceptionHandler;
|
|
17
|
+
private promiseService;
|
|
18
|
+
private callbacks;
|
|
19
|
+
constructor(errorHandler: ErrorHandlerInterface, exceptionHandler: ExceptionHandlerInterface, promiseService: PromiseLibraryInterface);
|
|
20
|
+
registerCallback<T extends keyof TransactionCacheCallbackType>(type: T, key: string, callback: TransactionCacheCallbackType[T], condition?: TransactionCacheCallbackCondition, priority?: number): () => void;
|
|
21
|
+
executeCallbacks<T extends keyof TransactionCacheCallbackType>(type: T, execute: (callback: TransactionCacheCallbackType[T]) => any, closeTab: boolean): PromiseInterface<any>;
|
|
22
|
+
private getPriorityLevel;
|
|
23
|
+
private executeCallbacksPriorityLevel;
|
|
24
|
+
}
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { TransactionItemHandlerDependencyInterface } from '../../../interfaces';
|
|
2
|
-
import { ItemEntry, ItemEntryOptions } from '../../../models';
|
|
3
|
-
import { ApiQuery, ApiRequestColumns, DeregFunction, FieldChangeCallback, FieldMap, ItemId, ItemIdConversionMap, ItemType, ItemTypeMap, ModifyFieldsCallback, PromiseInterface, ResponseColumnItemTypeMap } from '../../../types';
|
|
4
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
5
|
-
import { ChangesDeltaBase, ChangesDeltaItemUpdateDelta, ChangesDeltaResult } from '../../ChangesDeltaBase';
|
|
6
|
-
import { ChangesDeltaItemCreateDelta, ColumnSubsetCache } from '../../index';
|
|
7
|
-
import { ItemHandlerBase } from '../ItemHandlerBase';
|
|
8
|
-
import { TransactionCache } from './TransactionCache';
|
|
9
|
-
import { TransactionValidator } from './TransactionValidator';
|
|
10
|
-
export declare type TransactionItemEntryChanges<ItemTypeType extends ItemType = any> = {
|
|
11
|
-
initial: FieldMap<ItemTypeType>;
|
|
12
|
-
changes: FieldMap<ItemTypeType>;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* @description
|
|
16
|
-
* In a {@link TransactionCache Transaction} only local items can be stored, so all entries in {@link TransactionItemHandler.entries this.entries} are local
|
|
17
|
-
* If a non-local entry is requested it should be passed on to the {@link ServerItemHandler ServerItemHandler} which will fetchCollectionEntry the entry from the server
|
|
18
|
-
*/
|
|
19
|
-
export declare class TransactionItemHandler extends ItemHandlerBase {
|
|
20
|
-
private dependencies;
|
|
21
|
-
protected transaction: TransactionCache;
|
|
22
|
-
private validator?;
|
|
23
|
-
deletedItems: ItemTypeMap<ItemEntry[]>;
|
|
24
|
-
itemChanges: {
|
|
25
|
-
[itemEntryId: number]: TransactionItemEntryChanges;
|
|
26
|
-
};
|
|
27
|
-
fieldChangeCallbacks: {
|
|
28
|
-
[itemType: string]: {
|
|
29
|
-
[itemId: string]: FieldChangeCallback[];
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
constructor(dependencies: TransactionItemHandlerDependencyInterface, transaction: TransactionCache, validator?: TransactionValidator | undefined);
|
|
33
|
-
registerFieldChangeCallback<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, callback: FieldChangeCallback<ItemTypeType>): DeregFunction;
|
|
34
|
-
copyTransactionItemEntryChanges(itemEntryChanges: TransactionItemEntryChanges, entry: ItemEntry): TransactionItemEntryChanges;
|
|
35
|
-
createItemEntry(createTuple: ChangesDeltaItemCreateDelta): ItemEntry;
|
|
36
|
-
/**
|
|
37
|
-
* @description
|
|
38
|
-
* Gets the local {@link FieldMap changes} of the {@link ItemEntry entry} on the {@link TransactionCache transaction} in a formatted way the API accepts
|
|
39
|
-
*/
|
|
40
|
-
formatRequest<ItemEntryType extends ItemEntry>(entry: ItemEntryType): FieldMap<ItemEntryType['itemType']>;
|
|
41
|
-
detectChanges(): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* @description
|
|
44
|
-
* Checks if the transaction has changes for the passed {@link ItemEntry.id ItemEntryId}
|
|
45
|
-
*
|
|
46
|
-
* -----
|
|
47
|
-
* @remarks
|
|
48
|
-
* Compares every field (of the entry) in {@link TransactionItemHandler.itemChanges itemChanges} with the initial fields, because fields are copied over when creating a resource having something in itemChanges doesn't actually mean that there are changes (just that a resource has been made)
|
|
49
|
-
*/
|
|
50
|
-
detectEntryChanges(itemEntryId: ItemEntry['id']): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* @description
|
|
53
|
-
* Processes on a cached entry, if there are no {@link TransactionItemHandler.itemChanges itemChanges} the new values will not be processed, unless forceOverwrite is set
|
|
54
|
-
*
|
|
55
|
-
* @param itemEntryChangesTuple The changes tuple
|
|
56
|
-
* @param forceOverwrite Instead of calling {@link ApiFormatter.mergeCopyFields mergeCopyFields}, {@link ApiFormatter.copyFields copyFields} will be used (because API values are always right)
|
|
57
|
-
* @param updateInitial Should be `true` if called by applyChangesFromParent
|
|
58
|
-
* @param isCalledAfterSocketUpdate Indicates that the change is done by a different user
|
|
59
|
-
* @param createItemChangesIfNoneExist Is `true` when called from `applyChangesDelta`, we can assume that when you call `applyChangesDelta` with updates that aren't on the transaction yet you want to add those
|
|
60
|
-
*
|
|
61
|
-
* @returns
|
|
62
|
-
* The previous changes {@link FieldMap FieldMap}
|
|
63
|
-
*/
|
|
64
|
-
processItemEntryChanges<ItemTypeType extends ItemType = any>(itemEntryChangesTuple: ChangesDeltaItemUpdateDelta<ItemTypeType>, forceOverwrite?: boolean, updateInitial?: boolean, isCalledAfterSocketUpdate?: boolean, createItemChangesIfNoneExist?: boolean): FieldMap<ItemTypeType> | null;
|
|
65
|
-
cloneItemEntries<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, itemEntries: Array<ItemEntry<ItemTypeType>>, conversionMap?: ItemIdConversionMap, modifyFieldsCallback?: ModifyFieldsCallback): ItemId[];
|
|
66
|
-
cloneItemEntry<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, sourceEntry: ItemEntry<ItemTypeType>, conversionMap?: ItemIdConversionMap, modifyFieldsCallback?: ModifyFieldsCallback): ItemId;
|
|
67
|
-
fetchItemEntriesByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, entryOptions: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
68
|
-
fetchItemEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: ItemEntryOptions): PromiseInterface<ItemEntry<ItemTypeType>>;
|
|
69
|
-
/**
|
|
70
|
-
* @description
|
|
71
|
-
* Fetches a template and creates a new {@link ItemEntry ItemEntry}, will error if the ItemEntry with the given ItemId already exists
|
|
72
|
-
*/
|
|
73
|
-
fetchNewItemEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: ItemEntryOptions): PromiseInterface<ChangesDeltaResult>;
|
|
74
|
-
fetchItemEntries<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
75
|
-
fetchTitle(itemType: ItemType, itemId: ItemId): PromiseInterface<string>;
|
|
76
|
-
resolveLocalItemEntry<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, itemEntry: ItemEntry<ItemTypeType>, columnSubsetCache: ColumnSubsetCache<ItemTypeType>, options: ItemEntryOptions): PromiseInterface<ItemEntry<ItemTypeType>>;
|
|
77
|
-
expandLocalItemEntries<ItemTypeType extends ItemType>(changesDelta: ChangesDeltaBase, itemType: ItemTypeType, itemEntries: Array<ItemEntry<ItemTypeType>>, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnItemTypeMap): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
78
|
-
/**
|
|
79
|
-
* @description
|
|
80
|
-
* Fetches the data for the passed ItemType/ItemId/columns, is able to fetchCollectionEntry non-local derived values.
|
|
81
|
-
*
|
|
82
|
-
* @remark
|
|
83
|
-
* Assumes the the ItemEntry with the given ItemType-ItemId is already cached
|
|
84
|
-
*/
|
|
85
|
-
fetchLocalItemEntryData<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, itemType: ItemTypeType, itemId: ItemId, columnSubsetCache: ColumnSubsetCache<ItemTypeType>, options: ItemEntryOptions): PromiseInterface<any>;
|
|
86
|
-
fetchLocalItemEntries<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
87
|
-
private getColumnDifference;
|
|
88
|
-
private expandLocalItemEntry;
|
|
89
|
-
private getLocalValues;
|
|
90
|
-
}
|
|
1
|
+
import { TransactionItemHandlerDependencyInterface } from '../../../interfaces';
|
|
2
|
+
import { ItemEntry, ItemEntryOptions } from '../../../models';
|
|
3
|
+
import { ApiQuery, ApiRequestColumns, DeregFunction, FieldChangeCallback, FieldMap, ItemId, ItemIdConversionMap, ItemType, ItemTypeMap, ModifyFieldsCallback, PromiseInterface, ResponseColumnItemTypeMap } from '../../../types';
|
|
4
|
+
import { ChangesDelta } from '../../ChangesDelta';
|
|
5
|
+
import { ChangesDeltaBase, ChangesDeltaItemUpdateDelta, ChangesDeltaResult } from '../../ChangesDeltaBase';
|
|
6
|
+
import { ChangesDeltaItemCreateDelta, ColumnSubsetCache } from '../../index';
|
|
7
|
+
import { ItemHandlerBase } from '../ItemHandlerBase';
|
|
8
|
+
import { TransactionCache } from './TransactionCache';
|
|
9
|
+
import { TransactionValidator } from './TransactionValidator';
|
|
10
|
+
export declare type TransactionItemEntryChanges<ItemTypeType extends ItemType = any> = {
|
|
11
|
+
initial: FieldMap<ItemTypeType>;
|
|
12
|
+
changes: FieldMap<ItemTypeType>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @description
|
|
16
|
+
* In a {@link TransactionCache Transaction} only local items can be stored, so all entries in {@link TransactionItemHandler.entries this.entries} are local
|
|
17
|
+
* If a non-local entry is requested it should be passed on to the {@link ServerItemHandler ServerItemHandler} which will fetchCollectionEntry the entry from the server
|
|
18
|
+
*/
|
|
19
|
+
export declare class TransactionItemHandler extends ItemHandlerBase {
|
|
20
|
+
private dependencies;
|
|
21
|
+
protected transaction: TransactionCache;
|
|
22
|
+
private validator?;
|
|
23
|
+
deletedItems: ItemTypeMap<ItemEntry[]>;
|
|
24
|
+
itemChanges: {
|
|
25
|
+
[itemEntryId: number]: TransactionItemEntryChanges;
|
|
26
|
+
};
|
|
27
|
+
fieldChangeCallbacks: {
|
|
28
|
+
[itemType: string]: {
|
|
29
|
+
[itemId: string]: FieldChangeCallback[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
constructor(dependencies: TransactionItemHandlerDependencyInterface, transaction: TransactionCache, validator?: TransactionValidator | undefined);
|
|
33
|
+
registerFieldChangeCallback<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, callback: FieldChangeCallback<ItemTypeType>): DeregFunction;
|
|
34
|
+
copyTransactionItemEntryChanges(itemEntryChanges: TransactionItemEntryChanges, entry: ItemEntry): TransactionItemEntryChanges;
|
|
35
|
+
createItemEntry(createTuple: ChangesDeltaItemCreateDelta): ItemEntry;
|
|
36
|
+
/**
|
|
37
|
+
* @description
|
|
38
|
+
* Gets the local {@link FieldMap changes} of the {@link ItemEntry entry} on the {@link TransactionCache transaction} in a formatted way the API accepts
|
|
39
|
+
*/
|
|
40
|
+
formatRequest<ItemEntryType extends ItemEntry>(entry: ItemEntryType): FieldMap<ItemEntryType['itemType']>;
|
|
41
|
+
detectChanges(): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @description
|
|
44
|
+
* Checks if the transaction has changes for the passed {@link ItemEntry.id ItemEntryId}
|
|
45
|
+
*
|
|
46
|
+
* -----
|
|
47
|
+
* @remarks
|
|
48
|
+
* Compares every field (of the entry) in {@link TransactionItemHandler.itemChanges itemChanges} with the initial fields, because fields are copied over when creating a resource having something in itemChanges doesn't actually mean that there are changes (just that a resource has been made)
|
|
49
|
+
*/
|
|
50
|
+
detectEntryChanges(itemEntryId: ItemEntry['id']): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* @description
|
|
53
|
+
* Processes on a cached entry, if there are no {@link TransactionItemHandler.itemChanges itemChanges} the new values will not be processed, unless forceOverwrite is set
|
|
54
|
+
*
|
|
55
|
+
* @param itemEntryChangesTuple The changes tuple
|
|
56
|
+
* @param forceOverwrite Instead of calling {@link ApiFormatter.mergeCopyFields mergeCopyFields}, {@link ApiFormatter.copyFields copyFields} will be used (because API values are always right)
|
|
57
|
+
* @param updateInitial Should be `true` if called by applyChangesFromParent
|
|
58
|
+
* @param isCalledAfterSocketUpdate Indicates that the change is done by a different user
|
|
59
|
+
* @param createItemChangesIfNoneExist Is `true` when called from `applyChangesDelta`, we can assume that when you call `applyChangesDelta` with updates that aren't on the transaction yet you want to add those
|
|
60
|
+
*
|
|
61
|
+
* @returns
|
|
62
|
+
* The previous changes {@link FieldMap FieldMap}
|
|
63
|
+
*/
|
|
64
|
+
processItemEntryChanges<ItemTypeType extends ItemType = any>(itemEntryChangesTuple: ChangesDeltaItemUpdateDelta<ItemTypeType>, forceOverwrite?: boolean, updateInitial?: boolean, isCalledAfterSocketUpdate?: boolean, createItemChangesIfNoneExist?: boolean): FieldMap<ItemTypeType> | null;
|
|
65
|
+
cloneItemEntries<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, itemEntries: Array<ItemEntry<ItemTypeType>>, conversionMap?: ItemIdConversionMap, modifyFieldsCallback?: ModifyFieldsCallback): ItemId[];
|
|
66
|
+
cloneItemEntry<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, sourceEntry: ItemEntry<ItemTypeType>, conversionMap?: ItemIdConversionMap, modifyFieldsCallback?: ModifyFieldsCallback): ItemId;
|
|
67
|
+
fetchItemEntriesByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, entryOptions: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
68
|
+
fetchItemEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: ItemEntryOptions): PromiseInterface<ItemEntry<ItemTypeType>>;
|
|
69
|
+
/**
|
|
70
|
+
* @description
|
|
71
|
+
* Fetches a template and creates a new {@link ItemEntry ItemEntry}, will error if the ItemEntry with the given ItemId already exists
|
|
72
|
+
*/
|
|
73
|
+
fetchNewItemEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: ItemEntryOptions): PromiseInterface<ChangesDeltaResult>;
|
|
74
|
+
fetchItemEntries<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
75
|
+
fetchTitle(itemType: ItemType, itemId: ItemId): PromiseInterface<string>;
|
|
76
|
+
resolveLocalItemEntry<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, itemEntry: ItemEntry<ItemTypeType>, columnSubsetCache: ColumnSubsetCache<ItemTypeType>, options: ItemEntryOptions): PromiseInterface<ItemEntry<ItemTypeType>>;
|
|
77
|
+
expandLocalItemEntries<ItemTypeType extends ItemType>(changesDelta: ChangesDeltaBase, itemType: ItemTypeType, itemEntries: Array<ItemEntry<ItemTypeType>>, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnItemTypeMap): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
78
|
+
/**
|
|
79
|
+
* @description
|
|
80
|
+
* Fetches the data for the passed ItemType/ItemId/columns, is able to fetchCollectionEntry non-local derived values.
|
|
81
|
+
*
|
|
82
|
+
* @remark
|
|
83
|
+
* Assumes the the ItemEntry with the given ItemType-ItemId is already cached
|
|
84
|
+
*/
|
|
85
|
+
fetchLocalItemEntryData<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, itemType: ItemTypeType, itemId: ItemId, columnSubsetCache: ColumnSubsetCache<ItemTypeType>, options: ItemEntryOptions): PromiseInterface<any>;
|
|
86
|
+
fetchLocalItemEntries<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
87
|
+
private getColumnDifference;
|
|
88
|
+
private expandLocalItemEntry;
|
|
89
|
+
private getLocalValues;
|
|
90
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { ItemEntry } from '../../../models/index';
|
|
2
|
-
import { FieldMap, ItemType, PromiseInterface } from '../../../types/index';
|
|
3
|
-
import { TransactionCache, TransactionErrorLevel } from './TransactionCache';
|
|
4
|
-
export interface TransactionValidatorFactory {
|
|
5
|
-
construct(transaction: TransactionCache): TransactionValidator;
|
|
6
|
-
}
|
|
7
|
-
export declare abstract class TransactionValidator {
|
|
8
|
-
protected transaction: TransactionCache;
|
|
9
|
-
private lastCallId;
|
|
10
|
-
protected constructor(transaction: TransactionCache);
|
|
11
|
-
/**
|
|
12
|
-
* @description
|
|
13
|
-
* Will be called after {@link TransactionCache.applyChangesFromParent applyChangesFromParent}, {@link TransactionCache.applyChangesFromChild applyChangesFromChild} or {@link TransactionCache.applyChangesDelta applyChangesDelta} is called
|
|
14
|
-
* Allows you to set {@link TransactionCache.errors global errors}
|
|
15
|
-
*/
|
|
16
|
-
abstract validateTransaction(): void;
|
|
17
|
-
/**
|
|
18
|
-
* @description
|
|
19
|
-
* Will be called whenever an item is changed, allows you to set errors on the transaction
|
|
20
|
-
* @param itemEntry
|
|
21
|
-
* @param fields
|
|
22
|
-
* @param previous
|
|
23
|
-
*/
|
|
24
|
-
abstract validateItem<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, fields: FieldMap<ItemTypeType>, previous: FieldMap<ItemTypeType>): void;
|
|
25
|
-
protected setGlobalError(key: string, isInvalid: boolean | PromiseInterface<boolean>, saveButtonErrorTranslationFn: () => string, level: TransactionErrorLevel): void;
|
|
26
|
-
protected setItemError(itemEntryId: ItemEntry['id'], columnId: string, errorKey: string, isInvalid: boolean | PromiseInterface<boolean>, fieldErrorTranslationFn: () => string, saveButtonErrorTranslationFn: () => string, level: TransactionErrorLevel): void;
|
|
27
|
-
private getRandomId;
|
|
28
|
-
}
|
|
1
|
+
import { ItemEntry } from '../../../models/index';
|
|
2
|
+
import { FieldMap, ItemType, PromiseInterface } from '../../../types/index';
|
|
3
|
+
import { TransactionCache, TransactionErrorLevel } from './TransactionCache';
|
|
4
|
+
export interface TransactionValidatorFactory {
|
|
5
|
+
construct(transaction: TransactionCache): TransactionValidator;
|
|
6
|
+
}
|
|
7
|
+
export declare abstract class TransactionValidator {
|
|
8
|
+
protected transaction: TransactionCache;
|
|
9
|
+
private lastCallId;
|
|
10
|
+
protected constructor(transaction: TransactionCache);
|
|
11
|
+
/**
|
|
12
|
+
* @description
|
|
13
|
+
* Will be called after {@link TransactionCache.applyChangesFromParent applyChangesFromParent}, {@link TransactionCache.applyChangesFromChild applyChangesFromChild} or {@link TransactionCache.applyChangesDelta applyChangesDelta} is called
|
|
14
|
+
* Allows you to set {@link TransactionCache.errors global errors}
|
|
15
|
+
*/
|
|
16
|
+
abstract validateTransaction(): void;
|
|
17
|
+
/**
|
|
18
|
+
* @description
|
|
19
|
+
* Will be called whenever an item is changed, allows you to set errors on the transaction
|
|
20
|
+
* @param itemEntry
|
|
21
|
+
* @param fields
|
|
22
|
+
* @param previous
|
|
23
|
+
*/
|
|
24
|
+
abstract validateItem<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, fields: FieldMap<ItemTypeType>, previous: FieldMap<ItemTypeType>): void;
|
|
25
|
+
protected setGlobalError(key: string, isInvalid: boolean | PromiseInterface<boolean>, saveButtonErrorTranslationFn: () => string, level: TransactionErrorLevel): void;
|
|
26
|
+
protected setItemError(itemEntryId: ItemEntry['id'], columnId: string, errorKey: string, isInvalid: boolean | PromiseInterface<boolean>, fieldErrorTranslationFn: () => string, saveButtonErrorTranslationFn: () => string, level: TransactionErrorLevel): void;
|
|
27
|
+
private getRandomId;
|
|
28
|
+
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
export * from './ApiFormatter';
|
|
2
|
-
export * from './ApiRequestService';
|
|
3
|
-
export * from './ApiResponseProcessor';
|
|
4
|
-
export * from './ChangesCompilation';
|
|
5
|
-
export * from './ChangesProcessor';
|
|
6
|
-
export * from './CollectionCache';
|
|
7
|
-
export * from './CollectionEntryService';
|
|
8
|
-
export * from './CollectionMatcher';
|
|
9
|
-
export * from './CollectionResourceService';
|
|
10
|
-
export * from './ColumnCache';
|
|
11
|
-
export * from './ColumnExpansion';
|
|
12
|
-
export * from './ColumnHandler';
|
|
13
|
-
export * from './ColumnInfo';
|
|
14
|
-
export * from './ColumnSet';
|
|
15
|
-
export * from './ColumnSubsetCache';
|
|
16
|
-
export * from './ColumnUtil';
|
|
17
|
-
export * from './ConversionMapService';
|
|
18
|
-
export * from './CreateRequest';
|
|
19
|
-
export * from './ItemCache';
|
|
20
|
-
export * from './ItemEntryService';
|
|
21
|
-
export * from './KeyService';
|
|
22
|
-
export * from './cache/transaction/TransactionEventHandler';
|
|
23
|
-
export * from './LockService';
|
|
24
|
-
export * from './ModuleChangesCompilation';
|
|
25
|
-
export * from './QueryMatcher';
|
|
26
|
-
export * from './QueryParser';
|
|
27
|
-
export * from './QueryService';
|
|
28
|
-
export * from './RequestColumnExpansion';
|
|
29
|
-
export * from './SocketMessageHandler';
|
|
30
|
-
export * from './Util';
|
|
31
|
-
export * from './cache/AbstractCache';
|
|
32
|
-
export * from './cache/server/ServerCache';
|
|
33
|
-
export * from './cache/server/ServerItemHandler';
|
|
34
|
-
export * from './cache/server/ServerCollectionHandler';
|
|
35
|
-
export * from './cache/transaction/TransactionCache';
|
|
36
|
-
export * from './cache/transaction/TransactionItemHandler';
|
|
37
|
-
export * from './cache/transaction/TransactionCollectionHandler';
|
|
38
|
-
export * from './cache/transaction/TransactionEventHandler';
|
|
39
|
-
export * from './cache/transaction/TransactionValidator';
|
|
40
|
-
export * from './ChangesDeltaBase';
|
|
41
|
-
export * from './ChangesDelta';
|
|
42
|
-
export * from './InternalChangesDelta';
|
|
43
|
-
export * from './RequestBufferManager';
|
|
44
|
-
export * from './RequestBuffer';
|
|
45
|
-
export * from './ItemCreateService';
|
|
46
|
-
export * from './CreatedChangesDelta';
|
|
1
|
+
export * from './ApiFormatter';
|
|
2
|
+
export * from './ApiRequestService';
|
|
3
|
+
export * from './ApiResponseProcessor';
|
|
4
|
+
export * from './ChangesCompilation';
|
|
5
|
+
export * from './ChangesProcessor';
|
|
6
|
+
export * from './CollectionCache';
|
|
7
|
+
export * from './CollectionEntryService';
|
|
8
|
+
export * from './CollectionMatcher';
|
|
9
|
+
export * from './CollectionResourceService';
|
|
10
|
+
export * from './ColumnCache';
|
|
11
|
+
export * from './ColumnExpansion';
|
|
12
|
+
export * from './ColumnHandler';
|
|
13
|
+
export * from './ColumnInfo';
|
|
14
|
+
export * from './ColumnSet';
|
|
15
|
+
export * from './ColumnSubsetCache';
|
|
16
|
+
export * from './ColumnUtil';
|
|
17
|
+
export * from './ConversionMapService';
|
|
18
|
+
export * from './CreateRequest';
|
|
19
|
+
export * from './ItemCache';
|
|
20
|
+
export * from './ItemEntryService';
|
|
21
|
+
export * from './KeyService';
|
|
22
|
+
export * from './cache/transaction/TransactionEventHandler';
|
|
23
|
+
export * from './LockService';
|
|
24
|
+
export * from './ModuleChangesCompilation';
|
|
25
|
+
export * from './QueryMatcher';
|
|
26
|
+
export * from './QueryParser';
|
|
27
|
+
export * from './QueryService';
|
|
28
|
+
export * from './RequestColumnExpansion';
|
|
29
|
+
export * from './SocketMessageHandler';
|
|
30
|
+
export * from './Util';
|
|
31
|
+
export * from './cache/AbstractCache';
|
|
32
|
+
export * from './cache/server/ServerCache';
|
|
33
|
+
export * from './cache/server/ServerItemHandler';
|
|
34
|
+
export * from './cache/server/ServerCollectionHandler';
|
|
35
|
+
export * from './cache/transaction/TransactionCache';
|
|
36
|
+
export * from './cache/transaction/TransactionItemHandler';
|
|
37
|
+
export * from './cache/transaction/TransactionCollectionHandler';
|
|
38
|
+
export * from './cache/transaction/TransactionEventHandler';
|
|
39
|
+
export * from './cache/transaction/TransactionValidator';
|
|
40
|
+
export * from './ChangesDeltaBase';
|
|
41
|
+
export * from './ChangesDelta';
|
|
42
|
+
export * from './InternalChangesDelta';
|
|
43
|
+
export * from './RequestBufferManager';
|
|
44
|
+
export * from './RequestBuffer';
|
|
45
|
+
export * from './ItemCreateService';
|
|
46
|
+
export * from './CreatedChangesDelta';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const ALL_PERMISSIONS = "7";
|
|
2
|
-
export declare const COLUMN_SEPERATOR = ">";
|
|
3
|
-
export declare const RENDER_AS_SEPERATOR = ":";
|
|
4
|
-
export declare const NEW_PREFIX: string;
|
|
5
|
-
export declare const DUPLICATE_PREFIX: string;
|
|
6
|
-
export declare const NEW_KEYWORD: string;
|
|
7
|
-
export declare const DUPLICATE_KEYWORD: string;
|
|
1
|
+
export declare const ALL_PERMISSIONS = "7";
|
|
2
|
+
export declare const COLUMN_SEPERATOR = ">";
|
|
3
|
+
export declare const RENDER_AS_SEPERATOR = ":";
|
|
4
|
+
export declare const NEW_PREFIX: string;
|
|
5
|
+
export declare const DUPLICATE_PREFIX: string;
|
|
6
|
+
export declare const NEW_KEYWORD: string;
|
|
7
|
+
export declare const DUPLICATE_KEYWORD: string;
|