@redneckz/wildless-cms-uni-blocks 0.14.1019 → 0.14.1021

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 (44) hide show
  1. package/bundle/bundle.umd.js +31 -10
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationForm/VerifyPhoneDialog.d.ts +1 -1
  4. package/bundle/components/ApplicationForm/useVerifyPhoneDialogSubmit.d.ts +1 -1
  5. package/dist/components/ApplicationForm/VerifyPhoneDialog.d.ts +1 -1
  6. package/dist/components/ApplicationForm/handlers.js +12 -2
  7. package/dist/components/ApplicationForm/handlers.js.map +1 -1
  8. package/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.d.ts +1 -1
  9. package/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +1 -1
  10. package/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
  11. package/dist/components/Header/Header.js +13 -1
  12. package/dist/components/Header/Header.js.map +1 -1
  13. package/lib/components/ApplicationForm/VerifyPhoneDialog.d.ts +1 -1
  14. package/lib/components/ApplicationForm/handlers.js +12 -2
  15. package/lib/components/ApplicationForm/handlers.js.map +1 -1
  16. package/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.d.ts +1 -1
  17. package/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +1 -1
  18. package/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
  19. package/lib/components/Header/Header.js +13 -1
  20. package/lib/components/Header/Header.js.map +1 -1
  21. package/mobile/bundle/bundle.umd.js +18 -9
  22. package/mobile/bundle/bundle.umd.min.js +1 -1
  23. package/mobile/bundle/components/ApplicationForm/VerifyPhoneDialog.d.ts +1 -1
  24. package/mobile/bundle/components/ApplicationForm/useVerifyPhoneDialogSubmit.d.ts +1 -1
  25. package/mobile/dist/components/ApplicationForm/VerifyPhoneDialog.d.ts +1 -1
  26. package/mobile/dist/components/ApplicationForm/handlers.js +12 -2
  27. package/mobile/dist/components/ApplicationForm/handlers.js.map +1 -1
  28. package/mobile/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.d.ts +1 -1
  29. package/mobile/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +1 -1
  30. package/mobile/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
  31. package/mobile/lib/components/ApplicationForm/VerifyPhoneDialog.d.ts +1 -1
  32. package/mobile/lib/components/ApplicationForm/handlers.js +12 -2
  33. package/mobile/lib/components/ApplicationForm/handlers.js.map +1 -1
  34. package/mobile/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.d.ts +1 -1
  35. package/mobile/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +1 -1
  36. package/mobile/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
  37. package/mobile/src/components/ApplicationForm/VerifyPhoneDialog.tsx +1 -1
  38. package/mobile/src/components/ApplicationForm/handlers.ts +13 -2
  39. package/mobile/src/components/ApplicationForm/useVerifyPhoneDialogSubmit.tsx +2 -2
  40. package/package.json +1 -1
  41. package/src/components/ApplicationForm/VerifyPhoneDialog.tsx +1 -1
  42. package/src/components/ApplicationForm/handlers.ts +13 -2
  43. package/src/components/ApplicationForm/useVerifyPhoneDialogSubmit.tsx +2 -2
  44. package/src/components/Header/Header.tsx +23 -8
@@ -2003,6 +2003,11 @@
2003
2003
  return endpoint;
2004
2004
  };
2005
2005
 
2006
+ const getAspectsWithInclude = (data, include) => data?.map(({ aspectName, params }) => ({
2007
+ aspectName,
2008
+ params: aspectName === 'snowplowEvent' ? { ...params, eventJSON: include } : params,
2009
+ }));
2010
+
2006
2011
  const handleAspects = async ({ aspectsAttributes, aspects, ev }) => {
2007
2012
  for (const { aspectName, params } of aspectsAttributes ?? []) {
2008
2013
  const aspectFn = aspects[aspectName ?? ''];
@@ -2024,10 +2029,19 @@
2024
2029
  phone,
2025
2030
  formatData,
2026
2031
  reqId: String(response),
2027
- onSuccess: () => {
2032
+ onSuccess: (id) => {
2028
2033
  verifyPhoneDialog.close();
2029
2034
  responseTypeDialog.open({ ok: true, typeForm });
2030
- handleAspects({ aspectsAttributes: data, aspects, ev });
2035
+ const snowplowParams = JSON.stringify({
2036
+ inn: formatData?.inn,
2037
+ phone,
2038
+ id,
2039
+ });
2040
+ handleAspects({
2041
+ aspectsAttributes: getAspectsWithInclude(data, snowplowParams),
2042
+ aspects,
2043
+ ev,
2044
+ });
2031
2045
  },
2032
2046
  });
2033
2047
  };
