@klippa/ngx-enhancy-forms 11.7.0 → 11.8.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/esm2020/lib/form/form-submit-button/form-submit-button.component.mjs +16 -3
- package/fesm2015/klippa-ngx-enhancy-forms.mjs +31 -16
- package/fesm2015/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/fesm2020/klippa-ngx-enhancy-forms.mjs +15 -2
- package/fesm2020/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/lib/form/form-submit-button/form-submit-button.component.d.ts +4 -2
- package/package.json +1 -1
|
@@ -11,11 +11,19 @@ export class FormSubmitButtonComponent {
|
|
|
11
11
|
this.isLoading = false;
|
|
12
12
|
this.fullWidth = false;
|
|
13
13
|
this.variant = 'greenFilled';
|
|
14
|
+
this.before = () => Promise.resolve();
|
|
15
|
+
this.after = () => Promise.resolve();
|
|
14
16
|
}
|
|
15
17
|
get _() {
|
|
16
18
|
return this.fullWidth;
|
|
17
19
|
}
|
|
18
|
-
submitForm() {
|
|
20
|
+
async submitForm() {
|
|
21
|
+
try {
|
|
22
|
+
await this.before();
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
19
27
|
this.parentForm
|
|
20
28
|
.trySubmit()
|
|
21
29
|
.then(([renderedAndEnabledValues, renderedValues]) => {
|
|
@@ -35,10 +43,11 @@ export class FormSubmitButtonComponent {
|
|
|
35
43
|
}
|
|
36
44
|
throw e;
|
|
37
45
|
});
|
|
46
|
+
await this.after();
|
|
38
47
|
}
|
|
39
48
|
}
|
|
40
49
|
FormSubmitButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormSubmitButtonComponent, deps: [{ token: i1.FormComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
41
|
-
FormSubmitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormSubmitButtonComponent, selector: "klp-form-submit-button", inputs: { isLoading: "isLoading", fullWidth: "fullWidth", variant: "variant", submitCallback: "submitCallback" }, host: { properties: { "class._fullWidth": "this._" } }, ngImport: i0, template: "<klp-form-button\n\t\t[variant]=\"variant\"\n\t\t(click)=\"submitForm()\"\n\t\t[disabled]=\"isLoading\"\n\t\t[isLoading]=\"isLoading\"\n\t\t[fullWidth]=\"fullWidth\"\n\t\ttype=\"submit\"\n\t\t[ngClass]=\"fullWidth ? 'fullWidth' : ''\"\n\t>\n\t<ng-content></ng-content>\n</klp-form-button>\n", styles: [":host{display:inline-block}:host._fullWidth{display:block}.fullWidth{width:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.ButtonComponent, selector: "klp-form-button", inputs: ["variant", "size", "fullWidth", "hasBorder", "disabled", "isLoading", "type", "clickCallback"] }] });
|
|
50
|
+
FormSubmitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormSubmitButtonComponent, selector: "klp-form-submit-button", inputs: { isLoading: "isLoading", fullWidth: "fullWidth", variant: "variant", before: "before", after: "after", submitCallback: "submitCallback" }, host: { properties: { "class._fullWidth": "this._" } }, ngImport: i0, template: "<klp-form-button\n\t\t[variant]=\"variant\"\n\t\t(click)=\"submitForm()\"\n\t\t[disabled]=\"isLoading\"\n\t\t[isLoading]=\"isLoading\"\n\t\t[fullWidth]=\"fullWidth\"\n\t\ttype=\"submit\"\n\t\t[ngClass]=\"fullWidth ? 'fullWidth' : ''\"\n\t>\n\t<ng-content></ng-content>\n</klp-form-button>\n", styles: [":host{display:inline-block}:host._fullWidth{display:block}.fullWidth{width:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.ButtonComponent, selector: "klp-form-button", inputs: ["variant", "size", "fullWidth", "hasBorder", "disabled", "isLoading", "type", "clickCallback"] }] });
|
|
42
51
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormSubmitButtonComponent, decorators: [{
|
|
43
52
|
type: Component,
|
|
44
53
|
args: [{ selector: 'klp-form-submit-button', template: "<klp-form-button\n\t\t[variant]=\"variant\"\n\t\t(click)=\"submitForm()\"\n\t\t[disabled]=\"isLoading\"\n\t\t[isLoading]=\"isLoading\"\n\t\t[fullWidth]=\"fullWidth\"\n\t\ttype=\"submit\"\n\t\t[ngClass]=\"fullWidth ? 'fullWidth' : ''\"\n\t>\n\t<ng-content></ng-content>\n</klp-form-button>\n", styles: [":host{display:inline-block}:host._fullWidth{display:block}.fullWidth{width:100%}\n"] }]
|
|
@@ -52,10 +61,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
52
61
|
type: Input
|
|
53
62
|
}], variant: [{
|
|
54
63
|
type: Input
|
|
64
|
+
}], before: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], after: [{
|
|
67
|
+
type: Input
|
|
55
68
|
}], submitCallback: [{
|
|
56
69
|
type: Input
|
|
57
70
|
}], _: [{
|
|
58
71
|
type: HostBinding,
|
|
59
72
|
args: ['class._fullWidth']
|
|
60
73
|
}] } });
|
|
61
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
74
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1zdWJtaXQtYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tsaXBwYS9uZ3gtZW5oYW5jeS1mb3Jtcy9zcmMvbGliL2Zvcm0vZm9ybS1zdWJtaXQtYnV0dG9uL2Zvcm0tc3VibWl0LWJ1dHRvbi5jb21wb25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|
|
1091
1091
|
this.isLoading = false;
|
|
1092
1092
|
this.fullWidth = false;
|
|
1093
1093
|
this.variant = 'greenFilled';
|
|
1094
|
+
this.before = () => Promise.resolve();
|
|
1095
|
+
this.after = () => Promise.resolve();
|
|
1094
1096
|
}
|
|
1095
1097
|
get _() {
|
|
1096
1098
|
return this.fullWidth;
|
|
1097
1099
|
}
|
|
1098
1100
|
submitForm() {
|
|
1099
|
-
this
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
throw new Error('No promise is returned in your submit function.');
|
|
1101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1102
|
+
try {
|
|
1103
|
+
yield this.before();
|
|
1104
|
+
}
|
|
1105
|
+
catch (e) {
|
|
1106
|
+
return;
|
|
1106
1107
|
}
|
|
1107
|
-
|
|
1108
|
-
|
|
1108
|
+
this.parentForm
|
|
1109
|
+
.trySubmit()
|
|
1110
|
+
.then(([renderedAndEnabledValues, renderedValues]) => {
|
|
1111
|
+
this.isLoading = true;
|
|
1112
|
+
const submitCallbackResult = this.submitCallback(renderedAndEnabledValues, renderedValues);
|
|
1113
|
+
if (isNullOrUndefined(submitCallbackResult)) {
|
|
1114
|
+
throw new Error('No promise is returned in your submit function.');
|
|
1115
|
+
}
|
|
1116
|
+
return submitCallbackResult.then(() => (this.isLoading = false)).catch((e) => {
|
|
1117
|
+
this.isLoading = false;
|
|
1118
|
+
throw e;
|
|
1119
|
+
});
|
|
1120
|
+
})
|
|
1121
|
+
.catch((e) => {
|
|
1122
|
+
if (e === invalidFieldsSymbol) {
|
|
1123
|
+
return; // swallow the error, the framework will scroll to the field that needs attention
|
|
1124
|
+
}
|
|
1109
1125
|
throw e;
|
|
1110
1126
|
});
|
|
1111
|
-
|
|
1112
|
-
.catch((e) => {
|
|
1113
|
-
if (e === invalidFieldsSymbol) {
|
|
1114
|
-
return; // swallow the error, the framework will scroll to the field that needs attention
|
|
1115
|
-
}
|
|
1116
|
-
throw e;
|
|
1127
|
+
yield this.after();
|
|
1117
1128
|
});
|
|
1118
1129
|
}
|
|
1119
1130
|
}
|
|
1120
1131
|
FormSubmitButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormSubmitButtonComponent, deps: [{ token: FormComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1121
|
-
FormSubmitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormSubmitButtonComponent, selector: "klp-form-submit-button", inputs: { isLoading: "isLoading", fullWidth: "fullWidth", variant: "variant", submitCallback: "submitCallback" }, host: { properties: { "class._fullWidth": "this._" } }, ngImport: i0, template: "<klp-form-button\n\t\t[variant]=\"variant\"\n\t\t(click)=\"submitForm()\"\n\t\t[disabled]=\"isLoading\"\n\t\t[isLoading]=\"isLoading\"\n\t\t[fullWidth]=\"fullWidth\"\n\t\ttype=\"submit\"\n\t\t[ngClass]=\"fullWidth ? 'fullWidth' : ''\"\n\t>\n\t<ng-content></ng-content>\n</klp-form-button>\n", styles: [":host{display:inline-block}:host._fullWidth{display:block}.fullWidth{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "klp-form-button", inputs: ["variant", "size", "fullWidth", "hasBorder", "disabled", "isLoading", "type", "clickCallback"] }] });
|
|
1132
|
+
FormSubmitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormSubmitButtonComponent, selector: "klp-form-submit-button", inputs: { isLoading: "isLoading", fullWidth: "fullWidth", variant: "variant", before: "before", after: "after", submitCallback: "submitCallback" }, host: { properties: { "class._fullWidth": "this._" } }, ngImport: i0, template: "<klp-form-button\n\t\t[variant]=\"variant\"\n\t\t(click)=\"submitForm()\"\n\t\t[disabled]=\"isLoading\"\n\t\t[isLoading]=\"isLoading\"\n\t\t[fullWidth]=\"fullWidth\"\n\t\ttype=\"submit\"\n\t\t[ngClass]=\"fullWidth ? 'fullWidth' : ''\"\n\t>\n\t<ng-content></ng-content>\n</klp-form-button>\n", styles: [":host{display:inline-block}:host._fullWidth{display:block}.fullWidth{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "klp-form-button", inputs: ["variant", "size", "fullWidth", "hasBorder", "disabled", "isLoading", "type", "clickCallback"] }] });
|
|
1122
1133
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormSubmitButtonComponent, decorators: [{
|
|
1123
1134
|
type: Component,
|
|
1124
1135
|
args: [{ selector: 'klp-form-submit-button', template: "<klp-form-button\n\t\t[variant]=\"variant\"\n\t\t(click)=\"submitForm()\"\n\t\t[disabled]=\"isLoading\"\n\t\t[isLoading]=\"isLoading\"\n\t\t[fullWidth]=\"fullWidth\"\n\t\ttype=\"submit\"\n\t\t[ngClass]=\"fullWidth ? 'fullWidth' : ''\"\n\t>\n\t<ng-content></ng-content>\n</klp-form-button>\n", styles: [":host{display:inline-block}:host._fullWidth{display:block}.fullWidth{width:100%}\n"] }]
|
|
@@ -1134,6 +1145,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
1134
1145
|
type: Input
|
|
1135
1146
|
}], variant: [{
|
|
1136
1147
|
type: Input
|
|
1148
|
+
}], before: [{
|
|
1149
|
+
type: Input
|
|
1150
|
+
}], after: [{
|
|
1151
|
+
type: Input
|
|
1137
1152
|
}], submitCallback: [{
|
|
1138
1153
|
type: Input
|
|
1139
1154
|
}], _: [{
|