alimetry-detail-edit 1.0.0 → 1.2.0

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.
@@ -1,17 +1,22 @@
1
+ import { DoCheck, KeyValueDiffers, IterableDiffers } from '@angular/core';
1
2
  import { AbstractControl, FormControl, FormGroup } from '@angular/forms';
2
- import { Config, SharedService } from 'shared';
3
+ import { Config, SharedService } from 'alimetry-shared';
3
4
  import * as i0 from "@angular/core";
4
- export declare class DetailEditComponent {
5
+ export declare class DetailEditComponent implements DoCheck {
5
6
  private shared;
7
+ private kvDiffers;
8
+ private itDiffers;
6
9
  config: Config;
7
- status: 'error' | 'loading' | 'success' | 'generating' | 'sending' | 'nouser';
10
+ private configDiffer?;
11
+ private ownersDiffer?;
12
+ status: 'error' | 'cfgerror' | 'loading' | 'success' | 'generating' | 'sending' | 'nouser';
8
13
  private deviceDataId;
9
14
  private recordingSession;
10
15
  private recordingStart;
11
16
  private initialFormState;
12
- private detailChangeLog;
13
17
  private currentUser;
14
18
  private owner;
19
+ private detailChangeLog;
15
20
  formGroup: FormGroup<{
16
21
  dob: FormControl<string>;
17
22
  height: FormControl<number>;
@@ -19,7 +24,7 @@ export declare class DetailEditComponent {
19
24
  mealStart: FormControl<string>;
20
25
  mealEnd: FormControl<string>;
21
26
  }>;
22
- constructor(shared: SharedService);
27
+ constructor(shared: SharedService, kvDiffers: KeyValueDiffers, itDiffers: IterableDiffers);
23
28
  parseInputErrors(name: string, control: AbstractControl): string;
24
29
  private monitorFormChanges;
25
30
  private extractFields;
@@ -27,11 +32,14 @@ export declare class DetailEditComponent {
27
32
  private integrateFields;
28
33
  private postDeviceData;
29
34
  saveModifications(): void;
30
- private appendChangeLog;
31
- private loadDeviceData;
35
+ private logChange;
32
36
  regenReport(): void;
33
37
  resetModifications(): void;
38
+ private loadData;
39
+ private init;
40
+ refresh(): void;
34
41
  ngOnInit(): void;
42
+ ngDoCheck(): void;
35
43
  static ɵfac: i0.ɵɵFactoryDeclaration<DetailEditComponent, never>;
36
44
  static ɵcmp: i0.ɵɵComponentDeclaration<DetailEditComponent, "lib-detail-edit", never, { "config": "config"; }, {}, never, never, false, never>;
37
45
  }
package/lib/utils.d.ts CHANGED
@@ -3,3 +3,11 @@ export declare function globaliseDateTime(datetime: string): string;
3
3
  export declare function getAge(dob: string): number;
4
4
  export declare function titleise(camel: string): string;
5
5
  export declare function shallowCompare(a: object, b: object): boolean;
6
+ export declare function shallowDiff(a: object, b: object): {
7
+ from: {
8
+ [k: string]: any;
9
+ };
10
+ to: {
11
+ [k: string]: any;
12
+ };
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alimetry-detail-edit",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.2.0",
6
6
  "@angular/core": "^15.2.0",