ps-toolkit-ui 1.13.91 → 1.13.92
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/ps-toolkit-ui.umd.js +25 -19
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/form.class.js +20 -2
- package/esm2015/lib/classes/request.class.js +3 -18
- package/esm2015/lib/components/steps/steps.component.js +3 -1
- package/fesm2015/ps-toolkit-ui.js +21 -16
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/form.class.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -1583,25 +1583,7 @@
|
|
|
1583
1583
|
m = form.l(msg, res.message[msg]);
|
|
1584
1584
|
}
|
|
1585
1585
|
}
|
|
1586
|
-
|
|
1587
|
-
if (res.error != null) {
|
|
1588
|
-
var _loop_1 = function (err) {
|
|
1589
|
-
// noinspection JSUnfilteredForInLoop
|
|
1590
|
-
var i = form.inputs.find(function (x) { return x.name === err; });
|
|
1591
|
-
if (i) {
|
|
1592
|
-
// noinspection JSUnfilteredForInLoop
|
|
1593
|
-
i.error = exports.InputError[exports.InputError[res.error[err]]];
|
|
1594
|
-
if (!f) {
|
|
1595
|
-
i.focus();
|
|
1596
|
-
f = true;
|
|
1597
|
-
}
|
|
1598
|
-
}
|
|
1599
|
-
};
|
|
1600
|
-
// tslint:disable-next-line:forin
|
|
1601
|
-
for (var err in res.error) {
|
|
1602
|
-
_loop_1(err);
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1586
|
+
form.setError(res);
|
|
1605
1587
|
}
|
|
1606
1588
|
if (m) {
|
|
1607
1589
|
HelperClass.addNotification(m);
|
|
@@ -2126,6 +2108,28 @@
|
|
|
2126
2108
|
}
|
|
2127
2109
|
});
|
|
2128
2110
|
};
|
|
2111
|
+
FormClass.prototype.setError = function (res) {
|
|
2112
|
+
if (res.error != null) {
|
|
2113
|
+
var f = false;
|
|
2114
|
+
var _loop_1 = function (err) {
|
|
2115
|
+
// noinspection JSUnfilteredForInLoop
|
|
2116
|
+
var i = this_1.inputs.find(function (x) { return x.name === err; });
|
|
2117
|
+
if (i) {
|
|
2118
|
+
// noinspection JSUnfilteredForInLoop
|
|
2119
|
+
i.error = exports.InputError[exports.InputError[res.error[err]]];
|
|
2120
|
+
if (!f) {
|
|
2121
|
+
i.focus();
|
|
2122
|
+
f = true;
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
};
|
|
2126
|
+
var this_1 = this;
|
|
2127
|
+
// tslint:disable-next-line:forin
|
|
2128
|
+
for (var err in res.error) {
|
|
2129
|
+
_loop_1(err);
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
};
|
|
2129
2133
|
return FormClass;
|
|
2130
2134
|
}());
|
|
2131
2135
|
var InputClass = /** @class */ (function () {
|
|
@@ -2816,6 +2820,8 @@
|
|
|
2816
2820
|
}
|
|
2817
2821
|
_this.changeStep(next);
|
|
2818
2822
|
}
|
|
2823
|
+
}, function (data) {
|
|
2824
|
+
activeStep.form.setError(data);
|
|
2819
2825
|
});
|
|
2820
2826
|
};
|
|
2821
2827
|
return StepsComponent;
|