@messaia/cdk 13.0.0-rc03 → 13.0.0
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 +10 -7
- package/esm2020/lib/base/components/generic-form.component.mjs +6 -1
- package/esm2020/lib/base/components/generic-reactive-form.component.mjs +1 -1
- package/fesm2015/messaia-cdk.mjs +14 -6
- package/fesm2015/messaia-cdk.mjs.map +1 -1
- package/fesm2020/messaia-cdk.mjs +14 -6
- package/fesm2020/messaia-cdk.mjs.map +1 -1
- package/lib/base/components/generic-form-base.component.d.ts +8 -4
- package/lib/base/components/generic-form.component.d.ts +9 -0
- package/lib/base/components/generic-reactive-form.component.d.ts +5 -0
- package/package.json +1 -1
|
@@ -132,11 +132,11 @@ export declare abstract class GenericFormBaseComponent<TEntity extends IEntity,
|
|
|
132
132
|
/**
|
|
133
133
|
* Form group
|
|
134
134
|
*/
|
|
135
|
-
form: FormGroup;
|
|
135
|
+
form: NgForm | FormGroup;
|
|
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
|
*/
|
|
@@ -181,7 +181,7 @@ export declare abstract class GenericFormBaseComponent<TEntity extends IEntity,
|
|
|
181
181
|
/**
|
|
182
182
|
* Builds a new form
|
|
183
183
|
*/
|
|
184
|
-
protected
|
|
184
|
+
protected buildForm(): void;
|
|
185
185
|
/**
|
|
186
186
|
* Validates the form
|
|
187
187
|
* @param form
|
|
@@ -214,10 +214,14 @@ export declare abstract class GenericFormBaseComponent<TEntity extends IEntity,
|
|
|
214
214
|
protected newInstance(): TEntity;
|
|
215
215
|
/**
|
|
216
216
|
* Creates the entity
|
|
217
|
+
* @param httpOptions
|
|
218
|
+
* @returns
|
|
217
219
|
*/
|
|
218
220
|
protected create<TEntity>(httpOptions?: Object): Observable<TEntity>;
|
|
219
221
|
/**
|
|
220
|
-
*
|
|
222
|
+
* Updates the entity
|
|
223
|
+
* @param httpOptions
|
|
224
|
+
* @returns
|
|
221
225
|
*/
|
|
222
226
|
protected update(httpOptions?: Object): Observable<TEntity>;
|
|
223
227
|
/**
|
|
@@ -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
|
*/
|