@redneckz/wildless-cms-uni-blocks 0.14.940 → 0.14.944

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 (57) hide show
  1. package/bundle/api/getSubmitBody.d.ts +96 -96
  2. package/bundle/bundle.umd.js +11 -6
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationForm/handlers.d.ts +2 -1
  5. package/dist/api/getSubmitBody.d.ts +96 -96
  6. package/dist/api/getSubmitBody.js +3 -1
  7. package/dist/api/getSubmitBody.js.map +1 -1
  8. package/dist/components/ApplicationForm/ApplicationForm.js +4 -1
  9. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  10. package/dist/components/ApplicationForm/getFormatData.js +1 -1
  11. package/dist/components/ApplicationForm/getFormatData.js.map +1 -1
  12. package/dist/components/ApplicationForm/handlers.d.ts +2 -1
  13. package/dist/components/ApplicationForm/handlers.js +2 -2
  14. package/dist/components/ApplicationForm/handlers.js.map +1 -1
  15. package/lib/api/getSubmitBody.d.ts +96 -96
  16. package/lib/api/getSubmitBody.js +3 -1
  17. package/lib/api/getSubmitBody.js.map +1 -1
  18. package/lib/components/ApplicationForm/ApplicationForm.js +4 -1
  19. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  20. package/lib/components/ApplicationForm/getFormatData.js +1 -1
  21. package/lib/components/ApplicationForm/getFormatData.js.map +1 -1
  22. package/lib/components/ApplicationForm/handlers.d.ts +2 -1
  23. package/lib/components/ApplicationForm/handlers.js +2 -2
  24. package/lib/components/ApplicationForm/handlers.js.map +1 -1
  25. package/mobile/bundle/api/getSubmitBody.d.ts +96 -96
  26. package/mobile/bundle/bundle.umd.js +11 -6
  27. package/mobile/bundle/bundle.umd.min.js +1 -1
  28. package/mobile/bundle/components/ApplicationForm/handlers.d.ts +2 -1
  29. package/mobile/dist/api/getSubmitBody.d.ts +96 -96
  30. package/mobile/dist/api/getSubmitBody.js +3 -1
  31. package/mobile/dist/api/getSubmitBody.js.map +1 -1
  32. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +4 -1
  33. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  34. package/mobile/dist/components/ApplicationForm/getFormatData.js +1 -1
  35. package/mobile/dist/components/ApplicationForm/getFormatData.js.map +1 -1
  36. package/mobile/dist/components/ApplicationForm/handlers.d.ts +2 -1
  37. package/mobile/dist/components/ApplicationForm/handlers.js +2 -2
  38. package/mobile/dist/components/ApplicationForm/handlers.js.map +1 -1
  39. package/mobile/lib/api/getSubmitBody.d.ts +96 -96
  40. package/mobile/lib/api/getSubmitBody.js +3 -1
  41. package/mobile/lib/api/getSubmitBody.js.map +1 -1
  42. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +4 -1
  43. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  44. package/mobile/lib/components/ApplicationForm/getFormatData.js +1 -1
  45. package/mobile/lib/components/ApplicationForm/getFormatData.js.map +1 -1
  46. package/mobile/lib/components/ApplicationForm/handlers.d.ts +2 -1
  47. package/mobile/lib/components/ApplicationForm/handlers.js +2 -2
  48. package/mobile/lib/components/ApplicationForm/handlers.js.map +1 -1
  49. package/mobile/src/api/getSubmitBody.ts +4 -0
  50. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
  51. package/mobile/src/components/ApplicationForm/getFormatData.tsx +0 -1
  52. package/mobile/src/components/ApplicationForm/handlers.ts +3 -1
  53. package/package.json +1 -1
  54. package/src/api/getSubmitBody.ts +4 -0
  55. package/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
  56. package/src/components/ApplicationForm/getFormatData.tsx +0 -1
  57. package/src/components/ApplicationForm/handlers.ts +3 -1
@@ -1638,7 +1638,7 @@
1638
1638
 
1639
1639
  /* eslint-disable @typescript-eslint/no-unused-vars */
