ps-toolkit-ui 1.6.97 → 1.7.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/bundles/ps-toolkit-ui.umd.js +12 -6
- 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/components/form/date/form.date.component.js +10 -3
- package/esm2015/lib/components/form/finger/form.finger.component.js +2 -2
- package/esm2015/lib/components/form/textbox/form.textbox.component.js +3 -4
- package/fesm2015/ps-toolkit-ui.js +12 -6
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/form/textbox/form.textbox.component.d.ts +0 -1
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -3841,12 +3841,14 @@
|
|
|
3841
3841
|
this.setDate();
|
|
3842
3842
|
};
|
|
3843
3843
|
FormDateComponent.prototype.changeMonth = function (c) {
|
|
3844
|
-
|
|
3844
|
+
var v = moment__namespace(this.active.format('jYYYY') + '/' + ('0' + c).slice(-2) + '/' + this.active.format('jDD'), 'jYYYY/jMM/jDD');
|
|
3845
|
+
this.active = v.isValid() ? v : moment__namespace(this.active.format('jYYYY') + '/' + ('0' + c).slice(-2) + '/29', 'jYYYY/jMM/jDD');
|
|
3845
3846
|
this.setDate();
|
|
3846
3847
|
this.changeState('day');
|
|
3847
3848
|
};
|
|
3848
3849
|
FormDateComponent.prototype.changeYear = function (c) {
|
|
3849
|
-
|
|
3850
|
+
var v = moment__namespace(('000' + c).slice(-4) + '/' + this.active.format('jMM') + '/' + this.active.format('jDD'), 'jYYYY/jMM/jDD');
|
|
3851
|
+
this.active = v.isValid() ? v : moment__namespace(('000' + c).slice(-4) + '/' + this.active.format('jMM') + '/29', 'jYYYY/jMM/jDD');
|
|
3850
3852
|
this.setDate();
|
|
3851
3853
|
this.changeState('month');
|
|
3852
3854
|
};
|
|
@@ -3871,6 +3873,8 @@
|
|
|
3871
3873
|
FormDateComponent.prototype.onKeyUp = function (e) {
|
|
3872
3874
|
this.inp.error = null;
|
|
3873
3875
|
this.inp.value = null;
|
|
3876
|
+
console.log('onKeyUp this.cSearch => ', this.cSearch);
|
|
3877
|
+
console.log('onKeyUp e.target.value => ', e.target.value);
|
|
3874
3878
|
if (this.cSearch !== e.target.value) {
|
|
3875
3879
|
this.cSearch = e.target.value;
|
|
3876
3880
|
if (this.inp.search !== '' && this.inp.search !== null) {
|
|
@@ -3878,6 +3882,7 @@
|
|
|
3878
3882
|
if (v.isValid() && this.inp.search.length <= 10) {
|
|
3879
3883
|
this.active = v;
|
|
3880
3884
|
this.inp.value = this.active.format('jYYYY/jMM/jDD');
|
|
3885
|
+
console.log('onKeyUp this.inp.value => ', this.inp.value);
|
|
3881
3886
|
this.setDate();
|
|
3882
3887
|
if (this.inp.onChange) {
|
|
3883
3888
|
this.inp.onChange(this.inp);
|
|
@@ -3897,6 +3902,8 @@
|
|
|
3897
3902
|
};
|
|
3898
3903
|
FormDateComponent.prototype.onFocusOut = function () {
|
|
3899
3904
|
$__namespace(this.inputDiv.nativeElement).removeClass('top');
|
|
3905
|
+
console.log('onFocusOut this.inp.value => ', this.inp.value);
|
|
3906
|
+
console.log('onFocusOut this.inp.search => ', this.inp.search);
|
|
3900
3907
|
this.inp.search = this.inp.value;
|
|
3901
3908
|
this.state = 'day';
|
|
3902
3909
|
};
|
|
@@ -5921,7 +5928,6 @@
|
|
|
5921
5928
|
function FormTextboxComponent() {
|
|
5922
5929
|
this.cValue = '';
|
|
5923
5930
|
this.changeIndex = new core.EventEmitter();
|
|
5924
|
-
this.navigationKeys = ['Backspace', 'Delete', 'Tab', 'Escape', 'Enter', 'Home', 'End', 'ArrowLeft', 'ArrowRight', 'Clear', 'Copy', 'Paste'];
|
|
5925
5931
|
}
|
|
5926
5932
|
Object.defineProperty(FormTextboxComponent.prototype, "type", {
|
|
5927
5933
|
get: function () {
|
|
@@ -5986,7 +5992,7 @@
|
|
|
5986
5992
|
}
|
|
5987
5993
|
if (_this.inp.type === exports.InputType.Number || _this.inp.type === exports.InputType.Price) {
|
|
5988
5994
|
var v = _this.inp.value.toString().replace(/,/g, '');
|
|
5989
|
-
if (
|
|
5995
|
+
if (!/^[-]?\d+$/.test(v)) {
|
|
5990
5996
|
_this.inp.error = exports.InputError.Invalid;
|
|
5991
5997
|
return false;
|
|
5992
5998
|
}
|
|
@@ -6096,7 +6102,7 @@
|
|
|
6096
6102
|
try {
|
|
6097
6103
|
if (this.inp.value && this.inp.type === exports.InputType.Price) {
|
|
6098
6104
|
var v = this.inp.value.toString().replace(/,/g, '');
|
|
6099
|
-
if (
|
|
6105
|
+
if (/^[-]?\d+$/.test(v)) {
|
|
6100
6106
|
return parseInt(v, 10).toLocaleString();
|
|
6101
6107
|
}
|
|
6102
6108
|
return v;
|
|
@@ -6747,7 +6753,7 @@
|
|
|
6747
6753
|
}
|
|
6748
6754
|
else if (evt.data.startsWith('Error')) {
|
|
6749
6755
|
_this.inp.value[f] = null;
|
|
6750
|
-
HelperClass.addNotification(evt.data);
|
|
6756
|
+
HelperClass.addNotification(_this.inp.l(evt.data));
|
|
6751
6757
|
}
|
|
6752
6758
|
else {
|
|
6753
6759
|
var r = JSON.parse(evt.data);
|