pb-sxp-ui 1.3.2 → 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 +59 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +59 -50
- 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 +59 -50
- 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 +6 -2
- package/es/core/context/SxpDataSourceProvider.js +13 -7
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +15 -15
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +19 -19
- package/es/materials/sxp/popup/Iframe/index.js +1 -1
- package/lib/core/components/SxpPageRender/Modal/index.js +2 -3
- package/lib/core/components/SxpPageRender/index.js +6 -2
- package/lib/core/context/SxpDataSourceProvider.js +13 -7
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +15 -15
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +19 -19
- package/lib/materials/sxp/popup/Iframe/index.js +1 -1
- package/package.json +1 -1
@@ -14,8 +14,8 @@ const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/componen
|
|
14
14
|
const tool_1 = require("../../../../core/utils/tool");
|
15
15
|
const CommodityGroup_1 = tslib_1.__importDefault(require("../../template/components/CommodityGroup"));
|
16
16
|
const CommodityDetailDiroNew = (_a) => {
|
17
|
-
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
|
18
|
-
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio"]);
|
17
|
+
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;
|
18
|
+
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel"]);
|
19
19
|
const [spread, setSpread] = (0, react_1.useState)(true);
|
20
20
|
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = (0, hooks_1.useSxpDataSource)();
|
21
21
|
const { jumpToWeb, productView } = (0, useEventReport_1.useEventReport)();
|
@@ -119,17 +119,17 @@ Made in Italy` })));
|
|
119
119
|
};
|
120
120
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
121
121
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
122
|
-
const iframeUrl =
|
122
|
+
const iframeUrl = product === null || product === void 0 ? void 0 : product.remark;
|
123
123
|
return (react_1.default.createElement("div", { className: 'pb-commondityDiroNew' },
|
124
124
|
react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
|
125
125
|
react_1.default.createElement("div", { style: { position: 'relative' } },
|
126
|
-
product && ((
|
126
|
+
product && ((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) > 0 && (react_1.default.createElement(react_2.Swiper, { height: height, modules: [modules_1.Pagination, modules_1.Autoplay], pagination: {
|
127
127
|
clickable: true,
|
128
128
|
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
129
129
|
clickableClass: getDotsAlign
|
130
130
|
}, loop: true, autoplay: {
|
131
131
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
132
|
-
}, ref: ref }, (
|
132
|
+
}, ref: ref }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
|
133
133
|
var _a;
|
134
134
|
return (react_1.default.createElement(react_2.SwiperSlide, { key: src },
|
135
135
|
react_1.default.createElement("div", { style: {
|
@@ -145,7 +145,7 @@ Made in Italy` })));
|
|
145
145
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
146
146
|
}, 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 }))));
|
147
147
|
}))),
|
148
|
-
!((
|
148
|
+
!((_y = product === null || product === void 0 ? void 0 : product.homePage) === null || _y === void 0 ? void 0 : _y.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
|
149
149
|
height,
|
150
150
|
width
|
151
151
|
}) },
|
@@ -153,7 +153,7 @@ Made in Italy` })));
|
|
153
153
|
objectFit: 'cover',
|
154
154
|
width: '100%',
|
155
155
|
height: '100%'
|
156
|
-
}), src: (
|
156
|
+
}), src: (_z = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _z !== void 0 ? _z : bottom_image, alt: 'pdp image' }))),
|
157
157
|
(iframeUrl || !product) && iframeIcon && (react_1.default.createElement("div", { style: {
|
158
158
|
padding: '5px 10px',
|
159
159
|
display: 'flex',
|
@@ -165,14 +165,13 @@ Made in Italy` })));
|
|
165
165
|
background: '#fff',
|
166
166
|
borderRadius: '3px'
|
167
167
|
}, onClick: () => setShow3DModal(true) },
|
168
|
-
react_1.default.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px'
|
169
|
-
react_1.default.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D")))),
|
168
|
+
react_1.default.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px' })))),
|
170
169
|
renderCommodityGroup(),
|
171
170
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
172
171
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
173
172
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
174
173
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
|
175
|
-
__html: (0, tool_1.setFontForText)((
|
174
|
+
__html: (0, tool_1.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)
|
176
175
|
} }),
|
177
176
|
react_1.default.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: {
|
178
177
|
__html: (0, tool_1.setFontForText)((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
@@ -182,20 +181,21 @@ Made in Italy` })));
|
|
182
181
|
__html: (0, tool_1.setFontForText)(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
183
182
|
} }),
|
184
183
|
react_1.default.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: {
|
185
|
-
__html: (0, tool_1.setFontForText)((
|
184
|
+
__html: (0, tool_1.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)
|
186
185
|
} }))),
|
187
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { "aria-label": (
|
186
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.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 },
|
188
187
|
react_1.default.createElement("span", { dangerouslySetInnerHTML: {
|
189
|
-
__html: (0, tool_1.setFontForText)((
|
188
|
+
__html: (0, tool_1.setFontForText)((_3 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _3 !== void 0 ? _3 : 'Shop now', buttonStyle)
|
190
189
|
} }))),
|
191
190
|
productInfoText({ isPost }))),
|
192
191
|
react_1.default.createElement(Modal_1.default, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
|
193
192
|
react_1.default.createElement(Modal_1.default, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
|
194
|
-
react_1.default.createElement("
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
193
|
+
react_1.default.createElement("div", { style: { height: window.innerHeight } },
|
194
|
+
react_1.default.createElement("iframe", { src: iframeUrl, style: {
|
195
|
+
width: '100%',
|
196
|
+
height: isTel ? `${664 - 50}px` : `${window.innerHeight - 50}px`,
|
197
|
+
marginTop: '50px',
|
198
|
+
border: 'none'
|
199
|
+
} })))));
|
200
200
|
};
|
201
201
|
exports.default = (0, react_1.memo)(CommodityDetailDiroNew);
|
@@ -10,7 +10,7 @@ const Iframe = (_a) => {
|
|
10
10
|
var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle, contentStyle, isTel } = _a, props = tslib_1.__rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle", "contentStyle", "isTel"]);
|
11
11
|
const { popupDetailData } = (0, hooks_1.useSxpDataSource)();
|
12
12
|
const iframeUrl = (_c = (_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.video) === null || _b === void 0 ? void 0 : _b.bindCta) === null || _c === void 0 ? void 0 : _c.remark;
|
13
|
-
return (react_1.default.createElement("div", Object.assign({ className: `${(0, css_1.css)(Object.assign(Object.assign({}, style), { height: isTel ? 664 :
|
13
|
+
return (react_1.default.createElement("div", Object.assign({ className: `${(0, css_1.css)(Object.assign(Object.assign({}, style), { height: isTel ? 664 : window === null || window === void 0 ? void 0 : window.innerHeight }))}` }, props),
|
14
14
|
react_1.default.createElement("iframe", { src: iframeUrl, style: {
|
15
15
|
width: '100%',
|
16
16
|
height: 'calc(100% - 50px)',
|