pb-sxp-ui 1.19.0-alpha.2 → 1.19.0-alpha.4
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 +223 -197
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +15 -7
- package/dist/index.js +223 -197
- 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 +223 -197
- 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 +14 -2
- package/es/core/components/SxpPageRender/index.js +44 -26
- package/es/core/context/SxpDataSourceProvider.js +2 -3
- package/es/materials/sxp/consentPopup/Display/index.js +1 -1
- package/es/materials/sxp/cta/AniLinkPopup/material.js +2 -3
- package/es/materials/sxp/popup/CommodityDetail/material.js +1 -2
- package/es/materials/sxp/popup/CommodityList/index.js +4 -5
- package/es/materials/sxp/popup/CommodityList/material.js +1 -1
- package/es/materials/sxp/popup/CommodityList/settingRender.js +1 -1
- package/es/materials/sxp/template/Appoint/material.js +1 -2
- package/es/materials/sxp/template/Commodity/material.js +2 -3
- package/es/materials/sxp/template/CommodityDiro/material.js +2 -3
- package/es/materials/sxp/template/CommodityDiroNew/material.js +2 -4
- package/es/materials/sxp/template/Link/material.js +2 -4
- package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodity/material.js +1 -2
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodityDiro/material.js +2 -3
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -4
- package/es/materials/sxp/template/NineCommodity/material.js +2 -3
- package/es/materials/sxp/template/components/CommodityGroup.js +1 -1
- package/es/materials/sxp/template/components/settingRender.js +1 -1
- 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 +14 -2
- package/lib/core/components/SxpPageRender/index.js +44 -26
- package/lib/core/context/SxpDataSourceProvider.js +2 -3
- package/lib/materials/sxp/consentPopup/Display/index.js +1 -1
- package/lib/materials/sxp/cta/AniLinkPopup/material.js +1 -2
- package/lib/materials/sxp/popup/CommodityDetail/material.js +1 -2
- package/lib/materials/sxp/popup/CommodityList/index.js +4 -5
- package/lib/materials/sxp/popup/CommodityList/material.js +1 -1
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +1 -1
- package/lib/materials/sxp/template/Appoint/material.js +1 -2
- package/lib/materials/sxp/template/Commodity/material.js +2 -3
- package/lib/materials/sxp/template/CommodityDiro/material.js +2 -3
- package/lib/materials/sxp/template/CommodityDiroNew/material.js +2 -4
- package/lib/materials/sxp/template/Link/material.js +2 -4
- package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodity/material.js +1 -2
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodityDiro/material.js +2 -3
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -4
- package/lib/materials/sxp/template/NineCommodity/material.js +2 -3
- package/lib/materials/sxp/template/components/CommodityGroup.js +1 -1
- package/lib/materials/sxp/template/components/settingRender.js +1 -1
- package/package.json +1 -1
|
@@ -59,7 +59,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
|
59
59
|
const CTA = (rec, index) => {
|
|
60
60
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
|
61
61
|
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
|
62
|
-
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER })));
|
|
62
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, isActive: true })));
|
|
63
63
|
}
|
|
64
64
|
return null;
|
|
65
65
|
};
|
|
@@ -72,8 +72,10 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
|
72
72
|
React.createElement(Nudge, { nudge: nudge }),
|
|
73
73
|
CTA(rec, index),
|
|
74
74
|
React.createElement("div", null,
|
|
75
|
-
React.createElement(ExpandableText, { 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' }) })
|
|
76
|
-
|
|
75
|
+
React.createElement(ExpandableText, { 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' }) }),
|
|
76
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLink'], isActive: true })),
|
|
77
|
+
React.createElement(Hashtag, { 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 })),
|
|
78
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLinkPopup'], isActive: true })));
|
|
77
79
|
}
|
|
78
80
|
return null;
|
|
79
81
|
};
|
|
@@ -81,21 +81,10 @@ const DiyStoryPreview = forwardRef(({ data = [], globalConfig, tipText, nudge, t
|
|
|
81
81
|
return null;
|
|
82
82
|
}, [globalConfig]);
|
|
83
83
|
const renderBottom = (rec, index) => {
|
|
84
|
-
var _a, _b, _c, _d
|
|
84
|
+
var _a, _b, _c, _d;
|
|
85
85
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
|
86
|
-
let cta = null;
|
|
87
|
-
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) {
|
|
88
|
-
cta = '多商品CTA';
|
|
89
|
-
}
|
|
90
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
|
91
|
-
cta = '商品CTA';
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
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;
|
|
95
|
-
}
|
|
96
|
-
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
|
97
86
|
return (React.createElement(React.Fragment, null,
|
|
98
|
-
((
|
|
87
|
+
((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && (React.createElement("div", { style: {
|
|
99
88
|
background: 'repeating-linear-gradient(0deg, rgba(26, 26, 25, 0.7), hsla(0, 0%, 100%, 0))',
|
|
100
89
|
height: '130px',
|
|
101
90
|
position: 'absolute',
|
|
@@ -106,7 +95,7 @@ const DiyStoryPreview = forwardRef(({ data = [], globalConfig, tipText, nudge, t
|
|
|
106
95
|
pointerEvents
|
|
107
96
|
} })),
|
|
108
97
|
React.createElement("div", { style: {
|
|
109
|
-
marginBottom: `${(
|
|
98
|
+
marginBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px`,
|
|
110
99
|
zIndex: 999,
|
|
111
100
|
position: 'absolute',
|
|
112
101
|
bottom: 0,
|
|
@@ -115,11 +104,11 @@ const DiyStoryPreview = forwardRef(({ data = [], globalConfig, tipText, nudge, t
|
|
|
115
104
|
paddingTop: '20px'
|
|
116
105
|
} },
|
|
117
106
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { style: {} },
|
|
118
|
-
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, isActive: index === activeIndex
|
|
107
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, isActive: index === activeIndex }))) : null,
|
|
119
108
|
React.createElement("div", null,
|
|
120
|
-
React.createElement(ExpandableText, { isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (
|
|
121
|
-
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLink'], isActive: index === activeIndex
|
|
122
|
-
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex
|
|
109
|
+
React.createElement(ExpandableText, { 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' }) }),
|
|
110
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLink'], isActive: index === activeIndex }))),
|
|
111
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
|
123
112
|
}
|
|
124
113
|
return null;
|
|
125
114
|
};
|
|
@@ -3,10 +3,22 @@ import './index.less';
|
|
|
3
3
|
import { cloneDeep } from 'lodash';
|
|
4
4
|
import withBindDataSource from '../../../core/hoc/withBindDataSource';
|
|
5
5
|
import { useEditor } from '../../../core/hooks';
|
|
6
|
-
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
|
6
|
+
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, isNineProduct }) => {
|
|
7
|
+
var _a, _b, _c, _d, _e;
|
|
7
8
|
const { schema } = useEditor();
|
|
8
9
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
|
9
10
|
return null;
|
|
11
|
+
let cta = null;
|
|
12
|
+
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) {
|
|
13
|
+
cta = '多商品CTA';
|
|
14
|
+
}
|
|
15
|
+
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
|
16
|
+
cta = '商品CTA';
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
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;
|
|
20
|
+
}
|
|
21
|
+
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
|
10
22
|
const renderComp = useMemo(() => {
|
|
11
23
|
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;
|
|
12
24
|
if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type)))
|
|
@@ -31,7 +43,7 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
|
|
31
43
|
const sbf = style.backdropFilter;
|
|
32
44
|
style.backdropFilter = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
|
|
33
45
|
}
|
|
34
|
-
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50,
|
|
46
|
+
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50, marginInlineStart: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
|
|
35
47
|
}
|
|
36
48
|
else {
|
|
37
49
|
return null;
|
|
@@ -42,6 +42,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
42
42
|
const [isReload, setIsReload] = useState(new Date().getTime());
|
|
43
43
|
const skipLinkRef = useRef(false);
|
|
44
44
|
const [pageNum, setPageNum] = useState(2);
|
|
45
|
+
const [isShowCookieSetting, setIsShowCookieSetting] = useState(false);
|
|
45
46
|
const videoWidgetRef = useRef(null);
|
|
46
47
|
const fbcRef = useRef('');
|
|
47
48
|
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData, channel, refreshFeSession, isDiyH5 } = useSxpDataSource();
|
|
@@ -316,17 +317,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
316
317
|
index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
|
|
317
318
|
((_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));
|
|
318
319
|
return (React.createElement(React.Fragment, null,
|
|
319
|
-
isNineProduct && (React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex,
|
|
320
|
+
isNineProduct && (React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, isNineProduct: isNineProduct })),
|
|
320
321
|
((_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' }),
|
|
321
322
|
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` } },
|
|
322
323
|
React.createElement(Nudge, { nudge: nudge }),
|
|
323
324
|
((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' },
|
|
324
|
-
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex
|
|
325
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex }))) : null,
|
|
325
326
|
React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
|
|
326
327
|
React.createElement(ExpandableText, { 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 }),
|
|
327
|
-
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex
|
|
328
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
|
|
328
329
|
React.createElement(Hashtag, { 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) }))),
|
|
329
|
-
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex
|
|
330
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
|
330
331
|
}
|
|
331
332
|
return null;
|
|
332
333
|
}, [
|
|
@@ -485,30 +486,47 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
485
486
|
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting))
|
|
486
487
|
return;
|
|
487
488
|
window.OptanonWrapper = function () {
|
|
488
|
-
var _a
|
|
489
|
-
|
|
490
|
-
if (
|
|
491
|
-
|
|
492
|
-
if (activeGroups === null || activeGroups === void 0 ? void 0 : activeGroups.includes('4')) {
|
|
493
|
-
if (fbcRef.current) {
|
|
494
|
-
setCookie('_fbc', fbcRef.current, 90);
|
|
495
|
-
}
|
|
489
|
+
var _a;
|
|
490
|
+
console.log('OptanonWrapper');
|
|
491
|
+
if ((window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups) && ((_a = window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups) === null || _a === void 0 ? void 0 : _a.length) > 2) {
|
|
492
|
+
setIsShowCookieSetting(true);
|
|
496
493
|
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
494
|
+
};
|
|
495
|
+
const handleClick = (event) => {
|
|
496
|
+
var _a, _b;
|
|
497
|
+
const beForeactiveGroups = window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups;
|
|
498
|
+
if (((_a = event.target) === null || _a === void 0 ? void 0 : _a.closest('.ot-pc-refuse-all-handler')) || ((_b = event.target) === null || _b === void 0 ? void 0 : _b.closest('.save-preference-btn-handler'))) {
|
|
499
|
+
window.OptanonWrapper = function () {
|
|
500
|
+
var _a, _b;
|
|
501
|
+
const activeGroups = window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups;
|
|
502
|
+
if (!activeGroups)
|
|
503
|
+
return;
|
|
504
|
+
if (activeGroups === null || activeGroups === void 0 ? void 0 : activeGroups.includes('4')) {
|
|
505
|
+
if (fbcRef.current && !(beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4'))) {
|
|
506
|
+
setCookie('_fbp', fbcRef.current, 90);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
else if (beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4')) {
|
|
510
|
+
fbcRef.current = getCookie('_fbc');
|
|
511
|
+
deleteCookie('_fbc');
|
|
512
|
+
const item = data[activeIndex];
|
|
513
|
+
const traceInfo = ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.traceInfo) || ((_b = item === null || item === void 0 ? void 0 : item.product) === null || _b === void 0 ? void 0 : _b.traceInfo) || '';
|
|
514
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
|
515
|
+
eventInfo: {
|
|
516
|
+
eventSubject: 'refuseCookie',
|
|
517
|
+
eventDescription: 'refuseCookie',
|
|
518
|
+
traceInfo
|
|
519
|
+
},
|
|
520
|
+
isActiveTargetingCookie: false
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
};
|
|
510
524
|
}
|
|
511
525
|
};
|
|
526
|
+
document.addEventListener('click', handleClick);
|
|
527
|
+
return () => {
|
|
528
|
+
document.removeEventListener('click', handleClick);
|
|
529
|
+
};
|
|
512
530
|
}, [globalConfig, bffEventReport, data, activeIndex]);
|
|
513
531
|
const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
|
|
514
532
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -655,7 +673,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
655
673
|
React.createElement(WaterFall, Object.assign({}, (_u = (_t = (_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _s === void 0 ? void 0 : _s[0]) === null || _t === void 0 ? void 0 : _t.item) === null || _u === void 0 ? void 0 : _u.props)),
|
|
656
674
|
React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
|
|
657
675
|
openMultiPosts && (React.createElement(MultiPosts, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0 } }))))),
|
|
658
|
-
|
|
676
|
+
isShowCookieSetting && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (React.createElement("div", { style: { position: 'fixed', bottom: 0, left: 0, right: 0, width: '100%', zIndex: 10, backgroundColor: '#000', fontSize: 0 } },
|
|
659
677
|
React.createElement("button", { id: 'ot-sdk-btn', className: 'ot-sdk-show-settings', style: { textDecoration: 'underline', width: 'fit-content', border: 'none', lineHeight: '24px', fontSize: '10px', color: '#fff', padding: '0 20px' } }, "Cookie settings")))));
|
|
660
678
|
};
|
|
661
679
|
export default memo(SxpPageRender);
|
|
@@ -106,7 +106,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
106
106
|
return ((_a = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _a === void 0 ? void 0 : _a['x-app-id']) + storeAndLoadFeUserId();
|
|
107
107
|
}, [bffDataSource]);
|
|
108
108
|
const getTargetingCookie = () => {
|
|
109
|
-
var _a;
|
|
109
|
+
var _a, _b;
|
|
110
110
|
function isTargetingRejected(cookieValue) {
|
|
111
111
|
const groupsMatch = cookieValue.match(/groups=([^&]+)/);
|
|
112
112
|
if (!groupsMatch || !groupsMatch[1]) {
|
|
@@ -131,8 +131,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
131
131
|
return '';
|
|
132
132
|
}
|
|
133
133
|
const OptanonConsent = decodeURIComponent((_a = getCookie('OptanonConsent')) !== null && _a !== void 0 ? _a : '');
|
|
134
|
-
|
|
135
|
-
if (((window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups) && !(window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups.includes('4')))) {
|
|
134
|
+
if (((window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups) && ((_b = window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups) === null || _b === void 0 ? void 0 : _b.length) > 2 && !(window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups.includes('4')) && isTargetingRejected(OptanonConsent))) {
|
|
136
135
|
return true;
|
|
137
136
|
}
|
|
138
137
|
return false;
|
|
@@ -26,7 +26,7 @@ const Display = (_a) => {
|
|
|
26
26
|
React.createElement("span", { style: content === null || content === void 0 ? void 0 : content.style, dangerouslySetInnerHTML: {
|
|
27
27
|
__html: setFontForText((_b = content === null || content === void 0 ? void 0 : content.text) === null || _b === void 0 ? void 0 : _b.replace(/\n/g, '</br>'), content === null || content === void 0 ? void 0 : content.style)
|
|
28
28
|
} }),
|
|
29
|
-
React.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), {
|
|
29
|
+
React.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), { marginInlineStart: '5px' }), dangerouslySetInnerHTML: {
|
|
30
30
|
__html: setFontForText((_c = interaction === null || interaction === void 0 ? void 0 : interaction.text) === null || _c === void 0 ? void 0 : _c.replace(/\n/g, '</br>'), interaction === null || interaction === void 0 ? void 0 : interaction.style)
|
|
31
31
|
}, onClick: handleClick })),
|
|
32
32
|
isShowClose && (React.createElement("button", { "aria-label": 'close', className: 'consentPopupDisplay-close', onClick: handleClickClose },
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import settingRender from './settingRender';
|
|
2
|
+
import interactionRender from './interactionRender';
|
|
2
3
|
import AniLinkPopupComponent from '.';
|
|
3
4
|
import { createMaterial } from '../../../../core/create';
|
|
4
|
-
import interactionRender from './interactionRender';
|
|
5
5
|
const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
|
|
6
6
|
displayName: '竖版弹窗CTA',
|
|
7
7
|
icon: '',
|
|
8
8
|
category: 'cta',
|
|
9
9
|
type: 'AniLinkPopup',
|
|
10
10
|
related: {
|
|
11
|
-
settingRender
|
|
11
|
+
settingRender,
|
|
12
12
|
bindableProps: [],
|
|
13
13
|
interactionRender
|
|
14
14
|
},
|
|
@@ -24,7 +24,6 @@ const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
|
|
|
24
24
|
title: {
|
|
25
25
|
fontSize: 14,
|
|
26
26
|
color: '#000',
|
|
27
|
-
textAlign: 'left',
|
|
28
27
|
lineHeight: 2.6
|
|
29
28
|
},
|
|
30
29
|
ctaTitle: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import settingRender from './settingRender';
|
|
2
|
+
import interactionRender from './interactionRender';
|
|
2
3
|
import CommodityDetailComponent from '.';
|
|
3
4
|
import { createMaterial } from '../../../../core/create';
|
|
4
|
-
import interactionRender from './interactionRender';
|
|
5
5
|
const CommodityDetail = createMaterial(CommodityDetailComponent, {
|
|
6
6
|
displayName: '商品详情',
|
|
7
7
|
icon: '',
|
|
@@ -40,7 +40,6 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
|
|
|
40
40
|
taxInfo: {
|
|
41
41
|
color: '#000',
|
|
42
42
|
fontSize: 13,
|
|
43
|
-
textAlign: 'left',
|
|
44
43
|
marginBottom: '10px'
|
|
45
44
|
}
|
|
46
45
|
},
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { css } from '@emotion/css';
|
|
3
3
|
import React, { memo, useCallback, useEffect } from 'react';
|
|
4
|
+
import { throttle } from 'lodash';
|
|
5
|
+
import Img from '../../template/components/Img';
|
|
4
6
|
import { useEditor, useSxpDataSource } from '../../../../core/hooks';
|
|
5
7
|
import './index.less';
|
|
6
8
|
import { useEventReport } from '../../../../core/hooks/useEventReport';
|
|
7
9
|
import { setFontForText } from '../../../../core/utils/tool';
|
|
8
|
-
import Img from '../../template/components/Img';
|
|
9
|
-
import { throttle } from 'lodash';
|
|
10
10
|
import { getPriceText } from '../../../../core/utils/materials';
|
|
11
11
|
const CommodityList = (_a) => {
|
|
12
12
|
var _b, _c, _d;
|
|
@@ -53,12 +53,11 @@ const CommodityList = (_a) => {
|
|
|
53
53
|
React.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: css({
|
|
54
54
|
display: 'flex',
|
|
55
55
|
alignItems: 'normal',
|
|
56
|
-
width: '100%'
|
|
57
|
-
textAlign: 'left'
|
|
56
|
+
width: '100%'
|
|
58
57
|
}) }, props),
|
|
59
58
|
React.createElement(Img, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture, enableEventReport: false }),
|
|
60
59
|
React.createElement("div", { style: {
|
|
61
|
-
width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.
|
|
60
|
+
width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginInlineEnd) !== null && _f !== void 0 ? _f : 0}px)`,
|
|
62
61
|
display: 'flex',
|
|
63
62
|
flexDirection: 'column',
|
|
64
63
|
justifyContent: 'space-between'
|
|
@@ -19,12 +19,11 @@ const Appoint = createMaterial(AppointComponent, {
|
|
|
19
19
|
borderRadius: 3,
|
|
20
20
|
width: 30,
|
|
21
21
|
height: 30,
|
|
22
|
-
|
|
22
|
+
marginInlineEnd: 8
|
|
23
23
|
},
|
|
24
24
|
ctaTitle: {
|
|
25
25
|
fontSize: 12,
|
|
26
26
|
color: '#fff',
|
|
27
|
-
textAlign: 'left',
|
|
28
27
|
width: 130,
|
|
29
28
|
height: 20
|
|
30
29
|
}
|
|
@@ -19,12 +19,11 @@ const Commodity = createMaterial(CommodityComponent, {
|
|
|
19
19
|
borderRadius: 3,
|
|
20
20
|
width: 60,
|
|
21
21
|
height: 60,
|
|
22
|
-
|
|
22
|
+
marginInlineEnd: 8
|
|
23
23
|
},
|
|
24
24
|
title: {
|
|
25
25
|
fontSize: 12,
|
|
26
|
-
color: '#fff'
|
|
27
|
-
textAlign: 'left'
|
|
26
|
+
color: '#fff'
|
|
28
27
|
},
|
|
29
28
|
ctaTitle: {
|
|
30
29
|
fontSize: 10,
|
|
@@ -19,12 +19,11 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
|
|
|
19
19
|
borderRadius: 3,
|
|
20
20
|
width: 60,
|
|
21
21
|
height: 60,
|
|
22
|
-
|
|
22
|
+
marginInlineEnd: 8
|
|
23
23
|
},
|
|
24
24
|
title: {
|
|
25
25
|
fontSize: 12,
|
|
26
|
-
color: '#000'
|
|
27
|
-
textAlign: 'left'
|
|
26
|
+
color: '#000'
|
|
28
27
|
},
|
|
29
28
|
ctaTitle: {
|
|
30
29
|
fontSize: 10,
|
|
@@ -19,19 +19,17 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
|
|
|
19
19
|
borderRadius: 8,
|
|
20
20
|
width: 78,
|
|
21
21
|
height: 78,
|
|
22
|
-
|
|
22
|
+
marginInlineEnd: 16
|
|
23
23
|
},
|
|
24
24
|
title: {
|
|
25
25
|
fontSize: 13,
|
|
26
|
-
color: '#000'
|
|
27
|
-
textAlign: 'left'
|
|
26
|
+
color: '#000'
|
|
28
27
|
},
|
|
29
28
|
ctaTitle: {
|
|
30
29
|
textDecoration: 'underline',
|
|
31
30
|
fontSize: 14,
|
|
32
31
|
fontWeight: 'bold',
|
|
33
32
|
color: '#000',
|
|
34
|
-
textAlign: 'left',
|
|
35
33
|
width: 150,
|
|
36
34
|
height: 20
|
|
37
35
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var _a;
|
|
2
2
|
import settingRender from '../components/settingRender';
|
|
3
3
|
import linkSettingRender from './settingRender';
|
|
4
|
+
import interactionRender from './interactionRender';
|
|
4
5
|
import LinkComponent from '.';
|
|
5
6
|
import { createMaterial } from '../../../../core/create';
|
|
6
|
-
import interactionRender from './interactionRender';
|
|
7
7
|
const Link = createMaterial(LinkComponent, {
|
|
8
8
|
displayName: '普通CTA',
|
|
9
9
|
icon: '',
|
|
@@ -21,19 +21,17 @@ const Link = createMaterial(LinkComponent, {
|
|
|
21
21
|
borderRadius: 3,
|
|
22
22
|
width: 60,
|
|
23
23
|
height: 60,
|
|
24
|
-
|
|
24
|
+
marginInlineEnd: 8
|
|
25
25
|
},
|
|
26
26
|
ctaTitle: {
|
|
27
27
|
fontSize: 12,
|
|
28
28
|
color: '#fff',
|
|
29
|
-
textAlign: 'left',
|
|
30
29
|
width: 130,
|
|
31
30
|
height: 20
|
|
32
31
|
}
|
|
33
32
|
},
|
|
34
33
|
customTitle: {
|
|
35
34
|
style: {
|
|
36
|
-
textAlign: 'left',
|
|
37
35
|
textDecoration: 'underline',
|
|
38
36
|
fontWeight: 'bold',
|
|
39
37
|
width: 130,
|
|
@@ -4,10 +4,10 @@ import React, { memo, useState } from 'react';
|
|
|
4
4
|
import { SwiperSlide } from 'swiper/react';
|
|
5
5
|
import Img from '../components/Img';
|
|
6
6
|
import Scroll from '../components/Scroll';
|
|
7
|
+
import EventProvider from '../components/EventProvider';
|
|
7
8
|
import styles from './index.module.less';
|
|
8
9
|
import { useSxpDataSource } from '../../../../core/hooks';
|
|
9
10
|
import { setFontForText } from '../../../../core/utils/tool';
|
|
10
|
-
import EventProvider from '../components/EventProvider';
|
|
11
11
|
const MultiCommodity = (_a) => {
|
|
12
12
|
var _b, _c;
|
|
13
13
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
|
|
@@ -15,7 +15,7 @@ const MultiCommodity = (_a) => {
|
|
|
15
15
|
const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
|
16
16
|
return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
|
17
17
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
18
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
|
18
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
|
|
19
19
|
React.createElement(EventProvider, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
|
20
20
|
React.createElement(Img, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
|
21
21
|
React.createElement("div", { className: css({
|
|
@@ -19,12 +19,11 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
|
|
|
19
19
|
borderRadius: 3,
|
|
20
20
|
width: 60,
|
|
21
21
|
height: 60,
|
|
22
|
-
|
|
22
|
+
marginInlineEnd: 8
|
|
23
23
|
},
|
|
24
24
|
title: {
|
|
25
25
|
fontSize: 12,
|
|
26
26
|
color: '#fff',
|
|
27
|
-
textAlign: 'left'
|
|
28
27
|
},
|
|
29
28
|
ctaTitle: {
|
|
30
29
|
fontSize: 10,
|
|
@@ -4,10 +4,10 @@ import React, { memo, useState } from 'react';
|
|
|
4
4
|
import { SwiperSlide } from 'swiper/react';
|
|
5
5
|
import Scroll from '../components/Scroll';
|
|
6
6
|
import Img from '../components/Img';
|
|
7
|
+
import EventProvider from '../components/EventProvider';
|
|
7
8
|
import styles from './index.module.less';
|
|
8
9
|
import { useSxpDataSource } from '../../../../core/hooks';
|
|
9
10
|
import { setFontForText } from '../../../../core/utils/tool';
|
|
10
|
-
import EventProvider from '../components/EventProvider';
|
|
11
11
|
const MultiCommodityDiro = (_a) => {
|
|
12
12
|
var _b, _c;
|
|
13
13
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
|
|
@@ -15,7 +15,7 @@ const MultiCommodityDiro = (_a) => {
|
|
|
15
15
|
const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
|
16
16
|
return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
|
17
17
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
18
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
|
18
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
|
|
19
19
|
React.createElement(EventProvider, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
|
20
20
|
React.createElement(Img, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
|
21
21
|
React.createElement("div", { className: css({
|
|
@@ -19,12 +19,11 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
|
|
|
19
19
|
borderRadius: 3,
|
|
20
20
|
width: 60,
|
|
21
21
|
height: 60,
|
|
22
|
-
|
|
22
|
+
marginInlineEnd: 8
|
|
23
23
|
},
|
|
24
24
|
title: {
|
|
25
25
|
fontSize: 12,
|
|
26
|
-
color: '#000'
|
|
27
|
-
textAlign: 'left'
|
|
26
|
+
color: '#000'
|
|
28
27
|
},
|
|
29
28
|
ctaTitle: {
|
|
30
29
|
fontSize: 10,
|
|
@@ -4,10 +4,10 @@ import React, { memo, useState } from 'react';
|
|
|
4
4
|
import { SwiperSlide } from 'swiper/react';
|
|
5
5
|
import Scroll from '../components/Scroll';
|
|
6
6
|
import Img from '../components/Img';
|
|
7
|
+
import EventProvider from '../components/EventProvider';
|
|
7
8
|
import styles from './index.module.less';
|
|
8
9
|
import { useSxpDataSource } from '../../../../core/hooks';
|
|
9
10
|
import { setFontForText } from '../../../../core/utils/tool';
|
|
10
|
-
import EventProvider from '../components/EventProvider';
|
|
11
11
|
const MultiCommodityDiroNew = (_a) => {
|
|
12
12
|
var _b, _c;
|
|
13
13
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
|
|
@@ -15,7 +15,7 @@ const MultiCommodityDiroNew = (_a) => {
|
|
|
15
15
|
const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
|
16
16
|
return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
|
17
17
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
18
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
|
18
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
|
|
19
19
|
React.createElement(EventProvider, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
|
20
20
|
React.createElement(Img, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
|
21
21
|
React.createElement("div", { className: css({
|
|
@@ -19,19 +19,17 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
|
|
|
19
19
|
borderRadius: 8,
|
|
20
20
|
width: 78,
|
|
21
21
|
height: 78,
|
|
22
|
-
|
|
22
|
+
marginInlineEnd: 16
|
|
23
23
|
},
|
|
24
24
|
title: {
|
|
25
25
|
fontSize: 12,
|
|
26
|
-
color: '#000'
|
|
27
|
-
textAlign: 'left'
|
|
26
|
+
color: '#000'
|
|
28
27
|
},
|
|
29
28
|
ctaTitle: {
|
|
30
29
|
textDecoration: 'underline',
|
|
31
30
|
fontSize: 12,
|
|
32
31
|
fontWeight: 'bold',
|
|
33
32
|
color: '#000',
|
|
34
|
-
textAlign: 'left',
|
|
35
33
|
width: 150,
|
|
36
34
|
height: 20
|
|
37
35
|
}
|
|
@@ -19,12 +19,11 @@ const NineCommodity = createMaterial(NineCommodityComponent, {
|
|
|
19
19
|
borderRadius: 3,
|
|
20
20
|
width: 60,
|
|
21
21
|
height: 60,
|
|
22
|
-
|
|
22
|
+
marginInlineEnd: 8
|
|
23
23
|
},
|
|
24
24
|
title: {
|
|
25
25
|
fontSize: 12,
|
|
26
|
-
color: '#fff'
|
|
27
|
-
textAlign: 'left'
|
|
26
|
+
color: '#fff'
|
|
28
27
|
},
|
|
29
28
|
ctaTitle: {
|
|
30
29
|
fontSize: 10,
|