pb-sxp-ui 1.4.1 → 1.4.2
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 +34 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +34 -28
- 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 +34 -28
- 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/components/SxpPageRender/Modal/index.js +2 -2
- package/es/core/components/SxpPageRender/PictureGroup/index.js +6 -3
- package/es/core/components/SxpPageRender/index.js +6 -6
- package/es/materials/sxp/popup/CommodityDetail/index.js +5 -5
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +12 -9
- package/lib/core/components/SxpPageRender/Modal/index.js +2 -2
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +6 -3
- package/lib/core/components/SxpPageRender/index.js +6 -6
- package/lib/materials/sxp/popup/CommodityDetail/index.js +5 -5
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +12 -9
- package/package.json +1 -1
@@ -114,9 +114,9 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
114
114
|
width: `calc(100% - ${((_r = (_q = (_p = (_o = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _o === void 0 ? void 0 : _o.props) === null || _p === void 0 ? void 0 : _p.popupBg) === null || _q === void 0 ? void 0 : _q.horizontalMargin) !== null && _r !== void 0 ? _r : 0) * 2}px)`,
|
115
115
|
height: '100%'
|
116
116
|
} },
|
117
|
-
React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign({ padding, animationDuration: ((_s = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _s !== void 0 ? _s : 0) / 1000 + 's' }, (isScrollFullScreen && {
|
117
|
+
React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign(Object.assign({ padding, animationDuration: ((_s = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _s !== void 0 ? _s : 0) / 1000 + 's' }, (isScrollFullScreen && {
|
118
118
|
transform: `translateY(${modalTrans}px)`
|
119
|
-
})), onClick: (e) => {
|
119
|
+
})), { overflow: 'hidden' }), onClick: (e) => {
|
120
120
|
e.stopPropagation();
|
121
121
|
e.preventDefault();
|
122
122
|
} }, (isScrollFullScreen && {
|
@@ -5,7 +5,7 @@ import Picture from './Picture';
|
|
5
5
|
import { useSxpDataSource } from '../../../../core/hooks';
|
6
6
|
import { css } from '@emotion/css';
|
7
7
|
const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
|
8
|
-
var _a;
|
8
|
+
var _a, _b;
|
9
9
|
const ref = useRef();
|
10
10
|
const { isActive } = useSwiperSlide();
|
11
11
|
const { sxpParameter, openHashtag } = useSxpDataSource();
|
@@ -32,7 +32,10 @@ const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd
|
|
32
32
|
return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
33
33
|
clickable: true,
|
34
34
|
bulletActiveClass: 'swipe-item-active-bullet'
|
35
|
-
}, className: css(Object.assign(Object.assign({ '.swiper-pagination':
|
35
|
+
}, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
|
36
|
+
bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
|
37
|
+
fontSize: '14px'
|
38
|
+
} }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
|
36
39
|
'.swiper-pagination-bullet': {
|
37
40
|
backgroundColor: imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor,
|
38
41
|
opacity: 1
|
@@ -42,7 +45,7 @@ const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd
|
|
42
45
|
backgroundColor: `${imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsActiveColor}!important`,
|
43
46
|
opacity: 1
|
44
47
|
}
|
45
|
-
}))), height: height, loop: true, autoplay: { delay: ((
|
48
|
+
}))), height: height, loop: true, autoplay: { delay: ((_b = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.delay) !== null && _b !== void 0 ? _b : 3) * 1000 } }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url, index) => {
|
46
49
|
return (React.createElement(SwiperSlide, { key: index },
|
47
50
|
React.createElement(Picture, { src: !isLoad && index > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
|
48
51
|
})));
|
@@ -23,7 +23,7 @@ import Tagbar from './Tagbar';
|
|
23
23
|
import { getFeUserId, getSlideSkipState } from '../../../core/utils/localStore';
|
24
24
|
import { isEqual } from 'lodash';
|
25
25
|
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
26
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
27
27
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
28
28
|
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
29
29
|
const { schema } = useEditor();
|
@@ -478,8 +478,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
478
478
|
isReload,
|
479
479
|
renderToggleButton
|
480
480
|
]);
|
481
|
-
return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container', style: {
|
482
|
-
waterFallData && (React.createElement(Navbar, { icon: left, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, textStyle: Object.assign(Object.assign({}, (
|
481
|
+
return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container', style: Object.assign({}, ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset) && { textUnderlineOffset: `${globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset}px` })) },
|
482
|
+
waterFallData && (React.createElement(Navbar, { icon: left, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, textStyle: Object.assign(Object.assign({}, (_e = (_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagTitle), { color: '#fff' }), onClose: () => {
|
483
483
|
const isEq = isEqual(rtcList, cacheRtcList);
|
484
484
|
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
485
485
|
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
|
@@ -490,7 +490,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
490
490
|
React.createElement(Tagbar, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
491
491
|
top: minusHeight
|
492
492
|
} }),
|
493
|
-
isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((
|
493
|
+
isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _f !== void 0 ? _f : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
|
494
494
|
React.createElement(Swiper, { style: {
|
495
495
|
marginTop: tagHeight
|
496
496
|
}, ref: swiperRef, onSlideChange: () => {
|
@@ -512,7 +512,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
512
512
|
var _a;
|
513
513
|
setIsLoadMore(false);
|
514
514
|
if (res && ((_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
515
|
-
setPageNum(
|
515
|
+
setPageNum(pageNum + 1);
|
516
516
|
}
|
517
517
|
});
|
518
518
|
}
|
@@ -521,6 +521,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
521
521
|
renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
522
522
|
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
523
523
|
renderView),
|
524
|
-
React.createElement(WaterFall, Object.assign({}, (
|
524
|
+
React.createElement(WaterFall, Object.assign({}, (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props))));
|
525
525
|
};
|
526
526
|
export default SxpPageRender;
|
@@ -12,7 +12,7 @@ import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
|
|
12
12
|
import { setFontForText } from '../../../../core/utils/tool';
|
13
13
|
import CommodityGroup from '../../template/components/CommodityGroup';
|
14
14
|
const CommodityDetail = (_a) => {
|
15
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
15
|
+
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;
|
16
16
|
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel, iframeBgColor } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel", "iframeBgColor"]);
|
17
17
|
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
18
18
|
const { jumpToWeb, productView } = useEventReport();
|
@@ -143,7 +143,7 @@ const CommodityDetail = (_a) => {
|
|
143
143
|
clickableClass: getDotsAlign
|
144
144
|
}, loop: true, autoplay: {
|
145
145
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
146
|
-
}, ref: ref, className: css(Object.assign(Object.assign({ '.swiper-pagination':
|
146
|
+
}, ref: ref, className: css(Object.assign(Object.assign({ '.swiper-pagination': { bottom: (_x = swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) !== null && _x !== void 0 ? _x : 0, fontSize: '14px' } }, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
|
147
147
|
'.swiper-pagination-bullet': {
|
148
148
|
backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
|
149
149
|
opacity: 1
|
@@ -154,7 +154,7 @@ const CommodityDetail = (_a) => {
|
|
154
154
|
opacity: 1
|
155
155
|
}
|
156
156
|
}))) },
|
157
|
-
React.createElement(React.Fragment, null, (
|
157
|
+
React.createElement(React.Fragment, null, (_y = product === null || product === void 0 ? void 0 : product.homePage) === null || _y === void 0 ? void 0 : _y.map((src) => {
|
158
158
|
var _a;
|
159
159
|
return (React.createElement(SwiperSlide, { key: src },
|
160
160
|
React.createElement("div", { style: {
|
@@ -170,7 +170,7 @@ const CommodityDetail = (_a) => {
|
|
170
170
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
171
171
|
}, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
|
172
172
|
})))),
|
173
|
-
!((
|
173
|
+
!((_z = product === null || product === void 0 ? void 0 : product.homePage) === null || _z === void 0 ? void 0 : _z.length) && (React.createElement("div", { className: css({
|
174
174
|
height,
|
175
175
|
width
|
176
176
|
}) },
|
@@ -178,7 +178,7 @@ const CommodityDetail = (_a) => {
|
|
178
178
|
objectFit: 'cover',
|
179
179
|
width: '100%',
|
180
180
|
height: '100%'
|
181
|
-
}), src: (
|
181
|
+
}), src: (_0 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _0 !== void 0 ? _0 : bottom_image, alt: 'pdp image' }))),
|
182
182
|
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
183
183
|
display: 'flex',
|
184
184
|
alignItems: 'center',
|
@@ -12,7 +12,7 @@ import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
|
|
12
12
|
import { setFontForText } from '../../../../core/utils/tool';
|
13
13
|
import CommodityGroup from '../../template/components/CommodityGroup';
|
14
14
|
const CommodityDetailDiroNew = (_a) => {
|
15
|
-
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, _1, _2, _3;
|
15
|
+
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, _1, _2, _3, _4;
|
16
16
|
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel, iframeBgColor } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel", "iframeBgColor"]);
|
17
17
|
const [spread, setSpread] = useState(true);
|
18
18
|
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
@@ -127,7 +127,10 @@ Made in Italy` })));
|
|
127
127
|
clickableClass: getDotsAlign
|
128
128
|
}, loop: true, autoplay: {
|
129
129
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
130
|
-
}, ref: ref, className: css(Object.assign(Object.assign({ '.swiper-pagination':
|
130
|
+
}, ref: ref, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
|
131
|
+
bottom: (_x = swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) !== null && _x !== void 0 ? _x : 0,
|
132
|
+
fontSize: '14px'
|
133
|
+
} }, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
|
131
134
|
'.swiper-pagination-bullet': {
|
132
135
|
backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
|
133
136
|
opacity: 1
|
@@ -137,7 +140,7 @@ Made in Italy` })));
|
|
137
140
|
backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
|
138
141
|
opacity: 1
|
139
142
|
}
|
140
|
-
}))) }, (
|
143
|
+
}))) }, (_y = product === null || product === void 0 ? void 0 : product.homePage) === null || _y === void 0 ? void 0 : _y.map((src) => {
|
141
144
|
var _a;
|
142
145
|
return (React.createElement(SwiperSlide, { key: src },
|
143
146
|
React.createElement("div", { style: {
|
@@ -153,7 +156,7 @@ Made in Italy` })));
|
|
153
156
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
154
157
|
}, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
|
155
158
|
}))),
|
156
|
-
!((
|
159
|
+
!((_z = product === null || product === void 0 ? void 0 : product.homePage) === null || _z === void 0 ? void 0 : _z.length) && (React.createElement("div", { className: css({
|
157
160
|
height,
|
158
161
|
width
|
159
162
|
}) },
|
@@ -161,7 +164,7 @@ Made in Italy` })));
|
|
161
164
|
objectFit: 'cover',
|
162
165
|
width: '100%',
|
163
166
|
height: '100%'
|
164
|
-
}), src: (
|
167
|
+
}), src: (_0 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _0 !== void 0 ? _0 : bottom_image, alt: 'pdp image' }))),
|
165
168
|
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
166
169
|
display: 'flex',
|
167
170
|
alignItems: 'center',
|
@@ -178,7 +181,7 @@ Made in Italy` })));
|
|
178
181
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
179
182
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
180
183
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
|
181
|
-
__html: setFontForText((
|
184
|
+
__html: setFontForText((_1 = product === null || product === void 0 ? void 0 : product.title) !== null && _1 !== void 0 ? _1 : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
182
185
|
} }),
|
183
186
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), dangerouslySetInnerHTML: {
|
184
187
|
__html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
@@ -188,11 +191,11 @@ Made in Italy` })));
|
|
188
191
|
__html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
189
192
|
} }),
|
190
193
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
|
191
|
-
__html: setFontForText((
|
194
|
+
__html: setFontForText((_2 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _2 !== void 0 ? _2 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
|
192
195
|
} }))),
|
193
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (
|
196
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_3 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _3 !== void 0 ? _3 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
|
194
197
|
React.createElement("span", { dangerouslySetInnerHTML: {
|
195
|
-
__html: setFontForText((
|
198
|
+
__html: setFontForText((_4 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _4 !== void 0 ? _4 : 'Shop now', buttonStyle)
|
196
199
|
} }))),
|
197
200
|
productInfoText({ isPost }))),
|
198
201
|
React.createElement(Modal, { visible: showModal, onClose: () => setShowModal(false) },
|
@@ -117,9 +117,9 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
117
117
|
width: `calc(100% - ${((_r = (_q = (_p = (_o = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _o === void 0 ? void 0 : _o.props) === null || _p === void 0 ? void 0 : _p.popupBg) === null || _q === void 0 ? void 0 : _q.horizontalMargin) !== null && _r !== void 0 ? _r : 0) * 2}px)`,
|
118
118
|
height: '100%'
|
119
119
|
} },
|
120
|
-
react_1.default.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign({ padding, animationDuration: ((_s = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _s !== void 0 ? _s : 0) / 1000 + 's' }, (isScrollFullScreen && {
|
120
|
+
react_1.default.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign(Object.assign({ padding, animationDuration: ((_s = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _s !== void 0 ? _s : 0) / 1000 + 's' }, (isScrollFullScreen && {
|
121
121
|
transform: `translateY(${modalTrans}px)`
|
122
|
-
})), onClick: (e) => {
|
122
|
+
})), { overflow: 'hidden' }), onClick: (e) => {
|
123
123
|
e.stopPropagation();
|
124
124
|
e.preventDefault();
|
125
125
|
} }, (isScrollFullScreen && {
|
@@ -8,7 +8,7 @@ const Picture_1 = tslib_1.__importDefault(require("./Picture"));
|
|
8
8
|
const hooks_1 = require("../../../../core/hooks");
|
9
9
|
const css_1 = require("@emotion/css");
|
10
10
|
const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
|
11
|
-
var _a;
|
11
|
+
var _a, _b;
|
12
12
|
const ref = (0, react_1.useRef)();
|
13
13
|
const { isActive } = (0, react_2.useSwiperSlide)();
|
14
14
|
const { sxpParameter, openHashtag } = (0, hooks_1.useSxpDataSource)();
|
@@ -35,7 +35,10 @@ const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd
|
|
35
35
|
return (react_1.default.createElement(react_2.Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [modules_1.Pagination, modules_1.Autoplay], pagination: {
|
36
36
|
clickable: true,
|
37
37
|
bulletActiveClass: 'swipe-item-active-bullet'
|
38
|
-
}, className: (0, css_1.css)(Object.assign(Object.assign({ '.swiper-pagination':
|
38
|
+
}, className: (0, css_1.css)(Object.assign(Object.assign({ '.swiper-pagination': {
|
39
|
+
bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
|
40
|
+
fontSize: '14px'
|
41
|
+
} }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
|
39
42
|
'.swiper-pagination-bullet': {
|
40
43
|
backgroundColor: imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor,
|
41
44
|
opacity: 1
|
@@ -45,7 +48,7 @@ const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd
|
|
45
48
|
backgroundColor: `${imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsActiveColor}!important`,
|
46
49
|
opacity: 1
|
47
50
|
}
|
48
|
-
}))), height: height, loop: true, autoplay: { delay: ((
|
51
|
+
}))), height: height, loop: true, autoplay: { delay: ((_b = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.delay) !== null && _b !== void 0 ? _b : 3) * 1000 } }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url, index) => {
|
49
52
|
return (react_1.default.createElement(react_2.SwiperSlide, { key: index },
|
50
53
|
react_1.default.createElement(Picture_1.default, { src: !isLoad && index > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
|
51
54
|
})));
|
@@ -26,7 +26,7 @@ const Tagbar_1 = tslib_1.__importDefault(require("./Tagbar"));
|
|
26
26
|
const localStore_1 = require("../../../core/utils/localStore");
|
27
27
|
const lodash_1 = require("lodash");
|
28
28
|
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
|
29
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
29
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
30
30
|
const mutedIcon = (0, useIconLink_1.useIconLink)('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
31
31
|
const unmutedIcon = (0, useIconLink_1.useIconLink)('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
32
32
|
const { schema } = (0, hooks_1.useEditor)();
|
@@ -481,8 +481,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
481
481
|
isReload,
|
482
482
|
renderToggleButton
|
483
483
|
]);
|
484
|
-
return (react_1.default.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container', style: {
|
485
|
-
waterFallData && (react_1.default.createElement(Navbar_1.default, { icon: left_png_1.default, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, textStyle: Object.assign(Object.assign({}, (
|
484
|
+
return (react_1.default.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container', style: Object.assign({}, ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset) && { textUnderlineOffset: `${globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset}px` })) },
|
485
|
+
waterFallData && (react_1.default.createElement(Navbar_1.default, { icon: left_png_1.default, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, textStyle: Object.assign(Object.assign({}, (_e = (_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagTitle), { color: '#fff' }), onClose: () => {
|
486
486
|
const isEq = (0, lodash_1.isEqual)(rtcList, cacheRtcList);
|
487
487
|
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
488
488
|
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
|
@@ -493,7 +493,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
493
493
|
react_1.default.createElement(Tagbar_1.default, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
494
494
|
top: minusHeight
|
495
495
|
} }),
|
496
|
-
isShowFingerTip ? (react_1.default.createElement(FingerSwipeTip_1.default, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((
|
496
|
+
isShowFingerTip ? (react_1.default.createElement(FingerSwipeTip_1.default, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _f !== void 0 ? _f : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
|
497
497
|
react_1.default.createElement(react_2.Swiper, { style: {
|
498
498
|
marginTop: tagHeight
|
499
499
|
}, ref: swiperRef, onSlideChange: () => {
|
@@ -515,7 +515,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
515
515
|
var _a;
|
516
516
|
setIsLoadMore(false);
|
517
517
|
if (res && ((_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
518
|
-
setPageNum(
|
518
|
+
setPageNum(pageNum + 1);
|
519
519
|
}
|
520
520
|
});
|
521
521
|
}
|
@@ -524,6 +524,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
524
524
|
renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
525
525
|
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
526
526
|
renderView),
|
527
|
-
react_1.default.createElement(WaterFall_1.default, Object.assign({}, (
|
527
|
+
react_1.default.createElement(WaterFall_1.default, Object.assign({}, (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props))));
|
528
528
|
};
|
529
529
|
exports.default = SxpPageRender;
|
@@ -14,7 +14,7 @@ const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/componen
|
|
14
14
|
const tool_1 = require("../../../../core/utils/tool");
|
15
15
|
const CommodityGroup_1 = tslib_1.__importDefault(require("../../template/components/CommodityGroup"));
|
16
16
|
const CommodityDetail = (_a) => {
|
17
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
17
|
+
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;
|
18
18
|
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel, iframeBgColor } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel", "iframeBgColor"]);
|
19
19
|
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = (0, hooks_1.useSxpDataSource)();
|
20
20
|
const { jumpToWeb, productView } = (0, useEventReport_1.useEventReport)();
|
@@ -145,7 +145,7 @@ const CommodityDetail = (_a) => {
|
|
145
145
|
clickableClass: getDotsAlign
|
146
146
|
}, loop: true, autoplay: {
|
147
147
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
148
|
-
}, ref: ref, className: (0, css_1.css)(Object.assign(Object.assign({ '.swiper-pagination':
|
148
|
+
}, ref: ref, className: (0, css_1.css)(Object.assign(Object.assign({ '.swiper-pagination': { bottom: (_x = swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) !== null && _x !== void 0 ? _x : 0, fontSize: '14px' } }, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
|
149
149
|
'.swiper-pagination-bullet': {
|
150
150
|
backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
|
151
151
|
opacity: 1
|
@@ -156,7 +156,7 @@ const CommodityDetail = (_a) => {
|
|
156
156
|
opacity: 1
|
157
157
|
}
|
158
158
|
}))) },
|
159
|
-
react_1.default.createElement(react_1.default.Fragment, null, (
|
159
|
+
react_1.default.createElement(react_1.default.Fragment, null, (_y = product === null || product === void 0 ? void 0 : product.homePage) === null || _y === void 0 ? void 0 : _y.map((src) => {
|
160
160
|
var _a;
|
161
161
|
return (react_1.default.createElement(react_2.SwiperSlide, { key: src },
|
162
162
|
react_1.default.createElement("div", { style: {
|
@@ -172,7 +172,7 @@ const CommodityDetail = (_a) => {
|
|
172
172
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
173
173
|
}, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
|
174
174
|
})))),
|
175
|
-
!((
|
175
|
+
!((_z = product === null || product === void 0 ? void 0 : product.homePage) === null || _z === void 0 ? void 0 : _z.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
|
176
176
|
height,
|
177
177
|
width
|
178
178
|
}) },
|
@@ -180,7 +180,7 @@ const CommodityDetail = (_a) => {
|
|
180
180
|
objectFit: 'cover',
|
181
181
|
width: '100%',
|
182
182
|
height: '100%'
|
183
|
-
}), src: (
|
183
|
+
}), src: (_0 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _0 !== void 0 ? _0 : bottom_image, alt: 'pdp image' }))),
|
184
184
|
(iframeUrl || !product) && iframeIcon && (react_1.default.createElement("div", { style: {
|
185
185
|
display: 'flex',
|
186
186
|
alignItems: 'center',
|
@@ -14,7 +14,7 @@ const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/componen
|
|
14
14
|
const tool_1 = require("../../../../core/utils/tool");
|
15
15
|
const CommodityGroup_1 = tslib_1.__importDefault(require("../../template/components/CommodityGroup"));
|
16
16
|
const CommodityDetailDiroNew = (_a) => {
|
17
|
-
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, _1, _2, _3;
|
17
|
+
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, _1, _2, _3, _4;
|
18
18
|
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel, iframeBgColor } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel", "iframeBgColor"]);
|
19
19
|
const [spread, setSpread] = (0, react_1.useState)(true);
|
20
20
|
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = (0, hooks_1.useSxpDataSource)();
|
@@ -129,7 +129,10 @@ Made in Italy` })));
|
|
129
129
|
clickableClass: getDotsAlign
|
130
130
|
}, loop: true, autoplay: {
|
131
131
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
132
|
-
}, ref: ref, className: (0, css_1.css)(Object.assign(Object.assign({ '.swiper-pagination':
|
132
|
+
}, ref: ref, className: (0, css_1.css)(Object.assign(Object.assign({ '.swiper-pagination': {
|
133
|
+
bottom: (_x = swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) !== null && _x !== void 0 ? _x : 0,
|
134
|
+
fontSize: '14px'
|
135
|
+
} }, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
|
133
136
|
'.swiper-pagination-bullet': {
|
134
137
|
backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
|
135
138
|
opacity: 1
|
@@ -139,7 +142,7 @@ Made in Italy` })));
|
|
139
142
|
backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
|
140
143
|
opacity: 1
|
141
144
|
}
|
142
|
-
}))) }, (
|
145
|
+
}))) }, (_y = product === null || product === void 0 ? void 0 : product.homePage) === null || _y === void 0 ? void 0 : _y.map((src) => {
|
143
146
|
var _a;
|
144
147
|
return (react_1.default.createElement(react_2.SwiperSlide, { key: src },
|
145
148
|
react_1.default.createElement("div", { style: {
|
@@ -155,7 +158,7 @@ Made in Italy` })));
|
|
155
158
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
156
159
|
}, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
|
157
160
|
}))),
|
158
|
-
!((
|
161
|
+
!((_z = product === null || product === void 0 ? void 0 : product.homePage) === null || _z === void 0 ? void 0 : _z.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
|
159
162
|
height,
|
160
163
|
width
|
161
164
|
}) },
|
@@ -163,7 +166,7 @@ Made in Italy` })));
|
|
163
166
|
objectFit: 'cover',
|
164
167
|
width: '100%',
|
165
168
|
height: '100%'
|
166
|
-
}), src: (
|
169
|
+
}), src: (_0 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _0 !== void 0 ? _0 : bottom_image, alt: 'pdp image' }))),
|
167
170
|
(iframeUrl || !product) && iframeIcon && (react_1.default.createElement("div", { style: {
|
168
171
|
display: 'flex',
|
169
172
|
alignItems: 'center',
|
@@ -180,7 +183,7 @@ Made in Italy` })));
|
|
180
183
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
181
184
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
182
185
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
|
183
|
-
__html: (0, tool_1.setFontForText)((
|
186
|
+
__html: (0, tool_1.setFontForText)((_1 = product === null || product === void 0 ? void 0 : product.title) !== null && _1 !== void 0 ? _1 : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
184
187
|
} }),
|
185
188
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), dangerouslySetInnerHTML: {
|
186
189
|
__html: (0, tool_1.setFontForText)((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
@@ -190,11 +193,11 @@ Made in Italy` })));
|
|
190
193
|
__html: (0, tool_1.setFontForText)(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
191
194
|
} }),
|
192
195
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
|
193
|
-
__html: (0, tool_1.setFontForText)((
|
196
|
+
__html: (0, tool_1.setFontForText)((_2 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _2 !== void 0 ? _2 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
|
194
197
|
} }))),
|
195
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { "aria-label": (
|
198
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { "aria-label": (_3 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _3 !== void 0 ? _3 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
|
196
199
|
react_1.default.createElement("span", { dangerouslySetInnerHTML: {
|
197
|
-
__html: (0, tool_1.setFontForText)((
|
200
|
+
__html: (0, tool_1.setFontForText)((_4 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _4 !== void 0 ? _4 : 'Shop now', buttonStyle)
|
198
201
|
} }))),
|
199
202
|
productInfoText({ isPost }))),
|
200
203
|
react_1.default.createElement(Modal_1.default, { visible: showModal, onClose: () => setShowModal(false) },
|