@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
@@ -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'
@@ -7078,6 +7080,7 @@
7078
7080
  const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
7079
7081
  const inputs = useMemo(() => getInputs(applicationFormData), [applicationFormData]);
7080
7082
  const noConsentDialog = useDialog(NoConsentDialog);
7083
+ const isFrame = isIFrame();
7081
7084
  useIFrameMode();
7082
7085
  const extendedValidatorObj = useMemo(() => getExtendedValidatorObj(productType), [productType]);
7083
7086
  const formValidator = useMemo(() => getFormValidator(inputs, extendedValidatorObj), [inputs, extendedValidatorObj]);
@@ -7131,7 +7134,7 @@
7131
7134
  reset();
7132
7135
  }
7133
7136
  }, [leadForm?.current, esiaStatus]);
7134
- 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] })] }));
7137
+ 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] })] }));
7135
7138
  });
7136
7139
  const getInputs = (applicationFormData) => (applicationFormData?.flatMap((_) => _?.inputs) || []);
7137
7140
  const getExtendedValidatorObj = (productType) => ({
@@ -12174,6 +12177,7 @@
12174
12177
  ({ className = '', tabs = [], block, tabsType, showCounter = false, isSticky = false, ...rest }) => {
12175
12178
  const id = getId(block || {});
12176
12179
  const router = useRouter();
12180
+ const isFrame = isIFrame();
12177
12181
  const isEveryLink = tabs.every((_) => _?.type === 'link');
12178
12182
  const query = new URLSearchParams(decodeURIComponent(globalThis?.location?.search || ''));
12179
12183
  const tabId = getTabId(id);
@@ -12206,10 +12210,10 @@
12206
12210
  updateUrlSearchTabParam(_, index);
12207
12211
  }
12208
12212
  }, [tabsCounted]);
12209
- return (jsxs(BlockWrapper, { className: style({ [STICKY_STYLE]: [isSticky, isEveryLink].every(Boolean) }, className), defaultPadding: "p-0", block: block, ...rest, children: [renderTabsLayout({
12213
+ return (jsxs(BlockWrapper, { className: style({ [STICKY_STYLE]: [isSticky, isEveryLink, !isFrame].every(Boolean) }, className), defaultPadding: "p-0", block: block, ...rest, children: [renderTabsLayout({
12210
12214
  className: style({
12211
12215
  'pb-1': [block?.slots, tabsType === 'default'].every(Boolean),
12212
- [STICKY_STYLE]: [isSticky, !isEveryLink].every(Boolean),
12216
+ [STICKY_STYLE]: [isSticky, !isEveryLink, !isFrame].every(Boolean),
12213
12217
  }),
12214
12218
  items: getItems(tabs, tabsCounted),
12215
12219
  activeItem,
@@ -12572,22 +12576,22 @@
12572
12576
  blockDecorator,
12573
12577
  parent: data,
12574
12578
  };
12575
- 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({
12579
+ 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({
12576
12580
  block: data,
12577
12581
  options,
12578
12582
  extraProps: { className: 'scroll-mt-12' },
12579
12583
  }), !isFrame &&
12580
- 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], {
12584
+ 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], {
12581
12585
  ...options,
12582
12586
  slotName: STICKY_FOOTER_SLOT,
12583
- }) })) : null, jsx(DialogManager, {}), jsx(PopupManager, {}), jsx(CookiePopup, { __html: resolvedPageContent?.cookieContent?.__html })] }));
12587
+ }) })) : null, jsx(DialogManager, {}), jsx(PopupManager, {}), !isFrame ? jsx(CookiePopup, { __html: resolvedPageContent?.cookieContent?.__html }) : null] }));
12584
12588
  });
12585
12589
  Object.assign(ContentPage, {
12586
12590
  childrenTypes: [],
12587
12591
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
12588
12592
  });
12589
12593
 
12590
- const packageVersion = "0.14.938";
12594
+ const packageVersion = "0.14.940";
12591
12595
 
12592
12596
  exports.Blocks = Blocks;
12593
12597
  exports.ContentPage = ContentPage;