@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.
- package/bin/migration-scripts/0.14.317.js +13 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +9 -5
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/data/FooterData.d.ts +6 -3
- package/bundle/hooks/useAspects/useAspects.d.ts +1 -1
- package/bundle/icons/IconName.d.ts +4 -2
- package/cosmos-static/icons/RustoreIcon.svg +1 -0
- package/cosmos-static/icons/sprites.svg +1 -0
- package/dist/components/Blocks.mobile.js +2 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Footer/Footer.js +2 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +4 -2
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/SocialMedia.js +1 -1
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/Footer/TextInformation.js +1 -1
- package/dist/components/Footer/TextInformation.js.map +1 -1
- package/dist/components/Footer/iconsMap.js +4 -0
- package/dist/components/Footer/iconsMap.js.map +1 -1
- package/dist/data/FooterData.d.ts +6 -3
- package/dist/hooks/useAspects/useAspects.d.ts +1 -1
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +2 -0
- package/dist/icons/IconName.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.mobile.js +2 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Footer/Footer.fixture.d.ts +1 -0
- package/lib/components/Footer/Footer.fixture.mobile.d.ts +1 -0
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +4 -2
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/SocialMedia.js +1 -1
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/Footer/TextInformation.js +1 -1
- package/lib/components/Footer/TextInformation.js.map +1 -1
- package/lib/components/Footer/iconsMap.js +4 -0
- package/lib/components/Footer/iconsMap.js.map +1 -1
- package/lib/data/FooterData.d.ts +6 -3
- package/lib/hooks/useAspects/useAspects.d.ts +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +2 -0
- package/lib/icons/IconName.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +28 -10
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/data/FooterData.d.ts +6 -3
- package/mobile/bundle/hooks/useAspects/useAspects.d.ts +1 -1
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/dist/components/Blocks.js +2 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +4 -2
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/SocialMedia.js +1 -1
- package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/dist/components/Footer/TextInformation.js +1 -1
- package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
- package/mobile/dist/components/Footer/iconsMap.js +4 -0
- package/mobile/dist/components/Footer/iconsMap.js.map +1 -1
- package/mobile/dist/data/FooterData.d.ts +6 -3
- package/mobile/dist/hooks/useAspects/useAspects.d.ts +1 -1
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +2 -0
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Blocks.js +2 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +4 -2
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/SocialMedia.js +1 -1
- package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/lib/components/Footer/TextInformation.js +1 -1
- package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
- package/mobile/lib/components/Footer/iconsMap.js +4 -0
- package/mobile/lib/components/Footer/iconsMap.js.map +1 -1
- package/mobile/lib/data/FooterData.d.ts +6 -3
- package/mobile/lib/hooks/useAspects/useAspects.d.ts +1 -1
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +2 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/src/components/Blocks.ts +2 -0
- package/mobile/src/components/Footer/Footer.tsx +26 -32
- package/mobile/src/components/Footer/SocialMedia.tsx +1 -1
- package/mobile/src/components/Footer/TextInformation.tsx +9 -7
- package/mobile/src/components/Footer/iconsMap.ts +4 -0
- package/mobile/src/data/FooterData.ts +6 -3
- package/mobile/src/hooks/useAspects/useAspects.ts +1 -1
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/icons/RustoreIcon.svg +4 -0
- package/package.json +1 -1
- package/src/components/Blocks.mobile.ts +2 -0
- package/src/components/Footer/Footer.fixture.mobile.tsx +10 -0
- package/src/components/Footer/Footer.fixture.tsx +15 -6
- package/src/components/Footer/Footer.mobile.tsx +26 -32
- package/src/components/Footer/Footer.tsx +10 -10
- package/src/components/Footer/SocialMedia.tsx +1 -1
- package/src/components/Footer/TextInformation.tsx +9 -7
- package/src/components/Footer/iconsMap.ts +4 -0
- package/src/data/FooterData.ts +6 -3
- package/src/hooks/useAspects/useAspects.ts +1 -1
- package/src/icons/IconName.ts +4 -1
- 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", {
|
|
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,
|
|
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", {
|
|
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.
|
|
5760
|
+
const packageVersion = "0.14.321";
|
|
5743
5761
|
|
|
5744
5762
|
exports.Blocks = Blocks;
|
|
5745
5763
|
exports.ContentPage = ContentPage;
|