@redneckz/wildless-cms-uni-blocks 0.14.331 → 0.14.333
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/Env.d.ts +7 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +5 -3
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ProductGallery/ProductGalleryContent.d.ts +3 -7
- package/bundle/ui-kit/RichText/RichTextProps.d.ts +0 -1
- package/dist/Env.d.ts +7 -0
- package/dist/Env.js +13 -0
- package/dist/Env.js.map +1 -0
- package/dist/components/ContentPage/renderContentPageHead.js +6 -1
- package/dist/components/ContentPage/renderContentPageHead.js.map +1 -1
- package/dist/components/ProductGallery/ProductGalleryContent.d.ts +3 -7
- package/dist/ui-kit/RichText/RichText.js +4 -2
- package/dist/ui-kit/RichText/RichText.js.map +1 -1
- package/dist/ui-kit/RichText/RichTextProps.d.ts +0 -1
- package/lib/Env.d.ts +7 -0
- package/lib/Env.js +11 -0
- package/lib/Env.js.map +1 -0
- package/lib/components/ContentPage/renderContentPageHead.js +6 -1
- package/lib/components/ContentPage/renderContentPageHead.js.map +1 -1
- package/lib/components/ProductGallery/ProductGalleryContent.d.ts +3 -7
- package/lib/ui-kit/RichText/RichText.js +4 -2
- package/lib/ui-kit/RichText/RichText.js.map +1 -1
- package/lib/ui-kit/RichText/RichTextProps.d.ts +0 -1
- package/mobile/bundle/Env.d.ts +7 -0
- package/mobile/bundle/bundle.umd.js +5 -3
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ProductGallery/ProductGalleryContent.d.ts +3 -7
- package/mobile/bundle/ui-kit/RichText/RichTextProps.d.ts +0 -1
- package/mobile/dist/Env.d.ts +7 -0
- package/mobile/dist/Env.js +13 -0
- package/mobile/dist/Env.js.map +1 -0
- package/mobile/dist/components/ContentPage/renderContentPageHead.js +6 -1
- package/mobile/dist/components/ContentPage/renderContentPageHead.js.map +1 -1
- package/mobile/dist/components/ProductGallery/ProductGalleryContent.d.ts +3 -7
- package/mobile/dist/ui-kit/RichText/RichText.js +4 -2
- package/mobile/dist/ui-kit/RichText/RichText.js.map +1 -1
- package/mobile/dist/ui-kit/RichText/RichTextProps.d.ts +0 -1
- package/mobile/lib/Env.d.ts +7 -0
- package/mobile/lib/Env.js +11 -0
- package/mobile/lib/Env.js.map +1 -0
- package/mobile/lib/components/ContentPage/renderContentPageHead.js +6 -1
- package/mobile/lib/components/ContentPage/renderContentPageHead.js.map +1 -1
- package/mobile/lib/components/ProductGallery/ProductGalleryContent.d.ts +3 -7
- package/mobile/lib/ui-kit/RichText/RichText.js +4 -2
- package/mobile/lib/ui-kit/RichText/RichText.js.map +1 -1
- package/mobile/lib/ui-kit/RichText/RichTextProps.d.ts +0 -1
- package/mobile/src/Env.ts +21 -0
- package/mobile/src/components/ContentPage/renderContentPageHead.tsx +9 -1
- package/mobile/src/components/ProductGallery/ProductGalleryContent.ts +3 -7
- package/mobile/src/ui-kit/RichText/RichText.tsx +5 -3
- package/mobile/src/ui-kit/RichText/RichTextProps.ts +0 -1
- package/package.json +1 -1
- package/src/Env.ts +21 -0
- package/src/components/ContentPage/renderContentPageHead.tsx +9 -1
- package/src/components/ProductGallery/ProductGalleryContent.ts +3 -7
- package/src/ui-kit/RichText/RichText.tsx +5 -3
- package/src/ui-kit/RichText/RichTextProps.ts +0 -1
|
@@ -1,12 +1,8 @@
|
|
|
1
|
+
import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
|
|
1
2
|
import { type BaseProductTileContent } from '../../ui-kit/BaseProductTile/BaseProductTileContent';
|
|
2
3
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
3
4
|
/** @title Кнопка под слайдом */
|
|
4
|
-
export
|
|
5
|
-
/** @title Заголовок */
|
|
6
|
-
title: string;
|
|
7
|
-
/** @title Описание */
|
|
8
|
-
description: string;
|
|
9
|
-
}
|
|
5
|
+
export declare type ProductGalleryNav = TitleProps & DescriptionProps;
|
|
10
6
|
/**
|
|
11
7
|
* @title Слайд
|
|
12
8
|
*/
|
|
@@ -14,7 +10,7 @@ export interface ProductSlide {
|
|
|
14
10
|
/** @title Превью содержимого слайда на навигации */
|
|
15
11
|
nav?: ProductGalleryNav;
|
|
16
12
|
/** @title Содержимое слайда */
|
|
17
|
-
productBlock
|
|
13
|
+
productBlock?: BaseProductTileContent;
|
|
18
14
|
}
|
|
19
15
|
/**
|
|
20
16
|
* @title Продуктовая галерея
|
package/dist/Env.d.ts
ADDED
package/dist/Env.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.env = void 0;
|
|
3
|
+
exports.env = new Proxy({
|
|
4
|
+
_: {},
|
|
5
|
+
setup(_) {
|
|
6
|
+
this._ = _;
|
|
7
|
+
},
|
|
8
|
+
}, {
|
|
9
|
+
get(target, p) {
|
|
10
|
+
return target._[p] || target[p];
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=Env.js.map
|
package/dist/Env.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Env.js","sourceRoot":"","sources":["../src/Env.ts"],"names":[],"mappings":";;AAIa,QAAA,GAAG,GAGZ,IAAI,KAAK,CACX;IACE,CAAC,EAAE,EAAS;IAEZ,KAAK,CAAC,CAAM;QACV,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF,EACD;IACE,GAAG,CAAC,MAAM,EAAE,CAAC;QACX,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC;CACF,CACF,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.renderContentPageHead = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const Env_1 = require("../../Env");
|
|
5
|
+
const url_1 = require("../../utils/url");
|
|
4
6
|
function renderContentPageHead(data) {
|
|
5
7
|
const { title, main, og, twitter, jsonLd } = data;
|
|
6
8
|
const { description, keywords, canonical, robots } = main || {};
|
|
@@ -12,7 +14,7 @@ function renderContentPageHead(data) {
|
|
|
12
14
|
robots ? (0, jsx_runtime_1.jsx)("meta", { name: "robots", content: robots.join(',') }, "robots") : null,
|
|
13
15
|
renderOpenGraph(og),
|
|
14
16
|
renderTwitter(twitter),
|
|
15
|
-
canonical ? (0, jsx_runtime_1.jsx)("link", { rel: "canonical", href: canonical }, "canonical") : null,
|
|
17
|
+
canonical ? ((0, jsx_runtime_1.jsx)("link", { rel: "canonical", href: applyCanonicalHref(canonical) }, "canonical")) : null,
|
|
16
18
|
jsonLd ? ((0, jsx_runtime_1.jsx)("script", { type: "application/ld+json", children: jsonLd }, "jsonLd")) : null,
|
|
17
19
|
].filter(Boolean);
|
|
18
20
|
}
|
|
@@ -27,4 +29,7 @@ function renderTwitter(twitter) {
|
|
|
27
29
|
? Object.entries(twitter).map(([key, value]) => ((0, jsx_runtime_1.jsx)("meta", { name: `twitter:${key}`, content: value }, `twitter_${key}`)))
|
|
28
30
|
: null;
|
|
29
31
|
}
|
|
32
|
+
function applyCanonicalHref(href) {
|
|
33
|
+
return Env_1.env.SITE_URL && href && !(0, url_1.isURL)(href) ? (0, url_1.joinPath)(Env_1.env.SITE_URL, href) : href;
|
|
34
|
+
}
|
|
30
35
|
//# sourceMappingURL=renderContentPageHead.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderContentPageHead.js","sourceRoot":"","sources":["../../../src/components/ContentPage/renderContentPageHead.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"renderContentPageHead.js","sourceRoot":"","sources":["../../../src/components/ContentPage/renderContentPageHead.tsx"],"names":[],"mappings":";;;AAAA,mCAAgC;AAGhC,yCAAkD;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EAAsC;IAC7D,OAAO,EAAE;QACP,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CACvC,iCAAwB,QAAQ,EAAE,MAAM,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAAlD,MAAM,GAAG,EAAE,CAA2C,CAClE,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,aAAa,CAAC,OAA2C;IAChE,OAAO,OAAO;QACZ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAC5C,iCAA6B,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAAxD,WAAW,GAAG,EAAE,CAA4C,CACxE,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,kBAAkB,CAAC,IAAa;IACvC,OAAO,SAAG,CAAC,QAAQ,IAAI,IAAI,IAAI,CAAC,IAAA,WAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAA,cAAQ,EAAC,SAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpF,CAAC"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
+
import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
|
|
1
2
|
import { type BaseProductTileContent } from '../../ui-kit/BaseProductTile/BaseProductTileContent';
|
|
2
3
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
3
4
|
/** @title Кнопка под слайдом */
|
|
4
|
-
export
|
|
5
|
-
/** @title Заголовок */
|
|
6
|
-
title: string;
|
|
7
|
-
/** @title Описание */
|
|
8
|
-
description: string;
|
|
9
|
-
}
|
|
5
|
+
export declare type ProductGalleryNav = TitleProps & DescriptionProps;
|
|
10
6
|
/**
|
|
11
7
|
* @title Слайд
|
|
12
8
|
*/
|
|
@@ -14,7 +10,7 @@ export interface ProductSlide {
|
|
|
14
10
|
/** @title Превью содержимого слайда на навигации */
|
|
15
11
|
nav?: ProductGalleryNav;
|
|
16
12
|
/** @title Содержимое слайда */
|
|
17
|
-
productBlock
|
|
13
|
+
productBlock?: BaseProductTileContent;
|
|
18
14
|
}
|
|
19
15
|
/**
|
|
20
16
|
* @title Продуктовая галерея
|
|
@@ -4,9 +4,11 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const style_1 = require("../../utils/style");
|
|
6
6
|
const getHtmlText_1 = require("./getHtmlText");
|
|
7
|
+
const EMPTY_HTML = '<p><br></p>';
|
|
7
8
|
exports.RichText = (0, uni_jsx_1.JSX)((props) => {
|
|
8
|
-
const { __html
|
|
9
|
+
const { __html, richVersion = '' } = props;
|
|
10
|
+
return __html && (0, getHtmlText_1.getHtmlText)(__html) !== EMPTY_HTML ? (
|
|
9
11
|
/* Attribute [data-component] need for correct render in wcms editor. Do not remove. */
|
|
10
|
-
|
|
12
|
+
(0, jsx_runtime_1.jsx)("div", { "data-component": "rich-text-container", children: (0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)(richVersion, 'md-container'), dangerouslySetInnerHTML: { __html } }) })) : null;
|
|
11
13
|
});
|
|
12
14
|
//# sourceMappingURL=RichText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichText.js","sourceRoot":"","sources":["../../../src/ui-kit/RichText/RichText.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,+CAA4C;
|
|
1
|
+
{"version":3,"file":"RichText.js","sourceRoot":"","sources":["../../../src/ui-kit/RichText/RichText.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,+CAA4C;AAG5C,MAAM,UAAU,GAAG,aAAa,CAAC;AAEpB,QAAA,QAAQ,GAAG,IAAA,aAAG,EAAgB,CAAC,KAAK,EAAE,EAAE;IACnD,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IAE3C,OAAO,MAAM,IAAI,IAAA,yBAAW,EAAC,MAAM,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC;IACpD,uFAAuF;IACvF,kDAAoB,qBAAqB,YACvC,gCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,WAAW,EAAE,cAAc,CAAC,EAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,GAAI,GACvF,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC,CAAC"}
|
package/lib/Env.d.ts
ADDED
package/lib/Env.js
ADDED
package/lib/Env.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Env.js","sourceRoot":"","sources":["../src/Env.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,GAAG,GAGZ,IAAI,KAAK,CACX;IACE,CAAC,EAAE,EAAS;IAEZ,KAAK,CAAC,CAAM;QACV,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF,EACD;IACE,GAAG,CAAC,MAAM,EAAE,CAAC;QACX,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC;CACF,CACF,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { env } from '../../Env.js';
|
|
3
|
+
import { isURL, joinPath } from '../../utils/url.js';
|
|
2
4
|
export function renderContentPageHead(data) {
|
|
3
5
|
const { title, main, og, twitter, jsonLd } = data;
|
|
4
6
|
const { description, keywords, canonical, robots } = main || {};
|
|
@@ -10,7 +12,7 @@ export function renderContentPageHead(data) {
|
|
|
10
12
|
robots ? _jsx("meta", { name: "robots", content: robots.join(',') }, "robots") : null,
|
|
11
13
|
renderOpenGraph(og),
|
|
12
14
|
renderTwitter(twitter),
|
|
13
|
-
canonical ? _jsx("link", { rel: "canonical", href: canonical }, "canonical") : null,
|
|
15
|
+
canonical ? (_jsx("link", { rel: "canonical", href: applyCanonicalHref(canonical) }, "canonical")) : null,
|
|
14
16
|
jsonLd ? (_jsx("script", { type: "application/ld+json", children: jsonLd }, "jsonLd")) : null,
|
|
15
17
|
].filter(Boolean);
|
|
16
18
|
}
|
|
@@ -24,4 +26,7 @@ function renderTwitter(twitter) {
|
|
|
24
26
|
? Object.entries(twitter).map(([key, value]) => (_jsx("meta", { name: `twitter:${key}`, content: value }, `twitter_${key}`)))
|
|
25
27
|
: null;
|
|
26
28
|
}
|
|
29
|
+
function applyCanonicalHref(href) {
|
|
30
|
+
return env.SITE_URL && href && !isURL(href) ? joinPath(env.SITE_URL, href) : href;
|
|
31
|
+
}
|
|
27
32
|
//# sourceMappingURL=renderContentPageHead.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderContentPageHead.js","sourceRoot":"","sources":["../../../src/components/ContentPage/renderContentPageHead.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"renderContentPageHead.js","sourceRoot":"","sources":["../../../src/components/ContentPage/renderContentPageHead.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGhC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,UAAU,qBAAqB,CAAC,IAAuC;IAC3E,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,IAAI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G,EAAE,CAA2C,CAClE,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,aAAa,CAAC,OAA2C;IAChE,OAAO,OAAO;QACZ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAC5C,eAA6B,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAAxD,WAAW,GAAG,EAAE,CAA4C,CACxE,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,kBAAkB,CAAC,IAAa;IACvC,OAAO,GAAG,CAAC,QAAQ,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpF,CAAC"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
+
import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
|
|
1
2
|
import { type BaseProductTileContent } from '../../ui-kit/BaseProductTile/BaseProductTileContent';
|
|
2
3
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
3
4
|
/** @title Кнопка под слайдом */
|
|
4
|
-
export
|
|
5
|
-
/** @title Заголовок */
|
|
6
|
-
title: string;
|
|
7
|
-
/** @title Описание */
|
|
8
|
-
description: string;
|
|
9
|
-
}
|
|
5
|
+
export declare type ProductGalleryNav = TitleProps & DescriptionProps;
|
|
10
6
|
/**
|
|
11
7
|
* @title Слайд
|
|
12
8
|
*/
|
|
@@ -14,7 +10,7 @@ export interface ProductSlide {
|
|
|
14
10
|
/** @title Превью содержимого слайда на навигации */
|
|
15
11
|
nav?: ProductGalleryNav;
|
|
16
12
|
/** @title Содержимое слайда */
|
|
17
|
-
productBlock
|
|
13
|
+
productBlock?: BaseProductTileContent;
|
|
18
14
|
}
|
|
19
15
|
/**
|
|
20
16
|
* @title Продуктовая галерея
|
|
@@ -2,9 +2,11 @@ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { style } from '../../utils/style.js';
|
|
4
4
|
import { getHtmlText } from './getHtmlText.js';
|
|
5
|
+
const EMPTY_HTML = '<p><br></p>';
|
|
5
6
|
export const RichText = JSX((props) => {
|
|
6
|
-
const { __html
|
|
7
|
+
const { __html, richVersion = '' } = props;
|
|
8
|
+
return __html && getHtmlText(__html) !== EMPTY_HTML ? (
|
|
7
9
|
/* Attribute [data-component] need for correct render in wcms editor. Do not remove. */
|
|
8
|
-
|
|
10
|
+
_jsx("div", { "data-component": "rich-text-container", children: _jsx("div", { className: style(richVersion, 'md-container'), dangerouslySetInnerHTML: { __html } }) })) : null;
|
|
9
11
|
});
|
|
10
12
|
//# sourceMappingURL=RichText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichText.js","sourceRoot":"","sources":["../../../src/ui-kit/RichText/RichText.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAgB,CAAC,KAAK,EAAE,EAAE;IACnD,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RichText.js","sourceRoot":"","sources":["../../../src/ui-kit/RichText/RichText.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,MAAM,UAAU,GAAG,aAAa,CAAC;AAEjC,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAgB,CAAC,KAAK,EAAE,EAAE;IACnD,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IAE3C,OAAO,MAAM,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC;IACpD,uFAAuF;IACvF,gCAAoB,qBAAqB,YACvC,cAAK,SAAS,EAAE,KAAK,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,GAAI,GACvF,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC,CAAC"}
|
|
@@ -595,10 +595,12 @@
|
|
|
595
595
|
|
|
596
596
|
const getHtmlText = (html) => html.replace(/<\/?[^>]+\/?>/g, '').trim();
|
|
597
597
|
|
|
598
|
+
const EMPTY_HTML = '<p><br></p>';
|
|
598
599
|
const RichText = JSX((props) => {
|
|
599
|
-
const { __html
|
|
600
|
+
const { __html, richVersion = '' } = props;
|
|
601
|
+
return __html && getHtmlText(__html) !== EMPTY_HTML ? (
|
|
600
602
|
/* Attribute [data-component] need for correct render in wcms editor. Do not remove. */
|
|
601
|
-
|
|
603
|
+
jsx("div", { "data-component": "rich-text-container", children: jsx("div", { className: style(richVersion, 'md-container'), dangerouslySetInnerHTML: { __html } }) })) : null;
|
|
602
604
|
});
|
|
603
605
|
|
|
604
606
|
const renderBenefitDescription = (description, i) => description ? (jsx(Paragraph, { font: "font-light", size: "text-m", color: "text-secondary-text group-data-secondary:text-white", children: description }, `description-${i}`)) : null;
|
|
@@ -5730,7 +5732,7 @@
|
|
|
5730
5732
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
5731
5733
|
});
|
|
5732
5734
|
|
|
5733
|
-
const packageVersion = "0.14.
|
|
5735
|
+
const packageVersion = "0.14.332";
|
|
5734
5736
|
|
|
5735
5737
|
exports.Blocks = Blocks;
|
|
5736
5738
|
exports.ContentPage = ContentPage;
|