@klippa/ngx-enhancy-forms 10.1.0 → 10.2.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/klippa-ngx-enhancy-forms.umd.js +22 -3
- package/bundles/klippa-ngx-enhancy-forms.umd.js.map +1 -1
- package/bundles/klippa-ngx-enhancy-forms.umd.min.js +2 -2
- package/bundles/klippa-ngx-enhancy-forms.umd.min.js.map +1 -1
- package/esm2015/lib/elements/button/button.component.js +16 -4
- package/fesm2015/klippa-ngx-enhancy-forms.js +14 -3
- package/fesm2015/klippa-ngx-enhancy-forms.js.map +1 -1
- package/klippa-ngx-enhancy-forms.metadata.json +1 -1
- package/lib/elements/button/button.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -849,9 +849,27 @@
|
|
|
849
849
|
configurable: true
|
|
850
850
|
});
|
|
851
851
|
ButtonComponent.prototype.onClick = function (event) {
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
852
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
853
|
+
var _this = this;
|
|
854
|
+
return __generator(this, function (_a) {
|
|
855
|
+
switch (_a.label) {
|
|
856
|
+
case 0:
|
|
857
|
+
if (this.disabled) {
|
|
858
|
+
event.stopPropagation();
|
|
859
|
+
return [2 /*return*/];
|
|
860
|
+
}
|
|
861
|
+
if (!isValueSet(this.clickCallback)) return [3 /*break*/, 2];
|
|
862
|
+
this.isLoading = true;
|
|
863
|
+
return [4 /*yield*/, this.clickCallback(event).finally(function () {
|
|
864
|
+
_this.isLoading = false;
|
|
865
|
+
})];
|
|
866
|
+
case 1:
|
|
867
|
+
_a.sent();
|
|
868
|
+
_a.label = 2;
|
|
869
|
+
case 2: return [2 /*return*/];
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
});
|
|
855
873
|
};
|
|
856
874
|
return ButtonComponent;
|
|
857
875
|
}());
|
|
@@ -870,6 +888,7 @@
|
|
|
870
888
|
disabled: [{ type: core.Input }],
|
|
871
889
|
isLoading: [{ type: core.Input }],
|
|
872
890
|
type: [{ type: core.Input }],
|
|
891
|
+
clickCallback: [{ type: core.Input }],
|
|
873
892
|
_: [{ type: core.HostBinding, args: ['class._fullWidth',] }]
|
|
874
893
|
};
|
|
875
894
|
|