@redneckz/wildless-cms-uni-blocks 0.14.904 → 0.14.905

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 (93) hide show
  1. package/bundle/bundle.umd.js +88 -85
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  4. package/dist/components/ApplicationForm/ApplicationForm.js +3 -2
  5. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  6. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  7. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  8. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +0 -1
  9. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  10. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +2 -1
  11. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  12. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +6 -3
  13. package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  14. package/dist/retail/utils/latinFieldsUtils.js +74 -77
  15. package/dist/retail/utils/latinFieldsUtils.js.map +1 -1
  16. package/dist/ui-kit/Input/Input.js.map +1 -1
  17. package/dist/ui-kit/Select/Select.js.map +1 -1
  18. package/dist/ui-kit/Select/SelectPopup.js +1 -1
  19. package/dist/ui-kit/Select/SelectPopup.js.map +1 -1
  20. package/lib/common.css +1 -1
  21. package/lib/components/ApplicationForm/ApplicationForm.js +3 -2
  22. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  23. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  24. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  25. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +0 -1
  26. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  27. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -1
  28. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  29. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +6 -3
  30. package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  31. package/lib/retail/utils/latinFieldsUtils.js +74 -77
  32. package/lib/retail/utils/latinFieldsUtils.js.map +1 -1
  33. package/lib/ui-kit/Input/Input.js.map +1 -1
  34. package/lib/ui-kit/Select/Select.js.map +1 -1
  35. package/lib/ui-kit/Select/SelectPopup.js +1 -1
  36. package/lib/ui-kit/Select/SelectPopup.js.map +1 -1
  37. package/mobile/bundle/bundle.umd.js +88 -85
  38. package/mobile/bundle/bundle.umd.min.js +1 -1
  39. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  40. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +3 -2
  41. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  42. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  43. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  44. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +0 -1
  45. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  46. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +2 -1
  47. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  48. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +6 -3
  49. package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  50. package/mobile/dist/retail/utils/latinFieldsUtils.js +74 -77
  51. package/mobile/dist/retail/utils/latinFieldsUtils.js.map +1 -1
  52. package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
  53. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  54. package/mobile/dist/ui-kit/Select/SelectPopup.js +1 -1
  55. package/mobile/dist/ui-kit/Select/SelectPopup.js.map +1 -1
  56. package/mobile/lib/common.css +1 -1
  57. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +3 -2
  58. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  59. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  60. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  61. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +0 -1
  62. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  63. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -1
  64. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  65. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +6 -3
  66. package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  67. package/mobile/lib/retail/utils/latinFieldsUtils.js +74 -77
  68. package/mobile/lib/retail/utils/latinFieldsUtils.js.map +1 -1
  69. package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
  70. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  71. package/mobile/lib/ui-kit/Select/SelectPopup.js +1 -1
  72. package/mobile/lib/ui-kit/Select/SelectPopup.js.map +1 -1
  73. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +3 -5
  74. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +3 -2
  75. package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +0 -1
  76. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +0 -1
  77. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +4 -1
  78. package/mobile/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +26 -23
  79. package/mobile/src/retail/utils/latinFieldsUtils.ts +76 -78
  80. package/mobile/src/ui-kit/Input/Input.tsx +0 -1
  81. package/mobile/src/ui-kit/Select/Select.tsx +2 -2
  82. package/mobile/src/ui-kit/Select/SelectPopup.tsx +1 -1
  83. package/package.json +1 -1
  84. package/src/components/ApplicationForm/ApplicationForm.tsx +3 -5
  85. package/src/components/ApplicationForm/ApplicationFormContent.ts +3 -2
  86. package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +0 -1
  87. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +0 -1
  88. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +4 -1
  89. package/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +26 -23
  90. package/src/retail/utils/latinFieldsUtils.ts +76 -78
  91. package/src/ui-kit/Input/Input.tsx +0 -1
  92. package/src/ui-kit/Select/Select.tsx +2 -2
  93. package/src/ui-kit/Select/SelectPopup.tsx +1 -1
@@ -1809,7 +1809,9 @@
1809
1809
  const getTimer = (sendTime) => TIME_TO_RESEND - Math.floor((Date.now() - sendTime) / 1000);