@@ -3567,7 +3581,7 @@
3567
3581
  }
3568
3582
  setTimeNextReq(0);
3569
3583
  resetError();
3570
- onSuccess?.(values.join(''));
3584
+ onSuccess?.(response?.reqId);
3571
3585
  }
3572
3586
  catch {
3573
3587
  setErrorText('Неверный код');
@@ -7384,11 +7398,6 @@
7384
7398
  }, []);
7385
7399
  };
7386
7400
 
7387
- const getAspectsWithInclude = (data, include) => data?.map(({ aspectName, params }) => ({
7388
- aspectName,
7389
- params: aspectName === 'snowplowEvent' ? { ...params, eventJSON: include } : params,
7390
- }));
7391
-
7392
7401
  const useSendLeadFormAspects = ({ data }) => {
7393
7402
  const aspects = useAspects();
7394
7403
  return useCallback((ProfileId, TaskId) => {
@@ -13268,7 +13277,19 @@
13268
13277
  const { internetBankButton } = portal || {};
13269
13278
  const customProps = customLogo.image?.icon || customLogo.image?.src || customLogo?.title;
13270
13279
  const logoProps = customProps ? customLogo : logo;
13271
- return (jsx(BlockWrapper, { tag: "header", className: style('pt-m px-20', activeTopItem?.items?.length ? 'pb-m' : 'pb-lg', className), defaultPadding: "", version: version, ...rest, children: jsxs("div", { className: "container", children: [jsx("div", { className: "whitespace-nowrap", children: jsx(HeaderTopMenu, { activeTopItem: activeTopItem, navigationItems: navigationItems?.filter(isVisibleItem(HEADER_AREA_KEYS)), version: version, headerData: { ...header, ...navigation }, search: common.search, bgColor: bgColor, logo: logoProps }) }), jsx("div", { className: style('mt-s h-px bg-main-divider', getVersionStyle(version)) }), activeTopItem?.items?.length && (jsx(HeaderSubMenu, { subItems: activeTopItem?.items?.filter(isVisibleItem(HEADER_AREA_KEYS)), version: version, internetBankButton: internetBankButton }))] }) }));
13280
+ const renderMenuDiviver = () => {
13281
+ if (!activeTopItem?.items?.length) {
13282
+ return null;
13283
+ }
13284
+ return jsx("div", { className: style('mt-s h-px bg-main-divider', getVersionStyle(version)) });
13285
+ };
13286
+ const renderSubMenu = () => {
13287
+ if (!activeTopItem?.items?.length) {
13288
+ return null;
13289
+ }
13290
+ return (jsx(HeaderSubMenu, { subItems: activeTopItem?.items?.filter(isVisibleItem(HEADER_AREA_KEYS)), version: version, internetBankButton: internetBankButton }));
13291
+ };
13292
+ return (jsx(BlockWrapper, { tag: "header", className: style('pt-m px-20', activeTopItem?.items?.length ? 'pb-m' : 'pb-lg', className), defaultPadding: "", version: version, ...rest, children: jsxs("div", { className: "container", children: [jsx("div", { className: "whitespace-nowrap", children: jsx(HeaderTopMenu, { activeTopItem: activeTopItem, navigationItems: navigationItems?.filter(isVisibleItem(HEADER_AREA_KEYS)), version: version, headerData: { ...header, ...navigation }, search: common.search, bgColor: bgColor, logo: logoProps }) }), renderMenuDiviver(), renderSubMenu()] }) }));
13272
13293
  });
13273
13294
  const getVersionStyle = (version) => (version === 'transparent' ? 'opacity-30' : '');
13274
13295
  const getPageProperties = (page) => ({
@@ -14302,7 +14323,7 @@
14302
14323
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
14303
14324
  });
14304
14325
 
14305
- const packageVersion = "0.14.1018";
14326
+ const packageVersion = "0.14.1020";
14306
14327
 
14307
14328
  exports.Blocks = Blocks;
14308
14329
  exports.ContentPage = ContentPage;