@redneckz/wildless-cms-uni-blocks 0.14.939 → 0.14.943

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 (63) hide show
  1. package/bundle/api/getSubmitBody.d.ts +96 -96
  2. package/bundle/bundle.umd.js +13 -9
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/api/getSubmitBody.d.ts +96 -96
  5. package/dist/api/getSubmitBody.js +3 -1
  6. package/dist/api/getSubmitBody.js.map +1 -1
  7. package/dist/components/ApplicationForm/getFormatData.js +1 -1
  8. package/dist/components/ApplicationForm/getFormatData.js.map +1 -1
  9. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -1
  10. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  11. package/dist/components/ContentPage/ContentPage.js +3 -3
  12. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  13. package/dist/components/TabsLayout/TabsLayout.js +4 -2
  14. package/dist/components/TabsLayout/TabsLayout.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/getFormatData.js +1 -1
  19. package/lib/components/ApplicationForm/getFormatData.js.map +1 -1
  20. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -1
  21. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  22. package/lib/components/ContentPage/ContentPage.js +3 -3
  23. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  24. package/lib/components/TabsLayout/TabsLayout.js +4 -2
  25. package/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  26. package/mobile/bundle/api/getSubmitBody.d.ts +96 -96
  27. package/mobile/bundle/bundle.umd.js +13 -9
  28. package/mobile/bundle/bundle.umd.min.js +1 -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/getFormatData.js +1 -1
  33. package/mobile/dist/components/ApplicationForm/getFormatData.js.map +1 -1
  34. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -1
  35. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  36. package/mobile/dist/components/ContentPage/ContentPage.js +3 -3
  37. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  38. package/mobile/dist/components/TabsLayout/TabsLayout.js +4 -2
  39. package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  40. package/mobile/lib/api/getSubmitBody.d.ts +96 -96
  41. package/mobile/lib/api/getSubmitBody.js +3 -1
  42. package/mobile/lib/api/getSubmitBody.js.map +1 -1
  43. package/mobile/lib/components/ApplicationForm/getFormatData.js +1 -1
  44. package/mobile/lib/components/ApplicationForm/getFormatData.js.map +1 -1
  45. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -1
  46. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  47. package/mobile/lib/components/ContentPage/ContentPage.js +3 -3
  48. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  49. package/mobile/lib/components/TabsLayout/TabsLayout.js +4 -2
  50. package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  51. package/mobile/src/api/getSubmitBody.ts +4 -0
  52. package/mobile/src/components/ApplicationForm/getFormatData.tsx +0 -1
  53. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -1
  54. package/mobile/src/components/ContentPage/ContentPage.tsx +10 -5
  55. package/mobile/src/components/TabsLayout/TabsLayout.tsx +7 -2
  56. package/package.json +1 -1
  57. package/src/api/getSubmitBody.ts +4 -0
  58. package/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
  59. package/src/components/ApplicationForm/getFormatData.tsx +0 -1
  60. package/src/components/ApplicationForm/handlers.ts +3 -1
  61. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -1
  62. package/src/components/ContentPage/ContentPage.tsx +10 -5
  63. package/src/components/TabsLayout/TabsLayout.tsx +7 -2
@@ -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'
@@ -7086,6 +7088,7 @@
7086
7088
  const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
7087
7089
  const inputs = useMemo(() => getInputs(applicationFormData), [applicationFormData]);
7088
7090
  const noConsentDialog = useDialog(NoConsentDialog);
7091
+ const isFrame = isIFrame();
7089
7092
  useIFrameMode();
7090
7093
  const extendedValidatorObj = useMemo(() => getExtendedValidatorObj(productType), [productType]);
7091
7094
  const formValidator = useMemo(() => getFormValidator(inputs, extendedValidatorObj), [inputs, extendedValidatorObj]);
@@ -7139,7 +7142,7 @@
7139
7142
  reset();
7140
7143
  }
7141
7144
  }, [leadForm?.current, esiaStatus]);
