@redneckz/wildless-cms-uni-blocks 0.14.320 → 0.14.322

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 (104) hide show
  1. package/bin/migration-scripts/0.14.317.js +13 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +9 -5
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/data/FooterData.d.ts +6 -3
  6. package/bundle/hooks/useAspects/useAspects.d.ts +1 -1
  7. package/bundle/icons/IconName.d.ts +4 -2
  8. package/cosmos-static/icons/RustoreIcon.svg +1 -0
  9. package/cosmos-static/icons/sprites.svg +1 -0
  10. package/dist/components/Blocks.mobile.js +2 -0
  11. package/dist/components/Blocks.mobile.js.map +1 -1
  12. package/dist/components/Footer/Footer.js +2 -2
  13. package/dist/components/Footer/Footer.js.map +1 -1
  14. package/dist/components/Footer/Footer.mobile.js +4 -2
  15. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  16. package/dist/components/Footer/SocialMedia.js +1 -1
  17. package/dist/components/Footer/SocialMedia.js.map +1 -1
  18. package/dist/components/Footer/TextInformation.js +1 -1
  19. package/dist/components/Footer/TextInformation.js.map +1 -1
  20. package/dist/components/Footer/iconsMap.js +4 -0
  21. package/dist/components/Footer/iconsMap.js.map +1 -1
  22. package/dist/data/FooterData.d.ts +6 -3
  23. package/dist/hooks/useAspects/useAspects.d.ts +1 -1
  24. package/dist/icons/IconName.d.ts +4 -2
  25. package/dist/icons/IconName.js +2 -0
  26. package/dist/icons/IconName.js.map +1 -1
  27. package/lib/common.css +1 -1
  28. package/lib/components/Blocks.mobile.js +2 -0
  29. package/lib/components/Blocks.mobile.js.map +1 -1
  30. package/lib/components/Footer/Footer.fixture.d.ts +1 -0
  31. package/lib/components/Footer/Footer.fixture.mobile.d.ts +1 -0
  32. package/lib/components/Footer/Footer.js +2 -2
  33. package/lib/components/Footer/Footer.js.map +1 -1
  34. package/lib/components/Footer/Footer.mobile.js +4 -2
  35. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  36. package/lib/components/Footer/SocialMedia.js +1 -1
  37. package/lib/components/Footer/SocialMedia.js.map +1 -1
  38. package/lib/components/Footer/TextInformation.js +1 -1
  39. package/lib/components/Footer/TextInformation.js.map +1 -1
  40. package/lib/components/Footer/iconsMap.js +4 -0
  41. package/lib/components/Footer/iconsMap.js.map +1 -1
  42. package/lib/data/FooterData.d.ts +6 -3
  43. package/lib/hooks/useAspects/useAspects.d.ts +1 -1
  44. package/lib/icons/IconName.d.ts +4 -2
  45. package/lib/icons/IconName.js +2 -0
  46. package/lib/icons/IconName.js.map +1 -1
  47. package/mobile/bundle/bundle.umd.js +28 -10
  48. package/mobile/bundle/bundle.umd.min.js +1 -1
  49. package/mobile/bundle/data/FooterData.d.ts +6 -3
  50. package/mobile/bundle/hooks/useAspects/useAspects.d.ts +1 -1
  51. package/mobile/bundle/icons/IconName.d.ts +4 -2
  52. package/mobile/dist/components/Blocks.js +2 -0
  53. package/mobile/dist/components/Blocks.js.map +1 -1
  54. package/mobile/dist/components/Footer/Footer.js +4 -2
  55. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  56. package/mobile/dist/components/Footer/SocialMedia.js +1 -1
  57. package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
  58. package/mobile/dist/components/Footer/TextInformation.js +1 -1
  59. package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
  60. package/mobile/dist/components/Footer/iconsMap.js +4 -0
  61. package/mobile/dist/components/Footer/iconsMap.js.map +1 -1
  62. package/mobile/dist/data/FooterData.d.ts +6 -3
  63. package/mobile/dist/hooks/useAspects/useAspects.d.ts +1 -1
  64. package/mobile/dist/icons/IconName.d.ts +4 -2
  65. package/mobile/dist/icons/IconName.js +2 -0
  66. package/mobile/dist/icons/IconName.js.map +1 -1
  67. package/mobile/lib/common.css +1 -1
  68. package/mobile/lib/components/Blocks.js +2 -0
  69. package/mobile/lib/components/Blocks.js.map +1 -1
  70. package/mobile/lib/components/Footer/Footer.js +4 -2
  71. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  72. package/mobile/lib/components/Footer/SocialMedia.js +1 -1
  73. package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
  74. package/mobile/lib/components/Footer/TextInformation.js +1 -1
  75. package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
  76. package/mobile/lib/components/Footer/iconsMap.js +4 -0
  77. package/mobile/lib/components/Footer/iconsMap.js.map +1 -1
  78. package/mobile/lib/data/FooterData.d.ts +6 -3
  79. package/mobile/lib/hooks/useAspects/useAspects.d.ts +1 -1
  80. package/mobile/lib/icons/IconName.d.ts +4 -2
  81. package/mobile/lib/icons/IconName.js +2 -0
  82. package/mobile/lib/icons/IconName.js.map +1 -1
  83. package/mobile/src/components/Blocks.ts +2 -0
  84. package/mobile/src/components/Footer/Footer.tsx +26 -32
  85. package/mobile/src/components/Footer/SocialMedia.tsx +1 -1
  86. package/mobile/src/components/Footer/TextInformation.tsx +9 -7
  87. package/mobile/src/components/Footer/iconsMap.ts +4 -0
  88. package/mobile/src/data/FooterData.ts +6 -3
  89. package/mobile/src/hooks/useAspects/useAspects.ts +1 -1
  90. package/mobile/src/icons/IconName.ts +4 -4
  91. package/mobile/src/icons/RustoreIcon.svg +4 -0
  92. package/package.json +1 -1
  93. package/src/components/Blocks.mobile.ts +2 -0
  94. package/src/components/Footer/Footer.fixture.mobile.tsx +10 -0
  95. package/src/components/Footer/Footer.fixture.tsx +15 -6
  96. package/src/components/Footer/Footer.mobile.tsx +26 -32
  97. package/src/components/Footer/Footer.tsx +10 -10
  98. package/src/components/Footer/SocialMedia.tsx +1 -1
  99. package/src/components/Footer/TextInformation.tsx +9 -7
  100. package/src/components/Footer/iconsMap.ts +4 -0
  101. package/src/data/FooterData.ts +6 -3
  102. package/src/hooks/useAspects/useAspects.ts +1 -1
  103. package/src/icons/IconName.ts +4 -1
  104. package/src/icons/RustoreIcon.svg +4 -0
