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/index.js
CHANGED
@@ -8809,13 +8809,13 @@ SwiperSlide.displayName = 'SwiperSlide';
|
|
8809
8809
|
* @Author: binruan@chatlabs.com
|
8810
8810
|
* @Date: 2023-11-02 18:34:34
|
8811
8811
|
* @LastEditors: binruan@chatlabs.com
|
8812
|
-
* @LastEditTime: 2024-08-
|
8812
|
+
* @LastEditTime: 2024-08-22 18:48:44
|
8813
8813
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
8814
8814
|
*
|
8815
8815
|
*/
|
8816
8816
|
const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
8817
8817
|
const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
|
8818
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t
|
8818
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
8819
8819
|
const touchRef = useRef(null);
|
8820
8820
|
const fTouchRef = useRef(null);
|
8821
8821
|
const touchMoveRef = useRef(null);
|
@@ -8940,8 +8940,7 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
8940
8940
|
React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
|
8941
8941
|
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' })),
|
8942
8942
|
React.createElement("div", { ref: ref, style: {
|
8943
|
-
height:
|
8944
|
-
((_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,
|
8943
|
+
height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
|
8945
8944
|
overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
|
8946
8945
|
} }, children)))))), modalEleRef.current);
|
8947
8946
|
};
|
@@ -9109,7 +9108,7 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
|
|
9109
9108
|
var CommodityGroup$1 = memo(CommodityGroup);
|
9110
9109
|
|
9111
9110
|
const CommodityDetail$1 = (_a) => {
|
9112
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z
|
9111
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
9113
9112
|
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"]);
|
9114
9113
|
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
9115
9114
|
const { jumpToWeb, productView } = useEventReport();
|
@@ -9230,18 +9229,18 @@ const CommodityDetail$1 = (_a) => {
|
|
9230
9229
|
};
|
9231
9230
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
9232
9231
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
9233
|
-
const iframeUrl =
|
9232
|
+
const iframeUrl = product === null || product === void 0 ? void 0 : product.remark;
|
9234
9233
|
return (React.createElement(React.Fragment, null,
|
9235
9234
|
React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
|
9236
9235
|
React.createElement("div", { style: { position: 'relative' } },
|
9237
|
-
product && ((
|
9236
|
+
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: {
|
9238
9237
|
clickable: true,
|
9239
9238
|
bulletActiveClass: 'swipe-item-active-bullet',
|
9240
9239
|
clickableClass: getDotsAlign
|
9241
9240
|
}, loop: true, autoplay: {
|
9242
9241
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9243
9242
|
}, ref: ref },
|
9244
|
-
React.createElement(React.Fragment, null, (
|
9243
|
+
React.createElement(React.Fragment, null, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
|
9245
9244
|
var _a;
|
9246
9245
|
return (React.createElement(SwiperSlide, { key: src },
|
9247
9246
|
React.createElement("div", { style: {
|
@@ -9257,7 +9256,7 @@ const CommodityDetail$1 = (_a) => {
|
|
9257
9256
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
9258
9257
|
}, 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 }))));
|
9259
9258
|
})))),
|
9260
|
-
!((
|
9259
|
+
!((_y = product === null || product === void 0 ? void 0 : product.homePage) === null || _y === void 0 ? void 0 : _y.length) && (React.createElement("div", { className: css({
|
9261
9260
|
height,
|
9262
9261
|
width
|
9263
9262
|
}) },
|
@@ -9265,7 +9264,7 @@ const CommodityDetail$1 = (_a) => {
|
|
9265
9264
|
objectFit: 'cover',
|
9266
9265
|
width: '100%',
|
9267
9266
|
height: '100%'
|
9268
|
-
}), src: (
|
9267
|
+
}), src: (_z = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _z !== void 0 ? _z : bottom_image, alt: 'pdp image' }))),
|
9269
9268
|
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
9270
9269
|
padding: '5px 10px',
|
9271
9270
|
display: 'flex',
|
@@ -9277,7 +9276,7 @@ const CommodityDetail$1 = (_a) => {
|
|
9277
9276
|
background: '#fff',
|
9278
9277
|
borderRadius: '3px'
|
9279
9278
|
}, onClick: () => setShow3DModal(true) },
|
9280
|
-
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px'
|
9279
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px' })))),
|
9281
9280
|
renderCommodityGroup(),
|
9282
9281
|
React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
|
9283
9282
|
renderBtn(),
|
@@ -9285,11 +9284,11 @@ const CommodityDetail$1 = (_a) => {
|
|
9285
9284
|
React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
|
9286
9285
|
renderBtn()),
|
9287
9286
|
React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
|
9288
|
-
React.createElement("div", { style: { height:
|
9287
|
+
React.createElement("div", { style: { height: window.innerHeight } },
|
9289
9288
|
React.createElement("iframe", { src: iframeUrl, style: {
|
9290
9289
|
width: '100%',
|
9291
|
-
height: isTel ? `${664 -
|
9292
|
-
marginTop: '
|
9290
|
+
height: isTel ? `${664 - 50}px` : `${window.innerHeight - 50}px`,
|
9291
|
+
marginTop: '50px',
|
9293
9292
|
border: 'none'
|
9294
9293
|
} })))));
|
9295
9294
|
};
|
@@ -9944,7 +9943,7 @@ var settingRender$7 = [
|
|
9944
9943
|
];
|
9945
9944
|
|
9946
9945
|
const CommodityDetailDiroNew$1 = (_a) => {
|
9947
|
-
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
|
9946
|
+
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;
|
9948
9947
|
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"]);
|
9949
9948
|
useState(true);
|
9950
9949
|
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
@@ -10096,17 +10095,17 @@ Made in Italy` })));
|
|
10096
10095
|
};
|
10097
10096
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
10098
10097
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
10099
|
-
const iframeUrl =
|
10098
|
+
const iframeUrl = product === null || product === void 0 ? void 0 : product.remark;
|
10100
10099
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
10101
10100
|
React.createElement("div", Object.assign({ className: css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
|
10102
10101
|
React.createElement("div", { style: { position: 'relative' } },
|
10103
|
-
product && ((
|
10102
|
+
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: {
|
10104
10103
|
clickable: true,
|
10105
10104
|
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
10106
10105
|
clickableClass: getDotsAlign
|
10107
10106
|
}, loop: true, autoplay: {
|
10108
10107
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
10109
|
-
}, ref: ref }, (
|
10108
|
+
}, ref: ref }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
|
10110
10109
|
var _a;
|
10111
10110
|
return (React.createElement(SwiperSlide, { key: src },
|
10112
10111
|
React.createElement("div", { style: {
|
@@ -10122,7 +10121,7 @@ Made in Italy` })));
|
|
10122
10121
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
10123
10122
|
}, 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 }))));
|
10124
10123
|
}))),
|
10125
|
-
!((
|
10124
|
+
!((_y = product === null || product === void 0 ? void 0 : product.homePage) === null || _y === void 0 ? void 0 : _y.length) && (React.createElement("div", { className: css({
|
10126
10125
|
height,
|
10127
10126
|
width
|
10128
10127
|
}) },
|
@@ -10130,7 +10129,7 @@ Made in Italy` })));
|
|
10130
10129
|
objectFit: 'cover',
|
10131
10130
|
width: '100%',
|
10132
10131
|
height: '100%'
|
10133
|
-
}), src: (
|
10132
|
+
}), src: (_z = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _z !== void 0 ? _z : bottom_image, alt: 'pdp image' }))),
|
10134
10133
|
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
10135
10134
|
padding: '5px 10px',
|
10136
10135
|
display: 'flex',
|
@@ -10142,13 +10141,13 @@ Made in Italy` })));
|
|
10142
10141
|
background: '#fff',
|
10143
10142
|
borderRadius: '3px'
|
10144
10143
|
}, onClick: () => setShow3DModal(true) },
|
10145
|
-
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px'
|
10144
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px' })))),
|
10146
10145
|
renderCommodityGroup(),
|
10147
10146
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
10148
10147
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
10149
10148
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
10150
10149
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
|
10151
|
-
__html: setFontForText((
|
10150
|
+
__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)
|
10152
10151
|
} }),
|
10153
10152
|
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: {
|
10154
10153
|
__html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
@@ -10158,20 +10157,20 @@ Made in Italy` })));
|
|
10158
10157
|
__html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
10159
10158
|
} }),
|
10160
10159
|
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: {
|
10161
|
-
__html: setFontForText((
|
10160
|
+
__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)
|
10162
10161
|
} }))),
|
10163
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (
|
10162
|
+
(!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 },
|
10164
10163
|
React.createElement("span", { dangerouslySetInnerHTML: {
|
10165
|
-
__html: setFontForText((
|
10164
|
+
__html: setFontForText((_3 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _3 !== void 0 ? _3 : 'Shop now', buttonStyle)
|
10166
10165
|
} }))),
|
10167
10166
|
productInfoText({ isPost }))),
|
10168
10167
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
|
10169
10168
|
React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
|
10170
|
-
React.createElement("div", { style: { height:
|
10169
|
+
React.createElement("div", { style: { height: window.innerHeight } },
|
10171
10170
|
React.createElement("iframe", { src: iframeUrl, style: {
|
10172
10171
|
width: '100%',
|
10173
|
-
height: isTel ? `${664 -
|
10174
|
-
marginTop: '
|
10172
|
+
height: isTel ? `${664 - 50}px` : `${window.innerHeight - 50}px`,
|
10173
|
+
marginTop: '50px',
|
10175
10174
|
border: 'none'
|
10176
10175
|
} })))));
|
10177
10176
|
};
|
@@ -16007,7 +16006,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
16007
16006
|
* @Author: binruan@chatlabs.com
|
16008
16007
|
* @Date: 2024-01-15 19:03:09
|
16009
16008
|
* @LastEditors: binruan@chatlabs.com
|
16010
|
-
* @LastEditTime: 2024-08-22
|
16009
|
+
* @LastEditTime: 2024-08-22 18:34:01
|
16011
16010
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16012
16011
|
*
|
16013
16012
|
*/
|
@@ -16183,7 +16182,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16183
16182
|
return null;
|
16184
16183
|
}
|
16185
16184
|
});
|
16186
|
-
return !waterFallData
|
16185
|
+
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16187
16186
|
}, [data, activeIndex, waterFallData, isEditor]);
|
16188
16187
|
const renderLogo = useMemo(() => {
|
16189
16188
|
var _a, _b, _c, _d;
|