@redneckz/wildless-cms-uni-blocks 0.14.969 → 0.14.971

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.
Files changed (54) hide show
  1. package/bundle/bundle.umd.js +16 -8
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/retail/components/NoConsentDialog/NoConsentDialog.d.ts +2 -0
  4. package/bundle/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -0
  5. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -0
  6. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  7. package/dist/retail/components/NoConsentDialog/NoConsentDialog.d.ts +2 -0
  8. package/dist/retail/components/NoConsentDialog/NoConsentDialog.js +7 -2
  9. package/dist/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -1
  10. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +7 -5
  11. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  12. package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -0
  13. package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  14. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -0
  15. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  16. package/lib/retail/components/NoConsentDialog/NoConsentDialog.d.ts +2 -0
  17. package/lib/retail/components/NoConsentDialog/NoConsentDialog.js +7 -2
  18. package/lib/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -1
  19. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +7 -5
  20. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  21. package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -0
  22. package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  23. package/mobile/bundle/bundle.umd.js +16 -8
  24. package/mobile/bundle/bundle.umd.min.js +1 -1
  25. package/mobile/bundle/retail/components/NoConsentDialog/NoConsentDialog.d.ts +2 -0
  26. package/mobile/bundle/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -0
  27. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -0
  28. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  29. package/mobile/dist/retail/components/NoConsentDialog/NoConsentDialog.d.ts +2 -0
  30. package/mobile/dist/retail/components/NoConsentDialog/NoConsentDialog.js +7 -2
  31. package/mobile/dist/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -1
  32. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +7 -5
  33. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  34. package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -0
  35. package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  36. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -0
  37. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  38. package/mobile/lib/retail/components/NoConsentDialog/NoConsentDialog.d.ts +2 -0
  39. package/mobile/lib/retail/components/NoConsentDialog/NoConsentDialog.js +7 -2
  40. package/mobile/lib/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -1
  41. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +7 -5
  42. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  43. package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -0
  44. package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  45. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -0
  46. package/mobile/src/retail/components/NoConsentDialog/NoConsentDialog.tsx +42 -32
  47. package/mobile/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +8 -5
  48. package/mobile/src/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +1 -0
  49. package/package.json +1 -1
  50. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -0
  51. package/src/retail/components/NoConsentDialog/NoConsentDialog.fixture.tsx +1 -1
  52. package/src/retail/components/NoConsentDialog/NoConsentDialog.tsx +42 -32
  53. package/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +8 -5
  54. package/src/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +1 -0
@@ -3103,7 +3103,12 @@
3103
3103
  await handler(context);
3104
3104
  };
3105
3105
 
3106
- const NoConsentDialog = JSX(({ attempts, onClose = noop }) => {
3106
+ const mapProductTypeToName = {
3107
+ creditCard: 'кредитной карты',
3108
+ debitCard: 'дебетовой карты',
3109
+ credit: 'кредита',
3110
+ };
3111
+ const NoConsentDialog = JSX(({ attempts, productType, onClose = noop }) => {
3107
3112
  const navigator = locationNavigator();
3108
3113
  const isMaxAttempts = attempts > 1;
3109
3114
  const returnToMainPage = useCallback(() => {
@@ -3117,7 +3122,7 @@
3117
3122
  onClose();
3118
3123
  }
3119
3124
  }, [isMaxAttempts]);
3120
- return (jsx(Dialog, { onClose: handleClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center", children: [jsx(Paragraph, { align: "text-center", children: "\u0423\u0432\u0430\u0436\u0430\u0435\u043C\u044B\u0439 \u043A\u043B\u0438\u0435\u043D\u0442!" }), jsx(Paragraph, { align: "text-center", children: "\u0414\u043B\u044F \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u043A\u0440\u0435\u0434\u0438\u0442\u0430 \u0412\u0430\u043C \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u044C\u0441\u044F \u0432 \u043E\u0444\u0438\u0441 \u0411\u0430\u043D\u043A\u0430" }), jsxs("div", { className: "flex flex-col sm:flex-row gap-xl items-center", children: [jsx(Button, { type: "button", version: "secondary", onClick: returnToMainPage, children: "\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C" }), isMaxAttempts ? null : (jsx(Button, { type: "button", onClick: onClose, children: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C" }))] })] }) }));
3125
+ return (jsx(Dialog, { onClose: handleClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center", children: [jsx(Paragraph, { align: "text-center", children: "\u0423\u0432\u0430\u0436\u0430\u0435\u043C\u044B\u0439 \u043A\u043B\u0438\u0435\u043D\u0442!" }), jsx(Paragraph, { align: "text-center", children: `Для получения ${mapProductTypeToName[productType]} Вам необходимо обратиться в офис Банка` }), jsxs("div", { className: "flex flex-col sm:flex-row gap-xl items-center", children: [jsx(Button, { type: "button", version: "secondary", onClick: returnToMainPage, children: "\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C" }), isMaxAttempts ? null : (jsx(Button, { type: "button", onClick: onClose, children: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C" }))] })] }) }));
3121
3126
  });
