pb-sxp-ui 1.0.3-alpha.4 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/index.cjs +117 -60
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +5 -5
  4. package/dist/index.js +117 -60
  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 +117 -60
  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 +6 -3
  16. package/es/core/components/SxpPageRender/index.js +6 -5
  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/index.d.ts +1 -0
  21. package/es/materials/sxp/template/Appoint/index.js +3 -3
  22. package/es/materials/sxp/template/Appoint/material.js +2 -1
  23. package/es/materials/sxp/template/Commodity/index.d.ts +1 -0
  24. package/es/materials/sxp/template/Commodity/index.js +2 -2
  25. package/es/materials/sxp/template/Commodity/material.js +2 -1
  26. package/es/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  27. package/es/materials/sxp/template/CommodityDiro/index.js +2 -2
  28. package/es/materials/sxp/template/CommodityDiro/material.js +2 -1
  29. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  30. package/es/materials/sxp/template/CommodityDiroNew/index.js +2 -2
  31. package/es/materials/sxp/template/CommodityDiroNew/material.js +4 -3
  32. package/es/materials/sxp/template/Link/material.js +2 -1
  33. package/es/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  34. package/es/materials/sxp/template/MultiCommodity/index.js +15 -4
  35. package/es/materials/sxp/template/MultiCommodity/material.js +2 -1
  36. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  37. package/es/materials/sxp/template/MultiCommodityDiro/index.js +15 -4
  38. package/es/materials/sxp/template/MultiCommodityDiro/material.js +2 -1
  39. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  40. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +15 -4
  41. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -1
  42. package/es/materials/sxp/template/components/EventProvider.d.ts +1 -0
  43. package/es/materials/sxp/template/components/EventProvider.js +15 -3
  44. package/es/materials/sxp/template/components/Scroll.d.ts +1 -0
  45. package/es/materials/sxp/template/components/Scroll.js +2 -2
  46. package/lib/core/components/SxpPageRender/Popup/index.js +5 -3
  47. package/lib/core/components/SxpPageRender/RenderCard.js +6 -3
  48. package/lib/core/components/SxpPageRender/index.js +6 -5
  49. package/lib/core/context/EditorContext.js +3 -1
  50. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
  51. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +1 -1
  52. package/lib/materials/sxp/template/Appoint/index.d.ts +1 -0
  53. package/lib/materials/sxp/template/Appoint/index.js +3 -3
  54. package/lib/materials/sxp/template/Appoint/material.js +2 -1
  55. package/lib/materials/sxp/template/Commodity/index.d.ts +1 -0
  56. package/lib/materials/sxp/template/Commodity/index.js +2 -2
  57. package/lib/materials/sxp/template/Commodity/material.js +2 -1
  58. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  59. package/lib/materials/sxp/template/CommodityDiro/index.js +2 -2
  60. package/lib/materials/sxp/template/CommodityDiro/material.js +2 -1
  61. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  62. package/lib/materials/sxp/template/CommodityDiroNew/index.js +2 -2
  63. package/lib/materials/sxp/template/CommodityDiroNew/material.js +4 -3
  64. package/lib/materials/sxp/template/Link/material.js +2 -1
  65. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  66. package/lib/materials/sxp/template/MultiCommodity/index.js +15 -4
  67. package/lib/materials/sxp/template/MultiCommodity/material.js +2 -1
  68. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  69. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +15 -4
  70. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +2 -1
  71. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  72. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +15 -4
  73. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -1
  74. package/lib/materials/sxp/template/components/EventProvider.d.ts +1 -0
  75. package/lib/materials/sxp/template/components/EventProvider.js +15 -3
  76. package/lib/materials/sxp/template/components/Scroll.d.ts +1 -0
  77. package/lib/materials/sxp/template/components/Scroll.js +2 -2
  78. 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, _4, _5, _6;
9
9
  if (!(rec === null || rec === void 0 ? void 0 : rec.video))
10
10
  return null;
11
11
  let cta = null;
