@rxap/forms 12.5.1-next.1 → 12.6.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/bundles/rxap-forms.umd.js +120 -9
- package/bundles/rxap-forms.umd.js.map +1 -1
- package/esm2015/index.js +1 -0
- package/esm2015/index.js.map +1 -1
- package/esm2015/lib/directives/form-submit-successful.directive.js +40 -0
- package/esm2015/lib/directives/form-submit-successful.directive.js.map +1 -0
- package/esm2015/lib/directives/form.directive.js +6 -1
- package/esm2015/lib/directives/form.directive.js.map +1 -1
- package/esm2015/lib/directives/forms.module.js +9 -4
- package/esm2015/lib/directives/forms.module.js.map +1 -1
- package/esm2015/lib/form-builder.js +65 -3
- package/esm2015/lib/form-builder.js.map +1 -1
- package/esm2015/lib/validators/is-number.js +1 -1
- package/esm2015/lib/validators/is-number.js.map +1 -1
- package/fesm2015/rxap-forms.js +116 -10
- package/fesm2015/rxap-forms.js.map +1 -1
- package/index.d.ts +1 -0
- package/lib/directives/form-submit-successful.directive.d.ts +16 -0
- package/lib/directives/form.directive.d.ts +2 -1
- package/lib/directives/forms.module.d.ts +2 -1
- package/lib/form-builder.d.ts +26 -0
- package/lib/validators/is-number.d.ts +1 -0
- package/package.json +6 -5
package/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from './lib/directives/forms.module';
|
|
|
25
25
|
export * from './lib/directives/models';
|
|
26
26
|
export * from './lib/directives/tokens';
|
|
27
27
|
export * from './lib/directives/form-control-error.directive';
|
|
28
|
+
export * from './lib/directives/form-submit-successful.directive';
|
|
28
29
|
export * from './lib/directives/form-control-mark-dirty.directive';
|
|
29
30
|
export * from './lib/directives/form-control-mark-pristine.directive';
|
|
30
31
|
export * from './lib/directives/form-control-mark-touched.directive';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TemplateRef, ViewContainerRef, OnDestroy, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { FormDirective } from './form.directive';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class FormSubmitSuccessfulDirective implements AfterViewInit, OnDestroy {
|
|
5
|
+
private readonly formDirective;
|
|
6
|
+
private readonly template;
|
|
7
|
+
private readonly viewContainerRef;
|
|
8
|
+
private subscription?;
|
|
9
|
+
constructor(formDirective: FormDirective, template: TemplateRef<{
|
|
10
|
+
$implicit: Error;
|
|
11
|
+
}>, viewContainerRef: ViewContainerRef);
|
|
12
|
+
ngAfterViewInit(): void;
|
|
13
|
+
ngOnDestroy(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormSubmitSuccessfulDirective, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FormSubmitSuccessfulDirective, "[rxapFormSubmitSuccessful]", never, {}, {}, never>;
|
|
16
|
+
}
|
|
@@ -28,6 +28,7 @@ export declare class FormDirective<T extends Record<string, any> = any> extends
|
|
|
28
28
|
*/
|
|
29
29
|
rxapSubmit: EventEmitter<any>;
|
|
30
30
|
invalidSubmit: EventEmitter<any>;
|
|
31
|
+
submitSuccessful$: EventEmitter<any>;
|
|
31
32
|
get submitting(): boolean;
|
|
32
33
|
get submitError(): Error | null;
|
|
33
34
|
get loading(): boolean;
|
|
@@ -56,5 +57,5 @@ export declare class FormDirective<T extends Record<string, any> = any> extends
|
|
|
56
57
|
protected submitSuccessful(value: any): void;
|
|
57
58
|
ngOnDestroy(): void;
|
|
58
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormDirective<any>, [null, { optional: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; }]>;
|
|
59
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FormDirective<any>, "form[rxapForm]:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]", ["rxapForm"], { "initial": "initial"; "useFormDefinition": "rxapForm"; "submitMethod": "submitMethod"; }, { "ngSubmit": "ngSubmit"; "rxapSubmit": "rxapSubmit"; "invalidSubmit": "invalidSubmit"; }, never>;
|
|
60
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FormDirective<any>, "form[rxapForm]:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]", ["rxapForm"], { "initial": "initial"; "useFormDefinition": "rxapForm"; "submitMethod": "submitMethod"; }, { "ngSubmit": "ngSubmit"; "rxapSubmit": "rxapSubmit"; "invalidSubmit": "invalidSubmit"; "submitSuccessful$": "submitSuccessful"; }, never>;
|
|
60
61
|
}
|
|
@@ -14,8 +14,9 @@ import * as i12 from "./form-submit.directive";
|
|
|
14
14
|
import * as i13 from "./form-group-name.directive";
|
|
15
15
|
import * as i14 from "./form-control-name.directive";
|
|
16
16
|
import * as i15 from "./parent-control-container.directive";
|
|
17
|
+
import * as i16 from "./form-submit-successful.directive";
|
|
17
18
|
export declare class RxapFormsModule {
|
|
18
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<RxapFormsModule, never>;
|
|
19
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<RxapFormsModule, [typeof i1.FormDirective, typeof i2.FormSubmitFailedDirective, typeof i3.FormLoadingDirective, typeof i4.FormSubmittingDirective, typeof i5.FormLoadingErrorDirective, typeof i6.FormLoadedDirective, typeof i7.FormControlErrorDirective, typeof i8.FormControlMarkDirtyDirective, typeof i9.FormControlMarkTouchedDirective, typeof i10.FormControlMarkUntouchedDirective, typeof i11.FormControlMarkPristineDirective, typeof i12.FormSubmitDirective, typeof i13.FormGroupNameDirective, typeof i14.FormControlNameDirective, typeof i15.ParentControlContainerDirective], never, [typeof i1.FormDirective, typeof i2.FormSubmitFailedDirective, typeof i3.FormLoadingDirective, typeof i4.FormSubmittingDirective, typeof i5.FormLoadingErrorDirective, typeof i6.FormLoadedDirective, typeof i7.FormControlErrorDirective, typeof i8.FormControlMarkDirtyDirective, typeof i9.FormControlMarkTouchedDirective, typeof i10.FormControlMarkUntouchedDirective, typeof i11.FormControlMarkPristineDirective, typeof i12.FormSubmitDirective, typeof i13.FormGroupNameDirective, typeof i14.FormControlNameDirective, typeof i15.ParentControlContainerDirective]>;
|
|
20
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RxapFormsModule, [typeof i1.FormDirective, typeof i2.FormSubmitFailedDirective, typeof i3.FormLoadingDirective, typeof i4.FormSubmittingDirective, typeof i5.FormLoadingErrorDirective, typeof i6.FormLoadedDirective, typeof i7.FormControlErrorDirective, typeof i8.FormControlMarkDirtyDirective, typeof i9.FormControlMarkTouchedDirective, typeof i10.FormControlMarkUntouchedDirective, typeof i11.FormControlMarkPristineDirective, typeof i12.FormSubmitDirective, typeof i13.FormGroupNameDirective, typeof i14.FormControlNameDirective, typeof i15.ParentControlContainerDirective, typeof i16.FormSubmitSuccessfulDirective], never, [typeof i1.FormDirective, typeof i2.FormSubmitFailedDirective, typeof i3.FormLoadingDirective, typeof i4.FormSubmittingDirective, typeof i5.FormLoadingErrorDirective, typeof i6.FormLoadedDirective, typeof i7.FormControlErrorDirective, typeof i8.FormControlMarkDirtyDirective, typeof i9.FormControlMarkTouchedDirective, typeof i10.FormControlMarkUntouchedDirective, typeof i11.FormControlMarkPristineDirective, typeof i12.FormSubmitDirective, typeof i13.FormGroupNameDirective, typeof i14.FormControlNameDirective, typeof i15.ParentControlContainerDirective, typeof i16.FormSubmitSuccessfulDirective]>;
|
|
20
21
|
static ɵinj: i0.ɵɵInjectorDeclaration<RxapFormsModule>;
|
|
21
22
|
}
|
package/lib/form-builder.d.ts
CHANGED
|
@@ -58,6 +58,32 @@ export declare class RxapFormBuilder<Data extends Record<string, any> = any, For
|
|
|
58
58
|
* @param optionsFormState The form state set by the decorator in the form definition
|
|
59
59
|
*/
|
|
60
60
|
private coerceToControlFormState;
|
|
61
|
+
/**
|
|
62
|
+
* Coerce to the form state for the specified controlId. If none form state is
|
|
63
|
+
* found the default form state will be returned.
|
|
64
|
+
*
|
|
65
|
+
* The difference to the method coerceToControlFormState is that null will be
|
|
66
|
+
* handled as undefined and the defaultFormState is used
|
|
67
|
+
*
|
|
68
|
+
* @param controlId A control id
|
|
69
|
+
* @param defaultFormState The default form state
|
|
70
|
+
* @param builderFormState The form state provides as build state parameter
|
|
71
|
+
* @param optionsFormState The form state set by the decorator in the form definition
|
|
72
|
+
*/
|
|
73
|
+
private coerceToGroupFormState;
|
|
74
|
+
/**
|
|
75
|
+
* Coerce to the form state for the specified controlId. If none form state is
|
|
76
|
+
* found the default form state will be returned.
|
|
77
|
+
*
|
|
78
|
+
* The difference to the method coerceToControlFormState is that null will be
|
|
79
|
+
* handled as undefined and the defaultFormState is used
|
|
80
|
+
*
|
|
81
|
+
* @param controlId A control id
|
|
82
|
+
* @param defaultFormState The default form state
|
|
83
|
+
* @param builderFormState The form state provides as build state parameter
|
|
84
|
+
* @param optionsFormState The form state set by the decorator in the form definition
|
|
85
|
+
*/
|
|
86
|
+
private coerceToArrayFormState;
|
|
61
87
|
private extractControlChanges;
|
|
62
88
|
private extractControlSetValue;
|
|
63
89
|
private extractValidators;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxap/forms",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Merzough Münker",
|
|
6
6
|
"homepage": "https://gitlab.com/rxap/packages/libs/forms",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"description": "A typed extension for @angular/forms.",
|
|
18
18
|
"license": "BSD-3-Clause",
|
|
19
19
|
"peerDependencies": {
|
|
20
|
+
"@angular-devkit/schematics": "^12.2.9",
|
|
20
21
|
"@angular/cdk": "^12.0.1",
|
|
21
22
|
"@angular/common": "^12.0.1",
|
|
22
23
|
"@angular/core": "^12.0.1",
|
|
@@ -24,14 +25,14 @@
|
|
|
24
25
|
"@angular/platform-browser": "^12.0.1",
|
|
25
26
|
"@angular/router": "^12.0.1",
|
|
26
27
|
"@rxap/definition": "^12.0.8",
|
|
27
|
-
"@rxap/directives": "^12.
|
|
28
|
-
"@rxap/services": "^12.0.
|
|
29
|
-
"@rxap/utilities": "^12.2.
|
|
28
|
+
"@rxap/directives": "^12.2.0",
|
|
29
|
+
"@rxap/services": "^12.0.8",
|
|
30
|
+
"@rxap/utilities": "^12.2.2",
|
|
30
31
|
"reflect-metadata": "^0.1.13",
|
|
31
32
|
"rxjs": "^6.5.5"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@rxap/schematics-utilities": "^12.
|
|
35
|
+
"@rxap/schematics-utilities": "^12.7.0",
|
|
35
36
|
"@rxap/validator": "^0.0.2",
|
|
36
37
|
"ts-morph": "^10.1.0",
|
|
37
38
|
"tslib": "^2.2.0",
|