1640
1640
  const getFormatData = (data) => {
1641
- const { acquiringType, onlineCheckout, posTerminal, amount, term, annualRevenue, serviceType, vedTypes, region, inn, sufferedFrom, situationDescription, applierType, isPremium, dadataPartyNameSelect, partnerSymbolCode, dadataPartyInnSelect, ...usedData } = data;
1641
+ const { acquiringType, onlineCheckout, posTerminal, amount, term, annualRevenue, serviceType, vedTypes, region, inn, sufferedFrom, situationDescription, applierType, isPremium, dadataPartyNameSelect, dadataPartyInnSelect, ...usedData } = data;
1642
1642
  const partnerComments = acquiringType || annualRevenue ? getPartnerComments(data) : null;
1643
1643
  const formatData = {
1644
1644
  ...usedData,
@@ -1745,7 +1745,7 @@
1745
1745
  const formatPhone = (phone) => phone?.replace(/[^+\d]/g, '');
1746
1746
 
1747
1747
  const getSubmitBody = (body, isNaturalPerson, router) => {
1748
- const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, inn, fullRegion, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, partnerName, russianPhone, ...staticBody } = body;
1748
+ const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, inn, fullRegion, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, partnerName, russianPhone, partnerSymbolCode, ...staticBody } = body;
1749
1749
  return {
1750
1750
  typeForm,
1751
1751
  ...getRegion(region, isNaturalPerson),
@@ -1766,6 +1766,7 @@
1766
1766
  ...formatPFForm(typeForm, {
1767
1767
  fullRegion,
1768
1768
  partnerName,
1769
+ partnerSymbolCode,
1769
1770
  }),
1770
1771
  ...staticBody,
1771
1772
  };
@@ -1790,6 +1791,7 @@
1790
1791
  ? {
1791
1792
  region: data?.fullRegion,
1792
1793
  partner: data?.partnerName,
1794
+ partnerId: data?.partnerSymbolCode,
1793
1795
  }
1794
1796
  : {};
1795
1797
  const addPageSlug = (typeForm, router) => typeForm === 'UNIVERSAL'
@@ -1930,8 +1932,8 @@
1930
1932
  }
1931
1933
  }
1932
1934
  };
1933
- const handleDefault = async ({ formatData, data, aspects = {}, ev, router, responseTypeDialog, }) => {
1934
- const ok = Boolean(await API$2.send(formatData, router, false)); // или проверять endpoint === 'lead'
1935
+ const handleDefault = async ({ formatData, data, aspects = {}, ev, router, responseTypeDialog, endpoint, }) => {
1936
+ const ok = Boolean(await API$2.send(formatData, router, endpoint === 'lead'));
1935
1937
  responseTypeDialog.open({ ok });
1936
1938
  if (ok) {
1937
1939
  handleAspects({ aspectsAttributes: data, aspects, ev });
@@ -3050,7 +3052,9 @@
3050
3052
  callback: handleCallback,
3051
3053
  default: handleDefault,
3052
3054
  };
3053
- const ApplicationForm = UniBlock(({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, onSuccess, ...rest }) => {
3055
+ const ApplicationForm = UniBlock(
3056
+ // eslint-disable-next-line max-lines-per-function
3057
+ ({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, onSuccess, ...rest }) => {
3054
3058
  const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
3055
3059
  const initialFormState = useMemo(() => getInitialFormState$2(inputs, typeForm), [inputs, typeForm]);
3056
3060
  const router = useRouter();
@@ -3070,6 +3074,7 @@
3070
3074
  responseTypeDialog,
3071
3075
  verifyPhoneDialog,
3072
3076
  onSuccess,
3077
+ endpoint,
3073
3078
  });
3074
3079
  }, [typeForm]);
3075
3080
  const [, { field, onSubmit }] = useForm(initialFormState, {
@@ -12371,7 +12376,7 @@
12371
12376
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
12372
12377
  });
12373
12378
 
12374
- const packageVersion = "0.14.939";
12379
+ const packageVersion = "0.14.943";
12375
12380
 
12376
12381
  exports.Blocks = Blocks;
12377
12382
  exports.ContentPage = ContentPage;