@messaia/cdk 13.0.0-rc05 → 13.0.2
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/esm2020/lib/base/components/generic-form-base.component.mjs +23 -17
- package/esm2020/lib/base/components/generic-form.component.mjs +6 -1
- package/esm2020/lib/base/components/generic-reactive-form.component.mjs +9 -1
- package/fesm2015/messaia-cdk.mjs +35 -16
- package/fesm2015/messaia-cdk.mjs.map +1 -1
- package/fesm2020/messaia-cdk.mjs +35 -16
- package/fesm2020/messaia-cdk.mjs.map +1 -1
- package/lib/base/components/generic-form-base.component.d.ts +11 -2
- package/lib/base/components/generic-form.component.d.ts +9 -0
- package/lib/base/components/generic-reactive-form.component.d.ts +10 -0
- package/package.json +1 -1
|
@@ -136,7 +136,7 @@ export declare abstract class GenericFormBaseComponent<TEntity extends IEntity,
|
|
|
136
136
|
/**
|
|
137
137
|
* Gets form value
|
|
138
138
|
*/
|
|
139
|
-
get formValue(): TEntity | any;
|
|
139
|
+
abstract get formValue(): TEntity | any;
|
|
140
140
|
/**
|
|
141
141
|
* panelId: string
|
|
142
142
|
*/
|
|
@@ -203,6 +203,11 @@ export declare abstract class GenericFormBaseComponent<TEntity extends IEntity,
|
|
|
203
203
|
* @param control
|
|
204
204
|
*/
|
|
205
205
|
protected invalidateControl(control: AbstractControl): void;
|
|
206
|
+
/**
|
|
207
|
+
* Shows form errors
|
|
208
|
+
* @param form
|
|
209
|
+
*/
|
|
210
|
+
protected debugForm(form?: NgForm | FormGroup): void;
|
|
206
211
|
/**
|
|
207
212
|
* Loads the previous URL in the history list.
|
|
208
213
|
* @param action
|
|
@@ -214,10 +219,14 @@ export declare abstract class GenericFormBaseComponent<TEntity extends IEntity,
|
|
|
214
219
|
protected newInstance(): TEntity;
|
|
215
220
|
/**
|
|
216
221
|
* Creates the entity
|
|
222
|
+
* @param httpOptions
|
|
223
|
+
* @returns
|
|
217
224
|
*/
|
|
218
225
|
protected create<TEntity>(httpOptions?: Object): Observable<TEntity>;
|
|
219
226
|
/**
|
|
220
|
-
*
|
|
227
|
+
* Updates the entity
|
|
228
|
+
* @param httpOptions
|
|
229
|
+
* @returns
|
|
221
230
|
*/
|
|
222
231
|
protected update(httpOptions?: Object): Observable<TEntity>;
|
|
223
232
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { NgForm } from '@angular/forms';
|
|
2
3
|
import { ActivatedRoute } from '@angular/router';
|
|
3
4
|
import { IEntity } from '../../common/models/entity';
|
|
4
5
|
import { GenericService } from '../../http/services/generic.service';
|
|
@@ -11,6 +12,14 @@ export declare abstract class GenericFormComponent<TEntity extends IEntity, TSer
|
|
|
11
12
|
protected service: TService;
|
|
12
13
|
protected route: ActivatedRoute;
|
|
13
14
|
protected changeDetectorRef: ChangeDetectorRef;
|
|
15
|
+
/**
|
|
16
|
+
* Form group
|
|
17
|
+
*/
|
|
18
|
+
form: NgForm;
|
|
19
|
+
/**
|
|
20
|
+
* Gets form value
|
|
21
|
+
*/
|
|
22
|
+
get formValue(): TEntity | any;
|
|
14
23
|
/**
|
|
15
24
|
* Constructor
|
|
16
25
|
* @param service
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef, Type } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
2
3
|
import { ActivatedRoute } from '@angular/router';
|
|
3
4
|
import { IEntity } from '../../common/common.module';
|
|
4
5
|
import { FormBuilderConfiguration } from '../../form-validators/models';
|
|
@@ -11,6 +12,10 @@ export declare abstract class GenericReactiveFormComponent<TEntity extends IEnti
|
|
|
11
12
|
protected service: TService;
|
|
12
13
|
protected route: ActivatedRoute;
|
|
13
14
|
protected changeDetectorRef: ChangeDetectorRef;
|
|
15
|
+
/**
|
|
16
|
+
* Form group
|
|
17
|
+
*/
|
|
18
|
+
form: FormGroup;
|
|
14
19
|
/**
|
|
15
20
|
* Form builder
|
|
16
21
|
*/
|
|
@@ -32,6 +37,11 @@ export declare abstract class GenericReactiveFormComponent<TEntity extends IEnti
|
|
|
32
37
|
* Builds a new form
|
|
33
38
|
*/
|
|
34
39
|
protected buildForm(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Shows form errors
|
|
42
|
+
* @param form
|
|
43
|
+
*/
|
|
44
|
+
protected debugForm(form?: FormGroup): void;
|
|
35
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<GenericReactiveFormComponent<any, any>, never>;
|
|
36
46
|
static ɵdir: i0.ɵɵDirectiveDeclaration<GenericReactiveFormComponent<any, any>, never, never, {}, {}, never>;
|
|
37
47
|
}
|