@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
@@ -1630,7 +1630,7 @@
1630
1630
 
1631
1631
  /* eslint-disable @typescript-eslint/no-unused-vars */
1632
1632
  const getFormatData = (data) => {
1633
- const { acquiringType, onlineCheckout, posTerminal, amount, term, annualRevenue, serviceType, vedTypes, region, inn, sufferedFrom, situationDescription, applierType, isPremium, dadataPartyNameSelect, partnerSymbolCode, dadataPartyInnSelect, ...usedData } = data;
1633
+ const { acquiringType, onlineCheckout, posTerminal, amount, term, annualRevenue, serviceType, vedTypes, region, inn, sufferedFrom, situationDescription, applierType, isPremium, dadataPartyNameSelect, dadataPartyInnSelect, ...usedData } = data;
1634
1634
  const partnerComments = acquiringType || annualRevenue ? getPartnerComments(data) : null;
1635
1635
  const formatData = {
1636
1636
  ...usedData,
@@ -1737,7 +1737,7 @@
1737
1737
  const formatPhone = (phone) => phone?.replace(/[^+\d]/g, '');
1738
1738
 
1739
1739
  const getSubmitBody = (body, isNaturalPerson, router) => {
1740
- const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, inn, fullRegion, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, partnerName, russianPhone, ...staticBody } = body;
1740
+ const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, inn, fullRegion, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, partnerName, russianPhone, partnerSymbolCode, ...staticBody } = body;
1741
1741
  return {
1742
1742
  typeForm,
1743
1743
  ...getRegion(region, isNaturalPerson),
@@ -1758,6 +1758,7 @@
1758
1758
  ...formatPFForm(typeForm, {
1759
1759
  fullRegion,
1760
1760
  partnerName,
1761
+ partnerSymbolCode,
1761
1762
  }),
1762
1763
  ...staticBody,
1763
1764
  };
@@ -1782,6 +1783,7 @@
1782
1783
  ? {
1783
1784
  region: data?.fullRegion,
1784
1785
  partner: data?.partnerName,
1786
+ partnerId: data?.partnerSymbolCode,
1785
1787
  }
1786
1788
  : {};
1787
1789
  const addPageSlug = (typeForm, router) => typeForm === 'UNIVERSAL'
@@ -1922,8 +1924,8 @@
1922
1924
  }
1923
1925
  }
1924
1926
  };
1925
- const handleDefault = async ({ formatData, data, aspects = {}, ev, router, responseTypeDialog, }) => {
1926
- const ok = Boolean(await API$2.send(formatData, router, false)); // или проверять endpoint === 'lead'
1927
+ const handleDefault = async ({ formatData, data, aspects = {}, ev, router, responseTypeDialog, endpoint, }) => {
1928
+ const ok = Boolean(await API$2.send(formatData, router, endpoint === 'lead'));
1927
1929
  responseTypeDialog.open({ ok });
1928
1930
  if (ok) {
1929
1931
  handleAspects({ aspectsAttributes: data, aspects, ev });
@@ -3042,7 +3044,9 @@
3042
3044
  callback: handleCallback,
3043
3045
  default: handleDefault,
3044
3046
  };
3045
- const ApplicationForm = UniBlock(({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, onSuccess, ...rest }) => {
3047
+ const ApplicationForm = UniBlock(
3048
+ // eslint-disable-next-line max-lines-per-function
3049
+ ({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, onSuccess, ...rest }) => {
3046
3050
  const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
3047
3051
  const initialFormState = useMemo(() => getInitialFormState$2(inputs, typeForm), [inputs, typeForm]);
3048
3052
  const router = useRouter();
@@ -3062,6 +3066,7 @@
3062
3066
  responseTypeDialog,
3063
3067
  verifyPhoneDialog,
3064
3068
  onSuccess,
3069
+ endpoint,
3065
3070
  });
3066
3071
  }, [typeForm]);
3067
3072
  const [, { field, onSubmit }] = useForm(initialFormState, {
@@ -12589,7 +12594,7 @@
12589
12594
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
12590
12595
  });
12591
12596
 
12592
- const packageVersion = "0.14.939";
12597
+ const packageVersion = "0.14.943";
12593
12598
 
12594
12599
  exports.Blocks = Blocks;
12595
12600
  exports.ContentPage = ContentPage;