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/pb-ui.js
CHANGED
@@ -867,18 +867,21 @@
|
|
867
867
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
868
868
|
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);
|
869
869
|
let fromKName = '';
|
870
|
+
let contentFormat = null;
|
870
871
|
if (isFromHashtag) {
|
871
872
|
fromKName = 'hashTagPage';
|
872
873
|
}
|
873
874
|
else if ((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.url) {
|
874
875
|
fromKName = 'videoPage';
|
876
|
+
contentFormat = 'video';
|
875
877
|
}
|
876
878
|
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) {
|
877
879
|
fromKName = 'imagePage';
|
880
|
+
contentFormat = 'image';
|
878
881
|
}
|
879
882
|
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;
|
880
883
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
881
|
-
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 : '' })
|
884
|
+
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 })
|
882
885
|
});
|
883
886
|
}, [bffEventReport, isFromHashtag]);
|
884
887
|
const h5EnterLink = React.useCallback(() => {
|
@@ -8924,13 +8927,13 @@
|
|
8924
8927
|
* @Author: binruan@chatlabs.com
|
8925
8928
|
* @Date: 2023-11-02 18:34:34
|
8926
8929
|
* @LastEditors: binruan@chatlabs.com
|
8927
|
-
* @LastEditTime: 2024-
|
8930
|
+
* @LastEditTime: 2024-10-11 18:18:41
|
8928
8931
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
8929
8932
|
*
|
8930
8933
|
*/
|
8931
8934
|
const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
8932
8935
|
const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
|
8933
|
-
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;
|
8936
|
+
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;
|
8934
8937
|
const touchRef = React.useRef(null);
|
8935
8938
|
const fTouchRef = React.useRef(null);
|
8936
8939
|
const touchMoveRef = React.useRef(null);
|
@@ -9043,9 +9046,9 @@
|
|
9043
9046
|
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)`,
|
9044
9047
|
height: '100%'
|
9045
9048
|
} },
|
9046
|
-
React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign(Object.assign({ padding, animationDuration: ((
|
9049
|
+
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 && {
|
9047
9050
|
transform: `translateY(${modalTrans}px)`
|
9048
|
-
})), { overflow: 'hidden', borderRadius: `${(
|
9051
|
+
})), { 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) => {
|
9049
9052
|
e.stopPropagation();
|
9050
9053
|
e.preventDefault();
|
9051
9054
|
} }, (isScrollFullScreen && {
|
@@ -9053,13 +9056,13 @@
|
|
9053
9056
|
onTouchStart: handleTouchStart,
|
9054
9057
|
onTouchEnd: handleTouchEnd
|
9055
9058
|
})),
|
9056
|
-
React.createElement("
|
9057
|
-
React.createElement("img", { src: (
|
9059
|
+
React.createElement("button", { className: 'modal-icon-wrapper', role: 'button', "aria-label": 'close button', onClick: onClose, style: { top: scrollTop } },
|
9060
|
+
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' })),
|
9058
9061
|
React.createElement("div", Object.assign({ ref: ref, style: {
|
9059
9062
|
height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
|
9060
9063
|
overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden',
|
9061
9064
|
zIndex: 1
|
9062
|
-
} }, (((
|
9065
|
+
} }, (((_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) && {
|
9063
9066
|
onScroll: (e) => {
|
9064
9067
|
var _a;
|
9065
9068
|
setScrollTop(15 - ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.scrollTop));
|
@@ -9438,7 +9441,8 @@
|
|
9438
9441
|
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: {
|
9439
9442
|
clickable: true,
|
9440
9443
|
bulletActiveClass: 'swipe-item-active-bullet',
|
9441
|
-
clickableClass: getDotsAlign
|
9444
|
+
clickableClass: getDotsAlign,
|
9445
|
+
bulletElement: 'button'
|
9442
9446
|
}, loop: true, autoplay: {
|
9443
9447
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9444
9448
|
}, 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) && {
|
@@ -10345,7 +10349,8 @@ Made in Italy` })));
|
|
10345
10349
|
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: {
|
10346
10350
|
clickable: true,
|
10347
10351
|
bulletActiveClass: 'swipe-item-active-bullet',
|
10348
|
-
clickableClass: getDotsAlign
|
10352
|
+
clickableClass: getDotsAlign,
|
10353
|
+
bulletElement: 'button'
|
10349
10354
|
}, loop: true, autoplay: {
|
10350
10355
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
10351
10356
|
}, ref: ref, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
|
@@ -12535,7 +12540,7 @@ Made in Italy` })));
|
|
12535
12540
|
* @Author: binruan@chatlabs.com
|
12536
12541
|
* @Date: 2023-12-26 16:11:34
|
12537
12542
|
* @LastEditors: binruan@chatlabs.com
|
12538
|
-
* @LastEditTime: 2024-
|
12543
|
+
* @LastEditTime: 2024-10-11 18:22:21
|
12539
12544
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Navbar.tsx
|
12540
12545
|
*
|
12541
12546
|
*/
|
@@ -12543,7 +12548,8 @@ Made in Italy` })));
|
|
12543
12548
|
var _a;
|
12544
12549
|
const { waterFallData, setOpenHashtag } = useSxpDataSource();
|
12545
12550
|
return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
|
12546
|
-
React.createElement("
|
12551
|
+
React.createElement("button", { className: 'clc-sxp-nav-left', role: 'button', "aria-label": 'back button', onClick: onClose },
|
12552
|
+
React.createElement("img", { src: icon, alt: 'back button' })),
|
12547
12553
|
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: {
|
12548
12554
|
__html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
|
12549
12555
|
} })));
|
@@ -14400,7 +14406,7 @@ Made in Italy` })));
|
|
14400
14406
|
* @Author: binruan@chatlabs.com
|
14401
14407
|
* @Date: 2024-01-10 10:58:24
|
14402
14408
|
* @LastEditors: binruan@chatlabs.com
|
14403
|
-
* @LastEditTime: 2024-
|
14409
|
+
* @LastEditTime: 2024-10-11 13:43:22
|
14404
14410
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
|
14405
14411
|
*
|
14406
14412
|
*/
|
@@ -14452,14 +14458,17 @@ Made in Italy` })));
|
|
14452
14458
|
if (!rec)
|
14453
14459
|
return;
|
14454
14460
|
let fromKName = '';
|
14461
|
+
let contentFormat = null;
|
14455
14462
|
if (isFromHashtag) {
|
14456
14463
|
fromKName = 'hashTagPage';
|
14457
14464
|
}
|
14458
14465
|
else if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
|
14459
14466
|
fromKName = 'videoPage';
|
14467
|
+
contentFormat = 'video';
|
14460
14468
|
}
|
14461
14469
|
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) {
|
14462
14470
|
fromKName = 'imagePage';
|
14471
|
+
contentFormat = 'image';
|
14463
14472
|
}
|
14464
14473
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
14465
14474
|
eventInfo: {
|
@@ -14472,7 +14481,8 @@ Made in Italy` })));
|
|
14472
14481
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
14473
14482
|
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
14474
14483
|
eventSubject: 'clickTagsViewContents',
|
14475
|
-
eventDescription: 'User click tags view contents'
|
14484
|
+
eventDescription: 'User click tags view contents',
|
14485
|
+
contentFormat
|
14476
14486
|
}
|
14477
14487
|
});
|
14478
14488
|
}, [recData, bffEventReport, viewTime, isFromHashtag, cacheActiveIndex]);
|
@@ -15990,7 +16000,7 @@ Made in Italy` })));
|
|
15990
16000
|
* @Author: lewinlu@chatlabs.com
|
15991
16001
|
* @Date: 2024-01-03 14:39:09
|
15992
16002
|
* @LastEditors: binruan@chatlabs.com
|
15993
|
-
* @LastEditTime: 2024-
|
16003
|
+
* @LastEditTime: 2024-10-10 17:53:30
|
15994
16004
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
|
15995
16005
|
*/
|
15996
16006
|
const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
|
@@ -16023,7 +16033,8 @@ Made in Italy` })));
|
|
16023
16033
|
// }
|
16024
16034
|
return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
16025
16035
|
clickable: true,
|
16026
|
-
bulletActiveClass: 'swipe-item-active-bullet'
|
16036
|
+
bulletActiveClass: 'swipe-item-active-bullet',
|
16037
|
+
bulletElement: 'button'
|
16027
16038
|
}, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
|
16028
16039
|
bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
|
16029
16040
|
fontSize: '14px'
|
@@ -16048,7 +16059,7 @@ Made in Italy` })));
|
|
16048
16059
|
* @Author: binruan@chatlabs.com
|
16049
16060
|
* @Date: 2024-01-15 19:03:09
|
16050
16061
|
* @LastEditors: binruan@chatlabs.com
|
16051
|
-
* @LastEditTime: 2024-
|
16062
|
+
* @LastEditTime: 2024-10-11 18:37:55
|
16052
16063
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
|
16053
16064
|
*
|
16054
16065
|
*/
|
@@ -16086,7 +16097,7 @@ Made in Italy` })));
|
|
16086
16097
|
return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
16087
16098
|
}, [isShowMore, tags]);
|
16088
16099
|
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` } },
|
16089
|
-
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) },
|
16100
|
+
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 },
|
16090
16101
|
React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
|
16091
16102
|
};
|
16092
16103
|
var Hashtag$1 = React.memo(Hashtag);
|
@@ -16235,7 +16246,7 @@ Made in Italy` })));
|
|
16235
16246
|
* @Author: binruan@chatlabs.com
|
16236
16247
|
* @Date: 2024-04-29 16:32:21
|
16237
16248
|
* @LastEditors: binruan@chatlabs.com
|
16238
|
-
* @LastEditTime: 2024-
|
16249
|
+
* @LastEditTime: 2024-10-11 18:59:43
|
16239
16250
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
|
16240
16251
|
*
|
16241
16252
|
*/
|
@@ -16281,8 +16292,8 @@ Made in Italy` })));
|
|
16281
16292
|
if (waterFallData || tagList.length <= 0)
|
16282
16293
|
return null;
|
16283
16294
|
return (React.createElement("div", { className: 'clc-sxp-tagbar', style: style },
|
16284
|
-
React.createElement("
|
16285
|
-
return (React.createElement("
|
16295
|
+
React.createElement("div", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
|
16296
|
+
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));
|
16286
16297
|
}))));
|
16287
16298
|
};
|
16288
16299
|
var Tagbar$1 = React.memo(Tagbar);
|
@@ -16291,12 +16302,12 @@ Made in Italy` })));
|
|
16291
16302
|
* @Author: binruan@chatlabs.com
|
16292
16303
|
* @Date: 2024-01-15 19:03:09
|
16293
16304
|
* @LastEditors: binruan@chatlabs.com
|
16294
|
-
* @LastEditTime: 2024-
|
16305
|
+
* @LastEditTime: 2024-10-11 18:16:31
|
16295
16306
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16296
16307
|
*
|
16297
16308
|
*/
|
16298
16309
|
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
|
16299
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
16310
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
16300
16311
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
16301
16312
|
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
16302
16313
|
const { schema } = useEditor();
|
@@ -16542,7 +16553,7 @@ Made in Italy` })));
|
|
16542
16553
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
16543
16554
|
return (React.createElement(React.Fragment, null,
|
16544
16555
|
((_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' }),
|
16545
|
-
React.createElement("div", { className: 'clc-sxp-bottom', style: {
|
16556
|
+
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` } },
|
16546
16557
|
React.createElement(Nudge, { nudge: nudge }),
|
16547
16558
|
(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' },
|
16548
16559
|
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
@@ -16605,7 +16616,7 @@ Made in Italy` })));
|
|
16605
16616
|
}
|
16606
16617
|
};
|
16607
16618
|
const handleSlideSkip = (item, position) => {
|
16608
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
16619
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
16609
16620
|
if (isPreview || waterFallData)
|
16610
16621
|
return;
|
16611
16622
|
const t = new Date() - curTime.current;
|
@@ -16613,18 +16624,26 @@ Made in Italy` })));
|
|
16613
16624
|
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);
|
16614
16625
|
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]);
|
16615
16626
|
if (link) {
|
16627
|
+
let contentFormat = null;
|
16628
|
+
if ((_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.url) {
|
16629
|
+
contentFormat = 'video';
|
16630
|
+
}
|
16631
|
+
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) {
|
16632
|
+
contentFormat = 'image';
|
16633
|
+
}
|
16616
16634
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
16617
16635
|
eventInfo: {
|
16618
16636
|
eventSubject: 'swipeToWeb',
|
16619
16637
|
eventDescription: 'User swiped to web',
|
16620
|
-
productId: (
|
16621
|
-
productName: (
|
16638
|
+
productId: (_p = product === null || product === void 0 ? void 0 : product.itemId) !== null && _p !== void 0 ? _p : '',
|
16639
|
+
productName: (_q = product === null || product === void 0 ? void 0 : product.title) !== null && _q !== void 0 ? _q : '',
|
16622
16640
|
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
16623
|
-
productCollection: (
|
16641
|
+
productCollection: (_r = product === null || product === void 0 ? void 0 : product.collection) !== null && _r !== void 0 ? _r : '',
|
16624
16642
|
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
16625
16643
|
position: position + '',
|
16626
|
-
contentId: (
|
16627
|
-
traceInfo: (
|
16644
|
+
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 : '',
|
16645
|
+
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 : '',
|
16646
|
+
contentFormat
|
16628
16647
|
}
|
16629
16648
|
});
|
16630
16649
|
skipLinkRef.current = true;
|
@@ -16633,19 +16652,27 @@ Made in Italy` })));
|
|
16633
16652
|
}
|
16634
16653
|
};
|
16635
16654
|
const handleScrollEvent = (swiper) => {
|
16636
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
16655
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
16637
16656
|
const item = data[swiper.previousIndex];
|
16638
16657
|
if (!item)
|
16639
16658
|
return;
|
16659
|
+
let contentFormat = null;
|
16660
|
+
if ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) {
|
16661
|
+
contentFormat = 'video';
|
16662
|
+
}
|
16663
|
+
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) {
|
16664
|
+
contentFormat = 'image';
|
16665
|
+
}
|
16640
16666
|
if (swiper.previousIndex - swiper.activeIndex < 0) {
|
16641
16667
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
16642
16668
|
eventInfo: {
|
16643
16669
|
eventSubject: 'scrollDown',
|
16644
16670
|
eventDescription: 'User scroll down',
|
16645
|
-
contentId: (
|
16646
|
-
productId: (
|
16671
|
+
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 : '',
|
16672
|
+
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 : '',
|
16647
16673
|
requestId: null,
|
16648
|
-
traceInfo: (
|
16674
|
+
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 : '',
|
16675
|
+
contentFormat
|
16649
16676
|
}
|
16650
16677
|
});
|
16651
16678
|
// 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
|
@@ -16657,10 +16684,11 @@ Made in Italy` })));
|
|
16657
16684
|
eventInfo: {
|
16658
16685
|
eventSubject: 'scrollUp',
|
16659
16686
|
eventDescription: 'User scroll up',
|
16660
|
-
contentId: (
|
16661
|
-
productId: (
|
16687
|
+
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 : '',
|
16688
|
+
productId: (_o = (_m = item.product) === null || _m === void 0 ? void 0 : _m.itemId) !== null && _o !== void 0 ? _o : '',
|
16662
16689
|
requestId: null,
|
16663
|
-
traceInfo: (
|
16690
|
+
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 : '',
|
16691
|
+
contentFormat
|
16664
16692
|
}
|
16665
16693
|
});
|
16666
16694
|
// 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
|
@@ -16669,7 +16697,7 @@ Made in Italy` })));
|
|
16669
16697
|
// 商品浏览事件
|
16670
16698
|
handleReportProductView(item);
|
16671
16699
|
const curItem = data[swiper.activeIndex];
|
16672
|
-
if (!((
|
16700
|
+
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)) {
|
16673
16701
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
16674
16702
|
eventName: 'ProductView'
|
16675
16703
|
});
|
@@ -16772,7 +16800,17 @@ Made in Italy` })));
|
|
16772
16800
|
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
16773
16801
|
top: minusHeight
|
16774
16802
|
} }),
|
16775
|
-
|
16803
|
+
((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && (React.createElement("button", { style: {
|
16804
|
+
position: 'absolute',
|
16805
|
+
[(_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,
|
16806
|
+
[(_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,
|
16807
|
+
zIndex: 10,
|
16808
|
+
border: 'none',
|
16809
|
+
padding: 0,
|
16810
|
+
background: 'transparent'
|
16811
|
+
}, role: 'button', "aria-label": 'back button', onClick: () => history === null || history === void 0 ? void 0 : history.back() },
|
16812
|
+
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' } }))),
|
16813
|
+
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,
|
16776
16814
|
React.createElement(Swiper, { style: {
|
16777
16815
|
marginTop: tagHeight
|
16778
16816
|
}, ref: swiperRef, onSlideChange: () => {
|
@@ -16804,11 +16842,15 @@ Made in Italy` })));
|
|
16804
16842
|
renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
16805
16843
|
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
16806
16844
|
renderView),
|
16807
|
-
React.createElement(WaterFall$1, Object.assign({}, (
|
16845
|
+
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))));
|
16808
16846
|
};
|
16809
16847
|
|
16810
16848
|
const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
|
16811
|
-
return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
16849
|
+
return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
16850
|
+
clickable: true,
|
16851
|
+
bulletActiveClass: 'swipe-item-active-bullet',
|
16852
|
+
bulletElement: 'button'
|
16853
|
+
}, height: height, style: { width }, loop: true, autoplay: false }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
|
16812
16854
|
return (React.createElement(SwiperSlide, { key: url },
|
16813
16855
|
React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
|
16814
16856
|
})));
|