@@ -3401,6 +3401,10 @@
3401
3401
  origins: ['dzen.ru'],
3402
3402
  iconMapped: { icon: 'DzenIcon' },
3403
3403
  },
3404
+ {
3405
+ origins: ['rustore.ru'],
3406
+ iconMapped: { icon: 'RustoreIcon' },
3407
+ },
3404
3408
  ];
3405
3409
 
3406
3410
  const findIconByHref = (href) => ICONS_MAP.find(({ origins }) => origins?.some((_) => href?.includes(_))) || {};
@@ -3426,7 +3430,7 @@
3426
3430
  };
3427
3431
  });
3428
3432
  const buttonClassName = style('border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media', showButtonText && hasText ? '' : 'basis-auto', getStretchedStyle(stretched));
3429
- return (jsxs("div", { className: style('flex flex-col gap-xs', className), children: [jsx("div", { className: "flex gap-xs", children: renderButtonsSection(buttons, {
3433
+ return (jsxs("div", { className: style('flex flex-col gap-m xl:gap-xs', className), children: [jsx("div", { className: "flex gap-xs", children: renderButtonsSection(buttons, {
3430
3434
  className: style(stretched || hasText ? 'basis-full' : ''),
3431
3435
  buttonClassName,
3432
3436
  }) }), children ? (jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: children })) : null] }));
@@ -3838,21 +3842,39 @@
3838
3842
  return (jsx("a", { className: `text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` }));
3839
3843
  });
3840
3844
 
3841
- const TextInformation = JSX(({ className = '', links, license }) => (jsxs("div", { className: style('@container', className), children: [jsx("div", { className: "pt-lg", children: jsx(Text, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0${license}` }) }), links?.length ? (jsx("div", { className: "flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ..._ }, String(i)))) })) : null] })));
3845
+ const TextInformation = JSX(({ className = '', links, license }) => (jsxs("div", { className: style('@container space-y-lg', className), children: [license ? (jsx("div", { children: jsx(Text, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0${license}` }) })) : null, links?.length ? (jsx("div", { className: "flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ..._ }, String(i)))) })) : null] })));
3842
3846
 
3847
+ const borderStyle = 'border-t border-main-divider';
3843
3848
  const Footer = UniBlock(({ className, footer, ...rest }) => {
3844
3849
  const { topItems } = rest.options?.page?.sitemap ?? {};
3845
- const { relatedEnterprises, contacts, socialMedia, mobileApps, horizontalNavigationTitle, documents, feedbackButton, license, } = footer || {};
3850
+ const { relatedEnterprises, contacts, mediaLinks = [], horizontalNavigationTitle, documents, feedbackButton, license, } = footer || {};
3846
3851
  const handleOnClick = useCallback(() => {
3847
3852
  const [name, oldValue, newValue] = COOKIE_REPLACE;
3848
3853
  mapCookie(name, (value) => value?.replace(oldValue, newValue));
3849
3854
  }, []);
3850
- return (jsxs(BlockWrapper, { tag: "footer", className: className, defaultPadding: "p-4xl pb-24", ...rest, children: [jsx("div", { className: "mb-lg pb-xs border-b border-main-divider", role: "menu", children: renderTopItems(topItems) }), jsx(Contacts, { className: "overflow-hidden", items: contacts }), feedbackButton ? (jsx(LinkButton, { className: "w-full mt-xs", version: "primary", ...feedbackButton })) : null, jsxs("div", { className: "mt-xl", children: [jsx(SocialMedia, { className: "mb-xl", media: socialMedia, stretched: true, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsxs("div", { className: "mb-xl", children: [jsx(SocialMedia, { className: "mb-m", media: mobileApps, stretched: true, showButtonText: false }), "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435"] })] }), jsx("div", { className: "py-lg border-t border-main-divider", children: jsx(HorizontalNavigationLink, { text: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u043F\u0440\u0435\u0436\u043D\u044E\u044E \u0432\u0435\u0440\u0441\u0438\u044E \u0441\u0430\u0439\u0442\u0430", className: "text-l font-light max-w-[292px]", href: "https://old.rshb.ru", onClick: handleOnClick }) }), jsx(HorizontalNavigation, { className: "py-lg border-y border-main-divider", title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents, license: license })] }));
3855
+ return (jsxs(BlockWrapper, { tag: "footer", className: style('space-y-lg', className), defaultPadding: "p-4xl pb-24", ...rest, children: [jsx("div", { role: "menu", children: renderTopItems(topItems) }), jsx("div", { className: borderStyle }), jsx(Contacts, { className: "overflow-hidden", items: contacts }), feedbackButton ? (jsx(LinkButton, { className: "w-full", version: "primary", ...feedbackButton })) : null, mediaLinks.map((_, i) => (jsx(SocialMedia, { media: _?.links ?? [], stretched: true, showButtonText: false, children: _?.title }, String(i)))), jsx("div", { className: borderStyle }), jsx(HorizontalNavigationLink, { text: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u043F\u0440\u0435\u0436\u043D\u044E\u044E \u0432\u0435\u0440\u0441\u0438\u044E \u0441\u0430\u0439\u0442\u0430", className: "flex text-l font-light max-w-[292px]", href: "https://old.rshb.ru", onClick: handleOnClick }), jsx("div", { className: borderStyle }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises }), jsx("div", { className: borderStyle }), jsx(TextInformation, { links: documents, license: license })] }));
3851
3856
  });
3852
3857
  const renderTopItems = (topItems) => topItems
3853
3858
  ?.filter((_) => _.icon?.icon)
3854
3859
  .map((item, i) => (jsx(RollupItem, { foldButtonVersion: "accordion", label: item?.text, labelIcon: item?.icon, role: "menuitem", children: item.items ? jsx(LinkList, { items: item.items, basePath: appendSlash(item.href) }) : null }, String(i))));
3855
3860
 
3861
+ const getAspectsWithInclude = (data, include) => data?.map(({ aspectName, params }) => ({
3862
+ aspectName,
3863
+ params: aspectName === 'mindboxEvent' ? { ...params, eventJson: include } : params,
3864
+ }));
3865
+
3866
+ const GrantSupport = UniBlock(({ className, title, button, regionSource, data, ...rest }) => {
3867
+ const [region, setRegion] = useState({ key: '' });
3868
+ const regions = regionSource?.regions ?? [];
3869
+ const buttonStyle = getRegularButtonClasses({
3870
+ className: 'text-white',
3871
+ version: button?.version || 'primary',
3872
+ });
3873
+ const regionHref = regions?.find((_) => _.name === region.key)?.href;
3874
+ const buttonText = button?.text ? button.text : 'Перейти';
3875
+ return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-m", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), data: getAspectsWithInclude(data, region?.key), children: buttonText }) })) : null] }) }));
3876
+ });
3877
+
3856
3878
  const ICON_SIZE = { width: '34', height: '34' };
3857
3879
 
3858
3880
  const logoTitleSizeStyle = 'text-s';
@@ -5062,11 +5084,6 @@
5062
5084
  return (jsxs("div", { className: "flex gap-s items-center", children: [icon ? jsx(Img, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text }) })) : null] }));
5063
5085
  });
5064
5086
 
5065
- const getAspectsWithInclude = (data, include) => data?.map(({ aspectName, params }) => ({
5066
- aspectName,
5067
- params: aspectName === 'mindboxEvent' ? { ...params, eventJson: include } : params,
5068
- }));
5069
-
5070
5087
  const renderRegion = (data, onChangeLocation) => (region) => {
5071
5088
  return region.name ? (jsx(LinkWrapper, { isRemote: true, href: `/branches/${region.slug}`, className: "mb-xs sm:mb-2xs hover:text-primary-hover", onClick: () => {
5072
5089
  onChangeLocation && onChangeLocation(region);
@@ -5577,6 +5594,7 @@
5577
5594
  ErrorBlock,
5578
5595
  ExchangeRateTile,
5579
5596
  Footer,
5597
+ GrantSupport,
5580
5598
  Header,
5581
5599
  Headline,
5582
5600
  HorizontalLayout,
@@ -5739,7 +5757,7 @@
5739
5757
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
5740
5758
  });
5741
5759
 
5742
- const packageVersion = "0.14.319";
5760
+ const packageVersion = "0.14.321";
5743
5761
 
5744
5762
  exports.Blocks = Blocks;
5745
5763
  exports.ContentPage = ContentPage;