@tft/crispr-forms 13.0.16 → 13.0.19

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,12 +1,13 @@
1
- import { ViewContainerRef, Renderer2, OnInit } from '@angular/core';
1
+ import { ViewContainerRef, Renderer2, OnInit, ChangeDetectorRef } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
- import type { AnyFieldConfig, ControlValue } from './models';
3
+ import { AnyFieldConfig, ControlValue } from './models';
4
4
  import { CrisprFieldComponent } from './field-component-map.const';
5
5
  import * as i0 from "@angular/core";
6
6
  import * as i1 from "@angular/common";
7
7
  export declare class CrisprFieldDirective implements OnInit {
8
8
  private container;
9
9
  private renderer;
10
+ private cdr;
10
11
  config: AnyFieldConfig;
11
12
  group: FormGroup;
12
13
  /**
@@ -16,7 +17,7 @@ export declare class CrisprFieldDirective implements OnInit {
16
17
  set value(value: ControlValue | any[]);
17
18
  get value(): ControlValue | any[];
18
19
  component: CrisprFieldComponent;
19
- constructor(container: ViewContainerRef, renderer: Renderer2);
20
+ constructor(container: ViewContainerRef, renderer: Renderer2, cdr: ChangeDetectorRef);
20
21
  ngOnInit(): Promise<void>;
21
22
  updateComponentValue(value: ControlValue | any[]): void;
22
23
  static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFieldDirective, never>;
@@ -20,9 +20,16 @@ export declare class FormGroupListComponent extends FormGroupListMixin implement
20
20
  defaultConfig: Partial<FormGroupListConfig>;
21
21
  group: FormGroup;
22
22
  control: FormArray;
23
+ /**
24
+ * By setting this to true when adding/removing items from array,
25
+ * we can block original values from overwriting form values
26
+ * */
27
+ blockValue: boolean;
23
28
  constructor(cdr: ChangeDetectorRef);
24
29
  ngOnInit(): void;
25
30
  setControlValue(values: any[]): void;
31
+ clickDelete(index: number): void;
32
+ clickAdd(): void;
26
33
  addGroup(value?: any): void;
27
34
  deleteGroup(index: number): void;
28
35
  static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupListComponent, never>;
@@ -33,9 +33,6 @@ export declare class ImageUploadFieldComponent extends ImageUploadFieldMixin imp
33
33
  private cdr;
34
34
  onChange: () => void;
35
35
  defaultConfig: Partial<ImageUploadFieldConfig>;
36
- /**
37
- * The url mapped from initial input value, consumers can us mapInputValueToUrl in config to transform their input value into a src url for the image element
38
- */
39
36
  private inputImageFileSubject;
40
37
  inputImageFile$: Observable<File>;
41
38
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tft/crispr-forms",
3
- "version": "13.0.16",
3
+ "version": "13.0.19",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.0.0",
6
6
  "@angular/forms": "^13.0.0",
Binary file
Binary file