@rxap/forms 12.6.1 → 12.7.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 +46 -2
- 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-invalid.directive.js +40 -0
- package/esm2015/lib/directives/form-submit-invalid.directive.js.map +1 -0
- package/esm2015/lib/directives/forms.module.js +7 -2
- package/esm2015/lib/directives/forms.module.js.map +1 -1
- package/fesm2015/rxap-forms.js +42 -3
- package/fesm2015/rxap-forms.js.map +1 -1
- package/index.d.ts +1 -0
- package/lib/directives/form-submit-invalid.directive.d.ts +16 -0
- package/lib/directives/forms.module.d.ts +2 -1
- package/package.json +1 -1
package/esm2015/index.js
CHANGED
|
@@ -29,6 +29,7 @@ export * from './lib/directives/models';
|
|
|
29
29
|
export * from './lib/directives/tokens';
|
|
30
30
|
export * from './lib/directives/form-control-error.directive';
|
|
31
31
|
export * from './lib/directives/form-submit-successful.directive';
|
|
32
|
+
export * from './lib/directives/form-submit-invalid.directive';
|
|
32
33
|
export * from './lib/directives/form-control-mark-dirty.directive';
|
|
33
34
|
export * from './lib/directives/form-control-mark-pristine.directive';
|
|
34
35
|
export * from './lib/directives/form-control-mark-touched.directive';
|
package/esm2015/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/forms/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AAEtC,oBAAoB;AAEpB,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AAEtC,YAAY;AAEZ,oBAAoB;AAEpB,cAAc,iCAAiC,CAAC;AAChD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,uDAAuD,CAAC;AACtE,cAAc,sDAAsD,CAAC;AACrE,cAAc,wDAAwD,CAAC;AACvE,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qDAAqD,CAAC;AAEpE,YAAY;AAEZ,oBAAoB;AAEpB,cAAc,wBAAwB,CAAC;AAEvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAE3C,YAAY","sourcesContent":["export * from './lib/form-array';\nexport * from './lib/form-builder';\nexport * from './lib/form-control';\nexport * from './lib/form-group';\nexport * from './lib/model';\nexport * from './lib/types';\nexport * from './lib/control-value-accessor';\nexport * from './lib/tokens';\nexport * from './lib/control-actions';\n\n// region decorators\n\nexport * from './lib/decorators/control-async-validator';\nexport * from './lib/decorators/control-change';\nexport * from './lib/decorators/control-set-value';\nexport * from './lib/decorators/control-validator';\nexport * from './lib/decorators/use-form-array';\nexport * from './lib/decorators/use-form-control';\nexport * from './lib/decorators/use-form-group';\nexport * from './lib/decorators/form';\n\n// endregion\n\n// region directives\n\nexport * from './lib/directives/form.directive';\nexport * from './lib/directives/form-submit-failed.directive';\nexport * from './lib/directives/form-loading.directive';\nexport * from './lib/directives/form-submitting.directive';\nexport * from './lib/directives/form-loaded.directive';\nexport * from './lib/directives/form-loading-error.directive';\nexport * from './lib/directives/forms.module';\nexport * from './lib/directives/models';\nexport * from './lib/directives/tokens';\nexport * from './lib/directives/form-control-error.directive';\nexport * from './lib/directives/form-submit-successful.directive';\nexport * from './lib/directives/form-control-mark-dirty.directive';\nexport * from './lib/directives/form-control-mark-pristine.directive';\nexport * from './lib/directives/form-control-mark-touched.directive';\nexport * from './lib/directives/form-control-mark-untouched.directive';\nexport * from './lib/directives/form-submit.directive';\nexport * from './lib/directives/form-control-name.directive';\nexport * from './lib/directives/form-group-name.directive';\nexport * from './lib/directives/parent-control-container.directive';\n\n// endregion\n\n// region validators\n\nexport * from './lib/validators/index';\n\nexport * from './lib/validators/is-array';\nexport * from './lib/validators/is-boolean';\nexport * from './lib/validators/is-date';\nexport * from './lib/validators/is-enum';\nexport * from './lib/validators/is-int';\nexport * from './lib/validators/is-number';\nexport * from './lib/validators/is-object';\nexport * from './lib/validators/is-string';\n\n// endregion\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/forms/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AAEtC,oBAAoB;AAEpB,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AAEtC,YAAY;AAEZ,oBAAoB;AAEpB,cAAc,iCAAiC,CAAC;AAChD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mDAAmD,CAAC;AAClE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,oDAAoD,CAAC;AACnE,cAAc,uDAAuD,CAAC;AACtE,cAAc,sDAAsD,CAAC;AACrE,cAAc,wDAAwD,CAAC;AACvE,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qDAAqD,CAAC;AAEpE,YAAY;AAEZ,oBAAoB;AAEpB,cAAc,wBAAwB,CAAC;AAEvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAE3C,YAAY","sourcesContent":["export * from './lib/form-array';\nexport * from './lib/form-builder';\nexport * from './lib/form-control';\nexport * from './lib/form-group';\nexport * from './lib/model';\nexport * from './lib/types';\nexport * from './lib/control-value-accessor';\nexport * from './lib/tokens';\nexport * from './lib/control-actions';\n\n// region decorators\n\nexport * from './lib/decorators/control-async-validator';\nexport * from './lib/decorators/control-change';\nexport * from './lib/decorators/control-set-value';\nexport * from './lib/decorators/control-validator';\nexport * from './lib/decorators/use-form-array';\nexport * from './lib/decorators/use-form-control';\nexport * from './lib/decorators/use-form-group';\nexport * from './lib/decorators/form';\n\n// endregion\n\n// region directives\n\nexport * from './lib/directives/form.directive';\nexport * from './lib/directives/form-submit-failed.directive';\nexport * from './lib/directives/form-loading.directive';\nexport * from './lib/directives/form-submitting.directive';\nexport * from './lib/directives/form-loaded.directive';\nexport * from './lib/directives/form-loading-error.directive';\nexport * from './lib/directives/forms.module';\nexport * from './lib/directives/models';\nexport * from './lib/directives/tokens';\nexport * from './lib/directives/form-control-error.directive';\nexport * from './lib/directives/form-submit-successful.directive';\nexport * from './lib/directives/form-submit-invalid.directive';\nexport * from './lib/directives/form-control-mark-dirty.directive';\nexport * from './lib/directives/form-control-mark-pristine.directive';\nexport * from './lib/directives/form-control-mark-touched.directive';\nexport * from './lib/directives/form-control-mark-untouched.directive';\nexport * from './lib/directives/form-submit.directive';\nexport * from './lib/directives/form-control-name.directive';\nexport * from './lib/directives/form-group-name.directive';\nexport * from './lib/directives/parent-control-container.directive';\n\n// endregion\n\n// region validators\n\nexport * from './lib/validators/index';\n\nexport * from './lib/validators/is-array';\nexport * from './lib/validators/is-boolean';\nexport * from './lib/validators/is-date';\nexport * from './lib/validators/is-enum';\nexport * from './lib/validators/is-int';\nexport * from './lib/validators/is-number';\nexport * from './lib/validators/is-object';\nexport * from './lib/validators/is-string';\n\n// endregion\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Directive, Inject, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { FormDirective } from './form.directive';
|
|
3
|
+
import { tap } from 'rxjs/operators';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "./form.directive";
|
|
6
|
+
export class FormSubmitInvalidDirective {
|
|
7
|
+
constructor(formDirective, template, viewContainerRef) {
|
|
8
|
+
this.formDirective = formDirective;
|
|
9
|
+
this.template = template;
|
|
10
|
+
this.viewContainerRef = viewContainerRef;
|
|
11
|
+
}
|
|
12
|
+
ngAfterViewInit() {
|
|
13
|
+
this.subscription = this.formDirective.invalidSubmit.pipe(tap(result => {
|
|
14
|
+
this.viewContainerRef.clear();
|
|
15
|
+
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
|
|
16
|
+
})).subscribe();
|
|
17
|
+
}
|
|
18
|
+
ngOnDestroy() {
|
|
19
|
+
var _a;
|
|
20
|
+
(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
FormSubmitInvalidDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormSubmitInvalidDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
24
|
+
FormSubmitInvalidDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: FormSubmitInvalidDirective, selector: "[rxapFormSubmitInvalid]", ngImport: i0 });
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormSubmitInvalidDirective, decorators: [{
|
|
26
|
+
type: Directive,
|
|
27
|
+
args: [{
|
|
28
|
+
selector: '[rxapFormSubmitInvalid]'
|
|
29
|
+
}]
|
|
30
|
+
}], ctorParameters: function () { return [{ type: i1.FormDirective, decorators: [{
|
|
31
|
+
type: Inject,
|
|
32
|
+
args: [FormDirective]
|
|
33
|
+
}] }, { type: i0.TemplateRef, decorators: [{
|
|
34
|
+
type: Inject,
|
|
35
|
+
args: [TemplateRef]
|
|
36
|
+
}] }, { type: i0.ViewContainerRef, decorators: [{
|
|
37
|
+
type: Inject,
|
|
38
|
+
args: [ViewContainerRef]
|
|
39
|
+
}] }]; } });
|
|
40
|
+
//# sourceMappingURL=form-submit-invalid.directive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-submit-invalid.directive.js","sourceRoot":"","sources":["../../../../../../libs/forms/src/lib/directives/form-submit-invalid.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EACN,WAAW,EACX,gBAAgB,EAGjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;;;AAKrC,MAAM,OAAO,0BAA0B;IAIrC,YAC0C,aAA4B,EAC9B,QAAyC,EACpC,gBAAkC;QAFrC,kBAAa,GAAb,aAAa,CAAe;QAC9B,aAAQ,GAAR,QAAQ,CAAiC;QACpC,qBAAgB,GAAhB,gBAAgB,CAAkB;IAC5E,CAAC;IAEG,eAAe;QACpB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,CACvD,GAAG,CAAC,MAAM,CAAC,EAAE;YACX,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;YAC9B,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;QACjF,CAAC,CAAC,CACH,CAAC,SAAS,EAAE,CAAC;IAChB,CAAC;IAEM,WAAW;;QAChB,MAAA,IAAI,CAAC,YAAY,0CAAE,WAAW,EAAE,CAAC;IACnC,CAAC;;uHArBU,0BAA0B,kBAK3B,aAAa,aACb,WAAW,aACX,gBAAgB;2GAPf,0BAA0B;2FAA1B,0BAA0B;kBAHtC,SAAS;mBAAC;oBACT,QAAQ,EAAE,yBAAyB;iBACpC;;0BAMI,MAAM;2BAAC,aAAa;;0BACpB,MAAM;2BAAC,WAAW;;0BAClB,MAAM;2BAAC,gBAAgB","sourcesContent":["import {\n Directive,\n Inject,\n TemplateRef,\n ViewContainerRef,\n OnDestroy,\n AfterViewInit\n} from '@angular/core';\nimport { FormDirective } from './form.directive';\nimport { Subscription } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\n@Directive({\n selector: '[rxapFormSubmitInvalid]'\n})\nexport class FormSubmitInvalidDirective implements AfterViewInit, OnDestroy {\n\n private subscription?: Subscription;\n\n constructor(\n @Inject(FormDirective) private readonly formDirective: FormDirective,\n @Inject(TemplateRef) private readonly template: TemplateRef<{ $implicit: any }>,\n @Inject(ViewContainerRef) private readonly viewContainerRef: ViewContainerRef\n ) {}\n\n public ngAfterViewInit() {\n this.subscription = this.formDirective.invalidSubmit.pipe(\n tap(result => {\n this.viewContainerRef.clear();\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });\n })\n ).subscribe();\n }\n\n public ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n\n}\n"]}
|
|
@@ -15,6 +15,7 @@ import { FormGroupNameDirective } from './form-group-name.directive';
|
|
|
15
15
|
import { FormControlNameDirective } from './form-control-name.directive';
|
|
16
16
|
import { ParentControlContainerDirective } from './parent-control-container.directive';
|
|
17
17
|
import { FormSubmitSuccessfulDirective } from './form-submit-successful.directive';
|
|
18
|
+
import { FormSubmitInvalidDirective } from './form-submit-invalid.directive';
|
|
18
19
|
import * as i0 from "@angular/core";
|
|
19
20
|
export class RxapFormsModule {
|
|
20
21
|
}
|
|
@@ -34,7 +35,8 @@ RxapFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
|
|
|
34
35
|
FormGroupNameDirective,
|
|
35
36
|
FormControlNameDirective,
|
|
36
37
|
ParentControlContainerDirective,
|
|
37
|
-
FormSubmitSuccessfulDirective
|
|
38
|
+
FormSubmitSuccessfulDirective,
|
|
39
|
+
FormSubmitInvalidDirective], exports: [FormDirective,
|
|
38
40
|
FormSubmitFailedDirective,
|
|
39
41
|
FormLoadingDirective,
|
|
40
42
|
FormSubmittingDirective,
|
|
@@ -49,7 +51,8 @@ RxapFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
|
|
|
49
51
|
FormGroupNameDirective,
|
|
50
52
|
FormControlNameDirective,
|
|
51
53
|
ParentControlContainerDirective,
|
|
52
|
-
FormSubmitSuccessfulDirective
|
|
54
|
+
FormSubmitSuccessfulDirective,
|
|
55
|
+
FormSubmitInvalidDirective] });
|
|
53
56
|
RxapFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapFormsModule });
|
|
54
57
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapFormsModule, decorators: [{
|
|
55
58
|
type: NgModule,
|
|
@@ -71,6 +74,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
71
74
|
FormControlNameDirective,
|
|
72
75
|
ParentControlContainerDirective,
|
|
73
76
|
FormSubmitSuccessfulDirective,
|
|
77
|
+
FormSubmitInvalidDirective,
|
|
74
78
|
],
|
|
75
79
|
exports: [
|
|
76
80
|
FormDirective,
|
|
@@ -89,6 +93,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
89
93
|
FormControlNameDirective,
|
|
90
94
|
ParentControlContainerDirective,
|
|
91
95
|
FormSubmitSuccessfulDirective,
|
|
96
|
+
FormSubmitInvalidDirective,
|
|
92
97
|
]
|
|
93
98
|
}]
|
|
94
99
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms.module.js","sourceRoot":"","sources":["../../../../../../libs/forms/src/lib/directives/forms.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC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,YAAY,EAAE;wBACZ,aAAa;wBACb,yBAAyB;wBACzB,oBAAoB;wBACpB,uBAAuB;wBACvB,yBAAyB;wBACzB,mBAAmB;wBACnB,yBAAyB;wBACzB,6BAA6B;wBAC7B,+BAA+B;wBAC/B,iCAAiC;wBACjC,gCAAgC;wBAChC,mBAAmB;wBACnB,sBAAsB;wBACtB,wBAAwB;wBACxB,+BAA+B;wBAC/B,6BAA6B;wBAC7B,0BAA0B;qBAC3B;oBACD,OAAO,EAAO;wBACZ,aAAa;wBACb,yBAAyB;wBACzB,oBAAoB;wBACpB,uBAAuB;wBACvB,yBAAyB;wBACzB,mBAAmB;wBACnB,yBAAyB;wBACzB,6BAA6B;wBAC7B,+BAA+B;wBAC/B,iCAAiC;wBACjC,gCAAgC;wBAChC,mBAAmB;wBACnB,sBAAsB;wBACtB,wBAAwB;wBACxB,+BAA+B;wBAC/B,6BAA6B;wBAC7B,0BAA0B;qBAC3B;iBACF","sourcesContent":["import { NgModule } from '@angular/core';\nimport { FormDirective } from './form.directive';\nimport { FormSubmitFailedDirective } from './form-submit-failed.directive';\nimport { FormLoadingDirective } from './form-loading.directive';\nimport { FormSubmittingDirective } from './form-submitting.directive';\nimport { FormLoadingErrorDirective } from './form-loading-error.directive';\nimport { FormLoadedDirective } from './form-loaded.directive';\nimport { FormControlErrorDirective } from './form-control-error.directive';\nimport { FormControlMarkDirtyDirective } from './form-control-mark-dirty.directive';\nimport { FormControlMarkTouchedDirective } from './form-control-mark-touched.directive';\nimport { FormControlMarkUntouchedDirective } from './form-control-mark-untouched.directive';\nimport { FormControlMarkPristineDirective } from './form-control-mark-pristine.directive';\nimport { FormSubmitDirective } from './form-submit.directive';\nimport { FormGroupNameDirective } from './form-group-name.directive';\nimport { FormControlNameDirective } from './form-control-name.directive';\nimport { ParentControlContainerDirective } from './parent-control-container.directive';\nimport { FormSubmitSuccessfulDirective } from './form-submit-successful.directive';\nimport { FormSubmitInvalidDirective } from './form-submit-invalid.directive';\n\n\n@NgModule({\n declarations: [\n FormDirective,\n FormSubmitFailedDirective,\n FormLoadingDirective,\n FormSubmittingDirective,\n FormLoadingErrorDirective,\n FormLoadedDirective,\n FormControlErrorDirective,\n FormControlMarkDirtyDirective,\n FormControlMarkTouchedDirective,\n FormControlMarkUntouchedDirective,\n FormControlMarkPristineDirective,\n FormSubmitDirective,\n FormGroupNameDirective,\n FormControlNameDirective,\n ParentControlContainerDirective,\n FormSubmitSuccessfulDirective,\n FormSubmitInvalidDirective,\n ],\n exports: [\n FormDirective,\n FormSubmitFailedDirective,\n FormLoadingDirective,\n FormSubmittingDirective,\n FormLoadingErrorDirective,\n FormLoadedDirective,\n FormControlErrorDirective,\n FormControlMarkDirtyDirective,\n FormControlMarkTouchedDirective,\n FormControlMarkUntouchedDirective,\n FormControlMarkPristineDirective,\n FormSubmitDirective,\n FormGroupNameDirective,\n FormControlNameDirective,\n ParentControlContainerDirective,\n FormSubmitSuccessfulDirective,\n FormSubmitInvalidDirective,\n ]\n})\nexport class RxapFormsModule {}\n"]}
|
package/fesm2015/rxap-forms.js
CHANGED
|
@@ -2169,6 +2169,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
2169
2169
|
args: [ViewContainerRef]
|
|
2170
2170
|
}] }]; } });
|
|
2171
2171
|
|
|
2172
|
+
class FormSubmitInvalidDirective {
|
|
2173
|
+
constructor(formDirective, template, viewContainerRef) {
|
|
2174
|
+
this.formDirective = formDirective;
|
|
2175
|
+
this.template = template;
|
|
2176
|
+
this.viewContainerRef = viewContainerRef;
|
|
2177
|
+
}
|
|
2178
|
+
ngAfterViewInit() {
|
|
2179
|
+
this.subscription = this.formDirective.invalidSubmit.pipe(tap(result => {
|
|
2180
|
+
this.viewContainerRef.clear();
|
|
2181
|
+
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
|
|
2182
|
+
})).subscribe();
|
|
2183
|
+
}
|
|
2184
|
+
ngOnDestroy() {
|
|
2185
|
+
var _a;
|
|
2186
|
+
(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
FormSubmitInvalidDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormSubmitInvalidDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2190
|
+
FormSubmitInvalidDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: FormSubmitInvalidDirective, selector: "[rxapFormSubmitInvalid]", ngImport: i0 });
|
|
2191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormSubmitInvalidDirective, decorators: [{
|
|
2192
|
+
type: Directive,
|
|
2193
|
+
args: [{
|
|
2194
|
+
selector: '[rxapFormSubmitInvalid]'
|
|
2195
|
+
}]
|
|
2196
|
+
}], ctorParameters: function () { return [{ type: FormDirective, decorators: [{
|
|
2197
|
+
type: Inject,
|
|
2198
|
+
args: [FormDirective]
|
|
2199
|
+
}] }, { type: i0.TemplateRef, decorators: [{
|
|
2200
|
+
type: Inject,
|
|
2201
|
+
args: [TemplateRef]
|
|
2202
|
+
}] }, { type: i0.ViewContainerRef, decorators: [{
|
|
2203
|
+
type: Inject,
|
|
2204
|
+
args: [ViewContainerRef]
|
|
2205
|
+
}] }]; } });
|
|
2206
|
+
|
|
2172
2207
|
class RxapFormsModule {
|
|
2173
2208
|
}
|
|
2174
2209
|
RxapFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -2187,7 +2222,8 @@ RxapFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
|
|
|
2187
2222
|
FormGroupNameDirective,
|
|
2188
2223
|
FormControlNameDirective,
|
|
2189
2224
|
ParentControlContainerDirective,
|
|
2190
|
-
FormSubmitSuccessfulDirective
|
|
2225
|
+
FormSubmitSuccessfulDirective,
|
|
2226
|
+
FormSubmitInvalidDirective], exports: [FormDirective,
|
|
2191
2227
|
FormSubmitFailedDirective,
|
|
2192
2228
|
FormLoadingDirective,
|
|
2193
2229
|
FormSubmittingDirective,
|
|
@@ -2202,7 +2238,8 @@ RxapFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
|
|
|
2202
2238
|
FormGroupNameDirective,
|
|
2203
2239
|
FormControlNameDirective,
|
|
2204
2240
|
ParentControlContainerDirective,
|
|
2205
|
-
FormSubmitSuccessfulDirective
|
|
2241
|
+
FormSubmitSuccessfulDirective,
|
|
2242
|
+
FormSubmitInvalidDirective] });
|
|
2206
2243
|
RxapFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapFormsModule });
|
|
2207
2244
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RxapFormsModule, decorators: [{
|
|
2208
2245
|
type: NgModule,
|
|
@@ -2224,6 +2261,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
2224
2261
|
FormControlNameDirective,
|
|
2225
2262
|
ParentControlContainerDirective,
|
|
2226
2263
|
FormSubmitSuccessfulDirective,
|
|
2264
|
+
FormSubmitInvalidDirective,
|
|
2227
2265
|
],
|
|
2228
2266
|
exports: [
|
|
2229
2267
|
FormDirective,
|
|
@@ -2242,6 +2280,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
|
|
|
2242
2280
|
FormControlNameDirective,
|
|
2243
2281
|
ParentControlContainerDirective,
|
|
2244
2282
|
FormSubmitSuccessfulDirective,
|
|
2283
|
+
FormSubmitInvalidDirective,
|
|
2245
2284
|
]
|
|
2246
2285
|
}]
|
|
2247
2286
|
}] });
|
|
@@ -2620,5 +2659,5 @@ const RxapValidators = {
|
|
|
2620
2659
|
* Generated bundle index. Do not edit.
|
|
2621
2660
|
*/
|
|
2622
2661
|
|
|
2623
|
-
export { ControlAsyncValidator, ControlChange, ControlSetValue, ControlValidator, ControlValueAccessor, FormArrayControlManager, FormControlErrorDirective, FormControlMarkDirtyDirective, FormControlMarkPristineDirective, FormControlMarkTouchedDirective, FormControlMarkUntouchedDirective, FormControlNameDirective, FormDirective, FormGroupNameDirective, FormLoadedDirective, FormLoadingDirective, FormLoadingErrorDirective, FormSubmitDirective, FormSubmitFailedDirective, FormSubmitSuccessfulDirective, FormSubmittingDirective, IsArray, IsBoolean, IsDate, IsEnum, IsInt, IsNumber, IsObject, IsString, ParentControlContainerDirective, RXAP_FORM_CONTEXT, RXAP_FORM_DEFINITION, RXAP_FORM_DEFINITION_BUILDER, RXAP_FORM_INITIAL_STATE, RXAP_FORM_LOAD_FAILED_METHOD, RXAP_FORM_LOAD_METHOD, RXAP_FORM_LOAD_SUCCESSFUL_METHOD, RXAP_FORM_SUBMIT_FAILED_METHOD, RXAP_FORM_SUBMIT_METHOD, RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD, RxapForm, RxapFormArray, RxapFormBuilder, RxapFormControl, RxapFormGroup, RxapFormsModule, RxapValidators, ToFormMethod, ToFormSubmitMethod, UseFormArrayControl, UseFormArrayGroup, UseFormControl, UseFormGroup, _IsNumber, controlDisabled$, controlDisabledWhile, controlEnabled$, controlEnabledWhile, controlErrorChanges$, controlReadonly$, controlStatusChanges$, controlValueChanges$, disableControl, enableControl, hasErrorAndDirty, hasErrorAndTouched, isNumber, markAllDirty, markAllPristine, markAllUntouched, mergeControlValidators, selectControlValue$, validateControlOn };
|
|
2662
|
+
export { ControlAsyncValidator, ControlChange, ControlSetValue, ControlValidator, ControlValueAccessor, FormArrayControlManager, FormControlErrorDirective, FormControlMarkDirtyDirective, FormControlMarkPristineDirective, FormControlMarkTouchedDirective, FormControlMarkUntouchedDirective, FormControlNameDirective, FormDirective, FormGroupNameDirective, FormLoadedDirective, FormLoadingDirective, FormLoadingErrorDirective, FormSubmitDirective, FormSubmitFailedDirective, FormSubmitInvalidDirective, FormSubmitSuccessfulDirective, FormSubmittingDirective, IsArray, IsBoolean, IsDate, IsEnum, IsInt, IsNumber, IsObject, IsString, ParentControlContainerDirective, RXAP_FORM_CONTEXT, RXAP_FORM_DEFINITION, RXAP_FORM_DEFINITION_BUILDER, RXAP_FORM_INITIAL_STATE, RXAP_FORM_LOAD_FAILED_METHOD, RXAP_FORM_LOAD_METHOD, RXAP_FORM_LOAD_SUCCESSFUL_METHOD, RXAP_FORM_SUBMIT_FAILED_METHOD, RXAP_FORM_SUBMIT_METHOD, RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD, RxapForm, RxapFormArray, RxapFormBuilder, RxapFormControl, RxapFormGroup, RxapFormsModule, RxapValidators, ToFormMethod, ToFormSubmitMethod, UseFormArrayControl, UseFormArrayGroup, UseFormControl, UseFormGroup, _IsNumber, controlDisabled$, controlDisabledWhile, controlEnabled$, controlEnabledWhile, controlErrorChanges$, controlReadonly$, controlStatusChanges$, controlValueChanges$, disableControl, enableControl, hasErrorAndDirty, hasErrorAndTouched, isNumber, markAllDirty, markAllPristine, markAllUntouched, mergeControlValidators, selectControlValue$, validateControlOn };
|
|
2624
2663
|
//# sourceMappingURL=rxap-forms.js.map
|