ps-toolkit-ui 0.0.198 → 0.0.199
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 +7 -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/form.class.js +2 -1
- package/esm2015/lib/components/form/select/form.select.component.js +7 -4
- package/fesm2015/ps-toolkit-ui.js +7 -3
- 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
|
@@ -1691,6 +1691,7 @@
|
|
|
1691
1691
|
this.environment = null;
|
|
1692
1692
|
this.url = null;
|
|
1693
1693
|
this.urlNewTab = false;
|
|
1694
|
+
this.addNew = false;
|
|
1694
1695
|
this.description = null;
|
|
1695
1696
|
this.disabled = false;
|
|
1696
1697
|
this.inEditDisabled = false;
|
|
@@ -4890,7 +4891,8 @@
|
|
|
4890
4891
|
};
|
|
4891
4892
|
this.inp.isValid = function () {
|
|
4892
4893
|
_this.inp.error = null;
|
|
4893
|
-
if (_this.inp.required && ((!_this.inp.multiple && !_this.inp.
|
|
4894
|
+
if (_this.inp.required && ((!_this.inp.multiple && ((_this.inp.addNew && !_this.inp.search) || (!_this.inp.addNew && !_this.inp.value))) ||
|
|
4895
|
+
(_this.inp.multiple && _this.getSelected().length === 0))) {
|
|
4894
4896
|
_this.inp.error = exports.InputError.Required;
|
|
4895
4897
|
return false;
|
|
4896
4898
|
}
|
|
@@ -4912,7 +4914,7 @@
|
|
|
4912
4914
|
}
|
|
4913
4915
|
};
|
|
4914
4916
|
this.inp.data = function () {
|
|
4915
|
-
return !_this.inp.multiple ? _this.inp.value : _this.getSelected();
|
|
4917
|
+
return !_this.inp.multiple ? (_this.inp.addNew ? _this.inp.search : _this.inp.value) : _this.getSelected();
|
|
4916
4918
|
};
|
|
4917
4919
|
this.inp.focusOut = function () {
|
|
4918
4920
|
$__namespace(_this.inputBase.nativeElement).blur();
|
|
@@ -4941,7 +4943,9 @@
|
|
|
4941
4943
|
$__namespace(_this.inputDiv.nativeElement).removeClass('top');
|
|
4942
4944
|
_this.inp.hover = -1;
|
|
4943
4945
|
if (_this.inp.value === null) {
|
|
4944
|
-
_this.inp.
|
|
4946
|
+
if (!_this.inp.addNew) {
|
|
4947
|
+
_this.inp.search = '';
|
|
4948
|
+
}
|
|
4945
4949
|
if (_this.inp.type === exports.InputType.SelectAutoComplete) {
|
|
4946
4950
|
_this.inp.options = [];
|
|
4947
4951
|
}
|