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.css
CHANGED
@@ -1842,6 +1842,10 @@ button.swiper-pagination-bullet {
|
|
1842
1842
|
font-size: 14px;
|
1843
1843
|
text-wrap: nowrap;
|
1844
1844
|
white-space: nowrap;
|
1845
|
+
padding: 0;
|
1846
|
+
border: none;
|
1847
|
+
background: transparent;
|
1848
|
+
font-family: inherit;
|
1845
1849
|
}
|
1846
1850
|
.clc-sxp-tagbar-list-item-active {
|
1847
1851
|
position: relative;
|
@@ -1856,7 +1860,7 @@ button.swiper-pagination-bullet {
|
|
1856
1860
|
height: 1px;
|
1857
1861
|
border-radius: 6px;
|
1858
1862
|
width: 18px;
|
1859
|
-
background-color: #000;
|
1863
|
+
background-color: #000 !important;
|
1860
1864
|
}
|
1861
1865
|
.clc-sxp-tagbar::-webkit-scrollbar {
|
1862
1866
|
width: 0;
|
@@ -1934,6 +1938,8 @@ button.swiper-pagination-bullet {
|
|
1934
1938
|
font-size: 10px;
|
1935
1939
|
margin-right: 8px;
|
1936
1940
|
cursor: pointer;
|
1941
|
+
border: none;
|
1942
|
+
font-family: inherit;
|
1937
1943
|
}
|
1938
1944
|
.clc-sxp-bottom-shadow {
|
1939
1945
|
background: repeating-linear-gradient(0deg, rgba(26, 26, 25, 0.7), hsla(0, 0%, 100%, 0));
|
@@ -1943,6 +1949,7 @@ button.swiper-pagination-bullet {
|
|
1943
1949
|
width: 100%;
|
1944
1950
|
will-change: transform;
|
1945
1951
|
z-index: 2;
|
1952
|
+
pointer-events: none;
|
1946
1953
|
}
|
1947
1954
|
.clc-sxp-nav {
|
1948
1955
|
display: -webkit-box;
|
@@ -1970,6 +1977,12 @@ button.swiper-pagination-bullet {
|
|
1970
1977
|
width: 20px;
|
1971
1978
|
height: 20px;
|
1972
1979
|
cursor: pointer;
|
1980
|
+
border: none;
|
1981
|
+
padding: 0;
|
1982
|
+
background: transparent;
|
1983
|
+
}
|
1984
|
+
.clc-sxp-nav-left img {
|
1985
|
+
width: 100%;
|
1973
1986
|
}
|
1974
1987
|
.clc-sxp-nav-title {
|
1975
1988
|
font-size: 16px;
|
@@ -2029,6 +2042,9 @@ button.swiper-pagination-bullet {
|
|
2029
2042
|
right: 15px;
|
2030
2043
|
top: 15px;
|
2031
2044
|
z-index: 999 !important;
|
2045
|
+
border: none;
|
2046
|
+
padding: 0;
|
2047
|
+
background: transparent;
|
2032
2048
|
}
|
2033
2049
|
.modal-icon {
|
2034
2050
|
width: 100%;
|
package/dist/index.js
CHANGED
@@ -852,18 +852,21 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
852
852
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
853
853
|
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);
|
854
854
|
let fromKName = '';
|
855
|
+
let contentFormat = null;
|
855
856
|
if (isFromHashtag) {
|
856
857
|
fromKName = 'hashTagPage';
|
857
858
|
}
|
858
859
|
else if ((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.url) {
|
859
860
|
fromKName = 'videoPage';
|
861
|
+
contentFormat = 'video';
|
860
862
|
}
|
861
863
|
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) {
|
862
864
|
fromKName = 'imagePage';
|
865
|
+
contentFormat = 'image';
|
863
866
|
}
|
864
867
|
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;
|
865
868
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
866
|
-
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 : '' })
|
869
|
+
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 })
|
867
870
|
});
|
868
871
|
}, [bffEventReport, isFromHashtag]);
|
869
872
|
const h5EnterLink = useCallback(() => {
|
@@ -8909,13 +8912,13 @@ SwiperSlide.displayName = 'SwiperSlide';
|
|
8909
8912
|
* @Author: binruan@chatlabs.com
|
8910
8913
|
* @Date: 2023-11-02 18:34:34
|
8911
8914
|
* @LastEditors: binruan@chatlabs.com
|
8912
|
-
* @LastEditTime: 2024-
|
8915
|
+
* @LastEditTime: 2024-10-11 18:18:41
|
8913
8916
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
8914
8917
|
*
|
8915
8918
|
*/
|
8916
8919
|
const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
8917
8920
|
const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
|
8918
|
-
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;
|
8921
|
+
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;
|
8919
8922
|
const touchRef = useRef(null);
|
8920
8923
|
const fTouchRef = useRef(null);
|
8921
8924
|
const touchMoveRef = useRef(null);
|
@@ -9028,9 +9031,9 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
9028
9031
|
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)`,
|
9029
9032
|
height: '100%'
|
9030
9033
|
} },
|
9031
|
-
React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign(Object.assign({ padding, animationDuration: ((
|
9034
|
+
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 && {
|
9032
9035
|
transform: `translateY(${modalTrans}px)`
|
9033
|
-
})), { overflow: 'hidden', borderRadius: `${(
|
9036
|
+
})), { 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) => {
|
9034
9037
|
e.stopPropagation();
|
9035
9038
|
e.preventDefault();
|
9036
9039
|
} }, (isScrollFullScreen && {
|
@@ -9038,13 +9041,13 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
9038
9041
|
onTouchStart: handleTouchStart,
|
9039
9042
|
onTouchEnd: handleTouchEnd
|
9040
9043
|
})),
|
9041
|
-
React.createElement("
|
9042
|
-
React.createElement("img", { src: (
|
9044
|
+
React.createElement("button", { className: 'modal-icon-wrapper', role: 'button', "aria-label": 'close button', onClick: onClose, style: { top: scrollTop } },
|
9045
|
+
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' })),
|
9043
9046
|
React.createElement("div", Object.assign({ ref: ref, style: {
|
9044
9047
|
height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
|
9045
9048
|
overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden',
|
9046
9049
|
zIndex: 1
|
9047
|
-
} }, (((
|
9050
|
+
} }, (((_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) && {
|
9048
9051
|
onScroll: (e) => {
|
9049
9052
|
var _a;
|
9050
9053
|
setScrollTop(15 - ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.scrollTop));
|
@@ -9423,7 +9426,8 @@ const CommodityDetail$1 = (_a) => {
|
|
9423
9426
|
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: {
|
9424
9427
|
clickable: true,
|
9425
9428
|
bulletActiveClass: 'swipe-item-active-bullet',
|
9426
|
-
clickableClass: getDotsAlign
|
9429
|
+
clickableClass: getDotsAlign,
|
9430
|
+
bulletElement: 'button'
|
9427
9431
|
}, loop: true, autoplay: {
|
9428
9432
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9429
9433
|
}, 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) && {
|
@@ -10330,7 +10334,8 @@ Made in Italy` })));
|
|
10330
10334
|
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: {
|
10331
10335
|
clickable: true,
|
10332
10336
|
bulletActiveClass: 'swipe-item-active-bullet',
|
10333
|
-
clickableClass: getDotsAlign
|
10337
|
+
clickableClass: getDotsAlign,
|
10338
|
+
bulletElement: 'button'
|
10334
10339
|
}, loop: true, autoplay: {
|
10335
10340
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
10336
10341
|
}, ref: ref, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
|
@@ -12520,7 +12525,7 @@ var settingRender$3 = [
|
|
12520
12525
|
* @Author: binruan@chatlabs.com
|
12521
12526
|
* @Date: 2023-12-26 16:11:34
|
12522
12527
|
* @LastEditors: binruan@chatlabs.com
|
12523
|
-
* @LastEditTime: 2024-
|
12528
|
+
* @LastEditTime: 2024-10-11 18:22:21
|
12524
12529
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Navbar.tsx
|
12525
12530
|
*
|
12526
12531
|
*/
|
@@ -12528,7 +12533,8 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
|
|
12528
12533
|
var _a;
|
12529
12534
|
const { waterFallData, setOpenHashtag } = useSxpDataSource();
|
12530
12535
|
return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
|
12531
|
-
React.createElement("
|
12536
|
+
React.createElement("button", { className: 'clc-sxp-nav-left', role: 'button', "aria-label": 'back button', onClick: onClose },
|
12537
|
+
React.createElement("img", { src: icon, alt: 'back button' })),
|
12532
12538
|
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: {
|
12533
12539
|
__html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
|
12534
12540
|
} })));
|
@@ -14385,7 +14391,7 @@ function WaterfallList(_a) {
|
|
14385
14391
|
* @Author: binruan@chatlabs.com
|
14386
14392
|
* @Date: 2024-01-10 10:58:24
|
14387
14393
|
* @LastEditors: binruan@chatlabs.com
|
14388
|
-
* @LastEditTime: 2024-
|
14394
|
+
* @LastEditTime: 2024-10-11 13:43:22
|
14389
14395
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
|
14390
14396
|
*
|
14391
14397
|
*/
|
@@ -14437,14 +14443,17 @@ const WaterFall = (props) => {
|
|
14437
14443
|
if (!rec)
|
14438
14444
|
return;
|
14439
14445
|
let fromKName = '';
|
14446
|
+
let contentFormat = null;
|
14440
14447
|
if (isFromHashtag) {
|
14441
14448
|
fromKName = 'hashTagPage';
|
14442
14449
|
}
|
14443
14450
|
else if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
|
14444
14451
|
fromKName = 'videoPage';
|
14452
|
+
contentFormat = 'video';
|
14445
14453
|
}
|
14446
14454
|
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) {
|
14447
14455
|
fromKName = 'imagePage';
|
14456
|
+
contentFormat = 'image';
|
14448
14457
|
}
|
14449
14458
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
14450
14459
|
eventInfo: {
|
@@ -14457,7 +14466,8 @@ const WaterFall = (props) => {
|
|
14457
14466
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
14458
14467
|
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
14459
14468
|
eventSubject: 'clickTagsViewContents',
|
14460
|
-
eventDescription: 'User click tags view contents'
|
14469
|
+
eventDescription: 'User click tags view contents',
|
14470
|
+
contentFormat
|
14461
14471
|
}
|
14462
14472
|
});
|
14463
14473
|
}, [recData, bffEventReport, viewTime, isFromHashtag, cacheActiveIndex]);
|
@@ -15975,7 +15985,7 @@ const Picture = (props) => {
|
|
15975
15985
|
* @Author: lewinlu@chatlabs.com
|
15976
15986
|
* @Date: 2024-01-03 14:39:09
|
15977
15987
|
* @LastEditors: binruan@chatlabs.com
|
15978
|
-
* @LastEditTime: 2024-
|
15988
|
+
* @LastEditTime: 2024-10-10 17:53:30
|
15979
15989
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
|
15980
15990
|
*/
|
15981
15991
|
const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
|
@@ -16008,7 +16018,8 @@ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageE
|
|
16008
16018
|
// }
|
16009
16019
|
return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
16010
16020
|
clickable: true,
|
16011
|
-
bulletActiveClass: 'swipe-item-active-bullet'
|
16021
|
+
bulletActiveClass: 'swipe-item-active-bullet',
|
16022
|
+
bulletElement: 'button'
|
16012
16023
|
}, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
|
16013
16024
|
bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
|
16014
16025
|
fontSize: '14px'
|
@@ -16033,7 +16044,7 @@ var PictureGroup$3 = memo(PictureGroup$2);
|
|
16033
16044
|
* @Author: binruan@chatlabs.com
|
16034
16045
|
* @Date: 2024-01-15 19:03:09
|
16035
16046
|
* @LastEditors: binruan@chatlabs.com
|
16036
|
-
* @LastEditTime: 2024-
|
16047
|
+
* @LastEditTime: 2024-10-11 18:37:55
|
16037
16048
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
|
16038
16049
|
*
|
16039
16050
|
*/
|
@@ -16071,7 +16082,7 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
|
16071
16082
|
return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
16072
16083
|
}, [isShowMore, tags]);
|
16073
16084
|
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` } },
|
16074
|
-
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) },
|
16085
|
+
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 },
|
16075
16086
|
React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
|
16076
16087
|
};
|
16077
16088
|
var Hashtag$1 = memo(Hashtag);
|
@@ -16220,7 +16231,7 @@ const Nudge = ({ nudge }) => {
|
|
16220
16231
|
* @Author: binruan@chatlabs.com
|
16221
16232
|
* @Date: 2024-04-29 16:32:21
|
16222
16233
|
* @LastEditors: binruan@chatlabs.com
|
16223
|
-
* @LastEditTime: 2024-
|
16234
|
+
* @LastEditTime: 2024-10-11 18:59:43
|
16224
16235
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
|
16225
16236
|
*
|
16226
16237
|
*/
|
@@ -16266,8 +16277,8 @@ const Tagbar = ({ tagList = [], setActiveIndex, style }) => {
|
|
16266
16277
|
if (waterFallData || tagList.length <= 0)
|
16267
16278
|
return null;
|
16268
16279
|
return (React.createElement("div", { className: 'clc-sxp-tagbar', style: style },
|
16269
|
-
React.createElement("
|
16270
|
-
return (React.createElement("
|
16280
|
+
React.createElement("div", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
|
16281
|
+
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));
|
16271
16282
|
}))));
|
16272
16283
|
};
|
16273
16284
|
var Tagbar$1 = memo(Tagbar);
|
@@ -16276,12 +16287,12 @@ var Tagbar$1 = memo(Tagbar);
|
|
16276
16287
|
* @Author: binruan@chatlabs.com
|
16277
16288
|
* @Date: 2024-01-15 19:03:09
|
16278
16289
|
* @LastEditors: binruan@chatlabs.com
|
16279
|
-
* @LastEditTime: 2024-
|
16290
|
+
* @LastEditTime: 2024-10-11 18:16:31
|
16280
16291
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16281
16292
|
*
|
16282
16293
|
*/
|
16283
16294
|
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
|
16284
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
16295
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
16285
16296
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
16286
16297
|
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
16287
16298
|
const { schema } = useEditor();
|
@@ -16527,7 +16538,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16527
16538
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
16528
16539
|
return (React.createElement(React.Fragment, null,
|
16529
16540
|
((_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' }),
|
16530
|
-
React.createElement("div", { className: 'clc-sxp-bottom', style: {
|
16541
|
+
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` } },
|
16531
16542
|
React.createElement(Nudge, { nudge: nudge }),
|
16532
16543
|
(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' },
|
16533
16544
|
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
@@ -16590,7 +16601,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16590
16601
|
}
|
16591
16602
|
};
|
16592
16603
|
const handleSlideSkip = (item, position) => {
|
16593
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
16604
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
16594
16605
|
if (isPreview || waterFallData)
|
16595
16606
|
return;
|
16596
16607
|
const t = new Date() - curTime.current;
|
@@ -16598,18 +16609,26 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16598
16609
|
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);
|
16599
16610
|
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]);
|
16600
16611
|
if (link) {
|
16612
|
+
let contentFormat = null;
|
16613
|
+
if ((_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.url) {
|
16614
|
+
contentFormat = 'video';
|
16615
|
+
}
|
16616
|
+
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) {
|
16617
|
+
contentFormat = 'image';
|
16618
|
+
}
|
16601
16619
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
16602
16620
|
eventInfo: {
|
16603
16621
|
eventSubject: 'swipeToWeb',
|
16604
16622
|
eventDescription: 'User swiped to web',
|
16605
|
-
productId: (
|
16606
|
-
productName: (
|
16623
|
+
productId: (_p = product === null || product === void 0 ? void 0 : product.itemId) !== null && _p !== void 0 ? _p : '',
|
16624
|
+
productName: (_q = product === null || product === void 0 ? void 0 : product.title) !== null && _q !== void 0 ? _q : '',
|
16607
16625
|
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
16608
|
-
productCollection: (
|
16626
|
+
productCollection: (_r = product === null || product === void 0 ? void 0 : product.collection) !== null && _r !== void 0 ? _r : '',
|
16609
16627
|
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
16610
16628
|
position: position + '',
|
16611
|
-
contentId: (
|
16612
|
-
traceInfo: (
|
16629
|
+
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 : '',
|
16630
|
+
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 : '',
|
16631
|
+
contentFormat
|
16613
16632
|
}
|
16614
16633
|
});
|
16615
16634
|
skipLinkRef.current = true;
|
@@ -16618,19 +16637,27 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16618
16637
|
}
|
16619
16638
|
};
|
16620
16639
|
const handleScrollEvent = (swiper) => {
|
16621
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
16640
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
16622
16641
|
const item = data[swiper.previousIndex];
|
16623
16642
|
if (!item)
|
16624
16643
|
return;
|
16644
|
+
let contentFormat = null;
|
16645
|
+
if ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) {
|
16646
|
+
contentFormat = 'video';
|
16647
|
+
}
|
16648
|
+
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) {
|
16649
|
+
contentFormat = 'image';
|
16650
|
+
}
|
16625
16651
|
if (swiper.previousIndex - swiper.activeIndex < 0) {
|
16626
16652
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
16627
16653
|
eventInfo: {
|
16628
16654
|
eventSubject: 'scrollDown',
|
16629
16655
|
eventDescription: 'User scroll down',
|
16630
|
-
contentId: (
|
16631
|
-
productId: (
|
16656
|
+
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 : '',
|
16657
|
+
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 : '',
|
16632
16658
|
requestId: null,
|
16633
|
-
traceInfo: (
|
16659
|
+
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 : '',
|
16660
|
+
contentFormat
|
16634
16661
|
}
|
16635
16662
|
});
|
16636
16663
|
// 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
|
@@ -16642,10 +16669,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16642
16669
|
eventInfo: {
|
16643
16670
|
eventSubject: 'scrollUp',
|
16644
16671
|
eventDescription: 'User scroll up',
|
16645
|
-
contentId: (
|
16646
|
-
productId: (
|
16672
|
+
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 : '',
|
16673
|
+
productId: (_o = (_m = item.product) === null || _m === void 0 ? void 0 : _m.itemId) !== null && _o !== void 0 ? _o : '',
|
16647
16674
|
requestId: null,
|
16648
|
-
traceInfo: (
|
16675
|
+
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 : '',
|
16676
|
+
contentFormat
|
16649
16677
|
}
|
16650
16678
|
});
|
16651
16679
|
// 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
|
@@ -16654,7 +16682,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16654
16682
|
// 商品浏览事件
|
16655
16683
|
handleReportProductView(item);
|
16656
16684
|
const curItem = data[swiper.activeIndex];
|
16657
|
-
if (!((
|
16685
|
+
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)) {
|
16658
16686
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
16659
16687
|
eventName: 'ProductView'
|
16660
16688
|
});
|
@@ -16757,7 +16785,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16757
16785
|
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
16758
16786
|
top: minusHeight
|
16759
16787
|
} }),
|
16760
|
-
|
16788
|
+
((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && (React.createElement("button", { style: {
|
16789
|
+
position: 'absolute',
|
16790
|
+
[(_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,
|
16791
|
+
[(_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,
|
16792
|
+
zIndex: 10,
|
16793
|
+
border: 'none',
|
16794
|
+
padding: 0,
|
16795
|
+
background: 'transparent'
|
16796
|
+
}, role: 'button', "aria-label": 'back button', onClick: () => history === null || history === void 0 ? void 0 : history.back() },
|
16797
|
+
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' } }))),
|
16798
|
+
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,
|
16761
16799
|
React.createElement(Swiper, { style: {
|
16762
16800
|
marginTop: tagHeight
|
16763
16801
|
}, ref: swiperRef, onSlideChange: () => {
|
@@ -16789,11 +16827,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16789
16827
|
renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
16790
16828
|
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
16791
16829
|
renderView),
|
16792
|
-
React.createElement(WaterFall$1, Object.assign({}, (
|
16830
|
+
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))));
|
16793
16831
|
};
|
16794
16832
|
|
16795
16833
|
const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
|
16796
|
-
return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
16834
|
+
return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
16835
|
+
clickable: true,
|
16836
|
+
bulletActiveClass: 'swipe-item-active-bullet',
|
16837
|
+
bulletElement: 'button'
|
16838
|
+
}, height: height, style: { width }, loop: true, autoplay: false }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
|
16797
16839
|
return (React.createElement(SwiperSlide, { key: url },
|
16798
16840
|
React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
|
16799
16841
|
})));
|