pb-sxp-ui 1.0.3-alpha.4 → 1.0.3
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 +56 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -5
- package/dist/index.js +56 -40
- 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 +56 -40
- 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/Popup/index.js +5 -3
- package/es/core/components/SxpPageRender/RenderCard.js +5 -3
- package/es/core/components/SxpPageRender/index.js +5 -3
- package/es/core/context/EditorContext.js +3 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +1 -1
- package/es/materials/sxp/template/Appoint/material.js +2 -1
- package/es/materials/sxp/template/Commodity/material.js +2 -1
- package/es/materials/sxp/template/CommodityDiro/material.js +2 -1
- package/es/materials/sxp/template/CommodityDiroNew/material.js +4 -3
- package/es/materials/sxp/template/Link/material.js +2 -1
- package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodity/material.js +2 -1
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodityDiro/material.js +2 -1
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -1
- package/es/materials/sxp/template/components/Scroll.d.ts +1 -0
- package/es/materials/sxp/template/components/Scroll.js +2 -2
- package/lib/core/components/SxpPageRender/Popup/index.js +5 -3
- package/lib/core/components/SxpPageRender/RenderCard.js +5 -3
- package/lib/core/components/SxpPageRender/index.js +5 -3
- package/lib/core/context/EditorContext.js +3 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +1 -1
- package/lib/materials/sxp/template/Appoint/material.js +2 -1
- package/lib/materials/sxp/template/Commodity/material.js +2 -1
- package/lib/materials/sxp/template/CommodityDiro/material.js +2 -1
- package/lib/materials/sxp/template/CommodityDiroNew/material.js +4 -3
- package/lib/materials/sxp/template/Link/material.js +2 -1
- package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodity/material.js +2 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodityDiro/material.js +2 -1
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -1
- package/lib/materials/sxp/template/components/Scroll.d.ts +1 -0
- package/lib/materials/sxp/template/components/Scroll.js +2 -2
- package/package.json +1 -1
@@ -45,10 +45,12 @@ const Popup = () => {
|
|
45
45
|
const renderPopupDetail = useMemo(() => {
|
46
46
|
var _a, _b, _c;
|
47
47
|
return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
|
48
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
49
49
|
if ((value === null || value === void 0 ? void 0 : value.id) === popup) {
|
50
|
-
const
|
51
|
-
|
50
|
+
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
51
|
+
const Component = withBindDataSource(t);
|
52
|
+
const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
|
53
|
+
return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.style), { width: '100%', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.textStyle), bindDatas: (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.bindDatas) !== null && _f !== void 0 ? _f : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.props, { event: ((_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id })));
|
52
54
|
}
|
53
55
|
else {
|
54
56
|
return React.createElement(React.Fragment, null);
|
@@ -5,7 +5,7 @@ import { useEditor } from '../../../core/hooks';
|
|
5
5
|
const RenderCard = ({ rec, index, tempMap, resolver }) => {
|
6
6
|
const { schema } = useEditor();
|
7
7
|
const renderComp = useMemo(() => {
|
8
|
-
var _a, _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;
|
8
|
+
var _a, _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;
|
9
9
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
10
10
|
return null;
|
11
11
|
let cta = null;
|
@@ -28,8 +28,10 @@ const RenderCard = ({ rec, index, tempMap, resolver }) => {
|
|
28
28
|
return null;
|
29
29
|
}
|
30
30
|
if (value && resolver) {
|
31
|
-
const
|
32
|
-
|
31
|
+
const t = resolver[(_w = value === null || value === void 0 ? void 0 : value.item) === null || _w === void 0 ? void 0 : _w.type];
|
32
|
+
const Component = withBindDataSource(t);
|
33
|
+
const defaulSetting = (_x = t === null || t === void 0 ? void 0 : t.extend) === null || _x === void 0 ? void 0 : _x.defaulSetting;
|
34
|
+
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec })));
|
33
35
|
}
|
34
36
|
else {
|
35
37
|
return null;
|
@@ -158,9 +158,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
158
158
|
}
|
159
159
|
if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
160
160
|
return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, index) => {
|
161
|
-
var _a, _b, _c, _d, _e, _f;
|
162
|
-
const
|
163
|
-
|
161
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
162
|
+
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
163
|
+
const Component = withBindDataSource(t);
|
164
|
+
const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
|
165
|
+
return (React.createElement(Component, Object.assign({ key: index, textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.textStyle), bindDatas: (_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.bindDatas) !== null && _e !== void 0 ? _e : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.props, { event: ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.style), { height: '100%', overflow: 'auto' }) })));
|
164
166
|
});
|
165
167
|
}
|
166
168
|
return null;
|
@@ -74,7 +74,6 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
|
|
74
74
|
});
|
75
75
|
typeof window !== 'undefined' &&
|
76
76
|
(window.sxpPopup = (type, aniType) => {
|
77
|
-
setPopup(type);
|
78
77
|
if (aniType && (aniType === null || aniType === void 0 ? void 0 : aniType.name) !== 'none') {
|
79
78
|
setPopupAni(Object.assign(Object.assign({}, popupAni), aniType));
|
80
79
|
}
|
@@ -84,6 +83,9 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
|
|
84
83
|
duration: 0
|
85
84
|
});
|
86
85
|
}
|
86
|
+
setTimeout(() => {
|
87
|
+
setPopup(type);
|
88
|
+
});
|
87
89
|
});
|
88
90
|
typeof window !== 'undefined' &&
|
89
91
|
(window.getJointUtmLink = (url) => {
|
@@ -120,8 +120,8 @@ Made in Italy` })));
|
|
120
120
|
}), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
|
121
121
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
122
122
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
123
|
-
React.createElement("div",
|
124
|
-
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
|
123
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
124
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
|
125
125
|
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: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin')),
|
126
126
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
|
127
127
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
|
@@ -22,13 +22,13 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
|
|
22
22
|
marginRight: 16
|
23
23
|
},
|
24
24
|
title: {
|
25
|
-
fontSize:
|
25
|
+
fontSize: 13,
|
26
26
|
color: '#000',
|
27
27
|
textAlign: 'left'
|
28
28
|
},
|
29
29
|
ctaTitle: {
|
30
30
|
textDecoration: 'underline',
|
31
|
-
fontSize:
|
31
|
+
fontSize: 14,
|
32
32
|
fontWeight: 'bold',
|
33
33
|
color: '#000',
|
34
34
|
textAlign: 'left',
|
@@ -42,7 +42,8 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
|
|
42
42
|
width: 260,
|
43
43
|
height: 86,
|
44
44
|
padding: 4,
|
45
|
-
backgroundColor: 'rgba(255,255,255,0.75)'
|
45
|
+
backgroundColor: 'rgba(255,255,255,0.75)',
|
46
|
+
marginBottom: 8
|
46
47
|
}
|
47
48
|
},
|
48
49
|
w: 100,
|
@@ -22,9 +22,9 @@ const MultiCommodity = (_a) => {
|
|
22
22
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
23
23
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
24
24
|
}, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
|
25
|
-
return (React.createElement(Scroll,
|
25
|
+
return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
26
26
|
var _a, _b, _c, _d, _e, _f;
|
27
|
-
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css(Object.assign({
|
27
|
+
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
28
28
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
29
29
|
React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item })),
|
30
30
|
React.createElement("div", { className: css({
|
@@ -21,9 +21,9 @@ const MultiCommodityDiro = (_a) => {
|
|
21
21
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
22
22
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
23
23
|
}, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
|
24
|
-
return (React.createElement(Scroll,
|
24
|
+
return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
25
25
|
var _a, _b, _c, _d, _e, _f;
|
26
|
-
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css(Object.assign({
|
26
|
+
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
27
27
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
28
28
|
React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item })),
|
29
29
|
React.createElement("div", { className: css({
|
@@ -21,9 +21,9 @@ const MultiCommodityDiroNew = (_a) => {
|
|
21
21
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
22
22
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
23
23
|
}, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
|
24
|
-
return (React.createElement(Scroll,
|
24
|
+
return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
25
25
|
var _a, _b, _c, _d, _e, _f;
|
26
|
-
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css(Object.assign({
|
26
|
+
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
27
27
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
28
28
|
React.createElement(Img, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item })),
|
29
29
|
React.createElement("div", { className: css({
|
@@ -4,7 +4,7 @@ import 'swiper/css';
|
|
4
4
|
import 'swiper/css/free-mode';
|
5
5
|
import 'swiper/css/scrollbar';
|
6
6
|
import { FreeMode, Scrollbar, Mousewheel } from 'swiper/modules';
|
7
|
-
const Scroll = ({ children }) => {
|
8
|
-
return (React.createElement(Swiper, { direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [FreeMode, Scrollbar, Mousewheel], style: {
|
7
|
+
const Scroll = ({ children, isPadding = true }) => {
|
8
|
+
return (React.createElement(Swiper, { direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [FreeMode, Scrollbar, Mousewheel], style: { padding: isPadding ? '0 12px 0 20px' : 0 } }, children));
|
9
9
|
};
|
10
10
|
export default memo(Scroll);
|
@@ -48,10 +48,12 @@ const Popup = () => {
|
|
48
48
|
const renderPopupDetail = (0, react_1.useMemo)(() => {
|
49
49
|
var _a, _b, _c;
|
50
50
|
return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
|
51
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
52
52
|
if ((value === null || value === void 0 ? void 0 : value.id) === popup) {
|
53
|
-
const
|
54
|
-
|
53
|
+
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
54
|
+
const Component = (0, withBindDataSource_1.default)(t);
|
55
|
+
const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
|
56
|
+
return (react_1.default.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.style), { width: '100%', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.textStyle), bindDatas: (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.bindDatas) !== null && _f !== void 0 ? _f : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.props, { event: ((_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id })));
|
55
57
|
}
|
56
58
|
else {
|
57
59
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
@@ -8,7 +8,7 @@ const hooks_1 = require("../../../core/hooks");
|
|
8
8
|
const RenderCard = ({ rec, index, tempMap, resolver }) => {
|
9
9
|
const { schema } = (0, hooks_1.useEditor)();
|
10
10
|
const renderComp = (0, react_1.useMemo)(() => {
|
11
|
-
var _a, _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;
|
11
|
+
var _a, _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;
|
12
12
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
13
13
|
return null;
|
14
14
|
let cta = null;
|
@@ -31,8 +31,10 @@ const RenderCard = ({ rec, index, tempMap, resolver }) => {
|
|
31
31
|
return null;
|
32
32
|
}
|
33
33
|
if (value && resolver) {
|
34
|
-
const
|
35
|
-
|
34
|
+
const t = resolver[(_w = value === null || value === void 0 ? void 0 : value.item) === null || _w === void 0 ? void 0 : _w.type];
|
35
|
+
const Component = (0, withBindDataSource_1.default)(t);
|
36
|
+
const defaulSetting = (_x = t === null || t === void 0 ? void 0 : t.extend) === null || _x === void 0 ? void 0 : _x.defaulSetting;
|
37
|
+
return (react_1.default.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec })));
|
36
38
|
}
|
37
39
|
else {
|
38
40
|
return null;
|
@@ -161,9 +161,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
161
161
|
}
|
162
162
|
if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
163
163
|
return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, index) => {
|
164
|
-
var _a, _b, _c, _d, _e, _f;
|
165
|
-
const
|
166
|
-
|
164
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
165
|
+
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
166
|
+
const Component = (0, withBindDataSource_1.default)(t);
|
167
|
+
const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
|
168
|
+
return (react_1.default.createElement(Component, Object.assign({ key: index, textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.textStyle), bindDatas: (_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.bindDatas) !== null && _e !== void 0 ? _e : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.props, { event: ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.style), { height: '100%', overflow: 'auto' }) })));
|
167
169
|
});
|
168
170
|
}
|
169
171
|
return null;
|
@@ -78,7 +78,6 @@ const EditorCore = (0, react_1.forwardRef)(({ children, resolver, isSsr, schema,
|
|
78
78
|
});
|
79
79
|
typeof window !== 'undefined' &&
|
80
80
|
(window.sxpPopup = (type, aniType) => {
|
81
|
-
setPopup(type);
|
82
81
|
if (aniType && (aniType === null || aniType === void 0 ? void 0 : aniType.name) !== 'none') {
|
83
82
|
setPopupAni(Object.assign(Object.assign({}, popupAni), aniType));
|
84
83
|
}
|
@@ -88,6 +87,9 @@ const EditorCore = (0, react_1.forwardRef)(({ children, resolver, isSsr, schema,
|
|
88
87
|
duration: 0
|
89
88
|
});
|
90
89
|
}
|
90
|
+
setTimeout(() => {
|
91
|
+
setPopup(type);
|
92
|
+
});
|
91
93
|
});
|
92
94
|
typeof window !== 'undefined' &&
|
93
95
|
(window.getJointUtmLink = (url) => {
|
@@ -122,8 +122,8 @@ Made in Italy` })));
|
|
122
122
|
}), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
|
123
123
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
124
124
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
125
|
-
react_1.default.createElement("div",
|
126
|
-
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
|
125
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
126
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
|
127
127
|
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: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin')),
|
128
128
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
|
129
129
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
|
@@ -26,13 +26,13 @@ const CommodityDiroNew = (0, create_1.createMaterial)(_1.default, {
|
|
26
26
|
marginRight: 16
|
27
27
|
},
|
28
28
|
title: {
|
29
|
-
fontSize:
|
29
|
+
fontSize: 13,
|
30
30
|
color: '#000',
|
31
31
|
textAlign: 'left'
|
32
32
|
},
|
33
33
|
ctaTitle: {
|
34
34
|
textDecoration: 'underline',
|
35
|
-
fontSize:
|
35
|
+
fontSize: 14,
|
36
36
|
fontWeight: 'bold',
|
37
37
|
color: '#000',
|
38
38
|
textAlign: 'left',
|
@@ -46,7 +46,8 @@ const CommodityDiroNew = (0, create_1.createMaterial)(_1.default, {
|
|
46
46
|
width: 260,
|
47
47
|
height: 86,
|
48
48
|
padding: 4,
|
49
|
-
backgroundColor: 'rgba(255,255,255,0.75)'
|
49
|
+
backgroundColor: 'rgba(255,255,255,0.75)',
|
50
|
+
marginBottom: 8
|
50
51
|
}
|
51
52
|
},
|
52
53
|
w: 100,
|
@@ -24,9 +24,9 @@ const MultiCommodity = (_a) => {
|
|
24
24
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
25
25
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
26
26
|
}, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
|
27
|
-
return (react_1.default.createElement(Scroll_1.default,
|
27
|
+
return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
28
28
|
var _a, _b, _c, _d, _e, _f;
|
29
|
-
return (react_1.default.createElement(react_2.SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: (0, css_1.css)(Object.assign({
|
29
|
+
return (react_1.default.createElement(react_2.SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
30
30
|
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
31
31
|
react_1.default.createElement(Img_1.default, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item })),
|
32
32
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
@@ -23,9 +23,9 @@ const MultiCommodityDiro = (_a) => {
|
|
23
23
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
24
24
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
25
25
|
}, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
|
26
|
-
return (react_1.default.createElement(Scroll_1.default,
|
26
|
+
return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
27
27
|
var _a, _b, _c, _d, _e, _f;
|
28
|
-
return (react_1.default.createElement(react_2.SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: (0, css_1.css)(Object.assign({
|
28
|
+
return (react_1.default.createElement(react_2.SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
29
29
|
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
30
30
|
react_1.default.createElement(Img_1.default, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item })),
|
31
31
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
@@ -23,9 +23,9 @@ const MultiCommodityDiroNew = (_a) => {
|
|
23
23
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
24
24
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
25
25
|
}, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
|
26
|
-
return (react_1.default.createElement(Scroll_1.default,
|
26
|
+
return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
27
27
|
var _a, _b, _c, _d, _e, _f;
|
28
|
-
return (react_1.default.createElement(react_2.SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: (0, css_1.css)(Object.assign({
|
28
|
+
return (react_1.default.createElement(react_2.SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
29
29
|
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
30
30
|
react_1.default.createElement(Img_1.default, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item })),
|
31
31
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
@@ -7,7 +7,7 @@ require("swiper/css");
|
|
7
7
|
require("swiper/css/free-mode");
|
8
8
|
require("swiper/css/scrollbar");
|
9
9
|
const modules_1 = require("swiper/modules");
|
10
|
-
const Scroll = ({ children }) => {
|
11
|
-
return (react_1.default.createElement(react_2.Swiper, { direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [modules_1.FreeMode, modules_1.Scrollbar, modules_1.Mousewheel], style: {
|
10
|
+
const Scroll = ({ children, isPadding = true }) => {
|
11
|
+
return (react_1.default.createElement(react_2.Swiper, { direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [modules_1.FreeMode, modules_1.Scrollbar, modules_1.Mousewheel], style: { padding: isPadding ? '0 12px 0 20px' : 0 } }, children));
|
12
12
|
};
|
13
13
|
exports.default = (0, react_1.memo)(Scroll);
|