@@ -28,8 +28,11 @@ 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
+ const isExternalLink = ((_0 = (_z = (_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.event) === null || _z === void 0 ? void 0 : _z.onClick) === null || _0 === void 0 ? void 0 : _0.linkType) === 'externalLink';
35
+ return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_1 = value === null || value === void 0 ? void 0 : value.item) === null || _1 === void 0 ? void 0 : _1.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.textStyle), bindDatas: (_4 = (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.bindDatas) !== null && _4 !== void 0 ? _4 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_5 = value === null || value === void 0 ? void 0 : value.item) === null || _5 === void 0 ? void 0 : _5.props, { event: ((_6 = value === null || value === void 0 ? void 0 : value.item) === null || _6 === void 0 ? void 0 : _6.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, isExternalLink: isExternalLink })));
33
36
  }
34
37
  else {
35
38
  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;
@@ -174,8 +176,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
174
176
  React.createElement(Nudge, { nudge: nudge }),
175
177
  React.createElement("div", { className: 'clc-sxp-bottom-card' },
176
178
  React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
177
- React.createElement("div", { className: 'clc-sxp-bottom-text' },
178
- React.createElement(ExpandableText, { isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle })),
179
+ React.createElement(ExpandableText, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle }),
179
180
  React.createElement(Hashtag, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.url) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
180
181
  }
181
182
  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',
@@ -8,6 +8,7 @@ export interface IAppointProps {
8
8
  recData?: RecItemType;
9
9
  bottom_image?: string;
10
10
  ctaTempStyles?: ICtaTempStylesType;
11
+ isExternalLink?: boolean;
11
12
  }
12
13
  declare const _default: React.NamedExoticComponent<IAppointProps>;
13
14
  export default _default;
@@ -5,12 +5,12 @@ import EventProvider from '../components/EventProvider';
5
5
  import { useSxpDataSource } from '../../../../core/hooks';
6
6
  const Appoint = (_a) => {
7
7
  var _b, _c, _d, _e;
8
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9
9
  const { sxpParameter } = useSxpDataSource();
10
10
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
11
- return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
11
+ return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
12
12
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
13
- React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, alt: '' })),
13
+ React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, alt: '' })),
14
14
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
15
15
  };
16
16
  export default memo(Appoint);
@@ -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,
@@ -8,6 +8,7 @@ export interface ICommodityProps {
8
8
  recData?: RecItemType;
9
9
  bottom_image?: string;
10
10
  ctaTempStyles?: ICtaTempStylesType;
11
+ isExternalLink?: boolean;
11
12
  }
12
13
  declare const _default: React.NamedExoticComponent<ICommodityProps>;
13
14
  export default _default;
@@ -6,11 +6,11 @@ import styles from './index.module.less';
6
6
  import { useSxpDataSource } from '../../../../core/hooks';
