pb-sxp-ui 1.5.5 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +83 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +17 -1
- package/dist/index.js +83 -41
- 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 +83 -41
- 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/DiyPortalPreview/PictureGroup.js +5 -1
- package/es/core/components/SxpPageRender/Hashtag/index.js +1 -1
- package/es/core/components/SxpPageRender/Modal/index.js +6 -6
- package/es/core/components/SxpPageRender/Navbar.js +2 -1
- package/es/core/components/SxpPageRender/PictureGroup/index.js +2 -1
- package/es/core/components/SxpPageRender/Tagbar.js +2 -2
- package/es/core/components/SxpPageRender/WaterFall/index.js +5 -1
- package/es/core/components/SxpPageRender/index.d.ts +8 -0
- package/es/core/components/SxpPageRender/index.js +46 -18
- package/es/core/context/SxpDataSourceProvider.js +4 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +2 -1
- package/es/materials/sxp/popup/CommodityDetailDiro/index.js +5 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -1
- package/lib/core/components/DiyPortalPreview/PictureGroup.js +5 -1
- package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -1
- package/lib/core/components/SxpPageRender/Modal/index.js +6 -6
- package/lib/core/components/SxpPageRender/Navbar.js +2 -1
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +2 -1
- package/lib/core/components/SxpPageRender/Tagbar.js +2 -2
- package/lib/core/components/SxpPageRender/WaterFall/index.js +5 -1
- package/lib/core/components/SxpPageRender/index.d.ts +8 -0
- package/lib/core/components/SxpPageRender/index.js +46 -18
- package/lib/core/context/SxpDataSourceProvider.js +4 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +2 -1
- package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +5 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -874,18 +874,21 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
874
874
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
875
875
|
const isProd = ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) || (((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProducts) && ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProducts) === null || _d === void 0 ? void 0 : _d.length) > 0);
|
876
876
|
let fromKName = '';
|
877
|
+
let contentFormat = null;
|
877
878
|
if (isFromHashtag) {
|
878
879
|
fromKName = 'hashTagPage';
|
879
880
|
}
|
880
881
|
else if ((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.url) {
|
881
882
|
fromKName = 'videoPage';
|
883
|
+
contentFormat = 'video';
|
882
884
|
}
|
883
885
|
else if ((_g = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.imgUrls) === null || _g === void 0 ? void 0 : _g.length) {
|
884
886
|
fromKName = 'imagePage';
|
887
|
+
contentFormat = 'image';
|
885
888
|
}
|
886
889
|
const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = rec === null || rec === void 0 ? void 0 : rec.product) === null || _q === void 0 ? void 0 : _q.tags;
|
887
890
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
888
|
-
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_10 = (_7 = (_2 = (_y = (_v = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _v !== void 0 ? _v : (_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_1 = (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindProduct) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : (_6 = (_5 = (_4 = (_3 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _3 === void 0 ? void 0 : _3.bindProducts) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.bindCta) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : '', fromKName, fromKPage: (_11 = location === null || location === void 0 ? void 0 : location.href) !== null && _11 !== void 0 ? _11 : '' })
|
891
|
+
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_10 = (_7 = (_2 = (_y = (_v = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _v !== void 0 ? _v : (_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_1 = (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindProduct) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : (_6 = (_5 = (_4 = (_3 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _3 === void 0 ? void 0 : _3.bindProducts) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.bindCta) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : '', fromKName, fromKPage: (_11 = location === null || location === void 0 ? void 0 : location.href) !== null && _11 !== void 0 ? _11 : '', contentFormat })
|
889
892
|
});
|
890
893
|
}, [bffEventReport, isFromHashtag]);
|
891
894
|
const h5EnterLink = React.useCallback(() => {
|
@@ -8931,13 +8934,13 @@ SwiperSlide.displayName = 'SwiperSlide';
|
|
8931
8934
|
* @Author: binruan@chatlabs.com
|
8932
8935
|
* @Date: 2023-11-02 18:34:34
|
8933
8936
|
* @LastEditors: binruan@chatlabs.com
|
8934
|
-
* @LastEditTime: 2024-
|
8937
|
+
* @LastEditTime: 2024-10-11 18:18:41
|
8935
8938
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
8936
8939
|
*
|
8937
8940
|
*/
|
8938
8941
|
const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
8939
8942
|
const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
|
8940
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
8943
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
8941
8944
|
const touchRef = React.useRef(null);
|
8942
8945
|
const fTouchRef = React.useRef(null);
|
8943
8946
|
const touchMoveRef = React.useRef(null);
|
@@ -9050,9 +9053,9 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
9050
9053
|
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)`,
|
9051
9054
|
height: '100%'
|
9052
9055
|
} },
|
9053
|
-
React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign(Object.assign({ padding, animationDuration: ((
|
9056
|
+
React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, role: 'dialog', "aria-label": (_s = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _s === void 0 ? void 0 : _s.displayName, "aria-modal": true, style: Object.assign(Object.assign({ padding, animationDuration: ((_t = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _t !== void 0 ? _t : 0) / 1000 + 's' }, (isScrollFullScreen && {
|
9054
9057
|
transform: `translateY(${modalTrans}px)`
|
9055
|
-
})), { overflow: 'hidden', borderRadius: `${(
|
9058
|
+
})), { overflow: 'hidden', borderRadius: `${(_x = (_w = (_v = (_u = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _u === void 0 ? void 0 : _u.props) === null || _v === void 0 ? void 0 : _v.popupBg) === null || _w === void 0 ? void 0 : _w.borderRadius) !== null && _x !== void 0 ? _x : 0}px`, zIndex: 9 }), onClick: (e) => {
|
9056
9059
|
e.stopPropagation();
|
9057
9060
|
e.preventDefault();
|
9058
9061
|
} }, (isScrollFullScreen && {
|
@@ -9060,13 +9063,13 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
9060
9063
|
onTouchStart: handleTouchStart,
|
9061
9064
|
onTouchEnd: handleTouchEnd
|
9062
9065
|
})),
|
9063
|
-
React.createElement("
|
9064
|
-
React.createElement("img", { src: (
|
9066
|
+
React.createElement("button", { className: 'modal-icon-wrapper', role: 'button', "aria-label": 'close button', onClick: onClose, style: { top: scrollTop } },
|
9067
|
+
React.createElement("img", { src: (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _y !== void 0 ? _y : closeIcon$1, alt: 'close button', className: 'modal-icon' })),
|
9065
9068
|
React.createElement("div", Object.assign({ ref: ref, style: {
|
9066
9069
|
height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
|
9067
9070
|
overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden',
|
9068
9071
|
zIndex: 1
|
9069
|
-
} }, (((
|
9072
|
+
} }, (((_0 = (_z = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _z === void 0 ? void 0 : _z.props) === null || _0 === void 0 ? void 0 : _0.enableFixedCloseButton) && {
|
9070
9073
|
onScroll: (e) => {
|
9071
9074
|
var _a;
|
9072
9075
|
setScrollTop(15 - ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.scrollTop));
|
@@ -9445,7 +9448,8 @@ const CommodityDetail$1 = (_a) => {
|
|
9445
9448
|
product && ((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
|
9446
9449
|
clickable: true,
|
9447
9450
|
bulletActiveClass: 'swipe-item-active-bullet',
|
9448
|
-
clickableClass: getDotsAlign
|
9451
|
+
clickableClass: getDotsAlign,
|
9452
|
+
bulletElement: 'button'
|
9449
9453
|
}, loop: true, autoplay: {
|
9450
9454
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9451
9455
|
}, ref: ref, className: css.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) && {
|
@@ -10352,7 +10356,8 @@ Made in Italy` })));
|
|
10352
10356
|
product && ((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
|
10353
10357
|
clickable: true,
|
10354
10358
|
bulletActiveClass: 'swipe-item-active-bullet',
|
10355
|
-
clickableClass: getDotsAlign
|
10359
|
+
clickableClass: getDotsAlign,
|
10360
|
+
bulletElement: 'button'
|
10356
10361
|
}, loop: true, autoplay: {
|
10357
10362
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
10358
10363
|
}, ref: ref, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
|
@@ -12542,7 +12547,7 @@ var settingRender$3 = [
|
|
12542
12547
|
* @Author: binruan@chatlabs.com
|
12543
12548
|
* @Date: 2023-12-26 16:11:34
|
12544
12549
|
* @LastEditors: binruan@chatlabs.com
|
12545
|
-
* @LastEditTime: 2024-
|
12550
|
+
* @LastEditTime: 2024-10-11 18:22:21
|
12546
12551
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Navbar.tsx
|
12547
12552
|
*
|
12548
12553
|
*/
|
@@ -12550,7 +12555,8 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
|
|
12550
12555
|
var _a;
|
12551
12556
|
const { waterFallData, setOpenHashtag } = useSxpDataSource();
|
12552
12557
|
return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
|
12553
|
-
React.createElement("
|
12558
|
+
React.createElement("button", { className: 'clc-sxp-nav-left', role: 'button', "aria-label": 'back button', onClick: onClose },
|
12559
|
+
React.createElement("img", { src: icon, alt: 'back button' })),
|
12554
12560
|
React.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: {
|
12555
12561
|
__html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
|
12556
12562
|
} })));
|
@@ -14407,7 +14413,7 @@ function WaterfallList(_a) {
|
|
14407
14413
|
* @Author: binruan@chatlabs.com
|
14408
14414
|
* @Date: 2024-01-10 10:58:24
|
14409
14415
|
* @LastEditors: binruan@chatlabs.com
|
14410
|
-
* @LastEditTime: 2024-
|
14416
|
+
* @LastEditTime: 2024-10-11 13:43:22
|
14411
14417
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
|
14412
14418
|
*
|
14413
14419
|
*/
|
@@ -14459,14 +14465,17 @@ const WaterFall = (props) => {
|
|
14459
14465
|
if (!rec)
|
14460
14466
|
return;
|
14461
14467
|
let fromKName = '';
|
14468
|
+
let contentFormat = null;
|
14462
14469
|
if (isFromHashtag) {
|
14463
14470
|
fromKName = 'hashTagPage';
|
14464
14471
|
}
|
14465
14472
|
else if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
|
14466
14473
|
fromKName = 'videoPage';
|
14474
|
+
contentFormat = 'video';
|
14467
14475
|
}
|
14468
14476
|
else if ((_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) === null || _c === void 0 ? void 0 : _c.length) {
|
14469
14477
|
fromKName = 'imagePage';
|
14478
|
+
contentFormat = 'image';
|
14470
14479
|
}
|
14471
14480
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
14472
14481
|
eventInfo: {
|
@@ -14479,7 +14488,8 @@ const WaterFall = (props) => {
|
|
14479
14488
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
14480
14489
|
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
14481
14490
|
eventSubject: 'clickTagsViewContents',
|
14482
|
-
eventDescription: 'User click tags view contents'
|
14491
|
+
eventDescription: 'User click tags view contents',
|
14492
|
+
contentFormat
|
14483
14493
|
}
|
14484
14494
|
});
|
14485
14495
|
}, [recData, bffEventReport, viewTime, isFromHashtag, cacheActiveIndex]);
|
@@ -15997,7 +16007,7 @@ const Picture = (props) => {
|
|
15997
16007
|
* @Author: lewinlu@chatlabs.com
|
15998
16008
|
* @Date: 2024-01-03 14:39:09
|
15999
16009
|
* @LastEditors: binruan@chatlabs.com
|
16000
|
-
* @LastEditTime: 2024-
|
16010
|
+
* @LastEditTime: 2024-10-10 17:53:30
|
16001
16011
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
|
16002
16012
|
*/
|
16003
16013
|
const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
|
@@ -16030,7 +16040,8 @@ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageE
|
|
16030
16040
|
// }
|
16031
16041
|
return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
16032
16042
|
clickable: true,
|
16033
|
-
bulletActiveClass: 'swipe-item-active-bullet'
|
16043
|
+
bulletActiveClass: 'swipe-item-active-bullet',
|
16044
|
+
bulletElement: 'button'
|
16034
16045
|
}, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
|
16035
16046
|
bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
|
16036
16047
|
fontSize: '14px'
|
@@ -16055,7 +16066,7 @@ var PictureGroup$3 = React.memo(PictureGroup$2);
|
|
16055
16066
|
* @Author: binruan@chatlabs.com
|
16056
16067
|
* @Date: 2024-01-15 19:03:09
|
16057
16068
|
* @LastEditors: binruan@chatlabs.com
|
16058
|
-
* @LastEditTime: 2024-
|
16069
|
+
* @LastEditTime: 2024-10-11 18:37:55
|
16059
16070
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
|
16060
16071
|
*
|
16061
16072
|
*/
|
@@ -16093,7 +16104,7 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
|
16093
16104
|
return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
16094
16105
|
}, [isShowMore, tags]);
|
16095
16106
|
return (React.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` } },
|
16096
|
-
React.createElement(Scroll$1, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (React.createElement(SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item) },
|
16107
|
+
React.createElement(Scroll$1, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (React.createElement(SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item), tag: 'button', "aria-label": item },
|
16097
16108
|
React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
|
16098
16109
|
};
|
16099
16110
|
var Hashtag$1 = React.memo(Hashtag);
|
@@ -16242,7 +16253,7 @@ const Nudge = ({ nudge }) => {
|
|
16242
16253
|
* @Author: binruan@chatlabs.com
|
16243
16254
|
* @Date: 2024-04-29 16:32:21
|
16244
16255
|
* @LastEditors: binruan@chatlabs.com
|
16245
|
-
* @LastEditTime: 2024-
|
16256
|
+
* @LastEditTime: 2024-10-11 18:59:43
|
16246
16257
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
|
16247
16258
|
*
|
16248
16259
|
*/
|
@@ -16288,8 +16299,8 @@ const Tagbar = ({ tagList = [], setActiveIndex, style }) => {
|
|
16288
16299
|
if (waterFallData || tagList.length <= 0)
|
16289
16300
|
return null;
|
16290
16301
|
return (React.createElement("div", { className: 'clc-sxp-tagbar', style: style },
|
16291
|
-
React.createElement("
|
16292
|
-
return (React.createElement("
|
16302
|
+
React.createElement("div", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
|
16303
|
+
return (React.createElement("button", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, "aria-label": tag, onClick: handleSelectTag(tag) }, tag));
|
16293
16304
|
}))));
|
16294
16305
|
};
|
16295
16306
|
var Tagbar$1 = React.memo(Tagbar);
|
@@ -16298,12 +16309,12 @@ var Tagbar$1 = React.memo(Tagbar);
|
|
16298
16309
|
* @Author: binruan@chatlabs.com
|
16299
16310
|
* @Date: 2024-01-15 19:03:09
|
16300
16311
|
* @LastEditors: binruan@chatlabs.com
|
16301
|
-
* @LastEditTime: 2024-
|
16312
|
+
* @LastEditTime: 2024-10-11 18:16:31
|
16302
16313
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16303
16314
|
*
|
16304
16315
|
*/
|
16305
16316
|
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
|
16306
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
16317
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
16307
16318
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
16308
16319
|
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
16309
16320
|
const { schema } = useEditor();
|
@@ -16549,7 +16560,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16549
16560
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
16550
16561
|
return (React.createElement(React.Fragment, null,
|
16551
16562
|
((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
16552
|
-
React.createElement("div", { className: 'clc-sxp-bottom', style: {
|
16563
|
+
React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px` } },
|
16553
16564
|
React.createElement(Nudge, { nudge: nudge }),
|
16554
16565
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
16555
16566
|
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
@@ -16612,7 +16623,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16612
16623
|
}
|
16613
16624
|
};
|
16614
16625
|
const handleSlideSkip = (item, position) => {
|
16615
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
16626
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
16616
16627
|
if (isPreview || waterFallData)
|
16617
16628
|
return;
|
16618
16629
|
const t = new Date() - curTime.current;
|
@@ -16620,18 +16631,26 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16620
16631
|
const link = ((_d = (_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.link) || ((_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.link) || ((_g = item === null || item === void 0 ? void 0 : item.product) === null || _g === void 0 ? void 0 : _g.link);
|
16621
16632
|
const product = (item === null || item === void 0 ? void 0 : item.product) || ((_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct) || ((_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]);
|
16622
16633
|
if (link) {
|
16634
|
+
let contentFormat = null;
|
16635
|
+
if ((_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.url) {
|
16636
|
+
contentFormat = 'video';
|
16637
|
+
}
|
16638
|
+
else if ((_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.imgUrls) === null || _o === void 0 ? void 0 : _o.length) {
|
16639
|
+
contentFormat = 'image';
|
16640
|
+
}
|
16623
16641
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
16624
16642
|
eventInfo: {
|
16625
16643
|
eventSubject: 'swipeToWeb',
|
16626
16644
|
eventDescription: 'User swiped to web',
|
16627
|
-
productId: (
|
16628
|
-
productName: (
|
16645
|
+
productId: (_p = product === null || product === void 0 ? void 0 : product.itemId) !== null && _p !== void 0 ? _p : '',
|
16646
|
+
productName: (_q = product === null || product === void 0 ? void 0 : product.title) !== null && _q !== void 0 ? _q : '',
|
16629
16647
|
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
16630
|
-
productCollection: (
|
16648
|
+
productCollection: (_r = product === null || product === void 0 ? void 0 : product.collection) !== null && _r !== void 0 ? _r : '',
|
16631
16649
|
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
16632
16650
|
position: position + '',
|
16633
|
-
contentId: (
|
16634
|
-
traceInfo: (
|
16651
|
+
contentId: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.itemId) !== null && _t !== void 0 ? _t : '',
|
16652
|
+
traceInfo: (_x = (_v = (_u = item === null || item === void 0 ? void 0 : item.video) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : (_w = item === null || item === void 0 ? void 0 : item.product) === null || _w === void 0 ? void 0 : _w.traceInfo) !== null && _x !== void 0 ? _x : '',
|
16653
|
+
contentFormat
|
16635
16654
|
}
|
16636
16655
|
});
|
16637
16656
|
skipLinkRef.current = true;
|
@@ -16640,19 +16659,27 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16640
16659
|
}
|
16641
16660
|
};
|
16642
16661
|
const handleScrollEvent = (swiper) => {
|
16643
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
16662
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
16644
16663
|
const item = data[swiper.previousIndex];
|
16645
16664
|
if (!item)
|
16646
16665
|
return;
|
16666
|
+
let contentFormat = null;
|
16667
|
+
if ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) {
|
16668
|
+
contentFormat = 'video';
|
16669
|
+
}
|
16670
|
+
else if ((_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls) === null || _c === void 0 ? void 0 : _c.length) {
|
16671
|
+
contentFormat = 'image';
|
16672
|
+
}
|
16647
16673
|
if (swiper.previousIndex - swiper.activeIndex < 0) {
|
16648
16674
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
16649
16675
|
eventInfo: {
|
16650
16676
|
eventSubject: 'scrollDown',
|
16651
16677
|
eventDescription: 'User scroll down',
|
16652
|
-
contentId: (
|
16653
|
-
productId: (
|
16678
|
+
contentId: (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.itemId) !== null && _e !== void 0 ? _e : '',
|
16679
|
+
productId: (_g = (_f = item === null || item === void 0 ? void 0 : item.product) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
|
16654
16680
|
requestId: null,
|
16655
|
-
traceInfo: (
|
16681
|
+
traceInfo: (_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.traceInfo) !== null && _j !== void 0 ? _j : '',
|
16682
|
+
contentFormat
|
16656
16683
|
}
|
16657
16684
|
});
|
16658
16685
|
// 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
|
@@ -16664,10 +16691,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16664
16691
|
eventInfo: {
|
16665
16692
|
eventSubject: 'scrollUp',
|
16666
16693
|
eventDescription: 'User scroll up',
|
16667
|
-
contentId: (
|
16668
|
-
productId: (
|
16694
|
+
contentId: (_l = (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '',
|
16695
|
+
productId: (_o = (_m = item.product) === null || _m === void 0 ? void 0 : _m.itemId) !== null && _o !== void 0 ? _o : '',
|
16669
16696
|
requestId: null,
|
16670
|
-
traceInfo: (
|
16697
|
+
traceInfo: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : '',
|
16698
|
+
contentFormat
|
16671
16699
|
}
|
16672
16700
|
});
|
16673
16701
|
// 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
|
@@ -16676,7 +16704,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16676
16704
|
// 商品浏览事件
|
16677
16705
|
handleReportProductView(item);
|
16678
16706
|
const curItem = data[swiper.activeIndex];
|
16679
|
-
if (!((
|
16707
|
+
if (!((_r = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _r === void 0 ? void 0 : _r.url) && !((_s = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _s === void 0 ? void 0 : _s.imgUrls) && (curItem === null || curItem === void 0 ? void 0 : curItem.product)) {
|
16680
16708
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
16681
16709
|
eventName: 'ProductView'
|
16682
16710
|
});
|
@@ -16779,7 +16807,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16779
16807
|
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
16780
16808
|
top: minusHeight
|
16781
16809
|
} }),
|
16782
|
-
|
16810
|
+
((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && (React.createElement("button", { style: {
|
16811
|
+
position: 'absolute',
|
16812
|
+
[(_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _g === void 0 ? void 0 : _g.xPosit) !== null && _h !== void 0 ? _h : 'left']: (_k = (_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _j === void 0 ? void 0 : _j.x) !== null && _k !== void 0 ? _k : 0,
|
16813
|
+
[(_m = (_l = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _l === void 0 ? void 0 : _l.yPosit) !== null && _m !== void 0 ? _m : 'top']: (_p = (_o = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _o === void 0 ? void 0 : _o.y) !== null && _p !== void 0 ? _p : 0,
|
16814
|
+
zIndex: 10,
|
16815
|
+
border: 'none',
|
16816
|
+
padding: 0,
|
16817
|
+
background: 'transparent'
|
16818
|
+
}, role: 'button', "aria-label": 'back button', onClick: () => history === null || history === void 0 ? void 0 : history.back() },
|
16819
|
+
React.createElement("img", { src: (_r = (_q = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _q === void 0 ? void 0 : _q.icon) !== null && _r !== void 0 ? _r : img, alt: 'back button', width: 50, style: { objectFit: 'cover' } }))),
|
16820
|
+
isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _s !== void 0 ? _s : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
|
16783
16821
|
React.createElement(Swiper, { style: {
|
16784
16822
|
marginTop: tagHeight
|
16785
16823
|
}, ref: swiperRef, onSlideChange: () => {
|
@@ -16811,11 +16849,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16811
16849
|
renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
16812
16850
|
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
16813
16851
|
renderView),
|
16814
|
-
React.createElement(WaterFall$1, Object.assign({}, (
|
16852
|
+
React.createElement(WaterFall$1, Object.assign({}, (_v = (_u = (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _t === void 0 ? void 0 : _t[0]) === null || _u === void 0 ? void 0 : _u.item) === null || _v === void 0 ? void 0 : _v.props))));
|
16815
16853
|
};
|
16816
16854
|
|
16817
16855
|
const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
|
16818
|
-
return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
16856
|
+
return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
16857
|
+
clickable: true,
|
16858
|
+
bulletActiveClass: 'swipe-item-active-bullet',
|
16859
|
+
bulletElement: 'button'
|
16860
|
+
}, height: height, style: { width }, loop: true, autoplay: false }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
|
16819
16861
|
return (React.createElement(SwiperSlide, { key: url },
|
16820
16862
|
React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
|
16821
16863
|
})));
|