@rentman/rm-core 1.9.0 → 2.0.1
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 +7 -0
- package/dist/rm-core.js +7445 -6441
- package/dist/rm-core.min.js +1 -1
- package/dist/src/classes/ApiFormatter.d.ts +25 -8
- package/dist/src/classes/ApiResponseProcessor.d.ts +10 -20
- package/dist/src/classes/ChangesCompilation.d.ts +14 -31
- package/dist/src/classes/ChangesDelta.d.ts +42 -0
- package/dist/src/classes/ChangesDeltaBase.d.ts +33 -0
- package/dist/src/classes/ChangesProcessor.d.ts +30 -16
- package/dist/src/classes/CollectionCache.d.ts +7 -2
- package/dist/src/classes/CollectionEntryService.d.ts +3 -0
- package/dist/src/classes/CollectionMatcher.d.ts +8 -41
- package/dist/src/classes/CollectionMatcherBase.d.ts +26 -0
- package/dist/src/classes/ColumnExpansion.d.ts +4 -0
- package/dist/src/classes/ColumnHandler.d.ts +3 -3
- package/dist/src/classes/ColumnUtil.d.ts +12 -1
- package/dist/src/classes/CreateRequest.d.ts +7 -8
- package/dist/src/classes/InternalChangesDelta.d.ts +38 -0
- package/dist/src/classes/ItemCache.d.ts +7 -1
- package/dist/src/classes/ItemEntryService.d.ts +23 -5
- package/dist/src/classes/LockService.d.ts +9 -9
- package/dist/src/classes/ModuleChangesCompilation.d.ts +4 -7
- package/dist/src/classes/QueryColumnExtractor.d.ts +20 -0
- package/dist/src/classes/QueryParser.d.ts +18 -27
- package/dist/src/classes/QueryParserBase.d.ts +29 -0
- package/dist/src/classes/QueryService.d.ts +1 -1
- package/dist/src/classes/RequestBuffer.d.ts +25 -0
- package/dist/src/classes/RequestBufferManager.d.ts +31 -0
- package/dist/src/classes/RequestColumnExpansion.d.ts +1 -0
- package/dist/src/classes/SocketMessageHandler.d.ts +19 -30
- package/dist/src/classes/TemplateCache.d.ts +63 -0
- package/dist/src/classes/cache/AbstractCache.d.ts +122 -0
- package/dist/src/classes/cache/CollectionHandlerBase.d.ts +64 -0
- package/dist/src/classes/cache/CollectionMatcherCacheProcessor.d.ts +26 -0
- package/dist/src/classes/cache/ItemHandlerBase.d.ts +86 -0
- package/dist/src/classes/cache/server/ServerCache.d.ts +87 -0
- package/dist/src/classes/cache/server/ServerCollectionHandler.d.ts +43 -0
- package/dist/src/classes/cache/server/ServerItemHandler.d.ts +49 -0
- package/dist/src/classes/cache/transaction/TransactionCache.d.ts +423 -0
- package/dist/src/classes/cache/transaction/TransactionCollectionHandler.d.ts +72 -0
- package/dist/src/classes/cache/transaction/TransactionEventHandler.d.ts +19 -0
- package/dist/src/classes/cache/transaction/TransactionItemHandler.d.ts +113 -0
- package/dist/src/classes/index.d.ts +13 -7
- package/dist/src/constants.d.ts +0 -11
- package/dist/src/core.d.ts +12 -11
- package/dist/src/factories/ChangesCompilationFactory.d.ts +4 -8
- package/dist/src/factories/ChangesDeltaFactory.d.ts +9 -0
- package/dist/src/factories/ChangesProcessorFactory.d.ts +22 -0
- package/dist/src/factories/CollectionCacheFactory.d.ts +2 -1
- package/dist/src/factories/CollectionEntryFactory.d.ts +6 -18
- package/dist/src/factories/CollectionMatcherFactory.d.ts +3 -2
- package/dist/src/factories/CollectionResourceFactory.d.ts +11 -9
- package/dist/src/factories/ColumnSetFactory.d.ts +2 -0
- package/dist/src/factories/CreateRequestFactory.d.ts +7 -7
- package/dist/src/factories/ItemCacheFactory.d.ts +2 -1
- package/dist/src/factories/ItemEntryFactory.d.ts +3 -7
- package/dist/src/factories/ItemResourceFactory.d.ts +14 -10
- package/dist/src/factories/ModuleChangesCompilationFactory.d.ts +3 -4
- package/dist/src/factories/TransactionCacheFactory.d.ts +55 -0
- package/dist/src/factories/index.d.ts +3 -2
- package/dist/src/interfaces/LinkTreeServiceInterface.d.ts +4 -0
- package/dist/src/interfaces/index.d.ts +1 -1
- package/dist/src/models/CollectionEditResource.d.ts +34 -11
- package/dist/src/models/CollectionEntry.d.ts +10 -70
- package/dist/src/models/CollectionEntryOptions.d.ts +1 -0
- package/dist/src/models/CollectionResource.d.ts +14 -14
- package/dist/src/models/CollectionResourceOptions.d.ts +6 -2
- package/dist/src/models/CollectionViewResource.d.ts +2 -2
- package/dist/src/models/EditResource.d.ts +8 -10
- package/dist/src/models/ItemEntry.d.ts +1 -58
- package/dist/src/models/ItemEntryOptions.d.ts +0 -1
- package/dist/src/models/ItemResource.d.ts +49 -16
- package/dist/src/models/LocalViewResource.d.ts +2 -2
- package/dist/src/models/RemoteViewResource.d.ts +2 -2
- package/dist/src/models/ViewResource.d.ts +2 -2
- package/dist/src/types/ItemTypesCollection.d.ts +81 -22
- package/package.json +1 -1
- package/dist/src/classes/BatchStatus.d.ts +0 -28
- package/dist/src/classes/CollectionHandler.d.ts +0 -54
- package/dist/src/classes/ItemAdministrator.d.ts +0 -228
- package/dist/src/classes/ItemHandler.d.ts +0 -60
- package/dist/src/classes/ItemRequestService.d.ts +0 -23
- package/dist/src/classes/LocalCache.d.ts +0 -112
- package/dist/src/classes/LocalCacheEventHandler.d.ts +0 -19
- package/dist/src/factories/BatchStatusFactory.d.ts +0 -9
- package/dist/src/factories/LocalCacheFactory.d.ts +0 -16
- package/dist/src/interfaces/LocalCacheManagerInterface.d.ts +0 -5
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
import * as moment from 'moment';
|
|
2
2
|
import { ColumnInfo } from '../classes';
|
|
3
|
-
import { FieldMap } from '../types';
|
|
3
|
+
import { FieldMap, ItemType, ResponseColumn } from '../types';
|
|
4
4
|
export declare class ApiFormatter {
|
|
5
5
|
MOMENT_INVALID: string;
|
|
6
6
|
SERVER_DATETIME_FORMAT: string;
|
|
7
7
|
SERVER_TIME_FORMAT: string;
|
|
8
8
|
SERVER_DATE_FORMAT: string;
|
|
9
9
|
constructor();
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @description
|
|
12
|
+
* Returns if a column type is an 'expensive' type, meaning that the action to format the field takes significant CPU time
|
|
13
|
+
*
|
|
14
|
+
* ----
|
|
15
|
+
* @remarks
|
|
16
|
+
* Currently only used for Moment objects
|
|
17
|
+
*/
|
|
18
|
+
isExpensiveFormat(columnType: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @description
|
|
21
|
+
* Overwrites the values in 'changes' if the values in 'initial' and 'changes' are the same (leaving user changes intact)
|
|
22
|
+
*/
|
|
23
|
+
mergeCopyFields<ItemTypeType extends ItemType>(initial: FieldMap<ItemTypeType>, changes: FieldMap<ItemTypeType>, newInitial: FieldMap<ItemTypeType>, columns: Array<ColumnInfo<ItemTypeType>>): FieldMap<ItemTypeType>;
|
|
24
|
+
/**
|
|
25
|
+
* @description
|
|
26
|
+
* Clones the fields from `source` to `destination`, calls {@link ApiFormatter.isExpensiveFormat isExpensiveFormat} to determine if values should immediately be cloned, or the getter should be cloned
|
|
27
|
+
*/
|
|
28
|
+
lazyClone(apiColumn: ResponseColumn, source: object, destination: object, key: string): void;
|
|
29
|
+
formatRequest<ItemTypeType extends ItemType>(initial: FieldMap<ItemTypeType>, modified: FieldMap<ItemTypeType>, columns: Array<ColumnInfo<any>>): FieldMap<ItemTypeType>;
|
|
30
|
+
formatRequestLocal<ItemTypeType extends ItemType>(fields: FieldMap<ItemTypeType>, columns: Array<ColumnInfo<any>>): FieldMap<ItemTypeType>;
|
|
31
|
+
hasChanges(initial: FieldMap, modified: FieldMap, columns: Array<ColumnInfo<any>>, includeReadOnlyColumns?: boolean): boolean;
|
|
32
|
+
getChanges<ItemTypeType extends ItemType>(initial: FieldMap<ItemTypeType>, modified: FieldMap<ItemTypeType>, columns: Array<ColumnInfo<any>>): FieldMap<ItemTypeType>;
|
|
33
|
+
copyFields<ItemTypeType extends ItemType>(source: FieldMap<ItemTypeType>, destination: FieldMap<ItemTypeType>, columns: Array<ColumnInfo<any>>): FieldMap<ItemTypeType>;
|
|
17
34
|
shallowCopyFields(shallowSource: FieldMap, deepSource: FieldMap, destination: FieldMap, columns: Array<ColumnInfo<any>>): FieldMap;
|
|
18
35
|
setDefaultValues(destination: FieldMap, columns: Array<ColumnInfo<any>>): FieldMap;
|
|
19
36
|
compareFields(columnType: string, first?: any, second?: any): boolean;
|
|
@@ -3,37 +3,27 @@ import { FieldMap, ItemId, ItemType, ItemTypeMap, ResponseColumn } from '../type
|
|
|
3
3
|
export declare class ApiResponseProcessor {
|
|
4
4
|
apiFormatter: ApiFormatter;
|
|
5
5
|
response: any;
|
|
6
|
-
columns: ItemTypeMap
|
|
7
|
-
|
|
6
|
+
columns: ItemTypeMap<ResponseColumn[]>;
|
|
7
|
+
links: ItemTypeMap<ItemId[]>;
|
|
8
|
+
cacheable: boolean;
|
|
9
|
+
map: any;
|
|
10
|
+
items: any;
|
|
11
|
+
columnIndexMap: {
|
|
8
12
|
[itemType: string]: {
|
|
9
|
-
[
|
|
13
|
+
[columnId: string]: number;
|
|
10
14
|
};
|
|
11
15
|
};
|
|
12
|
-
links: ItemTypeMap;
|
|
13
|
-
cacheable: boolean;
|
|
14
|
-
map: any;
|
|
15
|
-
columnIndexMap: any;
|
|
16
16
|
columnMap: any;
|
|
17
17
|
constructor(apiFormatter: ApiFormatter, response: any);
|
|
18
|
-
createColumnMaps
|
|
18
|
+
private createColumnMaps;
|
|
19
|
+
fetchColumnObject(itemType: ItemType): ResponseColumn;
|
|
19
20
|
fetchValue(itemType: ItemType, itemId: ItemId, columnId: string): any;
|
|
21
|
+
fetchColumnArray(itemType: ItemType): ResponseColumn[];
|
|
20
22
|
fetchDerivedObject(itemType: ItemType, itemId: ItemId, rootColumns: ResponseColumn[]): {};
|
|
21
23
|
fetchDerivedValues(value: any, column: ResponseColumn, destination: any): void;
|
|
22
24
|
fetchObject<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: string | ItemId, includeLinks?: boolean): FieldMap<ItemTypeType> | undefined;
|
|
23
25
|
fetchObjectArray<ItemTypeType extends ItemType>(itemType: ItemTypeType, includeLinks?: boolean, idArray?: ItemId[] | null): Array<FieldMap<ItemTypeType>>;
|
|
24
|
-
fetchObjectMap(itemType: ItemType, columnId: string, includeLinks?: boolean, returnKeys?: boolean): {
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
};
|
|
27
|
-
fetchFieldMap<ItemTypeType extends ItemType>(itemType: ItemTypeType, columnId: string): FieldMap<ItemTypeType>;
|
|
28
|
-
fetchColumnArray(itemType: ItemType): ResponseColumn[];
|
|
29
|
-
fetchColumnObject(itemType: ItemType): ResponseColumn;
|
|
30
26
|
fetchColumnsObject(): {
|
|
31
27
|
[itemType: string]: ResponseColumn;
|
|
32
28
|
};
|
|
33
|
-
createResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, id: ItemId): {
|
|
34
|
-
object: FieldMap<ItemTypeType> | undefined;
|
|
35
|
-
links: any;
|
|
36
|
-
};
|
|
37
|
-
hasItems(itemType: ItemType): boolean;
|
|
38
|
-
getIdArray(itemType: ItemType): ItemId[];
|
|
39
29
|
}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export declare type DeleteMapEntry<ItemTypeType extends ItemType> = {
|
|
6
|
-
item: ItemEntry<ItemTypeType>;
|
|
7
|
-
parent: EntryParentNull;
|
|
8
|
-
};
|
|
9
|
-
export declare type MoveMapEntry<ItemTypeType extends ItemType> = {
|
|
10
|
-
item: ItemEntry<ItemTypeType>;
|
|
11
|
-
parent: EntryParent;
|
|
12
|
-
};
|
|
1
|
+
import { ItemEntry } from '../models';
|
|
2
|
+
import { ItemEntryMap, ItemMap, ItemType } from '../types';
|
|
3
|
+
import { TransactionCache } from './cache/transaction/TransactionCache';
|
|
4
|
+
import { InternalCreateDelta } from './InternalChangesDelta';
|
|
13
5
|
export declare type CreateCompilation = {
|
|
14
6
|
[parentType: string]: {
|
|
15
|
-
[parentId: number]:
|
|
7
|
+
[parentId: number]: ItemMap<InternalCreateDelta>;
|
|
16
8
|
};
|
|
17
9
|
};
|
|
18
10
|
export declare type DeleteCompilation = {
|
|
@@ -21,31 +13,22 @@ export declare type DeleteCompilation = {
|
|
|
21
13
|
export declare type UpdateCompilation = ItemEntryMap<ItemType>;
|
|
22
14
|
export declare type MoveCompilation = {
|
|
23
15
|
[parentType: string]: {
|
|
24
|
-
[parentId: number]:
|
|
16
|
+
[parentId: number]: ItemEntry[];
|
|
25
17
|
};
|
|
26
18
|
};
|
|
27
19
|
export declare class ChangesCompilation {
|
|
28
|
-
private
|
|
29
|
-
private keyService;
|
|
30
|
-
singleItems: Array<ItemEntry<ItemType>>;
|
|
20
|
+
private transaction;
|
|
31
21
|
compilation: {
|
|
32
22
|
create: CreateCompilation;
|
|
33
23
|
delete: DeleteCompilation;
|
|
34
24
|
update: UpdateCompilation;
|
|
35
25
|
move: MoveCompilation;
|
|
36
26
|
};
|
|
37
|
-
|
|
38
|
-
private
|
|
39
|
-
private
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
addUpdateEntry(itemEntry: ItemEntry<ItemType>): void;
|
|
45
|
-
addCreateEntry(itemEntry: ItemEntry<ItemType>): void;
|
|
46
|
-
containsCreateEntry(itemType: ItemType, itemId: ItemId): boolean;
|
|
47
|
-
private createDeleteCompilation;
|
|
48
|
-
postProcess(): void;
|
|
49
|
-
private processSingleItems;
|
|
50
|
-
private processCollections;
|
|
27
|
+
constructor(transaction: TransactionCache);
|
|
28
|
+
private processDelta;
|
|
29
|
+
private getDefaultParent;
|
|
30
|
+
private addMoveEntry;
|
|
31
|
+
private addDeleteEntry;
|
|
32
|
+
private addUpdateEntry;
|
|
33
|
+
private addCreateEntry;
|
|
51
34
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ItemEntry } from '../models';
|
|
2
|
+
import { EntryParent, EntryParentNull, FieldMap, ItemId, ItemType } from '../types';
|
|
3
|
+
import { ChangesDeltaBase } from './ChangesDeltaBase';
|
|
4
|
+
import { ColumnSet } from './ColumnSet';
|
|
5
|
+
import { ItemEntryService } from './ItemEntryService';
|
|
6
|
+
export declare type ChangesDeltaItemCreateDelta<ItemTypeType extends ItemType = any> = {
|
|
7
|
+
itemId: ItemId;
|
|
8
|
+
fields: FieldMap<ItemTypeType>;
|
|
9
|
+
columns: ColumnSet<ItemTypeType>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @description
|
|
13
|
+
* ChangesDelta used to apply changes from outside of the core to a transaction
|
|
14
|
+
*
|
|
15
|
+
* ----------
|
|
16
|
+
*
|
|
17
|
+
* The difference between {@link InternalChangesDelta InternalChangesDelta} and {@link ChangesDelta ChangesDelta} is that the ChangesDelta
|
|
18
|
+
* assumes 'created' values have no itemEntries yet.
|
|
19
|
+
*
|
|
20
|
+
* Use this when calling {@link TransactionCache.applyChangesDelta applyChangesDelta}
|
|
21
|
+
*/
|
|
22
|
+
export declare class ChangesDelta extends ChangesDeltaBase {
|
|
23
|
+
created: ChangesDeltaItemCreateDelta[];
|
|
24
|
+
constructor(itemEntryService: ItemEntryService);
|
|
25
|
+
/**
|
|
26
|
+
* @description
|
|
27
|
+
* Will create an {@link ItemEntry ItemEntry} when the delta is applied
|
|
28
|
+
* Does not always mean the item is local, just that it isn't cached yet
|
|
29
|
+
*
|
|
30
|
+
* ------
|
|
31
|
+
*
|
|
32
|
+
* @remark
|
|
33
|
+
* When the `parent` property is passed it will automatically set the proper fields to match the parent, this assumes the required parent columns are in the passed columns
|
|
34
|
+
* You can easily get the required columns by also passing the `parent` to the {@link TemplateCache.fetchTemplate template fetchCollectionEntry} call
|
|
35
|
+
*/
|
|
36
|
+
setItemCreated<ItemTypeType extends ItemType>(itemId: ItemId, fields: FieldMap<ItemTypeType>, columns: ColumnSet<ItemTypeType>, parent?: EntryParentNull): void;
|
|
37
|
+
/**
|
|
38
|
+
* @description
|
|
39
|
+
* Convenience function to assign the proper parent fields, will call {@link ChangesDeltaBase.setItemUpdated setItemUpdated} internally
|
|
40
|
+
*/
|
|
41
|
+
setItemMoved(entry: ItemEntry, to: EntryParent): void;
|
|
42
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ItemEntry } from '../models';
|
|
2
|
+
import { ColumnExpansionResult, EntryParentNull, FieldMap, ItemType } from '../types';
|
|
3
|
+
import { ItemEntryService } from './ItemEntryService';
|
|
4
|
+
export declare type ChangesDeltaResult = {
|
|
5
|
+
rollback: () => void;
|
|
6
|
+
created: ItemEntry[];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @remark
|
|
10
|
+
* We explicitly keep track of the new parent, so we can set an item to moved if it isn't null (Needed for linkTo request)
|
|
11
|
+
*/
|
|
12
|
+
export declare type ChangesDeltaItemUpdateDelta<ItemTypeType extends ItemType = any> = {
|
|
13
|
+
entry: ItemEntry<ItemTypeType>;
|
|
14
|
+
changes: {
|
|
15
|
+
expandedColumns: ColumnExpansionResult<ItemTypeType> | null;
|
|
16
|
+
fields: FieldMap<ItemTypeType>;
|
|
17
|
+
parent: EntryParentNull;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare type ChangesDeltaItemDeleteDelta = ItemEntry[];
|
|
21
|
+
export declare abstract class ChangesDeltaBase {
|
|
22
|
+
protected itemEntryService: ItemEntryService;
|
|
23
|
+
updated: {
|
|
24
|
+
[itemEntryId: number]: ChangesDeltaItemUpdateDelta;
|
|
25
|
+
};
|
|
26
|
+
deleted: {
|
|
27
|
+
[itemType: string]: ChangesDeltaItemDeleteDelta;
|
|
28
|
+
};
|
|
29
|
+
protected constructor(itemEntryService: ItemEntryService);
|
|
30
|
+
setItemUpdated<ItemEntryType extends ItemEntry>(entry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>, columnExpansionResult?: ColumnExpansionResult<ItemEntryType['itemType']> | null, parent?: EntryParentNull): void;
|
|
31
|
+
setItemDeleted(deleted: ItemEntry): void;
|
|
32
|
+
setItemsDeleted(deleted: ItemEntry[]): void;
|
|
33
|
+
}
|
|
@@ -1,23 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiRequestService, CollectionEntryService, ItemEntryService } from '../classes';
|
|
2
2
|
import { ChangesCompilationFactory, ColumnExpansionFactory, CreateRequestFactory, RequestColumnExpansionFactory } from '../factories';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { ChangesDeltaFactory } from '../factories/ChangesDeltaFactory';
|
|
4
|
+
import { ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
5
|
+
import { ItemIdConversionMap, PromiseInterface } from '../types';
|
|
6
|
+
import { TransactionCache } from './cache/transaction/TransactionCache';
|
|
7
|
+
export declare type OnAfterCreateCallback = (conversionMap: ItemIdConversionMap) => void;
|
|
8
|
+
/**
|
|
9
|
+
* @description
|
|
10
|
+
* Executes the changes from a specific {@link TransactionCache transaction} and returns a {@link ChangesDelta ChangesDelta}
|
|
11
|
+
*/
|
|
6
12
|
export declare class ChangesProcessor {
|
|
7
|
-
private
|
|
13
|
+
private changesDeltaFactory;
|
|
8
14
|
private apiRequestService;
|
|
9
15
|
private changesCompilationFactory;
|
|
10
|
-
private collectionEntryService;
|
|
11
|
-
private collectionHandler;
|
|
12
16
|
private columnExpansionFactory;
|
|
13
17
|
private createRequestFactory;
|
|
14
18
|
private errorHandler;
|
|
15
|
-
private itemHandler;
|
|
16
19
|
private promiseService;
|
|
17
20
|
private requestColumnExpansionFactory;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
private collectionEntryService;
|
|
22
|
+
private itemEntryService;
|
|
23
|
+
private transaction;
|
|
24
|
+
private breakUpByParent?;
|
|
25
|
+
private onAfterCreateCallback?;
|
|
26
|
+
private itemIdConversionMap;
|
|
27
|
+
private serverCache;
|
|
28
|
+
constructor(changesDeltaFactory: ChangesDeltaFactory, apiRequestService: ApiRequestService, changesCompilationFactory: ChangesCompilationFactory, columnExpansionFactory: ColumnExpansionFactory, createRequestFactory: CreateRequestFactory, errorHandler: ErrorHandlerInterface, promiseService: PromiseLibraryInterface, requestColumnExpansionFactory: RequestColumnExpansionFactory, collectionEntryService: CollectionEntryService, itemEntryService: ItemEntryService, transaction: TransactionCache, breakUpByParent?: boolean | undefined, onAfterCreateCallback?: OnAfterCreateCallback | undefined);
|
|
29
|
+
/**
|
|
30
|
+
* @description
|
|
31
|
+
* Executes the requests in the order of:
|
|
32
|
+
* 1. create
|
|
33
|
+
* 2. move
|
|
34
|
+
* 3. delete
|
|
35
|
+
* 4. update
|
|
36
|
+
*/
|
|
37
|
+
execute(): PromiseInterface<ItemIdConversionMap>;
|
|
38
|
+
private buildMoveRequest;
|
|
39
|
+
private getMapValue;
|
|
21
40
|
private executeCreateRequests;
|
|
22
41
|
private executeCreateRequest;
|
|
23
42
|
private executeUpdateRequests;
|
|
@@ -25,9 +44,4 @@ export declare class ChangesProcessor {
|
|
|
25
44
|
private executeDeleteRequests;
|
|
26
45
|
private executeDeleteRequest;
|
|
27
46
|
private executeMoveRequests;
|
|
28
|
-
private processMoveResponse;
|
|
29
|
-
private addCollectionMapEntry;
|
|
30
|
-
private forEachCollection;
|
|
31
|
-
private onItemsCreated;
|
|
32
|
-
execute(singleItems: Array<ItemEntry<any>>, collections: Array<CollectionEntry<any>>, parameters?: CreateRequestParameterMap, breakupByParent?: boolean, onAfterCreateCallback?: (conversionMap: ItemIdConversionMap) => void): PromiseInterface<ItemIdConversionMap>;
|
|
33
47
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { QueryMatcherFactory } from '../factories';
|
|
2
2
|
import { CollectionEntry, CollectionResource } from '../models';
|
|
3
3
|
import { CollectionMatchResult, CollectionQuery, EntryParentNull, FieldMap, ItemId, ItemType } from '../types';
|
|
4
|
+
import { AbstractCache } from './cache/AbstractCache';
|
|
4
5
|
export declare class CollectionCache {
|
|
5
6
|
private queryMatcherFactory;
|
|
7
|
+
private transaction;
|
|
6
8
|
private entries;
|
|
7
|
-
constructor(queryMatcherFactory: QueryMatcherFactory);
|
|
9
|
+
constructor(queryMatcherFactory: QueryMatcherFactory, transaction: AbstractCache);
|
|
10
|
+
getByEntryId(collectionEntryId: CollectionEntry['id']): CollectionEntry | undefined;
|
|
8
11
|
contains(collectionEntry: CollectionEntry<any>): boolean;
|
|
9
12
|
some(callback: (entry: CollectionEntry<any>) => boolean): boolean;
|
|
10
13
|
forEach(callback: (entry: CollectionEntry<any>) => void): void;
|
|
@@ -14,7 +17,6 @@ export declare class CollectionCache {
|
|
|
14
17
|
getByItemType<ItemTypeType extends ItemType>(itemType: ItemTypeType): CollectionEntry<ItemTypeType>[];
|
|
15
18
|
matchParent(collectionEntry: CollectionEntry<any>, itemType: string, itemId: ItemId): boolean;
|
|
16
19
|
getByParent<ItemTypeType extends ItemType>(parentType: ItemType, parentId: ItemId, itemType: ItemTypeType): CollectionEntry<ItemTypeType> | null;
|
|
17
|
-
getResourceByParent<ItemTypeType extends ItemType>(parentType: ItemType, parentId: ItemId, itemType: ItemTypeType): CollectionResource<ItemTypeType> | null;
|
|
18
20
|
getCollectionsByParent(parentType: ItemType, parentId: ItemId): CollectionEntry<any>[];
|
|
19
21
|
/**
|
|
20
22
|
* @description
|
|
@@ -28,5 +30,8 @@ export declare class CollectionCache {
|
|
|
28
30
|
getByFittingItem<ItemTypeType extends ItemType>(itemType: ItemTypeType, fields: FieldMap, parent: EntryParentNull): CollectionMatchResult<ItemTypeType>;
|
|
29
31
|
getByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: CollectionQuery): CollectionEntry<ItemTypeType> | null;
|
|
30
32
|
getByKey<ItemTypeType extends ItemType>(itemType: ItemTypeType, entryKey: string): Array<CollectionEntry<ItemTypeType>>;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated
|
|
35
|
+
*/
|
|
31
36
|
getResourceByKey<ItemTypeType extends ItemType>(itemType: ItemTypeType, resourceKey: string): Array<CollectionResource<ItemTypeType>>;
|
|
32
37
|
}
|
|
@@ -6,6 +6,9 @@ export declare class CollectionEntryService {
|
|
|
6
6
|
private queryParserFactory;
|
|
7
7
|
private queryService;
|
|
8
8
|
constructor(queryParserFactory: QueryParserFactory, queryService: QueryService);
|
|
9
|
+
createUnfoundLocalCollectionError(itemType: ItemType): {
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
9
12
|
cloneOptions(options: CollectionEntryOptions, parent: EntryParentNull): CollectionEntryOptions;
|
|
10
13
|
processOptions<ItemTypeType extends ItemType>(options: CollectionOptionsInterface<ItemTypeType>): CollectionEntryOptions;
|
|
11
14
|
cloneQueryParams<T extends object>(parameters: T): T;
|
|
@@ -1,42 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export declare type GroupedCollectionMatcherResult<ItemTypeType extends ItemType> = {
|
|
12
|
-
fitting: Array<ItemEntry<ItemTypeType>>;
|
|
13
|
-
notFitting: ItemId[];
|
|
14
|
-
maybe: Array<ItemEntry<ItemTypeType>>;
|
|
15
|
-
};
|
|
16
|
-
export declare class CollectionMatcher<ItemTypeType extends ItemType> {
|
|
17
|
-
private queryMatcherFactory;
|
|
18
|
-
private collectionCaches;
|
|
19
|
-
private updateInitial;
|
|
20
|
-
private callOnAdd;
|
|
21
|
-
private callOnActivate;
|
|
22
|
-
map: {
|
|
23
|
-
[collectionEntryId: number]: {
|
|
24
|
-
collection: CollectionEntry<ItemTypeType>;
|
|
25
|
-
matches: CollectionMatcherMatches<ItemTypeType>;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
constructor(queryMatcherFactory: QueryMatcherFactory, collectionCaches: CollectionCache[], updateInitial: boolean, callOnAdd: boolean, callOnActivate: boolean);
|
|
29
|
-
expand(itemEntry: ItemEntry<ItemTypeType>): this;
|
|
30
|
-
private _expand;
|
|
31
|
-
getCollectionsWithFittingItems(): Array<CollectionEntry<ItemTypeType>>;
|
|
32
|
-
addToCollections<U extends CollectionResource<ItemTypeType>>(resultResource: U): U['items'];
|
|
33
|
-
addToCollections(resultResource?: null): null;
|
|
34
|
-
addToCollections<U extends CollectionResource<ItemTypeType>>(resultResource?: CollectionResource<ItemTypeType> | null): U['items'] | null;
|
|
35
|
-
removeFromCollections<U extends CollectionResource<ItemTypeType>>(resultResource: U): U['items'];
|
|
36
|
-
removeFromCollections(resultResource?: null): null;
|
|
37
|
-
removeFromCollections<U extends CollectionResource<ItemTypeType>>(resultResource?: CollectionResource<ItemTypeType> | null): U['items'] | null;
|
|
38
|
-
removeFromAndAddToCollections(): void;
|
|
39
|
-
private groupItemEntries;
|
|
40
|
-
private groupItemIds;
|
|
41
|
-
private hasFittingItems;
|
|
1
|
+
import { QueryMatcherFactory } from '../factories';
|
|
2
|
+
import { CollectionEntry } from '../models';
|
|
3
|
+
import { ItemType } from '../types';
|
|
4
|
+
import { AbstractCache } from './cache/AbstractCache';
|
|
5
|
+
import { CollectionMatcherBase } from './CollectionMatcherBase';
|
|
6
|
+
export declare class CollectionMatcher extends CollectionMatcherBase {
|
|
7
|
+
constructor(queryMatcherFactory: QueryMatcherFactory, transaction: AbstractCache, getCollectionEntries: (itemType: ItemType) => CollectionEntry[]);
|
|
8
|
+
getCollectionsWithFittingItems(): CollectionEntry[];
|
|
42
9
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AbstractCache, FieldMap, ItemType } from '../';
|
|
2
|
+
import { QueryMatcherFactory } from '../factories/';
|
|
3
|
+
import { CollectionEntry, ItemEntry } from '../models';
|
|
4
|
+
import { InternalChangesDelta } from './InternalChangesDelta';
|
|
5
|
+
export declare type CollectionMatcherMatches<ItemTypeType extends ItemType = ItemType> = {
|
|
6
|
+
[itemId: number]: {
|
|
7
|
+
item: ItemEntry<ItemTypeType>;
|
|
8
|
+
isMatch: boolean | 'maybe';
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare class CollectionMatcherBase {
|
|
12
|
+
protected queryMatcherFactory: QueryMatcherFactory;
|
|
13
|
+
protected transaction: AbstractCache;
|
|
14
|
+
private getCollectionEntries;
|
|
15
|
+
protected map: {
|
|
16
|
+
[collectionEntryId: number]: {
|
|
17
|
+
collection: CollectionEntry;
|
|
18
|
+
matches: CollectionMatcherMatches;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
constructor(queryMatcherFactory: QueryMatcherFactory, transaction: AbstractCache, getCollectionEntries: (itemType: ItemType) => CollectionEntry[]);
|
|
22
|
+
expand<ItemEntryType extends ItemEntry>(itemEntry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>): this;
|
|
23
|
+
processDelta(internalChangesDelta: InternalChangesDelta): this;
|
|
24
|
+
protected hasFittingItems(matches: CollectionMatcherMatches): boolean;
|
|
25
|
+
protected _expand(itemEntry: ItemEntry, matchFunction: (collectionEntry: CollectionEntry) => boolean | 'maybe'): this;
|
|
26
|
+
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ColumnInfo, ColumnSet } from '../classes';
|
|
2
2
|
import { ColumnInfoFactory } from '../factories';
|
|
3
3
|
import { ApiRequestColumn, ApiRequestColumns, ColumnExpansionResult, ItemType, ResponseColumnItemTypeMap } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* A ColumnExpansion is used to make sure {@link ItemEntry ItemEntries} that have the same {@link ColumnSet ColumnSet} (matched on {@link ColumnSet.id ColumnSet.id}) will all get the same new expanded ColumnSet
|
|
7
|
+
*/
|
|
4
8
|
export declare class ColumnExpansion<ItemTypeType extends ItemType> {
|
|
5
9
|
private columnInfoFactory;
|
|
6
10
|
itemType: ItemTypeType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ColumnCache, ColumnUtil } from '../classes';
|
|
2
|
-
import {
|
|
1
|
+
import { ApiRequestService, ColumnCache, ColumnUtil } from '../classes';
|
|
2
|
+
import { ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
3
3
|
import { ApiRequestColumns, ItemType, PromiseInterface, ResponseColumn, ResponseColumnItemTypeMap } from '../types';
|
|
4
4
|
export declare class ColumnHandler {
|
|
5
5
|
private apiRequestService;
|
|
@@ -7,7 +7,7 @@ export declare class ColumnHandler {
|
|
|
7
7
|
private promiseService;
|
|
8
8
|
private cache;
|
|
9
9
|
private columnUtil;
|
|
10
|
-
constructor(apiRequestService:
|
|
10
|
+
constructor(apiRequestService: ApiRequestService, errorHandler: ErrorHandlerInterface, promiseService: PromiseLibraryInterface, cache: ColumnCache, columnUtil: ColumnUtil);
|
|
11
11
|
setColumn(itemType: ItemType, responseColumn: ResponseColumn): ResponseColumn;
|
|
12
12
|
setColumns(itemType: ItemType, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnItemTypeMap): ResponseColumnItemTypeMap;
|
|
13
13
|
fetchItemTypeTranslations(itemTypes: ItemType[]): PromiseInterface<{
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
+
import { LinkTreeServiceInterface } from '../interfaces/LinkTreeServiceInterface';
|
|
1
2
|
import { ApiRequestColumn, ApiRequestColumns, ItemType, ResponseColumn, ResponseColumnItemTypeMap, ResponseColumnMap } from '../types';
|
|
2
3
|
export declare type RequestColumnMergeResult<T extends ApiRequestColumns = ApiRequestColumns, U extends ApiRequestColumns = ApiRequestColumns> = {
|
|
3
4
|
merged: T;
|
|
4
5
|
difference: U;
|
|
5
6
|
};
|
|
6
7
|
export declare class ColumnUtil {
|
|
7
|
-
|
|
8
|
+
private linkTreeService;
|
|
9
|
+
constructor(linkTreeService: LinkTreeServiceInterface);
|
|
10
|
+
/**
|
|
11
|
+
* @description
|
|
12
|
+
* Checks the {@link ApiLinkTree LinkTree} and returns the link columnIds for the given ItemType
|
|
13
|
+
*
|
|
14
|
+
* @remark
|
|
15
|
+
* - For {@link ApiLinkTreeType.DIRECT direct links} it will be a columnId
|
|
16
|
+
* - For {@link ApiLinkTreeType.ITEMTABLE itemtable links} it will be 'itemtype' and 'item'
|
|
17
|
+
*/
|
|
18
|
+
getColumnsFromLink(parentType: ItemType, itemType: ItemType): ApiRequestColumn[];
|
|
8
19
|
getColumnPath(columns: ResponseColumn[], renderAs: null | string): string;
|
|
9
20
|
getDateFormatOptions(columnType?: 'datetime'): {
|
|
10
21
|
'J-M-Y': string;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { CreateRequestEntry,
|
|
1
|
+
import { ApiFormatter, CreateCompilation, KeyService } from '../classes';
|
|
2
|
+
import { RequestColumnExpansionFactory } from '../factories';
|
|
3
|
+
import { CreateRequestEntry, ItemType } from '../types';
|
|
4
|
+
import { TransactionCache } from './cache/transaction/TransactionCache';
|
|
4
5
|
export declare class CreateRequest<ItemTypeType extends ItemType> {
|
|
5
|
-
private
|
|
6
|
-
private collectionMatcherFactory;
|
|
6
|
+
private apiFormatter;
|
|
7
7
|
private keyService;
|
|
8
8
|
private requestColumnExpansionFactory;
|
|
9
9
|
private compilation;
|
|
10
|
-
private
|
|
11
|
-
private parameterMap;
|
|
10
|
+
private transaction;
|
|
12
11
|
private breakupByParent;
|
|
13
12
|
requests: Array<CreateRequestEntry<ItemTypeType>>;
|
|
14
|
-
constructor(
|
|
13
|
+
constructor(apiFormatter: ApiFormatter, keyService: KeyService, requestColumnExpansionFactory: RequestColumnExpansionFactory, compilation: CreateCompilation, transaction: TransactionCache, breakupByParent?: boolean);
|
|
15
14
|
finalizeRequest(requestResource: CreateRequestEntry<ItemTypeType>): CreateRequestEntry<ItemTypeType>;
|
|
16
15
|
setRequestParent(parentType: ItemType, requestEntry: CreateRequestEntry<ItemTypeType>): boolean;
|
|
17
16
|
run(): CreateRequestEntry<ItemTypeType>[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ItemEntry } from '../models';
|
|
2
|
+
import { EntryParent, FieldMap, ItemIdConversionMap, ItemType } from '../types';
|
|
3
|
+
import { ChangesDeltaBase } from './ChangesDeltaBase';
|
|
4
|
+
import { ItemEntryService } from './ItemEntryService';
|
|
5
|
+
export declare type InternalCreateDelta<ItemTypeType extends ItemType = any> = {
|
|
6
|
+
entry: ItemEntry<ItemTypeType>;
|
|
7
|
+
fields: FieldMap<ItemTypeType>;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @description
|
|
11
|
+
* ChangesDelta used internally by the core
|
|
12
|
+
*
|
|
13
|
+
* ----------
|
|
14
|
+
*
|
|
15
|
+
* The difference between {@link InternalChangesDelta InternalChangesDelta} and {@link ChangesDelta ChangesDelta} is that the InternalChangesDelta
|
|
16
|
+
* assumes 'created' entries are already existing, so it has a different format.
|
|
17
|
+
*
|
|
18
|
+
* Use this when calling {@link TransactionCache.applyChangesFromParent applyChangesFromParent} and {@link TransactionCache.applyChangesFromChild applyChangesFromChild}
|
|
19
|
+
*/
|
|
20
|
+
export declare class InternalChangesDelta extends ChangesDeltaBase {
|
|
21
|
+
created: {
|
|
22
|
+
[itemEntryId: string]: InternalCreateDelta;
|
|
23
|
+
};
|
|
24
|
+
moved: {
|
|
25
|
+
[itemEntryId: number]: {
|
|
26
|
+
entry: ItemEntry;
|
|
27
|
+
to: EntryParent;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
itemIdConversionMap: ItemIdConversionMap;
|
|
31
|
+
constructor(itemEntryService: ItemEntryService);
|
|
32
|
+
setItemCreated<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, fields: FieldMap<ItemTypeType>): void;
|
|
33
|
+
/**
|
|
34
|
+
* @remark
|
|
35
|
+
* Parent fields are non-writable so we need to keep track of moved entries another way (to do a linkTo request)
|
|
36
|
+
*/
|
|
37
|
+
setItemMoved(entry: ItemEntry, to: EntryParent): void;
|
|
38
|
+
}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { QueryMatcherFactory } from '../factories';
|
|
2
2
|
import { ItemEntry } from '../models';
|
|
3
3
|
import { CollectionQuery, ItemEntryParentIdMap, ItemId, ItemType } from '../types';
|
|
4
|
+
import { AbstractCache } from './cache/AbstractCache';
|
|
4
5
|
export declare class ItemCache {
|
|
5
6
|
private queryMatcherFactory;
|
|
7
|
+
private transaction;
|
|
6
8
|
private entries;
|
|
7
|
-
|
|
9
|
+
entriesByEntryId: {
|
|
10
|
+
[itemEntryId: number]: ItemEntry;
|
|
11
|
+
};
|
|
12
|
+
constructor(queryMatcherFactory: QueryMatcherFactory, transaction: AbstractCache);
|
|
13
|
+
getByEntryId(itemEntryId: ItemEntry['id']): ItemEntry | undefined;
|
|
8
14
|
some(callback: (itemEntry: ItemEntry<ItemType>) => boolean): boolean;
|
|
9
15
|
getByItemType<ItemTypeType extends ItemType>(itemType: ItemTypeType): ItemEntry<ItemTypeType>[];
|
|
10
16
|
getByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: CollectionQuery): ItemEntry<ItemTypeType>[];
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
import { KeyService } from '../classes';
|
|
2
2
|
import { AuthInterface } from '../interfaces';
|
|
3
|
+
import { LinkTreeServiceInterface } from '../interfaces/LinkTreeServiceInterface';
|
|
3
4
|
import { ItemEntry, ItemEntryOptions } from '../models';
|
|
4
|
-
import { ApiResponse, FieldMap, ItemError, ItemId, ItemIdConversionMap, ItemOptionsInterface, ItemType } from '../types';
|
|
5
|
+
import { ApiResponse, EntryParent, EntryParentNull, FieldMap, ItemError, ItemId, ItemIdConversionMap, ItemOptionsInterface, ItemType } from '../types';
|
|
5
6
|
export declare class ItemEntryService {
|
|
6
7
|
private authInterface;
|
|
7
8
|
private keyService;
|
|
8
|
-
|
|
9
|
+
private linkTreeService;
|
|
10
|
+
constructor(authInterface: AuthInterface, keyService: KeyService, linkTreeService: LinkTreeServiceInterface);
|
|
11
|
+
matchParent(oldParent: EntryParentNull, newParent: EntryParentNull): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* @description
|
|
14
|
+
* Gets the fields required to set the parent
|
|
15
|
+
*
|
|
16
|
+
* @remark
|
|
17
|
+
* Opposite of {@link ItemEntryService.getParentByFields ItemEntryService.getParentByFields}
|
|
18
|
+
*/
|
|
19
|
+
getLinkFieldsByParent<ItemTypeType extends ItemType>(parent: EntryParent, itemType: ItemTypeType): Partial<FieldMap<ItemTypeType>>;
|
|
20
|
+
/**
|
|
21
|
+
* @description
|
|
22
|
+
* Gets an {@link EntryParent EntryParent} object from the fields
|
|
23
|
+
*
|
|
24
|
+
* @remark
|
|
25
|
+
* Opposite of {@link ItemEntryService.getLinkFieldsByParent ItemEntryService.getLinkFieldsByParent}
|
|
26
|
+
*/
|
|
27
|
+
getParentByFields<ItemTypeType extends ItemType>(parentType: ItemType, itemEntry: ItemEntry<ItemTypeType>, fields: FieldMap<ItemTypeType>): Partial<FieldMap<ItemTypeType>>;
|
|
28
|
+
getDisplayName<ItemEntryType extends ItemEntry>(itemEntry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>): string;
|
|
9
29
|
processOptions(options: ItemOptionsInterface): ItemEntryOptions;
|
|
10
30
|
createUnfoundRemoteItemError(): ItemError;
|
|
11
31
|
createUnfoundLocalItemError(itemType: ItemType): ItemError;
|
|
@@ -15,9 +35,7 @@ export declare class ItemEntryService {
|
|
|
15
35
|
expandConversionMap(itemEntry: ItemEntry<any>, conversionMap: ItemIdConversionMap, newItemId?: ItemId): ItemId;
|
|
16
36
|
batchExpandConversionMap(itemEntries: Array<ItemEntry<any>>, conversionMap: ItemIdConversionMap): ItemIdConversionMap;
|
|
17
37
|
getConversionValue(itemType: ItemType, itemId: ItemId, map: ItemIdConversionMap): ItemId | undefined;
|
|
18
|
-
|
|
19
|
-
getFullName(firstName: string, infix: string, lastName: string): string;
|
|
38
|
+
getFullName(firstName?: string, infix?: string, lastName?: string): string;
|
|
20
39
|
getTitleField(itemType: ItemType): string;
|
|
21
40
|
getLocalDefaultValues(): FieldMap;
|
|
22
|
-
hasLocalDefaultValue(columnId: string): boolean;
|
|
23
41
|
}
|