@sumaris-net/ngx-components 1.23.38 → 1.23.40

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "1.23.38",
4
+ "version": "1.23.40",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -217,13 +217,12 @@ export declare class FormArrayHelper<T = Entity<any>, C extends AbstractControl
217
217
  size(): number;
218
218
  at(index: number): C;
219
219
  /**
220
- * Resize the FormArray, then patch values
221
- * @param data
220
+ * Patch a FormArray, using default values
221
+ * @param values default values to apply.
222
222
  * @param opts
223
+ * @return true if form arry has been changed
223
224
  */
224
- patchValue(values: T[], opts?: {
225
- emitEvent?: boolean;
226
- }): void;
225
+ patchValue(values: T[]): boolean;
227
226
  disable(opts?: {
228
227
  onlySelf?: boolean;
229
228
  emitEvent?: boolean;
@@ -39,6 +39,13 @@ export declare function disableControls(form: FormGroup, paths: string[], opts?:
39
39
  export declare function pushValueInArray(arrayControl: FormArray, createControl: (value?: any) => AbstractControl, equals: (v1: any, v2: any) => boolean, isEmpty: (value: any) => boolean, value: any, options?: {
40
40
  emitEvent: boolean;
41
41
  }): boolean;
42
+ /**
43
+ * Patch an array using given default values. Each default value will be pass to the 'createControl()' function
44
+ * @param arrayControl
45
+ * @param createControl
46
+ * @param values
47
+ */
48
+ export declare function patchValueInArray(arrayControl: FormArray, createControl: (value?: any) => AbstractControl, defaultValues: any[]): boolean;
42
49
  export declare function resizeArray(arrayControl: FormArray, createControl: () => AbstractControl, length: number): boolean;
43
50
  export declare function removeValueInArray(arrayControl: FormArray, isEmpty: (value: any) => boolean, index: number): boolean;
44
51
  export declare function clearValueInArray(arrayControl: FormArray, isEmpty: (value: any) => boolean, index: number): boolean;