7
7
  const Commodity = (_a) => {
8
8
  var _b, _c, _d, _e, _f, _g, _h;
9
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
10
10
  const { sxpParameter } = useSxpDataSource();
11
11
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
12
12
  const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
13
- return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
13
+ return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
14
14
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
15
15
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
16
16
  React.createElement("div", { className: css({
@@ -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,
@@ -8,6 +8,7 @@ export interface ICommodityDiroProps {
8
8
  recData?: RecItemType;
9
9
  bottom_image?: string;
10
10
  ctaTempStyles?: ICtaTempStylesType;
11
+ isExternalLink?: boolean;
11
12
  }
12
13
  declare const _default: React.NamedExoticComponent<ICommodityDiroProps>;
13
14
  export default _default;
@@ -6,11 +6,11 @@ import styles from './index.module.less';
6
6
  import { useSxpDataSource } from '../../../../core/hooks';
7
7
  const CommodityDiro = (_a) => {
8
8
  var _b, _c, _d, _e, _f, _g, _h;
9
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
10
10
  const { sxpParameter } = useSxpDataSource();
11
11
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
12
12
  const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
13
- return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
13
+ return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
14
14
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
15
15
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
16
16
  React.createElement("div", { className: css({
@@ -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,
@@ -8,6 +8,7 @@ export interface ICommodityDiroNewProps {
8
8
  recData?: RecItemType;
9
9
  bottom_image?: string;
10
10
  ctaTempStyles?: ICtaTempStylesType;
11
+ isExternalLink?: boolean;
11
12
  }
12
13
  declare const _default: React.NamedExoticComponent<ICommodityDiroNewProps>;
13
14
  export default _default;
@@ -6,11 +6,11 @@ import styles from './index.module.less';
6
6
  import { useSxpDataSource } from '../../../../core/hooks';
7
7
  const CommodityDiroNew = (_a) => {
8
8
  var _b, _c, _d, _e, _f, _g, _h;
9
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
10
10
  const { sxpParameter } = useSxpDataSource();
11
11
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
12
12
  const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
13
- return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
13
+ return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
14
14
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
15
15
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
16
16
  React.createElement("div", { className: css({
@@ -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,
@@ -9,6 +9,7 @@ export interface IMultiCommodityProps {
9
9
  onClick?: () => void;
10
10
  bottom_image?: string;
11
11
  ctaTempStyles?: ICtaTempStylesType;
12
+ isExternalLink?: boolean;
12
13
  }
13
14
  declare const _default: React.NamedExoticComponent<IMultiCommodityProps>;
14
15
  export default _default;
@@ -7,24 +7,35 @@ import Img from '../components/Img';
7
7
  import Scroll from '../components/Scroll';
8
8
  import styles from './index.module.less';
9
9
  import { useEditor, useSxpDataSource } from '../../../../core/hooks';
10
+ import { useEventReport } from '../../../../core/hooks/useEventReport';
10
11
  const MultiCommodity = (_a) => {
11
12
  var _b, _c;
12
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
13
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
13
14
  const { sxpParameter } = useSxpDataSource();
14
15
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
15
16
  const { popupAni } = useEditor();
16
17
  const [products, setProducts] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
18
+ const { jumpToWeb } = useEventReport();
17
19
  const handleClick = throttle((item) => {
20
+ var _a;
18
21
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
19
22
  eventSubject: 'clickCta',
20
23
  eventDescription: 'User clicked the CTA'
21
24
  }, recData, item);
22
25
  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
- onClick === null || onClick === void 0 ? void 0 : onClick();
26
+ if (isExternalLink) {
27
+ if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
28
+ jumpToWeb(recData, item, item.bindCta);
29
+ window.location.href = item.bindCta.link;
30
+ }
31
+ }
32
+ else {
33
+ onClick === null || onClick === void 0 ? void 0 : onClick();
34
+ }
24
35
  }, 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) => {
36
+ return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
26
37
  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) }),
38
+ 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
39
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
29
40
  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
41
  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,
@@ -9,6 +9,7 @@ export interface IMultiCommodityDiroProps {
9
9
  onClick?: () => void;
10
10
  bottom_image?: string;
11
11
  ctaTempStyles?: ICtaTempStylesType;
12
+ isExternalLink?: boolean;
12
13
  }
13
14
  declare const _default: React.NamedExoticComponent<IMultiCommodityDiroProps>;
14
15
  export default _default;
@@ -7,23 +7,34 @@ import Scroll from '../components/Scroll';
7
7
  import Img from '../components/Img';
8
8
  import styles from './index.module.less';
9
9
  import { useEditor, useSxpDataSource } from '../../../../core/hooks';
10
+ import { useEventReport } from '../../../../core/hooks/useEventReport';
10
11
  const MultiCommodityDiro = (_a) => {
11
12
  var _b, _c;
12
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
13
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
13
14
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
14
15
  const { popupAni } = useEditor();
16
+ const { jumpToWeb } = useEventReport();
15
17
  const [products, setProducts] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
16
18
  const handleClick = throttle((item) => {
19
+ var _a;
17
20
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
18
21
  eventSubject: 'clickCta',
19
22
  eventDescription: 'User clicked the CTA'
20
23
  }, recData, item);
21
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 }) }));
22
- onClick === null || onClick === void 0 ? void 0 : onClick();
25
+ if (isExternalLink) {
26
+ if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
27
+ jumpToWeb(recData, item, item.bindCta);
28
+ window.location.href = item.bindCta.link;
29
+ }
30
+ }
31
+ else {
32
+ onClick === null || onClick === void 0 ? void 0 : onClick();
33
+ }
23
34
  }, 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) => {
35
+ return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
25
36
  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) }),
37
+ 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
38
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
28
39
  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
40
  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,
@@ -9,6 +9,7 @@ export interface IMultiCommodityDiroNewProps {
9
9
  onClick?: () => void;
10
10
  bottom_image?: string;
11
11
  ctaTempStyles?: ICtaTempStylesType;
12
+ isExternalLink?: boolean;
12
13
  }
13
14
  declare const _default: React.NamedExoticComponent<IMultiCommodityDiroNewProps>;
14
15
  export default _default;
@@ -7,23 +7,34 @@ import Scroll from '../components/Scroll';
7
7
  import Img from '../components/Img';
8
8
  import styles from './index.module.less';
9
9
  import { useEditor, useSxpDataSource } from '../../../../core/hooks';
10
+ import { useEventReport } from '../../../../core/hooks/useEventReport';
10
11
  const MultiCommodityDiroNew = (_a) => {
11
12
  var _b, _c;
12
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
13
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
13
14
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
14
15
  const { popupAni } = useEditor();
16
+ const { jumpToWeb } = useEventReport();
15
17
  const [products, setProducts] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
16
18
  const handleClick = throttle((item) => {
19
+ var _a;
17
20
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
18
21
  eventSubject: 'clickCta',
19
22
  eventDescription: 'User clicked the CTA'
20
23
  }, recData, item);
21
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 }) }));
22
- onClick === null || onClick === void 0 ? void 0 : onClick();
25
+ if (isExternalLink) {
26
+ if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
27
+ jumpToWeb(recData, item, item.bindCta);
28
+ window.location.href = item.bindCta.link;
29
+ }
30
+ }
31
+ else {
32
+ onClick === null || onClick === void 0 ? void 0 : onClick();
33
+ }
23
34
  }, 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) => {
35
+ return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
25
36
  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) }),
