pb-sxp-ui 1.3.3 → 1.3.4
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 +29 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +29 -30
- 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 +29 -30
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/Modal/index.js +2 -3
- package/es/core/components/SxpPageRender/index.js +1 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +10 -10
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +14 -14
- package/lib/core/components/SxpPageRender/Modal/index.js +2 -3
- package/lib/core/components/SxpPageRender/index.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +10 -10
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +14 -14
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -8824,13 +8824,13 @@
|
|
8824
8824
|
* @Author: binruan@chatlabs.com
|
8825
8825
|
* @Date: 2023-11-02 18:34:34
|
8826
8826
|
* @LastEditors: binruan@chatlabs.com
|
8827
|
-
* @LastEditTime: 2024-08-
|
8827
|
+
* @LastEditTime: 2024-08-22 18:48:44
|
8828
8828
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
8829
8829
|
*
|
8830
8830
|
*/
|
8831
8831
|
const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
8832
8832
|
const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
|
8833
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t
|
8833
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
8834
8834
|
const touchRef = React.useRef(null);
|
8835
8835
|
const fTouchRef = React.useRef(null);
|
8836
8836
|
const touchMoveRef = React.useRef(null);
|
@@ -8955,8 +8955,7 @@
|
|
8955
8955
|
React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
|
8956
8956
|
React.createElement("img", { src: (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _t !== void 0 ? _t : closeIcon$1, alt: 'close', className: 'modal-icon' })),
|
8957
8957
|
React.createElement("div", { ref: ref, style: {
|
8958
|
-
height:
|
8959
|
-
((_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.bottomMargin)) !== null && _x !== void 0 ? _x : 0,
|
8958
|
+
height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
|
8960
8959
|
overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
|
8961
8960
|
} }, children)))))), modalEleRef.current);
|
8962
8961
|
};
|
@@ -9124,7 +9123,7 @@
|
|
9124
9123
|
var CommodityGroup$1 = React.memo(CommodityGroup);
|
9125
9124
|
|
9126
9125
|
const CommodityDetail$1 = (_a) => {
|
9127
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z
|
9126
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
9128
9127
|
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel"]);
|
9129
9128
|
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
9130
9129
|
const { jumpToWeb, productView } = useEventReport();
|
@@ -9245,18 +9244,18 @@
|
|
9245
9244
|
};
|
9246
9245
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
9247
9246
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
9248
|
-
const iframeUrl =
|
9247
|
+
const iframeUrl = product === null || product === void 0 ? void 0 : product.remark;
|
9249
9248
|
return (React.createElement(React.Fragment, null,
|
9250
9249
|
React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
|
9251
9250
|
React.createElement("div", { style: { position: 'relative' } },
|
9252
|
-
product && ((
|
9251
|
+
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: {
|
9253
9252
|
clickable: true,
|
9254
9253
|
bulletActiveClass: 'swipe-item-active-bullet',
|
9255
9254
|
clickableClass: getDotsAlign
|
9256
9255
|
}, loop: true, autoplay: {
|
9257
9256
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9258
9257
|
}, ref: ref },
|
9259
|
-
React.createElement(React.Fragment, null, (
|
9258
|
+
React.createElement(React.Fragment, null, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
|
9260
9259
|
var _a;
|
9261
9260
|
return (React.createElement(SwiperSlide, { key: src },
|
9262
9261
|
React.createElement("div", { style: {
|
@@ -9272,7 +9271,7 @@
|
|
9272
9271
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
9273
9272
|
}, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
|
9274
9273
|
})))),
|
9275
|
-
!((
|
9274
|
+
!((_y = product === null || product === void 0 ? void 0 : product.homePage) === null || _y === void 0 ? void 0 : _y.length) && (React.createElement("div", { className: css.css({
|
9276
9275
|
height,
|
9277
9276
|
width
|
9278
9277
|
}) },
|
@@ -9280,7 +9279,7 @@
|
|
9280
9279
|
objectFit: 'cover',
|
9281
9280
|
width: '100%',
|
9282
9281
|
height: '100%'
|
9283
|
-
}), src: (
|
9282
|
+
}), src: (_z = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _z !== void 0 ? _z : bottom_image, alt: 'pdp image' }))),
|
9284
9283
|
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
9285
9284
|
padding: '5px 10px',
|
9286
9285
|
display: 'flex',
|
@@ -9292,7 +9291,7 @@
|
|
9292
9291
|
background: '#fff',
|
9293
9292
|
borderRadius: '3px'
|
9294
9293
|
}, onClick: () => setShow3DModal(true) },
|
9295
|
-
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px'
|
9294
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px' })))),
|
9296
9295
|
renderCommodityGroup(),
|
9297
9296
|
React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
|
9298
9297
|
renderBtn(),
|
@@ -9300,11 +9299,11 @@
|
|
9300
9299
|
React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
|
9301
9300
|
renderBtn()),
|
9302
9301
|
React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
|
9303
|
-
React.createElement("div", { style: { height:
|
9302
|
+
React.createElement("div", { style: { height: window.innerHeight } },
|
9304
9303
|
React.createElement("iframe", { src: iframeUrl, style: {
|
9305
9304
|
width: '100%',
|
9306
|
-
height: isTel ? `${664 -
|
9307
|
-
marginTop: '
|
9305
|
+
height: isTel ? `${664 - 50}px` : `${window.innerHeight - 50}px`,
|
9306
|
+
marginTop: '50px',
|
9308
9307
|
border: 'none'
|
9309
9308
|
} })))));
|
9310
9309
|
};
|
@@ -9959,7 +9958,7 @@
|
|
9959
9958
|
];
|
9960
9959
|
|
9961
9960
|
const CommodityDetailDiroNew$1 = (_a) => {
|
9962
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3
|
9961
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
9963
9962
|
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel"]);
|
9964
9963
|
React.useState(true);
|
9965
9964
|
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
@@ -10111,17 +10110,17 @@ Made in Italy` })));
|
|
10111
10110
|
};
|
10112
10111
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
10113
10112
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
10114
|
-
const iframeUrl =
|
10113
|
+
const iframeUrl = product === null || product === void 0 ? void 0 : product.remark;
|
10115
10114
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
10116
10115
|
React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
|
10117
10116
|
React.createElement("div", { style: { position: 'relative' } },
|
10118
|
-
product && ((
|
10117
|
+
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: {
|
10119
10118
|
clickable: true,
|
10120
10119
|
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
10121
10120
|
clickableClass: getDotsAlign
|
10122
10121
|
}, loop: true, autoplay: {
|
10123
10122
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
10124
|
-
}, ref: ref }, (
|
10123
|
+
}, ref: ref }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
|
10125
10124
|
var _a;
|
10126
10125
|
return (React.createElement(SwiperSlide, { key: src },
|
10127
10126
|
React.createElement("div", { style: {
|
@@ -10137,7 +10136,7 @@ Made in Italy` })));
|
|
10137
10136
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
10138
10137
|
}, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
|
10139
10138
|
}))),
|
10140
|
-
!((
|
10139
|
+
!((_y = product === null || product === void 0 ? void 0 : product.homePage) === null || _y === void 0 ? void 0 : _y.length) && (React.createElement("div", { className: css.css({
|
10141
10140
|
height,
|
10142
10141
|
width
|
10143
10142
|
}) },
|
@@ -10145,7 +10144,7 @@ Made in Italy` })));
|
|
10145
10144
|
objectFit: 'cover',
|
10146
10145
|
width: '100%',
|
10147
10146
|
height: '100%'
|
10148
|
-
}), src: (
|
10147
|
+
}), src: (_z = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _z !== void 0 ? _z : bottom_image, alt: 'pdp image' }))),
|
10149
10148
|
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
10150
10149
|
padding: '5px 10px',
|
10151
10150
|
display: 'flex',
|
@@ -10157,13 +10156,13 @@ Made in Italy` })));
|
|
10157
10156
|
background: '#fff',
|
10158
10157
|
borderRadius: '3px'
|
10159
10158
|
}, onClick: () => setShow3DModal(true) },
|
10160
|
-
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px'
|
10159
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px' })))),
|
10161
10160
|
renderCommodityGroup(),
|
10162
10161
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
10163
10162
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
10164
10163
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
10165
10164
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
|
10166
|
-
__html: setFontForText((
|
10165
|
+
__html: setFontForText((_0 = product === null || product === void 0 ? void 0 : product.title) !== null && _0 !== void 0 ? _0 : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
10167
10166
|
} }),
|
10168
10167
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), dangerouslySetInnerHTML: {
|
10169
10168
|
__html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
@@ -10173,20 +10172,20 @@ Made in Italy` })));
|
|
10173
10172
|
__html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
10174
10173
|
} }),
|
10175
10174
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
|
10176
|
-
__html: setFontForText((
|
10175
|
+
__html: setFontForText((_1 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _1 !== void 0 ? _1 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
|
10177
10176
|
} }))),
|
10178
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (
|
10177
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_2 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _2 !== void 0 ? _2 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
|
10179
10178
|
React.createElement("span", { dangerouslySetInnerHTML: {
|
10180
|
-
__html: setFontForText((
|
10179
|
+
__html: setFontForText((_3 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _3 !== void 0 ? _3 : 'Shop now', buttonStyle)
|
10181
10180
|
} }))),
|
10182
10181
|
productInfoText({ isPost }))),
|
10183
10182
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
|
10184
10183
|
React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
|
10185
|
-
React.createElement("div", { style: { height:
|
10184
|
+
React.createElement("div", { style: { height: window.innerHeight } },
|
10186
10185
|
React.createElement("iframe", { src: iframeUrl, style: {
|
10187
10186
|
width: '100%',
|
10188
|
-
height: isTel ? `${664 -
|
10189
|
-
marginTop: '
|
10187
|
+
height: isTel ? `${664 - 50}px` : `${window.innerHeight - 50}px`,
|
10188
|
+
marginTop: '50px',
|
10190
10189
|
border: 'none'
|
10191
10190
|
} })))));
|
10192
10191
|
};
|
@@ -16022,7 +16021,7 @@ Made in Italy` })));
|
|
16022
16021
|
* @Author: binruan@chatlabs.com
|
16023
16022
|
* @Date: 2024-01-15 19:03:09
|
16024
16023
|
* @LastEditors: binruan@chatlabs.com
|
16025
|
-
* @LastEditTime: 2024-08-22
|
16024
|
+
* @LastEditTime: 2024-08-22 18:34:01
|
16026
16025
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16027
16026
|
*
|
16028
16027
|
*/
|
@@ -16198,7 +16197,7 @@ Made in Italy` })));
|
|
16198
16197
|
return null;
|
16199
16198
|
}
|
16200
16199
|
});
|
16201
|
-
return !waterFallData
|
16200
|
+
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16202
16201
|
}, [data, activeIndex, waterFallData, isEditor]);
|
16203
16202
|
const renderLogo = React.useMemo(() => {
|
16204
16203
|
var _a, _b, _c, _d;
|