@redneckz/wildless-cms-uni-blocks 0.2.46 → 0.2.47
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/dist/BenefitsBlock.d.ts +2 -2
- package/dist/Blocks.d.ts +2 -0
- package/dist/Blocks.js +11 -7
- package/dist/Blocks.js.map +1 -1
- package/dist/ContentPage.d.ts +2 -2
- package/dist/ContentPage.js +3 -3
- package/dist/ContentPage.js.map +1 -1
- package/dist/ContentPageContext.d.ts +6 -3
- package/dist/ExchangeRateTile.d.ts +7 -0
- package/dist/ExchangeRateTile.js +32 -0
- package/dist/ExchangeRateTile.js.map +1 -0
- package/dist/Footer/Contacts.d.ts +2 -2
- package/dist/Footer/Footer.d.ts +2 -2
- package/dist/Footer/FooterLink.d.ts +2 -2
- package/dist/Footer/Sitemap.d.ts +2 -2
- package/dist/Footer/Sitemap.js +2 -1
- package/dist/Footer/Sitemap.js.map +1 -1
- package/dist/Footer/SocialMedia.d.ts +2 -2
- package/dist/Footer/SocialMedia.js +5 -5
- package/dist/Footer/SocialMedia.js.map +1 -1
- package/dist/Header/Header.d.ts +2 -2
- package/dist/Header/Header.js +3 -2
- package/dist/Header/Header.js.map +1 -1
- package/dist/Icons/DollarIcon.d.ts +1 -0
- package/dist/Icons/DollarIcon.js +6 -0
- package/dist/Icons/DollarIcon.js.map +1 -0
- package/dist/Icons/EuroIcon.d.ts +1 -0
- package/dist/Icons/EuroIcon.js +6 -0
- package/dist/Icons/EuroIcon.js.map +1 -0
- package/dist/Icons/index.d.ts +17 -16
- package/dist/Icons/index.js +26 -22
- package/dist/Icons/index.js.map +1 -1
- package/dist/Img.js +1 -1
- package/dist/Img.js.map +1 -1
- package/dist/LikeControl.d.ts +2 -2
- package/dist/LikeControl.js.map +1 -1
- package/dist/MobileAppTile.d.ts +8 -0
- package/dist/MobileAppTile.js +9 -0
- package/dist/MobileAppTile.js.map +1 -0
- package/dist/Placeholder.d.ts +3 -1
- package/dist/Placeholder.js +9 -2
- package/dist/Placeholder.js.map +1 -1
- package/dist/ProductBlock.d.ts +2 -2
- package/dist/ProductBlockInner.d.ts +2 -2
- package/dist/ProductGallery.d.ts +2 -2
- package/dist/ProductGallery.js +2 -2
- package/dist/ProductGallery.js.map +1 -1
- package/dist/ProjectSettings.d.ts +18 -0
- package/dist/ProjectSettings.js +30 -0
- package/dist/ProjectSettings.js.map +1 -0
- package/dist/StepsBlock.d.ts +2 -2
- package/dist/Tile.d.ts +2 -2
- package/dist/Tile.js +15 -7
- package/dist/Tile.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/ui-kit/SearchBar.d.ts +2 -2
- package/dist/ui-kit/SearchBar.js.map +1 -1
- package/dist/useSitemap.d.ts +3 -0
- package/dist/useSitemap.js +16 -0
- package/dist/useSitemap.js.map +1 -0
- package/lib/BenefitsBlock.d.ts +2 -2
- package/lib/Blocks.d.ts +2 -0
- package/lib/Blocks.js +8 -4
- package/lib/Blocks.js.map +1 -1
- package/lib/ContentPage.d.ts +2 -2
- package/lib/ContentPage.js +3 -3
- package/lib/ContentPage.js.map +1 -1
- package/lib/ContentPageContext.d.ts +6 -3
- package/lib/ExchangeRateTile.d.ts +7 -0
- package/lib/ExchangeRateTile.js +30 -0
- package/lib/ExchangeRateTile.js.map +1 -0
- package/lib/Footer/Contacts.d.ts +2 -2
- package/lib/Footer/Footer.d.ts +2 -2
- package/lib/Footer/FooterLink.d.ts +2 -2
- package/lib/Footer/Sitemap.d.ts +2 -2
- package/lib/Footer/Sitemap.js +2 -1
- package/lib/Footer/Sitemap.js.map +1 -1
- package/lib/Footer/SocialMedia.d.ts +2 -2
- package/lib/Footer/SocialMedia.js +5 -5
- package/lib/Footer/SocialMedia.js.map +1 -1
- package/lib/Header/Header.d.ts +2 -2
- package/lib/Header/Header.js +3 -2
- package/lib/Header/Header.js.map +1 -1
- package/lib/Icons/DollarIcon.d.ts +1 -0
- package/lib/Icons/DollarIcon.js +3 -0
- package/lib/Icons/DollarIcon.js.map +1 -0
- package/lib/Icons/EuroIcon.d.ts +1 -0
- package/lib/Icons/EuroIcon.js +3 -0
- package/lib/Icons/EuroIcon.js.map +1 -0
- package/lib/Icons/index.d.ts +17 -16
- package/lib/Icons/index.js +17 -16
- package/lib/Icons/index.js.map +1 -1
- package/lib/Img.js +1 -1
- package/lib/Img.js.map +1 -1
- package/lib/LikeControl.d.ts +2 -2
- package/lib/LikeControl.js.map +1 -1
- package/lib/MobileAppTile.d.ts +8 -0
- package/lib/MobileAppTile.js +7 -0
- package/lib/MobileAppTile.js.map +1 -0
- package/lib/Placeholder.d.ts +3 -1
- package/lib/Placeholder.js +9 -2
- package/lib/Placeholder.js.map +1 -1
- package/lib/ProductBlock.d.ts +2 -2
- package/lib/ProductBlockInner.d.ts +2 -2
- package/lib/ProductGallery.d.ts +2 -2
- package/lib/ProductGallery.js +2 -2
- package/lib/ProductGallery.js.map +1 -1
- package/lib/ProjectSettings.d.ts +18 -0
- package/lib/ProjectSettings.js +28 -0
- package/lib/ProjectSettings.js.map +1 -0
- package/lib/StepsBlock.d.ts +2 -2
- package/lib/Tile.d.ts +2 -2
- package/lib/Tile.js +15 -7
- package/lib/Tile.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/index.d.ts +5 -3
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/ui-kit/SearchBar.d.ts +2 -2
- package/lib/ui-kit/SearchBar.js.map +1 -1
- package/lib/useSitemap.d.ts +3 -0
- package/lib/useSitemap.js +13 -0
- package/lib/useSitemap.js.map +1 -0
- package/package.json +3 -2
- package/src/BenefitsBlock.fixture.tsx +34 -0
- package/src/BenefitsBlock.tsx +45 -0
- package/src/Blocks.ts +23 -0
- package/src/ContentPage.fixture.tsx +38 -0
- package/src/ContentPage.page.json +540 -0
- package/src/ContentPage.tsx +83 -0
- package/src/ContentPageContext.tsx +34 -0
- package/src/ContentPageHead.tsx +26 -0
- package/src/ExchangeRateTile.fixture.tsx +11 -0
- package/src/ExchangeRateTile.tsx +80 -0
- package/src/Footer/Contacts.tsx +71 -0
- package/src/Footer/Footer.fixture.tsx +265 -0
- package/src/Footer/Footer.tsx +46 -0
- package/src/Footer/FooterLink.ts +6 -0
- package/src/Footer/HorizontalNavigation.tsx +46 -0
- package/src/Footer/Sitemap.tsx +55 -0
- package/src/Footer/SocialMedia.tsx +46 -0
- package/src/Footer/TextInformation.tsx +50 -0
- package/src/Footer/index.ts +2 -0
- package/src/Header/Header.fixture.tsx +21 -0
- package/src/Header/Header.tsx +55 -0
- package/src/Header/HeaderContent.ts +6 -0
- package/src/Header/HeaderSecondaryMenu.tsx +42 -0
- package/src/Header/HeaderSecondaryMenuButton.tsx +21 -0
- package/src/Header/index.ts +3 -0
- package/src/Header/isSubItemActive.ts +9 -0
- package/src/Header/isTopItemActive.ts +13 -0
- package/src/Icons/ActualBalanceIcon.tsx +202 -0
- package/src/Icons/CalendarIcon.tsx +19 -0
- package/src/Icons/ClockIcon.tsx +212 -0
- package/src/Icons/ComfortableCompIcon.tsx +379 -0
- package/src/Icons/DollarIcon.tsx +12 -0
- package/src/Icons/EmptyWalletIcon.tsx +25 -0
- package/src/Icons/EuroIcon.tsx +12 -0
- package/src/Icons/GridIcon.tsx +9 -0
- package/src/Icons/LoupeIcon.tsx +11 -0
- package/src/Icons/NewDocIcon.tsx +262 -0
- package/src/Icons/OkIcon.tsx +8 -0
- package/src/Icons/PassSendIcon.tsx +250 -0
- package/src/Icons/PercentageSquareIcon.tsx +18 -0
- package/src/Icons/ProfileIcon.tsx +18 -0
- package/src/Icons/SignDocsIcon.tsx +295 -0
- package/src/Icons/TelegramIcon.tsx +8 -0
- package/src/Icons/VKIcon.tsx +10 -0
- package/src/Icons/index.ts +17 -0
- package/src/Img.tsx +22 -0
- package/src/LikeControl.fixture.tsx +5 -0
- package/src/LikeControl.tsx +23 -0
- package/src/MobileAppTile.fixture.tsx +15 -0
- package/src/MobileAppTile.tsx +34 -0
- package/src/Placeholder.fixture.tsx +5 -0
- package/src/Placeholder.tsx +33 -0
- package/src/ProductBlock.fixture.tsx +95 -0
- package/src/ProductBlock.tsx +15 -0
- package/src/ProductBlockInner.tsx +110 -0
- package/src/ProductGallery.fixture.tsx +138 -0
- package/src/ProductGallery.tsx +90 -0
- package/src/ProjectSettings.ts +38 -0
- package/src/StepsBlock.fixture.tsx +23 -0
- package/src/StepsBlock.tsx +51 -0
- package/src/Tile.fixture.tsx +124 -0
- package/src/Tile.tsx +89 -0
- package/src/api/LikeAPI.ts +141 -0
- package/src/common.css +39 -0
- package/src/content-page-repository/ContentPageRepository.ts +38 -0
- package/src/content-page-repository/TransformationOptions.ts +4 -0
- package/src/content-page-repository/index.ts +1 -0
- package/src/content-page-repository/mapJSON.spec.ts +28 -0
- package/src/content-page-repository/mapJSON.ts +23 -0
- package/src/content-page-repository/transformContentPage.ts +26 -0
- package/src/content-page-repository/transformMarkdown.ts +10 -0
- package/src/content-page-repository/transformPicture.ts +61 -0
- package/src/cosmos.decorator.tsx +19 -0
- package/src/index.ts +19 -0
- package/src/mergeTopItems.spec.ts +20 -0
- package/src/mergeTopItems.ts +13 -0
- package/src/setup-fixture.ts +49 -0
- package/src/types.ts +109 -0
- package/src/ui-kit/BlockItem.fixture.tsx +5 -0
- package/src/ui-kit/BlockItem.tsx +36 -0
- package/src/ui-kit/Breadcrumb.tsx +26 -0
- package/src/ui-kit/Button.fixture.tsx +113 -0
- package/src/ui-kit/Button.tsx +66 -0
- package/src/ui-kit/HeaderItem.fixture.tsx +8 -0
- package/src/ui-kit/HeaderItem.tsx +25 -0
- package/src/ui-kit/LikeButton.fixture.tsx +6 -0
- package/src/ui-kit/LikeButton.tsx +41 -0
- package/src/ui-kit/Logo.fixture.tsx +5 -0
- package/src/ui-kit/Logo.tsx +35 -0
- package/src/ui-kit/SVG.tsx +32 -0
- package/src/ui-kit/SearchBar.tsx +33 -0
- package/src/ui-kit/TopItem.fixture.tsx +8 -0
- package/src/ui-kit/TopItem.tsx +37 -0
- package/src/useLink.ts +28 -0
- package/src/useSitemap.ts +17 -0
- package/src/utils/url.ts +22 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Picture,
|
|
1
|
+
import type { Picture, UniBlockProps, Benefit } from './types';
|
|
2
2
|
import type { ButtonProps } from './ui-kit/Button';
|
|
3
3
|
import { BreadcrumbProps } from './ui-kit/Breadcrumb';
|
|
4
4
|
export interface ProductBlockInnerContent {
|
|
@@ -10,6 +10,6 @@ export interface ProductBlockInnerContent {
|
|
|
10
10
|
items?: string[];
|
|
11
11
|
buttons?: ButtonProps[];
|
|
12
12
|
}
|
|
13
|
-
export interface ProductBlockInnerProps extends ProductBlockInnerContent,
|
|
13
|
+
export interface ProductBlockInnerProps extends ProductBlockInnerContent, UniBlockProps {
|
|
14
14
|
}
|
|
15
15
|
export declare const ProductBlockInner: (props: import("@redneckz/uni-jsx").PropsWithChildren<ProductBlockInnerProps, any>, context?: any) => any;
|
package/dist/ProductGallery.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ProductBlockInnerContent } from './ProductBlockInner';
|
|
2
|
-
import type {
|
|
2
|
+
import type { UniBlockProps } from './types';
|
|
3
3
|
interface ProductGalleryNav {
|
|
4
4
|
title: string;
|
|
5
5
|
desc: string;
|
|
@@ -12,7 +12,7 @@ export interface ProductGalleryContent {
|
|
|
12
12
|
duration?: number;
|
|
13
13
|
slides?: ProductSlideContent[];
|
|
14
14
|
}
|
|
15
|
-
export interface ProductGalleryProps extends ProductGalleryContent,
|
|
15
|
+
export interface ProductGalleryProps extends ProductGalleryContent, UniBlockProps {
|
|
16
16
|
}
|
|
17
17
|
export declare const ProductGallery: (props: import("@redneckz/uni-jsx").PropsWithChildren<ProductGalleryProps, any>, context?: any) => any;
|
|
18
18
|
export {};
|
package/dist/ProductGallery.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.ProductGallery = (0, uni_jsx_1.JSX)(({ className, context, duration = 0,
|
|
|
7
7
|
const galleryNav = slides.map((s) => s.nav);
|
|
8
8
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
9
9
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)("section", { className: `font-sans bg-white overflow-hidden w-100 ${className || ''}`, children: [(0, jsx_runtime_1.jsx)("div", { className: `flex transition duration-1000`, style: { transform: `translateX(-${activeSlideIndex}00%)` }, children: galleryBlocks.map((_, i) => renderProductBlock(_, i, context)) }), (0, jsx_runtime_1.jsx)("div", { className: `border-0 border-t border-solid border-main-divider grid grid-cols-${galleryNav.length}`, children: galleryNav.map((slide, i) => renderNavButton({
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: `font-sans bg-white overflow-hidden w-100 ${className || ''}`, children: [(0, jsx_runtime_1.jsx)("div", { className: `flex transition duration-1000`, style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock(_, i, context)) }), (0, jsx_runtime_1.jsx)("div", { className: `border-0 border-t border-solid border-main-divider grid grid-cols-${galleryNav.length}`, children: galleryNav.map((slide, i) => renderNavButton({
|
|
11
11
|
slide,
|
|
12
12
|
i,
|
|
13
13
|
activeSlideIndex,
|
|
@@ -16,7 +16,7 @@ exports.ProductGallery = (0, uni_jsx_1.JSX)(({ className, context, duration = 0,
|
|
|
16
16
|
})) })] }));
|
|
17
17
|
});
|
|
18
18
|
function renderProductBlock(block, i, context) {
|
|
19
|
-
return ((0, jsx_runtime_1.jsx)("section", { className: "grow-0 shrink-0 basis-full", role: "
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)("section", { className: "grow-0 shrink-0 basis-full", role: "listitem", children: (0, jsx_runtime_1.jsx)("div", { className: "p-11 pr-[7.5rem] ", children: (0, jsx_runtime_1.jsx)(ProductBlockInner_1.ProductBlockInner, { context: context, ...block }) }) }, String(i)));
|
|
20
20
|
}
|
|
21
21
|
function renderNavButton({ slide, i, activeSlideIndex, onClick, duration }) {
|
|
22
22
|
const isActiveBtn = i === activeSlideIndex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductGallery.js","sourceRoot":"","sources":["../src/ProductGallery.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,2DAAwD;AAoB3C,QAAA,cAAc,GAAG,IAAA,aAAG,EAC/B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,EAAE,EAAE,EAAE;IACpD,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC5C,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IACxD,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEpE,OAAO,CACL,qCAAS,SAAS,EAAE,4CAA4C,SAAS,IAAI,EAAE,EAAE,aAC/E,gCACE,SAAS,EAAE,+BAA+B,EAC1C,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,gBAAgB,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"ProductGallery.js","sourceRoot":"","sources":["../src/ProductGallery.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,2DAAwD;AAoB3C,QAAA,cAAc,GAAG,IAAA,aAAG,EAC/B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,EAAE,EAAE,EAAE;IACpD,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC5C,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IACxD,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEpE,OAAO,CACL,qCAAS,SAAS,EAAE,4CAA4C,SAAS,IAAI,EAAE,EAAE,aAC/E,gCACE,SAAS,EAAE,+BAA+B,EAC1C,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,gBAAgB,MAAM,EAAE,EAC3D,IAAI,EAAC,MAAM,YAEV,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,GAC3D,EAEN,gCACE,SAAS,EAAE,qEAAqE,UAAU,CAAC,MAAM,EAAE,YAElG,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAC3B,eAAe,CAAC;oBACd,KAAK;oBACL,CAAC;oBACD,gBAAgB;oBAChB,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC;oBACrC,QAAQ;iBACT,CAAC,CACH,GACG,IACE,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,kBAAkB,CAAC,KAA+B,EAAE,CAAS,EAAE,OAAO;IAC7E,OAAO,CACL,oCAAyB,SAAS,EAAC,4BAA4B,EAAC,IAAI,EAAC,UAAU,YAC7E,gCAAK,SAAS,EAAC,mBAAmB,YAChC,uBAAC,qCAAiB,IAAC,OAAO,EAAE,OAAO,KAAM,KAAK,GAAI,GAC9C,IAHM,MAAM,CAAC,CAAC,CAAC,CAIb,CACX,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,gBAAgB,EAAE,OAAO,EAAE,QAAQ,EAAE;IACxE,MAAM,WAAW,GAAG,CAAC,KAAK,gBAAgB,CAAC;IAC3C,MAAM,oBAAoB,GAAG,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAChE,MAAM,iBAAiB,GAAG,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,qBAAqB,CAAC;IACpF,OAAO,CACL,oCACE,IAAI,EAAC,QAAQ,EAEb,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,uFAAuF,aAElG,iCAAK,SAAS,EAAC,yDAAyD,aACtE,gCAAK,SAAS,EAAE,qDAAqD,iBAAiB,EAAE,YACrF,KAAK,EAAE,KAAK,GACT,EACN,gCAAK,SAAS,EAAC,6BAA6B,YAAE,KAAK,CAAC,IAAI,GAAO,IAC3D,EACN,gCACE,SAAS,EAAE,6EAA6E,oBAAoB,EAAE,EAC9G,KAAK,EAAE,EAAE,iBAAiB,EAAE,GAAG,QAAQ,GAAG,EAAE,GACvC,KAbF,MAAM,CAAC,CAAC,CAAC,CAcP,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ProjectSettings {
|
|
2
|
+
TEST_BRANCH?: string;
|
|
3
|
+
RC_BRANCH?: string;
|
|
4
|
+
PROD_BRANCH: string;
|
|
5
|
+
FORCED_DRAFT_FLOW: boolean;
|
|
6
|
+
ENABLE_ASSIST?: boolean;
|
|
7
|
+
SITEMAP?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const projectSettings: {
|
|
10
|
+
_: ProjectSettings;
|
|
11
|
+
setup(_: ProjectSettings): void;
|
|
12
|
+
readonly TEST_BRANCH: string | undefined;
|
|
13
|
+
readonly RC_BRANCH: string | undefined;
|
|
14
|
+
readonly PROD_BRANCH: string;
|
|
15
|
+
readonly FORCED_DRAFT_FLOW: boolean;
|
|
16
|
+
readonly ENABLE_ASSIST: boolean | undefined;
|
|
17
|
+
readonly SITEMAP: string | undefined;
|
|
18
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.projectSettings = void 0;
|
|
3
|
+
exports.projectSettings = new (class {
|
|
4
|
+
_ = {
|
|
5
|
+
PROD_BRANCH: 'master',
|
|
6
|
+
FORCED_DRAFT_FLOW: false,
|
|
7
|
+
};
|
|
8
|
+
setup(_) {
|
|
9
|
+
this._ = _;
|
|
10
|
+
}
|
|
11
|
+
get TEST_BRANCH() {
|
|
12
|
+
return this._.TEST_BRANCH;
|
|
13
|
+
}
|
|
14
|
+
get RC_BRANCH() {
|
|
15
|
+
return this._.RC_BRANCH;
|
|
16
|
+
}
|
|
17
|
+
get PROD_BRANCH() {
|
|
18
|
+
return this._.PROD_BRANCH;
|
|
19
|
+
}
|
|
20
|
+
get FORCED_DRAFT_FLOW() {
|
|
21
|
+
return this._.FORCED_DRAFT_FLOW;
|
|
22
|
+
}
|
|
23
|
+
get ENABLE_ASSIST() {
|
|
24
|
+
return this._.ENABLE_ASSIST;
|
|
25
|
+
}
|
|
26
|
+
get SITEMAP() {
|
|
27
|
+
return this._.SITEMAP;
|
|
28
|
+
}
|
|
29
|
+
})();
|
|
30
|
+
//# sourceMappingURL=ProjectSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectSettings.js","sourceRoot":"","sources":["../src/ProjectSettings.ts"],"names":[],"mappings":";;AASa,QAAA,eAAe,GAAG,IAAI,CAAC;IAClC,CAAC,GAAoB;QACnB,WAAW,EAAE,QAAQ;QACrB,iBAAiB,EAAE,KAAK;KACzB,CAAC;IAEF,KAAK,CAAC,CAAkB;QACtB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;IAC5B,CAAC;IACD,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1B,CAAC;IACD,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;IAC5B,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAClC,CAAC;IACD,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC;IAC9B,CAAC;IACD,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;IACxB,CAAC;CACF,CAAC,EAAE,CAAC"}
|
package/dist/StepsBlock.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UniBlockProps } from './types';
|
|
2
2
|
declare const ICONS: {
|
|
3
3
|
NewDocIcon: (props?: Record<string, any> | undefined) => any;
|
|
4
4
|
PassSendIcon: (props?: Record<string, any> | undefined) => any;
|
|
@@ -13,7 +13,7 @@ export interface StepsBlockContent {
|
|
|
13
13
|
title?: string;
|
|
14
14
|
steps?: Step[];
|
|
15
15
|
}
|
|
16
|
-
export interface StepsBlockProps extends StepsBlockContent,
|
|
16
|
+
export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {
|
|
17
17
|
}
|
|
18
18
|
export declare const StepsBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<StepsBlockProps, any>, context?: any) => any;
|
|
19
19
|
export {};
|
package/dist/Tile.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BlockVersion, Picture,
|
|
1
|
+
import type { BlockVersion, Picture, UniBlockProps } from './types';
|
|
2
2
|
import type { ButtonProps } from './ui-kit/Button';
|
|
3
3
|
export interface TileContent {
|
|
4
4
|
title?: string;
|
|
@@ -8,6 +8,6 @@ export interface TileContent {
|
|
|
8
8
|
button?: ButtonProps;
|
|
9
9
|
version?: BlockVersion;
|
|
10
10
|
}
|
|
11
|
-
export interface TileProps extends TileContent,
|
|
11
|
+
export interface TileProps extends TileContent, UniBlockProps {
|
|
12
12
|
}
|
|
13
13
|
export declare const Tile: (props: import("@redneckz/uni-jsx").PropsWithChildren<TileProps, any>, context?: any) => any;
|
package/dist/Tile.js
CHANGED
|
@@ -11,18 +11,26 @@ const tileStyleMap = {
|
|
|
11
11
|
secondary: 'bg-primary-main text-white',
|
|
12
12
|
};
|
|
13
13
|
const TITLE_CLASSES = 'font-medium m-0 whitespace-pre-wrap max-w-[600px]';
|
|
14
|
-
exports.Tile = (0, uni_jsx_1.JSX)(({ className, context, title, description, button, image, items, version = 'primary' }) => {
|
|
14
|
+
exports.Tile = (0, uni_jsx_1.JSX)(({ className, context, title, description, children, button, image, items, version = 'primary', }) => {
|
|
15
15
|
const router = context.useRouter();
|
|
16
16
|
const { handlerDecorator } = context;
|
|
17
|
-
return ((0, jsx_runtime_1.
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: `flex flex-col font-sans p-9 ${className || ''} ${tileStyleMap[version]}`, children: [title && renderTitle(title, className), (0, jsx_runtime_1.jsxs)("div", { className: "grow flex justify-between mt-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col justify-between items-start", children: [description || children ? ((0, jsx_runtime_1.jsx)("div", { className: "font-normal text-base max-w-[600px]", children: description || children })) : (renderItems(items, version)), button?.text && ((0, jsx_runtime_1.jsx)(Button_1.Button, { className: "mt-6", ...(0, useLink_1.useLink)({ router, handlerDecorator }, button), version: "secondary" }))] }), image?.src && (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "mt-auto h-[220px] w-[220px]", image: image })] })] }));
|
|
18
18
|
});
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
function renderTitle(title, className = '') {
|
|
20
|
+
const colSpanPrefix = 'col-span-';
|
|
21
|
+
const colSpanStr = className.split(/\s+/).find((_) => _.startsWith(colSpanPrefix));
|
|
22
|
+
const colSpan = colSpanStr ? parseInt(colSpanStr.substring(colSpanPrefix.length), 10) : 12;
|
|
23
|
+
if (colSpan <= 4) {
|
|
21
24
|
return (0, jsx_runtime_1.jsx)("h3", { className: `${TITLE_CLASSES} text-title-xs`, children: title });
|
|
22
25
|
}
|
|
23
|
-
if (
|
|
26
|
+
else if (colSpan <= 8) {
|
|
24
27
|
return (0, jsx_runtime_1.jsx)("h3", { className: `${TITLE_CLASSES} text-title-sm`, children: title });
|
|
25
28
|
}
|
|
26
|
-
|
|
27
|
-
};
|
|
29
|
+
else {
|
|
30
|
+
return (0, jsx_runtime_1.jsx)("h2", { className: `${TITLE_CLASSES} text-title`, children: title });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function renderItems(items, version) {
|
|
34
|
+
return items?.length ? ((0, jsx_runtime_1.jsx)("section", { className: "max-w-[600px]", role: "list", children: items.map((_, i) => ((0, jsx_runtime_1.jsx)(BlockItem_1.BlockItem, { className: i ? 'mt-2.5' : '', text: _, version: version }, String(i)))) })) : null;
|
|
35
|
+
}
|
|
28
36
|
//# sourceMappingURL=Tile.js.map
|
package/dist/Tile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../src/Tile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+BAA4B;AAE5B,kDAA+C;AAE/C,4CAAyC;AACzC,uCAAoC;AAapC,MAAM,YAAY,GAAiC;IACjD,OAAO,EAAE,4BAA4B;IACrC,SAAS,EAAE,4BAA4B;CACxC,CAAC;AAEF,MAAM,aAAa,GAAG,mDAAmD,CAAC;AAE7D,QAAA,IAAI,GAAG,IAAA,aAAG,EACrB,CAAC,
|
|
1
|
+
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../src/Tile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+BAA4B;AAE5B,kDAA+C;AAE/C,4CAAyC;AACzC,uCAAoC;AAapC,MAAM,YAAY,GAAiC;IACjD,OAAO,EAAE,4BAA4B;IACrC,SAAS,EAAE,4BAA4B;CACxC,CAAC;AAEF,MAAM,aAAa,GAAG,mDAAmD,CAAC;AAE7D,QAAA,IAAI,GAAG,IAAA,aAAG,EACrB,CAAC,EACC,SAAS,EACT,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,GACpB,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IACnC,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IACrC,OAAO,CACL,qCACE,SAAS,EAAE,+BAA+B,SAAS,IAAI,EAAE,IAAI,YAAY,CAAC,OAAO,CAAC,EAAE,aAEnF,KAAK,IAAI,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,EACvC,iCAAK,SAAS,EAAC,gCAAgC,aAC7C,iCAAK,SAAS,EAAC,2CAA2C,aACvD,WAAW,IAAI,QAAQ,CAAC,CAAC,CAAC,CACzB,gCAAK,SAAS,EAAC,qCAAqC,YAAE,WAAW,IAAI,QAAQ,GAAO,CACrF,CAAC,CAAC,CAAC,CACF,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAC5B,EACA,MAAM,EAAE,IAAI,IAAI,CACf,uBAAC,eAAM,IACL,SAAS,EAAC,MAAM,KACZ,IAAA,iBAAO,EAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,MAAM,CAAC,EACjD,OAAO,EAAC,WAAW,GACnB,CACH,IACG,EACL,KAAK,EAAE,GAAG,IAAI,uBAAC,SAAG,IAAC,SAAS,EAAC,6BAA6B,EAAC,KAAK,EAAE,KAAK,GAAI,IACxE,IACE,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,WAAW,CAAC,KAAa,EAAE,YAAoB,EAAE;IACxD,MAAM,aAAa,GAAG,WAAW,CAAC;IAClC,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;IACnF,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3F,IAAI,OAAO,IAAI,CAAC,EAAE;QAChB,OAAO,+BAAI,SAAS,EAAE,GAAG,aAAa,gBAAgB,YAAG,KAAK,GAAM,CAAC;KACtE;SAAM,IAAI,OAAO,IAAI,CAAC,EAAE;QACvB,OAAO,+BAAI,SAAS,EAAE,GAAG,aAAa,gBAAgB,YAAG,KAAK,GAAM,CAAC;KACtE;SAAM;QACL,OAAO,+BAAI,SAAS,EAAE,GAAG,aAAa,aAAa,YAAG,KAAK,GAAM,CAAC;KACnE;AACH,CAAC;AAED,SAAS,WAAW,CAAC,KAAgB,EAAE,OAAsB;IAC3D,OAAO,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACrB,oCAAS,SAAS,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,YAC3C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACnB,uBAAC,qBAAS,IAAiB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,IAAlE,MAAM,CAAC,CAAC,CAAC,CAA6D,CACvF,CAAC,GACM,CACX,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export type { ProjectSettings } from './ProjectSettings';
|
|
2
|
+
export { projectSettings } from './ProjectSettings';
|
|
1
3
|
export type { BlockDef, ContentPageMeta, ContentPageDef, Img, ImgSource, Picture } from './types';
|
|
2
|
-
export type { ContentPageContext, Router } from './ContentPageContext';
|
|
3
|
-
export { Blocks } from './Blocks';
|
|
4
|
-
export { LikeAPI } from './api/LikeAPI';
|
|
4
|
+
export type { ContentPageContext, Router, LikeService, Search, HandlerDecorator, } from './ContentPageContext';
|
|
5
5
|
export { ContentPageHead } from './ContentPageHead';
|
|
6
6
|
export { ContentPage } from './ContentPage';
|
|
7
|
+
export { Blocks } from './Blocks';
|
|
8
|
+
export { LikeAPI } from './api/LikeAPI';
|
|
7
9
|
export * as url from './utils/url';
|
package/dist/index.js
CHANGED
|
@@ -22,14 +22,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
return result;
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.url = exports.
|
|
26
|
-
var
|
|
27
|
-
Object.defineProperty(exports, "
|
|
28
|
-
var LikeAPI_1 = require("./api/LikeAPI");
|
|
29
|
-
Object.defineProperty(exports, "LikeAPI", { enumerable: true, get: function () { return LikeAPI_1.LikeAPI; } });
|
|
25
|
+
exports.url = exports.LikeAPI = exports.Blocks = exports.ContentPage = exports.ContentPageHead = exports.projectSettings = void 0;
|
|
26
|
+
var ProjectSettings_1 = require("./ProjectSettings");
|
|
27
|
+
Object.defineProperty(exports, "projectSettings", { enumerable: true, get: function () { return ProjectSettings_1.projectSettings; } });
|
|
30
28
|
var ContentPageHead_1 = require("./ContentPageHead");
|
|
31
29
|
Object.defineProperty(exports, "ContentPageHead", { enumerable: true, get: function () { return ContentPageHead_1.ContentPageHead; } });
|
|
32
30
|
var ContentPage_1 = require("./ContentPage");
|
|
33
31
|
Object.defineProperty(exports, "ContentPage", { enumerable: true, get: function () { return ContentPage_1.ContentPage; } });
|
|
32
|
+
var Blocks_1 = require("./Blocks");
|
|
33
|
+
Object.defineProperty(exports, "Blocks", { enumerable: true, get: function () { return Blocks_1.Blocks; } });
|
|
34
|
+
var LikeAPI_1 = require("./api/LikeAPI");
|
|
35
|
+
Object.defineProperty(exports, "LikeAPI", { enumerable: true, get: function () { return LikeAPI_1.LikeAPI; } });
|
|
34
36
|
exports.url = __importStar(require("./utils/url"));
|
|
35
37
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AAWxB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AAEpB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,yCAAwC;AAA/B,kGAAA,OAAO,OAAA;AAEhB,mDAAmC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const SearchBar: (props: import("@redneckz/uni-jsx").PropsWithChildren<
|
|
1
|
+
import type { UniBlockProps } from '../types';
|
|
2
|
+
export declare const SearchBar: (props: import("@redneckz/uni-jsx").PropsWithChildren<UniBlockProps, any>, context?: any) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../src/ui-kit/SearchBar.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,0CAA2C;AAE9B,QAAA,SAAS,GAAG,IAAA,aAAG,
|
|
1
|
+
{"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../src/ui-kit/SearchBar.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,0CAA2C;AAE9B,QAAA,SAAS,GAAG,IAAA,aAAG,EAAgB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IACrE,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IACnC,OAAO,CACL,kCAAM,SAAS,EAAE,YAAY,SAAS,IAAI,EAAE,EAAE,aAC5C,iCAAK,SAAS,EAAC,4FAA4F,aACzG,gCAAK,SAAS,EAAC,mBAAmB,YAAE,IAAA,iBAAS,GAAE,GAAO,EACtD,iCAAM,SAAS,EAAC,mDAAmD,2FAAsB,IACrF,EACN,kCACE,SAAS,EAAC,qIAAqI,EAC/I,KAAK,EAAE,MAAM,CAAC,IAAI,EAClB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC/C,IAAI,EAAC,MAAM,EACX,WAAW,EAAC,4EAAgB,EAC5B,IAAI,EAAC,GAAG,GACR,EACF,mCACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,2NAA2N,EACrO,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACb,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACvB,CAAC,+CAGM,IACJ,CACR,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.useSitemap = void 0;
|
|
3
|
+
const ProjectSettings_1 = require("./ProjectSettings");
|
|
4
|
+
function useSitemap(useAsyncData) {
|
|
5
|
+
const { data } = useAsyncData(sitemapURL(), fetchSitemap);
|
|
6
|
+
return data || {};
|
|
7
|
+
}
|
|
8
|
+
exports.useSitemap = useSitemap;
|
|
9
|
+
async function fetchSitemap() {
|
|
10
|
+
const response = await fetch(sitemapURL());
|
|
11
|
+
return await response.json();
|
|
12
|
+
}
|
|
13
|
+
function sitemapURL() {
|
|
14
|
+
return `/wcms-resources/${ProjectSettings_1.projectSettings.SITEMAP || 'sitemap'}.json`;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=useSitemap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSitemap.js","sourceRoot":"","sources":["../src/useSitemap.ts"],"names":[],"mappings":";;AAEA,uDAAoD;AAEpD,SAAgB,UAAU,CAAC,YAA2B;IACpD,MAAM,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC,UAAU,EAAE,EAAE,YAAY,CAAC,CAAC;IAC1D,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AAHD,gCAGC;AAED,KAAK,UAAU,YAAY;IACzB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;IAC3C,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,mBAAmB,iCAAe,CAAC,OAAO,IAAI,SAAS,OAAO,CAAC;AACxE,CAAC"}
|
package/lib/BenefitsBlock.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UniBlockProps, Benefit } from './types';
|
|
2
2
|
export interface BenefitsBlockContent {
|
|
3
3
|
title?: string;
|
|
4
4
|
benefits?: Benefit[];
|
|
5
5
|
}
|
|
6
|
-
export interface BenefitsBlockProps extends BenefitsBlockContent,
|
|
6
|
+
export interface BenefitsBlockProps extends BenefitsBlockContent, UniBlockProps {
|
|
7
7
|
}
|
|
8
8
|
export declare const BenefitsBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<BenefitsBlockProps, any>, context?: any) => any;
|
package/lib/Blocks.d.ts
CHANGED
|
@@ -7,4 +7,6 @@ export declare const Blocks: {
|
|
|
7
7
|
StepsBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./StepsBlock").StepsBlockProps, any>, context?: any) => any;
|
|
8
8
|
BenefitsBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./BenefitsBlock").BenefitsBlockProps, any>, context?: any) => any;
|
|
9
9
|
ProductGallery: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductGallery").ProductGalleryProps, any>, context?: any) => any;
|
|
10
|
+
ExchangeRateTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ExchangeRateTile").ExchangeRateTileProps, any>, context?: any) => any;
|
|
11
|
+
MobileAppTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./MobileAppTile").MobileAppTileProps, any>, context?: any) => any;
|
|
10
12
|
};
|
package/lib/Blocks.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BenefitsBlock } from './BenefitsBlock.js';
|
|
2
|
+
import { ExchangeRateTile } from './ExchangeRateTile.js';
|
|
2
3
|
import { Footer } from './Footer/index.js';
|
|
4
|
+
import { Header } from './Header/index.js';
|
|
5
|
+
import { MobileAppTile } from './MobileAppTile.js';
|
|
3
6
|
import { Placeholder } from './Placeholder.js';
|
|
4
|
-
import { Tile } from './Tile.js';
|
|
5
7
|
import { ProductBlock } from './ProductBlock.js';
|
|
6
|
-
import { StepsBlock } from './StepsBlock.js';
|
|
7
|
-
import { BenefitsBlock } from './BenefitsBlock.js';
|
|
8
8
|
import { ProductGallery } from './ProductGallery.js';
|
|
9
|
+
import { StepsBlock } from './StepsBlock.js';
|
|
10
|
+
import { Tile } from './Tile.js';
|
|
9
11
|
export const Blocks = {
|
|
10
12
|
Header,
|
|
11
13
|
Footer,
|
|
@@ -15,5 +17,7 @@ export const Blocks = {
|
|
|
15
17
|
StepsBlock,
|
|
16
18
|
BenefitsBlock,
|
|
17
19
|
ProductGallery,
|
|
20
|
+
ExchangeRateTile,
|
|
21
|
+
MobileAppTile,
|
|
18
22
|
};
|
|
19
23
|
//# sourceMappingURL=Blocks.js.map
|
package/lib/Blocks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../src/Blocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../src/Blocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,MAAM;IACN,MAAM;IACN,WAAW;IACX,IAAI;IACJ,YAAY;IACZ,UAAU;IACV,aAAa;IACb,cAAc;IACd,gBAAgB;IAChB,aAAa;CACd,CAAC"}
|
package/lib/ContentPage.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BlockDef, ContentPageDef,
|
|
1
|
+
import type { BlockDef, ContentPageDef, UniBlockProps } from './types';
|
|
2
2
|
interface BlockDecoratorProps<VNode> {
|
|
3
3
|
blockClassName: string;
|
|
4
4
|
block: BlockDef;
|
|
@@ -8,7 +8,7 @@ interface BlockDecoratorProps<VNode> {
|
|
|
8
8
|
}) => VNode;
|
|
9
9
|
}
|
|
10
10
|
export declare type BlockDecorator<VNode = any> = (props: BlockDecoratorProps<VNode>, index?: number | string) => any;
|
|
11
|
-
export interface ContentPageProps extends
|
|
11
|
+
export interface ContentPageProps extends UniBlockProps {
|
|
12
12
|
data: ContentPageDef;
|
|
13
13
|
blockDecorator?: BlockDecorator;
|
|
14
14
|
}
|
package/lib/ContentPage.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { Blocks } from './Blocks.js';
|
|
3
|
+
import { Blocks } from './Blocks.js'; // TODO Lazy load
|
|
4
4
|
import { LikeControl } from './LikeControl.js';
|
|
5
|
+
import { Placeholder } from './Placeholder.js';
|
|
5
6
|
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
6
7
|
export const ContentPage = JSX(({ className, data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' }, context, blockDecorator = defaultBlockDecorator, }) => {
|
|
7
8
|
return (_jsxs("section", { className: "relative", "data-theme": colorPalette, children: [_jsx("div", { className: `grid grid-cols-12 gap-1 ${style2className(pageStyle)} ${className}`, children: blocks?.length ? blocks.map(renderBlock) : null }), likeControl && (_jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: _jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }) }))] }));
|
|
@@ -9,9 +10,8 @@ export const ContentPage = JSX(({ className, data: { style: pageStyle, blocks, l
|
|
|
9
10
|
const { type } = block;
|
|
10
11
|
if (!(type in Blocks)) {
|
|
11
12
|
console.warn(`No block with "${type}" is registered`);
|
|
12
|
-
return null;
|
|
13
13
|
}
|
|
14
|
-
const BlockComponent = Blocks[type];
|
|
14
|
+
const BlockComponent = Blocks[type] || Placeholder;
|
|
15
15
|
return blockDecorator({
|
|
16
16
|
blockClassName: style2className(block.style),
|
|
17
17
|
block,
|
package/lib/ContentPage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPage.js","sourceRoot":"","sources":["../src/ContentPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentPage.js","sourceRoot":"","sources":["../src/ContentPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC,CAAC,iBAAiB;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAmB5C,MAAM,qBAAqB,GAAmB,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAClF,MAAM,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;AAEpC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAC5B,CAAC,EACC,SAAS,EACT,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,GAAG,IAAI,EAAE,EACpE,OAAO,EACP,cAAc,GAAG,qBAAqB,GACvC,EAAE,EAAE;IACH,OAAO,CACL,mBAAS,SAAS,EAAC,UAAU,gBAAa,YAAY,aACpD,cAAK,SAAS,EAAE,2BAA2B,eAAe,CAAC,SAAS,CAAC,IAAI,SAAS,EAAE,YACjF,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,GAC5C,EACL,WAAW,IAAI,CACd,cAAK,SAAS,EAAC,qEAAqE,YAClF,KAAC,WAAW,IACV,SAAS,EAAC,mDAAmD,EAC7D,OAAO,EAAE,OAAO,GAChB,GACE,CACP,IACO,CACX,CAAC;IAEF,SAAS,WAAW,CAAC,KAAe,EAAE,CAAS;QAC7C,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,EAAE;YACrB,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,iBAAiB,CAAC,CAAC;SACvD;QAED,MAAM,cAAc,GAAG,MAAM,CAAC,IAA2B,CAAC,IAAI,WAAW,CAAC;QAC1E,OAAO,cAAc,CACnB;YACE,cAAc,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC;YAC5C,KAAK;YACL,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;gBAChB,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;gBACjD,OAAO,CACL,KAAC,cAAc,IAEb,SAAS,EAAE,KAAK,CAAC,cAAc,EAC/B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,KACZ,OAAO,YAEV,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,IAN3C,GAAG,IAAI,IAAI,CAAC,EAAE,CAOJ,CAClB,CAAC;YACJ,CAAC;SACF,EACD,SAAS,CAAC,EAAE,CACb,CAAC;IACJ,CAAC;AACH,CAAC,CACF,CAAC;AAEF,SAAS,eAAe,CAAC,KAAkC;IACzD,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HeaderContent } from './Header';
|
|
2
1
|
export interface Router {
|
|
3
2
|
pathname: string;
|
|
4
3
|
query: Record<string, string | string[] | undefined>;
|
|
@@ -16,10 +15,14 @@ export interface Search {
|
|
|
16
15
|
term: string;
|
|
17
16
|
setTerm: (t: string) => void;
|
|
18
17
|
}
|
|
18
|
+
export declare type AsyncDataHook = <Data, Error = any>(key: string, fetcher: () => Promise<Data>) => {
|
|
19
|
+
data?: Data;
|
|
20
|
+
error?: Error;
|
|
21
|
+
};
|
|
19
22
|
export interface ContentPageContext {
|
|
20
23
|
useRouter: () => Router;
|
|
21
|
-
useState: <
|
|
22
|
-
|
|
24
|
+
useState: <State>(initialState: State) => [State, (_: State) => void];
|
|
25
|
+
useAsyncData: AsyncDataHook;
|
|
23
26
|
useLikeService: () => LikeService;
|
|
24
27
|
useSearch: () => Search;
|
|
25
28
|
handlerDecorator?: HandlerDecorator;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UniBlockProps } from './types';
|
|
2
|
+
export interface ExchangeRateTileContent {
|
|
3
|
+
title?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ExchangeRateTileProps extends ExchangeRateTileContent, UniBlockProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const ExchangeRateTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<ExchangeRateTileProps, any>, context?: any) => any;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { DollarIcon, EuroIcon } from './Icons/index.js';
|
|
4
|
+
import { Tile } from './Tile.js';
|
|
5
|
+
const CBR_EXCHANGE_RATE_URL = 'https://www.cbr-xml-daily.ru/daily_json.js';
|
|
6
|
+
const CURRENCY_CODES = ['USD', 'EUR'];
|
|
7
|
+
const CURRENCY_ICONS_MAP = {
|
|
8
|
+
USD: DollarIcon,
|
|
9
|
+
EUR: EuroIcon,
|
|
10
|
+
};
|
|
11
|
+
const button = {
|
|
12
|
+
text: 'Все показатели',
|
|
13
|
+
href: 'https://cbr.ru/currency_base/daily/',
|
|
14
|
+
};
|
|
15
|
+
export const ExchangeRateTile = JSX(({ className, context, title }) => {
|
|
16
|
+
const { data } = context.useAsyncData(CBR_EXCHANGE_RATE_URL, fetchExchangeRate);
|
|
17
|
+
return (_jsx(Tile, { className: className, context: context, title: title || 'Курсы обмена валют', button: button, children: _jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx(CurrencyTH, { children: "\u0412\u0430\u043B\u044E\u0442\u0430" }), _jsx(CurrencyTH, { className: "pl-11", children: "\u041A\u0443\u0440\u0441" })] }) }), _jsx("tbody", { children: CURRENCY_CODES.map((code) => {
|
|
18
|
+
const value = (data?.Valute || {})[code]?.Value;
|
|
19
|
+
return (_jsxs("tr", { children: [_jsx(CurrencyTD, { className: "pt-4", children: _jsxs("div", { className: "flex items-center", children: [CURRENCY_ICONS_MAP[code] ? CURRENCY_ICONS_MAP[code]() : null, _jsx("span", { className: "ml-2", children: code })] }) }), _jsx(CurrencyTD, { className: "pt-4 pl-11", children: formatCurrency(value) })] }, code));
|
|
20
|
+
}) })] }) }));
|
|
21
|
+
});
|
|
22
|
+
const CurrencyTH = JSX(({ className = '', children }) => (_jsx("th", { className: `text-left font-normal text-sm text-secondary-text ${className}`, children: children })));
|
|
23
|
+
const CurrencyTD = JSX(({ className = '', children }) => (_jsx("td", { className: `text-left font-normal text-base text-primary-text ${className}`, children: children })));
|
|
24
|
+
async function fetchExchangeRate() {
|
|
25
|
+
const response = await fetch(CBR_EXCHANGE_RATE_URL);
|
|
26
|
+
return await response.json();
|
|
27
|
+
}
|
|
28
|
+
const currencyNumberFormat = new Intl.NumberFormat('ru', { style: 'currency', currency: 'RUB' });
|
|
29
|
+
const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
|
|
30
|
+
//# sourceMappingURL=ExchangeRateTile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExchangeRateTile.js","sourceRoot":"","sources":["../src/ExchangeRateTile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAU9B,MAAM,qBAAqB,GAAG,4CAA4C,CAAC;AAE3E,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACtC,MAAM,kBAAkB,GAAG;IACzB,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,QAAQ;CACd,CAAC;AAEF,MAAM,MAAM,GAAgB;IAC1B,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,qCAAqC;CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAwB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3F,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAC;IAChF,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,IAAI,oBAAoB,EACpC,MAAM,EAAE,MAAM,YAEd,4BACE,0BACE,yBACE,KAAC,UAAU,uDAAoB,EAC/B,KAAC,UAAU,IAAC,SAAS,EAAC,OAAO,yCAAkB,IAC5C,GACC,EACR,0BACG,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBAC3B,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;wBAChD,OAAO,CACL,yBACE,KAAC,UAAU,IAAC,SAAS,EAAC,MAAM,YAC1B,eAAK,SAAS,EAAC,mBAAmB,aAC/B,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAC7D,eAAM,SAAS,EAAC,MAAM,YAAE,IAAI,GAAQ,IAChC,GACK,EACb,KAAC,UAAU,IAAC,SAAS,EAAC,YAAY,YAAE,cAAc,CAAC,KAAK,CAAC,GAAc,KAPhE,IAAI,CAQR,CACN,CAAC;oBACJ,CAAC,CAAC,GACI,IACF,GACH,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,GAAG,CAAyB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC/E,aAAI,SAAS,EAAE,qDAAqD,SAAS,EAAE,YAAG,QAAQ,GAAM,CACjG,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,GAAG,CAAyB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC/E,aAAI,SAAS,EAAE,qDAAqD,SAAS,EAAE,YAAG,QAAQ,GAAM,CACjG,CAAC,CAAC;AAEH,KAAK,UAAU,iBAAiB;IAG9B,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACpD,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,CAAC;AAED,MAAM,oBAAoB,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;AAEjG,MAAM,cAAc,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC"}
|
package/lib/Footer/Contacts.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface ContactsProps extends
|
|
1
|
+
import type { UniBlockProps, ContactInfo } from '../types';
|
|
2
|
+
export interface ContactsProps extends UniBlockProps {
|
|
3
3
|
items?: ContactInfo[];
|
|
4
4
|
hasButton?: boolean;
|
|
5
5
|
}
|
package/lib/Footer/Footer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LinkContent,
|
|
1
|
+
import type { LinkContent, UniBlockProps, ContactInfo, TopMenuItem } from '../types';
|
|
2
2
|
interface FooterContent {
|
|
3
3
|
documents?: LinkContent[];
|
|
4
4
|
relatedEnterprises?: LinkContent[];
|
|
@@ -6,7 +6,7 @@ interface FooterContent {
|
|
|
6
6
|
socialMedia?: Omit<LinkContent, 'text'>[];
|
|
7
7
|
topItems?: TopMenuItem[];
|
|
8
8
|
}
|
|
9
|
-
export interface FooterProps extends FooterContent,
|
|
9
|
+
export interface FooterProps extends FooterContent, UniBlockProps {
|
|
10
10
|
}
|
|
11
11
|
export declare const Footer: (props: import("@redneckz/uni-jsx").PropsWithChildren<FooterProps, any>, context?: any) => any;
|
|
12
12
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LinkContent } from '../types';
|
|
2
|
-
import type {
|
|
3
|
-
export interface FooterLink extends
|
|
2
|
+
import type { UniBlockProps } from '../types';
|
|
3
|
+
export interface FooterLink extends UniBlockProps {
|
|
4
4
|
links?: LinkContent[];
|
|
5
5
|
}
|
package/lib/Footer/Sitemap.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TopMenuItem,
|
|
2
|
-
export interface SitemapProps extends
|
|
1
|
+
import type { TopMenuItem, UniBlockProps } from '../types';
|
|
2
|
+
export interface SitemapProps extends UniBlockProps {
|
|
3
3
|
items?: TopMenuItem[];
|
|
4
4
|
}
|
|
5
5
|
export declare const Sitemap: (props: import("@redneckz/uni-jsx").PropsWithChildren<SitemapProps, any>, context?: any) => any;
|
package/lib/Footer/Sitemap.js
CHANGED
|
@@ -2,8 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { mergeTopItems } from '../mergeTopItems.js';
|
|
4
4
|
import { useLink } from '../useLink.js';
|
|
5
|
+
import { useSitemap } from '../useSitemap.js';
|
|
5
6
|
export const Sitemap = JSX(({ className, items, context }) => {
|
|
6
|
-
const sitemap = context.
|
|
7
|
+
const sitemap = useSitemap(context.useAsyncData);
|
|
7
8
|
const mergedItems = mergeTopItems(sitemap.topItems, items);
|
|
8
9
|
return (_jsx("div", { className: `flex items-start justify-start gap-11 xl:gap-5 ${className || ''}`, children: mergedItems?.map((_, i) => renderColumn(_, i, context)) }));
|
|
9
10
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sitemap.js","sourceRoot":"","sources":["../../src/Footer/Sitemap.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Sitemap.js","sourceRoot":"","sources":["../../src/Footer/Sitemap.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAe,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;IACzE,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACjD,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAE3D,OAAO,CACL,cAAK,SAAS,EAAE,kDAAkD,SAAS,IAAI,EAAE,EAAE,YAChF,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,GACpD,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,CAAC,CAAc,EAAE,KAAa,EAAE,OAA2B,EAAE,EAAE;IAClF,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IACnC,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IACrC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;IAExC,OAAO,CACL,eAAyB,SAAS,EAAC,oCAAoC,aACrE,YACE,SAAS,EAAC,sEAAsE,EAChF,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,IAAI,OAAO,YAExB,IAAI,IAAI,UAAU,KAAK,EAAE,GACxB,EACH,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACpB,KAAC,UAAU,OAAqB,OAAO,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC,IAAvD,MAAM,CAAC,CAAC,CAAC,CAAkD,CAC7E,CAAC,KAVM,MAAM,CAAC,KAAK,CAAC,CAWjB,CACP,CAAC;AACJ,CAAC,CAAC;AAMF,MAAM,UAAU,GAAG,GAAG,CAAkB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACzE,YACE,SAAS,EAAC,gGAAgG,EAC1G,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,IAAI,OAAO,YAExB,IAAI,IAAI,UAAU,KAAK,EAAE,GACxB,CACL,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LinkContent,
|
|
2
|
-
export interface SocialMediaProps extends
|
|
1
|
+
import type { LinkContent, UniBlockProps } from '../types';
|
|
2
|
+
export interface SocialMediaProps extends UniBlockProps {
|
|
3
3
|
media?: Omit<LinkContent, 'text'>[];
|
|
4
4
|
}
|
|
5
5
|
export declare const SocialMedia: (props: import("@redneckz/uni-jsx").PropsWithChildren<SocialMediaProps, any>, context?: any) => any;
|
|
@@ -3,9 +3,9 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
3
3
|
import { TelegramIcon, VKIcon, OkIcon } from '../Icons/index.js';
|
|
4
4
|
import { useLink } from '../useLink.js';
|
|
5
5
|
const ICONS_MAP = [
|
|
6
|
-
{ origins: ['t.me', 'telegram.org'], icon: TelegramIcon },
|
|
7
|
-
{ origins: ['vk.com'], icon: VKIcon },
|
|
8
|
-
{ origins: ['ok.ru'], icon: OkIcon },
|
|
6
|
+
{ origins: ['t.me', 'telegram.org'], icon: TelegramIcon, label: 'Телеграм' },
|
|
7
|
+
{ origins: ['vk.com'], icon: VKIcon, label: 'ВКонтакте' },
|
|
8
|
+
{ origins: ['ok.ru'], icon: OkIcon, label: 'Одноклассники' },
|
|
9
9
|
];
|
|
10
10
|
export const SocialMedia = JSX(({ className, media, context }) => {
|
|
11
11
|
const router = context.useRouter();
|
|
@@ -13,7 +13,7 @@ export const SocialMedia = JSX(({ className, media, context }) => {
|
|
|
13
13
|
return (_jsx("div", { className: `flex items-end justify-end gap-2 py-6 ${className || ''}`, children: media?.map((_, index) => (_jsx(MediaButton, { ...useLink({ router, handlerDecorator }, _) }, String(index)))) }));
|
|
14
14
|
});
|
|
15
15
|
const MediaButton = JSX(({ href }) => {
|
|
16
|
-
const { icon: Icon } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
17
|
-
return (_jsx("a", { className: "flex items-center justify-center border-solid border-1 border-main-divider rounded-full no-underline outline-none w-8 h-8
|
|
16
|
+
const { icon: Icon, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
17
|
+
return (_jsx("a", { className: "flex items-center justify-center border-solid border-1 border-main-divider rounded-full no-underline outline-none w-8 h-8", href: href, target: "_blank", rel: "noopener noreferrer", "aria-label": label, children: Icon && _jsx(Icon, { className: "block" }) }));
|
|
18
18
|
});
|
|
19
19
|
//# sourceMappingURL=SocialMedia.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialMedia.js","sourceRoot":"","sources":["../../src/Footer/SocialMedia.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,SAAS,GAAG;IAChB,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"SocialMedia.js","sourceRoot":"","sources":["../../src/Footer/SocialMedia.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,SAAS,GAAG;IAChB,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE;IAC5E,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE;IACzD,EAAE,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE;CAC7D,CAAC;AAMF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;IACjF,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IACnC,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IACrC,OAAO,CACL,cAAK,SAAS,EAAE,yCAAyC,SAAS,IAAI,EAAE,EAAE,YACvE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CACxB,KAAC,WAAW,OAAyB,OAAO,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC,IAA3D,MAAM,CAAC,KAAK,CAAC,CAAkD,CAClF,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAMH,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACrD,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GACzB,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAChF,OAAO,CACL,YACE,SAAS,EAAC,2HAA2H,EACrI,IAAI,EAAE,IAAI,EACV,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,gBACb,KAAK,YAEhB,IAAI,IAAI,KAAC,IAAI,IAAC,SAAS,EAAC,OAAO,GAAG,GACjC,CACL,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/Header/Header.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { UniBlockProps } from '../types';
|
|
1
2
|
import type { HeaderContent } from './HeaderContent';
|
|
2
|
-
|
|
3
|
-
export interface HeaderProps extends HeaderContent, UniBlocksComponentProps {
|
|
3
|
+
export interface HeaderProps extends HeaderContent, UniBlockProps {
|
|
4
4
|
}
|
|
5
5
|
export declare const Header: (props: import("@redneckz/uni-jsx").PropsWithChildren<HeaderProps, any>, context?: any) => any;
|