@redneckz/wildless-cms-uni-blocks 0.14.686 → 0.14.688

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 (56) hide show
  1. package/bundle/bundle.umd.js +7 -9
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  4. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  5. package/dist/components/CreditForm/calculateInputs.js +2 -1
  6. package/dist/components/CreditForm/calculateInputs.js.map +1 -1
  7. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +1 -1
  8. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  9. package/dist/ui-kit/FormField/Fields/SnilsField.js +1 -4
  10. package/dist/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
  11. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
  12. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  13. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  14. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  15. package/lib/components/CreditForm/calculateInputs.js +2 -1
  16. package/lib/components/CreditForm/calculateInputs.js.map +1 -1
  17. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +1 -1
  18. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  19. package/lib/ui-kit/FormField/Fields/SnilsField.js +1 -4
  20. package/lib/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
  21. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
  22. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  23. package/mobile/bundle/bundle.umd.js +7 -9
  24. package/mobile/bundle/bundle.umd.min.js +1 -1
  25. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  26. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  27. package/mobile/dist/components/CreditForm/calculateInputs.js +2 -1
  28. package/mobile/dist/components/CreditForm/calculateInputs.js.map +1 -1
  29. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +1 -1
  30. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  31. package/mobile/dist/ui-kit/FormField/Fields/SnilsField.js +1 -4
  32. package/mobile/dist/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
  33. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
  34. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  35. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  36. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  37. package/mobile/lib/components/CreditForm/calculateInputs.js +2 -1
  38. package/mobile/lib/components/CreditForm/calculateInputs.js.map +1 -1
  39. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +1 -1
  40. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  41. package/mobile/lib/ui-kit/FormField/Fields/SnilsField.js +1 -4
  42. package/mobile/lib/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
  43. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
  44. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  45. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +1 -1
  46. package/mobile/src/components/CreditForm/calculateInputs.ts +4 -1
  47. package/mobile/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +1 -1
  48. package/mobile/src/ui-kit/FormField/Fields/SnilsField.tsx +7 -11
  49. package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +1 -1
  50. package/package.json +1 -1
  51. package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +1 -1
  52. package/src/components/CreditForm/calculateInputs.ts +4 -1
  53. package/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +1 -1
  54. package/src/ui-kit/FormField/Fields/SnilsField.tsx +7 -11
  55. package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.fixture.tsx +1 -6
  56. package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +1 -1
@@ -3754,10 +3754,7 @@
3754
3754
 
3755
3755
  const InputSnilsControl = JSX(({ className, label, value, error, onChange, onBlur, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(SnilsInput, { "aria-label": label, label: getRequiredLabel({ label, errors: rest?.errors }), valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, placeholder: "___-___-___ __" }), renderErrorText(error)] })));
3756
3756
 
3757
- const SnilsField = JSX(({ field, input }) => {
3758
- const isPfrFlg = field('consentPfrFlg')?.value;
3759
- return (jsx(InputSnilsControl, { label: "\u0421\u041D\u0418\u041B\u0421", ...getValidation(field('snils'), validatorObj.snils, isPfrFlg ? input?.required : false), ...input }));
3760
- });
3757
+ const SnilsField = JSX(({ field, input }) => (jsx(InputSnilsControl, { label: "\u0421\u041D\u0418\u041B\u0421", ...getValidation(field('snils'), validatorObj.snils, input?.required), ...input })));
3761
3758
 
3762
3759
  const FIELD_NAME = 'surname';
3763
3760
  const SurnameField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 60, disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME), ...getValidation(field('surname'), validatorObj.surname, input?.required), ...input })));
@@ -4397,7 +4394,7 @@
4397
4394
  };
4398
4395
  };
4399
4396
 
4400
- const VerifyPhoneDialog = JSX(({ close = noop, onClose = noop, title, description, __html, code = true, codeLength = 4, textButton = '', phoneNumber = '+79999999999', }) => {
4397
+ const VerifyPhoneDialog = JSX(({ close = noop, onClose = noop, title, description, __html, code = true, codeLength = 4, textButton = 'Далее', phoneNumber = '+79999999999', }) => {
4401
4398
  const [values, setValues] = useState(Array(codeLength).fill(''));
4402
4399
  const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted, setAttemps, } = useVerifyPhoneDialogSubmit({ values, close });
4403
4400
  const handleSendCode = useCallback(async () => {
@@ -4500,7 +4497,7 @@
4500
4497
  title: 'Подтвердите номер телефона',
4501
4498
  description: `Мы отправили код на ${phone}`,
4502
4499
  phoneNumber: formatPhone(phone),
4503
- textButton: 'Отправить',
4500
+ textButton: 'Далее',
4504
4501
  __html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>
4505
4502
  <ul><li>согласие на запрос информации в БКИ</li></ul>`,
4506
4503
  });
@@ -4714,7 +4711,7 @@
4714
4711
  title: 'Подтвердите номер телефона',
4715
4712
  description: `Мы отправили код на ${phone}`,
4716
4713
  phoneNumber: formatPhone(phone),
4717
- textButton: 'Оформить',
4714
+ textButton: 'Далее',
4718
4715
  __html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${consentsToList(consents)}`,
4719
4716
  });
4720
4717
  const consentsToList = (consents) => `<ul>${consents?.map((_) => '<li>' + _ + '</li>').join('')}</ul>`;
@@ -7377,7 +7374,7 @@
7377
7374
  });
7378
7375
  const checkIsRetiree = (step, getValue) => step === 2 && getValue('employment')?.key === 'RETIREE';
7379
7376
  const checkBusinessOwner = ({ name }, getValue) => name === 'partInBusiness' && getValue('positionOrganization')?.key !== 'BUSINESS_OWNER';
7380
- const checkConsentPfrFlg = ({ name }, getValue) => name === 'snils' && !getValue('consentPfrFlg');
7377
+ const checkConsentPfrFlg = ({ name }, getValue) => name === 'snils' && isSnilsRequired(getValue);
7381
7378
  const checkAddressFillFromESIA = ({ name, filledByEsia }, getValue) => name?.startsWith('address') && getValue('esiaAccountTypeCd')?.key && filledByEsia;
7382
7379
  const checkAddressFact = ({ name }, getValue) => name === 'addressFact' && getValue('addressMatch');
7383
7380
  const checkCondition = ({ condition }, getValue) => condition?.name &&
@@ -7385,6 +7382,7 @@
7385
7382
  const dataValue = getValue(condition?.name);
7386
7383
  return _ !== (dataValue?.key ?? dataValue);
7387
7384
  });
7385
+ const isSnilsRequired = (getValue) => getValue('confirmationIncome')?.key !== 'PFR_CERTIFICATE';
7388
7386
 
7389
7387
  const renderInfo$1 = (inputs = []) => {
7390
7388
  const infoInputs = inputs.filter((_) => _.fieldType === 'info');
@@ -10425,7 +10423,7 @@
10425
10423
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
10426
10424
  });
10427
10425
 
10428
- const packageVersion = "0.14.685";
10426
+ const packageVersion = "0.14.687";
10429
10427
 
10430
10428
  exports.Blocks = Blocks;
10431
10429
  exports.ContentPage = ContentPage;