pb-sxp-ui 1.0.3 → 1.0.5

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 (50) hide show
  1. package/dist/index.cjs +62 -24
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -0
  4. package/dist/index.js +62 -24
  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 +62 -24
  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/RenderCard.js +3 -2
  15. package/es/core/components/SxpPageRender/index.js +1 -2
  16. package/es/materials/sxp/template/Appoint/index.d.ts +1 -0
  17. package/es/materials/sxp/template/Appoint/index.js +3 -3
  18. package/es/materials/sxp/template/Commodity/index.d.ts +1 -0
  19. package/es/materials/sxp/template/Commodity/index.js +2 -2
  20. package/es/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  21. package/es/materials/sxp/template/CommodityDiro/index.js +2 -2
  22. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  23. package/es/materials/sxp/template/CommodityDiroNew/index.js +2 -2
  24. package/es/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  25. package/es/materials/sxp/template/MultiCommodity/index.js +12 -2
  26. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  27. package/es/materials/sxp/template/MultiCommodityDiro/index.js +12 -2
  28. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  29. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +12 -2
  30. package/es/materials/sxp/template/components/EventProvider.d.ts +1 -0
  31. package/es/materials/sxp/template/components/EventProvider.js +15 -3
  32. package/lib/core/components/SxpPageRender/RenderCard.js +3 -2
  33. package/lib/core/components/SxpPageRender/index.js +1 -2
  34. package/lib/materials/sxp/template/Appoint/index.d.ts +1 -0
  35. package/lib/materials/sxp/template/Appoint/index.js +3 -3
  36. package/lib/materials/sxp/template/Commodity/index.d.ts +1 -0
  37. package/lib/materials/sxp/template/Commodity/index.js +2 -2
  38. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  39. package/lib/materials/sxp/template/CommodityDiro/index.js +2 -2
  40. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  41. package/lib/materials/sxp/template/CommodityDiroNew/index.js +2 -2
  42. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  43. package/lib/materials/sxp/template/MultiCommodity/index.js +12 -2
  44. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  45. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +12 -2
  46. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  47. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +12 -2
  48. package/lib/materials/sxp/template/components/EventProvider.d.ts +1 -0
  49. package/lib/materials/sxp/template/components/EventProvider.js +15 -3
  50. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -8182,7 +8182,7 @@ function useEventReport() {
8182
8182
  * @Author: binruan@chatlabs.com
8183
8183
  * @Date: 2023-11-02 18:34:34
8184
8184
  * @LastEditors: binruan@chatlabs.com
8185
- * @LastEditTime: 2024-04-10 11:11:50
8185
+ * @LastEditTime: 2024-04-10 18:40:21
8186
8186
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8187
8187
  *
8188
8188
  */
@@ -9181,11 +9181,12 @@ function useOnScreen(ref) {
9181
9181
  }
9182
9182
 
9183
9183
  const EventProvider = (_a) => {
9184
- var { rec, children, className, onClick, style } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style"]);
9184
+ var { rec, children, className, onClick, style, isExternalLink = false } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink"]);
9185
9185
  const ref = React.useRef(null);
9186
9186
  const isOnScreen = useOnScreen(ref);
9187
9187
  const { popupAni } = useEditor();
9188
9188
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
9189
+ const { jumpToWeb } = useEventReport();
9189
9190
  React.useEffect(() => {
9190
9191
  var _a, _b;
9191
9192
  if (isOnScreen && (ref === null || ref === void 0 ? void 0 : ref.current)) {
@@ -9197,14 +9198,24 @@ const EventProvider = (_a) => {
9197
9198
  }
9198
9199
  }, [isOnScreen, ref, rec, ctaEvent]);
9199
9200
  const handleClick = lodash.throttle(() => {
9200
- var _a, _b;
9201
+ var _a, _b, _c, _d, _e, _f, _g, _h;
9201
9202
  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;
9202
9203
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9203
9204
  eventSubject: 'clickCta',
9204
9205
  eventDescription: 'User clicked the CTA'
9205
9206
  }, rec, item);
9206
9207
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
9207
- onClick === null || onClick === void 0 ? void 0 : onClick();
9208
+ if (isExternalLink) {
9209
+ if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.link) {
9210
+ const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
9211
+ const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
9212
+ jumpToWeb(rec, product, cta);
9213
+ window.location.href = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link;
9214
+ }
9215
+ }
9216
+ else {
9217
+ onClick === null || onClick === void 0 ? void 0 : onClick();
9218
+ }
9208
9219
  }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9209
9220
  return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
9210
9221
  };
