@sumaris-net/ngx-components 18.16.4 → 18.16.5

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": "18.16.4",
4
+ "version": "18.16.5",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -23,22 +23,30 @@ export declare class FormArrayHelper<T = Entity<any>, C extends AbstractControl
23
23
  get allowDuplicatedValues(): boolean;
24
24
  set allowDuplicatedValues(value: boolean);
25
25
  get formArray(): UntypedFormArray;
26
- constructor(_formArray: UntypedFormArray, createControl: (value?: T) => C, equals: (v1: T, v2: T) => boolean, isEmpty: (value: T) => boolean, options?: FormArrayHelperOptions);
26
+ constructor(_formArray: UntypedFormArray, createControl: (value?: T, index?: number) => C, equals: (v1: T, v2: T) => boolean, isEmpty: (value: T) => boolean, options?: FormArrayHelperOptions);
27
27
  /**
28
28
  * @param value
29
- * @param options
29
+ * @param opts
30
30
  */
31
- add(value?: T, options?: {
31
+ add(value?: T, opts?: {
32
32
  emitEvent: boolean;
33
33
  insertAt?: number;
34
34
  }): boolean;
35
- removeAt(index: number): boolean;
36
- resize(length: number, options?: {
35
+ removeAt(index: number, opts?: {
36
+ emitEvent?: boolean;
37
+ onlySelf?: boolean;
38
+ }): boolean;
39
+ resize(length: number, opts?: {
40
+ emitEvent?: boolean;
41
+ }): boolean;
42
+ clearAt(index: number, opts?: {
37
43
  emitEvent?: boolean;
38
44
  }): boolean;
39
- clearAt(index: number): boolean;
40
45
  isLast(index: number): boolean;
41
- removeAllEmpty(): void;
46
+ removeAllEmpty(opts?: {
47
+ emitEvent?: boolean;
48
+ onlySelf?: boolean;
49
+ }): void;
42
50
  size(): number;
43
51
  at(index: number): C;
44
52
  /**
@@ -55,9 +63,9 @@ export declare class FormArrayHelper<T = Entity<any>, C extends AbstractControl
55
63
  * Resize the FormArray, then patch values
56
64
  *
57
65
  * @param values
58
- * @param options
66
+ * @param opts
59
67
  */
60
- patchValue(values: T[], options?: {
68
+ patchValue(values: T[], opts?: {
61
69
  onlySelf?: boolean;
62
70
  emitEvent?: boolean;
63
71
  }): void;
@@ -79,7 +87,7 @@ export declare interface AppFormArrayOptions extends AbstractControlOptions {
79
87
  allowDuplicateValue?: boolean;
80
88
  }
81
89
  export declare class AppFormArray<T = Entity<any>, C extends AbstractControl = AbstractControl> extends UntypedFormArray {
82
- createControl: (value?: T) => C;
90
+ createControl: (value?: T | undefined, index?: number) => C;
83
91
  private equals;
84
92
  private isEmpty;
85
93
  private readonly options;
@@ -89,7 +97,7 @@ export declare class AppFormArray<T = Entity<any>, C extends AbstractControl = A
89
97
  set allowManyNullValues(value: boolean);
90
98
  get allowDuplicateValue(): boolean;
91
99
  set allowDuplicateValue(value: boolean);
92
- constructor(createControl: (value?: T) => C, equals: (v1: T, v2: T) => boolean, isEmpty: (value: T) => boolean, options?: AppFormArrayOptions | undefined | null);
100
+ constructor(createControl: (value?: T | undefined, index?: number) => C, equals: (v1: T, v2: T) => boolean, isEmpty: (value: T) => boolean, options?: AppFormArrayOptions | undefined | null);
93
101
  /**
94
102
  * WIll rebuild the array, using the given values
95
103
  *
@@ -118,17 +126,19 @@ export declare class AppFormArray<T = Entity<any>, C extends AbstractControl = A
118
126
  forEach(ite: (control: C) => void): void;
119
127
  /**
120
128
  * @param value
121
- * @param options
129
+ * @param opts
122
130
  */
123
- add(value?: T, options?: {
131
+ add(value?: T, opts?: {
124
132
  emitEvent: boolean;
125
133
  insertAt?: number;
126
134
  }): void;
127
- removeAt(index: number, options?: {
135
+ removeAt(index: number, opts?: {
128
136
  emitEvent: boolean;
137
+ onlySelf?: boolean;
129
138
  }): boolean;
130
- clearAt(index: number, options?: {
139
+ clearAt(index: number, opts?: {
131
140
  emitEvent: boolean;
141
+ onlySelf?: boolean;
132
142
  }): void;
133
143
  isLast(index: number): boolean;
134
144
  removeAllEmpty(): void;
@@ -12,8 +12,8 @@ export interface FormErrors {
12
12
  * @param opts
13
13
  */
14
14
  export declare function copyEntity2Form(entity: any, target: UntypedFormGroup, opts?: {
15
- emitEvent?: boolean;
16
15
  onlySelf?: boolean;
16
+ emitEvent?: boolean;
17
17
  }): void;
18
18
  export declare function getFormValueFromEntity(entity: any | undefined, form: UntypedFormGroup): {
19
19
  [key: string]: any;
@@ -100,8 +100,9 @@ export declare function setControlEnabled(control: AbstractControl, enabled: boo
100
100
  emitEvent?: boolean;
101
101
  required?: boolean;
102
102
  }): void;
103
- export declare function addValueInArray(arrayControl: UntypedFormArray, createControl: (value?: any) => AbstractControl, equals: (v1: any, v2: any) => boolean, isEmpty: (value: any) => boolean, value: any, options?: {
104
- emitEvent: boolean;
103
+ export declare function addValueInArray(arrayControl: UntypedFormArray, createControl: (value: any | undefined, index: number) => AbstractControl, equals: (v1: any, v2: any) => boolean, isEmpty: (value: any) => boolean, value: any, opts?: {
104
+ onlySelf?: boolean;
105
+ emitEvent?: boolean;
105
106
  insertAt?: number;
106
107
  allowManyNullValues?: boolean;
107
108
  allowDuplicateValue?: boolean;
@@ -112,16 +113,21 @@ export declare function addValueInArray(arrayControl: UntypedFormArray, createCo
112
113
  * @param arrayControl
113
114
  * @param createControl
114
115
  * @param defaultValues
115
- * @param options
116
+ * @param opts
116
117
  */
117
- export declare function initArrayControlsFromValues(arrayControl: UntypedFormArray, createControl: (value?: any) => AbstractControl, defaultValues: any[], options?: {
118
+ export declare function initArrayControlsFromValues(arrayControl: UntypedFormArray, createControl: (value?: any, index?: number) => AbstractControl, defaultValues: any[], opts?: {
118
119
  emitEvent?: boolean;
119
120
  }): boolean;
120
- export declare function resizeArray(arrayControl: UntypedFormArray, createControl: () => AbstractControl, length: number, options?: {
121
+ export declare function resizeArray(arrayControl: UntypedFormArray, createControl: (value?: any | undefined, index?: number) => AbstractControl, length: number, opts?: {
122
+ emitEvent?: boolean;
123
+ }): boolean;
124
+ export declare function removeValueInArray(arrayControl: UntypedFormArray, index: number, opts?: {
125
+ emitEvent?: boolean;
126
+ }): boolean;
127
+ export declare function clearValueInArray(arrayControl: UntypedFormArray, isEmpty: (value: any) => boolean, index: number, opts?: {
128
+ onlySelf?: boolean;
121
129
  emitEvent?: boolean;
122
130
  }): boolean;
123
- export declare function removeValueInArray(arrayControl: UntypedFormArray, isEmpty: (value: any) => boolean, index: number): boolean;
124
- export declare function clearValueInArray(arrayControl: UntypedFormArray, isEmpty: (value: any) => boolean, index: number): boolean;
125
131
  export declare function markAllAsTouched(control: AbstractControl, opts?: {
126
132
  onlySelf?: boolean;
127
133
  emitEvent?: boolean;
@@ -2,7 +2,7 @@
2
2
  "name": "ngx-sumaris-components",
3
3
  "short_name": "ngx-sumaris-components",
4
4
  "manifest_version": 1,
5
- "version": "18.16.4",
5
+ "version": "18.16.5",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{