@rxap/forms 18.0.5-dev.0 → 18.1.0-dev.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/CHANGELOG.md +6 -0
- package/esm2022/index.mjs +2 -1
- package/esm2022/lib/directives/form-control-error.directive.mjs +3 -3
- package/esm2022/lib/directives/form-control-mark-dirty.directive.mjs +3 -3
- package/esm2022/lib/directives/form-control-mark-pristine.directive.mjs +3 -3
- package/esm2022/lib/directives/form-control-mark-touched.directive.mjs +3 -3
- package/esm2022/lib/directives/form-control-mark-untouched.directive.mjs +3 -3
- package/esm2022/lib/directives/form-control-name.directive.mjs +3 -3
- package/esm2022/lib/directives/form-group-name.directive.mjs +3 -3
- package/esm2022/lib/directives/form-loaded.directive.mjs +3 -3
- package/esm2022/lib/directives/form-loading-error.directive.mjs +3 -3
- package/esm2022/lib/directives/form-loading.directive.mjs +3 -3
- package/esm2022/lib/directives/form-submit-failed.directive.mjs +3 -3
- package/esm2022/lib/directives/form-submit-invalid.directive.mjs +3 -3
- package/esm2022/lib/directives/form-submit-successful.directive.mjs +3 -3
- package/esm2022/lib/directives/form-submit.directive.mjs +3 -3
- package/esm2022/lib/directives/form-submitting.directive.mjs +3 -3
- package/esm2022/lib/directives/form.directive.mjs +3 -3
- package/esm2022/lib/directives/forms.module.mjs +4 -4
- package/esm2022/lib/directives/parent-control-container.directive.mjs +3 -3
- package/esm2022/lib/utilities.mjs +36 -0
- package/fesm2022/rxap-forms.mjs +91 -57
- package/fesm2022/rxap-forms.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/utilities.d.ts +4 -0
- package/package.json +11 -11
package/fesm2022/rxap-forms.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isEmail, isIP, isMobilePhone, isPort, isURL, isUUID } from '@rxap/validator';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Directive, Host, SkipSelf, Input, HostListener, forwardRef, Optional, Self, Inject, InjectionToken, isDevMode, Injector, input, EventEmitter, ChangeDetectorRef, Output, HostBinding, TemplateRef, ViewContainerRef, NgModule } from '@angular/core';
|
|
3
|
+
import { Directive, Host, SkipSelf, Input, HostListener, forwardRef, Optional, Self, Inject, InjectionToken, isDevMode, Injector, input, EventEmitter, ChangeDetectorRef, Output, HostBinding, TemplateRef, ViewContainerRef, NgModule, runInInjectionContext } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
5
|
import { FormControlName, NG_VALIDATORS, NG_ASYNC_VALIDATORS, NG_VALUE_ACCESSOR, NgControl, FormGroupName, ControlContainer, UntypedFormArray, AbstractControl, UntypedFormGroup, UntypedFormControl, Validators, FormGroupDirective } from '@angular/forms';
|
|
6
6
|
import { startWith, filter, tap, map, distinctUntilChanged, debounceTime, take } from 'rxjs/operators';
|
|
@@ -438,10 +438,10 @@ class FormControlErrorDirective {
|
|
|
438
438
|
ngOnDestroy() {
|
|
439
439
|
this.subscription?.unsubscribe();
|
|
440
440
|
}
|
|
441
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
442
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
441
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormControlErrorDirective, deps: [{ token: i0.TemplateRef }, { token: i1.ControlContainer, host: true, skipSelf: true }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
442
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormControlErrorDirective, isStandalone: true, selector: "[rxapFormControlError]", inputs: { name: ["rxapFormControlErrorFrom", "name"], errorKey: ["rxapFormControlErrorIf", "errorKey"] }, ngImport: i0 }); }
|
|
443
443
|
}
|
|
444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormControlErrorDirective, decorators: [{
|
|
445
445
|
type: Directive,
|
|
446
446
|
args: [{
|
|
447
447
|
selector: '[rxapFormControlError]',
|
|
@@ -478,10 +478,10 @@ class FormControlMarkDirtyDirective {
|
|
|
478
478
|
control?.markAsDirty();
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
482
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
481
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormControlMarkDirtyDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
482
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormControlMarkDirtyDirective, isStandalone: true, selector: "[rxapFormControlMarkDirty]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
|
|
483
483
|
}
|
|
484
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormControlMarkDirtyDirective, decorators: [{
|
|
485
485
|
type: Directive,
|
|
486
486
|
args: [{
|
|
487
487
|
selector: '[rxapFormControlMarkDirty]',
|
|
@@ -505,10 +505,10 @@ class FormControlMarkPristineDirective {
|
|
|
505
505
|
control?.markAsPristine();
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
509
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
508
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormControlMarkPristineDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
509
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormControlMarkPristineDirective, isStandalone: true, selector: "[rxapFormControlMarkPristine]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
|
|
510
510
|
}
|
|
511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
511
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormControlMarkPristineDirective, decorators: [{
|
|
512
512
|
type: Directive,
|
|
513
513
|
args: [{
|
|
514
514
|
selector: '[rxapFormControlMarkPristine]',
|
|
@@ -526,10 +526,10 @@ class FormControlMarkTouchedDirective {
|
|
|
526
526
|
onClick() {
|
|
527
527
|
this.parent.control?.markAllAsTouched();
|
|
528
528
|
}
|
|
529
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
530
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
529
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormControlMarkTouchedDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
530
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormControlMarkTouchedDirective, isStandalone: true, selector: "[rxapFormControlMarkTouched]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
|
|
531
531
|
}
|
|
532
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormControlMarkTouchedDirective, decorators: [{
|
|
533
533
|
type: Directive,
|
|
534
534
|
args: [{
|
|
535
535
|
selector: '[rxapFormControlMarkTouched]',
|
|
@@ -553,10 +553,10 @@ class FormControlMarkUntouchedDirective {
|
|
|
553
553
|
control?.markAsUntouched();
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
557
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
556
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormControlMarkUntouchedDirective, deps: [{ token: i1.ControlContainer }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
557
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormControlMarkUntouchedDirective, isStandalone: true, selector: "[rxapFormControlMarkUntouched]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
|
|
558
558
|
}
|
|
559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormControlMarkUntouchedDirective, decorators: [{
|
|
560
560
|
type: Directive,
|
|
561
561
|
args: [{
|
|
562
562
|
selector: '[rxapFormControlMarkUntouched]',
|
|
@@ -577,15 +577,15 @@ class FormControlNameDirective extends FormControlName {
|
|
|
577
577
|
constructor(parent, validators, asyncValidators, valueAccessors) {
|
|
578
578
|
super(parent, validators, asyncValidators, valueAccessors, null);
|
|
579
579
|
}
|
|
580
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
581
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
580
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormControlNameDirective, deps: [{ token: i1.ControlContainer, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
581
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormControlNameDirective, isStandalone: true, selector: "[rxapFormControlName]", inputs: { name: ["rxapFormControlName", "name"] }, providers: [
|
|
582
582
|
{
|
|
583
583
|
provide: NgControl,
|
|
584
584
|
useExisting: forwardRef(() => FormControlNameDirective),
|
|
585
585
|
},
|
|
586
586
|
], exportAs: ["rxapFormControl"], usesInheritance: true, ngImport: i0 }); }
|
|
587
587
|
}
|
|
588
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormControlNameDirective, decorators: [{
|
|
589
589
|
type: Directive,
|
|
590
590
|
args: [{
|
|
591
591
|
selector: '[rxapFormControlName]',
|
|
@@ -642,15 +642,15 @@ class FormGroupNameDirective extends FormGroupName {
|
|
|
642
642
|
constructor(parent, validators, asyncValidators) {
|
|
643
643
|
super(parent, validators, asyncValidators);
|
|
644
644
|
}
|
|
645
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
646
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
645
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormGroupNameDirective, deps: [{ token: i1.ControlContainer, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
646
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormGroupNameDirective, isStandalone: true, selector: "[rxapFormGroupName]", inputs: { name: ["rxapFormGroupName", "name"] }, providers: [
|
|
647
647
|
{
|
|
648
648
|
provide: ControlContainer,
|
|
649
649
|
useExisting: forwardRef(() => FormGroupNameDirective),
|
|
650
650
|
},
|
|
651
651
|
], exportAs: ["rxapFormGroup"], usesInheritance: true, ngImport: i0 }); }
|
|
652
652
|
}
|
|
653
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
653
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormGroupNameDirective, decorators: [{
|
|
654
654
|
type: Directive,
|
|
655
655
|
args: [{
|
|
656
656
|
selector: '[rxapFormGroupName]',
|
|
@@ -2124,8 +2124,8 @@ class FormDirective extends FormGroupDirective {
|
|
|
2124
2124
|
this._formDefinition.ngOnDestroy();
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2128
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.0.
|
|
2127
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormDirective, deps: [{ token: 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: LoadingIndicatorService, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2128
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.0.6", type: FormDirective, isStandalone: true, selector: "form[rxapForm]:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]", inputs: { initial: { classPropertyName: "initial", publicName: "initial", isSignal: false, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, useFormDefinition: { classPropertyName: "useFormDefinition", publicName: "rxapForm", isSignal: false, isRequired: false, transformFunction: null }, submitMethod: { classPropertyName: "submitMethod", publicName: "submitMethod", isSignal: false, isRequired: false, transformFunction: null } }, 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: [
|
|
2129
2129
|
{
|
|
2130
2130
|
provide: ControlContainer,
|
|
2131
2131
|
// ignore coverage
|
|
@@ -2169,7 +2169,7 @@ class FormDirective extends FormGroupDirective {
|
|
|
2169
2169
|
// endregion
|
|
2170
2170
|
], exportAs: ["rxapForm"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
2171
2171
|
}
|
|
2172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormDirective, decorators: [{
|
|
2173
2173
|
type: Directive,
|
|
2174
2174
|
args: [{
|
|
2175
2175
|
selector: 'form[rxapForm]:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]',
|
|
@@ -2333,10 +2333,10 @@ class FormLoadedDirective {
|
|
|
2333
2333
|
ngOnDestroy() {
|
|
2334
2334
|
this.subscription?.unsubscribe();
|
|
2335
2335
|
}
|
|
2336
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2337
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
2336
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormLoadedDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2337
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormLoadedDirective, isStandalone: true, selector: "[rxapFormLoaded]", ngImport: i0 }); }
|
|
2338
2338
|
}
|
|
2339
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2339
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormLoadedDirective, decorators: [{
|
|
2340
2340
|
type: Directive,
|
|
2341
2341
|
args: [{
|
|
2342
2342
|
selector: '[rxapFormLoaded]',
|
|
@@ -2370,10 +2370,10 @@ class FormLoadingErrorDirective {
|
|
|
2370
2370
|
ngOnDestroy() {
|
|
2371
2371
|
this.subscription?.unsubscribe();
|
|
2372
2372
|
}
|
|
2373
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2374
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
2373
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormLoadingErrorDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2374
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormLoadingErrorDirective, isStandalone: true, selector: "[rxapFormLoadingError]", ngImport: i0 }); }
|
|
2375
2375
|
}
|
|
2376
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormLoadingErrorDirective, decorators: [{
|
|
2377
2377
|
type: Directive,
|
|
2378
2378
|
args: [{
|
|
2379
2379
|
selector: '[rxapFormLoadingError]',
|
|
@@ -2407,10 +2407,10 @@ class FormLoadingDirective {
|
|
|
2407
2407
|
ngOnDestroy() {
|
|
2408
2408
|
this.subscription?.unsubscribe();
|
|
2409
2409
|
}
|
|
2410
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2411
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
2410
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormLoadingDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2411
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormLoadingDirective, isStandalone: true, selector: "[rxapFormLoading]", ngImport: i0 }); }
|
|
2412
2412
|
}
|
|
2413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormLoadingDirective, decorators: [{
|
|
2414
2414
|
type: Directive,
|
|
2415
2415
|
args: [{
|
|
2416
2416
|
selector: '[rxapFormLoading]',
|
|
@@ -2444,10 +2444,10 @@ class FormSubmitFailedDirective {
|
|
|
2444
2444
|
ngOnDestroy() {
|
|
2445
2445
|
this.subscription?.unsubscribe();
|
|
2446
2446
|
}
|
|
2447
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2448
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
2447
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormSubmitFailedDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2448
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormSubmitFailedDirective, isStandalone: true, selector: "[rxapFormSubmitFailed]", ngImport: i0 }); }
|
|
2449
2449
|
}
|
|
2450
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2450
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormSubmitFailedDirective, decorators: [{
|
|
2451
2451
|
type: Directive,
|
|
2452
2452
|
args: [{
|
|
2453
2453
|
selector: '[rxapFormSubmitFailed]',
|
|
@@ -2479,10 +2479,10 @@ class FormSubmitInvalidDirective {
|
|
|
2479
2479
|
ngOnDestroy() {
|
|
2480
2480
|
this.subscription?.unsubscribe();
|
|
2481
2481
|
}
|
|
2482
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2483
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
2482
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormSubmitInvalidDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2483
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormSubmitInvalidDirective, isStandalone: true, selector: "[rxapFormSubmitInvalid]", ngImport: i0 }); }
|
|
2484
2484
|
}
|
|
2485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormSubmitInvalidDirective, decorators: [{
|
|
2486
2486
|
type: Directive,
|
|
2487
2487
|
args: [{
|
|
2488
2488
|
selector: '[rxapFormSubmitInvalid]',
|
|
@@ -2514,10 +2514,10 @@ class FormSubmitSuccessfulDirective {
|
|
|
2514
2514
|
ngOnDestroy() {
|
|
2515
2515
|
this.subscription?.unsubscribe();
|
|
2516
2516
|
}
|
|
2517
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2518
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
2517
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormSubmitSuccessfulDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2518
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormSubmitSuccessfulDirective, isStandalone: true, selector: "[rxapFormSubmitSuccessful]", ngImport: i0 }); }
|
|
2519
2519
|
}
|
|
2520
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormSubmitSuccessfulDirective, decorators: [{
|
|
2521
2521
|
type: Directive,
|
|
2522
2522
|
args: [{
|
|
2523
2523
|
selector: '[rxapFormSubmitSuccessful]',
|
|
@@ -2569,10 +2569,10 @@ class FormSubmitDirective extends ConfirmClick {
|
|
|
2569
2569
|
ngOnDestroy() {
|
|
2570
2570
|
this.subscription?.unsubscribe();
|
|
2571
2571
|
}
|
|
2572
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2573
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
2572
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormSubmitDirective, deps: [{ token: FormDirective }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2573
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormSubmitDirective, isStandalone: true, selector: "[rxapFormSubmit]", inputs: { type: "type", resetAfterSubmit: "resetAfterSubmit", navigateAfterSubmit: "navigateAfterSubmit" }, outputs: { afterSubmit: "afterSubmit" }, host: { listeners: { "click": "onClick()", "confirmed": "onConfirm()" }, properties: { "type": "this.type" } }, usesInheritance: true, ngImport: i0 }); }
|
|
2574
2574
|
}
|
|
2575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2575
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormSubmitDirective, decorators: [{
|
|
2576
2576
|
type: Directive,
|
|
2577
2577
|
args: [{
|
|
2578
2578
|
selector: '[rxapFormSubmit]',
|
|
@@ -2621,10 +2621,10 @@ class FormSubmittingDirective {
|
|
|
2621
2621
|
ngOnDestroy() {
|
|
2622
2622
|
this.subscription?.unsubscribe();
|
|
2623
2623
|
}
|
|
2624
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2625
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
2624
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormSubmittingDirective, deps: [{ token: FormDirective }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2625
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: FormSubmittingDirective, isStandalone: true, selector: "[rxapFormSubmitting]", ngImport: i0 }); }
|
|
2626
2626
|
}
|
|
2627
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: FormSubmittingDirective, decorators: [{
|
|
2628
2628
|
type: Directive,
|
|
2629
2629
|
args: [{
|
|
2630
2630
|
selector: '[rxapFormSubmitting]',
|
|
@@ -2642,15 +2642,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
2642
2642
|
}] }] });
|
|
2643
2643
|
|
|
2644
2644
|
class ParentControlContainerDirective {
|
|
2645
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2646
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
2645
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: ParentControlContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2646
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: ParentControlContainerDirective, isStandalone: true, selector: "[formControlName][parentControlContainer],[formControlGroup][parentControlContainer]", providers: [
|
|
2647
2647
|
{
|
|
2648
2648
|
provide: ControlContainer,
|
|
2649
2649
|
useExisting: ControlContainer,
|
|
2650
2650
|
},
|
|
2651
2651
|
], ngImport: i0 }); }
|
|
2652
2652
|
}
|
|
2653
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2653
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: ParentControlContainerDirective, decorators: [{
|
|
2654
2654
|
type: Directive,
|
|
2655
2655
|
args: [{
|
|
2656
2656
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -2666,8 +2666,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
2666
2666
|
}] });
|
|
2667
2667
|
|
|
2668
2668
|
class RxapFormsModule {
|
|
2669
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2670
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.
|
|
2669
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: RxapFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2670
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.6", ngImport: i0, type: RxapFormsModule, imports: [FormDirective,
|
|
2671
2671
|
FormSubmitFailedDirective,
|
|
2672
2672
|
FormLoadingDirective,
|
|
2673
2673
|
FormSubmittingDirective,
|
|
@@ -2700,9 +2700,9 @@ class RxapFormsModule {
|
|
|
2700
2700
|
ParentControlContainerDirective,
|
|
2701
2701
|
FormSubmitSuccessfulDirective,
|
|
2702
2702
|
FormSubmitInvalidDirective] }); }
|
|
2703
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.
|
|
2703
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: RxapFormsModule }); }
|
|
2704
2704
|
}
|
|
2705
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2705
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: RxapFormsModule, decorators: [{
|
|
2706
2706
|
type: NgModule,
|
|
2707
2707
|
args: [{
|
|
2708
2708
|
imports: [
|
|
@@ -2849,6 +2849,40 @@ class ControlValueAccessor {
|
|
|
2849
2849
|
const RXAP_FORM_INITIAL_STATE = new InjectionToken('rxap/forms/initial-state');
|
|
2850
2850
|
const RXAP_FORM_CONTEXT = new InjectionToken('rxap/forms/context');
|
|
2851
2851
|
|
|
2852
|
+
// TODO : create a @rxap/ngx-utilities package and move this function there
|
|
2853
|
+
function ToMethodWithInjectionContext(call, injector, metadata = { id: 'to-method' }) {
|
|
2854
|
+
return {
|
|
2855
|
+
call: (parameters, ...args) => new Promise((resolve, reject) => {
|
|
2856
|
+
if (!injector) {
|
|
2857
|
+
throw new Error('The injector is not defined. Can not run the method in the injection context.');
|
|
2858
|
+
}
|
|
2859
|
+
runInInjectionContext(injector, () => {
|
|
2860
|
+
try {
|
|
2861
|
+
const result = call(parameters, ...args);
|
|
2862
|
+
if (isPromise(result)) {
|
|
2863
|
+
result.then(resolve).catch(reject);
|
|
2864
|
+
}
|
|
2865
|
+
else {
|
|
2866
|
+
resolve(result);
|
|
2867
|
+
}
|
|
2868
|
+
}
|
|
2869
|
+
catch (e) {
|
|
2870
|
+
reject(e);
|
|
2871
|
+
}
|
|
2872
|
+
});
|
|
2873
|
+
}),
|
|
2874
|
+
metadata
|
|
2875
|
+
};
|
|
2876
|
+
}
|
|
2877
|
+
function ToMethodWithInjectionContextFactory(call, metadata = { id: 'to-method' }) {
|
|
2878
|
+
return (injector) => {
|
|
2879
|
+
if (!injector) {
|
|
2880
|
+
throw new Error('The injector is not defined. Ensure the factory is used in conjunction with deps: [ INJECTOR ]');
|
|
2881
|
+
}
|
|
2882
|
+
return ToMethodWithInjectionContext(call, injector, metadata);
|
|
2883
|
+
};
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2852
2886
|
// region validators
|
|
2853
2887
|
// endregion
|
|
2854
2888
|
|
|
@@ -2856,5 +2890,5 @@ const RXAP_FORM_CONTEXT = new InjectionToken('rxap/forms/context');
|
|
|
2856
2890
|
* Generated bundle index. Do not edit.
|
|
2857
2891
|
*/
|
|
2858
2892
|
|
|
2859
|
-
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, IsComplex, IsDate, IsEmail, IsEnum, IsIP, IsInt, IsNumber, IsObject, IsPhoneNumber, IsPort, IsString, IsUUID, IsUrl, MetadataKeys, 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 };
|
|
2893
|
+
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, IsComplex, IsDate, IsEmail, IsEnum, IsIP, IsInt, IsNumber, IsObject, IsPhoneNumber, IsPort, IsString, IsUUID, IsUrl, MetadataKeys, 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, ToMethodWithInjectionContext, ToMethodWithInjectionContextFactory, UseFormArrayControl, UseFormArrayGroup, UseFormControl, UseFormGroup, _IsNumber, controlDisabled$, controlDisabledWhile, controlEnabled$, controlEnabledWhile, controlErrorChanges$, controlReadonly$, controlStatusChanges$, controlValueChanges$, disableControl, enableControl, hasErrorAndDirty, hasErrorAndTouched, isNumber, markAllDirty, markAllPristine, markAllUntouched, mergeControlValidators, selectControlValue$, validateControlOn };
|
|
2860
2894
|
//# sourceMappingURL=rxap-forms.mjs.map
|