1810
1810
 
1811
1811
  const CODE_LENGTH = 4;
1812
- const VerifyPhoneDialog = JSX(({ phone, withDescription = true, consents, onSuccess = noop, onClose = noop, formatData, reqId, isRetail = true, }) => {
1812
+ const VerifyPhoneDialog = JSX(
1813
+ // eslint-disable-next-line max-lines-per-function
1814
+ ({ phone, withDescription = true, consents, onSuccess = noop, onClose = noop, formatData, reqId, isRetail = true, }) => {
1813
1815
  const [values, setValues] = useState(Array(CODE_LENGTH).fill(''));
1814
1816
  const sessionStore = useSessionStore();
1815
1817
  const [requestId, setRequestId] = useState(reqId);
@@ -1849,8 +1851,10 @@
1849
1851
  handleSendCode();
1850
1852
  }
1851
1853
  }, []);
1852
- return (jsx(Dialog, { maxWidth: "lg", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center rounded-md", children: [jsx(Headline, { className: "w-full", title: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u043D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430", description: `Мы отправили код на ${phone}`, headlineVersion: "XS", isEmbedded: true, as: "h6" }), jsx(InputCode, { values: values, setValues: setValues, errorText: errorText, hasError: hasError }), renderText$3(timeNextReq, handleSendCode), withDescription ? (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, renderNextButton(isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
1854
+ return (jsx(Dialog, { maxWidth: "lg", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center rounded-md", children: [renderHeadline(phone), jsx(InputCode, { values: values, setValues: setValues, errorText: errorText, hasError: hasError }), renderText$3(timeNextReq, handleSendCode), renderDescription$2(consents, withDescription), renderNextButton(isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
1853
1855
  });
1856
+ const renderHeadline = (phone) => (jsx(Headline, { className: "w-full", title: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u043D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430", description: `Мы отправили код на ${phone}`, headlineVersion: "XS", isEmbedded: true, as: "h6" }));
1857
+ 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;
1854
1858
  const renderNextButton = (disabled, onClick) => (jsx(SubmitButton, { text: "\u0414\u0430\u043B\u0435\u0435", disabled: disabled, onClick: onClick }));
1855
1859
  const renderText$3 = (timeNextReq, handleSendCode) => timeNextReq ? (jsxs("div", { className: "flex flex-row text-l font-light text-base", children: ["\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437", jsx(Timer, { className: "pl-2xs", seconds: timeNextReq })] })) : (jsx(Button, { embedded: true, onClick: handleSendCode, children: jsx(ButtonTitle, { children: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434" }) }));
1856
1860
 
@@ -1922,7 +1926,7 @@
1922
1926
  onChangeQuery?.('');
1923
1927
  onChange(option);
1924
1928
  }
1925
- }, children: [option?.innDaData ? (jsxs("span", { children: [jsx(Text, { size: "text-s", children: option?.innDaData?.companyName }), jsxs("div", { className: "space-x-2", children: [jsx(Text, { size: "text-s", font: "font-light", children: formatOption(option) }), jsx(Text, { size: "text-s", font: "font-light", children: option?.innDaData?.companyAddress })] })] })) : (jsx("span", { className: "min-h-6", children: formatOption(option) })), jsx(Icon, { name: "DoneSimpleIcon", width: "16", height: "16", iconVersion: iconVersion, className: style('absolute right-4 pt-3xs', {
1929
+ }, children: [option?.innDaData ? (jsxs("span", { children: [jsx(Text, { size: "text-s", children: option?.innDaData?.companyName }), jsxs("div", { className: "space-x-2", children: [jsx(Text, { size: "text-s", font: "font-light", children: formatOption(option) }), jsx(Text, { size: "text-s", font: "font-light", children: option?.innDaData?.companyAddress })] })] })) : (jsx("span", { className: "min-h-6", children: formatOption(option) })), jsx(Icon, { name: "DoneSimpleIcon", width: "16", height: "16", iconVersion: iconVersion, className: style('absolute right-4 pt-3xs sm:pt-2xs sm:right-2', {
1926
1930
  hidden: option.key !== value?.key,
1927
1931
  }) })] }, option.key))) })) : null);
1928
1932
 
@@ -3154,9 +3158,9 @@
3154
3158
  const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
3155
3159
  const initialFormState = useMemo(() => getInitialFormState$2(inputs, typeForm), [inputs, typeForm]);
3156
3160
  const router = useRouter();
3161
+ const aspects = useAspects();
3157
3162
  const formValidator = useMemo(() => getFormValidator(inputs), [inputs]);
3158
3163
  const responseTypeDialog = useDialog(ResponseTypeDialog);
3159
- const aspects = useAspects();
3160
3164
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
3161
3165
  const handleSubmit = useCallback(async (formData, ev) => {
3162
3166
  const formatData = getFormatData({ ...formData, ...additionalParams });
@@ -3193,8 +3197,9 @@
3193
3197
  onSubmit: handleSubmit,
3194
3198
  });
3195
3199
  const fieldName = getConsentDataProcessing(inputs)?.name;
3200
+ const consentDataProcessing = fieldName ? field('consentDataProcessing') : undefined;
3196
3201
  return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [jsxs("form", { onSubmit: onSubmit, children: [renderSections(sections, field, { typeForm, additionalParams }), renderAgreementSubmit({
3197
- consentDataProcessing: fieldName ? field('consentDataProcessing') : undefined,
3202
+ consentDataProcessing,
3198
3203
  link,
3199
3204
  button,
3200
3205
  typeForm,
@@ -5216,84 +5221,81 @@
5216
5221
 
5217
5222
  const latinPattern = /^[\u0041-\u005A\u0061-\u007A\s]+$/u;
5218
5223
  const isLatin = (_ = '') => latinPattern.test(_);
5219
- // eslint-disable-next-line max-lines-per-function
5220
- const autoTranslateToLatin = (str) => {
5221
- const replacer = {
5222
- А: 'A',
5223
- Б: 'B',
5224
- В: 'V',
5225
- Г: 'G',
5226
- Д: 'D',
5227
- Е: 'E',
5228
- Ё: 'E',
5229
- Ж: 'ZH',
5230
- З: 'Z',
5231
- И: 'I',
5232
- Й: 'I',
5233
- К: 'K',
5234
- Л: 'L',
5235
- М: 'M',
5236
- Н: 'N',
5237
- О: 'O',
5238
- П: 'P',
5239
- Р: 'R',
5240
- С: 'S',
5241
- Т: 'T',
5242
- У: 'U',
5243
- Ф: 'F',
5244
- Х: 'KH',
5245
- Ц: 'TS',
5246
- Ч: 'CH',
5247
- Ш: 'SH',
5248
- Щ: 'SHCH',
5249
- Ъ: 'IE',
5250
- Ы: 'Y',
5251
- Ь: '',
5252
- Э: 'E',
5253
- Ю: 'YU',
5254
- Я: 'YA',
5255
- '': '',
5256
- // Lower case
5257
- а: 'A',
5258
- б: 'B',
5259
- в: 'V',
5260
- г: 'G',
5261
- д: 'D',
5262
- е: 'E',
5263
- ё: 'E',
5264
- ж: 'ZH',
5265
- з: 'Z',
5266
- и: 'I',
5267
- й: 'I',
5268
- к: 'K',
5269
- л: 'L',
5270
- м: 'M',
5271
- н: 'N',
5272
- о: 'O',
5273
- п: 'P',
5274
- р: 'R',
5275
- с: 'S',
5276
- т: 'T',
5277
- у: 'U',
5278
- ф: 'F',
5279
- х: 'KH',
5280
- ц: 'TS',
5281
- ч: 'CH',
5282
- ш: 'SH',
5283
- щ: 'SHCH',
5284
- ъ: 'IE',
5285
- ы: 'Y',
5286
- ь: '',
5287
- э: 'E',
5288
- ю: 'YU',
5289
- я: 'YA',
5290
- '.': '.',
5291
- ',': ',',
5292
- '-': '-',
5293
- ' ': ' ',
5294
- };
5295
- return str.replace(/[А-ЯЁа-яё,. -]/g, (_) => replacer[_.toLowerCase()].toUpperCase() || '');
5296
- };
5224
+ const REPLACER = {
5225
+ А: 'A',
5226
+ Б: 'B',
5227
+ В: 'V',
5228
+ Г: 'G',
5229
+ Д: 'D',
5230
+ Е: 'E',
5231
+ Ё: 'E',
5232
+ Ж: 'ZH',
5233
+ З: 'Z',
5234
+ И: 'I',
5235
+ Й: 'I',
5236
+ К: 'K',
5237
+ Л: 'L',
5238
+ М: 'M',
5239
+ Н: 'N',
5240
+ О: 'O',
5241
+ П: 'P',
5242
+ Р: 'R',
5243
+ С: 'S',
5244
+ Т: 'T',
5245
+ У: 'U',
5246
+ Ф: 'F',
5247
+ Х: 'KH',
5248
+ Ц: 'TS',
5249
+ Ч: 'CH',
5250
+ Ш: 'SH',
5251
+ Щ: 'SHCH',
5252
+ Ъ: 'IE',
5253
+ Ы: 'Y',
5254
+ Ь: '',
5255
+ Э: 'E',
5256
+ Ю: 'YU',
5257
+ Я: 'YA',
5258
+ '': '',
5259
+ // Lower case
5260
+ а: 'A',
5261
+ б: 'B',
5262
+ в: 'V',
5263
+ г: 'G',
5264
+ д: 'D',
5265
+ е: 'E',
5266
+ ё: 'E',
5267
+ ж: 'ZH',
5268
+ з: 'Z',
5269
+ и: 'I',
5270
+ й: 'I',
5271
+ к: 'K',
5272
+ л: 'L',
5273
+ м: 'M',
5274
+ н: 'N',
5275
+ о: 'O',
5276
+ п: 'P',
5277
+ р: 'R',
5278
+ с: 'S',
5279
+ т: 'T',
5280
+ у: 'U',
5281
+ ф: 'F',
5282
+ х: 'KH',
5283
+ ц: 'TS',
5284
+ ч: 'CH',
5285
+ ш: 'SH',
5286
+ щ: 'SHCH',
5287
+ ъ: 'IE',
5288
+ ы: 'Y',
5289
+ ь: '',
5290
+ э: 'E',
5291
+ ю: 'YU',
5292
+ я: 'YA',
5293
+ '.': '.',
5294
+ ',': ',',
5295
+ '-': '-',
5296
+ ' ': ' ',
5297
+ };
5298
+ const autoTranslateToLatin = (str) => str.replace(/[А-ЯЁа-яё,. -]/g, (_) => REPLACER[_.toLowerCase()].toUpperCase() || '');
5297
5299
 
5298
5300
  const MAX_LENGTH$1 = 20;
5299
5301
  const LatinNameField = JSX(({ field, input }) => {
@@ -10344,7 +10346,8 @@
10344
10346
  const ExchangeRateTile = JSX(({ className = '', title = 'Курсы обмена валют', button, ...rest }) => {
10345
10347
  const currentLocation = useLocation();
10346
10348
  const exchangeRates = useFetchExchangeRateData(currentLocation);
10347
- const currencyRates = getCurrencyRates(exchangeRates?.exchangeRate?.currencies);
10349
+ const filteredCurrencyRates = exchangeRates?.exchangeRate?.currencies?.filter((_) => _.buyExchangeRate !== 0 || _.saleExchangeRate !== 0);
10350
+ const currencyRates = getCurrencyRates(filteredCurrencyRates);
10348
10351
  const currencyRatesBuy = currencyRates.filter((_) => _.buyExchangeRate);
10349
10352
  currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
10350
10353
  const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
@@ -11947,7 +11950,7 @@
11947
11950
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
11948
11951
  });
11949
11952
 
11950
- const packageVersion = "0.14.903";
11953
+ const packageVersion = "0.14.904";
11951
11954
 
11952
11955
  exports.Blocks = Blocks;
11953
11956
  exports.ContentPage = ContentPage;