@redneckz/wildless-cms-uni-blocks 0.14.191 → 0.14.193

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 (47) hide show
  1. package/bundle/bundle.umd.js +33 -34
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
  4. package/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
  5. package/dist/components/ApplicationForm/ApplicationFormFeedback.js +35 -3
  6. package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  7. package/dist/components/Calculator/constants.js +2 -2
  8. package/dist/components/Calculator/constants.js.map +1 -1
  9. package/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
  10. package/lib/components/ApplicationForm/ApplicationFormFeedback.js +33 -2
  11. package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  12. package/lib/components/Calculator/constants.js +2 -2
  13. package/lib/components/Calculator/constants.js.map +1 -1
  14. package/mobile/bundle/bundle.umd.js +33 -34
  15. package/mobile/bundle/bundle.umd.min.js +1 -1
  16. package/mobile/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
  17. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
  18. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +35 -3
  19. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  20. package/mobile/dist/components/Calculator/constants.js +2 -2
  21. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  22. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +13 -0
  23. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +33 -2
  24. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  25. package/mobile/lib/components/Calculator/constants.js +2 -2
  26. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  27. package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +52 -2
  28. package/mobile/src/components/Calculator/constants.ts +2 -2
  29. package/package.json +1 -1
  30. package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +52 -2
  31. package/src/components/Calculator/constants.ts +2 -2
  32. package/bundle/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
  33. package/dist/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
  34. package/dist/components/ApplicationForm/handleSubmitFeedback.js +0 -38
  35. package/dist/components/ApplicationForm/handleSubmitFeedback.js.map +0 -1
  36. package/lib/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
  37. package/lib/components/ApplicationForm/handleSubmitFeedback.js +0 -35
  38. package/lib/components/ApplicationForm/handleSubmitFeedback.js.map +0 -1
  39. package/mobile/bundle/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
  40. package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
  41. package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.js +0 -38
  42. package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.js.map +0 -1
  43. package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.d.ts +0 -15
  44. package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.js +0 -35
  45. package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.js.map +0 -1
  46. package/mobile/src/components/ApplicationForm/handleSubmitFeedback.tsx +0 -54
  47. package/src/components/ApplicationForm/handleSubmitFeedback.tsx +0 -54
@@ -1453,37 +1453,6 @@
1453
1453
  { key: 'Юридическое лицо / ИП' },
1454
1454
  ];
1455
1455
 
1456
- const feedbackValidatorDefaultObject = {
1457
- typeForm: defaultValidator,
1458
- region: defaultValidator,
1459
- surname: defaultValidator,
1460
- name: nameValidator,
1461
- feedbackMethod: defaultValidator,
1462
- phone: phoneValidator,
1463
- email: defaultValidator,
1464
- comment: defaultValidator,
1465
- consentDataProcessing: checkboxValidator,
1466
- };
1467
- const handleSubmitFeedback = (formState, onSubmit) => {
1468
- const isLegal = getLegalEntity(formState?.typeForm.key, formState?.serviceDirection?.key);
1469
- const feedbackValidator = objectValidator({
1470
- ...feedbackValidatorDefaultObject,
1471
- ...getFeedbackValidationObject(formState, isLegal),
1472
- });
1473
- isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, !isLegal);
1474
- };
1475
- const getFeedbackValidationObject = (formState, isLegal) => {
1476
- if (isLegal) {
1477
- return { addressBranch: defaultValidator, inn: innValidator };
1478
- }
1479
- else if (formState.typeForm.key === 'FEEDBACK') {
1480
- return { birthday: defaultValidator };
1481
- }
1482
- else {
1483
- return { addressBranch: defaultValidator };
1484
- }
1485
- };
1486
-
1487
1456
  const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
1488
1457
  return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => {
1489
1458
  const resultOptions = { ...commonOptions, ...options };
@@ -1689,6 +1658,17 @@
1689
1658
  comment: '',
1690
1659
  consentDataProcessing: false,
1691
1660
  };
