@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
|
@@ -2859,6 +2859,45 @@
|
|
|
2859
2859
|
}] }];
|
|
2860
2860
|
} });
|
|
2861
2861
|
|
|
2862
|
+
var FormSubmitInvalidDirective = /** @class */ (function () {
|
|
2863
|
+
function FormSubmitInvalidDirective(formDirective, template, viewContainerRef) {
|
|
2864
|
+
this.formDirective = formDirective;
|
|
2865
|
+
this.template = template;
|
|
2866
|
+
this.viewContainerRef = viewContainerRef;
|
|
2867
|
+
}
|
|
2868
|
+
FormSubmitInvalidDirective.prototype.ngAfterViewInit = function () {
|
|
2869
|
+
var _this = this;
|
|
2870
|
+
this.subscription = this.formDirective.invalidSubmit.pipe(operators.tap(function (result) {
|
|
2871
|
+
_this.viewContainerRef.clear();
|
|
2872
|
+
_this.viewContainerRef.createEmbeddedView(_this.template, { $implicit: result });
|
|
2873
|
+
})).subscribe();
|
|
2874
|
+
};
|
|
2875
|
+
FormSubmitInvalidDirective.prototype.ngOnDestroy = function () {
|
|
2876
|
+
var _a;
|
|
2877
|
+
(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
2878
|
+
};
|
|
2879
|
+
return FormSubmitInvalidDirective;
|
|
2880
|
+
}());
|
|
2881
|
+
FormSubmitInvalidDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: FormSubmitInvalidDirective, deps: [{ token: FormDirective }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
2882
|
+
FormSubmitInvalidDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: FormSubmitInvalidDirective, selector: "[rxapFormSubmitInvalid]", ngImport: i0__namespace });
|
|
2883
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: FormSubmitInvalidDirective, decorators: [{
|
|
2884
|
+
type: i0.Directive,
|
|
2885
|
+
args: [{
|
|
2886
|
+
selector: '[rxapFormSubmitInvalid]'
|
|
2887
|
+
}]
|
|
2888
|
+
}], ctorParameters: function () {
|
|
2889
|
+
return [{ type: FormDirective, decorators: [{
|
|
2890
|
+
type: i0.Inject,
|
|
2891
|
+
args: [FormDirective]
|
|
2892
|
+
}] }, { type: i0__namespace.TemplateRef, decorators: [{
|
|
2893
|
+
type: i0.Inject,
|
|
2894
|
+
args: [i0.TemplateRef]
|
|
2895
|
+
}] }, { type: i0__namespace.ViewContainerRef, decorators: [{
|
|
2896
|
+
type: i0.Inject,
|
|
2897
|
+
args: [i0.ViewContainerRef]
|
|
2898
|
+
}] }];
|
|
2899
|
+
} });
|
|
2900
|
+
|
|
2862
2901
|
var RxapFormsModule = /** @class */ (function () {
|
|
2863
2902
|
function RxapFormsModule() {
|
|
2864
2903
|
}
|
|
@@ -2880,7 +2919,8 @@
|
|
|
2880
2919
|
FormGroupNameDirective,
|
|
2881
2920
|
FormControlNameDirective,
|
|
2882
2921
|
ParentControlContainerDirective,
|
|
2883
|
-
FormSubmitSuccessfulDirective
|
|
2922
|
+
FormSubmitSuccessfulDirective,
|
|
2923
|
+
FormSubmitInvalidDirective], exports: [FormDirective,
|
|
2884
2924
|
FormSubmitFailedDirective,
|
|
2885
2925
|
FormLoadingDirective,
|
|
2886
2926
|
FormSubmittingDirective,
|
|
@@ -2895,7 +2935,8 @@
|
|
|
2895
2935
|
FormGroupNameDirective,
|
|
2896
2936
|
FormControlNameDirective,
|
|
2897
2937
|
ParentControlContainerDirective,
|
|
2898
|
-
FormSubmitSuccessfulDirective
|
|
2938
|
+
FormSubmitSuccessfulDirective,
|
|
2939
|
+
FormSubmitInvalidDirective] });
|
|
2899
2940
|
RxapFormsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: RxapFormsModule });
|
|
2900
2941
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: RxapFormsModule, decorators: [{
|
|
2901
2942
|
type: i0.NgModule,
|
|
@@ -2917,6 +2958,7 @@
|
|
|
2917
2958
|
FormControlNameDirective,
|
|
2918
2959
|
ParentControlContainerDirective,
|
|
2919
2960
|
FormSubmitSuccessfulDirective,
|
|
2961
|
+
FormSubmitInvalidDirective,
|
|
2920
2962
|
],
|
|
2921
2963
|
exports: [
|
|
2922
2964
|
FormDirective,
|
|
@@ -2935,6 +2977,7 @@
|
|
|
2935
2977
|
FormControlNameDirective,
|
|
2936
2978
|
ParentControlContainerDirective,
|
|
2937
2979
|
FormSubmitSuccessfulDirective,
|
|
2980
|
+
FormSubmitInvalidDirective,
|
|
2938
2981
|
]
|
|
2939
2982
|
}]
|
|
2940
2983
|
}] });
|
|
@@ -3368,6 +3411,7 @@
|
|
|
3368
3411
|
exports.FormLoadingErrorDirective = FormLoadingErrorDirective;
|
|
3369
3412
|
exports.FormSubmitDirective = FormSubmitDirective;
|
|
3370
3413
|
exports.FormSubmitFailedDirective = FormSubmitFailedDirective;
|
|
3414
|
+
exports.FormSubmitInvalidDirective = FormSubmitInvalidDirective;
|
|
3371
3415
|
exports.FormSubmitSuccessfulDirective = FormSubmitSuccessfulDirective;
|
|
3372
3416
|
exports.FormSubmittingDirective = FormSubmittingDirective;
|
|
3373
3417
|
exports.IsArray = IsArray;
|