pb-sxp-ui 1.3.3 → 1.3.5

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/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-20 18:29:11
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, _u, _v, _w, _x;
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: (_x = (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
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, _0, _1, _2;
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 = isPost ? (_w = data === null || data === void 0 ? void 0 : data.product) === null || _w === void 0 ? void 0 : _w.remark : (_y = (_x = data === null || data === void 0 ? void 0 : data.video) === null || _x === void 0 ? void 0 : _x.bindProduct) === null || _y === void 0 ? void 0 : _y.remark;
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 && ((_z = product === null || product === void 0 ? void 0 : product.homePage) === null || _z === void 0 ? void 0 : _z.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
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, (_0 = product === null || product === void 0 ? void 0 : product.homePage) === null || _0 === void 0 ? void 0 : _0.map((src) => {
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
- !((_1 = product === null || product === void 0 ? void 0 : product.homePage) === null || _1 === void 0 ? void 0 : _1.length) && (React.createElement("div", { className: css.css({
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,9 +9279,8 @@
9280
9279
  objectFit: 'cover',
9281
9280
  width: '100%',
9282
9281
  height: '100%'
9283
- }), src: (_2 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _2 !== void 0 ? _2 : bottom_image, alt: 'pdp image' }))),
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
- padding: '5px 10px',
9286
9284
  display: 'flex',
9287
9285
  alignItems: 'center',
9288
9286
  position: 'absolute',
@@ -9292,7 +9290,7 @@
9292
9290
  background: '#fff',
9293
9291
  borderRadius: '3px'
9294
9292
  }, onClick: () => setShow3DModal(true) },
9295
- React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } })))),
9293
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '60px' })))),
9296
9294
  renderCommodityGroup(),
9297
9295
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
9298
9296
  renderBtn(),
@@ -9300,11 +9298,11 @@
9300
9298
  React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
9301
9299
  renderBtn()),
9302
9300
  React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
9303
- React.createElement("div", { style: { height: '100vh' } },
9301
+ React.createElement("div", { style: { height: window.innerHeight } },
9304
9302
  React.createElement("iframe", { src: iframeUrl, style: {
9305
9303
  width: '100%',
9306
- height: isTel ? `${664 - 40}px` : `calc(100vh - 40px)`,
9307
- marginTop: '40px',
9304
+ height: isTel ? `${664 - 50}px` : `${window.innerHeight - 50}px`,
9305
+ marginTop: '50px',
9308
9306
  border: 'none'
9309
9307
  } })))));
9310
9308
  };
@@ -9959,7 +9957,7 @@
9959
9957
  ];
9960
9958
 
9961
9959
  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, _4, _5, _6;
9960
+ 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
9961
  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
9962
  React.useState(true);
9965
9963
  const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
@@ -10111,17 +10109,17 @@ Made in Italy` })));
10111
10109
  };
10112
10110
  return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
10113
10111
  }, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
10114
- const iframeUrl = isPost ? (_w = data === null || data === void 0 ? void 0 : data.product) === null || _w === void 0 ? void 0 : _w.remark : (_y = (_x = data === null || data === void 0 ? void 0 : data.video) === null || _x === void 0 ? void 0 : _x.bindProduct) === null || _y === void 0 ? void 0 : _y.remark;
10112
+ const iframeUrl = product === null || product === void 0 ? void 0 : product.remark;
10115
10113
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
10116
10114
  React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
10117
10115
  React.createElement("div", { style: { position: 'relative' } },
10118
- product && ((_z = product === null || product === void 0 ? void 0 : product.homePage) === null || _z === void 0 ? void 0 : _z.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
10116
+ 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
10117
  clickable: true,
10120
10118
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
10121
10119
  clickableClass: getDotsAlign
10122
10120
  }, loop: true, autoplay: {
10123
10121
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
10124
- }, ref: ref }, (_0 = product === null || product === void 0 ? void 0 : product.homePage) === null || _0 === void 0 ? void 0 : _0.map((src) => {
10122
+ }, ref: ref }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
10125
10123
  var _a;
10126
10124
  return (React.createElement(SwiperSlide, { key: src },
10127
10125
  React.createElement("div", { style: {
@@ -10137,7 +10135,7 @@ Made in Italy` })));
10137
10135
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
10138
10136
  }, 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
