ps-toolkit-ui 0.2.60 → 0.2.63

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.
@@ -1062,13 +1062,14 @@
1062
1062
  }
1063
1063
  return '<div class="ltr">' + moment__namespace(d).locale('fa').format('jYYYY/jMM/jDD HH:mm') + '</div>';
1064
1064
  };
1065
- HelperClass.getDate = function (dt) {
1065
+ HelperClass.getDate = function (dt, format) {
1066
+ if (format === void 0) { format = 'jYYYY/jMM/jDD'; }
1066
1067
  try {
1067
1068
  if (dt === null) {
1068
1069
  return '';
1069
1070
  }
1070
1071
  var d = parseInt(dt.substring(6, dt.length - 2), 10);
1071
- return moment__namespace(d).locale('fa').format('jYYYY/jMM/jDD');
1072
+ return moment__namespace(d).locale('fa').format(format);
1072
1073
  }
1073
1074
  catch (e) {
1074
1075
  return dt;
@@ -6634,6 +6635,7 @@
6634
6635
  this.steps = [];
6635
6636
  this.active = 0;
6636
6637
  this.onSuccess = null;
6638
+ this.rules = null;
6637
6639
  this.type = type;
6638
6640
  this.l = l;
6639
6641
  }
@@ -6667,6 +6669,7 @@
6667
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' : ''));
6668
6670
  sendCodeForm_1.subName = 'SendCodeSubTitle';
6669
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);
6670
6673
  sendCodeForm_1.onSuccess = function () {
6671
6674
  loginForm_1.subName = _this.login.l('LoginSmsSubTitle', _this.mobile.data());
6672
6675
  _this.mobile.type = exports.InputType.Hidden;
@@ -6680,7 +6683,7 @@
6680
6683
  sendCodeForm_1.inputs = [
6681
6684
  this.mobile,
6682
6685
  sendCode
6683
- ];
6686
+ ].concat(this.login.rules != null ? [rules] : []);
6684
6687
  sendCode.onClick = function () {
6685
6688
  sendCodeForm_1.submit();
6686
6689
  };