@@ -9214,11 +9225,11 @@ var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
9214
9225
 
9215
9226
  const Commodity$1 = (_a) => {
9216
9227
  var _b, _c, _d, _e, _f, _g, _h;
9217
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9228
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9218
9229
  const { sxpParameter } = useSxpDataSource();
9219
9230
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9220
9231
  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;
9221
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9232
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9222
9233
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9223
9234
  React.createElement("img", { className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
9224
9235
  React.createElement("div", { className: css.css({
@@ -9304,12 +9315,12 @@ var interactionRender$5 = [
9304
9315
 
9305
9316
  const Appoint$1 = (_a) => {
9306
9317
  var _b, _c, _d, _e;
9307
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9318
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9308
9319
  const { sxpParameter } = useSxpDataSource();
9309
9320
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
9310
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
9321
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
9311
9322
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9312
- React.createElement("img", { className: css.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: '' })),
9323
+ React.createElement("img", { className: css.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: '' })),
9313
9324
  React.createElement("div", { className: css.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')));
9314
9325
  };
9315
9326
  var AppointComponent = React.memo(Appoint$1);
@@ -9457,11 +9468,11 @@ var styles$4 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
9457
9468
 
9458
9469
  const CommodityDiro$1 = (_a) => {
9459
9470
  var _b, _c, _d, _e, _f, _g, _h;
9460
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9471
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9461
9472
  const { sxpParameter } = useSxpDataSource();
9462
9473
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9463
9474
  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;
9464
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9475
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9465
9476
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9466
9477
  React.createElement("img", { className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
9467
9478
  React.createElement("div", { className: css.css({
@@ -9549,11 +9560,11 @@ var styles$3 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
9549
9560
 
9550
9561
  const CommodityDiroNew$1 = (_a) => {
9551
9562
  var _b, _c, _d, _e, _f, _g, _h;
9552
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9563
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9553
9564
  const { sxpParameter } = useSxpDataSource();
9554
9565
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9555
9566
  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;
9556
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9567
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9557
9568
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9558
9569
  React.createElement("img", { className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
9559
9570
  React.createElement("div", { className: css.css({
@@ -9671,9 +9682,10 @@ var styles$2 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
9671
9682
 
9672
9683
  const MultiCommodityDiro$1 = (_a) => {
9673
9684
  var _b, _c;
9674
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9685
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9675
9686
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9676
9687
  const { popupAni } = useEditor();
9688
+ const { jumpToWeb } = useEventReport();
9677
9689
  const [products, setProducts] = React.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]);
9678
9690
  const handleClick = lodash.throttle((item) => {
9679
9691
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -9681,7 +9693,15 @@ const MultiCommodityDiro$1 = (_a) => {
9681
9693
  eventDescription: 'User clicked the CTA'
9682
9694
  }, recData, item);
9683
9695
  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 }) }));
9684
- onClick === null || onClick === void 0 ? void 0 : onClick();
9696
+ if (isExternalLink) {
9697
+ if (item === null || item === void 0 ? void 0 : item.link) {
9698
+ jumpToWeb(recData, item, item.bindCta);
9699
+ window.location.href = item.link;
9700
+ }
9701
+ }
9702
+ else {
9703
+ onClick === null || onClick === void 0 ? void 0 : onClick();
9704
+ }
9685
9705
  }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9686
9706
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9687
9707
  var _a, _b, _c, _d, _e, _f;
@@ -9774,18 +9794,27 @@ var styles$1 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
9774
9794
 
9775
9795
  const MultiCommodity$1 = (_a) => {
9776
9796
  var _b, _c;
9777
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9797
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9778
9798
  const { sxpParameter } = useSxpDataSource();
9779
9799
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9780
9800
  const { popupAni } = useEditor();
9781
9801
  const [products, setProducts] = React.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]);
9802
+ const { jumpToWeb } = useEventReport();
9782
9803
  const handleClick = lodash.throttle((item) => {
9783
9804
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9784
9805
  eventSubject: 'clickCta',
9785
9806
  eventDescription: 'User clicked the CTA'
9786
9807
  }, recData, item);
9787
9808
  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 }) }));
9788
- onClick === null || onClick === void 0 ? void 0 : onClick();
9809
+ if (isExternalLink) {
9810
+ if (item === null || item === void 0 ? void 0 : item.link) {
9811
+ jumpToWeb(recData, item, item.bindCta);
9812
+ window.location.href = item.link;
9813
+ }
9814
+ }
9815
+ else {
9816
+ onClick === null || onClick === void 0 ? void 0 : onClick();
9817
+ }
9789
9818
  }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9790
9819
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9791
9820
  var _a, _b, _c, _d, _e, _f;
@@ -9878,9 +9907,10 @@ var styles = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
9878
9907
 
9879
9908
  const MultiCommodityDiroNew$1 = (_a) => {
9880
9909
  var _b, _c;
9881
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9910
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9882
9911
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9883
9912
  const { popupAni } = useEditor();
9913
+ const { jumpToWeb } = useEventReport();
9884
9914
  const [products, setProducts] = React.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]);
9885
9915
  const handleClick = lodash.throttle((item) => {
9886
9916
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -9888,7 +9918,15 @@ const MultiCommodityDiroNew$1 = (_a) => {
9888
9918
  eventDescription: 'User clicked the CTA'
9889
9919
  }, recData, item);
9890
9920
  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 }) }));
9891
- onClick === null || onClick === void 0 ? void 0 : onClick();
9921
+ if (isExternalLink) {
9922
+ if (item === null || item === void 0 ? void 0 : item.link) {
9923
+ jumpToWeb(recData, item, item.bindCta);
9924
+ window.location.href = item.link;
9925
+ }
9926
+ }
9927
+ else {
9928
+ onClick === null || onClick === void 0 ? void 0 : onClick();
9929
+ }
9892
9930
  }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9893
9931
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9894
9932
  var _a, _b, _c, _d, _e, _f;
@@ -12374,14 +12412,14 @@ function withBindDataSource(Component) {
12374
12412
  * @Author: binruan@chatlabs.com
12375
12413
  * @Date: 2023-12-26 16:11:34
12376
12414
  * @LastEditors: binruan@chatlabs.com
12377
- * @LastEditTime: 2024-04-09 18:17:54
12415
+ * @LastEditTime: 2024-04-10 16:49:34
12378
12416
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
12379
12417
  *
12380
12418
  */
12381
12419
  const RenderCard = ({ rec, index, tempMap, resolver }) => {
12382
12420
  const { schema } = useEditor();
12383
12421
  const renderComp = React.useMemo(() => {
12384
- 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;
12422
+ 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;
12385
12423
  if (!(rec === null || rec === void 0 ? void 0 : rec.video))
12386
12424
  return null;
12387
12425
  let cta = null;
@@ -12407,7 +12445,8 @@ const RenderCard = ({ rec, index, tempMap, resolver }) => {
12407
12445
  const t = resolver[(_w = value === null || value === void 0 ? void 0 : value.item) === null || _w === void 0 ? void 0 : _w.type];
12408
12446
  const Component = withBindDataSource(t);
12409
12447
  const defaulSetting = (_x = t === null || t === void 0 ? void 0 : t.extend) === null || _x === void 0 ? void 0 : _x.defaulSetting;
12410
- return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec })));
12448
+ 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';
12449
+ 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 })));
12411
12450
  }
12412
12451
  else {
12413
12452
  return null;
@@ -12618,8 +12657,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12618
12657
  React.createElement(Nudge, { nudge: nudge }),
12619
12658
  React.createElement("div", { className: 'clc-sxp-bottom-card' },
12620
12659
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
12621
- React.createElement("div", { className: 'clc-sxp-bottom-text' },
12622
- 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 })),
12660
+ 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 }),
12623
12661
  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 }))));
12624
12662
  }
12625
12663
  return null;