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.
Files changed (52) hide show
  1. package/dist/index.cjs +56 -40
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +4 -5
  4. package/dist/index.js +56 -40
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +56 -40
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/Popup/index.js +5 -3
  15. package/es/core/components/SxpPageRender/RenderCard.js +5 -3
  16. package/es/core/components/SxpPageRender/index.js +5 -3
  17. package/es/core/context/EditorContext.js +3 -1
  18. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
  19. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +1 -1
  20. package/es/materials/sxp/template/Appoint/material.js +2 -1
  21. package/es/materials/sxp/template/Commodity/material.js +2 -1
  22. package/es/materials/sxp/template/CommodityDiro/material.js +2 -1
  23. package/es/materials/sxp/template/CommodityDiroNew/material.js +4 -3
  24. package/es/materials/sxp/template/Link/material.js +2 -1
  25. package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
  26. package/es/materials/sxp/template/MultiCommodity/material.js +2 -1
  27. package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  28. package/es/materials/sxp/template/MultiCommodityDiro/material.js +2 -1
  29. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
  30. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -1
  31. package/es/materials/sxp/template/components/Scroll.d.ts +1 -0
  32. package/es/materials/sxp/template/components/Scroll.js +2 -2
  33. package/lib/core/components/SxpPageRender/Popup/index.js +5 -3
  34. package/lib/core/components/SxpPageRender/RenderCard.js +5 -3
  35. package/lib/core/components/SxpPageRender/index.js +5 -3
  36. package/lib/core/context/EditorContext.js +3 -1
  37. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
  38. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +1 -1
  39. package/lib/materials/sxp/template/Appoint/material.js +2 -1
  40. package/lib/materials/sxp/template/Commodity/material.js +2 -1
  41. package/lib/materials/sxp/template/CommodityDiro/material.js +2 -1
  42. package/lib/materials/sxp/template/CommodityDiroNew/material.js +4 -3
  43. package/lib/materials/sxp/template/Link/material.js +2 -1
  44. package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
  45. package/lib/materials/sxp/template/MultiCommodity/material.js +2 -1
  46. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  47. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +2 -1
  48. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
  49. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -1
  50. package/lib/materials/sxp/template/components/Scroll.d.ts +1 -0
  51. package/lib/materials/sxp/template/components/Scroll.js +2 -2
  52. 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 Component = withBindDataSource(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
51
- return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign({}, (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.style), { width: '100%', height: '80vh', overflow: 'auto' }), 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 : [] }, (_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 })));
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 Component = withBindDataSource(resolver[(_w = value === null || value === void 0 ? void 0 : value.item) === null || _w === void 0 ? void 0 : _w.type]);
32
- return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign({}, (_x = value === null || value === void 0 ? void 0 : value.item) === null || _x === void 0 ? void 0 : _x.style), { zIndex: 50, marginLeft: '20px' }), textStyle: (_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.textStyle, bindDatas: (_0 = (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.bindDatas) !== null && _0 !== void 0 ? _0 : [] }, (_1 = value === null || value === void 0 ? void 0 : value.item) === null || _1 === void 0 ? void 0 : _1.props, { event: ((_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.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 })));
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 Component = withBindDataSource(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
163
- return (React.createElement(Component, Object.assign({ key: index, textStyle: (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.textStyle, bindDatas: (_d = (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.bindDatas) !== null && _d !== void 0 ? _d : [] }, (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.props, { event: ((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' } })));
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", null,
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),
@@ -19,7 +19,7 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
19
19
  price: {
20
20
  color: '#000',
21
21
  fontWeight: 'bold',
22
- fontSize: 18
22
+ fontSize: 13
23
23
  },
24
24
  title: {
25
25
  color: '#000',
@@ -35,7 +35,8 @@ const Appoint = createMaterial(AppointComponent, {
35
35
  width: 236,
36
36
  height: 44,
37
37
  borderRadius: 3,
38
- backgroundColor: 'rgba(0,0,0,.3)'
38
+ backgroundColor: 'rgba(0,0,0,.3)',
39
+ marginBottom: 8
39
40
  }
40
41
  },
41
42
  w: 100,
@@ -41,7 +41,8 @@ const Commodity = createMaterial(CommodityComponent, {
41
41
  width: 236,
42
42
  height: 74,
43
43
  borderRadius: 3,
44
- backgroundColor: 'rgba(0,0,0,.3)'
44
+ backgroundColor: 'rgba(0,0,0,.3)',
45
+ marginBottom: 8
45
46
  }
46
47
  },
47
48
  w: 100,
@@ -41,7 +41,8 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
41
41
  width: 236,
42
42
  height: 74,
43
43
  borderRadius: 3,
44
- backgroundColor: '#fff'
44
+ backgroundColor: '#fff',
45
+ marginBottom: 8
45
46
  }
46
47
  },
47
48
  w: 100,
@@ -22,13 +22,13 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
22
22
  marginRight: 16
23
23
  },
24
24
  title: {
25
- fontSize: 12,
25
+ fontSize: 13,
26
26
  color: '#000',
27
27
  textAlign: 'left'
28
28
  },
29
29
  ctaTitle: {
30
30
  textDecoration: 'underline',
31
- fontSize: 12,
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,
@@ -33,7 +33,8 @@ const Link = createMaterial(LinkComponent, {
33
33
  width: 236,
34
34
  height: 74,
35
35
  borderRadius: 3,
36
- backgroundColor: 'rgba(0,0,0,.3)'
36
+ backgroundColor: 'rgba(0,0,0,.3)',
37
+ marginBottom: 8
37
38
  }
38
39
  },
39
40
  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, null, products === null || products === void 0 ? void 0 : products.map((item) => {
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({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
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({
@@ -41,7 +41,8 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
41
41
  width: 236,
42
42
  height: 74,
43
43
  borderRadius: 3,
44
- backgroundColor: 'rgba(0,0,0,.3)'
44
+ backgroundColor: 'rgba(0,0,0,.3)',
45
+ marginBottom: 8
45
46
  }
46
47
  },
47
48
  w: 100,
@@ -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, null, products === null || products === void 0 ? void 0 : products.map((item) => {
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({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
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({
@@ -41,7 +41,8 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
41
41
  width: 236,
42
42
  height: 74,
43
43
  borderRadius: 3,
44
- backgroundColor: '#fff'
44
+ backgroundColor: '#fff',
45
+ marginBottom: 8
45
46
  }
46
47
  },
47
48
  w: 100,
@@ -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, null, products === null || products === void 0 ? void 0 : products.map((item) => {
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({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
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({
@@ -42,7 +42,8 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
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,
@@ -4,6 +4,7 @@ import 'swiper/css/free-mode';
4
4
  import 'swiper/css/scrollbar';
5
5
  interface IScrollProps {
6
6
  children: any;
7
+ isPadding?: boolean;
7
8
  }
8
9
  declare const _default: React.NamedExoticComponent<IScrollProps>;
9
10
  export default _default;
@@ -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: { paddingRight: '20px' } }, children));
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 Component = (0, withBindDataSource_1.default)(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
54
- return (react_1.default.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign({}, (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.style), { width: '100%', height: '80vh', overflow: 'auto' }), 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 : [] }, (_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 })));
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 Component = (0, withBindDataSource_1.default)(resolver[(_w = value === null || value === void 0 ? void 0 : value.item) === null || _w === void 0 ? void 0 : _w.type]);
35
- return (react_1.default.createElement(Component, Object.assign({ style: Object.assign(Object.assign({}, (_x = value === null || value === void 0 ? void 0 : value.item) === null || _x === void 0 ? void 0 : _x.style), { zIndex: 50, marginLeft: '20px' }), textStyle: (_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.textStyle, bindDatas: (_0 = (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.bindDatas) !== null && _0 !== void 0 ? _0 : [] }, (_1 = value === null || value === void 0 ? void 0 : value.item) === null || _1 === void 0 ? void 0 : _1.props, { event: ((_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.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 })));
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 Component = (0, withBindDataSource_1.default)(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
166
- return (react_1.default.createElement(Component, Object.assign({ key: index, textStyle: (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.textStyle, bindDatas: (_d = (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.bindDatas) !== null && _d !== void 0 ? _d : [] }, (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.props, { event: ((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' } })));
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", null,
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),
@@ -23,7 +23,7 @@ const CommodityDetailDiroNew = (0, create_1.createMaterial)(_1.default, {
23
23
  price: {
24
24
  color: '#000',
25
25
  fontWeight: 'bold',
26
- fontSize: 18
26
+ fontSize: 13
27
27
  },
28
28
  title: {
29
29
  color: '#000',
@@ -39,7 +39,8 @@ const Appoint = (0, create_1.createMaterial)(_1.default, {
39
39
  width: 236,
40
40
  height: 44,
41
41
  borderRadius: 3,
42
- backgroundColor: 'rgba(0,0,0,.3)'
42
+ backgroundColor: 'rgba(0,0,0,.3)',
43
+ marginBottom: 8
43
44
  }
44
45
  },
45
46
  w: 100,
@@ -45,7 +45,8 @@ const Commodity = (0, create_1.createMaterial)(_1.default, {
45
45
  width: 236,
46
46
  height: 74,
47
47
  borderRadius: 3,
48
- backgroundColor: 'rgba(0,0,0,.3)'
48
+ backgroundColor: 'rgba(0,0,0,.3)',
49
+ marginBottom: 8
49
50
  }
50
51
  },
51
52
  w: 100,
@@ -45,7 +45,8 @@ const CommodityDiro = (0, create_1.createMaterial)(_1.default, {
45
45
  width: 236,
46
46
  height: 74,
47
47
  borderRadius: 3,
48
- backgroundColor: '#fff'
48
+ backgroundColor: '#fff',
49
+ marginBottom: 8
49
50
  }
50
51
  },
51
52
  w: 100,
@@ -26,13 +26,13 @@ const CommodityDiroNew = (0, create_1.createMaterial)(_1.default, {
26
26
  marginRight: 16
27
27
  },
28
28
  title: {
29
- fontSize: 12,
29
+ fontSize: 13,
30
30
  color: '#000',
31
31
  textAlign: 'left'
32
32
  },
33
33
  ctaTitle: {
34
34
  textDecoration: 'underline',
35
- fontSize: 12,
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,
@@ -37,7 +37,8 @@ const Link = (0, create_1.createMaterial)(_1.default, {
37
37
  width: 236,
38
38
  height: 74,
39
39
  borderRadius: 3,
40
- backgroundColor: 'rgba(0,0,0,.3)'
40
+ backgroundColor: 'rgba(0,0,0,.3)',
41
+ marginBottom: 8
41
42
  }
42
43
  },
43
44
  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, null, products === null || products === void 0 ? void 0 : products.map((item) => {
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({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
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)({
@@ -45,7 +45,8 @@ const MultiCommodity = (0, create_1.createMaterial)(_1.default, {
45
45
  width: 236,
46
46
  height: 74,
47
47
  borderRadius: 3,
48
- backgroundColor: 'rgba(0,0,0,.3)'
48
+ backgroundColor: 'rgba(0,0,0,.3)',
49
+ marginBottom: 8
49
50
  }
50
51
  },
51
52
  w: 100,
@@ -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, null, products === null || products === void 0 ? void 0 : products.map((item) => {
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({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
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)({
@@ -45,7 +45,8 @@ const MultiCommodityDiro = (0, create_1.createMaterial)(_1.default, {
45
45
  width: 236,
46
46
  height: 74,
47
47
  borderRadius: 3,
48
- backgroundColor: '#fff'
48
+ backgroundColor: '#fff',
49
+ marginBottom: 8
49
50
  }
50
51
  },
51
52
  w: 100,
@@ -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, null, products === null || products === void 0 ? void 0 : products.map((item) => {
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({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
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)({
@@ -46,7 +46,8 @@ const MultiCommodityDiroNew = (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,
@@ -4,6 +4,7 @@ import 'swiper/css/free-mode';
4
4
  import 'swiper/css/scrollbar';
5
5
  interface IScrollProps {
6
6
  children: any;
7
+ isPadding?: boolean;
7
8
  }
8
9
  declare const _default: React.NamedExoticComponent<IScrollProps>;
9
10
  export default _default;
@@ -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: { paddingRight: '20px' } }, children));
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.0.3-alpha.4",
3
+ "version": "1.0.3",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",