@redneckz/wildless-cms-uni-blocks 0.3.55 → 0.3.57
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/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +69 -21
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BlockContent.d.ts +2 -1
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +3 -5
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/CustomContentPage.d.ts +30 -0
- package/dist/components/ContentPage/CustomContentPage.js +33 -0
- package/dist/components/ContentPage/CustomContentPage.js.map +1 -0
- package/dist/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
- package/dist/components/GroupBlock/BlocksTypeProps.js +2 -0
- package/dist/components/GroupBlock/BlocksTypeProps.js.map +1 -0
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.js +9 -0
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
- package/dist/components/GroupBlock/GroupBlock.d.ts +9 -0
- package/dist/components/GroupBlock/GroupBlock.js +19 -0
- package/dist/components/GroupBlock/GroupBlock.js.map +1 -0
- package/dist/components/GroupBlock/GroupBlockContent.d.ts +21 -0
- package/dist/components/GroupBlock/GroupBlockContent.js +2 -0
- package/dist/components/GroupBlock/GroupBlockContent.js.map +1 -0
- package/dist/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
- package/dist/components/GroupBlock/GroupBlockTabs.js +18 -0
- package/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -0
- package/dist/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
- package/dist/components/GroupBlock/GroupBlocksItem.js +20 -0
- package/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -0
- package/dist/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
- package/dist/components/GroupBlock/filterBlocksByTag.js +7 -0
- package/dist/components/GroupBlock/filterBlocksByTag.js.map +1 -0
- package/dist/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
- package/dist/components/GroupBlock/renderBlocksTypes.js +16 -0
- package/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -0
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +4 -2
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +9 -11
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/utils/style2className.d.ts +1 -0
- package/dist/utils/style2className.js +7 -0
- package/dist/utils/style2className.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/BlockContent.d.ts +2 -1
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +1 -3
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/CustomContentPage.d.ts +30 -0
- package/lib/components/ContentPage/CustomContentPage.js +31 -0
- package/lib/components/ContentPage/CustomContentPage.js.map +1 -0
- package/lib/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
- package/lib/components/GroupBlock/BlocksTypeProps.js +2 -0
- package/lib/components/GroupBlock/BlocksTypeProps.js.map +1 -0
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.js +7 -0
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
- package/lib/components/GroupBlock/GroupBlock.d.ts +9 -0
- package/lib/components/GroupBlock/GroupBlock.fixture.d.ts +4 -0
- package/lib/components/GroupBlock/GroupBlock.js +17 -0
- package/lib/components/GroupBlock/GroupBlock.js.map +1 -0
- package/lib/components/GroupBlock/GroupBlockContent.d.ts +21 -0
- package/lib/components/GroupBlock/GroupBlockContent.js +2 -0
- package/lib/components/GroupBlock/GroupBlockContent.js.map +1 -0
- package/lib/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
- package/lib/components/GroupBlock/GroupBlockTabs.js +16 -0
- package/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -0
- package/lib/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
- package/lib/components/GroupBlock/GroupBlocksItem.js +17 -0
- package/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -0
- package/lib/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
- package/lib/components/GroupBlock/filterBlocksByTag.js +4 -0
- package/lib/components/GroupBlock/filterBlocksByTag.js.map +1 -0
- package/lib/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
- package/lib/components/GroupBlock/renderBlocksTypes.js +13 -0
- package/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -0
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +4 -2
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +9 -11
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/lib/types.d.ts +5 -0
- package/lib/utils/style2className.d.ts +1 -0
- package/lib/utils/style2className.js +4 -0
- package/lib/utils/style2className.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +4 -3
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BlockContent.d.ts +2 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +3 -5
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/CustomContentPage.d.ts +30 -0
- package/mobile/dist/components/ContentPage/CustomContentPage.js +33 -0
- package/mobile/dist/components/ContentPage/CustomContentPage.js.map +1 -0
- package/mobile/dist/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
- package/mobile/dist/components/GroupBlock/BlocksTypeProps.js +2 -0
- package/mobile/dist/components/GroupBlock/BlocksTypeProps.js.map +1 -0
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.js +9 -0
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlock.d.ts +9 -0
- package/mobile/dist/components/GroupBlock/GroupBlock.js +19 -0
- package/mobile/dist/components/GroupBlock/GroupBlock.js.map +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlockContent.d.ts +21 -0
- package/mobile/dist/components/GroupBlock/GroupBlockContent.js +2 -0
- package/mobile/dist/components/GroupBlock/GroupBlockContent.js.map +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.js +18 -0
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.js +20 -0
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -0
- package/mobile/dist/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
- package/mobile/dist/components/GroupBlock/filterBlocksByTag.js +7 -0
- package/mobile/dist/components/GroupBlock/filterBlocksByTag.js.map +1 -0
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js +16 -0
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -0
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +4 -2
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +9 -11
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/mobile/dist/types.d.ts +5 -0
- package/mobile/dist/utils/style2className.d.ts +1 -0
- package/mobile/dist/utils/style2className.js +7 -0
- package/mobile/dist/utils/style2className.js.map +1 -0
- package/mobile/lib/components/BlockContent.d.ts +2 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +1 -3
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/CustomContentPage.d.ts +30 -0
- package/mobile/lib/components/ContentPage/CustomContentPage.js +31 -0
- package/mobile/lib/components/ContentPage/CustomContentPage.js.map +1 -0
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.js +2 -0
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.js.map +1 -0
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.js +7 -0
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlock.d.ts +9 -0
- package/mobile/lib/components/GroupBlock/GroupBlock.js +17 -0
- package/mobile/lib/components/GroupBlock/GroupBlock.js.map +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlockContent.d.ts +21 -0
- package/mobile/lib/components/GroupBlock/GroupBlockContent.js +2 -0
- package/mobile/lib/components/GroupBlock/GroupBlockContent.js.map +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.js +16 -0
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.js +17 -0
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -0
- package/mobile/lib/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
- package/mobile/lib/components/GroupBlock/filterBlocksByTag.js +4 -0
- package/mobile/lib/components/GroupBlock/filterBlocksByTag.js.map +1 -0
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js +13 -0
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -0
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +4 -2
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +9 -11
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/mobile/lib/types.d.ts +5 -0
- package/mobile/lib/utils/style2className.d.ts +1 -0
- package/mobile/lib/utils/style2className.js +4 -0
- package/mobile/lib/utils/style2className.js.map +1 -0
- package/mobile/src/components/BlockContent.ts +3 -1
- package/mobile/src/components/ContentPage/ContentPage.tsx +1 -4
- package/mobile/src/components/ContentPage/CustomContentPage.tsx +82 -0
- package/mobile/src/components/GroupBlock/BlocksTypeProps.ts +40 -0
- package/mobile/src/components/GroupBlock/EmbeddableGroupBlocks.tsx +7 -0
- package/mobile/src/components/GroupBlock/GroupBlock.example.json +27 -0
- package/mobile/src/components/GroupBlock/GroupBlock.tsx +43 -0
- package/mobile/src/components/GroupBlock/GroupBlockContent.ts +23 -0
- package/mobile/src/components/GroupBlock/GroupBlockTabs.tsx +54 -0
- package/mobile/src/components/GroupBlock/GroupBlocksItem.tsx +30 -0
- package/mobile/src/components/GroupBlock/filterBlocksByTag.ts +5 -0
- package/mobile/src/components/GroupBlock/renderBlocksTypes.tsx +27 -0
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +4 -2
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +8 -14
- package/mobile/src/types.ts +7 -1
- package/mobile/src/utils/style2className.ts +3 -0
- package/package.json +1 -1
- package/src/components/BlockContent.ts +3 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/ContentPage/ContentPage.tsx +1 -4
- package/src/components/ContentPage/CustomContentPage.tsx +82 -0
- package/src/components/GroupBlock/BlocksTypeProps.ts +40 -0
- package/src/components/GroupBlock/EmbeddableGroupBlocks.tsx +7 -0
- package/src/components/GroupBlock/GroupBlock.example.json +27 -0
- package/src/components/GroupBlock/GroupBlock.fixture.tsx +51 -0
- package/src/components/GroupBlock/GroupBlock.tsx +43 -0
- package/src/components/GroupBlock/GroupBlockContent.ts +23 -0
- package/src/components/GroupBlock/GroupBlockTabs.tsx +54 -0
- package/src/components/GroupBlock/GroupBlocksItem.tsx +30 -0
- package/src/components/GroupBlock/filterBlocksByTag.ts +5 -0
- package/src/components/GroupBlock/renderBlocksTypes.tsx +27 -0
- package/src/components/OtherProducts/OtherProductsContent.ts +4 -2
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +8 -14
- package/src/types.ts +7 -1
- package/src/utils/style2className.ts +3 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ContentPageDef, CustomPageTemplate, UniBlockProps } from '../../types';
|
|
2
|
+
import { ContentPageContext } from './ContentPageContext';
|
|
3
|
+
interface PageDecoratorProps<VNode> {
|
|
4
|
+
pageClassName: string;
|
|
5
|
+
pageTemplate: CustomPageTemplate;
|
|
6
|
+
render: (props: {
|
|
7
|
+
pageClassName: string;
|
|
8
|
+
pageTemplate: CustomPageTemplate;
|
|
9
|
+
}) => VNode;
|
|
10
|
+
}
|
|
11
|
+
export declare type PageDecorator<VNode = any> = (props: PageDecoratorProps<VNode>, index?: number | string) => any;
|
|
12
|
+
export interface PageTemplate {
|
|
13
|
+
name: string;
|
|
14
|
+
template: any;
|
|
15
|
+
}
|
|
16
|
+
export declare type PageTemplatesRegistry = Record<string, PageTemplate>;
|
|
17
|
+
export interface CustomContentPageProps extends UniBlockProps {
|
|
18
|
+
pageTemplatesRegistry: PageTemplatesRegistry;
|
|
19
|
+
data: ContentPageDef;
|
|
20
|
+
pageDecorator?: PageDecorator;
|
|
21
|
+
}
|
|
22
|
+
export interface RenderPageFunc {
|
|
23
|
+
pageTemplate: CustomPageTemplate;
|
|
24
|
+
pageClassName: string;
|
|
25
|
+
pageDecorator: PageDecorator;
|
|
26
|
+
pageTemplatesRegistry: PageTemplatesRegistry;
|
|
27
|
+
context: ContentPageContext;
|
|
28
|
+
}
|
|
29
|
+
export declare const CustomContentPage: (props: import("@redneckz/uni-jsx").PropsWithChildren<CustomContentPageProps, any>, context?: any) => any;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.CustomContentPage = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const style2className_1 = require("../../utils/style2className");
|
|
6
|
+
const defaultPageDecorator = ({ pageClassName, pageTemplate, render }) => render({ pageClassName, pageTemplate });
|
|
7
|
+
exports.CustomContentPage = (0, uni_jsx_1.JSX)(({ className = '', context, pageTemplatesRegistry, data: { style: pageStyle, customPageTmpl: pageTemplate }, pageDecorator = defaultPageDecorator, }) => {
|
|
8
|
+
return pageTemplate
|
|
9
|
+
? renderPage({
|
|
10
|
+
pageTemplate,
|
|
11
|
+
pageClassName: `${(0, style2className_1.style2className)(pageStyle)} ${className}`,
|
|
12
|
+
pageDecorator,
|
|
13
|
+
pageTemplatesRegistry,
|
|
14
|
+
context,
|
|
15
|
+
})
|
|
16
|
+
: null;
|
|
17
|
+
});
|
|
18
|
+
function renderPage({ pageTemplate, pageClassName, pageDecorator, pageTemplatesRegistry, context, }) {
|
|
19
|
+
const { type } = pageTemplate;
|
|
20
|
+
if (!(type && type in pageTemplatesRegistry) || !pageTemplatesRegistry[type].template) {
|
|
21
|
+
throw new Error(`No page template with "${type}" is registered`);
|
|
22
|
+
}
|
|
23
|
+
const { template: PageComponent } = pageTemplatesRegistry[type];
|
|
24
|
+
return pageDecorator({
|
|
25
|
+
pageClassName,
|
|
26
|
+
pageTemplate,
|
|
27
|
+
render: (props) => {
|
|
28
|
+
const { content } = props.pageTemplate;
|
|
29
|
+
return (0, jsx_runtime_1.jsx)(PageComponent, { className: props.pageClassName, context: context, ...content });
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=CustomContentPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomContentPage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/CustomContentPage.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,iEAA8D;AAmC9D,MAAM,oBAAoB,GAAkB,CAAC,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,CACtF,MAAM,CAAC,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC,CAAC;AAE7B,QAAA,iBAAiB,GAAG,IAAA,aAAG,EAClC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,qBAAqB,EACrB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,EACxD,aAAa,GAAG,oBAAoB,GACrC,EAAE,EAAE;IACH,OAAO,YAAY;QACjB,CAAC,CAAC,UAAU,CAAC;YACT,YAAY;YACZ,aAAa,EAAE,GAAG,IAAA,iCAAe,EAAC,SAAS,CAAC,IAAI,SAAS,EAAE;YAC3D,aAAa;YACb,qBAAqB;YACrB,OAAO;SACR,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CACF,CAAC;AAEF,SAAS,UAAU,CAAC,EAClB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,OAAO,GACQ;IACf,MAAM,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC;IAC9B,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,qBAAqB,CAAC,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;QACrF,MAAM,IAAI,KAAK,CAAC,0BAA0B,IAAI,iBAAiB,CAAC,CAAC;KAClE;IAED,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,aAAa,CAAC;QACnB,aAAa;QACb,YAAY;QACZ,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YAChB,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC;YACvC,OAAO,uBAAC,aAAa,IAAC,SAAS,EAAE,KAAK,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,KAAM,OAAO,GAAI,CAAC;QAC1F,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ProductBlockContent } from '../../components/ProductBlock/ProductBlockContent';
|
|
2
|
+
import type { ProductTileContent } from '../../components/ProductTile/ProductTileContent';
|
|
3
|
+
import { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
4
|
+
export interface ActiveHandler {
|
|
5
|
+
context: ContentPageContext;
|
|
6
|
+
blocks?: GroupBlockDef[];
|
|
7
|
+
initialState?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface GroupBlockCommonProps {
|
|
10
|
+
/** @title Стиль */
|
|
11
|
+
style?: string[];
|
|
12
|
+
/** @title Теги */
|
|
13
|
+
tags?: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @title Продуктовый блок
|
|
17
|
+
* @default {"blockType": "ProductBlock"}
|
|
18
|
+
*/
|
|
19
|
+
export declare type ProductBlockDef = ProductBlockContent & GroupBlockCommonProps & {
|
|
20
|
+
blockType: 'ProductBlock';
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @title Продуктовая плитка
|
|
24
|
+
* @default {"blockType": "ProductTile"}
|
|
25
|
+
*/
|
|
26
|
+
export declare type ProductTileDef = ProductTileContent & GroupBlockCommonProps & {
|
|
27
|
+
blockType: 'ProductTile';
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @title Выберите блок
|
|
31
|
+
*/
|
|
32
|
+
export declare type EmptyOption = null;
|
|
33
|
+
/**
|
|
34
|
+
* @title Содержимое блока
|
|
35
|
+
*/
|
|
36
|
+
export declare type GroupBlockDef = EmptyOption | ProductBlockDef | ProductTileDef;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlocksTypeProps.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/BlocksTypeProps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const EmbeddableGroupBlocks: {
|
|
2
|
+
ProductBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("../ProductBlock/ProductBlock").ProductBlockProps, any>, context?: any) => any;
|
|
3
|
+
ProductTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("../ProductTile/ProductTile").ProductTileProps, any>, context?: any) => any;
|
|
4
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.EmbeddableGroupBlocks = void 0;
|
|
3
|
+
const ProductBlock_1 = require("../ProductBlock/ProductBlock");
|
|
4
|
+
const ProductTile_1 = require("../ProductTile/ProductTile");
|
|
5
|
+
exports.EmbeddableGroupBlocks = {
|
|
6
|
+
ProductBlock: ProductBlock_1.ProductBlock,
|
|
7
|
+
ProductTile: ProductTile_1.ProductTile,
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=EmbeddableGroupBlocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmbeddableGroupBlocks.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/EmbeddableGroupBlocks.tsx"],"names":[],"mappings":";;AAAA,+DAA4D;AAC5D,4DAAyD;AAE5C,QAAA,qBAAqB,GAAG;IACnC,YAAY,EAAZ,2BAAY;IACZ,WAAW,EAAX,yBAAW;CACZ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UniBlockProps } from '../../types';
|
|
2
|
+
import type { GroupBlockContent, GroupBlockTab } from './GroupBlockContent';
|
|
3
|
+
export interface TabsItemProps extends GroupBlockTab {
|
|
4
|
+
count?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface GroupBlockProps extends GroupBlockContent, UniBlockProps {
|
|
7
|
+
tabs?: TabsItemProps[];
|
|
8
|
+
}
|
|
9
|
+
export declare const GroupBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<GroupBlockProps, any>, context?: any) => any;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.GroupBlock = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const GroupBlockTabs_1 = require("./GroupBlockTabs");
|
|
6
|
+
const GroupBlocksItem_1 = require("./GroupBlocksItem");
|
|
7
|
+
const filterBlocksByTag_1 = require("./filterBlocksByTag");
|
|
8
|
+
exports.GroupBlock = (0, uni_jsx_1.JSX)(({ className = '', tabs, context, anchor = null, groupBlocks = [] }) => {
|
|
9
|
+
const [currentTag, setCurrentTag] = context.useState(tabs?.[0]?.tag);
|
|
10
|
+
const filteredBlocks = (0, filterBlocksByTag_1.filterBlocksByTag)(groupBlocks, currentTag);
|
|
11
|
+
const tabsNewMap = tabs?.map((tab) => {
|
|
12
|
+
const count = tab.tag
|
|
13
|
+
? groupBlocks.filter((block) => block?.tags?.includes(`${tab.tag}`)).length
|
|
14
|
+
: groupBlocks.length;
|
|
15
|
+
return { ...tab, count };
|
|
16
|
+
});
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("section", { id: anchor, className: `box-border gap-1 h-12 ${className}`, children: [tabsNewMap?.length ? ((0, jsx_runtime_1.jsx)(GroupBlockTabs_1.GroupBlockTabs, { currentTag: currentTag, onTabClick: setCurrentTag, tabs: tabsNewMap })) : null, groupBlocks.length ? ((0, jsx_runtime_1.jsx)("div", { className: "list-none", children: (0, jsx_runtime_1.jsx)(GroupBlocksItem_1.GroupBlocksItem, { context: context, groupBlocks: filteredBlocks }) })) : null] }));
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=GroupBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupBlock.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/GroupBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,qDAAkD;AAClD,uDAAoD;AACpD,2DAAwD;AAU3C,QAAA,UAAU,GAAG,IAAA,aAAG,EAC3B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,EAAE,EAAE;IACrE,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAErE,MAAM,cAAc,GAAG,IAAA,qCAAiB,EAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAElE,MAAM,UAAU,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QACnC,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG;YACnB,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,MAAM;YAC3E,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC;QAEvB,OAAO,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,qCAAS,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,yBAAyB,SAAS,EAAE,aACjE,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,CACpB,uBAAC,+BAAc,IAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,GAAI,CACxF,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CACpB,gCAAK,SAAS,EAAC,WAAW,YACxB,uBAAC,iCAAe,IAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,cAAc,GAAI,GAC9D,CACP,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { GroupBlockDef } from './BlocksTypeProps';
|
|
2
|
+
/**
|
|
3
|
+
* @title Таб
|
|
4
|
+
*/
|
|
5
|
+
export interface GroupBlockTab {
|
|
6
|
+
/** @title Название */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** @title Tег */
|
|
9
|
+
tag?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @title Блок-группировки
|
|
13
|
+
*/
|
|
14
|
+
export interface GroupBlockContent {
|
|
15
|
+
/** @title Блоки */
|
|
16
|
+
groupBlocks?: GroupBlockDef[];
|
|
17
|
+
/** @title Табы */
|
|
18
|
+
tabs?: GroupBlockTab[];
|
|
19
|
+
/** @title Показывать счетчик блоков во вкладках */
|
|
20
|
+
isShowCounter?: boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupBlockContent.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/GroupBlockContent.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TabsItemProps } from './GroupBlock';
|
|
2
|
+
export declare type TabClickHandler = (tag: any) => void;
|
|
3
|
+
export interface GroupBlockTabsProps {
|
|
4
|
+
onTabClick: TabClickHandler;
|
|
5
|
+
currentTag?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
tabs?: TabsItemProps[];
|
|
8
|
+
isShowCounter?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const GroupBlockTabs: (props: import("@redneckz/uni-jsx").PropsWithChildren<GroupBlockTabsProps, any>, context?: any) => any;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.GroupBlockTabs = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
exports.GroupBlockTabs = (0, uni_jsx_1.JSX)((props) => {
|
|
6
|
+
const { tabs, currentTag, onTabClick, className = '', isShowCounter = true } = props;
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: `mb-2 box-border flex gap-x-1 h-12 ${className}`, role: "tablist", children: tabs?.map(renderTab(onTabClick, isShowCounter, currentTag)) }));
|
|
8
|
+
});
|
|
9
|
+
const badgeStyle = 'w-[22px] h-[22px] rounded-full text-m-sm';
|
|
10
|
+
const renderTab = (onTabClick, isShowCounter, currentTag) => (tab, i) => {
|
|
11
|
+
const isActive = currentTag === tab.tag;
|
|
12
|
+
const tabBg = isActive ? 'bg-primary-main' : 'group bg-white';
|
|
13
|
+
const tabText = isActive ? 'text-white' : 'text-secondary-text group-hover:text-primary-main';
|
|
14
|
+
const counterBlockStyle = `${badgeStyle}
|
|
15
|
+
${isActive ? 'bg-white/30 text-white' : 'bg-secondary-text/10 text-secondary-text'}`;
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: `flex h-full w-full flex-1 cursor-pointer mr-2 last:mr-0 box-content ${tabBg}`, role: "tab", onClick: () => onTabClick(tab.tag), "aria-selected": String(isActive), tag: tab?.tag, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? (0, jsx_runtime_1.jsx)("h3", { className: `mr-8 ${tabText}`, children: tab?.title }) : null, isShowCounter ? ((0, jsx_runtime_1.jsx)("div", { className: `flex items-center justify-center ${counterBlockStyle}`, children: (0, jsx_runtime_1.jsx)("span", { children: tab.count }) })) : null] }) }, String(i)));
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=GroupBlockTabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupBlockTabs.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/GroupBlockTabs.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAa3B,QAAA,cAAc,GAAG,IAAA,aAAG,EAAsB,CAAC,KAAK,EAAE,EAAE;IAC/D,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,GAAG,EAAE,EAAE,aAAa,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAErF,OAAO,CACL,gCAAK,SAAS,EAAE,qCAAqC,SAAS,EAAE,EAAE,IAAI,EAAC,SAAS,YAC7E,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,UAAU,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC,GACxD,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,0CAA0C,CAAC;AAE9D,MAAM,SAAS,GACb,CAAC,UAA2B,EAAE,aAAsB,EAAE,UAAmB,EAAE,EAAE,CAC7E,CAAC,GAAkB,EAAE,CAAS,EAAE,EAAE;IAChC,MAAM,QAAQ,GAAG,UAAU,KAAK,GAAG,CAAC,GAAG,CAAC;IACxC,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,gBAAgB,CAAC;IAC9D,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,mDAAmD,CAAC;IAC9F,MAAM,iBAAiB,GAAG,GAAG,UAAU;QACnC,QAAQ,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,0CAA0C,EAAE,CAAC;IAEvF,OAAO,CACL,gCAEE,SAAS,EAAE,uEAAuE,KAAK,EAAE,EACzF,IAAI,EAAC,KAAK,EACV,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,mBACnB,MAAM,CAAC,QAAQ,CAAC,EAC/B,GAAG,EAAE,GAAG,EAAE,GAAG,YAEb,iCAAK,SAAS,EAAC,yCAAyC,aACrD,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,+BAAI,SAAS,EAAE,QAAQ,OAAO,EAAE,YAAG,GAAG,EAAE,KAAK,GAAM,CAAC,CAAC,CAAC,IAAI,EACvE,aAAa,CAAC,CAAC,CAAC,CACf,gCAAK,SAAS,EAAE,oCAAoC,iBAAiB,EAAE,YACrE,2CAAO,GAAG,CAAC,KAAK,GAAQ,GACpB,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,IAdD,MAAM,CAAC,CAAC,CAAC,CAeV,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
2
|
+
import type { UniBlockProps } from '../../types';
|
|
3
|
+
import type { GroupBlockDef } from './BlocksTypeProps';
|
|
4
|
+
import { GroupBlockContent } from './GroupBlockContent';
|
|
5
|
+
export interface GroupBlocksProps extends GroupBlockContent, UniBlockProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const GroupBlocksItem: (props: import("@redneckz/uni-jsx").PropsWithChildren<GroupBlocksProps, any>, context?: any) => any;
|
|
8
|
+
export declare const renderBlock: (context: ContentPageContext) => (block: GroupBlockDef, i: number) => any;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.renderBlock = exports.GroupBlocksItem = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const style2className_1 = require("../../utils/style2className");
|
|
6
|
+
const EmbeddableGroupBlocks_1 = require("./EmbeddableGroupBlocks");
|
|
7
|
+
exports.GroupBlocksItem = (0, uni_jsx_1.JSX)(({ groupBlocks, context }) => {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: 'grid grid-cols-12 gap-2 box-border', children: groupBlocks?.length ? groupBlocks.map((0, exports.renderBlock)(context)) : null }));
|
|
9
|
+
});
|
|
10
|
+
const renderBlock = (context) => (block, i) => {
|
|
11
|
+
const type = block?.blockType;
|
|
12
|
+
if (!type || !(type in EmbeddableGroupBlocks_1.EmbeddableGroupBlocks)) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
const classNameBlock = (0, style2className_1.style2className)(block?.style);
|
|
16
|
+
const EmbeddedBlock = EmbeddableGroupBlocks_1.EmbeddableGroupBlocks[type];
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(EmbeddedBlock, { context: context, ...block, className: classNameBlock }, `block_${i}`));
|
|
18
|
+
};
|
|
19
|
+
exports.renderBlock = renderBlock;
|
|
20
|
+
//# sourceMappingURL=GroupBlocksItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupBlocksItem.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/GroupBlocksItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAIxC,iEAA8D;AAE9D,mEAAgE;AAKnD,QAAA,eAAe,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE;IAChF,OAAO,CACL,gCAAK,SAAS,EAAE,oCAAoC,YACjD,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,IAAA,mBAAW,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAC/D,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEI,MAAM,WAAW,GAAG,CAAC,OAA2B,EAAE,EAAE,CAAC,CAAC,KAAoB,EAAE,CAAS,EAAE,EAAE;IAC9F,MAAM,IAAI,GAAG,KAAK,EAAE,SAAS,CAAC;IAC9B,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,6CAAqB,CAAC,EAAE;QAC7C,OAAO,IAAI,CAAC;KACb;IACD,MAAM,cAAc,GAAG,IAAA,iCAAe,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACrD,MAAM,aAAa,GAAa,6CAAqB,CAAC,IAAI,CAAC,CAAC;IAC5D,OAAO,CACL,uBAAC,aAAa,IAAoB,OAAO,EAAE,OAAO,KAAM,KAAK,EAAE,SAAS,EAAE,cAAc,IAApE,SAAS,CAAC,EAAE,CAA4D,CAC7F,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,WAAW,eAUtB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.filterBlocksByTag = void 0;
|
|
3
|
+
const filterBlocksByTag = (blocks, tag) => {
|
|
4
|
+
return tag ? blocks.filter((block) => block?.tags?.includes(tag)) : blocks;
|
|
5
|
+
};
|
|
6
|
+
exports.filterBlocksByTag = filterBlocksByTag;
|
|
7
|
+
//# sourceMappingURL=filterBlocksByTag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterBlocksByTag.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/filterBlocksByTag.ts"],"names":[],"mappings":";;AAEO,MAAM,iBAAiB,GAAG,CAAC,MAAuB,EAAE,GAAY,EAAE,EAAE;IACzE,OAAO,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAC7E,CAAC,CAAC;AAFW,QAAA,iBAAiB,qBAE5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
2
|
+
import type { GroupBlockDef } from './BlocksTypeProps';
|
|
3
|
+
declare type EmbeddableBlocksProps = {
|
|
4
|
+
groupBlocks?: GroupBlockDef[];
|
|
5
|
+
context: ContentPageContext;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const renderBlock: ({ context, className }: EmbeddableBlocksProps) => (block: GroupBlockDef, i: number) => any;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.renderBlock = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const EmbeddableGroupBlocks_1 = require("./EmbeddableGroupBlocks");
|
|
5
|
+
const style2className_1 = require("../../utils/style2className");
|
|
6
|
+
const renderBlock = ({ context, className }) => (block, i) => {
|
|
7
|
+
const type = block?.blockType;
|
|
8
|
+
if (!type || !(type in EmbeddableGroupBlocks_1.EmbeddableGroupBlocks)) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
const classNameBlock = (0, style2className_1.style2className)(block?.style);
|
|
12
|
+
const EmbeddedBlock = EmbeddableGroupBlocks_1.EmbeddableGroupBlocks[type];
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: className, children: (0, jsx_runtime_1.jsx)(EmbeddedBlock, { context: context, ...block, className: classNameBlock }) }, `block_${i}`));
|
|
14
|
+
};
|
|
15
|
+
exports.renderBlock = renderBlock;
|
|
16
|
+
//# sourceMappingURL=renderBlocksTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderBlocksTypes.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/renderBlocksTypes.tsx"],"names":[],"mappings":";;;AAGA,mEAAgE;AAChE,iEAA8D;AAQvD,MAAM,WAAW,GACtB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAyB,EAAE,EAAE,CAClD,CAAC,KAAoB,EAAE,CAAS,EAAE,EAAE;IAClC,MAAM,IAAI,GAAG,KAAK,EAAE,SAAS,CAAC;IAC9B,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,6CAAqB,CAAC,EAAE;QAC7C,OAAO,IAAI,CAAC;KACb;IACD,MAAM,cAAc,GAAG,IAAA,iCAAe,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACrD,MAAM,aAAa,GAAa,6CAAqB,CAAC,IAAI,CAAC,CAAC;IAC5D,OAAO,CACL,gCAAK,SAAS,EAAE,SAAS,YACvB,uBAAC,aAAa,IAAC,OAAO,EAAE,OAAO,KAAM,KAAK,EAAE,SAAS,EAAE,cAAc,GAAI,IAD3C,SAAS,CAAC,EAAE,CAEtC,CACP,CAAC;AACJ,CAAC,CAAC;AAdS,QAAA,WAAW,eAcpB"}
|
|
@@ -13,7 +13,10 @@ export interface BlockItemCommonProps {
|
|
|
13
13
|
* @title Отображать в раскрытом виде
|
|
14
14
|
*/
|
|
15
15
|
isExpanded?: boolean;
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* @title Блоки
|
|
18
|
+
* @maxItems 10
|
|
19
|
+
*/
|
|
17
20
|
blocks?: BlockDef[];
|
|
18
21
|
columns?: ColumnsCount;
|
|
19
22
|
}
|
|
@@ -25,7 +28,6 @@ export interface OtherProductsContent {
|
|
|
25
28
|
title?: string;
|
|
26
29
|
/**
|
|
27
30
|
* @title Список
|
|
28
|
-
* @maxItems 10
|
|
29
31
|
*/
|
|
30
32
|
blockItems?: BlockItemCommonProps[];
|
|
31
33
|
colorPalette?: ColorPalette;
|
|
@@ -11,7 +11,7 @@ const BaseTile_1 = require("../BaseTile/BaseTile");
|
|
|
11
11
|
const renderBenefit_1 = require("./renderBenefit");
|
|
12
12
|
exports.ProductBlockInner = (0, uni_jsx_1.JSX)(({ className = '', context, title, headingType = 'h2', description, benefits, benefitsVersion = 'normal', buttons, image, items, version = 'primary', isDotted = true, textBlockClassName = '', }) => {
|
|
13
13
|
const textColor = version === 'secondary' ? 'text-white' : 'text-primary-text';
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `flex grow justify-between items-stretch ${className}`, children: [(0, jsx_runtime_1.jsx)("div", { className: `flex flex-col ${textBlockClassName}`, children: (0, jsx_runtime_1.jsxs)(BaseTile_1.BaseTile, { context: context, title: getTitle(title, headingType), buttons: getButtons(context, buttons), children: [description && ((0, jsx_runtime_1.jsx)(Description_1.Description, { className: `mt-4 max-w-[600px] text-md font-light ${textColor}`, description: description })), benefits?.filter((items) => items.label)?.length ? ((0, jsx_runtime_1.jsx)("div", { className: "flex gap-6 mt-6", children: benefits.map((benefit, i) => (0, renderBenefit_1.renderBenefit)({ benefit, version, benefitsVersion }, i)) })) : null, items?.length ? ((0, jsx_runtime_1.jsx)(List_1.List, { className: "mt-5 text-title-2xs font-light", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] }) }), image?.src && (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "mt-
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `flex grow justify-between items-stretch ${className}`, children: [(0, jsx_runtime_1.jsx)("div", { className: `flex flex-col ${textBlockClassName}`, children: (0, jsx_runtime_1.jsxs)(BaseTile_1.BaseTile, { context: context, title: getTitle(title, headingType), buttons: getButtons(context, buttons), children: [description && ((0, jsx_runtime_1.jsx)(Description_1.Description, { className: `mt-4 max-w-[600px] text-md font-light ${textColor}`, description: description })), benefits?.filter((items) => items.label)?.length ? ((0, jsx_runtime_1.jsx)("div", { className: "flex gap-6 mt-6", children: benefits.map((benefit, i) => (0, renderBenefit_1.renderBenefit)({ benefit, version, benefitsVersion }, i)) })) : null, items?.length ? ((0, jsx_runtime_1.jsx)(List_1.List, { className: "mt-5 text-title-2xs font-light", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] }) }), image?.src && (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "mt-[-50px]", image: image })] }));
|
|
15
15
|
});
|
|
16
16
|
const getTitle = (title, headingType) => {
|
|
17
17
|
return (title && ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductBlockInner.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlockInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,qEAAkE;AAClE,sEAAmE;AACnE,0DAAuD;AACvD,8CAA2C;AAC3C,iDAA8C;AAC9C,mDAAgD;AAEhD,mDAAgD;AAInC,QAAA,iBAAiB,GAAG,IAAA,aAAG,EAClC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,EACL,WAAW,GAAG,IAAI,EAClB,WAAW,EACX,QAAQ,EACR,eAAe,GAAG,QAAQ,EAC1B,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,GAAG,IAAI,EACf,kBAAkB,GAAG,EAAE,GACxB,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,mBAAmB,CAAC;IAC/E,OAAO,CACL,iCAAK,SAAS,EAAE,2CAA2C,SAAS,EAAE,aACpE,gCAAK,SAAS,EAAE,iBAAiB,kBAAkB,EAAE,YACnD,wBAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,EACnC,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,aAEpC,WAAW,IAAI,CACd,uBAAC,yBAAW,IACV,SAAS,EAAE,yCAAyC,SAAS,EAAE,EAC/D,WAAW,EAAE,WAAW,GACxB,CACH,EACA,QAAQ,EAAE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAClD,gCAAK,SAAS,EAAC,iBAAiB,YAC7B,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAC3B,IAAA,6BAAa,EAAC,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC,CACxD,GACG,CACP,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,uBAAC,WAAI,IACH,SAAS,EAAC,gCAAgC,EAC1C,KAAK,EAAE,KAAK,EACZ,aAAa,EAAC,UAAU,EACxB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,IAAI,IACC,GACP,EACL,KAAK,EAAE,GAAG,IAAI,uBAAC,SAAG,IAAC,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"ProductBlockInner.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlockInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,qEAAkE;AAClE,sEAAmE;AACnE,0DAAuD;AACvD,8CAA2C;AAC3C,iDAA8C;AAC9C,mDAAgD;AAEhD,mDAAgD;AAInC,QAAA,iBAAiB,GAAG,IAAA,aAAG,EAClC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,EACL,WAAW,GAAG,IAAI,EAClB,WAAW,EACX,QAAQ,EACR,eAAe,GAAG,QAAQ,EAC1B,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,GAAG,IAAI,EACf,kBAAkB,GAAG,EAAE,GACxB,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,mBAAmB,CAAC;IAC/E,OAAO,CACL,iCAAK,SAAS,EAAE,2CAA2C,SAAS,EAAE,aACpE,gCAAK,SAAS,EAAE,iBAAiB,kBAAkB,EAAE,YACnD,wBAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,EACnC,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,aAEpC,WAAW,IAAI,CACd,uBAAC,yBAAW,IACV,SAAS,EAAE,yCAAyC,SAAS,EAAE,EAC/D,WAAW,EAAE,WAAW,GACxB,CACH,EACA,QAAQ,EAAE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAClD,gCAAK,SAAS,EAAC,iBAAiB,YAC7B,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAC3B,IAAA,6BAAa,EAAC,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC,CACxD,GACG,CACP,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,uBAAC,WAAI,IACH,SAAS,EAAC,gCAAgC,EAC1C,KAAK,EAAE,KAAK,EACZ,aAAa,EAAC,UAAU,EACxB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,IAAI,IACC,GACP,EACL,KAAK,EAAE,GAAG,IAAI,uBAAC,SAAG,IAAC,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,KAAK,GAAI,IACvD,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE;IACtC,OAAO,CACL,KAAK,IAAI,CACP,uBAAC,iBAAO,IACN,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAC,mCAAmC,GAC7C,CACH,CACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IACtC,OAAO,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CACvB,uBAAC,6BAAa,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,iBAAiB,GAAG,CAClF,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC"}
|
|
@@ -15,7 +15,7 @@ const productSlideStyleMap = {
|
|
|
15
15
|
primary: 'bg-white text-primary-text',
|
|
16
16
|
secondary: 'bg-primary-main text-white',
|
|
17
17
|
};
|
|
18
|
-
exports.ProductGalleryGreen = (0, uni_jsx_1.JSX)(({ className = '', context, slides = [], version = 'primary',
|
|
18
|
+
exports.ProductGalleryGreen = (0, uni_jsx_1.JSX)(({ className = '', context, slides = [], version = 'primary', anchor = null }) => {
|
|
19
19
|
const galleryNav = slides.map((s) => s.nav);
|
|
20
20
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
21
21
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
@@ -26,19 +26,18 @@ exports.ProductGalleryGreen = (0, uni_jsx_1.JSX)(({ className = '', context, sli
|
|
|
26
26
|
activeSlideIndex,
|
|
27
27
|
onClick: () => setActiveSlideIndex(i),
|
|
28
28
|
version,
|
|
29
|
-
duration,
|
|
30
29
|
})) })] }));
|
|
31
30
|
});
|
|
32
31
|
function renderProductBlock(block, i, context) {
|
|
33
32
|
const { version } = block;
|
|
34
33
|
const additionalClass = version ? productBlockStyleMap[version].title : '';
|
|
35
|
-
return ((0, jsx_runtime_1.jsx)("section", { className: "box-border relative flex grow-0 shrink-0 basis-full", role: "listitem", children: (0, jsx_runtime_1.jsx)("div", { className: "flex grow", children: (0, jsx_runtime_1.jsx)(ProductBlockInner_1.ProductBlockInner, { className: `pl-[50px]
|
|
34
|
+
return ((0, jsx_runtime_1.jsx)("section", { className: "box-border relative flex grow-0 shrink-0 basis-full", role: "listitem", children: (0, jsx_runtime_1.jsx)("div", { className: "flex grow", children: (0, jsx_runtime_1.jsx)(ProductBlockInner_1.ProductBlockInner, { className: `pl-[50px] z-[1] ${additionalClass}`, context: context, textBlockClassName: "mb-[154px]", ...block }) }) }, String(i)));
|
|
36
35
|
}
|
|
37
|
-
function renderNavButton({ slide, i, activeSlideIndex, onClick, version
|
|
36
|
+
function renderNavButton({ slide, i, activeSlideIndex, onClick, version }) {
|
|
38
37
|
const isActiveBtn = i === activeSlideIndex;
|
|
39
38
|
const btnClassName = isActiveBtn
|
|
40
|
-
? 'bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px]
|
|
41
|
-
: `min-w-[277px] px-0 pt-4 pb-[23px] hover:py-[26px] hover:py-[26px] ease-in duration-300
|
|
39
|
+
? 'bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px] p-0 border-none'
|
|
40
|
+
: `min-w-[277px] px-0 pt-4 pb-[23px] hover:py-[26px] hover:py-[26px] ease-in duration-300 bg-white/10
|
|
42
41
|
${productSlideStyleMap[version]}`;
|
|
43
42
|
const btnTitleClassName = isActiveBtn
|
|
44
43
|
? 'text-primary-text text-title-2xs'
|
|
@@ -46,10 +45,9 @@ function renderNavButton({ slide, i, activeSlideIndex, onClick, version, duratio
|
|
|
46
45
|
const btnDescClassName = isActiveBtn
|
|
47
46
|
? 'text-secondary-text text-m-title-xs mt-2.5'
|
|
48
47
|
: `text-m-md mt-1.5 ${productBlockStyleMap[version].text}`;
|
|
49
|
-
const additionalBorder = version === 'secondary' ? 'border-white/50' : '';
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
${
|
|
53
|
-
`, children: [(0, jsx_runtime_1.jsxs)("div", { className: "border-0 px-6", children: [(0, jsx_runtime_1.jsx)("div", { className: `font-medium ${btnTitleClassName}`, children: slide?.title }), (0, jsx_runtime_1.jsx)("div", { className: `text-secondary-text ${btnDescClassName}`, children: slide.description })] }), (0, jsx_runtime_1.jsx)("div", { className: `absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${progressBarClassName}`, style: { animationDuration: `${duration}s`, animationFillMode: 'forwards' } })] }, String(i)));
|
|
48
|
+
const additionalBorder = version === 'secondary' ? 'border-white/50' : 'border-black/50';
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: onClick, "aria-label": slide?.title, className: `box-border font-sans relative overflow-hidden border-[1px] border-white/50 cursor-pointer text-left mx-1 grow basis-0
|
|
50
|
+
${btnClassName} ${additionalBorder}
|
|
51
|
+
`, children: (0, jsx_runtime_1.jsxs)("div", { className: "border-0 px-6", children: [(0, jsx_runtime_1.jsx)("div", { className: `font-medium ${btnTitleClassName}`, children: slide?.title }), (0, jsx_runtime_1.jsx)("div", { className: `text-secondary-text ${btnDescClassName}`, children: slide.description })] }) }, String(i)));
|
|
54
52
|
}
|
|
55
53
|
//# sourceMappingURL=ProductGalleryGreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductGalleryGreen.js","sourceRoot":"","sources":["../../../src/components/ProductGalleryGreen/ProductGalleryGreen.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAIxC,yEAAsE;AAUtE,MAAM,2BAA2B,GAAiC;IAChE,OAAO,EAAE,4BAA4B;IACrC,SAAS,EAAE,4BAA4B;CACxC,CAAC;AAEF,MAAM,oBAAoB,GAAoC;IAC5D,OAAO,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,IAAI,EAAE,qBAAqB,EAAE;IACtE,SAAS,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE;CAC1D,CAAC;AAEF,MAAM,oBAAoB,GAAiC;IACzD,OAAO,EAAE,4BAA4B;IACrC,SAAS,EAAE,4BAA4B;CACxC,CAAC;AAEW,QAAA,mBAAmB,GAAG,IAAA,aAAG,EACpC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,EAAE,EAAE,OAAO,GAAG,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"ProductGalleryGreen.js","sourceRoot":"","sources":["../../../src/components/ProductGalleryGreen/ProductGalleryGreen.tsx"],"names":[],"mappings":"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"}
|
package/dist/types.d.ts
CHANGED
|
@@ -37,10 +37,15 @@ export interface ContentPageMeta {
|
|
|
37
37
|
twitter?: Record<string, string>;
|
|
38
38
|
jsonLd?: string;
|
|
39
39
|
}
|
|
40
|
+
export interface CustomPageTemplate {
|
|
41
|
+
content?: Record<string, any>;
|
|
42
|
+
type?: string;
|
|
43
|
+
}
|
|
40
44
|
export interface ContentPageDef extends ContentPageMeta {
|
|
41
45
|
style?: string[];
|
|
42
46
|
blocks?: BlockDef[];
|
|
43
47
|
slots?: SlotsMap;
|
|
48
|
+
customPageTmpl?: CustomPageTemplate;
|
|
44
49
|
likeControl?: boolean;
|
|
45
50
|
colorPalette?: ColorPalette;
|
|
46
51
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function style2className(style: string[] | undefined | null): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.style2className = void 0;
|
|
3
|
+
function style2className(style) {
|
|
4
|
+
return style ? style.filter(Boolean).join(' ') : '';
|
|
5
|
+
}
|
|
6
|
+
exports.style2className = style2className;
|
|
7
|
+
//# sourceMappingURL=style2className.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style2className.js","sourceRoot":"","sources":["../../src/utils/style2className.ts"],"names":[],"mappings":";;AAAA,SAAgB,eAAe,CAAC,KAAkC;IAChE,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACtD,CAAC;AAFD,0CAEC"}
|