ps-toolkit-ui 0.0.159 → 0.0.160

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.
@@ -1747,7 +1747,7 @@
1747
1747
  exports.InputType.NationalCode, exports.InputType.Sheba, exports.InputType.PostalCode, exports.InputType.Date, exports.InputType.Time].includes(type) ? ' ltr' : '');
1748
1748
  this.type = type;
1749
1749
  this.value = value;
1750
- this.default = HelperClass.clone(value);
1750
+ this.default = typeof value === 'number' ? _.cloneDeep(value) : HelperClass.clone(value);
1751
1751
  this.required = required;
1752
1752
  this.minLength = type === exports.InputType.Mobile || type === exports.InputType.Phone ? 11 :
1753
1753
  type === exports.InputType.NationalCode || type === exports.InputType.PostalCode ? 10 :
@@ -3472,8 +3472,6 @@
3472
3472
  this.inp.setValue = function (v) {
3473
3473
  _this.setInpValue(v);
3474
3474
  };
3475
- console.log(_.cloneDeep(3424234234), 3424234234);
3476
- console.log(this.active instanceof moment__namespace);
3477
3475
  this.inp.isValid = function () {
3478
3476
  _this.inp.error = null;
3479
3477
  if (_this.inp.required && !_this.inp.value) {
@@ -3509,21 +3507,14 @@
3509
3507
  };
3510
3508
  };
3511
3509
  FormDateComponent.prototype.setInpValue = function (v) {
3512
- console.log(v, 'vv');
3513
- console.log(typeof v, 'typeof vtypeof v');
3514
- console.log(this.inp.default, 'this.inp.defaultthis.inp.default');
3515
- console.log(typeof this.inp.default, 'typeof this.inp.default');
3516
3510
  if (v === null) {
3517
3511
  this.inp.clear();
3518
3512
  return;
3519
3513
  }
3520
- else if (typeof v === 'string' && v.includes('Date')) {
3514
+ else if (typeof v === 'string') {
3521
3515
  var d = parseInt(v.substring(6, v.length - 2), 10);
3522
3516
  this.active = moment__namespace(d);
3523
3517
  }
3524
- else if (typeof v === 'string' && v.includes('/')) {
3525
- this.active = moment__namespace(this.inp.value, 'jYYYY/jMM/jDD');
3526
- }
3527
3518
  else if (typeof v === 'number') {
3528
3519
  this.active = moment__namespace(v);
3529
3520
  }