@tft/crispr-forms 13.0.3 → 13.0.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.
@@ -33,9 +33,15 @@ export declare class ImageUploadFieldComponent extends ImageUploadFieldMixin imp
33
33
  private cdr;
34
34
  onChange: () => void;
35
35
  defaultConfig: Partial<ImageUploadFieldConfig>;
36
- progress: number | undefined;
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
+ */
37
39
  private inputImageFileSubject;
38
- inputImageFile$: Observable<string | File>;
40
+ inputImageFile$: Observable<File>;
41
+ /**
42
+ * the compression progress
43
+ */
44
+ progress: number | undefined;
39
45
  compressedFile$: Observable<File>;
40
46
  compressedImageUrlString$: Observable<string | null>;
41
47
  imageSrcUrl$: Observable<string | null>;
@@ -16,6 +16,12 @@ export declare type ImageUploadFieldConfig = CrisprControlConfig & MatFieldPrope
16
16
  clearFilesButtonText?: string;
17
17
  resetFilesButtonText?: string;
18
18
  dropZoneText?: string;
19
+ /**
20
+ * If the input value of the control is not a string of the src
21
+ * url to the image, this function allows consumers to map their
22
+ * input value into one
23
+ */
24
+ mapInputValueToUrl?: (inputValue: unknown) => string;
19
25
  /**
20
26
  * Should the field compress the image after loading it
21
27
  * @default false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tft/crispr-forms",
3
- "version": "13.0.3",
3
+ "version": "13.0.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.0.0",
6
6
  "@angular/forms": "^13.0.0",
Binary file
Binary file