pb-sxp-ui 1.2.10 → 1.3.1
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 +700 -284
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +62 -2
- package/dist/index.js +700 -284
- 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 +700 -284
- 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/FormatImage.js +1 -1
- package/es/core/components/SxpPageRender/Modal/index.js +34 -20
- package/es/core/components/SxpPageRender/Popup/index.js +2 -2
- package/es/core/components/SxpPageRender/ToggleButton/index.js +4 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +13 -18
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +12 -17
- package/es/core/components/SxpPageRender/index.d.ts +6 -1
- package/es/core/components/SxpPageRender/index.js +73 -42
- package/es/core/components/SxpPageRender/typing.d.ts +2 -0
- package/es/core/context/EditorContext.js +2 -0
- package/es/core/context/SxpDataSourceProvider.d.ts +3 -2
- package/es/core/context/SxpDataSourceProvider.js +53 -33
- package/es/core/hooks/useEventReport.d.ts +1 -1
- package/es/core/hooks/useEventReport.js +10 -9
- package/es/core/utils/tool.d.ts +5 -1
- package/es/core/utils/tool.js +69 -1
- package/es/materials/sxp/popup/AppointForm/settingRender.js +15 -0
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +13 -2
- package/es/materials/sxp/popup/CommodityDetail/index.js +60 -34
- package/es/materials/sxp/popup/CommodityDetail/material.js +4 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -2
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +52 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -2
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +85 -51
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +4 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +28 -2
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +52 -0
- package/es/materials/sxp/popup/CommodityList/settingRender.js +15 -0
- package/es/materials/sxp/popup/Iframe/index.d.ts +16 -0
- package/es/materials/sxp/popup/Iframe/index.js +18 -0
- package/es/materials/sxp/popup/Iframe/material.d.ts +2 -0
- package/es/materials/sxp/popup/Iframe/material.js +21 -0
- package/es/materials/sxp/popup/Iframe/settingRender.d.ts +9 -0
- package/es/materials/sxp/popup/Iframe/settingRender.js +12 -0
- package/es/materials/sxp/popup/Prompt/settingRender.js +16 -1
- package/es/materials/sxp/popup/index.d.ts +1 -0
- package/es/materials/sxp/popup/index.js +1 -0
- package/es/materials/sxp/template/Link/index.js +5 -11
- package/es/materials/sxp/template/Link/interactionRender.d.ts +8 -0
- package/es/materials/sxp/template/Link/interactionRender.js +11 -0
- package/es/materials/sxp/template/Link/material.js +3 -1
- package/es/materials/sxp/template/components/EventProvider.d.ts +3 -2
- package/es/materials/sxp/template/components/EventProvider.js +3 -3
- package/lib/core/components/SxpPageRender/FormatImage.js +1 -1
- package/lib/core/components/SxpPageRender/Modal/index.js +34 -20
- package/lib/core/components/SxpPageRender/Popup/index.js +2 -2
- package/lib/core/components/SxpPageRender/ToggleButton/index.js +3 -0
- package/lib/core/components/SxpPageRender/WaterFall/List.js +13 -18
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +12 -17
- package/lib/core/components/SxpPageRender/index.d.ts +6 -1
- package/lib/core/components/SxpPageRender/index.js +72 -41
- package/lib/core/components/SxpPageRender/typing.d.ts +2 -0
- package/lib/core/context/EditorContext.js +2 -0
- package/lib/core/context/SxpDataSourceProvider.d.ts +3 -2
- package/lib/core/context/SxpDataSourceProvider.js +53 -33
- package/lib/core/hooks/useEventReport.d.ts +1 -1
- package/lib/core/hooks/useEventReport.js +10 -9
- package/lib/core/utils/tool.d.ts +5 -1
- package/lib/core/utils/tool.js +73 -1
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +15 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +13 -2
- package/lib/materials/sxp/popup/CommodityDetail/index.js +60 -34
- package/lib/materials/sxp/popup/CommodityDetail/material.js +4 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -2
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +52 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -2
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +85 -51
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +4 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +28 -2
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +52 -0
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +15 -0
- package/lib/materials/sxp/popup/Iframe/index.d.ts +16 -0
- package/lib/materials/sxp/popup/Iframe/index.js +20 -0
- package/lib/materials/sxp/popup/Iframe/material.d.ts +2 -0
- package/lib/materials/sxp/popup/Iframe/material.js +25 -0
- package/lib/materials/sxp/popup/Iframe/settingRender.d.ts +9 -0
- package/lib/materials/sxp/popup/Iframe/settingRender.js +14 -0
- package/lib/materials/sxp/popup/Prompt/settingRender.js +16 -1
- package/lib/materials/sxp/popup/index.d.ts +1 -0
- package/lib/materials/sxp/popup/index.js +1 -0
- package/lib/materials/sxp/template/Link/index.js +5 -11
- package/lib/materials/sxp/template/Link/interactionRender.d.ts +8 -0
- package/lib/materials/sxp/template/Link/interactionRender.js +13 -0
- package/lib/materials/sxp/template/Link/material.js +3 -1
- package/lib/materials/sxp/template/components/EventProvider.d.ts +3 -2
- package/lib/materials/sxp/template/components/EventProvider.js +3 -3
- package/package.json +1 -1
@@ -1,6 +1,17 @@
|
|
1
1
|
declare const _default: ({
|
2
2
|
title: string;
|
3
3
|
child: ({
|
4
|
+
type: string;
|
5
|
+
label: string;
|
6
|
+
child: {
|
7
|
+
type: string;
|
8
|
+
name: string[];
|
9
|
+
addonAfter: string;
|
10
|
+
}[];
|
11
|
+
options?: undefined;
|
12
|
+
name?: undefined;
|
13
|
+
addonAfter?: undefined;
|
14
|
+
} | {
|
4
15
|
type: string;
|
5
16
|
label: string;
|
6
17
|
options: {
|
@@ -8,15 +19,15 @@ declare const _default: ({
|
|
8
19
|
value: string;
|
9
20
|
}[];
|
10
21
|
name: string[];
|
11
|
-
addonAfter?: undefined;
|
12
22
|
child?: undefined;
|
23
|
+
addonAfter?: undefined;
|
13
24
|
} | {
|
14
25
|
type: string;
|
15
26
|
name: string[];
|
16
27
|
addonAfter: string;
|
17
28
|
label?: undefined;
|
18
|
-
options?: undefined;
|
19
29
|
child?: undefined;
|
30
|
+
options?: undefined;
|
20
31
|
} | {
|
21
32
|
type: string;
|
22
33
|
child: {
|
@@ -136,6 +147,13 @@ declare const _default: ({
|
|
136
147
|
options?: undefined;
|
137
148
|
initialValue?: undefined;
|
138
149
|
child?: undefined;
|
150
|
+
} | {
|
151
|
+
label: string;
|
152
|
+
type: string;
|
153
|
+
name: string[];
|
154
|
+
initialValue: boolean;
|
155
|
+
options?: undefined;
|
156
|
+
child?: undefined;
|
139
157
|
})[];
|
140
158
|
}[];
|
141
159
|
} | {
|
@@ -201,5 +219,13 @@ declare const _default: ({
|
|
201
219
|
initialValue?: undefined;
|
202
220
|
child?: undefined;
|
203
221
|
})[];
|
222
|
+
} | {
|
223
|
+
title: string;
|
224
|
+
child: {
|
225
|
+
label: string;
|
226
|
+
type: string;
|
227
|
+
name: string[];
|
228
|
+
text: string;
|
229
|
+
}[];
|
204
230
|
})[];
|
205
231
|
export default _default;
|
@@ -1,7 +1,38 @@
|
|
1
1
|
export default [
|
2
|
+
{
|
3
|
+
title: '弹窗背景',
|
4
|
+
child: [
|
5
|
+
{
|
6
|
+
type: 'Number',
|
7
|
+
label: '左右边距',
|
8
|
+
name: ['props', 'popupBg', 'horizontalMargin']
|
9
|
+
},
|
10
|
+
{
|
11
|
+
type: 'Number',
|
12
|
+
label: '下边距',
|
13
|
+
name: ['props', 'popupBg', 'bottomMargin']
|
14
|
+
}
|
15
|
+
]
|
16
|
+
},
|
2
17
|
{
|
3
18
|
title: '商品图片',
|
4
19
|
child: [
|
20
|
+
{
|
21
|
+
type: 'Group',
|
22
|
+
label: '宽高比',
|
23
|
+
child: [
|
24
|
+
{
|
25
|
+
type: 'Number',
|
26
|
+
name: ['props', 'commodityImgRatio', 'w'],
|
27
|
+
addonAfter: 'w'
|
28
|
+
},
|
29
|
+
{
|
30
|
+
type: 'Number',
|
31
|
+
name: ['props', 'commodityImgRatio', 'h'],
|
32
|
+
addonAfter: 'h'
|
33
|
+
}
|
34
|
+
]
|
35
|
+
},
|
5
36
|
{
|
6
37
|
type: 'Radius',
|
7
38
|
label: '轮播指示器',
|
@@ -13,6 +44,10 @@ export default [
|
|
13
44
|
{
|
14
45
|
label: '居中',
|
15
46
|
value: 'center'
|
47
|
+
},
|
48
|
+
{
|
49
|
+
label: '居右',
|
50
|
+
value: 'right'
|
16
51
|
}
|
17
52
|
],
|
18
53
|
name: ['props', 'swiper', 'dotsAlign']
|
@@ -177,6 +212,12 @@ export default [
|
|
177
212
|
{
|
178
213
|
label: '间距',
|
179
214
|
type: 'TextSpace'
|
215
|
+
},
|
216
|
+
{
|
217
|
+
label: '价格千分符展示',
|
218
|
+
type: 'Switch',
|
219
|
+
name: ['enableFormattedPrice'],
|
220
|
+
initialValue: true
|
180
221
|
}
|
181
222
|
]
|
182
223
|
}
|
@@ -269,5 +310,16 @@ export default [
|
|
269
310
|
name: ['props', 'buttonStyle']
|
270
311
|
}
|
271
312
|
]
|
313
|
+
},
|
314
|
+
{
|
315
|
+
title: 'Iframe商品弹窗',
|
316
|
+
child: [
|
317
|
+
{
|
318
|
+
label: '弹窗按钮',
|
319
|
+
type: 'Upload',
|
320
|
+
name: ['props', 'iframeIcon'],
|
321
|
+
text: '建议尺寸:106 * 41'
|
322
|
+
}
|
323
|
+
]
|
272
324
|
}
|
273
325
|
];
|
@@ -18,14 +18,16 @@ export interface ICommodityDetailDiroNewProps {
|
|
18
18
|
unfoldText?: string;
|
19
19
|
};
|
20
20
|
swiper: {
|
21
|
-
dotsAlign: 'left' | 'center';
|
21
|
+
dotsAlign: 'left' | 'center' | 'right';
|
22
22
|
delay: number;
|
23
23
|
translateY?: number;
|
24
24
|
};
|
25
25
|
commodityStyles?: {
|
26
26
|
title: CSSProperties;
|
27
27
|
collection: CSSProperties;
|
28
|
-
price: CSSProperties
|
28
|
+
price: CSSProperties & {
|
29
|
+
enableFormattedPrice?: boolean;
|
30
|
+
};
|
29
31
|
taxInfo: CSSProperties;
|
30
32
|
info: CSSProperties;
|
31
33
|
};
|
@@ -36,6 +38,15 @@ export interface ICommodityDetailDiroNewProps {
|
|
36
38
|
translateY?: number;
|
37
39
|
style?: CSSProperties;
|
38
40
|
};
|
41
|
+
popupBg?: {
|
42
|
+
horizontalMargin?: number;
|
43
|
+
bottomMargin?: number;
|
44
|
+
};
|
45
|
+
iframeIcon?: string;
|
46
|
+
commodityImgRatio?: {
|
47
|
+
w: number;
|
48
|
+
h: number;
|
49
|
+
};
|
39
50
|
}
|
40
51
|
declare const _default: React.NamedExoticComponent<ICommodityDetailDiroNewProps>;
|
41
52
|
export default _default;
|
@@ -12,8 +12,8 @@ import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
|
|
12
12
|
import { setFontForText } from '../../../../core/utils/tool';
|
13
13
|
import CommodityGroup from '../../template/components/CommodityGroup';
|
14
14
|
const CommodityDetailDiroNew = (_a) => {
|
15
|
-
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;
|
16
|
-
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
|
15
|
+
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, _7, _8, _9;
|
16
|
+
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio"]);
|
17
17
|
const [spread, setSpread] = useState(true);
|
18
18
|
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
19
19
|
const { jumpToWeb, productView } = useEventReport();
|
@@ -22,7 +22,9 @@ const CommodityDetailDiroNew = (_a) => {
|
|
22
22
|
const [isTop, setIsTop] = useState(true);
|
23
23
|
const [showModal, setShowModal] = useState(false);
|
24
24
|
const curTimeRef = useRef(null);
|
25
|
+
const [show3DModal, setShow3DModal] = useState(false);
|
25
26
|
const [checkCommodityIndex, setCheckCommodityIndex] = useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
27
|
+
const ref = useRef();
|
26
28
|
const data = isPost ? rec : popupDetailData;
|
27
29
|
let product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_d = (_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct) !== null && _d !== void 0 ? _d : (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProducts) === null || _f === void 0 ? void 0 : _f[0];
|
28
30
|
let cta = isPost
|
@@ -62,17 +64,21 @@ const CommodityDetailDiroNew = (_a) => {
|
|
62
64
|
};
|
63
65
|
}, []);
|
64
66
|
const priceText = useMemo(() => {
|
65
|
-
var _a, _b, _c, _d, _e;
|
67
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
68
|
+
const isToLocStr = ((_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
|
66
69
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
67
|
-
return `${(
|
68
|
-
|
69
|
-
|
70
|
+
return `${(_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.currency) === null || _c === void 0 ? void 0 : _c.split('-')[1]) === null || _d === void 0 ? void 0 : _d.toUpperCase()) !== null && _e !== void 0 ? _e : ''}${isToLocStr
|
71
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
72
|
+
minimumFractionDigits: 0
|
73
|
+
})) !== null && _g !== void 0 ? _g : ''
|
74
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
70
75
|
}
|
71
76
|
else {
|
72
77
|
return '£102,300.00';
|
73
78
|
}
|
74
|
-
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
75
|
-
const width = isPreview ? 375 : (
|
79
|
+
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency, (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice]);
|
80
|
+
const width = (isPreview ? 375 : (_u = style === null || style === void 0 ? void 0 : style.width) !== null && _u !== void 0 ? _u : window.innerWidth) - ((_v = popupBg === null || popupBg === void 0 ? void 0 : popupBg.horizontalMargin) !== null && _v !== void 0 ? _v : 0) * 2;
|
81
|
+
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
76
82
|
const handleClickCollapse = () => {
|
77
83
|
setSpread(!spread);
|
78
84
|
};
|
@@ -92,6 +98,10 @@ Made in Italy` })));
|
|
92
98
|
popupCurTimeRef.current = new Date();
|
93
99
|
setCheckCommodityIndex(index);
|
94
100
|
checkCommodityIndexRef.current = index;
|
101
|
+
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
102
|
+
ref.current.swiper.slideTo(0);
|
103
|
+
ref.current.swiper.autoplay.start();
|
104
|
+
}
|
95
105
|
}, []);
|
96
106
|
const renderCommodityGroup = useCallback(() => {
|
97
107
|
var _a, _b, _c;
|
@@ -99,52 +109,69 @@ Made in Italy` })));
|
|
99
109
|
return;
|
100
110
|
return (React.createElement(CommodityGroup, { products: (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts, data: commodityGroup, defImg: (_c = (_b = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _b !== void 0 ? _b : bottom_image) !== null && _c !== void 0 ? _c : '', style: { padding: '0 19px' }, onCLick: handleClick, popupDetailData: popupDetailData, check: checkCommodityIndex }));
|
101
111
|
}, [checkCommodityIndex]);
|
112
|
+
const getDotsAlign = useMemo(() => {
|
113
|
+
const dotsAlignClass = {
|
114
|
+
left: 'commondityDetail-swiper-clickable-left',
|
115
|
+
center: 'commondityDetail-swiper-clickable-center',
|
116
|
+
right: 'commondityDetail-swiper-clickable-right'
|
117
|
+
};
|
118
|
+
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
119
|
+
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
120
|
+
const iframeUrl = ((_x = (_w = data === null || data === void 0 ? void 0 : data.video) === null || _w === void 0 ? void 0 : _w.bindProduct) === null || _x === void 0 ? void 0 : _x.remark) || ((_0 = (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProducts) === null || _z === void 0 ? void 0 : _z[0]) === null || _0 === void 0 ? void 0 : _0.remark) || ((_1 = data === null || data === void 0 ? void 0 : data.product) === null || _1 === void 0 ? void 0 : _1.remark);
|
102
121
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
103
122
|
React.createElement("div", Object.assign({ className: css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
123
|
+
React.createElement("div", { style: { position: 'relative' } },
|
124
|
+
product && ((_2 = product === null || product === void 0 ? void 0 : product.homePage) === null || _2 === void 0 ? void 0 : _2.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
|
125
|
+
clickable: true,
|
126
|
+
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
127
|
+
clickableClass: getDotsAlign
|
128
|
+
}, loop: true, autoplay: {
|
129
|
+
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
130
|
+
}, ref: ref }, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
|
131
|
+
var _a;
|
132
|
+
return (React.createElement(SwiperSlide, { key: src },
|
133
|
+
React.createElement("div", { style: {
|
134
|
+
overflow: 'hidden',
|
135
|
+
width,
|
136
|
+
height
|
137
|
+
} },
|
138
|
+
React.createElement(FormatImage, { style: {
|
139
|
+
height: '100%',
|
140
|
+
width: '100%',
|
141
|
+
objectFit: 'cover',
|
142
|
+
display: 'block',
|
143
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
144
|
+
}, 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 }))));
|
145
|
+
}))),
|
146
|
+
!((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css({
|
147
|
+
height,
|
148
|
+
width
|
149
|
+
}) },
|
150
|
+
React.createElement("img", { className: css({
|
151
|
+
objectFit: 'cover',
|
152
|
+
width: '100%',
|
153
|
+
height: '100%'
|
154
|
+
}), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
|
155
|
+
(iframeUrl && iframeIcon) ||
|
156
|
+
(!product && iframeIcon && (React.createElement("div", { style: {
|
157
|
+
padding: '5px 10px',
|
158
|
+
display: 'flex',
|
159
|
+
alignItems: 'center',
|
160
|
+
position: 'absolute',
|
161
|
+
right: '10px',
|
162
|
+
bottom: '10px',
|
163
|
+
zIndex: 1,
|
164
|
+
background: '#fff',
|
165
|
+
borderRadius: '3px'
|
166
|
+
}, onClick: () => setShow3DModal(true) },
|
167
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
|
168
|
+
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
|
142
169
|
renderCommodityGroup(),
|
143
170
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
144
171
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
145
172
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
146
173
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
|
147
|
-
__html: setFontForText((
|
174
|
+
__html: setFontForText((_6 = product === null || product === void 0 ? void 0 : product.title) !== null && _6 !== void 0 ? _6 : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
148
175
|
} }),
|
149
176
|
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: {
|
150
177
|
__html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
@@ -154,13 +181,20 @@ Made in Italy` })));
|
|
154
181
|
__html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
155
182
|
} }),
|
156
183
|
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: {
|
157
|
-
__html: setFontForText((
|
184
|
+
__html: setFontForText((_7 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _7 !== void 0 ? _7 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
|
158
185
|
} }))),
|
159
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (
|
186
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_8 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _8 !== void 0 ? _8 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
|
160
187
|
React.createElement("span", { dangerouslySetInnerHTML: {
|
161
|
-
__html: setFontForText((
|
188
|
+
__html: setFontForText((_9 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _9 !== void 0 ? _9 : 'Shop now', buttonStyle)
|
162
189
|
} }))),
|
163
190
|
productInfoText({ isPost }))),
|
164
|
-
React.createElement(Modal, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))
|
191
|
+
React.createElement(Modal, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
|
192
|
+
React.createElement(Modal, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
|
193
|
+
React.createElement("iframe", { src: iframeUrl, style: {
|
194
|
+
width: '100%',
|
195
|
+
height: 'calc(100% - 50px)',
|
196
|
+
marginTop: '40px',
|
197
|
+
border: 'none'
|
198
|
+
} }))));
|
165
199
|
};
|
166
200
|
export default memo(CommodityDetailDiroNew);
|
@@ -1,6 +1,17 @@
|
|
1
1
|
declare const _default: ({
|
2
2
|
title: string;
|
3
3
|
child: ({
|
4
|
+
type: string;
|
5
|
+
label: string;
|
6
|
+
child: {
|
7
|
+
type: string;
|
8
|
+
name: string[];
|
9
|
+
addonAfter: string;
|
10
|
+
}[];
|
11
|
+
options?: undefined;
|
12
|
+
name?: undefined;
|
13
|
+
addonAfter?: undefined;
|
14
|
+
} | {
|
4
15
|
type: string;
|
5
16
|
label: string;
|
6
17
|
options: {
|
@@ -8,15 +19,15 @@ declare const _default: ({
|
|
8
19
|
value: string;
|
9
20
|
}[];
|
10
21
|
name: string[];
|
11
|
-
addonAfter?: undefined;
|
12
22
|
child?: undefined;
|
23
|
+
addonAfter?: undefined;
|
13
24
|
} | {
|
14
25
|
type: string;
|
15
26
|
name: string[];
|
16
27
|
addonAfter: string;
|
17
28
|
label?: undefined;
|
18
|
-
options?: undefined;
|
19
29
|
child?: undefined;
|
30
|
+
options?: undefined;
|
20
31
|
} | {
|
21
32
|
type: string;
|
22
33
|
child: {
|
@@ -124,6 +135,13 @@ declare const _default: ({
|
|
124
135
|
options?: undefined;
|
125
136
|
initialValue?: undefined;
|
126
137
|
child?: undefined;
|
138
|
+
} | {
|
139
|
+
label: string;
|
140
|
+
type: string;
|
141
|
+
name: string[];
|
142
|
+
initialValue: boolean;
|
143
|
+
options?: undefined;
|
144
|
+
child?: undefined;
|
127
145
|
})[];
|
128
146
|
}[];
|
129
147
|
} | {
|
@@ -189,5 +207,13 @@ declare const _default: ({
|
|
189
207
|
initialValue?: undefined;
|
190
208
|
child?: undefined;
|
191
209
|
})[];
|
210
|
+
} | {
|
211
|
+
title: string;
|
212
|
+
child: {
|
213
|
+
label: string;
|
214
|
+
type: string;
|
215
|
+
name: string[];
|
216
|
+
text: string;
|
217
|
+
}[];
|
192
218
|
})[];
|
193
219
|
export default _default;
|
@@ -1,7 +1,38 @@
|
|
1
1
|
export default [
|
2
|
+
{
|
3
|
+
title: '弹窗背景',
|
4
|
+
child: [
|
5
|
+
{
|
6
|
+
type: 'Number',
|
7
|
+
label: '左右边距',
|
8
|
+
name: ['props', 'popupBg', 'horizontalMargin']
|
9
|
+
},
|
10
|
+
{
|
11
|
+
type: 'Number',
|
12
|
+
label: '下边距',
|
13
|
+
name: ['props', 'popupBg', 'bottomMargin']
|
14
|
+
}
|
15
|
+
]
|
16
|
+
},
|
2
17
|
{
|
3
18
|
title: '商品图片',
|
4
19
|
child: [
|
20
|
+
{
|
21
|
+
type: 'Group',
|
22
|
+
label: '宽高比',
|
23
|
+
child: [
|
24
|
+
{
|
25
|
+
type: 'Number',
|
26
|
+
name: ['props', 'commodityImgRatio', 'w'],
|
27
|
+
addonAfter: 'w'
|
28
|
+
},
|
29
|
+
{
|
30
|
+
type: 'Number',
|
31
|
+
name: ['props', 'commodityImgRatio', 'h'],
|
32
|
+
addonAfter: 'h'
|
33
|
+
}
|
34
|
+
]
|
35
|
+
},
|
5
36
|
{
|
6
37
|
type: 'Radius',
|
7
38
|
label: '轮播指示器',
|
@@ -13,6 +44,10 @@ export default [
|
|
13
44
|
{
|
14
45
|
label: '居中',
|
15
46
|
value: 'center'
|
47
|
+
},
|
48
|
+
{
|
49
|
+
label: '居右',
|
50
|
+
value: 'right'
|
16
51
|
}
|
17
52
|
],
|
18
53
|
name: ['props', 'swiper', 'dotsAlign']
|
@@ -160,6 +195,12 @@ export default [
|
|
160
195
|
{
|
161
196
|
label: '间距',
|
162
197
|
type: 'TextSpace'
|
198
|
+
},
|
199
|
+
{
|
200
|
+
label: '价格千分符展示',
|
201
|
+
type: 'Switch',
|
202
|
+
name: ['enableFormattedPrice'],
|
203
|
+
initialValue: true
|
163
204
|
}
|
164
205
|
]
|
165
206
|
}
|
@@ -252,5 +293,16 @@ export default [
|
|
252
293
|
name: ['props', 'buttonStyle']
|
253
294
|
}
|
254
295
|
]
|
296
|
+
},
|
297
|
+
{
|
298
|
+
title: 'Iframe商品弹窗',
|
299
|
+
child: [
|
300
|
+
{
|
301
|
+
label: '弹窗按钮',
|
302
|
+
type: 'Upload',
|
303
|
+
name: ['props', 'iframeIcon'],
|
304
|
+
text: '建议尺寸:106 * 41'
|
305
|
+
}
|
306
|
+
]
|
255
307
|
}
|
256
308
|
];
|
@@ -1,4 +1,19 @@
|
|
1
1
|
export default [
|
2
|
+
{
|
3
|
+
title: '弹窗背景',
|
4
|
+
child: [
|
5
|
+
{
|
6
|
+
type: 'Number',
|
7
|
+
label: '左右边距',
|
8
|
+
name: ['props', 'popupBg', 'horizontalMargin']
|
9
|
+
},
|
10
|
+
{
|
11
|
+
type: 'Number',
|
12
|
+
label: '下边距',
|
13
|
+
name: ['props', 'popupBg', 'bottomMargin']
|
14
|
+
}
|
15
|
+
]
|
16
|
+
},
|
2
17
|
{
|
3
18
|
title: '商品图片',
|
4
19
|
child: [
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
2
|
+
import './index.less';
|
3
|
+
export interface IIframeProps {
|
4
|
+
content?: string;
|
5
|
+
btnText?: string;
|
6
|
+
style?: Record<string, any>;
|
7
|
+
icon?: Record<string, any> | string;
|
8
|
+
isExternalLink?: boolean;
|
9
|
+
isPopup?: boolean;
|
10
|
+
onClose?: () => void;
|
11
|
+
onClick?: () => void;
|
12
|
+
submitButtonStyle?: CSSProperties;
|
13
|
+
contentStyle?: CSSProperties;
|
14
|
+
}
|
15
|
+
declare const _default: React.NamedExoticComponent<IIframeProps>;
|
16
|
+
export default _default;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { css } from '@emotion/css';
|
3
|
+
import React, { memo } from 'react';
|
4
|
+
import './index.less';
|
5
|
+
import { useSxpDataSource } from '../../../../core/hooks';
|
6
|
+
const Iframe = (_a) => {
|
7
|
+
var _b, _c;
|
8
|
+
var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle, contentStyle } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle", "contentStyle"]);
|
9
|
+
const { popupDetailData } = useSxpDataSource();
|
10
|
+
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;
|
11
|
+
return (React.createElement("div", Object.assign({ className: `${css(Object.assign({}, style))}` }, props), iframeUrl && (React.createElement("iframe", { src: iframeUrl, style: {
|
12
|
+
width: '100%',
|
13
|
+
height: 'calc(100% - 50px)',
|
14
|
+
marginTop: '40px',
|
15
|
+
border: 'none'
|
16
|
+
} }))));
|
17
|
+
};
|
18
|
+
export default memo(Iframe);
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import settingRender from './settingRender';
|
2
|
+
import IframeComponent from '.';
|
3
|
+
import { createMaterial } from '../../../../core/create';
|
4
|
+
const Iframe = createMaterial(IframeComponent, {
|
5
|
+
displayName: 'Iframe弹窗',
|
6
|
+
icon: '',
|
7
|
+
category: 'popup',
|
8
|
+
type: 'Iframe',
|
9
|
+
related: {
|
10
|
+
settingRender,
|
11
|
+
bindableProps: []
|
12
|
+
},
|
13
|
+
defaulSetting: {
|
14
|
+
props: {},
|
15
|
+
style: {}
|
16
|
+
},
|
17
|
+
w: 100,
|
18
|
+
h: 40,
|
19
|
+
sort: 3
|
20
|
+
});
|
21
|
+
export { Iframe };
|