3122
3127
 
3123
3128
  function copy(source, target) {
@@ -6130,10 +6135,7 @@
6130
6135
  setTimeNextReq(TIME_TO_RESEND);
6131
6136
  restartTimer(TIME_TO_RESEND);
6132
6137
  setErrorText('');
6133
- sessionStore.smsCode = {
6134
- sendTime: Date.now(),
6135
- attempts: 0,
6136
- };
6138
+ sessionStore.smsCode = getDefaultSmsCodeParams(phoneNumber);
6137
6139
  }
6138
6140
  else if (response.status === 429) {
6139
6141
  captchaDialog.open({ phoneNumber, sendCode: handleSendCode });
@@ -6143,12 +6145,17 @@
6143
6145
  }
6144
6146
  }, [phoneNumber, restartTimer]);
6145
6147
  useEffect(() => {
6146
- if (!sessionStore.smsCode?.sendTime) {
6148
+ if (!sessionStore.smsCode?.sendTime || sessionStore.smsCode?.phoneNumber !== phoneNumber) {
6147
6149
  handleSendCode();
6148
6150
  }
6149
6151
  }, []);
6150
6152
  return (jsx(VerifyPhoneDialogLayout, { isSubmitButtonDisabled: isSubmitButtonDisabled, onSubmit: handleSubmit, onSendCode: handleSendCode, timeNextReq: timeNextReq, values: values, onChange: setValues, phone: phone, isLoading: isLoading, errorText: errorText, hasError: hasError, onClose: onClose, children: renderDescription$2(consents, withDescription) }));
6151
6153
  });
6154
+ const getDefaultSmsCodeParams = (phoneNumber) => ({
6155
+ sendTime: Date.now(),
6156
+ attempts: 0,
6157
+ phoneNumber: phoneNumber,
6158
+ });
6152
6159
  const renderDescription$2 = (consents, isRender = false) => isRender ? (jsxs(RichText, { itemSize: "list-s", children: [jsx("span", { children: "\u0412\u0432\u043E\u0434\u044F \u043A\u043E\u0434, \u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044E, \u0447\u0442\u043E \u043E\u0437\u043D\u0430\u043A\u043E\u043C\u043B\u0435\u043D \u0438 \u043F\u043E\u0434\u043F\u0438\u0441\u044B\u0432\u0430\u044E: " }), jsx("ul", { children: consents?.map((_, i) => (jsx("li", { children: _ }, `${_}-${i}`))) })] })) : null;
6153
6160
 
6154
6161
  const defaultConsentText = {
@@ -7363,6 +7370,7 @@
7363
7370
  setAttemptsWithoutConsents((prev) => prev + 1);
7364
7371
  attemptsWithoutConsents > 0 &&
7365
7372
  noConsentDialog.open({
7373
+ productType,
7366
7374
  attempts: attemptsWithoutConsents,
7367
7375
  });
7368
7376
  }
@@ -13051,7 +13059,7 @@
13051
13059
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
13052
13060
  });
13053
13061
 
13054
- const packageVersion = "0.14.968";
13062
+ const packageVersion = "0.14.970";
13055
13063
 
13056
13064
  exports.Blocks = Blocks;
13057
13065
  exports.ContentPage = ContentPage;