@vallift/ngl 22.0.6 → 22.0.7
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/fesm2022/vallift-ngl.mjs
CHANGED
|
@@ -14476,11 +14476,7 @@ function validateSignalForm(signalForm) {
|
|
|
14476
14476
|
}
|
|
14477
14477
|
|
|
14478
14478
|
class SignalFormDirective {
|
|
14479
|
-
formElement = inject((ElementRef));
|
|
14480
14479
|
fieldTree = input.required({ ...(ngDevMode ? { debugName: "fieldTree" } : /* istanbul ignore next */ {}), alias: 'signalForm' });
|
|
14481
|
-
requestSubmit() {
|
|
14482
|
-
this.formElement.nativeElement.requestSubmit();
|
|
14483
|
-
}
|
|
14484
14480
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SignalFormDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14485
14481
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: SignalFormDirective, isStandalone: true, selector: "form[signalForm]", inputs: { fieldTree: { classPropertyName: "fieldTree", publicName: "signalForm", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
14486
14482
|
}
|
|
@@ -14562,19 +14558,12 @@ class SignalButton {
|
|
|
14562
14558
|
event.stopPropagation();
|
|
14563
14559
|
return;
|
|
14564
14560
|
}
|
|
14565
|
-
if (this.type() === 'submit') {
|
|
14566
|
-
|
|
14567
|
-
|
|
14568
|
-
|
|
14569
|
-
|
|
14570
|
-
return;
|
|
14571
|
-
}
|
|
14572
|
-
}
|
|
14573
|
-
this.clicked.emit();
|
|
14574
|
-
if (this.parentSignalForm) {
|
|
14575
|
-
this.parentSignalForm.requestSubmit();
|
|
14561
|
+
if (this.type() === 'submit' && this.parentSignalForm) {
|
|
14562
|
+
if (!validateSignalForm(this.parentSignalForm.fieldTree())) {
|
|
14563
|
+
event.preventDefault();
|
|
14564
|
+
event.stopPropagation();
|
|
14565
|
+
return;
|
|
14576
14566
|
}
|
|
14577
|
-
return;
|
|
14578
14567
|
}
|
|
14579
14568
|
this.clicked.emit();
|
|
14580
14569
|
}
|