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
package/dist/index.css CHANGED
@@ -156,7 +156,10 @@
156
156
  display: -ms-flexbox;
157
157
  display: flex;
158
158
  }
159
- .pb-commondityDiroNew-content-top-title {
159
+ .pb-commondityDiroNew-content-top-left {
160
+ width: 100%;
161
+ }
162
+ .pb-commondityDiroNew-content-top-left-title {
160
163
  font-size: 13px;
161
164
  -webkit-box-flex: 1;
162
165
  -webkit-flex: 1;
@@ -1333,14 +1336,11 @@ button.swiper-pagination-bullet {
1333
1336
  gap: 6px;
1334
1337
  margin-left: 20px;
1335
1338
  }
1336
- .clc-sxp-bottom-card {
1337
- margin-bottom: 10px;
1338
- }
1339
1339
  .clc-sxp-bottom-text {
1340
1340
  padding: 0 20px;
1341
+ font-size: 14px;
1341
1342
  }
1342
1343
  .clc-sxp-bottom-hashtag {
1343
- margin-left: 20px;
1344
1344
  margin-top: 16px;
1345
1345
  }
1346
1346
  .clc-sxp-bottom-hashtag-item {
package/dist/index.js CHANGED
@@ -755,7 +755,6 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
755
755
  });
756
756
  typeof window !== 'undefined' &&
757
757
  (window.sxpPopup = (type, aniType) => {
758
- setPopup(type);
759
758
  if (aniType && (aniType === null || aniType === void 0 ? void 0 : aniType.name) !== 'none') {
760
759
  setPopupAni(Object.assign(Object.assign({}, popupAni), aniType));
761
760
  }
@@ -765,6 +764,9 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
765
764
  duration: 0
766
765
  });
767
766
  }
767
+ setTimeout(() => {
768
+ setPopup(type);
769
+ });
768
770
  });
769
771
  typeof window !== 'undefined' &&
