@rentman/rm-core 1.1.16 → 1.1.18
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 +24 -0
- package/dist/dist/classes/ApiFormatter.d.ts +14 -11
- package/dist/dist/classes/BatchStatus.d.ts +1 -0
- package/dist/dist/classes/CollectionHandler.d.ts +3 -3
- package/dist/dist/classes/ItemAdministrator.d.ts +1 -0
- package/dist/dist/classes/ItemCache.d.ts +1 -1
- package/dist/dist/classes/ItemEntryService.d.ts +5 -2
- package/dist/dist/classes/ItemHandler.d.ts +10 -6
- package/dist/dist/classes/ItemRequestService.d.ts +3 -3
- package/dist/dist/constants.d.ts +1 -0
- package/dist/dist/models/CollectionEntry.d.ts +4 -2
- package/dist/dist/models/ItemEntry.d.ts +22 -17
- package/dist/dist/types/ItemTypesCollection.d.ts +2 -2
- package/dist/rm-core.js +257 -172
- package/dist/rm-core.min.js +1 -1
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
#Changelog
|
|
2
2
|
Contains new features, breaking changes and their reasoning
|
|
3
3
|
|
|
4
|
+
## v1.1.18
|
|
5
|
+
- Calling `expand` on a `CollectionEntry` manually no longer defers the collection entry.
|
|
6
|
+
- The `batchFetch` and `batchExpand` functions in the `CollectionHandler` class now properly defer and resolve the
|
|
7
|
+
collection entries.
|
|
8
|
+
|
|
9
|
+
## v1.1.17
|
|
10
|
+
- Fixed issue where the `getLocalByQuery` function in the `ItemCache` class wouldn't return any items.
|
|
11
|
+
- When batch resolving collection entries, `CollectionHandler` now looks for matching items using `getByQuery` instead
|
|
12
|
+
of `getByParent`.
|
|
13
|
+
|
|
14
|
+
### Cache invalidation
|
|
15
|
+
- Added `queueReload` function to `ItemEntry` class. This will reload the item when the item entry itself or a
|
|
16
|
+
collection entry containing the item is requested.
|
|
17
|
+
- The `queueReload` function in the `CollectionEntry` class no longer directly defers the item.
|
|
18
|
+
- Added `invalidateCache` function to the `ItemAdministrator` class. This will call `queueReload` on all item entries
|
|
19
|
+
and collection entries.
|
|
20
|
+
|
|
21
|
+
### Item entry refactoring
|
|
22
|
+
- Renamed `process` to `setFields`.
|
|
23
|
+
- Replaced `processLocal` with `setLocalFields`. This function no longer has a `modified` parameter.
|
|
24
|
+
- `setModified` now also sets local default values.
|
|
25
|
+
- Removed `setCreator`. This function was called twice in some instances.
|
|
26
|
+
- **Breaking:** Added `derived` parameter to `updateFields`
|
|
27
|
+
|
|
4
28
|
##v1.16
|
|
5
29
|
- Pass `hasChanges` as second argument to `onBeforeSave` callbacks in the `LocalCache` class. This fixes an issue with
|
|
6
30
|
project financial values in the front-end. [RM4-9577]
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
/// <reference types="moment" />
|
|
2
2
|
import * as moment from 'moment';
|
|
3
|
+
import { FieldMap } from '../types';
|
|
4
|
+
import { ColumnInfo } from './ColumnInfo';
|
|
3
5
|
export declare class ApiFormatter {
|
|
4
6
|
MOMENT_INVALID: string;
|
|
5
7
|
SERVER_DATETIME_FORMAT: string;
|
|
6
8
|
SERVER_TIME_FORMAT: string;
|
|
7
9
|
SERVER_DATE_FORMAT: string;
|
|
8
10
|
constructor();
|
|
9
|
-
formatResponse(fields:
|
|
10
|
-
expandResponse(current:
|
|
11
|
-
formatRequest(initial:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
formatResponse(fields: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
12
|
+
expandResponse(current: FieldMap, expanded: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
13
|
+
formatRequest(initial: FieldMap, modified: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
14
|
+
formatRequestLocal(fields: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
15
|
+
hasChanges(initial: FieldMap, modified: FieldMap, columns: ColumnInfo[]): boolean;
|
|
16
|
+
getChanges(initial: FieldMap, modified: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
17
|
+
copyFields(source: FieldMap, destination: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
18
|
+
shallowCopyFields(shallowSource: FieldMap, deepSource: FieldMap, destination: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
19
|
+
setDefaultValues(destination: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
20
|
+
compareFields<T>(columnType: string, first: T, second: T): boolean;
|
|
18
21
|
compareFloats(a: any, b: any): boolean;
|
|
19
|
-
compareMomentObjects(first: any, second: any):
|
|
22
|
+
compareMomentObjects(first: any, second: any): boolean;
|
|
20
23
|
compareDurations(first: any, second: any): boolean;
|
|
21
24
|
formatResponseValue(columnType: any, value: any): any;
|
|
22
25
|
formatRequestValue(columnType: any, value: any): any;
|
|
@@ -28,7 +31,7 @@ export declare class ApiFormatter {
|
|
|
28
31
|
formatRequestDuration(value: any): any;
|
|
29
32
|
formatRequestColor(value: any): any;
|
|
30
33
|
getDefaultValue(columnType: any): false | 0 | "" | moment.Moment | moment.Duration | "0" | "#000000" | null;
|
|
31
|
-
isDefaultValue(columnType: any, value: any):
|
|
34
|
+
isDefaultValue(columnType: any, value: any): boolean;
|
|
32
35
|
clone(columnType: any, value: any): any;
|
|
33
36
|
getCloneFunction(columnType: any): (date: any) => any;
|
|
34
37
|
cloneDuration(duration: any): moment.Duration;
|
|
@@ -6,6 +6,7 @@ export declare class BatchStatus {
|
|
|
6
6
|
private promiseService;
|
|
7
7
|
getItemId: (itemEntry: ItemEntry) => ItemId;
|
|
8
8
|
getPromise: (itemEntry: ItemEntry) => Promise<ItemEntry>;
|
|
9
|
+
readonly requestStatusArray: ENTRY_STATUS[];
|
|
9
10
|
entries: ItemEntryEntryStatusMap;
|
|
10
11
|
constructor(promiseService: PromiseInterface, getItemId: (itemEntry: ItemEntry) => ItemId, getPromise: (itemEntry: ItemEntry) => Promise<ItemEntry>);
|
|
11
12
|
add(entryStatus: EntryStatus<ItemEntry>): void;
|
|
@@ -3,7 +3,7 @@ import { ENTRY_STATUS } from '../constants';
|
|
|
3
3
|
import { CollectionCacheFactory, CollectionEntryFactory, CollectionMatcherFactory, ColumnSetFactory, QueryParserFactory } from '../factories';
|
|
4
4
|
import { ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
5
5
|
import { CollectionEntry, CollectionResource, ItemResource } from '../models';
|
|
6
|
-
import { CollectionEntryBatchStatusMap, CollectionEntryParentIdMap, EntryStatus, ItemEntryParentIdMap, ItemId, ItemResourceItemIdMap, ItemType } from '../types';
|
|
6
|
+
import { CollectionEntryBatchStatusMap, CollectionEntryParentIdMap, EntryStatus, ItemEntryParentIdMap, ItemId, ItemResourceItemIdMap, ItemType, RequestColumn } from '../types';
|
|
7
7
|
export declare class CollectionHandler {
|
|
8
8
|
private errorHandler;
|
|
9
9
|
private itemRequestService;
|
|
@@ -34,13 +34,13 @@ export declare class CollectionHandler {
|
|
|
34
34
|
* @deprecated, use collectionMatcherFactory
|
|
35
35
|
*/
|
|
36
36
|
addToCollections(collectionMap: any, updateInitial: boolean, resultResource?: CollectionResource | null): ItemResource[];
|
|
37
|
-
batchExpand(parentType:
|
|
37
|
+
batchExpand(parentType: ItemType, itemType: ItemType, collections: CollectionResource[], newColumns: RequestColumn[]): Promise<CollectionResource[]>;
|
|
38
38
|
batchExtend(parentType: string, itemType: string, options: any, queryCallback: any, collections: CollectionResource[], returnAllItems?: boolean): Promise<ItemResourceItemIdMap>;
|
|
39
39
|
batchFetch(parentType: ItemType, parentIdArray: ItemId[], itemType: ItemType, options: any, itemCache: ItemCache, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): Promise<CollectionEntryParentIdMap>;
|
|
40
40
|
createStatusResource(parentType: ItemType, parentIdArray: ItemId[], itemType: ItemType, options: any, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): CollectionEntryBatchStatusMap;
|
|
41
41
|
fetch(itemType: ItemType, options: any, itemCache: ItemCache, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): Promise<CollectionEntry>;
|
|
42
42
|
getCachedEntryStatus(collectionEntry: CollectionEntry, options: any): ENTRY_STATUS;
|
|
43
|
-
getDeferredEntryStatus(itemType: ItemType, options: any, query: any, deferredEntries:
|
|
43
|
+
getDeferredEntryStatus(itemType: ItemType, options: any, query: any, deferredEntries: CollectionCache): {
|
|
44
44
|
entry: CollectionEntry;
|
|
45
45
|
isDeferred: boolean;
|
|
46
46
|
};
|
|
@@ -22,6 +22,7 @@ export declare class ItemAdministrator {
|
|
|
22
22
|
private promiseInterface;
|
|
23
23
|
private queryService;
|
|
24
24
|
constructor(apiRequestService: ApiRequestServiceInterface, authInterface: AuthInterface, collectionEntryService: CollectionEntryService, collectionHandler: CollectionHandler, collectionMatcherFactory: CollectionMatcherFactory, collectionResourceService: CollectionResourceService, columnSetFactory: ColumnSetFactory, errorHandler: ErrorHandlerInterface, itemEntryService: ItemEntryService, itemHandler: ItemHandler, itemRequestService: ItemRequestService, keyService: KeyService, localCacheFactory: LocalCacheFactory, localCacheManager: LocalCacheManagerInterface, moduleChangesCompilationFactory: ModuleChangesCompilationFactory, promiseInterface: PromiseInterface, queryService: QueryService);
|
|
25
|
+
invalidateCache(): void;
|
|
25
26
|
getItemDefinition(itemType: ItemType, stateKey: number | string, options: ItemOptions): ItemDefinition;
|
|
26
27
|
getCollectionMatcher(itemEntries: ItemEntry[], addToTab: boolean): CollectionMatcher;
|
|
27
28
|
fetchTitle(itemType: any, itemId: any, deferRequest: any): Promise<any>;
|
|
@@ -13,12 +13,12 @@ export declare class ItemCache {
|
|
|
13
13
|
getByItemType(itemType: ItemType): ItemEntry[];
|
|
14
14
|
getByQuery(itemType: ItemType, query: any): ItemEntry[];
|
|
15
15
|
getLocalByQuery(itemType: ItemType, query: any): ItemEntry[];
|
|
16
|
+
getByParent(parentType: ItemType, parentId: ItemId, itemType: ItemType): ItemEntry[];
|
|
16
17
|
forEach(callback: (itemEntry: ItemEntry) => void): void;
|
|
17
18
|
toArray(): ItemEntry[];
|
|
18
19
|
add(itemEntry: ItemEntry): ItemEntry;
|
|
19
20
|
get(itemType: ItemType, itemId: ItemId | string): any;
|
|
20
21
|
contains(itemType: ItemType, itemId: ItemId | string): boolean;
|
|
21
|
-
getByParent(parentType: ItemType, parentId: ItemId, itemType: ItemType): ItemEntry[];
|
|
22
22
|
updateItemId(itemEntry: ItemEntry, oldItemId: any): ItemEntry;
|
|
23
23
|
clear(itemEntry: ItemEntry): boolean;
|
|
24
24
|
matchQuery(itemEntry: ItemEntry, query: any): boolean;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { KeyService } from '../classes';
|
|
2
|
+
import { AuthInterface } from '../interfaces';
|
|
2
3
|
import { ItemEntry } from '../models';
|
|
3
|
-
import { ApiResponse, ItemId, ItemIdConversionMap, ItemType } from '../types';
|
|
4
|
+
import { ApiResponse, FieldMap, ItemId, ItemIdConversionMap, ItemType } from '../types';
|
|
4
5
|
export declare class ItemEntryService {
|
|
6
|
+
private authInterface;
|
|
5
7
|
private keyService;
|
|
6
8
|
undefinedItemError: string;
|
|
7
9
|
ALL_PERMISSIONS: number;
|
|
8
|
-
constructor(keyService: KeyService);
|
|
10
|
+
constructor(authInterface: AuthInterface, keyService: KeyService);
|
|
9
11
|
processOptions(options: any): any;
|
|
10
12
|
createLocalConversionMap(itemType: ItemType, itemId: ItemId, doExtend: boolean | undefined, apiResponse: ApiResponse): ItemIdConversionMap;
|
|
11
13
|
expandLocalConversionMap(parentType: ItemType, parentId: ItemId, apiResponse: ApiResponse, conversionMap: ItemIdConversionMap): void;
|
|
@@ -15,4 +17,5 @@ export declare class ItemEntryService {
|
|
|
15
17
|
batchClone(itemEntries: ItemEntry[], conversionMap?: ItemIdConversionMap): ItemEntry[];
|
|
16
18
|
getFullName(firstName: any, infix: any, lastName: any): any;
|
|
17
19
|
getTitleField(itemType: any): "serienummer" | "nummer" | "friendlyname" | "naamintern" | "omschrijving" | "code" | "naam" | "displayname";
|
|
20
|
+
getLocalDefaultValues(): FieldMap;
|
|
18
21
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { ApiResponseProcessor, BatchStatus, ColumnHandler, ColumnUtil, ItemCache, ItemEntryService, KeyService } from '../classes';
|
|
1
|
+
import { ApiResponseProcessor, BatchStatus, ColumnExpansion, ColumnHandler, ColumnSet, ColumnUtil, ItemCache, ItemEntryService, KeyService } from '../classes';
|
|
2
2
|
import { ENTRY_STATUS } from '../constants';
|
|
3
3
|
import { BatchStatusFactory, ColumnExpansionFactory, ColumnSetFactory, ItemCacheFactory, ItemEntryFactory } from '../factories';
|
|
4
4
|
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
5
5
|
import { ItemEntry } from '../models';
|
|
6
|
-
import { ApiResponse, ApiTemplateItemTypeMap, EntryStatus, ItemId, ItemIdConversionMap, ItemType, RequestColumns, TemplateResponseItemEntryMap, TemplateResponseLinkedItemEntryMap } from '../types';
|
|
7
|
-
import { ColumnExpansion } from './ColumnExpansion';
|
|
8
|
-
import { ColumnSet } from './ColumnSet';
|
|
6
|
+
import { ApiResponse, ApiTemplateItemTypeMap, EntryStatus, FieldMap, ItemId, ItemIdConversionMap, ItemType, RequestColumns, TemplateResponseItemEntryMap, TemplateResponseLinkedItemEntryMap } from '../types';
|
|
9
7
|
export declare class ItemHandler {
|
|
10
8
|
private apiRequestService;
|
|
11
9
|
private errorHandler;
|
|
@@ -38,6 +36,11 @@ export declare class ItemHandler {
|
|
|
38
36
|
resolveLocal(itemEntry: ItemEntry, parent: any, template: any, localItemCache: ItemCache): TemplateResponseItemEntryMap;
|
|
39
37
|
resolveExpansion(itemEntry: ItemEntry, columnExpansion: ColumnExpansion, response: ApiResponse): ItemEntry;
|
|
40
38
|
resolveRemote(itemEntry: ItemEntry, columnSet: ColumnSet, response: ApiResponse): ItemEntry | null;
|
|
39
|
+
resolveRemoteValues(itemEntry: ItemEntry, response: ApiResponse): ItemEntry | null;
|
|
40
|
+
getResponseFields(itemEntry: ItemEntry, columnSet: any, response: ApiResponse): {
|
|
41
|
+
initial: FieldMap;
|
|
42
|
+
derived: FieldMap;
|
|
43
|
+
} | null;
|
|
41
44
|
fetchTemplate(itemType: string, templateOptions?: any, templateColumns?: any): Promise<any>;
|
|
42
45
|
getEntryStatus(itemType: ItemType, itemId: ItemId, options: any, localItemCache: ItemCache): EntryStatus<ItemEntry>;
|
|
43
46
|
isColumnSuperset(itemEntry: ItemEntry, columns: RequestColumns): any;
|
|
@@ -53,8 +56,9 @@ export declare class ItemHandler {
|
|
|
53
56
|
* for every type of entry status there is in this batch request make sure the entries get resolved.
|
|
54
57
|
* then return a array of the resulting ItemEntryArray
|
|
55
58
|
*/
|
|
56
|
-
batchResolve(itemType:
|
|
59
|
+
batchResolve(itemType: ItemType, batchStatus: BatchStatus, requestColumns: RequestColumns, resolved: any, localItemCache: ItemCache): ItemEntry[] | Promise<any>;
|
|
57
60
|
createLocalEntries(parentType: ItemType, localParentId: ItemId, template: any, itemIdConversion: ItemIdConversionMap, localItemCache: ItemCache, excludeItemTypes?: ItemType[]): TemplateResponseLinkedItemEntryMap[];
|
|
58
61
|
fetchTitle(itemType: ItemType, itemId: ItemId, deferRequest: boolean | undefined, localItemCache: ItemCache): Promise<any>;
|
|
59
|
-
|
|
62
|
+
requestItem(itemEntry: ItemEntry, requestColumns?: RequestColumns): Promise<ApiResponseProcessor>;
|
|
63
|
+
requestItems(itemType: ItemType, itemIds: ItemId[], columns: RequestColumns): Promise<ApiResponseProcessor>;
|
|
60
64
|
}
|
|
@@ -2,7 +2,7 @@ import { ApiResponseProcessor, ColumnExpansion, ColumnSet, ItemHandler, QuerySer
|
|
|
2
2
|
import { ColumnExpansionFactory, ColumnSetFactory, ItemEntryFactory } from '../factories';
|
|
3
3
|
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
4
4
|
import { CollectionEntry, ItemEntry } from '../models';
|
|
5
|
-
import { ApiResponse, EntryParentNull, ItemId, ItemType } from '../types';
|
|
5
|
+
import { ApiResponse, EntryParentNull, ItemId, ItemType, RequestColumns } from '../types';
|
|
6
6
|
export declare class ItemRequestService {
|
|
7
7
|
private apiRequestService;
|
|
8
8
|
private errorHandler;
|
|
@@ -16,8 +16,8 @@ export declare class ItemRequestService {
|
|
|
16
16
|
requestItem(itemType: any, itemId: any, columns: any): Promise<ApiResponseProcessor>;
|
|
17
17
|
requestItems(collectionEntry: CollectionEntry, query?: any, columns?: any): Promise<ApiResponseProcessor>;
|
|
18
18
|
requestLinkItems(parentType: any, parentIdArray: any, itemType: any, query: any, columns: any): Promise<ApiResponseProcessor>;
|
|
19
|
-
processExpansion(requestColumns:
|
|
19
|
+
processExpansion(requestColumns: RequestColumns, response: ApiResponse, itemType: ItemType, itemEntries: ItemEntry[]): ColumnExpansion;
|
|
20
20
|
processResponse(response: ApiResponse, idArray: ItemId[], parent: EntryParentNull, columnSet: ColumnSet, columnExpansion?: ColumnExpansion): Promise<ItemEntry[]>;
|
|
21
|
-
handleCachedItem(itemEntry:
|
|
21
|
+
handleCachedItem(itemEntry: ItemEntry, response: ApiResponse, columnExpansion: ColumnExpansion): ItemEntry;
|
|
22
22
|
processLinkResponse(response: ApiResponse, parentType: ItemType, parentIdArray: ItemId[], itemType: ItemType, options: any): Promise<any>;
|
|
23
23
|
}
|
package/dist/dist/constants.d.ts
CHANGED
|
@@ -19,11 +19,13 @@ export declare class CollectionEntry {
|
|
|
19
19
|
hasEditResources: boolean;
|
|
20
20
|
hasItemEditResources: boolean;
|
|
21
21
|
constructor(factory: CollectionEntryFactory, itemType: ItemType, options: any);
|
|
22
|
+
defer(): void;
|
|
22
23
|
isDeferred(): boolean;
|
|
24
|
+
_resolve(): this;
|
|
23
25
|
resolve(itemEntryCompound: {
|
|
24
26
|
columns: ColumnSet;
|
|
25
27
|
items: ItemEntry[];
|
|
26
|
-
}):
|
|
28
|
+
}): this;
|
|
27
29
|
isLocal(): boolean;
|
|
28
30
|
matchParent(itemType: ItemType, itemId: ItemId): boolean;
|
|
29
31
|
forEach(callback: (itemEntry: ItemEntry) => void): void;
|
|
@@ -35,7 +37,7 @@ export declare class CollectionEntry {
|
|
|
35
37
|
clear(resultResource?: CollectionResource | null, updateInitial?: boolean, callOnRemove?: boolean): ItemResource[] | null;
|
|
36
38
|
handleRemovedItems(filterFunction: (itemEntry: ItemEntry) => boolean, resultResource?: CollectionResource | null, updateInitial?: boolean, callOnRemove?: boolean): ItemResource[] | null;
|
|
37
39
|
private handleRemovedItemCallbacks(removedFromInitial, removedFromModified, resultResource?, callOnRemove?);
|
|
38
|
-
expand(newColumns:
|
|
40
|
+
expand(newColumns: RequestColumns): Promise<this>;
|
|
39
41
|
extendQuery(callback: any): any;
|
|
40
42
|
extend(queryCallback: any, collectionResource: any, callOnAdd?: any, updateInitial?: any): Promise<any>;
|
|
41
43
|
queueReload(): void;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ColumnSet } from '../classes';
|
|
2
2
|
import { ItemEntryFactory } from '../factories';
|
|
3
3
|
import { ItemResource } from '../models';
|
|
4
|
-
import { EntryParentNull, FieldMap, ItemId, ItemIdConversionMap } from '../types';
|
|
4
|
+
import { ColumnExpansionResult, EntryParentNull, FieldMap, ItemId, ItemIdConversionMap, ItemType, ResponseColumn } from '../types';
|
|
5
5
|
export declare class ItemEntry {
|
|
6
6
|
private factory;
|
|
7
7
|
itemType: string;
|
|
8
8
|
itemId: ItemId;
|
|
9
9
|
columns: ColumnSet;
|
|
10
10
|
id: number;
|
|
11
|
+
reloadQueued: boolean;
|
|
11
12
|
deferRequest: boolean;
|
|
12
13
|
deferred: any;
|
|
13
14
|
parent: EntryParentNull;
|
|
@@ -16,41 +17,45 @@ export declare class ItemEntry {
|
|
|
16
17
|
derived: FieldMap;
|
|
17
18
|
resources: ItemResource[];
|
|
18
19
|
constructor(factory: ItemEntryFactory, itemType: string, itemId: ItemId, columns: ColumnSet);
|
|
19
|
-
|
|
20
|
+
queueReload(): this;
|
|
21
|
+
defer(deferRequest?: boolean): this;
|
|
20
22
|
resolve(): this;
|
|
21
23
|
resolveDeferred(initial: any, derived: any, columns: any): this;
|
|
22
24
|
isDeferred(): boolean;
|
|
23
25
|
reject(error?: any): this;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
setCreator(): this;
|
|
26
|
+
setFields(initial: FieldMap, derived: FieldMap): this;
|
|
27
|
+
setLocalFields(initialValues: FieldMap, conversionMap: ItemIdConversionMap): this;
|
|
27
28
|
clone(conversionMap?: ItemIdConversionMap): ItemEntry;
|
|
28
29
|
resetDerived(columnIds: any): this;
|
|
29
30
|
clearResources(): this;
|
|
30
31
|
deactivateResources(): this;
|
|
31
32
|
getFields(): FieldMap;
|
|
32
|
-
expand(main:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
expand(main: FieldMap, derived: FieldMap, columnExpansionResult: ColumnExpansionResult): this;
|
|
34
|
+
/**
|
|
35
|
+
* This function assumes the initial, modified, derived properties are already set. It will update the values
|
|
36
|
+
* themselves to preserve references in existing item resources.
|
|
37
|
+
*/
|
|
38
|
+
updateFields(fields: FieldMap, derived?: FieldMap | null, overwrite?: boolean): this;
|
|
39
|
+
updateItemValue(fields: FieldMap, apiColumn: ResponseColumn, conversionMap: ItemIdConversionMap): this;
|
|
40
|
+
updateItemFields(conversionMap: ItemIdConversionMap): this;
|
|
41
|
+
formatRequest(): FieldMap;
|
|
37
42
|
setDisplayName(): this;
|
|
38
|
-
getDisplayName():
|
|
43
|
+
getDisplayName(): string;
|
|
39
44
|
/**
|
|
40
45
|
* @param {Boolean} returnAll Returns all initial values if true
|
|
41
46
|
* @returns {Object}
|
|
42
47
|
*/
|
|
43
|
-
getChanges(returnAll?: boolean):
|
|
48
|
+
getChanges(returnAll?: boolean): FieldMap;
|
|
44
49
|
isLocal(): boolean;
|
|
45
50
|
isLockable(): boolean;
|
|
46
51
|
hasChanges(): boolean;
|
|
47
52
|
resetModified(): this;
|
|
48
|
-
setInitial(values:
|
|
53
|
+
setInitial(values: FieldMap, enableCallbacks?: boolean): this;
|
|
49
54
|
/**
|
|
50
55
|
* Does a shallow copy of values!
|
|
51
56
|
*/
|
|
52
|
-
setModified(values?:
|
|
53
|
-
setDerived(values:
|
|
54
|
-
setParent(parentType:
|
|
55
|
-
callOnChange(previous:
|
|
57
|
+
setModified(values?: FieldMap): this;
|
|
58
|
+
setDerived(values: FieldMap): this;
|
|
59
|
+
setParent(parentType: ItemType, parentId: ItemId): this;
|
|
60
|
+
callOnChange(previous: FieldMap): this;
|
|
56
61
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CollectionMatcher, ColumnSet, RequestColumnExpansion } from '../classes';
|
|
1
|
+
import { ApiResponseProcessor, CollectionMatcher, ColumnSet, RequestColumnExpansion } from '../classes';
|
|
2
2
|
import { ENTRY_STATUS } from '../constants';
|
|
3
3
|
import { CollectionEntry, CollectionResource, ItemEntry, ItemResource } from '../models';
|
|
4
4
|
export declare type EntryParent = {
|
|
@@ -76,7 +76,7 @@ export declare type ColumnExpansionResult = {
|
|
|
76
76
|
merged: ColumnSet;
|
|
77
77
|
difference: ColumnSet;
|
|
78
78
|
};
|
|
79
|
-
export declare type ApiResponse =
|
|
79
|
+
export declare type ApiResponse = ApiResponseProcessor;
|
|
80
80
|
export interface ApiTemplate {
|
|
81
81
|
fields: any;
|
|
82
82
|
columns: any;
|