pb-sxp-ui 1.17.0-alpha → 1.17.0
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/index.cjs +29 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +29 -26
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +6 -6
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +6 -6
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +29 -26
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +6 -6
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/DiyPortalPreview/index.js +5 -3
- package/es/core/components/DiyStoryPreview/index.js +7 -18
- package/es/core/components/SxpPageRender/RenderCard.d.ts +0 -1
- package/es/core/components/SxpPageRender/RenderCard.js +13 -1
- package/es/core/components/SxpPageRender/index.js +4 -4
- package/lib/core/components/DiyPortalPreview/index.js +5 -3
- package/lib/core/components/DiyStoryPreview/index.js +7 -18
- package/lib/core/components/SxpPageRender/RenderCard.d.ts +0 -1
- package/lib/core/components/SxpPageRender/RenderCard.js +13 -1
- package/lib/core/components/SxpPageRender/index.js +4 -4
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -18760,10 +18760,22 @@ Made in Italy` })));
|
|
18760
18760
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
18761
18761
|
*
|
18762
18762
|
*/
|
18763
|
-
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
18763
|
+
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, isNineProduct }) => {
|
18764
|
+
var _a, _b, _c, _d, _e;
|
18764
18765
|
const { schema } = useEditor();
|
18765
18766
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
18766
18767
|
return null;
|
18768
|
+
let cta = null;
|
18769
|
+
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
18770
|
+
cta = '多商品CTA';
|
18771
|
+
}
|
18772
|
+
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
18773
|
+
cta = '商品CTA';
|
18774
|
+
}
|
18775
|
+
else {
|
18776
|
+
cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
18777
|
+
}
|
18778
|
+
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
18767
18779
|
const renderComp = React.useMemo(() => {
|
18768
18780
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
18769
18781
|
// 如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
@@ -19214,17 +19226,17 @@ Made in Italy` })));
|
|
19214
19226
|
index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
|
19215
19227
|
((_f = ['MultiCommodity', 'MultiCommodityDiro', 'MultiCommodityDiroNew']) === null || _f === void 0 ? void 0 : _f.includes((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.type));
|
19216
19228
|
return (React.createElement(React.Fragment, null,
|
19217
|
-
isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex,
|
19229
|
+
isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, isNineProduct: isNineProduct })),
|
19218
19230
|
((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
19219
19231
|
React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _j !== void 0 ? _j : 40}px` } },
|
19220
19232
|
React.createElement(Nudge, { nudge: nudge }),
|
19221
19233
|
((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) && !isNineProduct ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
19222
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex
|
19234
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex }))) : null,
|
19223
19235
|
React.createElement("div", null,
|
19224
19236
|
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.title) !== null && _l !== void 0 ? _l : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
|
19225
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex
|
19237
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
|
19226
19238
|
React.createElement(Hashtag$1, { index: activeIndex, tags: (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.hashTags) !== null && _o !== void 0 ? _o : [], itemId: (_p = rec === null || rec === void 0 ? void 0 : rec.video) === null || _p === void 0 ? void 0 : _p.itemId, itemType: ((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
|
19227
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex
|
19239
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
19228
19240
|
}
|
19229
19241
|
return null;
|
19230
19242
|
}, [
|
@@ -19826,7 +19838,7 @@ Made in Italy` })));
|
|
19826
19838
|
const CTA = (rec, index) => {
|
19827
19839
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
19828
19840
|
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
19829
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2 })));
|
19841
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2, isActive: true })));
|
19830
19842
|
}
|
19831
19843
|
return null;
|
19832
19844
|
};
|
@@ -19839,8 +19851,10 @@ Made in Italy` })));
|
|
19839
19851
|
React.createElement(Nudge, { nudge: nudge }),
|
19840
19852
|
CTA(rec, index),
|
19841
19853
|
React.createElement("div", null,
|
19842
|
-
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })
|
19843
|
-
|
19854
|
+
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) }),
|
19855
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2, includesCtaType: ['AniLink'], isActive: true })),
|
19856
|
+
React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })),
|
19857
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2, includesCtaType: ['AniLinkPopup'], isActive: true })));
|
19844
19858
|
}
|
19845
19859
|
return null;
|
19846
19860
|
};
|
@@ -20230,21 +20244,10 @@ Made in Italy` })));
|
|
20230
20244
|
return null;
|
20231
20245
|
}, [globalConfig]);
|
20232
20246
|
const renderBottom = (rec, index) => {
|
20233
|
-
var _a, _b, _c, _d
|
20247
|
+
var _a, _b, _c, _d;
|
20234
20248
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
20235
|
-
let cta = null;
|
20236
|
-
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
20237
|
-
cta = '多商品CTA';
|
20238
|
-
}
|
20239
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
20240
|
-
cta = '商品CTA';
|
20241
|
-
}
|
20242
|
-
else {
|
20243
|
-
cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
20244
|
-
}
|
20245
|
-
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
20246
20249
|
return (React.createElement(React.Fragment, null,
|
20247
|
-
((
|
20250
|
+
((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && (React.createElement("div", { style: {
|
20248
20251
|
background: 'repeating-linear-gradient(0deg, rgba(26, 26, 25, 0.7), hsla(0, 0%, 100%, 0))',
|
20249
20252
|
height: '130px',
|
20250
20253
|
position: 'absolute',
|
@@ -20255,7 +20258,7 @@ Made in Italy` })));
|
|
20255
20258
|
pointerEvents
|
20256
20259
|
} })),
|
20257
20260
|
React.createElement("div", { style: {
|
20258
|
-
marginBottom: `${(
|
20261
|
+
marginBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px`,
|
20259
20262
|
zIndex: 999,
|
20260
20263
|
position: 'absolute',
|
20261
20264
|
bottom: 0,
|
@@ -20264,15 +20267,15 @@ Made in Italy` })));
|
|
20264
20267
|
paddingTop: '20px'
|
20265
20268
|
} },
|
20266
20269
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { style: {} },
|
20267
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex
|
20270
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex }))) : null,
|
20268
20271
|
React.createElement("div", null,
|
20269
20272
|
React.createElement(ExpandableText$1
|
20270
20273
|
// className='clc-sxp-bottom-text'
|
20271
20274
|
, {
|
20272
20275
|
// className='clc-sxp-bottom-text'
|
20273
|
-
isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (
|
20274
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex
|
20275
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex
|
20276
|
+
isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none', padding: '0 20px', fontSize: '12px' }) }),
|
20277
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex }))),
|
20278
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
20276
20279
|
}
|
20277
20280
|
return null;
|
20278
20281
|
};
|