@rxap/forms 12.5.1-next.2 → 12.6.1
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 +55 -6
- 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/validators/is-number.js +1 -1
- package/esm2015/lib/validators/is-number.js.map +1 -1
- package/fesm2015/rxap-forms.js +51 -7
- 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/validators/is-number.d.ts +1 -0
- package/package.json +6 -5
|
@@ -1696,6 +1696,7 @@
|
|
|
1696
1696
|
*/
|
|
1697
1697
|
_this.rxapSubmit = new i0.EventEmitter();
|
|
1698
1698
|
_this.invalidSubmit = new i0.EventEmitter();
|
|
1699
|
+
_this.submitSuccessful$ = new i0.EventEmitter();
|
|
1699
1700
|
_this.submitting$ = new rxjs$1.ToggleSubject();
|
|
1700
1701
|
_this.submitError$ = new rxjs.BehaviorSubject(null);
|
|
1701
1702
|
_this.loading$ = new rxjs$1.ToggleSubject();
|
|
@@ -2006,6 +2007,7 @@
|
|
|
2006
2007
|
}
|
|
2007
2008
|
};
|
|
2008
2009
|
FormDirective.prototype.submitSuccessful = function (value) {
|
|
2010
|
+
this.submitSuccessful$.next(value);
|
|
2009
2011
|
if (this.submitSuccessfulMethod) {
|
|
2010
2012
|
this.submitSuccessfulMethod.call(value);
|
|
2011
2013
|
}
|
|
@@ -2028,7 +2030,7 @@
|
|
|
2028
2030
|
return FormDirective;
|
|
2029
2031
|
}(i1.FormGroupDirective));
|
|
2030
2032
|
FormDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: FormDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: RXAP_FORM_DEFINITION, optional: true }, { token: RXAP_FORM_SUBMIT_METHOD, optional: true, skipSelf: true }, { token: RXAP_FORM_LOAD_METHOD, optional: true, skipSelf: true }, { token: RXAP_FORM_LOAD_FAILED_METHOD, optional: true, skipSelf: true }, { token: RXAP_FORM_LOAD_SUCCESSFUL_METHOD, optional: true, skipSelf: true }, { token: RXAP_FORM_SUBMIT_FAILED_METHOD, optional: true, skipSelf: true }, { token: RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD, optional: true, skipSelf: true }, { token: RXAP_FORM_DEFINITION_BUILDER, optional: true, skipSelf: true }, { token: i2.LoadingIndicatorService, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
2031
|
-
FormDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: FormDirective, selector: "form[rxapForm]:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]", inputs: { initial: "initial", useFormDefinition: ["rxapForm", "useFormDefinition"], submitMethod: "submitMethod" }, outputs: { ngSubmit: "ngSubmit", rxapSubmit: "rxapSubmit", invalidSubmit: "invalidSubmit" }, host: { listeners: { "reset": "onReset()" }, properties: { "class.rxap-submitting": "this.submitting", "class.rxap-submit-error": "this.submitError", "class.rxap-loading": "this.loading", "class.rxap-loaded": "this.loaded", "class.rxap-loading-error": "this.loadingError" } }, providers: [
|
|
2033
|
+
FormDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: FormDirective, selector: "form[rxapForm]:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]", inputs: { initial: "initial", useFormDefinition: ["rxapForm", "useFormDefinition"], submitMethod: "submitMethod" }, outputs: { ngSubmit: "ngSubmit", rxapSubmit: "rxapSubmit", invalidSubmit: "invalidSubmit", submitSuccessful$: "submitSuccessful" }, host: { listeners: { "reset": "onReset()" }, properties: { "class.rxap-submitting": "this.submitting", "class.rxap-submit-error": "this.submitError", "class.rxap-loading": "this.loading", "class.rxap-loaded": "this.loaded", "class.rxap-loading-error": "this.loadingError" } }, providers: [
|
|
2032
2034
|
{
|
|
2033
2035
|
provide: i1.ControlContainer,
|
|
2034
2036
|
// ignore coverage
|
|
@@ -2196,6 +2198,9 @@
|
|
|
2196
2198
|
type: i0.Output
|
|
2197
2199
|
}], invalidSubmit: [{
|
|
2198
2200
|
type: i0.Output
|
|
2201
|
+
}], submitSuccessful$: [{
|
|
2202
|
+
type: i0.Output,
|
|
2203
|
+
args: ['submitSuccessful']
|
|
2199
2204
|
}], submitting: [{
|
|
2200
2205
|
type: i0.HostBinding,
|
|
2201
2206
|
args: ['class.rxap-submitting']
|
|
@@ -2815,6 +2820,45 @@
|
|
|
2815
2820
|
}]
|
|
2816
2821
|
}] });
|
|
2817
2822
|
|
|
2823
|
+
var FormSubmitSuccessfulDirective = /** @class */ (function () {
|
|
2824
|
+
function FormSubmitSuccessfulDirective(formDirective, template, viewContainerRef) {
|
|
2825
|
+
this.formDirective = formDirective;
|
|
2826
|
+
this.template = template;
|
|
2827
|
+
this.viewContainerRef = viewContainerRef;
|
|
2828
|
+
}
|
|
2829
|
+
FormSubmitSuccessfulDirective.prototype.ngAfterViewInit = function () {
|
|
2830
|
+
var _this = this;
|
|
2831
|
+
this.subscription = this.formDirective.submitSuccessful$.pipe(operators.tap(function (result) {
|
|
2832
|
+
_this.viewContainerRef.clear();
|
|
2833
|
+
_this.viewContainerRef.createEmbeddedView(_this.template, { $implicit: result });
|
|
2834
|
+
})).subscribe();
|
|
2835
|
+
};
|
|
2836
|
+
FormSubmitSuccessfulDirective.prototype.ngOnDestroy = function () {
|
|
2837
|
+
var _a;
|
|
2838
|
+
(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
2839
|
+
};
|
|
2840
|
+
return FormSubmitSuccessfulDirective;
|
|
2841
|
+
}());
|
|
2842
|
+
FormSubmitSuccessfulDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: FormSubmitSuccessfulDirective, deps: [{ token: FormDirective }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
2843
|
+
FormSubmitSuccessfulDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: FormSubmitSuccessfulDirective, selector: "[rxapFormSubmitSuccessful]", ngImport: i0__namespace });
|
|
2844
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: FormSubmitSuccessfulDirective, decorators: [{
|
|
2845
|
+
type: i0.Directive,
|
|
2846
|
+
args: [{
|
|
2847
|
+
selector: '[rxapFormSubmitSuccessful]'
|
|
2848
|
+
}]
|
|
2849
|
+
}], ctorParameters: function () {
|
|
2850
|
+
return [{ type: FormDirective, decorators: [{
|
|
2851
|
+
type: i0.Inject,
|
|
2852
|
+
args: [FormDirective]
|
|
2853
|
+
}] }, { type: i0__namespace.TemplateRef, decorators: [{
|
|
2854
|
+
type: i0.Inject,
|
|
2855
|
+
args: [i0.TemplateRef]
|
|
2856
|
+
}] }, { type: i0__namespace.ViewContainerRef, decorators: [{
|
|
2857
|
+
type: i0.Inject,
|
|
2858
|
+
args: [i0.ViewContainerRef]
|
|
2859
|
+
}] }];
|
|
2860
|
+
} });
|
|
2861
|
+
|
|
2818
2862
|
var RxapFormsModule = /** @class */ (function () {
|
|
2819
2863
|
function RxapFormsModule() {
|
|
2820
2864
|
}
|
|
@@ -2835,7 +2879,8 @@
|
|
|
2835
2879
|
FormSubmitDirective,
|
|
2836
2880
|
FormGroupNameDirective,
|
|
2837
2881
|
FormControlNameDirective,
|
|
2838
|
-
ParentControlContainerDirective
|
|
2882
|
+
ParentControlContainerDirective,
|
|
2883
|
+
FormSubmitSuccessfulDirective], exports: [FormDirective,
|
|
2839
2884
|
FormSubmitFailedDirective,
|
|
2840
2885
|
FormLoadingDirective,
|
|
2841
2886
|
FormSubmittingDirective,
|
|
@@ -2849,7 +2894,8 @@
|
|
|
2849
2894
|
FormSubmitDirective,
|
|
2850
2895
|
FormGroupNameDirective,
|
|
2851
2896
|
FormControlNameDirective,
|
|
2852
|
-
ParentControlContainerDirective
|
|
2897
|
+
ParentControlContainerDirective,
|
|
2898
|
+
FormSubmitSuccessfulDirective] });
|
|
2853
2899
|
RxapFormsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: RxapFormsModule });
|
|
2854
2900
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: RxapFormsModule, decorators: [{
|
|
2855
2901
|
type: i0.NgModule,
|
|
@@ -2869,7 +2915,8 @@
|
|
|
2869
2915
|
FormSubmitDirective,
|
|
2870
2916
|
FormGroupNameDirective,
|
|
2871
2917
|
FormControlNameDirective,
|
|
2872
|
-
ParentControlContainerDirective
|
|
2918
|
+
ParentControlContainerDirective,
|
|
2919
|
+
FormSubmitSuccessfulDirective,
|
|
2873
2920
|
],
|
|
2874
2921
|
exports: [
|
|
2875
2922
|
FormDirective,
|
|
@@ -2886,7 +2933,8 @@
|
|
|
2886
2933
|
FormSubmitDirective,
|
|
2887
2934
|
FormGroupNameDirective,
|
|
2888
2935
|
FormControlNameDirective,
|
|
2889
|
-
ParentControlContainerDirective
|
|
2936
|
+
ParentControlContainerDirective,
|
|
2937
|
+
FormSubmitSuccessfulDirective,
|
|
2890
2938
|
]
|
|
2891
2939
|
}]
|
|
2892
2940
|
}] });
|
|
@@ -2949,7 +2997,7 @@
|
|
|
2949
2997
|
if (control.value === null) {
|
|
2950
2998
|
return null;
|
|
2951
2999
|
}
|
|
2952
|
-
if (!isNumber(control.value, options)) {
|
|
3000
|
+
if (!isNumber(!(options === null || options === void 0 ? void 0 : options.strict) && typeof control.value === 'string' ? Number(control.value) : control.value, options)) {
|
|
2953
3001
|
return {
|
|
2954
3002
|
isNumber: {
|
|
2955
3003
|
expected: 'A number value',
|
|
@@ -3320,6 +3368,7 @@
|
|
|
3320
3368
|
exports.FormLoadingErrorDirective = FormLoadingErrorDirective;
|
|
3321
3369
|
exports.FormSubmitDirective = FormSubmitDirective;
|
|
3322
3370
|
exports.FormSubmitFailedDirective = FormSubmitFailedDirective;
|
|
3371
|
+
exports.FormSubmitSuccessfulDirective = FormSubmitSuccessfulDirective;
|
|
3323
3372
|
exports.FormSubmittingDirective = FormSubmittingDirective;
|
|
3324
3373
|
exports.IsArray = IsArray;
|
|
3325
3374
|
exports.IsBoolean = IsBoolean;
|