10137
  }))),
10140
- !((_1 = product === null || product === void 0 ? void 0 : product.homePage) === null || _1 === void 0 ? void 0 : _1.length) && (React.createElement("div", { className: css.css({
10138
+ !((_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
10139
  height,
10142
10140
  width
10143
10141
  }) },
@@ -10145,9 +10143,8 @@ Made in Italy` })));
10145
10143
  objectFit: 'cover',
10146
10144
  width: '100%',
10147
10145
  height: '100%'
10148
- }), src: (_2 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _2 !== void 0 ? _2 : bottom_image, alt: 'pdp image' }))),
10146
+ }), src: (_z = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _z !== void 0 ? _z : bottom_image, alt: 'pdp image' }))),
10149
10147
  (iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
10150
- padding: '5px 10px',
10151
10148
  display: 'flex',
10152
10149
  alignItems: 'center',
10153
10150
  position: 'absolute',
@@ -10157,13 +10154,13 @@ Made in Italy` })));
10157
10154
  background: '#fff',
10158
10155
  borderRadius: '3px'
10159
10156
  }, onClick: () => setShow3DModal(true) },
10160
- React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } })))),
10157
+ React.createElement("img", { src: iframeIcon, alt: '3d', width: '60px' })))),
10161
10158
  renderCommodityGroup(),
10162
10159
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
10163
10160
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
10164
10161
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
10165
10162
  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((_3 = product === null || product === void 0 ? void 0 : product.title) !== null && _3 !== void 0 ? _3 : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
10163
+ __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
10164
  } }),
10168
10165
  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
10166
  __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 +10170,20 @@ Made in Italy` })));
10173
10170
  __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
10174
10171
  } }),
10175
10172
  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((_4 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _4 !== void 0 ? _4 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
10173
+ __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
10174
  } }))),
10178
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_5 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _5 !== void 0 ? _5 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
10175
+ (!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
10176
  React.createElement("span", { dangerouslySetInnerHTML: {
10180
- __html: setFontForText((_6 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _6 !== void 0 ? _6 : 'Shop now', buttonStyle)
10177
+ __html: setFontForText((_3 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _3 !== void 0 ? _3 : 'Shop now', buttonStyle)
10181
10178
  } }))),
10182
10179
  productInfoText({ isPost }))),
10183
10180
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
10184
10181
  React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
10185
- React.createElement("div", { style: { height: '100vh' } },
10182
+ React.createElement("div", { style: { height: window.innerHeight } },
10186
10183
  React.createElement("iframe", { src: iframeUrl, style: {
10187
10184
  width: '100%',
10188
- height: isTel ? `${664 - 40}px` : `calc(100vh - 40px)`,
10189
- marginTop: '40px',
10185
+ height: isTel ? `${664 - 50}px` : `${window.innerHeight - 50}px`,
10186
+ marginTop: '50px',
10190
10187
  border: 'none'
10191
10188
  } })))));
10192
10189
  };
@@ -16022,7 +16019,7 @@ Made in Italy` })));
16022
16019
  * @Author: binruan@chatlabs.com
16023
16020
  * @Date: 2024-01-15 19:03:09
16024
16021
  * @LastEditors: binruan@chatlabs.com
16025
- * @LastEditTime: 2024-08-22 17:50:06
16022
+ * @LastEditTime: 2024-08-22 18:34:01
16026
16023
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16027
16024
  *
16028
16025
  */
@@ -16198,7 +16195,7 @@ Made in Italy` })));
16198
16195
  return null;
16199
16196
  }
16200
16197
  });
16201
- return !waterFallData && !isEditor ? list.concat([{ loading: true }]) : list;
16198
+ return !waterFallData ? list.concat([{ loading: true }]) : list;
16202
16199
  }, [data, activeIndex, waterFallData, isEditor]);
16203
16200
  const renderLogo = React.useMemo(() => {
16204
16201
  var _a, _b, _c, _d;