@rentman/rm-core 1.1.10-2 → 1.1.10-4

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.
@@ -27,7 +27,7 @@ export declare class ApiFormatter {
27
27
  formatRequestDate(value: any): any;
28
28
  formatRequestDuration(value: any): any;
29
29
  formatRequestColor(value: any): any;
30
- getDefaultValue(columnType: any): false | moment.Moment | 0 | moment.Duration | "" | "0" | "#000000" | null;
30
+ getDefaultValue(columnType: any): false | 0 | "" | moment.Moment | moment.Duration | "0" | "#000000" | null;
31
31
  isDefaultValue(columnType: any, value: any): any;
32
32
  clone(columnType: any, value: any): any;
33
33
  getCloneFunction(columnType: any): (date: any) => any;
@@ -1,5 +1,6 @@
1
1
  import { ColumnCache, ColumnUtil } from '../classes';
2
2
  import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseInterface } from '../interfaces';
3
+ import { ResponseColumnMap } from '../types';
3
4
  export declare class ColumnHandler {
4
5
  private apiRequestService;
5
6
  private errorHandler;
@@ -9,10 +10,12 @@ export declare class ColumnHandler {
9
10
  constructor(apiRequestService: ApiRequestServiceInterface, errorHandler: ErrorHandlerInterface, promiseService: PromiseInterface, cache: ColumnCache, columnUtil: ColumnUtil);
10
11
  setColumn(itemType: any, responseColumn: any): any;
11
12
  setColumns(itemType: any, requestColumns: any, responseColumns: any): {};
12
- fetchItemTypeTranslations(itemTypes: any): Promise<any>;
13
+ fetchItemTypeTranslations(itemTypes: any): Promise<{
14
+ [itemType: string]: string;
15
+ }>;
13
16
  request(itemType: any, columns: any, params?: {
14
17
  filter: boolean;
15
18
  }): Promise<any>;
16
- fetch(itemType: any, requestColumns: any, params?: any): Promise<any>;
19
+ fetch(itemType: any, requestColumns: any, params?: any): Promise<ResponseColumnMap>;
17
20
  fetchAll(itemType: any): Promise<any>;
18
21
  }
@@ -1,7 +1,10 @@
1
1
  export interface PromiseInterface {
2
- all(iterable: Array<Promise<any> | any> | {
3
- key: Promise<any> | any;
4
- }): Promise<any>;
2
+ all(iterable: Array<Promise<any> | any>): Promise<any[]>;
3
+ all(iterable: {
4
+ [key: string]: Promise<any> | any;
5
+ }): Promise<{
6
+ [key: string]: any;
7
+ }>;
5
8
  when(value?: any): Promise<any>;
6
9
  reject(value?: any): Promise<any>;
7
10
  defer(): {
@@ -1,8 +1,7 @@
1
1
  import { ItemHandler, KeyService } from '../classes';
2
2
  import { ChangesProcessorFactory, ItemEntryFactory, ItemResourceFactory } from '../factories';
3
3
  import { ErrorHandlerInterface, PromiseInterface } from '../interfaces';
4
- import { CollectionEntry } from './CollectionEntry';
5
- import { CollectionResource } from './CollectionResource';
4
+ import { CollectionEntry, CollectionResource, ItemResource } from '../models';
6
5
  export declare class CollectionEditResource extends CollectionResource {
7
6
  private errorHandler;
8
7
  private itemHandler;
@@ -12,10 +11,10 @@ export declare class CollectionEditResource extends CollectionResource {
12
11
  private itemEntryFactory;
13
12
  constructor(errorHandler: ErrorHandlerInterface, itemHandler: ItemHandler, itemResourceFactory: ItemResourceFactory, changesProcessorFactory: ChangesProcessorFactory, keyService: KeyService, promiseService: PromiseInterface, itemEntryFactory: ItemEntryFactory, collectionEntry: CollectionEntry, options: any);
14
13
  save(): Promise<any>;
15
- moveItems(idArray: any, destination: any, enableCallbacks: any): any;
14
+ moveItems(idArray: any, destination: any, enableCallbacks: any): ItemResource[];
16
15
  removeItems(idArray: any, enableCallbacks: any): Promise<any>;
17
16
  removeItem(itemId: any, enableCallbacks: any): Promise<any>;
18
17
  addItems(valuesArray: any, enableCallbacks?: boolean): Promise<any>;
19
18
  addItem(values: any, enableCallbacks: any): Promise<any>;
20
- clear(enableCallbacks: any): any;
19
+ clear(enableCallbacks: any): ItemResource[] | null;
21
20
  }
@@ -38,10 +38,13 @@ export declare class CollectionEntry {
38
38
  forEach(callback: (itemEntry: ItemEntry) => void): void;
39
39
  getItemById(itemId: any): ItemEntry | undefined;
40
40
  getIdArray(accumulator?: never[]): ItemId[];
41
- addItems(itemEntries: any, resultResource: any, updateInitial?: boolean, callOnAdd?: boolean, callOnActivate?: boolean): ItemResource[] | null;
42
- removeItems(idArray: any, resultResource: any, updateInitial: any, enableCallback?: any): any;
43
- clear(resultResource: any, updateInitial: any, enableCallback?: any): any;
44
- handleRemovedItems(filterFunction: any, resultResource: any, updateInitial: any, enableCallback?: boolean): any;
41
+ revertChanges(): void;
42
+ addItems(itemEntries: ItemEntry[], resultResource?: CollectionResource | null, updateInitial?: boolean, callOnAdd?: boolean, callOnActivate?: boolean): ItemResource[] | null;
43
+ private handleAddedItemCallbacks(entriesAddedToInitial, entriesAddedToModified, resultResource?, callOnAdd?, callOnActivate?);
44
+ removeItems(idArray: any, resultResource: any, updateInitial: any, enableCallback?: any): ItemResource[] | null;
45
+ clear(resultResource: any, updateInitial: any, enableCallback?: any): ItemResource[] | null;
46
+ handleRemovedItems(filterFunction: (itemEntry: ItemEntry) => boolean, resultResource?: CollectionResource | null, updateInitial?: boolean, enableCallback?: boolean): ItemResource[] | null;
47
+ private handleRemovedItemCallbacks(removedFromInitial, removedFromModified, resultResource?, callOnRemove?);
45
48
  expand(newColumns: any): Promise<any>;
46
49
  extendQuery(callback: any): any;
47
50
  extend(queryCallback: any, collectionResource: any, callOnAdd?: any, updateInitial?: any): Promise<any>;
@@ -56,7 +59,6 @@ export declare class CollectionEntry {
56
59
  hasUpdatedItems(): boolean;
57
60
  getCurrentResource(): CollectionResource;
58
61
  clearResources(isSubtabChange?: boolean): void;
59
- revertChanges(): void;
60
62
  onItemsCreated(conversionMap: any): void;
61
63
  getUpdatedItemColumns(conversionMap: any): {
62
64
  [columnId: string]: ColumnInfo;