chrv-components 1.10.40 → 1.10.43

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.
@@ -72,6 +72,12 @@ export declare class ChrBaseInputComponent implements OnInit, ControlValueAccess
72
72
  * Indicates whether or not this input should try catching the focus on page load
73
73
  */
74
74
  autofocus: boolean;
75
+ /**
76
+ * Indicates whether or not this input should convert the file to base64 for it to be sent as part of the object.
77
+ * If this is false, the file won't be converted and will be sent as part as the regular form process.
78
+ * Default is true to allow full JS manipulation of files et upload progress report.
79
+ */
80
+ base64: boolean;
75
81
  private _disabled;
76
82
  /**
77
83
  * Getter and setter that allow the control of the FormControl's state from the template
@@ -165,5 +171,5 @@ export declare class ChrBaseInputComponent implements OnInit, ControlValueAccess
165
171
  private buildFormControl;
166
172
  protected doCallback: () => void;
167
173
  static ɵfac: i0.ɵɵFactoryDeclaration<ChrBaseInputComponent, [{ optional: true; }]>;
168
- static ɵcmp: i0.ɵɵComponentDeclaration<ChrBaseInputComponent, "chr-base-input", never, { "label": { "alias": "label"; "required": false; }; "type": { "alias": "type"; "required": false; }; "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "span": { "alias": "span"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconCallback": { "alias": "iconCallback"; "required": false; }; "iconCallbackDisabled": { "alias": "iconCallbackDisabled"; "required": false; }; "iconTooltip": { "alias": "iconTooltip"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "debounceTime": { "alias": "debounceTime"; "required": false; }; "validations": { "alias": "validations"; "required": false; }; "standalone": { "alias": "standalone"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "siblings": { "alias": "siblings"; "required": false; }; }, { "valueChanges": "valueChanges"; }, never, never, true, never>;
174
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChrBaseInputComponent, "chr-base-input", never, { "label": { "alias": "label"; "required": false; }; "type": { "alias": "type"; "required": false; }; "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "span": { "alias": "span"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconCallback": { "alias": "iconCallback"; "required": false; }; "iconCallbackDisabled": { "alias": "iconCallbackDisabled"; "required": false; }; "iconTooltip": { "alias": "iconTooltip"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "debounceTime": { "alias": "debounceTime"; "required": false; }; "validations": { "alias": "validations"; "required": false; }; "standalone": { "alias": "standalone"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "base64": { "alias": "base64"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "siblings": { "alias": "siblings"; "required": false; }; }, { "valueChanges": "valueChanges"; }, never, never, true, never>;
169
175
  }
@@ -18,6 +18,7 @@ export declare class ChrFormComponent implements OnInit {
18
18
  validChange: EventEmitter<boolean>;
19
19
  model: any;
20
20
  modelChange: EventEmitter<any>;
21
+ formDataChange: EventEmitter<FormData>;
21
22
  disabled?: boolean;
22
23
  valuesChanges: EventEmitter<any>;
23
24
  submit?: Function;
@@ -50,6 +51,8 @@ export declare class ChrFormComponent implements OnInit {
50
51
  private initValues;
51
52
  private initControls;
52
53
  private initListeners;
54
+ private hasRegularFile;
55
+ getEncType: () => string;
53
56
  /**
54
57
  * Methods that returns the FormControl for the given input. If no FormControl is found, return null.
55
58
  * @param name input's name
@@ -118,6 +121,7 @@ export declare class ChrFormComponent implements OnInit {
118
121
  * Resets the form.
119
122
  */
120
123
  reset: () => void;
124
+ toFormData: () => FormData;
121
125
  protected get: (control: IControl) => import("@angular/forms").AbstractControl<any, any> | null;
122
126
  private setValue$;
123
127
  private setModel$;
@@ -129,5 +133,5 @@ export declare class ChrFormComponent implements OnInit {
129
133
  protected initializeControl: (control: IControl, formControl: FormControl) => void;
130
134
  alert: (s: string) => void;
131
135
  static ɵfac: i0.ɵɵFactoryDeclaration<ChrFormComponent, never>;
132
- static ɵcmp: i0.ɵɵComponentDeclaration<ChrFormComponent, "app-chr-form", never, { "sections": { "alias": "sections"; "required": false; }; "controls": { "alias": "controls"; "required": false; }; "validators": { "alias": "validators"; "required": false; }; "valid": { "alias": "valid"; "required": false; }; "model": { "alias": "model"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "submit": { "alias": "submit"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "debounceTime": { "alias": "debounceTime"; "required": false; }; "tabDisplay": { "alias": "tabDisplay"; "required": false; }; "form": { "alias": "form"; "required": false; }; }, { "validChange": "validChange"; "modelChange": "modelChange"; "valuesChanges": "valuesChanges"; "formChange": "formChange"; "valueChanges": "valueChanges"; "formChanges": "formChanges"; }, never, never, true, never>;
136
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChrFormComponent, "app-chr-form", never, { "sections": { "alias": "sections"; "required": false; }; "controls": { "alias": "controls"; "required": false; }; "validators": { "alias": "validators"; "required": false; }; "valid": { "alias": "valid"; "required": false; }; "model": { "alias": "model"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "submit": { "alias": "submit"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "debounceTime": { "alias": "debounceTime"; "required": false; }; "tabDisplay": { "alias": "tabDisplay"; "required": false; }; "form": { "alias": "form"; "required": false; }; }, { "validChange": "validChange"; "modelChange": "modelChange"; "formDataChange": "formDataChange"; "valuesChanges": "valuesChanges"; "formChange": "formChange"; "valueChanges": "valueChanges"; "formChanges": "formChanges"; }, never, never, true, never>;
133
137
  }
@@ -30,5 +30,9 @@ export interface IControl {
30
30
  removeCallback?: ((entry: any) => any | null | void) | null;
31
31
  acceptText?: boolean;
32
32
  multiple?: boolean;
33
+ /**
34
+ * Should the file be converted to base64 for sending
35
+ */
36
+ base64?: boolean;
33
37
  autofocus?: boolean;
34
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chrv-components",
3
- "version": "1.10.40",
3
+ "version": "1.10.43",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=17.3.0",
6
6
  "@angular/core": ">=17.3.0",
package/public-api.d.ts CHANGED
@@ -26,6 +26,7 @@ export * from './lib/chr-toast/chr-toast.component';
26
26
  export * from './lib/chr-default-modal/chr-default-modal.component';
27
27
  export * from './lib/directives/tab-input-only-handler.directive';
28
28
  export * from './lib/directives/tab-to-enter-handler.directive';
29
+ export * from './lib/directives/autofocus.directive';
29
30
  export * from './lib/animations/in-out.animation';
30
31
  export * from './lib/animations/rotation.animation';
31
32
  export * from './lib/services/dialog.service';
Binary file