@rentman/rm-core 1.1.4 → 1.1.6

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 CHANGED
@@ -1,6 +1,14 @@
1
1
  #Changelog
2
2
  Contains new features, breaking changes and their reasoning
3
3
 
4
+ ##v1.1.6
5
+ - Fixed issue with deferred item entries.
6
+ - Re-enable changes watcher after save.
7
+ - Added optional `id` parameter to `LocalCache` constructor.
8
+
9
+ ##v1.1.5
10
+ - Added `clearItem` function to `LocalCache` class.
11
+
4
12
  ##v.1.1.4
5
13
  - Fix issue where items where not added to the local cache automatically when they where added to a collection.
6
14
  > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add
@@ -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 | 0 | "" | moment.Moment | 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,9 +1,9 @@
1
- import { ApiResponseProcessor, BatchStatus, ColumnHandler, ColumnUtil, ItemCache, ItemEntryService, KeyService } from '../classes';
1
+ import { ApiResponseProcessor, BatchStatus, 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 { ApiTemplateItemTypeMap, EntryStatus, ItemId, ItemIdConversionMap, ItemType, TemplateResponseItemEntryMap, TemplateResponseLinkedItemEntryMap } from '../types';
6
+ import { ApiTemplateItemTypeMap, EntryStatus, ItemId, ItemIdConversionMap, ItemType, RequestColumns, TemplateResponseItemEntryMap, TemplateResponseLinkedItemEntryMap } from '../types';
7
7
  export declare class ItemHandler {
8
8
  private apiRequestService;
9
9
  private errorHandler;
@@ -38,6 +38,8 @@ export declare class ItemHandler {
38
38
  resolveRemote(itemEntry: any, columnInfo: any, response: any): any;
39
39
  fetchTemplate(itemType: string, templateOptions?: any, templateColumns?: any): Promise<any>;
40
40
  getEntryStatus(itemType: ItemType, itemId: ItemId, options: any, localItemCache: ItemCache): EntryStatus<ItemEntry>;
41
+ isColumnSubset(itemEntry: ItemEntry, columns: RequestColumns): any;
42
+ expandColumnSetStub(columnSet: ColumnSet, columns: RequestColumns): void;
41
43
  getCachedEntryStatus(itemEntry: ItemEntry, options: any): ENTRY_STATUS;
42
44
  /**
43
45
  *
@@ -13,9 +13,11 @@ export declare class LocalCache {
13
13
  private collectionResourceFactory;
14
14
  private itemResourceService;
15
15
  private promiseService;
16
+ id: string;
17
+ items: ItemCache;
18
+ rootItem: ItemEntry | undefined;
16
19
  collections: CollectionCache;
17
20
  deferredCollections: CollectionCache;
18
- items: ItemCache;
19
21
  tabRequestParameters: {};
20
22
  callbacks: {
21
23
  onBeforeSave: {};
@@ -24,8 +26,13 @@ export declare class LocalCache {
24
26
  };
25
27
  changesInterval: null | number;
26
28
  hasChanges: boolean;
27
- rootItem: ItemEntry | undefined;
28
- constructor(errorHandler: ErrorHandlerInterface, lockService: LockService, itemResourceFactory: ItemResourceFactory, collectionCacheFactory: CollectionCacheFactory, changesProcessorFactory: ChangesProcessorFactory, itemCacheFactory: ItemCacheFactory, collectionResourceFactory: CollectionResourceFactory, itemResourceService: ItemResourceService, promiseService: PromiseInterface);
29
+ constructor(errorHandler: ErrorHandlerInterface, lockService: LockService, itemResourceFactory: ItemResourceFactory, collectionCacheFactory: CollectionCacheFactory, changesProcessorFactory: ChangesProcessorFactory, itemCacheFactory: ItemCacheFactory, collectionResourceFactory: CollectionResourceFactory, itemResourceService: ItemResourceService, promiseService: PromiseInterface, id?: string);
30
+ createItemResource(itemEntry: ItemEntry, options: any, isRoot?: boolean): ItemResource;
31
+ createItemResources(itemEntries: ItemEntry[], options: any): ItemResource[];
32
+ createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: any): CollectionResource;
33
+ createCollectionResources(collectionEntries: CollectionEntryParentIdMap, resourceOptions: any): {};
34
+ clearItem(itemResource: ItemResource): void;
35
+ clearItemEntry(itemEntry: ItemEntry): void;
29
36
  clearCollection(collectionResource: CollectionResource): void;
30
37
  clearResources(isSubTabChange?: boolean): void;
31
38
  updateSingleItems(conversionMap: any): void;
@@ -39,10 +46,6 @@ export declare class LocalCache {
39
46
  enableChangesWatcher(): void;
40
47
  disableChangesWatcher(): void;
41
48
  registerCallback(event: string, key: string, callback: any): () => boolean;
42
- createItemResource(itemEntry: ItemEntry, options: any, isRoot?: boolean): ItemResource;
43
- createItemResources(itemEntries: ItemEntry[], options: any): ItemResource[];
44
- createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: any): CollectionResource;
45
- createCollectionResources(collectionEntries: CollectionEntryParentIdMap, resourceOptions: any): {};
46
49
  onDeactivateItem(itemEntry: any): void;
47
50
  onActivateItem(itemEntry: any): void;
48
51
  }
@@ -12,5 +12,5 @@ export declare class LocalCacheFactory {
12
12
  private itemResourceService;
13
13
  private promiseService;
14
14
  constructor(errorHandler: ErrorHandlerInterface, lockService: LockService, itemResourceFactory: ItemResourceFactory, collectionCacheFactory: CollectionCacheFactory, changesProcessorFactory: ChangesProcessorFactory, itemCacheFactory: ItemCacheFactory, collectionResourceFactory: CollectionResourceFactory, itemResourceService: ItemResourceService, promiseService: PromiseInterface);
15
- construct(): LocalCache;
15
+ construct(id?: string): LocalCache;
16
16
  }