7142
- return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus ? (jsx(EsiaLoginBanner, { onChangeEsiaStatus: setEsiaStatus, productType: productType })) : null, jsxs("form", { onSubmit: onSubmitWithPrecondition, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
7145
+ return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus && !isFrame ? (jsx(EsiaLoginBanner, { onChangeEsiaStatus: setEsiaStatus, productType: productType })) : null, jsxs("form", { onSubmit: onSubmitWithPrecondition, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
7143
7146
  });
7144
7147
  const getInputs = (applicationFormData) => (applicationFormData?.flatMap((_) => _?.inputs) || []);
7145
7148
  const getExtendedValidatorObj = (productType) => ({
@@ -12040,6 +12043,7 @@
12040
12043
  ({ className = '', tabs = [], block, tabsType, showCounter = false, isSticky = false, ...rest }) => {
12041
12044
  const id = getId(block || {});
12042
12045
  const router = useRouter();
12046
+ const isFrame = isIFrame();
12043
12047
  const isEveryLink = tabs.every((_) => _?.type === 'link');
12044
12048
  const query = new URLSearchParams(decodeURIComponent(globalThis?.location?.search || ''));
12045
12049
  const tabId = getTabId(id);
@@ -12072,10 +12076,10 @@
12072
12076
  updateUrlSearchTabParam(_, index);
12073
12077
  }
12074
12078
  }, [tabsCounted]);
12075
- return (jsxs(BlockWrapper, { className: style({ [STICKY_STYLE]: [isSticky, isEveryLink].every(Boolean) }, className), defaultPadding: "p-0", block: block, ...rest, children: [renderTabsLayout({
12079
+ return (jsxs(BlockWrapper, { className: style({ [STICKY_STYLE]: [isSticky, isEveryLink, !isFrame].every(Boolean) }, className), defaultPadding: "p-0", block: block, ...rest, children: [renderTabsLayout({
12076
12080
  className: style({
12077
12081
  'pb-1': [block?.slots, tabsType === 'default'].every(Boolean),
12078
- [STICKY_STYLE]: [isSticky, !isEveryLink].every(Boolean),
12082
+ [STICKY_STYLE]: [isSticky, !isEveryLink, !isFrame].every(Boolean),
12079
12083
  }),
12080
12084
  items: getItems(tabs, tabsCounted),
12081
12085
  activeItem,
@@ -12354,22 +12358,22 @@
12354
12358
  blockDecorator,
12355
12359
  parent: data,
12356
12360
  };
12357
- return (jsxs("div", { "data-theme": data.colorPalette || 'pc', children: [jsxs("section", { className: style('@container relative', data.style, className), children: [!isFrame && slots?.[HEADER_SLOT]?.length ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.[HEADER_SLOT], { ...options, slotName: HEADER_SLOT }) })) : null, jsxs("div", { className: "container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: [renderChildren({
12361
+ return (jsxs("div", { "data-theme": data.colorPalette || 'pc', children: [jsxs("section", { className: style('@container relative', data.style, className), children: [slots?.[HEADER_SLOT]?.length ? (jsx("div", { className: style({ hidden: isFrame }, 'relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]'), children: renderBlocksList(slots?.[HEADER_SLOT], { ...options, slotName: HEADER_SLOT }) })) : null, jsxs("div", { className: "container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: [renderChildren({
12358
12362
  block: data,
12359
12363
  options,
12360
12364
  extraProps: { className: 'scroll-mt-12' },
12361
12365
  }), !isFrame &&
12362
- renderBlocksList(slots?.[FOOTER_SLOT], { ...options, slotName: FOOTER_SLOT })] })] }), !isFrame && slots?.[STICKY_FOOTER_SLOT]?.length ? (jsx("div", { className: "fixed w-full bottom-0 left-0 z-[100]", children: renderBlocksList(slots?.[STICKY_FOOTER_SLOT], {
12366
+ renderBlocksList(slots?.[FOOTER_SLOT], { ...options, slotName: FOOTER_SLOT })] })] }), slots?.[STICKY_FOOTER_SLOT]?.length ? (jsx("div", { className: style({ hidden: isFrame }, 'fixed w-full bottom-0 left-0 z-[100]'), children: renderBlocksList(slots?.[STICKY_FOOTER_SLOT], {
12363
12367
  ...options,
12364
12368
  slotName: STICKY_FOOTER_SLOT,
12365
- }) })) : null, jsx(DialogManager, {}), jsx(PopupManager, {}), jsx(CookiePopup, { __html: resolvedPageContent?.cookieContent?.__html })] }));
12369
+ }) })) : null, jsx(DialogManager, {}), jsx(PopupManager, {}), !isFrame ? jsx(CookiePopup, { __html: resolvedPageContent?.cookieContent?.__html }) : null] }));
12366
12370
  });
12367
12371
  Object.assign(ContentPage, {
12368
12372
  childrenTypes: [],
12369
12373
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
12370
12374
  });
12371
12375
 
12372
- const packageVersion = "0.14.938";
12376
+ const packageVersion = "0.14.940";
12373
12377
 
12374
12378
  exports.Blocks = Blocks;
12375
12379
  exports.ContentPage = ContentPage;