@vitrosoftware/common-ui-ts 1.1.147 → 1.1.148

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/dist/index.js CHANGED
@@ -164,7 +164,8 @@ var app$1 = {
164
164
  title: "Введите код",
165
165
  subtitle: {
166
166
  userName: "Код для логина",
167
- email: "отправлен на электронный адрес"
167
+ email: "отправлен на электронный адрес",
168
+ enterTotpCode: "Введите одноразовый пароль"
168
169
  },
169
170
  field: {
170
171
  code: "Код"
@@ -63079,7 +63080,7 @@ var Viewer = function Viewer(props) {
63079
63080
  };
63080
63081
 
63081
63082
  var name = "@vitrosoftware/common-ui-ts";
63082
- var version$1 = "1.1.147";
63083
+ var version$1 = "1.1.148";
63083
63084
  var description = "vitro software common ui ts";
63084
63085
  var author = "";
63085
63086
  var license = "MIT";
@@ -63277,6 +63278,7 @@ var LOCALE$4;
63277
63278
  LOCALE["TWO_FACTOR_AUTHENTICATION_FORM_DESCRIPTION_VALIDITY"] = "app.common.login.twoFactorAuthenticationForm.description.codeValidityDuration";
63278
63279
  LOCALE["TWO_FACTOR_AUTHENTICATION_FORM_DESCRIPTION_RESEND"] = "app.common.login.twoFactorAuthenticationForm.description.resendCodeDuration";
63279
63280
  LOCALE["TWO_FACTOR_AUTHENTICATION_FORM_ERROR_EMPTY"] = "app.common.login.twoFactorAuthenticationForm.error.empty";
63281
+ LOCALE["TWO_FACTOR_AUTHENTICATION_FORM_ENTER_TOTP_CODE"] = "app.common.login.twoFactorAuthenticationForm.subtitle.enterTotpCode";
63280
63282
  LOCALE["LOGIN_KERBEROS_FORM_SUBTITLE_PROGRESS"] = "app.common.login.loginKerberosForm.subtitle.progress";
63281
63283
  LOCALE["LOGIN_KERBEROS_FORM_SUBTITLE_ERROR"] = "app.common.login.loginKerberosForm.subtitle.error";
63282
63284
  LOCALE["ACTION_LOGIN"] = "app.common.login.action.login";
@@ -63655,7 +63657,7 @@ var TwoFactorAuthenticationForm = React.forwardRef(function (props, ref) {
63655
63657
  var getEmail = function getEmail(email) {
63656
63658
  var emailArr = email.split(CTRL.AT_SIGN);
63657
63659
  var name = emailArr[0].slice(0, 2);
63658
- var domain = emailArr[1].slice(emailArr[1].indexOf(CTRL.DOT));
63660
+ var domain = emailArr.length > 1 ? emailArr[1].slice(emailArr[1].indexOf(CTRL.DOT)) : "";
63659
63661
  return React__default.createElement(React__default.Fragment, null, name, React__default.createElement("span", {
63660
63662
  className: styles$K['vitro-hidden-symbol']
63661
63663
  }, DOT_STRING), CTRL.AT_SIGN, React__default.createElement("span", {
@@ -63677,10 +63679,14 @@ var TwoFactorAuthenticationForm = React.forwardRef(function (props, ref) {
63677
63679
  };
63678
63680
  return React__default.createElement("div", {
63679
63681
  className: styles$K['vitro-two-factor-authentication-form']
63680
- }, React__default.createElement(LoginTitle, {
63682
+ }, props.totpApplicationQrCode && React__default.createElement("div", null, React__default.createElement("img", {
63683
+ src: props.totpApplicationQrCode
63684
+ })), React__default.createElement(LoginTitle, {
63681
63685
  className: styles$K['vitro-title'],
63682
63686
  text: localeService.create(LOCALE$4.TWO_FACTOR_AUTHENTICATION_FORM_TITLE)
63683
- }), React__default.createElement("div", {
63687
+ }), props.isTotpMode ? React__default.createElement("div", {
63688
+ className: styles$K['vitro-subtitle']
63689
+ }) : React__default.createElement("div", {
63684
63690
  className: styles$K['vitro-subtitle']
63685
63691
  }, React__default.createElement("div", null, localeService.create(LOCALE$4.TWO_FACTOR_AUTHENTICATION_FORM_SUBTITLE_USER_NAME), React__default.createElement("span", null, CTRL.SPACE + props.userName)), React__default.createElement("div", null, localeService.create(LOCALE$4.TWO_FACTOR_AUTHENTICATION_FORM_SUBTITLE_EMAIL) + CTRL.SPACE, React__default.createElement("span", {
63686
63692
  className: styles$K['vitro-email']
@@ -63691,7 +63697,7 @@ var TwoFactorAuthenticationForm = React.forwardRef(function (props, ref) {
63691
63697
  onBlur: validate,
63692
63698
  errorMessage: errorMessage,
63693
63699
  className: styles$K['vitro-control']
63694
- }), React__default.createElement("div", {
63700
+ }), !props.isTotpMode && React__default.createElement("div", {
63695
63701
  className: styles$K['vitro-flex']
63696
63702
  }, React__default.createElement(Link, {
63697
63703
  text: localeService.create(LOCALE$4.TWO_FACTOR_AUTHENTICATION_FORM_ACTION_CODE_SEND_ERROR),
@@ -63704,11 +63710,11 @@ var TwoFactorAuthenticationForm = React.forwardRef(function (props, ref) {
63704
63710
  }))), React__default.createElement(LoginSubmitButton, {
63705
63711
  onClick: submit,
63706
63712
  className: styles$K['vitro-button']
63707
- }), !resendDuration ? React__default.createElement(Link, {
63713
+ }), !props.isTotpMode && !resendDuration && React__default.createElement(Link, {
63708
63714
  text: localeService.create(LOCALE$4.TWO_FACTOR_AUTHENTICATION_FORM_ACTION_RESEND_CODE),
63709
63715
  onClick: onResendCode,
63710
63716
  className: styles$K['vitro-link-resend-code']
63711
- }) : React__default.createElement("div", {
63717
+ }), !props.isTotpMode && resendDuration && React__default.createElement("div", {
63712
63718
  className: styles$K['vitro-resend-code-description']
63713
63719
  }, localeService.create(LOCALE$4.TWO_FACTOR_AUTHENTICATION_FORM_DESCRIPTION_RESEND, {
63714
63720
  duration: resendDuration