37
+ 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
38
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
28
39
  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
40
  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,
@@ -6,6 +6,7 @@ export interface IImgProps {
6
6
  className?: any;
7
7
  onClick?: any;
8
8
  style?: CSSProperties;
9
+ isExternalLink?: boolean;
9
10
  }
10
11
  declare const _default: React.NamedExoticComponent<IImgProps>;
11
12
  export default _default;
@@ -3,12 +3,14 @@ import React, { memo, useEffect, useRef } from 'react';
3
3
  import { throttle } from 'lodash';
4
4
  import useOnScreen from '../../../../core/hooks/useOnScreen';
5
5
  import { useEditor, useSxpDataSource } from '../../../../core/hooks';
6
+ import { useEventReport } from '../../../../core/hooks/useEventReport';
6
7
  const EventProvider = (_a) => {
7
- var { rec, children, className, onClick, style } = _a, props = __rest(_a, ["rec", "children", "className", "onClick", "style"]);
8
+ var { rec, children, className, onClick, style, isExternalLink = false } = _a, props = __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink"]);
8
9
  const ref = useRef(null);
9
10
  const isOnScreen = useOnScreen(ref);
10
11
  const { popupAni } = useEditor();
11
12
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
13
+ const { jumpToWeb } = useEventReport();
12
14
  useEffect(() => {
13
15
  var _a, _b;
14
16
  if (isOnScreen && (ref === null || ref === void 0 ? void 0 : ref.current)) {
@@ -20,14 +22,24 @@ const EventProvider = (_a) => {
20
22
  }
21
23
  }, [isOnScreen, ref, rec, ctaEvent]);
22
24
  const handleClick = throttle(() => {
23
- var _a, _b;
25
+ var _a, _b, _c, _d, _e, _f, _g, _h;
24
26
  const item = (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
25
27
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
26
28
  eventSubject: 'clickCta',
27
29
  eventDescription: 'User clicked the CTA'
28
30
  }, rec, item);
29
31
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
30
- onClick === null || onClick === void 0 ? void 0 : onClick();
32
+ if (isExternalLink) {
33
+ if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta) === null || _d === void 0 ? void 0 : _d.link) {
34
+ const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
35
+ const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
36
+ jumpToWeb(rec, product, cta);
37
+ window.location.href = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindCta) === null || _h === void 0 ? void 0 : _h.link;
38
+ }
39
+ }
40
+ else {
41
+ onClick === null || onClick === void 0 ? void 0 : onClick();
42
+ }
31
43
  }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
32
44
  return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
33
45
  };
@@ -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);