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