pb-sxp-ui 1.2.1 → 1.2.3
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 +132 -83
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +99 -32
- package/dist/index.js +132 -83
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +132 -83
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/Pagebuilder/type.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +1 -1
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +1 -0
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
- package/es/core/components/SxpPageRender/Hashtag/index.js +3 -1
- package/es/core/components/SxpPageRender/Navbar.js +1 -1
- package/es/core/components/SxpPageRender/VideoWidget/index.js +13 -10
- package/es/core/components/SxpPageRender/WaterFall/List.js +1 -1
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
- package/es/core/components/SxpPageRender/index.d.ts +3 -0
- package/es/core/components/SxpPageRender/index.js +8 -8
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.js +3 -3
- package/es/materials/sxp/HashTag/material.js +2 -1
- package/es/materials/sxp/cta/AniLink/index.js +27 -11
- package/es/materials/sxp/cta/AniLinkPopup/index.js +40 -23
- package/es/materials/sxp/popup/CommodityDetail/index.js +1 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/es/materials/sxp/popup/CommodityList/index.js +13 -7
- package/es/materials/sxp/template/Link/index.js +2 -2
- package/es/materials/sxp/template/components/Img.js +1 -1
- package/es/materials/sxp/template/components/settingRender.js +5 -0
- package/lib/core/Pagebuilder/type.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +1 -1
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +1 -0
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
- package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -1
- package/lib/core/components/SxpPageRender/Navbar.js +1 -1
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +13 -10
- package/lib/core/components/SxpPageRender/WaterFall/List.js +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
- package/lib/core/components/SxpPageRender/index.d.ts +3 -0
- package/lib/core/components/SxpPageRender/index.js +8 -8
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.js +3 -3
- package/lib/materials/sxp/HashTag/material.js +2 -1
- package/lib/materials/sxp/cta/AniLink/index.js +26 -10
- package/lib/materials/sxp/cta/AniLinkPopup/index.js +39 -22
- package/lib/materials/sxp/popup/CommodityDetail/index.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +13 -7
- package/lib/materials/sxp/template/Link/index.js +2 -2
- package/lib/materials/sxp/template/components/Img.js +1 -1
- package/lib/materials/sxp/template/components/settingRender.js +5 -0
- package/package.json +1 -1
@@ -19,7 +19,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
19
19
|
return searchParams;
|
20
20
|
}, []);
|
21
21
|
return (react_1.default.createElement(core_1.EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
22
|
-
react_1.default.createElement(SxpDataSourceProvider_1.default, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, globalConfig: (_l = (_k = data === null || data === void 0 ? void 0 : data.data) === null || _k === void 0 ? void 0 : _k.sxpPageConf) === null || _l === void 0 ? void 0 : _l.globalConfig, render: ({ rtcList, tagList }) => {
|
22
|
+
react_1.default.createElement(SxpDataSourceProvider_1.default, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, globalConfig: (_l = (_k = data === null || data === void 0 ? void 0 : data.data) === null || _k === void 0 ? void 0 : _k.sxpPageConf) === null || _l === void 0 ? void 0 : _l.globalConfig, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, render: ({ rtcList, tagList }) => {
|
23
23
|
var _a;
|
24
24
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
25
25
|
react_1.default.createElement(SxpPageRender_1.default, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER, licenseUrl: licenseUrl })),
|
@@ -4,19 +4,19 @@ const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
5
|
const useIconLink_1 = require("../useIconLink");
|
6
6
|
const hooks_1 = require("../../../../core/hooks");
|
7
|
-
const FingerSwipeTip = ({ imageUrl, style }) => {
|
7
|
+
const FingerSwipeTip = ({ imageUrl, style, duration = 2000 }) => {
|
8
8
|
const [show, setShow] = (0, react_1.useState)(true);
|
9
9
|
const { schema: { sxpPageConf } } = (0, hooks_1.useEditor)();
|
10
10
|
(0, react_1.useEffect)(() => {
|
11
11
|
setTimeout(() => {
|
12
12
|
setShow(false);
|
13
|
-
},
|
13
|
+
}, duration);
|
14
14
|
}, []);
|
15
15
|
const FINGER_SWIPE_ICON = (0, useIconLink_1.useIconLink)('/pb_static/finger-swipe-tip.29dc3a48a3c746c906ea..png');
|
16
16
|
const animationCls = (0, react_1.useMemo)(() => {
|
17
17
|
return show ? 'pb-fadeIn' : 'pb-fadeOut';
|
18
18
|
}, [show]);
|
19
|
-
return (react_1.default.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
|
19
|
+
return (react_1.default.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: Object.assign(Object.assign({}, style), { animationDuration: `${duration / 1000}s` }) },
|
20
20
|
react_1.default.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
|
21
21
|
};
|
22
22
|
exports.default = FingerSwipeTip;
|
@@ -7,6 +7,7 @@ const hooks_1 = require("../../../../core/hooks");
|
|
7
7
|
const Scroll_1 = tslib_1.__importDefault(require("../../../../materials/sxp/template/components/Scroll"));
|
8
8
|
const tool_1 = require("../../../../core/utils/tool");
|
9
9
|
const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
10
|
+
var _a;
|
10
11
|
const [isShowMore, setIsShowMore] = (0, react_1.useState)(false);
|
11
12
|
const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = (0, hooks_1.useSxpDataSource)();
|
12
13
|
const handleClickTag = (data) => {
|
@@ -38,7 +39,8 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
|
38
39
|
}
|
39
40
|
return (react_1.default.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
40
41
|
}, [isShowMore, tags]);
|
41
|
-
|
42
|
+
console.log(hashTagStyle, '111');
|
43
|
+
return (react_1.default.createElement("div", { className: 'clc-sxp-bottom-hashtag', style: { marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px` } },
|
42
44
|
react_1.default.createElement(Scroll_1.default, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (react_1.default.createElement(react_2.SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item) },
|
43
45
|
react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: (0, tool_1.setFontForText)(`#${item}`, hashTagStyle) } })))))));
|
44
46
|
};
|
@@ -9,7 +9,7 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
|
|
9
9
|
const { waterFallData, setOpenHashtag } = (0, hooks_1.useSxpDataSource)();
|
10
10
|
return (react_1.default.createElement("div", { className: 'clc-sxp-nav', style: styles },
|
11
11
|
react_1.default.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: 'back button', onClick: onClose }),
|
12
|
-
react_1.default.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle, dangerouslySetInnerHTML: {
|
12
|
+
react_1.default.createElement("div", { className: 'clc-sxp-nav-title', style: Object.assign(Object.assign({}, textStyle), { paddingLeft: (textStyle === null || textStyle === void 0 ? void 0 : textStyle.textAlign) === 'left' ? '35px' : 0 }), dangerouslySetInnerHTML: {
|
13
13
|
__html: (0, tool_1.setFontForText)(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
|
14
14
|
} })));
|
15
15
|
};
|
@@ -224,20 +224,23 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
224
224
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
|
225
225
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
|
226
226
|
return () => {
|
227
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
227
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
228
|
+
const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
229
|
+
if (!isPause)
|
230
|
+
handlePause();
|
228
231
|
if (hls)
|
229
232
|
hls === null || hls === void 0 ? void 0 : hls.destroy();
|
230
233
|
setIsLoadFinish(false);
|
231
|
-
(
|
232
|
-
(
|
233
|
-
(
|
234
|
-
(
|
235
|
-
(
|
236
|
-
(
|
237
|
-
(
|
238
|
-
(
|
234
|
+
(_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadedmetadata', handleLoadedmetadata);
|
235
|
+
(_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadeddata', handLoadeddata);
|
236
|
+
(_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('play', handleStartPlay);
|
237
|
+
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('playing', handlePlaying);
|
238
|
+
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('pause', handlePause);
|
239
|
+
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('ended', handlePlay);
|
240
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('canplay', handlePlay);
|
241
|
+
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('waiting', handleWaiting);
|
239
242
|
};
|
240
|
-
}, [isActive, videoId, rec]);
|
243
|
+
}, [isActive, videoId, rec, handlePause]);
|
241
244
|
(0, react_1.useEffect)(() => {
|
242
245
|
var _a, _b;
|
243
246
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
|
@@ -171,7 +171,7 @@ function WaterfallList(_a) {
|
|
171
171
|
var _a, _b;
|
172
172
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
173
173
|
reportTagsView();
|
174
|
-
window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
|
174
|
+
window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
|
175
175
|
}
|
176
176
|
};
|
177
177
|
return (react_1.default.createElement(react_1.default.Fragment, null, isLoadingData ? (react_1.default.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -279,7 +279,7 @@ function WaterfallList(_a) {
|
|
279
279
|
var _a, _b;
|
280
280
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
281
281
|
reportTagsView();
|
282
|
-
window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
|
282
|
+
window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
|
283
283
|
}
|
284
284
|
};
|
285
285
|
return (react_1.default.createElement(react_1.default.Fragment, null, isLoadingData ? (react_1.default.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -37,6 +37,9 @@ export interface ISxpPageRenderProps {
|
|
37
37
|
swipeTipOffset?: number;
|
38
38
|
consent?: any[];
|
39
39
|
videoPlayIcon?: string;
|
40
|
+
isShowMute?: boolean;
|
41
|
+
bottomInfoDist?: number;
|
42
|
+
swiperTipAniDur?: number;
|
40
43
|
popupCloseIcon?: string;
|
41
44
|
openSlideSkip?: boolean;
|
42
45
|
slideSkipStartTime?: number;
|
@@ -223,18 +223,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
223
223
|
};
|
224
224
|
}, [isShowMore]);
|
225
225
|
const renderBottom = (0, react_1.useCallback)((rec, index) => {
|
226
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
226
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
227
227
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
228
228
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
229
229
|
((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && react_1.default.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
230
|
-
react_1.default.createElement("div", { className: 'clc-sxp-bottom' },
|
230
|
+
react_1.default.createElement("div", { className: 'clc-sxp-bottom', style: { paddingBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px` } },
|
231
231
|
react_1.default.createElement(Nudge_1.default, { nudge: nudge }),
|
232
232
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (react_1.default.createElement("div", { className: 'clc-sxp-bottom-card' },
|
233
233
|
react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
234
234
|
react_1.default.createElement("div", null,
|
235
|
-
react_1.default.createElement(ExpandableText_1.default, { 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: (
|
235
|
+
react_1.default.createElement(ExpandableText_1.default, { 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: (_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' }), onChange: onExpandableChange }),
|
236
236
|
react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
|
237
|
-
react_1.default.createElement(Hashtag_1.default, { index: activeIndex, tags: (
|
237
|
+
react_1.default.createElement(Hashtag_1.default, { index: activeIndex, tags: (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.hashTags) !== null && _f !== void 0 ? _f : [], itemId: (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId, itemType: ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))),
|
238
238
|
react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'] })));
|
239
239
|
}
|
240
240
|
return null;
|
@@ -412,7 +412,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
412
412
|
react_1.default.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })));
|
413
413
|
}
|
414
414
|
return visList === null || visList === void 0 ? void 0 : visList.map((rec, index) => {
|
415
|
-
return (react_1.default.createElement(react_2.SwiperSlide, { key: index, virtualIndex: index }, rec && (react_1.default.createElement(react_1.default.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading) ? (react_1.default.createElement("div", { style: {
|
415
|
+
return (react_1.default.createElement(react_2.SwiperSlide, { key: index, virtualIndex: index, style: { overflow: 'hidden' } }, rec && (react_1.default.createElement(react_1.default.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading) ? (react_1.default.createElement("div", { style: {
|
416
416
|
height,
|
417
417
|
width: containerWidth,
|
418
418
|
display: 'flex',
|
@@ -435,7 +435,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
435
435
|
react_1.default.createElement(Tagbar_1.default, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
436
436
|
top: minusHeight
|
437
437
|
} }),
|
438
|
-
isShowFingerTip ? (react_1.default.createElement(FingerSwipeTip_1.default, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50
|
438
|
+
isShowFingerTip ? (react_1.default.createElement(FingerSwipeTip_1.default, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
|
439
439
|
react_1.default.createElement(react_2.Swiper, { style: {
|
440
440
|
marginTop: tagHeight
|
441
441
|
}, ref: swiperRef, onSlideChange: () => {
|
@@ -459,13 +459,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
459
459
|
}
|
460
460
|
}
|
461
461
|
}, direction: 'vertical', height: height },
|
462
|
-
react_1.default.createElement(ToggleButton_1.default, { style: {
|
462
|
+
((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (react_1.default.createElement(ToggleButton_1.default, { style: {
|
463
463
|
position: 'fixed',
|
464
464
|
visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
|
465
465
|
zIndex: 999,
|
466
466
|
[(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
|
467
467
|
[(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _g !== void 0 ? _g : 23
|
468
|
-
}, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted }),
|
468
|
+
}, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted })),
|
469
469
|
renderView),
|
470
470
|
react_1.default.createElement(WaterFall_1.default, Object.assign({}, (_k = (_j = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.item) === null || _k === void 0 ? void 0 : _k.props))));
|
471
471
|
};
|
@@ -118,6 +118,7 @@ export interface SxpDataSourceProviderProps {
|
|
118
118
|
isOpenConsent?: boolean;
|
119
119
|
globalConfig?: ISxpPageRenderProps['globalConfig'];
|
120
120
|
isEditor?: boolean;
|
121
|
+
utmParameter?: PageData['utm_parameter'];
|
121
122
|
}
|
122
123
|
export declare const DEFAULT_TAG = "FOR U";
|
123
124
|
declare const _default: React.NamedExoticComponent<SxpDataSourceProviderProps>;
|
@@ -18,7 +18,7 @@ var DataSourceType;
|
|
18
18
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
19
19
|
})(DataSourceType || (DataSourceType = {}));
|
20
20
|
exports.DEFAULT_TAG = 'FOR U';
|
21
|
-
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig, isEditor = false }) => {
|
21
|
+
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig, isEditor = false, utmParameter }) => {
|
22
22
|
var _a, _b, _c;
|
23
23
|
const [rtcList, setRtcList] = (0, react_1.useState)([]);
|
24
24
|
const [tagList, setTagList] = (0, react_1.useState)([]);
|
@@ -94,7 +94,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
94
94
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
95
95
|
var _a, _b;
|
96
96
|
const key = val.split('=')[0];
|
97
|
-
return (_b = ((_a =
|
97
|
+
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
98
98
|
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
99
99
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
100
100
|
}
|
@@ -183,7 +183,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
183
183
|
const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
|
184
184
|
var _a, _b;
|
185
185
|
const key = val.split('=')[0];
|
186
|
-
return (_b = ((_a =
|
186
|
+
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
187
187
|
})) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
|
188
188
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
189
189
|
setTagList((_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []);
|
@@ -9,16 +9,17 @@ const tool_1 = require("../../../../core/utils/tool");
|
|
9
9
|
const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
|
10
10
|
const useOnScreen_1 = tslib_1.__importDefault(require("../../../../core/hooks/useOnScreen"));
|
11
11
|
const AniLink = (_a) => {
|
12
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
12
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
13
13
|
var { style, recData, ctaTempStyles, index, event, onClick, isExternalLink = false } = _a, props = tslib_1.__rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "onClick", "isExternalLink"]);
|
14
14
|
const { ctaEvent, setPopupDetailData } = (0, hooks_1.useSxpDataSource)();
|
15
15
|
const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
|
16
|
+
const [visible, setVisible] = (0, react_1.useState)(false);
|
16
17
|
const ref = (0, react_1.useRef)(null);
|
17
18
|
const isOnScreen = (0, useOnScreen_1.default)(ref);
|
18
19
|
const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
|
19
20
|
const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
|
20
21
|
const handleTo = () => {
|
21
|
-
var _a, _b, _c;
|
22
|
+
var _a, _b, _c, _d;
|
22
23
|
const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
|
23
24
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
24
25
|
eventSubject: 'clickCta',
|
@@ -26,12 +27,18 @@ const AniLink = (_a) => {
|
|
26
27
|
}, recData, item, index);
|
27
28
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { index }));
|
28
29
|
if (isExternalLink) {
|
29
|
-
|
30
|
+
const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
|
31
|
+
if (link) {
|
32
|
+
jumpToWeb(recData, product, cta, index);
|
33
|
+
window.location.href = window.getJointUtmLink(link);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
else {
|
37
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
30
38
|
}
|
31
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
32
39
|
};
|
33
|
-
const title = (cta === null || cta === void 0 ? void 0 : cta.
|
34
|
-
const
|
40
|
+
const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
|
41
|
+
const aniTimStyle = (0, react_1.useMemo)(() => {
|
35
42
|
var _a, _b;
|
36
43
|
const ani = event === null || event === void 0 ? void 0 : event.animation;
|
37
44
|
if (ani) {
|
@@ -53,9 +60,18 @@ const AniLink = (_a) => {
|
|
53
60
|
}, recData, product, index);
|
54
61
|
}
|
55
62
|
}, [isOnScreen]);
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
63
|
+
(0, react_1.useEffect)(() => {
|
64
|
+
if (isOnScreen) {
|
65
|
+
setVisible(true);
|
66
|
+
}
|
67
|
+
}, [isOnScreen]);
|
68
|
+
const aniNamStyle = (0, react_1.useMemo)(() => {
|
69
|
+
if (!visible)
|
70
|
+
return null;
|
71
|
+
return index_module_less_1.default['animated-button'];
|
72
|
+
}, [visible]);
|
73
|
+
return (react_1.default.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign(Object.assign({}, style), ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: `${(_l = style === null || style === void 0 ? void 0 : style.height) !== null && _l !== void 0 ? _l : 0}px` }) }, props, { className: `${aniNamStyle} ${(0, css_1.css)(aniTimStyle)} ${index_module_less_1.default['one-line-ellipsis']}`, onClick: handleTo, dangerouslySetInnerHTML: {
|
74
|
+
__html: (0, tool_1.setFontForText)(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
75
|
+
} })));
|
60
76
|
};
|
61
77
|
exports.default = (0, react_1.memo)(AniLink);
|
@@ -8,17 +8,22 @@ const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
|
8
8
|
const Img_1 = tslib_1.__importDefault(require("../../template/components/Img"));
|
9
9
|
const tool_1 = require("../../../../core/utils/tool");
|
10
10
|
const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
|
11
|
+
const useOnScreen_1 = tslib_1.__importDefault(require("../../../../core/hooks/useOnScreen"));
|
11
12
|
const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
12
13
|
const AniLinkPopup = (_a) => {
|
13
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
14
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
14
15
|
var { style, recData, ctaTempStyles, index, event, bottom_image, translateY, isTel, onClick, isExternalLink = false } = _a, props = tslib_1.__rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "bottom_image", "translateY", "isTel", "onClick", "isExternalLink"]);
|
16
|
+
style === null || style === void 0 ? true : delete style.transform;
|
15
17
|
const { sxpParameter, globalConfig, ctaEvent, setPopupDetailData } = (0, hooks_1.useSxpDataSource)();
|
16
18
|
const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
|
17
|
-
const
|
19
|
+
const ref = (0, react_1.useRef)(null);
|
20
|
+
const isOnScreen = (0, useOnScreen_1.default)(ref);
|
21
|
+
const [visible, setVisible] = (0, react_1.useState)(false);
|
22
|
+
const [startAni, setStartAni] = (0, react_1.useState)(true);
|
18
23
|
const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
|
19
24
|
const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
|
20
25
|
const handleTo = () => {
|
21
|
-
var _a, _b, _c;
|
26
|
+
var _a, _b, _c, _d;
|
22
27
|
const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
|
23
28
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
24
29
|
eventSubject: 'clickCta',
|
@@ -26,42 +31,54 @@ const AniLinkPopup = (_a) => {
|
|
26
31
|
}, recData, item, index);
|
27
32
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { index }));
|
28
33
|
if (isExternalLink) {
|
29
|
-
|
34
|
+
const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
|
35
|
+
if (link) {
|
36
|
+
jumpToWeb(recData, product, cta, index);
|
37
|
+
window.location.href = window.getJointUtmLink(link);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
else {
|
41
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
30
42
|
}
|
31
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
32
43
|
};
|
33
|
-
const title = (cta === null || cta === void 0 ? void 0 : cta.
|
34
|
-
const
|
35
|
-
var _a, _b;
|
44
|
+
const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
|
45
|
+
const aniTimStyle = (0, react_1.useMemo)(() => {
|
36
46
|
const ani = event === null || event === void 0 ? void 0 : event.animation;
|
37
47
|
if (ani) {
|
38
|
-
const { delay, duration
|
48
|
+
const { delay, duration } = ani;
|
39
49
|
return {
|
40
|
-
|
41
|
-
|
42
|
-
animationDuration: `${(_b = duration / 1000) !== null && _b !== void 0 ? _b : 0}s`,
|
43
|
-
backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'transparent'}`
|
44
|
-
}
|
50
|
+
animationDelay: `${delay ? delay / 1000 : 0}s`,
|
51
|
+
animationDuration: `${duration ? duration / 1000 : 0}s`
|
45
52
|
};
|
46
53
|
}
|
47
54
|
}, [event === null || event === void 0 ? void 0 : event.animation]);
|
48
55
|
const src = (_q = (_p = (_o = (_l = product === null || product === void 0 ? void 0 : product.cover) !== null && _l !== void 0 ? _l : (_m = product === null || product === void 0 ? void 0 : product.homePage) === null || _m === void 0 ? void 0 : _m[0]) !== null && _o !== void 0 ? _o : cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _p !== void 0 ? _p : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _q !== void 0 ? _q : bottom_image;
|
49
56
|
const onClose = (event) => {
|
50
57
|
event.stopPropagation();
|
51
|
-
|
58
|
+
setStartAni(false);
|
52
59
|
};
|
60
|
+
(0, react_1.useEffect)(() => {
|
61
|
+
if (isOnScreen) {
|
62
|
+
setVisible(true);
|
63
|
+
}
|
64
|
+
}, [isOnScreen]);
|
65
|
+
const aniNamStyle = (0, react_1.useMemo)(() => {
|
66
|
+
if (!visible)
|
67
|
+
return null;
|
68
|
+
return startAni ? index_module_less_1.default['animated-fadeIn'] : null;
|
69
|
+
}, [visible, startAni]);
|
53
70
|
return (react_1.default.createElement(react_1.default.Fragment, null, isTel ? (react_1.default.createElement("div", { style: {
|
54
71
|
height: '40px',
|
55
72
|
lineHeight: '40px',
|
56
73
|
paddingLeft: '6px'
|
57
|
-
} }, "Cta Title")) : (react_1.default.createElement("div", Object.assign({
|
58
|
-
react_1.default.createElement("div", { onClick: onClose, className: index_module_less_1.default['modal-icon-wrapper'], style: { padding: (
|
59
|
-
react_1.default.createElement("img", { src: (
|
60
|
-
react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (
|
61
|
-
react_1.default.createElement("div", { hidden: !!recData && !(product === null || product === void 0 ? void 0 : product.title), className: index_module_less_1.default['
|
62
|
-
__html: (0, tool_1.setFontForText)((
|
74
|
+
} }, "Cta Title")) : (react_1.default.createElement("div", Object.assign({ ref: ref }, props, { className: `${(0, css_1.css)(Object.assign(Object.assign({}, style), { '--transY': `translateY(calc(100% + ${(_r = style === null || style === void 0 ? void 0 : style.margin) !== null && _r !== void 0 ? _r : 0}px))` }))} ${index_module_less_1.default['aniLinkPopup']} ${aniNamStyle} ${(0, css_1.css)(aniTimStyle)}`, onClick: handleTo }),
|
75
|
+
react_1.default.createElement("div", { onClick: onClose, className: index_module_less_1.default['modal-icon-wrapper'], style: { padding: (_s = style === null || style === void 0 ? void 0 : style['padding']) !== null && _s !== void 0 ? _s : 0 } },
|
76
|
+
react_1.default.createElement("img", { src: (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _t !== void 0 ? _t : closeIcon, alt: 'close', className: index_module_less_1.default['modal-icon-wrapper-img'] })),
|
77
|
+
react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (_y = (_w = (_v = (_u = recData === null || recData === void 0 ? void 0 : recData.video) === null || _u === void 0 ? void 0 : _u.bindProducts) === null || _v === void 0 ? void 0 : _v[0]) !== null && _w !== void 0 ? _w : (_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.bindProduct) !== null && _y !== void 0 ? _y : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
|
78
|
+
react_1.default.createElement("div", { hidden: !!recData && !(product === null || product === void 0 ? void 0 : product.title), className: index_module_less_1.default['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
79
|
+
__html: (0, tool_1.setFontForText)((_z = product === null || product === void 0 ? void 0 : product.title) !== null && _z !== void 0 ? _z : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
63
80
|
} }),
|
64
|
-
react_1.default.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((
|
81
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['one-line-ellipsis'], style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((_0 = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _0 === void 0 ? void 0 : _0.height) + 'px' }), dangerouslySetInnerHTML: {
|
65
82
|
__html: (0, tool_1.setFontForText)(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
66
83
|
} })))));
|
67
84
|
};
|
@@ -126,7 +126,7 @@ const CommodityDetail = (_a) => {
|
|
126
126
|
width: '100%',
|
127
127
|
objectFit: 'cover',
|
128
128
|
display: 'block',
|
129
|
-
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ?
|
129
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
130
130
|
}, src: src }))));
|
131
131
|
}))))),
|
132
132
|
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
|
@@ -110,7 +110,7 @@ Made in Italy` })));
|
|
110
110
|
width: '100%',
|
111
111
|
objectFit: 'cover',
|
112
112
|
display: 'block',
|
113
|
-
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ?
|
113
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
114
114
|
}, src: src }))));
|
115
115
|
}))),
|
116
116
|
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
|
@@ -27,18 +27,24 @@ const CommodityList = (_a) => {
|
|
27
27
|
}
|
28
28
|
}, []);
|
29
29
|
return (react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
|
30
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
30
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
31
31
|
return (react_1.default.createElement(EventProvider_1.default, Object.assign({ key: index, isExternalLink: isExternalLink, rec: recData, index: index }, props, { className: (0, css_1.css)({
|
32
32
|
display: 'flex'
|
33
33
|
}) }),
|
34
34
|
react_1.default.createElement(Img_1.default, { 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 }),
|
35
|
-
react_1.default.createElement("div", { style: {
|
35
|
+
react_1.default.createElement("div", { style: {
|
36
|
+
flex: 1,
|
37
|
+
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.marginRight) !== null && _f !== void 0 ? _f : 0}px - ${(_g = style === null || style === void 0 ? void 0 : style.padding) !== null && _g !== void 0 ? _g : 0}px)`,
|
38
|
+
display: 'flex',
|
39
|
+
flexDirection: 'column',
|
40
|
+
justifyContent: 'space-between'
|
41
|
+
} },
|
36
42
|
react_1.default.createElement("div", null,
|
37
|
-
react_1.default.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
|
38
|
-
__html: (0, tool_1.setFontForText)((
|
43
|
+
react_1.default.createElement("div", { className: 'one-line-ellipsis', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
|
44
|
+
__html: (0, tool_1.setFontForText)((_h = item === null || item === void 0 ? void 0 : item.title) !== null && _h !== void 0 ? _h : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
39
45
|
} }),
|
40
|
-
react_1.default.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
|
41
|
-
__html: (0, tool_1.setFontForText)((
|
46
|
+
react_1.default.createElement("div", { className: 'two-line-ellipsis', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
|
47
|
+
__html: (0, tool_1.setFontForText)((_j = item === null || item === void 0 ? void 0 : item.collection) !== null && _j !== void 0 ? _j : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
42
48
|
} })),
|
43
49
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
44
50
|
display: 'flex',
|
@@ -51,7 +57,7 @@ const CommodityList = (_a) => {
|
|
51
57
|
__html: (0, tool_1.setFontForText)(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
52
58
|
} }),
|
53
59
|
react_1.default.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px', maxWidth: '100px' }), dangerouslySetInnerHTML: {
|
54
|
-
__html: (0, tool_1.setFontForText)((
|
60
|
+
__html: (0, tool_1.setFontForText)((_l = (_k = item === null || item === void 0 ? void 0 : item.bindCta) === null || _k === void 0 ? void 0 : _k.enTitle) !== null && _l !== void 0 ? _l : 'Shop Now', buttonStyle)
|
55
61
|
} })))));
|
56
62
|
})));
|
57
63
|
};
|
@@ -4,11 +4,11 @@ const tslib_1 = require("tslib");
|
|
4
4
|
const css_1 = require("@emotion/css");
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
6
6
|
const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
|
7
|
-
const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
|
8
7
|
const hooks_1 = require("../../../../core/hooks");
|
9
8
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
10
9
|
const Img_1 = tslib_1.__importDefault(require("../components/Img"));
|
11
10
|
const tool_1 = require("../../../../core/utils/tool");
|
11
|
+
const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
|
12
12
|
const Link = (_a) => {
|
13
13
|
var _b, _c, _d, _e, _f, _g, _h, _j;
|
14
14
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
|
@@ -32,7 +32,7 @@ const Link = (_a) => {
|
|
32
32
|
overflow: 'hidden'
|
33
33
|
}) },
|
34
34
|
react_1.default.createElement("div", null,
|
35
|
-
react_1.default.createElement("div", { className:
|
35
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
|
36
36
|
__html: (0, tool_1.setFontForText)((_h = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _h !== void 0 ? _h : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
37
37
|
} }),
|
38
38
|
(customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) && (react_1.default.createElement("div", { style: Object.assign(Object.assign({}, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style), { lineHeight: ((_j = customTitle === null || customTitle === void 0 ? void 0 : customTitle.style) === null || _j === void 0 ? void 0 : _j.height) + 'px' }), className: index_module_less_1.default['one-line-ellipsis'], dangerouslySetInnerHTML: {
|
@@ -23,6 +23,6 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle }) => {
|
|
23
23
|
}, [src]);
|
24
24
|
return (react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, imgStyle)) },
|
25
25
|
react_1.default.createElement("div", { ref: ref, hidden: !src, className: (0, css_1.css)({ width: '100%', height: '100%' }) },
|
26
|
-
react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ?
|
26
|
+
react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ? translateY + 50 : 50}%` }, style)), src: src }))));
|
27
27
|
};
|
28
28
|
exports.default = (0, react_1.memo)(Img);
|