770
772
  (window.getJointUtmLink = (url) => {
@@ -8157,7 +8159,7 @@ function useEventReport() {
8157
8159
  * @Author: binruan@chatlabs.com
8158
8160
  * @Date: 2023-11-02 18:34:34
8159
8161
  * @LastEditors: binruan@chatlabs.com
8160
- * @LastEditTime: 2024-04-02 10:33:15
8162
+ * @LastEditTime: 2024-04-10 11:11:50
8161
8163
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8162
8164
  *
8163
8165
  */
@@ -8814,8 +8816,8 @@ Made in Italy` })));
8814
8816
  }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8815
8817
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
8816
8818
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
8817
- React.createElement("div", null,
8818
- 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'),
8819
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
8820
+ 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'),
8819
8821
  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')),
8820
8822
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
8821
8823
  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),
@@ -8830,7 +8832,7 @@ var CommodityDetailDiroNewComponent = memo(CommodityDetailDiroNew$1);
8830
8832
  * @Author: binruan@chatlabs.com
8831
8833
  * @Date: 2024-03-20 10:27:31
8832
8834
  * @LastEditors: binruan@chatlabs.com
8833
- * @LastEditTime: 2024-04-02 15:12:53
8835
+ * @LastEditTime: 2024-04-09 16:25:44
8834
8836
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\material.tsx
8835
8837
  *
8836
8838
  */
@@ -8852,7 +8854,7 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
8852
8854
  price: {
8853
8855
  color: '#000',
8854
8856
  fontWeight: 'bold',
8855
- fontSize: 18
8857
+ fontSize: 13
8856
8858
  },
8857
8859
  title: {
8858
8860
  color: '#000',
@@ -8896,7 +8898,7 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
8896
8898
  * @Author: binruan@chatlabs.com
8897
8899
  * @Date: 2024-03-26 16:50:25
8898
8900
  * @LastEditors: binruan@chatlabs.com
8899
- * @LastEditTime: 2024-04-03 15:51:15
8901
+ * @LastEditTime: 2024-04-09 21:40:18
8900
8902
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
8901
8903
  *
8902
8904
  */
@@ -9156,11 +9158,12 @@ function useOnScreen(ref) {
9156
9158
  }
9157
9159
 
9158
9160
  const EventProvider = (_a) => {
9159
- var { rec, children, className, onClick, style } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style"]);
9161
+ var { rec, children, className, onClick, style, isExternalLink = false } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink"]);
9160
9162
  const ref = useRef(null);
9161
9163
  const isOnScreen = useOnScreen(ref);
9162
9164
  const { popupAni } = useEditor();
9163
9165
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
9166
+ const { jumpToWeb } = useEventReport();
9164
9167
  useEffect(() => {
9165
9168
  var _a, _b;
9166
9169
  if (isOnScreen && (ref === null || ref === void 0 ? void 0 : ref.current)) {
@@ -9172,14 +9175,24 @@ const EventProvider = (_a) => {
9172
9175
  }
9173
9176
  }, [isOnScreen, ref, rec, ctaEvent]);
9174
9177
  const handleClick = throttle(() => {
9175
- var _a, _b;
9178
+ var _a, _b, _c, _d, _e, _f, _g, _h;
9176
9179
  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;
9177
9180
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9178
9181
  eventSubject: 'clickCta',
9179
9182
  eventDescription: 'User clicked the CTA'
9180
9183
  }, rec, item);
9181
9184
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
9182
- onClick === null || onClick === void 0 ? void 0 : onClick();
9185
+ if (isExternalLink) {
9186
+ 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) {
9187
+ const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
9188
+ const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
9189
+ jumpToWeb(rec, product, cta);
9190
+ 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;
9191
+ }
9192
+ }
9193
+ else {
9194
+ onClick === null || onClick === void 0 ? void 0 : onClick();
9195
+ }
9183
9196
  }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9184
9197
  return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
9185
9198
  };
@@ -9189,11 +9202,11 @@ var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
9189
9202
 
9190
9203
  const Commodity$1 = (_a) => {
9191
9204
  var _b, _c, _d, _e, _f, _g, _h;
9192
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9205
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9193
9206
  const { sxpParameter } = useSxpDataSource();
9194
9207
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9195
9208
  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;
9196
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9209
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9197
9210
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9198
9211
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
9199
9212
  React.createElement("div", { className: css({
@@ -9256,7 +9269,8 @@ const Commodity = createMaterial(CommodityComponent, {
9256
9269
  width: 236,
9257
9270
  height: 74,
9258
9271
  borderRadius: 3,
9259
- backgroundColor: 'rgba(0,0,0,.3)'
9272
+ backgroundColor: 'rgba(0,0,0,.3)',
9273
+ marginBottom: 8
9260
9274
  }
9261
9275
  },
9262
9276
  w: 100,
@@ -9278,12 +9292,12 @@ var interactionRender$5 = [
9278
9292
 
9279
9293
  const Appoint$1 = (_a) => {
9280
9294
  var _b, _c, _d, _e;
9281
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9295
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9282
9296
  const { sxpParameter } = useSxpDataSource();
9283
9297
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
9284
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
9298
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
9285
9299
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9286
- 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: '' })),
9300
+ 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: '' })),
9287
9301
  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')));
9288
9302
  };
9289
9303
  var AppointComponent = memo(Appoint$1);
@@ -9292,7 +9306,7 @@ var AppointComponent = memo(Appoint$1);
9292
9306
  * @Author: binruan@chatlabs.com
9293
9307
  * @Date: 2023-07-28 18:29:57
9294
9308
  * @LastEditors: binruan@chatlabs.com
9295
- * @LastEditTime: 2024-03-29 17:03:49
9309
+ * @LastEditTime: 2024-04-09 21:42:21
9296
9310
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Appoint\material.tsx
9297
9311
  *
9298
9312
  */
@@ -9329,7 +9343,8 @@ const Appoint = createMaterial(AppointComponent, {
9329
9343
  width: 236,
9330
9344
  height: 44,
9331
9345
  borderRadius: 3,
9332
- backgroundColor: 'rgba(0,0,0,.3)'
9346
+ backgroundColor: 'rgba(0,0,0,.3)',
9347
+ marginBottom: 8
9333
9348
  }
9334
9349
  },
9335
9350
  w: 100,
@@ -9405,7 +9420,8 @@ const Link = createMaterial(LinkComponent, {
9405
9420
  width: 236,
9406
9421
  height: 74,
9407
9422
  borderRadius: 3,
9408
- backgroundColor: 'rgba(0,0,0,.3)'
9423
+ backgroundColor: 'rgba(0,0,0,.3)',
9424
+ marginBottom: 8
9409
9425
  }
9410
9426
  },
9411
9427
  w: 100,
@@ -9429,11 +9445,11 @@ var styles$4 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
9429
9445
 
9430
9446
  const CommodityDiro$1 = (_a) => {
9431
9447
  var _b, _c, _d, _e, _f, _g, _h;
9432
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9448
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9433
9449
  const { sxpParameter } = useSxpDataSource();
9434
9450
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9435
9451
  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;
9436
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9452
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9437
9453
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9438
9454
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
9439
9455
  React.createElement("div", { className: css({
@@ -9496,7 +9512,8 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
9496
9512
  width: 236,
9497
9513
  height: 74,
9498
9514
  borderRadius: 3,
9499
- backgroundColor: '#fff'
9515
+ backgroundColor: '#fff',
9516
+ marginBottom: 8
9500
9517
  }
9501
9518
  },
9502
9519
  w: 100,
@@ -9520,11 +9537,11 @@ var styles$3 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
9520
9537
 
9521
9538
  const CommodityDiroNew$1 = (_a) => {
9522
9539
  var _b, _c, _d, _e, _f, _g, _h;
9523
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9540
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9524
9541
  const { sxpParameter } = useSxpDataSource();
9525
9542
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9526
9543
  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;
9527
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9544
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9528
9545
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9529
9546
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
9530
9547
  React.createElement("div", { className: css({
@@ -9544,7 +9561,7 @@ var CommodityDiroNewComponent = memo(CommodityDiroNew$1);
9544
9561
  * @Author: binruan@chatlabs.com
9545
9562
  * @Date: 2023-07-28 18:29:57
9546
9563
  * @LastEditors: binruan@chatlabs.com
9547
- * @LastEditTime: 2024-03-29 11:56:56
9564
+ * @LastEditTime: 2024-04-09 11:54:27
9548
9565
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiroNew\material.tsx
9549
9566
  *
9550
9567
  */
@@ -9568,13 +9585,13 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
9568
9585
  marginRight: 16
9569
9586
  },
9570
9587
  title: {
9571
- fontSize: 12,
9588
+ fontSize: 13,
9572
9589
  color: '#000',
9573
9590
  textAlign: 'left'
9574
9591
  },
9575
9592
  ctaTitle: {
9576
9593
  textDecoration: 'underline',
9577
- fontSize: 12,
9594
+ fontSize: 14,
9578
9595
  fontWeight: 'bold',
9579
9596
  color: '#000',
9580
9597
  textAlign: 'left',
@@ -9588,7 +9605,8 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
9588
9605
  width: 260,
9589
9606
  height: 86,
9590
9607
  padding: 4,
9591
- backgroundColor: 'rgba(255,255,255,0.75)'
9608
+ backgroundColor: 'rgba(255,255,255,0.75)',
9609
+ marginBottom: 8
9592
9610
  }
9593
9611
  },
9594
9612
  w: 100,
@@ -9608,8 +9626,8 @@ var interactionRender$2 = [
9608
9626
  }
9609
9627
  ];
9610
9628
 
9611
- const Scroll = ({ children }) => {
9612
- return (React.createElement(Swiper, { direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [freeMode, Scrollbar, Mousewheel], style: { paddingRight: '20px' } }, children));
9629
+ const Scroll = ({ children, isPadding = true }) => {
9630
+ 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));
9613
9631
  };
9614
9632
  var Scroll$1 = memo(Scroll);
9615
9633
 
@@ -9641,21 +9659,31 @@ var styles$2 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
9641
9659
 
9642
9660
  const MultiCommodityDiro$1 = (_a) => {
9643
9661
  var _b, _c;
9644
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9662
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9645
9663
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9646
9664
  const { popupAni } = useEditor();
9665
+ const { jumpToWeb } = useEventReport();
9647
9666
  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]);
9648
9667
  const handleClick = throttle((item) => {
9668
+ var _a;
9649
9669
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9650
9670
  eventSubject: 'clickCta',
9651
9671
  eventDescription: 'User clicked the CTA'
9652
9672
  }, recData, item);
9653
9673
  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 }) }));
9654
- onClick === null || onClick === void 0 ? void 0 : onClick();
9674
+ if (isExternalLink) {
9675
+ if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
9676
+ jumpToWeb(recData, item, item.bindCta);
9677
+ window.location.href = item.bindCta.link;
9678
+ }
9679
+ }
9680
+ else {
9681
+ onClick === null || onClick === void 0 ? void 0 : onClick();
9682
+ }
9655
9683
  }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9656
- return (React.createElement(Scroll$1, null, products === null || products === void 0 ? void 0 : products.map((item) => {
9684
+ return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9657
9685
  var _a, _b, _c, _d, _e, _f;
9658
- 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) }),
9686
+ 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) }),
9659
9687
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9660
9688
  React.createElement(Img$1, { 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 })),
9661
9689
  React.createElement("div", { className: css({
@@ -9719,7 +9747,8 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
9719
9747
  width: 236,
9720
9748
  height: 74,
9721
9749
  borderRadius: 3,
9722
- backgroundColor: '#fff'
9750
+ backgroundColor: '#fff',
9751
+ marginBottom: 8
9723
9752
  }
9724
9753
  },
9725
9754
  w: 100,
@@ -9743,22 +9772,32 @@ var styles$1 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
9743
9772
 
9744
9773
  const MultiCommodity$1 = (_a) => {
9745
9774
  var _b, _c;
9746
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9775
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9747
9776
  const { sxpParameter } = useSxpDataSource();
9748
9777
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9749
9778
  const { popupAni } = useEditor();
9750
9779
  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]);
9780
+ const { jumpToWeb } = useEventReport();
9751
9781
  const handleClick = throttle((item) => {
9782
+ var _a;
9752
9783
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9753
9784
  eventSubject: 'clickCta',
9754
9785
  eventDescription: 'User clicked the CTA'
9755
9786
  }, recData, item);
9756
9787
  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 }) }));
9757
- onClick === null || onClick === void 0 ? void 0 : onClick();
9788
+ if (isExternalLink) {
9789
+ if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
9790
+ jumpToWeb(recData, item, item.bindCta);
9791
+ window.location.href = item.bindCta.link;
9792
+ }
9793
+ }
9794
+ else {
9795
+ onClick === null || onClick === void 0 ? void 0 : onClick();
9796
+ }
9758
9797
  }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9759
- return (React.createElement(Scroll$1, null, products === null || products === void 0 ? void 0 : products.map((item) => {
9798
+ return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9760
9799
  var _a, _b, _c, _d, _e, _f;
9761
- 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) }),
9800
+ 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) }),
9762
9801
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9763
9802
  React.createElement(Img$1, { 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 })),
9764
9803
  React.createElement("div", { className: css({
@@ -9822,7 +9861,8 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
9822
9861
  width: 236,
9823
9862
  height: 74,
9824
9863
  borderRadius: 3,
9825
- backgroundColor: 'rgba(0,0,0,.3)'
9864
+ backgroundColor: 'rgba(0,0,0,.3)',
9865
+ marginBottom: 8
9826
9866
  }
9827
9867
  },
9828
9868
  w: 100,
@@ -9846,21 +9886,31 @@ var styles = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
9846
9886
 
9847
9887
  const MultiCommodityDiroNew$1 = (_a) => {
9848
9888
  var _b, _c;
9849
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9889
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9850
9890
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9851
9891
  const { popupAni } = useEditor();
9892
+ const { jumpToWeb } = useEventReport();
9852
9893
  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]);
9853
9894
  const handleClick = throttle((item) => {
9895
+ var _a;
9854
9896
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9855
9897
  eventSubject: 'clickCta',
9856
9898
  eventDescription: 'User clicked the CTA'
9857
9899
  }, recData, item);
9858
9900
  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 }) }));
9859
- onClick === null || onClick === void 0 ? void 0 : onClick();
9901
+ if (isExternalLink) {
9902
+ if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
9903
+ jumpToWeb(recData, item, item.bindCta);
9904
+ window.location.href = item.bindCta.link;
9905
+ }
9906
+ }
9907
+ else {
9908
+ onClick === null || onClick === void 0 ? void 0 : onClick();
9909
+ }
9860
9910
  }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9861
- return (React.createElement(Scroll$1, null, products === null || products === void 0 ? void 0 : products.map((item) => {
9911
+ return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9862
9912
  var _a, _b, _c, _d, _e, _f;
9863
- 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) }),
9913
+ 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) }),
9864
9914
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9865
9915
  React.createElement(Img$1, { 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 })),
9866
9916
  React.createElement("div", { className: css({
@@ -9882,7 +9932,7 @@ var MultiCommodityDiroNewComponent = memo(MultiCommodityDiroNew$1);
9882
9932
  * @Author: binruan@chatlabs.com
9883
9933
  * @Date: 2023-07-28 18:29:57
9884
9934
  * @LastEditors: binruan@chatlabs.com
9885
- * @LastEditTime: 2024-03-29 15:40:54
9935
+ * @LastEditTime: 2024-04-09 21:40:37
9886
9936
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\material.tsx
9887
9937
  *
9888
9938
  */
@@ -9926,7 +9976,8 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
9926
9976
  width: 260,
9927
9977
  height: 86,
9928
9978
  padding: 4,
9929
- backgroundColor: 'rgba(255,255,255,0.75)'
9979
+ backgroundColor: 'rgba(255,255,255,0.75)',
9980
+ marginBottom: 8
9930
9981
  }
9931
9982
  },
9932
9983
  w: 100,
@@ -12341,14 +12392,14 @@ function withBindDataSource(Component) {
12341
12392
  * @Author: binruan@chatlabs.com
12342
12393
  * @Date: 2023-12-26 16:11:34
12343
12394
  * @LastEditors: binruan@chatlabs.com
12344
- * @LastEditTime: 2024-03-04 14:25:27
12395
+ * @LastEditTime: 2024-04-10 16:49:34
12345
12396
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
12346
12397
  *
12347
12398
  */
12348
12399
  const RenderCard = ({ rec, index, tempMap, resolver }) => {
12349
12400
  const { schema } = useEditor();
12350
12401
  const renderComp = useMemo(() => {
12351
- 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;
12402
+ 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;
12352
12403
  if (!(rec === null || rec === void 0 ? void 0 : rec.video))
12353
12404
  return null;
12354
12405
  let cta = null;
@@ -12371,8 +12422,11 @@ const RenderCard = ({ rec, index, tempMap, resolver }) => {
12371
12422
  return null;
12372
12423
  }
12373
12424
  if (value && resolver) {
12374
- const Component = withBindDataSource(resolver[(_w = value === null || value === void 0 ? void 0 : value.item) === null || _w === void 0 ? void 0 : _w.type]);
12375
- 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 })));
12425
+ const t = resolver[(_w = value === null || value === void 0 ? void 0 : value.item) === null || _w === void 0 ? void 0 : _w.type];
12426
+ const Component = withBindDataSource(t);
12427
+ const defaulSetting = (_x = t === null || t === void 0 ? void 0 : t.extend) === null || _x === void 0 ? void 0 : _x.defaulSetting;
12428
+ 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';
12429
+ 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 })));
12376
12430
  }
12377
12431
  else {
12378
12432
  return null;
@@ -12398,7 +12452,7 @@ const Nudge = ({ nudge }) => {
12398
12452
  * @Author: binruan@chatlabs.com
12399
12453
  * @Date: 2024-01-15 19:03:09
12400
12454
  * @LastEditors: binruan@chatlabs.com
12401
- * @LastEditTime: 2024-04-07 17:06:06
12455
+ * @LastEditTime: 2024-04-10 10:13:48
12402
12456
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12403
12457
  *
12404
12458
  */
@@ -12565,9 +12619,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12565
12619
  }
12566
12620
  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) {
12567
12621
  return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, index) => {
12568
- var _a, _b, _c, _d, _e, _f;
12569
- const Component = withBindDataSource(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
12570
- 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' } })));
12622
+ var _a, _b, _c, _d, _e, _f, _g, _h;
12623
+ const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
12624
+ const Component = withBindDataSource(t);
12625
+ const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
12626
+ 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' }) })));
12571
12627
  });
12572
12628
  }
12573
12629
  return null;
@@ -12581,8 +12637,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12581
12637
  React.createElement(Nudge, { nudge: nudge }),
12582
12638
  React.createElement("div", { className: 'clc-sxp-bottom-card' },
12583
12639
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
12584
- React.createElement("div", { className: 'clc-sxp-bottom-text' },
12585
- React.createElement(ExpandableText$1, { 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 })),
12640
+ React.createElement(ExpandableText$1, { 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 }),
12586
12641
  React.createElement(Hashtag$1, { 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 }))));
12587
12642
  }
12588
12643
  return null;
@@ -12776,7 +12831,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12776
12831
  * @Author: binruan@chatlabs.com
12777
12832
  * @Date: 2023-10-31 10:56:01
12778
12833
  * @LastEditors: binruan@chatlabs.com
12779
- * @LastEditTime: 2024-04-02 10:31:51
12834
+ * @LastEditTime: 2024-04-10 09:57:19
12780
12835
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
12781
12836
  *
12782
12837
  */
@@ -12822,10 +12877,12 @@ const Popup = () => {
12822
12877
  const renderPopupDetail = useMemo(() => {
12823
12878
  var _a, _b, _c;
12824
12879
  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) => {
12825
- var _a, _b, _c, _d, _e, _f, _g;
12880
+ var _a, _b, _c, _d, _e, _f, _g, _h;
12826
12881
  if ((value === null || value === void 0 ? void 0 : value.id) === popup) {
12827
- const Component = withBindDataSource(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
12828
- 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 })));
12882
+ const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
12883
+ const Component = withBindDataSource(t);
12884
+ const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
12885
+ 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 })));
12829
12886
  }
12830
12887
  else {
12831
12888
  return React.createElement(React.Fragment, null);