1661
+ const feedbackValidatorDefaultObject = {
1662
+ typeForm: defaultValidator,
1663
+ region: defaultValidator,
1664
+ surname: defaultValidator,
1665
+ name: nameValidator,
1666
+ feedbackMethod: defaultValidator,
1667
+ phone: phoneValidator,
1668
+ email: defaultValidator,
1669
+ comment: defaultValidator,
1670
+ consentDataProcessing: checkboxValidator,
1671
+ };
1692
1672
  const ApplicationFormFeedback = JSX(({ button, link, onSubmit }) => {
1693
1673
  const handleSubmit = useCallback((feedbackFormState) => {
1694
1674
  handleSubmitFeedback(feedbackFormState, onSubmit);
@@ -1702,6 +1682,25 @@
1702
1682
  ? field('secondaryPhone')
1703
1683
  : withValidator(field('secondaryPhone'), phoneValidator)) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) }), jsx(InputControl, { label: "\u0424\u0418\u041E \u0438\u043B\u0438 \u0434\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0432\u0448\u0435\u0433\u043E \u0412\u0430\u0441 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A\u0430 \u0411\u0430\u043D\u043A\u0430", ...field('bankEmpolee') }), jsx(InputControl, { label: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u044F \u0432 \u0411\u0430\u043D\u043A", ...field('applicationDate') })] })) : (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })), jsx(InputControl, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true }), renderAgreementSubmit(field('consentDataProcessing'), link, button)] }) }) }));
1704
1684
  });
1685
+ const handleSubmitFeedback = (formState, onSubmit) => {
1686
+ const isLegal = getLegalEntity(formState?.typeForm.key, formState?.serviceDirection?.key);
1687
+ const feedbackValidator = objectValidator({
1688
+ ...feedbackValidatorDefaultObject,
1689
+ ...getFeedbackValidationObject(formState, isLegal),
1690
+ });
1691
+ isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, !isLegal);
1692
+ };
1693
+ const getFeedbackValidationObject = (formState, isLegal) => {
1694
+ if (isLegal) {
1695
+ return { addressBranch: defaultValidator, inn: innValidator };
1696
+ }
1697
+ else if (formState.typeForm.key === 'FEEDBACK') {
1698
+ return { birthday: defaultValidator };
1699
+ }
1700
+ else {
1701
+ return { addressBranch: defaultValidator };
1702
+ }
1703
+ };
1705
1704
  const getLegalEntity = (typeFormKey = '', serviceDirectionKey = '') => typeFormKey === 'FEEDBACK_QS' && serviceDirectionKey === 'Юридическое лицо / ИП';
1706
1705
 
1707
1706
  const ApplicationFormGrantSupport = JSX((props) => {
@@ -2154,7 +2153,7 @@
2154
2153
  };
2155
2154
  const DEFAULT_DEPOSIT_CALCULATOR_PARAMS = {
2156
2155
  minSum: 50000,
2157
- maxSum: 5000000,
2156
+ maxSum: 100000001,
2158
2157
  minMonths: 2,
2159
2158
  maxMonths: 10,
2160
2159
  rate: 0,
@@ -2163,7 +2162,7 @@
2163
2162
  };
2164
2163
  const DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS = {
2165
2164
  minSum: 1000,
2166
- maxSum: 500000,
2165
+ maxSum: 100000001,
2167
2166
  minDays: BUSINESS_MIN_DAYS,
2168
2167
  maxDays: BUSINESS_MAX_DAYS,
2169
2168
  rate: 0,
@@ -6034,7 +6033,7 @@
6034
6033
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6035
6034
  });
6036
6035
 
6037
- const packageVersion = "0.14.190";
6036
+ const packageVersion = "0.14.192";
6038
6037
 
6039
6038
  exports.Blocks = Blocks;
6040
6039
  exports.ContentPage = ContentPage;