ps-toolkit-ui 0.2.61 → 0.2.64
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 +5 -3
- 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/login.class.js +2 -1
- package/esm2015/lib/components/form/file/form.file.component.js +3 -3
- package/esm2015/lib/components/login/login.component.js +3 -2
- package/fesm2015/ps-toolkit-ui.js +5 -3
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/login.class.d.ts +1 -0
- package/package.json +1 -1
- package/src/assets/styles/base.css +1 -1
|
@@ -3916,7 +3916,7 @@
|
|
|
3916
3916
|
return true;
|
|
3917
3917
|
}
|
|
3918
3918
|
if (_this.inp.allowed != null && _this.inp.value != null && typeof _this.inp.value !== 'string' &&
|
|
3919
|
-
_this.inp.value.map(function (x) { return _this.inp.allowed.includes(x.name.split('.').pop().toLowerCase()); }).filter(function (x) { return !x; }).length > 0) {
|
|
3919
|
+
_this.inp.value.filter(function (x) { return typeof x !== 'string'; }).map(function (x) { return _this.inp.allowed.includes(x.name.split('.').pop().toLowerCase()); }).filter(function (x) { return !x; }).length > 0) {
|
|
3920
3920
|
_this.inp.error = exports.InputError.NotAllowed;
|
|
3921
3921
|
return false;
|
|
3922
3922
|
}
|
|
@@ -4015,7 +4015,7 @@
|
|
|
4015
4015
|
$__namespace(this.inputBase.nativeElement).focus();
|
|
4016
4016
|
};
|
|
4017
4017
|
FormFileComponent.prototype.title = function () {
|
|
4018
|
-
if (this.inp.value == null) {
|
|
4018
|
+
if (this.inp.value == null || (this.inp.value instanceof Array && this.inp.value.length === 0)) {
|
|
4019
4019
|
return this.inp.l('FileNotSelected');
|
|
4020
4020
|
}
|
|
4021
4021
|
var t = typeof this.inp.value === 'string' ? this.inp.value : this.inp.value.map(function (x) { return typeof x === 'string' ? x : x.name; }).join(', ');
|
|
@@ -6635,6 +6635,7 @@
|
|
|
6635
6635
|
this.steps = [];
|
|
6636
6636
|
this.active = 0;
|
|
6637
6637
|
this.onSuccess = null;
|
|
6638
|
+
this.rules = null;
|
|
6638
6639
|
this.type = type;
|
|
6639
6640
|
this.l = l;
|
|
6640
6641
|
}
|
|
@@ -6668,6 +6669,7 @@
|
|
|
6668
6669
|
var sendCode = new InputClass(this.config.environment, this.login.l, 'SendCode', 'fa-duotone fa-paper-plane', exports.InputType.Submit, 'h-45' + (this.loginTemplate === 'Simple' ? ' primary' : ''));
|
|
6669
6670
|
sendCodeForm_1.subName = 'SendCodeSubTitle';
|
|
6670
6671
|
this.mobile = new InputClass(this.config.environment, this.login.l, 'Mobile', 'fa-duotone fa-mobile-alt', exports.InputType.Mobile, 'm-b-20 h-45', '', true, 4, 50);
|
|
6672
|
+
var rules = new InputClass(this.config.environment, this.login.l, 'Rules', null, exports.InputType.Label, 'm-t-10', this.login.rules);
|
|
6671
6673
|
sendCodeForm_1.onSuccess = function () {
|
|
6672
6674
|
loginForm_1.subName = _this.login.l('LoginSmsSubTitle', _this.mobile.data());
|
|
6673
6675
|
_this.mobile.type = exports.InputType.Hidden;
|
|
@@ -6681,7 +6683,7 @@
|
|
|
6681
6683
|
sendCodeForm_1.inputs = [
|
|
6682
6684
|
this.mobile,
|
|
6683
6685
|
sendCode
|
|
6684
|
-
];
|
|
6686
|
+
].concat(this.login.rules != null ? [rules] : []);
|
|
6685
6687
|
sendCode.onClick = function () {
|
|
6686
6688
|
sendCodeForm_1.submit();
|
|
6687
6689
|
};
|