pb-sxp-ui 1.1.2 → 1.2.0

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 (166) hide show
  1. package/dist/index.cjs +2260 -861
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +356 -175
  4. package/dist/index.js +2260 -861
  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 +2260 -861
  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/Pagebuilder/type.d.ts +1 -0
  15. package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -1
  16. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
  17. package/es/core/components/SxpPageRender/Hashtag/index.js +1 -3
  18. package/es/core/components/SxpPageRender/Modal/index.d.ts +3 -0
  19. package/es/core/components/SxpPageRender/Modal/index.js +70 -6
  20. package/es/core/components/SxpPageRender/Navbar.js +1 -1
  21. package/es/core/components/SxpPageRender/Popup/index.js +1 -1
  22. package/es/core/components/SxpPageRender/RenderCard.d.ts +1 -0
  23. package/es/core/components/SxpPageRender/RenderCard.js +16 -12
  24. package/es/core/components/SxpPageRender/VideoWidget/index.js +10 -13
  25. package/es/core/components/SxpPageRender/WaterFall/List.js +1 -1
  26. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
  27. package/es/core/components/SxpPageRender/index.d.ts +3 -3
  28. package/es/core/components/SxpPageRender/index.js +51 -17
  29. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  30. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  31. package/es/core/context/SxpDataSourceProvider.js +6 -3
  32. package/es/core/utils/localStore.d.ts +3 -0
  33. package/es/core/utils/localStore.js +8 -0
  34. package/es/materials/sxp/HashTag/material.js +1 -2
  35. package/es/materials/sxp/cta/AniLink/index.d.ts +14 -0
  36. package/es/materials/sxp/cta/AniLink/index.js +58 -0
  37. package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +42 -0
  38. package/es/materials/sxp/cta/AniLink/interactionRender.js +50 -0
  39. package/es/materials/sxp/cta/AniLink/material.d.ts +2 -0
  40. package/es/materials/sxp/cta/AniLink/material.js +38 -0
  41. package/es/materials/sxp/cta/AniLink/settingRender.d.ts +73 -0
  42. package/es/materials/sxp/cta/AniLink/settingRender.js +103 -0
  43. package/es/materials/sxp/cta/AniLinkPopup/index.d.ts +17 -0
  44. package/es/materials/sxp/cta/AniLinkPopup/index.js +65 -0
  45. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +42 -0
  46. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +50 -0
  47. package/es/materials/sxp/cta/AniLinkPopup/material.d.ts +2 -0
  48. package/es/materials/sxp/cta/AniLinkPopup/material.js +52 -0
  49. package/es/materials/sxp/cta/AniLinkPopup/settingRender.d.ts +176 -0
  50. package/es/materials/sxp/cta/AniLinkPopup/settingRender.js +249 -0
  51. package/es/materials/sxp/cta/index.d.ts +2 -0
  52. package/es/materials/sxp/cta/index.js +2 -0
  53. package/es/materials/sxp/index.d.ts +1 -0
  54. package/es/materials/sxp/index.js +1 -0
  55. package/es/materials/sxp/popup/AppointForm/Form.js +1 -1
  56. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +5 -0
  57. package/es/materials/sxp/popup/CommodityDetail/index.js +43 -26
  58. package/es/materials/sxp/popup/CommodityDetail/interactionRender.d.ts +9 -0
  59. package/es/materials/sxp/popup/CommodityDetail/interactionRender.js +12 -0
  60. package/es/materials/sxp/popup/CommodityDetail/material.js +3 -1
  61. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +37 -0
  62. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +41 -0
  63. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +5 -0
  64. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -25
  65. package/es/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.d.ts +9 -0
  66. package/es/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.js +12 -0
  67. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +3 -1
  68. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +37 -0
  69. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +41 -0
  70. package/es/materials/sxp/popup/CommodityList/index.d.ts +28 -0
  71. package/es/materials/sxp/popup/CommodityList/index.js +56 -0
  72. package/es/materials/sxp/popup/CommodityList/interactionRender.d.ts +8 -0
  73. package/es/materials/sxp/popup/CommodityList/interactionRender.js +11 -0
  74. package/es/materials/sxp/popup/CommodityList/material.d.ts +2 -0
  75. package/es/materials/sxp/popup/CommodityList/material.js +51 -0
  76. package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +151 -0
  77. package/es/materials/sxp/popup/CommodityList/settingRender.js +207 -0
  78. package/es/materials/sxp/popup/index.d.ts +1 -0
  79. package/es/materials/sxp/popup/index.js +1 -0
  80. package/es/materials/sxp/template/Link/index.js +2 -2
  81. package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
  82. package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  83. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -4
  84. package/es/materials/sxp/template/components/CommodityGroup.d.ts +14 -0
  85. package/es/materials/sxp/template/components/CommodityGroup.js +31 -0
  86. package/es/materials/sxp/template/components/Img.js +1 -1
  87. package/es/materials/sxp/template/components/Scroll.d.ts +2 -1
  88. package/es/materials/sxp/template/components/Scroll.js +10 -3
  89. package/es/materials/sxp/template/components/settingRender.js +0 -5
  90. package/lib/core/Pagebuilder/type.d.ts +1 -0
  91. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -1
  92. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
  93. package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -3
  94. package/lib/core/components/SxpPageRender/Modal/index.d.ts +3 -0
  95. package/lib/core/components/SxpPageRender/Modal/index.js +70 -6
  96. package/lib/core/components/SxpPageRender/Navbar.js +1 -1
  97. package/lib/core/components/SxpPageRender/Popup/index.js +1 -1
  98. package/lib/core/components/SxpPageRender/RenderCard.d.ts +1 -0
  99. package/lib/core/components/SxpPageRender/RenderCard.js +16 -12
  100. package/lib/core/components/SxpPageRender/VideoWidget/index.js +10 -13
  101. package/lib/core/components/SxpPageRender/WaterFall/List.js +1 -1
  102. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
  103. package/lib/core/components/SxpPageRender/index.d.ts +3 -3
  104. package/lib/core/components/SxpPageRender/index.js +50 -16
  105. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  106. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  107. package/lib/core/context/SxpDataSourceProvider.js +6 -3
  108. package/lib/core/utils/localStore.d.ts +3 -0
  109. package/lib/core/utils/localStore.js +11 -1
  110. package/lib/materials/sxp/HashTag/material.js +1 -2
  111. package/lib/materials/sxp/cta/AniLink/index.d.ts +14 -0
  112. package/lib/materials/sxp/cta/AniLink/index.js +60 -0
  113. package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +42 -0
  114. package/lib/materials/sxp/cta/AniLink/interactionRender.js +52 -0
  115. package/lib/materials/sxp/cta/AniLink/material.d.ts +2 -0
  116. package/lib/materials/sxp/cta/AniLink/material.js +42 -0
  117. package/lib/materials/sxp/cta/AniLink/settingRender.d.ts +73 -0
  118. package/lib/materials/sxp/cta/AniLink/settingRender.js +105 -0
  119. package/lib/materials/sxp/cta/AniLinkPopup/index.d.ts +17 -0
  120. package/lib/materials/sxp/cta/AniLinkPopup/index.js +67 -0
  121. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +42 -0
  122. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +52 -0
  123. package/lib/materials/sxp/cta/AniLinkPopup/material.d.ts +2 -0
  124. package/lib/materials/sxp/cta/AniLinkPopup/material.js +56 -0
  125. package/lib/materials/sxp/cta/AniLinkPopup/settingRender.d.ts +176 -0
  126. package/lib/materials/sxp/cta/AniLinkPopup/settingRender.js +251 -0
  127. package/lib/materials/sxp/cta/index.d.ts +2 -0
  128. package/lib/materials/sxp/cta/index.js +5 -0
  129. package/lib/materials/sxp/index.d.ts +1 -0
  130. package/lib/materials/sxp/index.js +1 -0
  131. package/lib/materials/sxp/popup/AppointForm/Form.js +1 -1
  132. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +5 -0
  133. package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -26
  134. package/lib/materials/sxp/popup/CommodityDetail/interactionRender.d.ts +9 -0
  135. package/lib/materials/sxp/popup/CommodityDetail/interactionRender.js +14 -0
  136. package/lib/materials/sxp/popup/CommodityDetail/material.js +3 -1
  137. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +37 -0
  138. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +41 -0
  139. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +5 -0
  140. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -25
  141. package/lib/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.d.ts +9 -0
  142. package/lib/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.js +14 -0
  143. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +3 -1
  144. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +37 -0
  145. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +41 -0
  146. package/lib/materials/sxp/popup/CommodityList/index.d.ts +28 -0
  147. package/lib/materials/sxp/popup/CommodityList/index.js +58 -0
  148. package/lib/materials/sxp/popup/CommodityList/interactionRender.d.ts +8 -0
  149. package/lib/materials/sxp/popup/CommodityList/interactionRender.js +13 -0
  150. package/lib/materials/sxp/popup/CommodityList/material.d.ts +2 -0
  151. package/lib/materials/sxp/popup/CommodityList/material.js +55 -0
  152. package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +151 -0
  153. package/lib/materials/sxp/popup/CommodityList/settingRender.js +209 -0
  154. package/lib/materials/sxp/popup/index.d.ts +1 -0
  155. package/lib/materials/sxp/popup/index.js +1 -0
  156. package/lib/materials/sxp/template/Link/index.js +2 -2
  157. package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
  158. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  159. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -4
  160. package/lib/materials/sxp/template/components/CommodityGroup.d.ts +14 -0
  161. package/lib/materials/sxp/template/components/CommodityGroup.js +34 -0
  162. package/lib/materials/sxp/template/components/Img.js +1 -1
  163. package/lib/materials/sxp/template/components/Scroll.d.ts +2 -1
  164. package/lib/materials/sxp/template/components/Scroll.js +9 -2
  165. package/lib/materials/sxp/template/components/settingRender.js +0 -5
  166. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -405,8 +405,9 @@ const getFeSessionId = () => {
405
405
  };
406
406
 
407
407
  const FAKE_USER_KEY = 'SXP_FAKE_USER_ID';
408
- const FAKE_USER_STATE = 'FAKE_USER_STATE';
408
+ const FAKE_USER_STATE = 'FAKE_USER_STATE'; //新用户仅显示一次滑动提示
409
409
  const AGREE_POLICY = 'AGREE_POLICY';
410
+ const SLIDE_SKIP_STATE = 'SLIDE_SKIP_STATE'; //新用户滑动下一个视频跳转外链状态(触发过一次就不再触发)
410
411
  const storeAndLoadFeUserId = () => {
411
412
  let fakeUserId = window.localStorage.getItem(FAKE_USER_KEY);
412
413
  if (isEmpty(fakeUserId)) {
@@ -422,6 +423,13 @@ const getFeUserId = () => {
422
423
  }
423
424
  return isEmpty(fakeUserState);
424
425
  };
426
+ const getSlideSkipState = () => {
427
+ const slideSkipState = window.localStorage.getItem(SLIDE_SKIP_STATE);
428
+ return isEmpty(slideSkipState);
429
+ };
430
+ const setSlideSkipState = () => {
431
+ window.localStorage.setItem(SLIDE_SKIP_STATE, 'true');
432
+ };
425
433
 
426
434
  /*
427
435
  * @Author: binruan@chatlabs.com
@@ -605,8 +613,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
605
613
  };
606
614
  if (utmVal) {
607
615
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
616
+ var _a, _b;
608
617
  const key = val.split('=')[0];
609
- return UTM_KEYS.includes(key);
618
+ return (_b = ((_a = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.channels) !== null && _a !== void 0 ? _a : UTM_KEYS)) === null || _b === void 0 ? void 0 : _b.includes(key);
610
619
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
611
620
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
612
621
  }
@@ -699,8 +708,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
699
708
  return;
700
709
  try {
701
710
  const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
711
+ var _a, _b;
702
712
  const key = val.split('=')[0];
703
- return UTM_KEYS.includes(key);
713
+ return (_b = ((_a = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.channels) !== null && _a !== void 0 ? _a : UTM_KEYS)) === null || _b === void 0 ? void 0 : _b.includes(key);
704
714
  })) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
705
715
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
706
716
  setTagList((_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []);
@@ -838,7 +848,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
838
848
  themeTag,
839
849
  isShowConsent,
840
850
  selectTag,
841
- setSelectTag
851
+ setSelectTag,
852
+ globalConfig
842
853
  } }, isShowConsent ? (React.createElement(Consent$3, Object.assign({}, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props))) : (render({
843
854
  rtcList,
844
855
  mutateLike: bffMutateLike,
@@ -1075,7 +1086,7 @@ var index$2 = /*#__PURE__*/Object.freeze({
1075
1086
  EditorCore: EditorCore
1076
1087
  });
1077
1088
 
1078
- var interactionRender$8 = [
1089
+ var interactionRender$d = [
1079
1090
  {
1080
1091
  title: '点击事件',
1081
1092
  child: [
@@ -1095,7 +1106,7 @@ var interactionRender$8 = [
1095
1106
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
1096
1107
  *
1097
1108
  */
1098
- var settingRender$6 = [
1109
+ var settingRender$9 = [
1099
1110
  {
1100
1111
  type: 'Text',
1101
1112
  label: '组件名称',
@@ -1347,14 +1358,14 @@ function useEventReport() {
1347
1358
  * @Author: binruan@chatlabs.com
1348
1359
  * @Date: 2024-06-27 16:22:34
1349
1360
  * @LastEditors: binruan@chatlabs.com
1350
- * @LastEditTime: 2024-07-02 10:34:34
1361
+ * @LastEditTime: 2024-07-05 14:55:25
1351
1362
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\Form.tsx
1352
1363
  *
1353
1364
  */
1354
1365
  const Form = ({ layout, columns, onChange }) => {
1355
1366
  return (React.createElement(React.Fragment, null, columns === null || columns === void 0 ? void 0 : columns.map((item, index) => (React.createElement("div", { key: index, className: 'pb-appoint-form-container-item', style: { flexDirection: layout === 'horizontal' ? 'row' : 'column' } },
1356
1367
  layout !== 'inline' && React.createElement("label", { className: 'pb-appoint-form-container-label' }, item === null || item === void 0 ? void 0 : item.title),
1357
- (item === null || item === void 0 ? void 0 : item.valueType) === 'text' && (React.createElement("input", { className: 'pb-appoint-form-container-input', type: 'text', placeholder: layout === 'inline' ? item === null || item === void 0 ? void 0 : item.title : '请输入', name: item === null || item === void 0 ? void 0 : item.dataIndex, onChange: onChange })))))));
1368
+ (item === null || item === void 0 ? void 0 : item.valueType) === 'text' && (React.createElement("input", Object.assign({ className: 'pb-appoint-form-container-input', type: 'text', placeholder: layout === 'inline' ? item === null || item === void 0 ? void 0 : item.title : '请输入', name: item === null || item === void 0 ? void 0 : item.dataIndex }, (onChange && { onChange: onChange })))))))));
1358
1369
  };
1359
1370
  var Form$1 = memo(Form);
1360
1371
 
@@ -1461,9 +1472,9 @@ const AppointForm = createMaterial(AppointFormComponent, {
1461
1472
  category: 'popup',
1462
1473
  type: 'AppointForm',
1463
1474
  related: {
1464
- settingRender: settingRender$6,
1475
+ settingRender: settingRender$9,
1465
1476
  bindableProps: [],
1466
- interactionRender: interactionRender$8
1477
+ interactionRender: interactionRender$d
1467
1478
  },
1468
1479
  defaulSetting: {
1469
1480
  name: '表单',
@@ -1486,7 +1497,7 @@ const AppointForm = createMaterial(AppointFormComponent, {
1486
1497
  sort: 2
1487
1498
  });
1488
1499
 
1489
- var settingRender$5 = [
1500
+ var settingRender$8 = [
1490
1501
  {
1491
1502
  title: '商品图片',
1492
1503
  child: [
@@ -1525,6 +1536,47 @@ var settingRender$5 = [
1525
1536
  }
1526
1537
  ]
1527
1538
  },
1539
+ {
1540
+ title: '多商品切换器',
1541
+ child: [
1542
+ {
1543
+ type: 'Switch',
1544
+ name: ['props', 'commodityGroup', 'open'],
1545
+ label: '快速切换开关'
1546
+ },
1547
+ {
1548
+ type: 'Group',
1549
+ child: [
1550
+ {
1551
+ label: '居中垂直偏移',
1552
+ type: 'Number',
1553
+ name: ['props', 'commodityGroup', 'translateY'],
1554
+ min: -1000,
1555
+ addonAfter: '%',
1556
+ initialValue: 0
1557
+ }
1558
+ ]
1559
+ },
1560
+ {
1561
+ type: 'Group',
1562
+ child: [
1563
+ {
1564
+ label: '上边距',
1565
+ name: ['props', 'commodityGroup', 'style', 'marginTop'],
1566
+ type: 'Number',
1567
+ addonAfter: 'px',
1568
+ initialValue: 20
1569
+ },
1570
+ {
1571
+ label: '下边距',
1572
+ name: ['props', 'commodityGroup', 'style', 'marginBottom'],
1573
+ type: 'Number',
1574
+ addonAfter: 'px'
1575
+ }
1576
+ ]
1577
+ }
1578
+ ]
1579
+ },
1528
1580
  {
1529
1581
  title: '商品文本',
1530
1582
  child: [
@@ -8532,15 +8584,24 @@ SwiperSlide.displayName = 'SwiperSlide';
8532
8584
  * @Author: binruan@chatlabs.com
8533
8585
  * @Date: 2023-11-02 18:34:34
8534
8586
  * @LastEditors: binruan@chatlabs.com
8535
- * @LastEditTime: 2024-04-12 11:23:00
8587
+ * @LastEditTime: 2024-07-19 18:39:54
8536
8588
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8537
8589
  *
8538
8590
  */
8539
- const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8540
- const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
8541
- var _a;
8591
+ const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8592
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8593
+ var _a, _b;
8594
+ const touchRef = useRef(null);
8595
+ const fTouchRef = useRef(null);
8596
+ const touchMoveRef = useRef(null);
8597
+ const ref = useRef(null);
8598
+ const MODAL_DEF_TRANS = fullHeight * 0.2;
8599
+ const MODAL_DEF_CON_H = isFullScreen ? fullHeight : fullHeight * 0.8;
8600
+ const [modalTrans, setModalTrans] = useState(MODAL_DEF_TRANS);
8542
8601
  const [isShow, setIsShow] = useState(false);
8543
8602
  const modalEleRef = useRef(null);
8603
+ const { globalConfig, popupDetailData } = useSxpDataSource();
8604
+ const { schema: _schema } = useEditor();
8544
8605
  useEffect(() => {
8545
8606
  const parentNode = document.getElementById('sxp-render');
8546
8607
  const node = document.getElementById('pb-modal');
@@ -8556,6 +8617,12 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
8556
8617
  const isOpen = useMemo(() => {
8557
8618
  return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
8558
8619
  }, [visible, popup]);
8620
+ const isScrollFullScreen = useMemo(() => {
8621
+ var _a, _b, _c, _d, _e;
8622
+ const schemaData = schema !== null && schema !== void 0 ? schema : _schema;
8623
+ const value = (_c = (_b = (_a = schemaData === null || schemaData === void 0 ? void 0 : schemaData.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.find((value) => (value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id));
8624
+ return ((_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.event) === null || _e === void 0 ? void 0 : _e.isScrollFullScreen) || false;
8625
+ }, [popup, schema, _schema]);
8559
8626
  useEffect(() => {
8560
8627
  if (isOpen) {
8561
8628
  setIsShow(true);
@@ -8563,6 +8630,7 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
8563
8630
  else {
8564
8631
  setTimeout(() => {
8565
8632
  setIsShow(false);
8633
+ setModalTrans(MODAL_DEF_TRANS);
8566
8634
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
8567
8635
  }
8568
8636
  }, [isOpen, popup]);
@@ -8571,14 +8639,61 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
8571
8639
  const handleClose = debounce(() => {
8572
8640
  onClose === null || onClose === void 0 ? void 0 : onClose();
8573
8641
  }, 300);
8642
+ const handleTouchStart = (event) => {
8643
+ event.stopPropagation();
8644
+ touchRef.current = event.touches[0].clientY;
8645
+ fTouchRef.current = event.touches[0].clientY;
8646
+ touchMoveRef.current = true;
8647
+ };
8648
+ const handleTouchMove = (event) => {
8649
+ event.stopPropagation();
8650
+ requestAnimationFrame(() => {
8651
+ var _a;
8652
+ if (touchMoveRef.current && ((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.scrollTop) === 0) {
8653
+ const currentY = event.touches[0].clientY;
8654
+ const diff = touchRef.current - currentY;
8655
+ touchRef.current = currentY;
8656
+ const ts = modalTrans - diff;
8657
+ if (ts > 0) {
8658
+ setModalTrans(ts);
8659
+ }
8660
+ }
8661
+ });
8662
+ };
8663
+ const handleTouchEnd = (event) => {
8664
+ var _a;
8665
+ event.stopPropagation();
8666
+ if (touchMoveRef.current && ((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.scrollTop) === 0) {
8667
+ const diff = fTouchRef.current - touchRef.current;
8668
+ if (diff > 0) {
8669
+ setModalTrans(0);
8670
+ }
8671
+ else if (modalTrans < MODAL_DEF_TRANS && diff < 0) {
8672
+ setModalTrans(MODAL_DEF_TRANS);
8673
+ }
8674
+ else if (modalTrans >= MODAL_DEF_TRANS && diff < 0) {
8675
+ onClose === null || onClose === void 0 ? void 0 : onClose();
8676
+ }
8677
+ }
8678
+ touchMoveRef.current = false;
8679
+ };
8574
8680
  return ReactDOM.createPortal(React.createElement(React.Fragment, null, isShow && (React.createElement("div", { className: 'modal-bg', style: Object.assign({ display: 'flex', backgroundColor: isOpen ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
8575
- React.createElement("div", { className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: { padding, animationDuration: ((_a = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _a !== void 0 ? _a : 0) / 1000 + 's' }, onClick: (e) => {
8681
+ React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign({ padding, animationDuration: ((_a = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _a !== void 0 ? _a : 0) / 1000 + 's' }, (isScrollFullScreen && {
8682
+ transform: `translateY(${modalTrans}px)`
8683
+ })), onClick: (e) => {
8576
8684
  e.stopPropagation();
8577
8685
  e.preventDefault();
8578
- } },
8686
+ } }, (isScrollFullScreen && {
8687
+ onTouchMove: handleTouchMove,
8688
+ onTouchStart: handleTouchStart,
8689
+ onTouchEnd: handleTouchEnd
8690
+ })),
8579
8691
  React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8580
- React.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
8581
- children)))), modalEleRef.current);
8692
+ React.createElement("img", { src: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _b !== void 0 ? _b : closeIcon$1, alt: 'close', className: 'modal-icon' })),
8693
+ React.createElement("div", { ref: ref, style: {
8694
+ height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
8695
+ overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8696
+ } }, children))))), modalEleRef.current);
8582
8697
  };
8583
8698
  var Modal$1 = memo(Modal);
8584
8699
 
@@ -8702,14 +8817,52 @@ const FormatImage = forwardRef((props, ref) => {
8702
8817
  });
8703
8818
  var FormatImage$1 = memo(FormatImage);
8704
8819
 
8820
+ const Scroll = ({ children, isPadding = true, style }) => {
8821
+ const ref = useRef();
8822
+ const { popupDetailData } = useSxpDataSource();
8823
+ useEffect(() => {
8824
+ var _a;
8825
+ (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex);
8826
+ }, [popupDetailData]);
8827
+ return (React.createElement(Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [freeMode, Scrollbar, Mousewheel], style: Object.assign({ padding: isPadding ? '0 12px 0 20px' : 0 }, style) }, children));
8828
+ };
8829
+ var Scroll$1 = memo(Scroll);
8830
+
8831
+ const CommodityGroup = ({ products, data, defImg, style }) => {
8832
+ var _a, _b;
8833
+ const { setPopupDetailData, popupDetailData } = useSxpDataSource();
8834
+ const [check, setCheck] = useState((_a = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _a !== void 0 ? _a : 0);
8835
+ const handleClick = useCallback((index) => {
8836
+ setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData((val) => (Object.assign(Object.assign({}, val), { video: Object.assign(Object.assign({}, val === null || val === void 0 ? void 0 : val.video), { bindProduct: products === null || products === void 0 ? void 0 : products[index] }), multiCheckIndex: index })));
8837
+ }, []);
8838
+ return (React.createElement(React.Fragment, null, (data === null || data === void 0 ? void 0 : data.open) && ((products && (products === null || products === void 0 ? void 0 : products.length) > 0) || !popupDetailData) && (React.createElement(Scroll$1, { isPadding: false, style: Object.assign(Object.assign({}, style), data === null || data === void 0 ? void 0 : data.style) }, (_b = (popupDetailData ? products : [0, 1, 2, 3])) === null || _b === void 0 ? void 0 : _b.map((item, index) => {
8839
+ var _a, _b, _c;
8840
+ return (React.createElement(SwiperSlide, { className: css({
8841
+ width: '50px',
8842
+ height: '50px',
8843
+ marginRight: '10px'
8844
+ }), onClick: () => handleClick(index), key: index },
8845
+ React.createElement(FormatImage$1, { style: {
8846
+ height: '100%',
8847
+ width: '100%',
8848
+ objectFit: 'cover',
8849
+ display: 'block',
8850
+ objectPosition: `50% ${(data === null || data === void 0 ? void 0 : data.translateY) ? -(data === null || data === void 0 ? void 0 : data.translateY) + 50 : 50}%`,
8851
+ border: check === index ? '1px solid #000' : '1px solid #f2f2f2'
8852
+ }, src: (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : defImg })));
8853
+ })))));
8854
+ };
8855
+ var CommodityGroup$1 = memo(CommodityGroup);
8856
+
8705
8857
  const CommodityDetail$1 = (_a) => {
8706
8858
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
8707
- var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index"]);
8859
+ var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
8708
8860
  const { sxpParameter } = useSxpDataSource();
8709
8861
  const { popupDetailData, bffEventReport, isPreview, bffFbReport } = useSxpDataSource();
8710
8862
  const { jumpToWeb, productView } = useEventReport();
8711
8863
  const curTimeRef = useRef(null);
8712
8864
  const [showModal, setShowModal] = useState(false);
8865
+ const [show3DModal, setShow3DModal] = useState(false);
8713
8866
  const data = isPost ? rec : popupDetailData;
8714
8867
  const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8715
8868
  const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
@@ -8784,31 +8937,39 @@ const CommodityDetail$1 = (_a) => {
8784
8937
  }
8785
8938
  return style;
8786
8939
  }, []);
8787
- return (React.createElement("div", { className: 'pb-commondity' },
8940
+ const renderCommodityGroup = useCallback(() => {
8941
+ var _a, _b, _c;
8942
+ if (isPost)
8943
+ return;
8944
+ return (React.createElement(CommodityGroup$1, { products: (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts, data: commodityGroup, defImg: (_c = (_b = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _b !== void 0 ? _b : bottom_image) !== null && _c !== void 0 ? _c : '', style: { padding: '0 19px' } }));
8945
+ }, []);
8946
+ return (React.createElement(React.Fragment, null,
8788
8947
  React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
8789
- product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8790
- clickable: true,
8791
- bulletActiveClass: 'swipe-item-active-bullet',
8792
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
8793
- ? 'commondityDetail-swiper-clickable-left'
8794
- : 'commondityDetail-swiper-clickable-center'
8795
- }, loop: true, autoplay: {
8796
- delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8797
- } }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
8798
- return (React.createElement(SwiperSlide, { key: src },
8799
- React.createElement("div", { style: {
8800
- overflow: 'hidden',
8801
- width,
8802
- height: width
8803
- } },
8804
- React.createElement(FormatImage$1, { style: {
8805
- height: '100%',
8806
- width: '100%',
8807
- objectFit: 'cover',
8808
- display: 'block',
8809
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
8810
- }, src: src }))));
8811
- }))),
8948
+ product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement("div", { style: { position: 'relative' } },
8949
+ React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8950
+ clickable: true,
8951
+ bulletActiveClass: 'swipe-item-active-bullet',
8952
+ clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
8953
+ ? 'commondityDetail-swiper-clickable-left'
8954
+ : 'commondityDetail-swiper-clickable-center'
8955
+ }, loop: true, autoplay: {
8956
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8957
+ } },
8958
+ React.createElement(React.Fragment, null, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
8959
+ return (React.createElement(SwiperSlide, { key: src },
8960
+ React.createElement("div", { style: {
8961
+ overflow: 'hidden',
8962
+ width,
8963
+ height: width
8964
+ } },
8965
+ React.createElement(FormatImage$1, { style: {
8966
+ height: '100%',
8967
+ width: '100%',
8968
+ objectFit: 'cover',
8969
+ display: 'block',
8970
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
8971
+ }, src: src }))));
8972
+ }))))),
8812
8973
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
8813
8974
  position: 'relative',
8814
8975
  height: 0,
@@ -8823,19 +8984,55 @@ const CommodityDetail$1 = (_a) => {
8823
8984
  objectFit: 'cover',
8824
8985
  width: '100%'
8825
8986
  }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
8987
+ renderCommodityGroup(),
8826
8988
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
8827
8989
  renderBtn(),
8828
8990
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
8829
8991
  React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
8830
- renderBtn())));
8992
+ renderBtn()),
8993
+ React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
8994
+ React.createElement("iframe", { src: 'https://rimowa.threedium.co.uk/product-experience/latest/?sku=92573974&lang=en', style: {
8995
+ width: '100%',
8996
+ height: 'calc(100% - 40px)',
8997
+ marginTop: '40px'
8998
+ } }))));
8831
8999
  };
8832
9000
  var CommodityDetailComponent = memo(CommodityDetail$1);
8833
9001
 
9002
+ /*
9003
+ * @Author: binruan@chatlabs.com
9004
+ * @Date: 2024-07-09 14:35:10
9005
+ * @LastEditors: binruan@chatlabs.com
9006
+ * @LastEditTime: 2024-07-12 17:53:02
9007
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\interactionRender.tsx
9008
+ *
9009
+ */
9010
+ /*
9011
+ * @Author: binruan@chatlabs.com
9012
+ * @Date: 2024-07-05 14:08:41
9013
+ * @LastEditors: binruan@chatlabs.com
9014
+ * @LastEditTime: 2024-07-09 14:34:49
9015
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9016
+ *
9017
+ */
9018
+ var interactionRender$c = [
9019
+ {
9020
+ title: '滑动事件',
9021
+ child: [
9022
+ {
9023
+ type: 'Switch',
9024
+ label: '滑动铺满全屏',
9025
+ name: ['isScrollFullScreen']
9026
+ }
9027
+ ]
9028
+ }
9029
+ ];
9030
+
8834
9031
  /*
8835
9032
  * @Author: binruan@chatlabs.com
8836
9033
  * @Date: 2023-07-28 18:29:57
8837
9034
  * @LastEditors: binruan@chatlabs.com
8838
- * @LastEditTime: 2024-04-02 18:13:10
9035
+ * @LastEditTime: 2024-07-12 17:40:06
8839
9036
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
8840
9037
  *
8841
9038
  */
@@ -8845,7 +9042,8 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
8845
9042
  category: 'popup',
8846
9043
  type: 'CommodityDetail',
8847
9044
  related: {
8848
- settingRender: settingRender$5
9045
+ settingRender: settingRender$8,
9046
+ interactionRender: interactionRender$c
8849
9047
  },
8850
9048
  defaulSetting: {
8851
9049
  props: {
@@ -8890,7 +9088,7 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
8890
9088
  sort: 1
8891
9089
  });
8892
9090
 
8893
- var interactionRender$7 = [
9091
+ var interactionRender$b = [
8894
9092
  {
8895
9093
  title: '点击事件',
8896
9094
  child: [
@@ -8910,7 +9108,7 @@ var interactionRender$7 = [
8910
9108
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
8911
9109
  *
8912
9110
  */
8913
- var settingRender$4 = [
9111
+ var settingRender$7 = [
8914
9112
  {
8915
9113
  title: '',
8916
9114
  child: [
@@ -9080,9 +9278,9 @@ const Prompt = createMaterial(PromptComponent, {
9080
9278
  category: 'popup',
9081
9279
  type: 'Prompt',
9082
9280
  related: {
9083
- settingRender: settingRender$4,
9281
+ settingRender: settingRender$7,
9084
9282
  bindableProps: [],
9085
- interactionRender: interactionRender$7
9283
+ interactionRender: interactionRender$b
9086
9284
  },
9087
9285
  defaulSetting: {
9088
9286
  props: {
@@ -9101,11 +9299,11 @@ const Prompt = createMaterial(PromptComponent, {
9101
9299
  * @Author: binruan@chatlabs.com
9102
9300
  * @Date: 2024-03-26 16:50:25
9103
9301
  * @LastEditors: binruan@chatlabs.com
9104
- * @LastEditTime: 2024-06-27 09:54:23
9302
+ * @LastEditTime: 2024-07-12 14:44:50
9105
9303
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9106
9304
  *
9107
9305
  */
9108
- var settingRender$3 = [
9306
+ var settingRender$6 = [
9109
9307
  {
9110
9308
  title: '商品图片',
9111
9309
  child: [
@@ -9144,6 +9342,47 @@ var settingRender$3 = [
9144
9342
  }
9145
9343
  ]
9146
9344
  },
9345
+ {
9346
+ title: '多商品切换器',
9347
+ child: [
9348
+ {
9349
+ type: 'Switch',
9350
+ name: ['props', 'commodityGroup', 'open'],
9351
+ label: '快速切换开关'
9352
+ },
9353
+ {
9354
+ type: 'Group',
9355
+ child: [
9356
+ {
9357
+ label: '居中垂直偏移',
9358
+ type: 'Number',
9359
+ name: ['props', 'commodityGroup', 'translateY'],
9360
+ min: -1000,
9361
+ addonAfter: '%',
9362
+ initialValue: 0
9363
+ }
9364
+ ]
9365
+ },
9366
+ {
9367
+ type: 'Group',
9368
+ child: [
9369
+ {
9370
+ label: '上边距',
9371
+ name: ['props', 'commodityGroup', 'style', 'marginTop'],
9372
+ type: 'Number',
9373
+ addonAfter: 'px',
9374
+ initialValue: 20
9375
+ },
9376
+ {
9377
+ label: '下边距',
9378
+ name: ['props', 'commodityGroup', 'style', 'marginBottom'],
9379
+ type: 'Number',
9380
+ addonAfter: 'px'
9381
+ }
9382
+ ]
9383
+ }
9384
+ ]
9385
+ },
9147
9386
  {
9148
9387
  title: '商品文本',
9149
9388
  child: [
@@ -9314,14 +9553,11 @@ var settingRender$3 = [
9314
9553
 
9315
9554
  const CommodityDetailDiroNew$1 = (_a) => {
9316
9555
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
9317
- var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index"]);
9556
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
9318
9557
  useState(true);
9319
9558
  const { sxpParameter } = useSxpDataSource();
9320
9559
  const { popupDetailData, bffEventReport, isPreview, swiperRef, bffFbReport } = useSxpDataSource();
9321
9560
  const { jumpToWeb, productView } = useEventReport();
9322
- const scrollRef = useRef(null);
9323
- useRef(null);
9324
- useRef(null);
9325
9561
  useState(false);
9326
9562
  useState(false);
9327
9563
  useState(true);
@@ -9369,6 +9605,56 @@ const CommodityDetailDiroNew$1 = (_a) => {
9369
9605
  }
9370
9606
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
9371
9607
  const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
9608
+ // useEffect(() => {
9609
+ // console.log(scrollRef?.current?.scrollHeight, window.innerHeight);
9610
+ // if (scrollRef?.current && scrollRef?.current?.scrollHeight > window.innerHeight) {
9611
+ // setStopSlide(true);
9612
+ // }
9613
+ // }, [scrollRef]);
9614
+ // useEffect(() => {
9615
+ // const handleScroll = () => {
9616
+ // if (scrollRef?.current) {
9617
+ // const { scrollTop, scrollHeight, clientHeight } = scrollRef.current;
9618
+ // const isBottom = scrollTop + clientHeight === scrollHeight;
9619
+ // if (isBottom) {
9620
+ // setIsBottom(true);
9621
+ // } else {
9622
+ // setIsBottom(false);
9623
+ // }
9624
+ // if (scrollTop === 0) {
9625
+ // setIsTop(true);
9626
+ // } else {
9627
+ // setIsTop(false);
9628
+ // }
9629
+ // }
9630
+ // };
9631
+ // if (scrollRef.current) {
9632
+ // scrollRef.current.addEventListener('scroll', handleScroll);
9633
+ // }
9634
+ // return () => {
9635
+ // if (scrollRef.current) {
9636
+ // scrollRef.current.removeEventListener('scroll', handleScroll);
9637
+ // }
9638
+ // };
9639
+ // }, [scrollRef]);
9640
+ // const handleTouchStart = (event: any) => {
9641
+ // event.stopPropagation();
9642
+ // touchRef.current = event.touches[0].clientY;
9643
+ // touchMoveRef.current = true;
9644
+ // };
9645
+ // const handleTouchMove = (event: any) => {
9646
+ // event.stopPropagation();
9647
+ // if (touchMoveRef.current) {
9648
+ // touchMoveRef.current = false;
9649
+ // const currentY = event.touches[0].clientY;
9650
+ // const diff = touchRef.current - currentY;
9651
+ // if (diff > 0 && (isBottom || !stopSlide)) {
9652
+ // swiperRef?.current?.swiper?.slideNext();
9653
+ // } else if (diff < 0 && (isTop || !stopSlide)) {
9654
+ // swiperRef?.current?.swiper?.slidePrev();
9655
+ // }
9656
+ // }
9657
+ // };
9372
9658
  const productInfoText = ({ isPost }) => {
9373
9659
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
9374
9660
  React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
@@ -9381,8 +9667,14 @@ Made in Italy` })));
9381
9667
  }
9382
9668
  return style;
9383
9669
  }, []);
9670
+ const renderCommodityGroup = useCallback(() => {
9671
+ var _a, _b, _c;
9672
+ if (isPost)
9673
+ return;
9674
+ return (React.createElement(CommodityGroup$1, { products: (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts, data: commodityGroup, defImg: (_c = (_b = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _b !== void 0 ? _b : bottom_image) !== null && _c !== void 0 ? _c : '', style: { padding: '0 19px' } }));
9675
+ }, []);
9384
9676
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
9385
- React.createElement("div", Object.assign({ ref: scrollRef, className: css(Object.assign({}, style)) }, props),
9677
+ React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
9386
9678
  product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
9387
9679
  clickable: true,
9388
9680
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
@@ -9403,7 +9695,7 @@ Made in Italy` })));
9403
9695
  width: '100%',
9404
9696
  objectFit: 'cover',
9405
9697
  display: 'block',
9406
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9698
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9407
9699
  }, src: src }))));
9408
9700
  }))),
9409
9701
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
@@ -9420,6 +9712,7 @@ Made in Italy` })));
9420
9712
  objectFit: 'cover',
9421
9713
  width: '100%'
9422
9714
  }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
9715
+ renderCommodityGroup(),
9423
9716
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
9424
9717
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
9425
9718
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
@@ -9445,11 +9738,40 @@ Made in Italy` })));
9445
9738
  };
9446
9739
  var CommodityDetailDiroNewComponent = memo(CommodityDetailDiroNew$1);
9447
9740
 
9741
+ /*
9742
+ * @Author: binruan@chatlabs.com
9743
+ * @Date: 2024-07-09 14:35:10
9744
+ * @LastEditors: binruan@chatlabs.com
9745
+ * @LastEditTime: 2024-07-12 17:53:02
9746
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\interactionRender.tsx
9747
+ *
9748
+ */
9749
+ /*
9750
+ * @Author: binruan@chatlabs.com
9751
+ * @Date: 2024-07-05 14:08:41
9752
+ * @LastEditors: binruan@chatlabs.com
9753
+ * @LastEditTime: 2024-07-09 14:34:49
9754
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9755
+ *
9756
+ */
9757
+ var interactionRender$a = [
9758
+ {
9759
+ title: '滑动事件',
9760
+ child: [
9761
+ {
9762
+ type: 'Switch',
9763
+ label: '滑动铺满全屏',
9764
+ name: ['isScrollFullScreen']
9765
+ }
9766
+ ]
9767
+ }
9768
+ ];
9769
+
9448
9770
  /*
9449
9771
  * @Author: binruan@chatlabs.com
9450
9772
  * @Date: 2024-03-20 10:27:31
9451
9773
  * @LastEditors: binruan@chatlabs.com
9452
- * @LastEditTime: 2024-04-09 16:25:44
9774
+ * @LastEditTime: 2024-07-12 18:17:31
9453
9775
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\material.tsx
9454
9776
  *
9455
9777
  */
@@ -9459,7 +9781,8 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
9459
9781
  category: 'popup',
9460
9782
  type: 'CommodityDetailDiroNew',
9461
9783
  related: {
9462
- settingRender: settingRender$3
9784
+ settingRender: settingRender$6,
9785
+ interactionRender: interactionRender$a
9463
9786
  },
9464
9787
  defaulSetting: {
9465
9788
  props: {
@@ -9515,66 +9838,11 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
9515
9838
  * @Author: binruan@chatlabs.com
9516
9839
  * @Date: 2024-03-26 16:50:25
9517
9840
  * @LastEditors: binruan@chatlabs.com
9518
- * @LastEditTime: 2024-07-04 17:47:52
9519
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
9841
+ * @LastEditTime: 2024-07-09 10:37:45
9842
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
9520
9843
  *
9521
9844
  */
9522
- var settingRender$2 = [
9523
- {
9524
- title: '主题样式',
9525
- child: [
9526
- {
9527
- type: 'Group',
9528
- label: '尺寸',
9529
- child: [
9530
- {
9531
- type: 'Number',
9532
- name: ['style', 'width'],
9533
- addonAfter: 'W'
9534
- },
9535
- {
9536
- type: 'Number',
9537
- name: ['style', 'height'],
9538
- addonAfter: 'H'
9539
- }
9540
- ]
9541
- },
9542
- {
9543
- type: 'Group',
9544
- label: '圆角',
9545
- child: [
9546
- {
9547
- type: 'Slider',
9548
- name: ['style', 'borderRadius'],
9549
- max: 100
9550
- },
9551
- {
9552
- type: 'Number',
9553
- name: ['style', 'borderRadius'],
9554
- addonAfter: 'px',
9555
- max: 100
9556
- }
9557
- ]
9558
- },
9559
- {
9560
- type: 'Color',
9561
- label: '背景色',
9562
- name: ['style', 'backgroundColor']
9563
- },
9564
- {
9565
- label: '内边距',
9566
- type: 'Number',
9567
- name: ['style', 'padding'],
9568
- addonAfter: 'px'
9569
- },
9570
- {
9571
- label: '与Post描述边距',
9572
- type: 'Number',
9573
- name: ['style', 'marginBottom'],
9574
- addonAfter: 'px'
9575
- }
9576
- ]
9577
- },
9845
+ var settingRender$5 = [
9578
9846
  {
9579
9847
  title: '商品图片',
9580
9848
  child: [
@@ -9584,12 +9852,12 @@ var settingRender$2 = [
9584
9852
  child: [
9585
9853
  {
9586
9854
  type: 'Number',
9587
- name: ['props', 'ctaTempStyles', 'img', 'width'],
9855
+ name: ['props', 'commodityPicture', 'width'],
9588
9856
  addonAfter: 'W'
9589
9857
  },
9590
9858
  {
9591
9859
  type: 'Number',
9592
- name: ['props', 'ctaTempStyles', 'img', 'height'],
9860
+ name: ['props', 'commodityPicture', 'height'],
9593
9861
  addonAfter: 'H'
9594
9862
  }
9595
9863
  ]
@@ -9600,12 +9868,12 @@ var settingRender$2 = [
9600
9868
  child: [
9601
9869
  {
9602
9870
  type: 'Slider',
9603
- name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
9871
+ name: ['props', 'commodityPicture', 'borderRadius'],
9604
9872
  max: 100
9605
9873
  },
9606
9874
  {
9607
9875
  type: 'Number',
9608
- name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
9876
+ name: ['props', 'commodityPicture', 'borderRadius'],
9609
9877
  addonAfter: 'px',
9610
9878
  max: 100
9611
9879
  }
@@ -9615,7 +9883,7 @@ var settingRender$2 = [
9615
9883
  type: 'Number',
9616
9884
  label: '与右侧边距',
9617
9885
  addonAfter: 'px',
9618
- name: ['props', 'ctaTempStyles', 'img', 'marginRight']
9886
+ name: ['props', 'commodityPicture', 'marginRight']
9619
9887
  },
9620
9888
  {
9621
9889
  label: '居中垂直偏移',
@@ -9628,72 +9896,90 @@ var settingRender$2 = [
9628
9896
  ]
9629
9897
  },
9630
9898
  {
9631
- title: '商品标题文本',
9632
- type: 'commodityTitle',
9899
+ title: '商品文本',
9633
9900
  child: [
9634
9901
  {
9635
- type: 'Group',
9636
- label: '字体',
9902
+ name: ['props', 'commodityStyles'],
9903
+ type: 'SelectLinkage',
9637
9904
  child: [
9638
9905
  {
9906
+ label: '字段',
9639
9907
  type: 'Select',
9640
- name: ['props', 'ctaTempStyles', 'title', 'fontFamily-cn'],
9641
- bottomText: '中文字体'
9908
+ options: [
9909
+ {
9910
+ label: '商品名称',
9911
+ value: 'title'
9912
+ },
9913
+ {
9914
+ label: '系列名称',
9915
+ value: 'collection'
9916
+ },
9917
+ {
9918
+ label: '价格',
9919
+ value: 'price'
9920
+ }
9921
+ ],
9922
+ name: ['props', 'commodityStyles', 'field'],
9923
+ initialValue: 'title'
9642
9924
  },
9643
9925
  {
9644
- type: 'Select',
9645
- name: ['props', 'ctaTempStyles', 'title', 'fontFamily-en'],
9646
- bottomText: '英文/其他字体'
9647
- }
9648
- ]
9649
- },
9650
- {
9651
- type: 'Group',
9652
- label: '',
9653
- child: [
9926
+ type: 'Group',
9927
+ label: '标题字体',
9928
+ child: [
9929
+ {
9930
+ type: 'Select',
9931
+ name: ['fontFamily-cn'],
9932
+ bottomText: '中文字体'
9933
+ },
9934
+ {
9935
+ type: 'Select',
9936
+ name: ['fontFamily-en'],
9937
+ bottomText: '英文/其他字体'
9938
+ }
9939
+ ]
9940
+ },
9654
9941
  {
9655
- type: 'Color',
9656
- name: ['props', 'ctaTempStyles', 'title', 'color']
9942
+ type: 'Group',
9943
+ label: '',
9944
+ child: [
9945
+ {
9946
+ type: 'Color',
9947
+ name: ['color']
9948
+ },
9949
+ {
9950
+ type: 'Number',
9951
+ addonAfter: 'px',
9952
+ name: ['fontSize']
9953
+ }
9954
+ ]
9657
9955
  },
9658
9956
  {
9659
- type: 'Number',
9660
- addonAfter: 'px',
9661
- name: ['props', 'ctaTempStyles', 'title', 'fontSize']
9957
+ label: '标题样式',
9958
+ type: 'TextStyle'
9959
+ },
9960
+ {
9961
+ label: '标题对齐',
9962
+ type: 'TextAlign'
9662
9963
  }
9663
9964
  ]
9664
- },
9665
- {
9666
- label: '样式',
9667
- type: 'TextStyle',
9668
- name: ['props', 'ctaTempStyles', 'title']
9669
- },
9670
- {
9671
- label: '对齐',
9672
- type: 'TextAlign',
9673
- name: ['props', 'ctaTempStyles', 'title']
9674
- },
9675
- {
9676
- label: '间距',
9677
- type: 'TextSpace',
9678
- name: ['props', 'ctaTempStyles', 'title']
9679
9965
  }
9680
9966
  ]
9681
9967
  },
9682
9968
  {
9683
- title: 'CTA标题',
9969
+ title: '按钮样式',
9684
9970
  child: [
9971
+ {
9972
+ type: 'Color',
9973
+ label: '背景色',
9974
+ name: ['props', 'buttonStyle', 'backgroundColor']
9975
+ },
9685
9976
  {
9686
9977
  type: 'Group',
9687
9978
  label: '尺寸',
9688
9979
  child: [
9689
9980
  {
9690
9981
  type: 'Number',
9691
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'width'],
9692
- addonAfter: 'W'
9693
- },
9694
- {
9695
- type: 'Number',
9696
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'height'],
9982
+ name: ['props', 'buttonStyle', 'height'],
9697
9983
  addonAfter: 'H'
9698
9984
  }
9699
9985
  ]
@@ -9704,21 +9990,20 @@ var settingRender$2 = [
9704
9990
  child: [
9705
9991
  {
9706
9992
  type: 'Slider',
9707
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
9993
+ name: ['props', 'buttonStyle', 'borderRadius'],
9708
9994
  max: 100
9709
9995
  },
9710
9996
  {
9711
9997
  type: 'Number',
9712
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
9998
+ name: ['props', 'buttonStyle', 'borderRadius'],
9713
9999
  addonAfter: 'px',
9714
10000
  max: 100
9715
10001
  }
9716
10002
  ]
9717
10003
  },
9718
10004
  {
9719
- type: 'Color',
9720
- label: '背景色',
9721
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'backgroundColor']
10005
+ type: 'TextSpace',
10006
+ name: ['props', 'buttonStyle']
9722
10007
  },
9723
10008
  {
9724
10009
  type: 'Group',
@@ -9726,12 +10011,12 @@ var settingRender$2 = [
9726
10011
  child: [
9727
10012
  {
9728
10013
  type: 'Select',
9729
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-cn'],
10014
+ name: ['props', 'buttonStyle', 'fontFamily-cn'],
9730
10015
  bottomText: '中文字体'
9731
10016
  },
9732
10017
  {
9733
10018
  type: 'Select',
9734
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-en'],
10019
+ name: ['props', 'buttonStyle', 'fontFamily-en'],
9735
10020
  bottomText: '英文/其他字体'
9736
10021
  }
9737
10022
  ]
@@ -9742,78 +10027,29 @@ var settingRender$2 = [
9742
10027
  child: [
9743
10028
  {
9744
10029
  type: 'Color',
9745
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
10030
+ name: ['props', 'buttonStyle', 'color']
9746
10031
  },
9747
10032
  {
9748
10033
  type: 'Number',
9749
10034
  addonAfter: 'px',
9750
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
10035
+ name: ['props', 'buttonStyle', 'fontSize']
9751
10036
  }
9752
10037
  ]
9753
10038
  },
9754
10039
  {
9755
10040
  label: '样式',
9756
10041
  type: 'TextStyle',
9757
- name: ['props', 'ctaTempStyles', 'ctaTitle']
10042
+ name: ['props', 'buttonStyle']
9758
10043
  },
9759
10044
  {
9760
10045
  label: '对齐',
9761
10046
  type: 'TextAlign',
9762
- name: ['props', 'ctaTempStyles', 'ctaTitle']
9763
- },
9764
- {
9765
- label: '间距',
9766
- type: 'TextSpace',
9767
- name: ['props', 'ctaTempStyles', 'ctaTitle']
9768
- }
9769
- ]
9770
- }
9771
- ];
9772
-
9773
- var interactionRender$6 = [
9774
- {
9775
- title: '点击事件',
9776
- child: [
9777
- {
9778
- type: 'link',
9779
- name: 'onClick'
10047
+ name: ['props', 'buttonStyle']
9780
10048
  }
9781
10049
  ]
9782
10050
  }
9783
10051
  ];
9784
10052
 
9785
- const EventProvider = (_a) => {
9786
- var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
9787
- const ref = useRef(null);
9788
- const { popup } = useEditor();
9789
- const { setPopupDetailData, ctaEvent } = useSxpDataSource();
9790
- const { jumpToWeb } = useEventReport();
9791
- const handleClick = throttle(() => {
9792
- var _a, _b, _c, _d, _e, _f, _g, _h;
9793
- 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;
9794
- ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9795
- eventSubject: 'clickCta',
9796
- eventDescription: 'User clicked the CTA'
9797
- }, rec, item, index);
9798
- setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
9799
- if (isExternalLink) {
9800
- 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) {
9801
- const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
9802
- const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
9803
- jumpToWeb(rec, product, cta, index);
9804
- window.location.href = window.getJointUtmLink((_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);
9805
- }
9806
- }
9807
- else {
9808
- onClick === null || onClick === void 0 ? void 0 : onClick();
9809
- }
9810
- }, popup === null || popup === void 0 ? void 0 : popup.duration);
9811
- return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
9812
- };
9813
- var EventProvider$1 = memo(EventProvider);
9814
-
9815
- var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
9816
-
9817
10053
  /*
9818
10054
  * @Author: binruan@chatlabs.com
9819
10055
  * @Date: 2023-04-12 09:58:58
@@ -9845,7 +10081,7 @@ function useOnScreen(ref) {
9845
10081
  * @Author: binruan@chatlabs.com
9846
10082
  * @Date: 2024-01-16 14:50:13
9847
10083
  * @LastEditors: binruan@chatlabs.com
9848
- * @LastEditTime: 2024-07-04 18:13:23
10084
+ * @LastEditTime: 2024-06-24 18:13:14
9849
10085
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
9850
10086
  *
9851
10087
  */
@@ -9866,92 +10102,106 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle }) => {
9866
10102
  }, [src]);
9867
10103
  return (React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, imgStyle)) },
9868
10104
  React.createElement("div", { ref: ref, hidden: !src, className: css({ width: '100%', height: '100%' }) },
9869
- React.createElement(FormatImage$1, { className: css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ? translateY + 50 : 50}%` }, style)), src: src }))));
10105
+ React.createElement(FormatImage$1, { className: css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ? -translateY + 50 : 50}%` }, style)), src: src }))));
9870
10106
  };
9871
10107
  var Img$1 = memo(Img);
9872
10108
 
9873
- const Commodity$1 = (_a) => {
9874
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
9875
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index"]);
10109
+ const EventProvider = (_a) => {
10110
+ var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
10111
+ const ref = useRef(null);
10112
+ const { popup } = useEditor();
10113
+ const { setPopupDetailData, ctaEvent } = useSxpDataSource();
10114
+ const { jumpToWeb } = useEventReport();
10115
+ const handleClick = throttle(() => {
10116
+ var _a, _b, _c, _d, _e, _f, _g, _h;
10117
+ 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;
10118
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10119
+ eventSubject: 'clickCta',
10120
+ eventDescription: 'User clicked the CTA'
10121
+ }, rec, item, index);
10122
+ setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
10123
+ if (isExternalLink) {
10124
+ 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) {
10125
+ const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
10126
+ const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
10127
+ jumpToWeb(rec, product, cta, index);
10128
+ window.location.href = window.getJointUtmLink((_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);
10129
+ }
10130
+ }
10131
+ else {
10132
+ onClick === null || onClick === void 0 ? void 0 : onClick();
10133
+ }
10134
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
10135
+ return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
10136
+ };
10137
+ var EventProvider$1 = memo(EventProvider);
10138
+
10139
+ const CommodityList$1 = (_a) => {
10140
+ var _b, _c;
10141
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, index, translateY = 0, commodityPicture, isExternalLink } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "index", "translateY", "commodityPicture", "isExternalLink"]);
9876
10142
  const { sxpParameter } = useSxpDataSource();
9877
- const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9878
- const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
9879
- return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
9880
- React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
9881
- React.createElement("div", { className: css({
9882
- color: '#fff',
9883
- display: 'flex',
9884
- flexDirection: 'column',
9885
- justifyContent: 'space-between',
9886
- width: '100%',
9887
- overflow: 'hidden'
9888
- }) },
9889
- React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
9890
- __html: setFontForText((_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
9891
- } }),
9892
- React.createElement("div", { className: css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', lineHeight: ((_k = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _k === void 0 ? void 0 : _k.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
9893
- __html: setFontForText((_m = (_l = product === null || product === void 0 ? void 0 : product.bindCta) === null || _l === void 0 ? void 0 : _l.enTitle) !== null && _m !== void 0 ? _m : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
9894
- } }))));
10143
+ const { popupDetailData, bffEventReport, isPreview, swiperRef, bffFbReport } = useSxpDataSource();
10144
+ useRef(null);
10145
+ const recData = isPost ? rec : popupDetailData;
10146
+ const product = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [null, null, null, null];
10147
+ const priceText = useCallback((product) => {
10148
+ var _a, _b, _c, _d, _e;
10149
+ if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
10150
+ return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
10151
+ minimumFractionDigits: 0
10152
+ })) !== null && _e !== void 0 ? _e : ''}`;
10153
+ }
10154
+ else {
10155
+ return '$7,000';
10156
+ }
10157
+ }, []);
10158
+ return (React.createElement("div", { className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
10159
+ var _a, _b, _c, _d, _e, _f, _g, _h;
10160
+ return (React.createElement(EventProvider$1, Object.assign({ key: index, isExternalLink: isExternalLink, rec: recData, index: index }, props, { className: css({
10161
+ display: 'flex'
10162
+ }) }),
10163
+ React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture }),
10164
+ React.createElement("div", null,
10165
+ React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
10166
+ __html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
10167
+ } }),
10168
+ React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
10169
+ __html: setFontForText((_f = item === null || item === void 0 ? void 0 : item.collection) !== null && _f !== void 0 ? _f : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
10170
+ } }),
10171
+ React.createElement("div", { className: css({
10172
+ display: 'flex',
10173
+ alignItems: 'flex-end',
10174
+ justifyContent: 'space-between',
10175
+ width: '100%',
10176
+ overflow: 'hidden'
10177
+ }) },
10178
+ React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.price), dangerouslySetInnerHTML: {
10179
+ __html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
10180
+ } }),
10181
+ React.createElement("div", { style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px' }), dangerouslySetInnerHTML: {
10182
+ __html: setFontForText((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', buttonStyle)
10183
+ } })))));
10184
+ })));
9895
10185
  };
9896
- var CommodityComponent = memo(Commodity$1);
10186
+ var CommodityListComponent = memo(CommodityList$1);
9897
10187
 
9898
10188
  /*
9899
10189
  * @Author: binruan@chatlabs.com
9900
- * @Date: 2023-07-28 18:29:57
10190
+ * @Date: 2024-07-09 14:35:10
9901
10191
  * @LastEditors: binruan@chatlabs.com
9902
- * @LastEditTime: 2024-03-29 16:39:54
9903
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Commodity\material.tsx
10192
+ * @LastEditTime: 2024-07-09 14:35:18
10193
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\interactionRender.tsx
9904
10194
  *
9905
10195
  */
9906
- const Commodity = createMaterial(CommodityComponent, {
9907
- displayName: '推荐单商品-透明底',
9908
- icon: '',
9909
- category: 'template',
9910
- type: 'Commodity',
9911
- related: {
9912
- interactionRender: interactionRender$6,
9913
- bindableProps: [],
9914
- settingRender: settingRender$2
9915
- },
9916
- defaulSetting: {
9917
- props: {
9918
- ctaTempStyles: {
9919
- img: {
9920
- borderRadius: 3,
9921
- width: 60,
9922
- height: 60,
9923
- marginRight: 8
9924
- },
9925
- title: {
9926
- fontSize: 12,
9927
- color: '#fff',
9928
- textAlign: 'left'
9929
- },
9930
- ctaTitle: {
9931
- fontSize: 10,
9932
- color: '#fff',
9933
- textAlign: 'center',
9934
- width: 130,
9935
- height: 20,
9936
- backgroundColor: 'rgba(0,0,0,.5)'
9937
- }
9938
- }
9939
- },
9940
- style: {
9941
- padding: 7,
9942
- width: 236,
9943
- height: 74,
9944
- borderRadius: 3,
9945
- backgroundColor: 'rgba(0,0,0,.3)',
9946
- marginBottom: 8
9947
- }
9948
- },
9949
- w: 100,
9950
- h: 40,
9951
- sort: 1
9952
- });
9953
-
9954
- var interactionRender$5 = [
10196
+ /*
10197
+ * @Author: binruan@chatlabs.com
10198
+ * @Date: 2024-07-05 14:08:41
10199
+ * @LastEditors: binruan@chatlabs.com
10200
+ * @LastEditTime: 2024-07-09 14:34:49
10201
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
10202
+ *
10203
+ */
10204
+ var interactionRender$9 = [
9955
10205
  {
9956
10206
  title: '点击事件',
9957
10207
  child: [
@@ -9963,104 +10213,140 @@ var interactionRender$5 = [
9963
10213
  }
9964
10214
  ];
9965
10215
 
9966
- const Appoint$1 = (_a) => {
9967
- var _b, _c, _d, _e, _f, _g;
9968
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
9969
- const { sxpParameter } = useSxpDataSource();
9970
- const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
9971
- const 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;
9972
- return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' }, index: index }, props),
9973
- React.createElement(Img$1, { src: src, rec: recData, item: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) !== null && _f !== void 0 ? _f : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
9974
- React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
9975
- __html: setFontForText((_g = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _g !== void 0 ? _g : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
9976
- } })));
9977
- };
9978
- var AppointComponent = memo(Appoint$1);
9979
-
9980
10216
  /*
9981
10217
  * @Author: binruan@chatlabs.com
9982
- * @Date: 2023-07-28 18:29:57
10218
+ * @Date: 2024-03-20 10:27:31
9983
10219
  * @LastEditors: binruan@chatlabs.com
9984
- * @LastEditTime: 2024-04-09 21:42:21
9985
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Appoint\material.tsx
10220
+ * @LastEditTime: 2024-07-09 16:04:28
10221
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\material.tsx
9986
10222
  *
9987
10223
  */
9988
- const Appoint = createMaterial(AppointComponent, {
9989
- displayName: '预约表单',
10224
+ const CommodityList = createMaterial(CommodityListComponent, {
10225
+ displayName: '商品列表',
9990
10226
  icon: '',
9991
- category: 'template',
9992
- type: 'Appoint',
10227
+ category: 'popup',
10228
+ type: 'CommodityList',
9993
10229
  related: {
9994
- interactionRender: interactionRender$5,
9995
- settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
9996
- bindableProps: []
10230
+ settingRender: settingRender$5,
10231
+ interactionRender: interactionRender$9
9997
10232
  },
9998
10233
  defaulSetting: {
9999
10234
  props: {
10000
- ctaTempStyles: {
10001
- img: {
10002
- borderRadius: 3,
10003
- width: 30,
10004
- height: 30,
10005
- marginRight: 8
10235
+ commodityPicture: {
10236
+ width: 100,
10237
+ height: 100,
10238
+ marginRight: 10
10239
+ },
10240
+ commodityStyles: {
10241
+ price: {
10242
+ color: '#000',
10243
+ fontWeight: 'bold',
10244
+ fontSize: 14
10006
10245
  },
10007
- ctaTitle: {
10008
- fontSize: 12,
10009
- color: '#fff',
10010
- textAlign: 'left',
10011
- width: 130,
10012
- height: 20
10246
+ title: {
10247
+ color: '#000',
10248
+ fontSize: 14
10249
+ },
10250
+ collection: {
10251
+ color: '#757575',
10252
+ fontSize: 12
10013
10253
  }
10254
+ },
10255
+ buttonStyle: {
10256
+ backgroundColor: '#000',
10257
+ fontSize: 12,
10258
+ height: 30,
10259
+ textAlign: 'center',
10260
+ color: '#fff',
10261
+ lineHeight: 2.5
10014
10262
  }
10015
10263
  },
10016
- style: {
10017
- padding: 7,
10018
- width: 236,
10019
- height: 44,
10020
- borderRadius: 3,
10021
- backgroundColor: 'rgba(0,0,0,.3)',
10022
- marginBottom: 8
10023
- }
10264
+ style: {}
10024
10265
  },
10025
10266
  w: 100,
10026
10267
  h: 40,
10027
- sort: 6
10268
+ sort: 1
10028
10269
  });
10029
10270
 
10030
10271
  /*
10031
10272
  * @Author: binruan@chatlabs.com
10032
- * @Date: 2024-07-02 14:51:32
10273
+ * @Date: 2024-03-26 16:50:25
10033
10274
  * @LastEditors: binruan@chatlabs.com
10034
- * @LastEditTime: 2024-07-02 16:44:34
10035
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
10275
+ * @LastEditTime: 2024-06-27 09:55:59
10276
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
10036
10277
  *
10037
10278
  */
10038
- var linkSettingRender = [
10279
+ var settingRender$4 = [
10039
10280
  {
10040
- title: '自定义标题',
10281
+ title: '主题样式',
10041
10282
  child: [
10042
10283
  {
10043
- type: 'Switch',
10044
- label: '自定义标题开关',
10045
- name: ['props', 'customTitle', 'display']
10284
+ type: 'Group',
10285
+ label: '尺寸',
10286
+ child: [
10287
+ {
10288
+ type: 'Number',
10289
+ name: ['style', 'width'],
10290
+ addonAfter: 'W'
10291
+ },
10292
+ {
10293
+ type: 'Number',
10294
+ name: ['style', 'height'],
10295
+ addonAfter: 'H'
10296
+ }
10297
+ ]
10046
10298
  },
10047
10299
  {
10048
- type: 'Text',
10049
- label: '标题文案',
10050
- name: ['props', 'customTitle', 'text']
10300
+ type: 'Group',
10301
+ label: '圆角',
10302
+ child: [
10303
+ {
10304
+ type: 'Slider',
10305
+ name: ['style', 'borderRadius'],
10306
+ max: 100
10307
+ },
10308
+ {
10309
+ type: 'Number',
10310
+ name: ['style', 'borderRadius'],
10311
+ addonAfter: 'px',
10312
+ max: 100
10313
+ }
10314
+ ]
10315
+ },
10316
+ {
10317
+ type: 'Color',
10318
+ label: '背景色',
10319
+ name: ['style', 'backgroundColor']
10320
+ },
10321
+ {
10322
+ label: '内边距',
10323
+ type: 'Number',
10324
+ name: ['style', 'padding'],
10325
+ addonAfter: 'px'
10051
10326
  },
10327
+ {
10328
+ label: '与Post描述边距',
10329
+ type: 'Number',
10330
+ name: ['style', 'marginBottom'],
10331
+ addonAfter: 'px'
10332
+ }
10333
+ ]
10334
+ },
10335
+ {
10336
+ title: '商品图片',
10337
+ child: [
10052
10338
  {
10053
10339
  type: 'Group',
10054
10340
  label: '尺寸',
10055
10341
  child: [
10056
10342
  {
10057
10343
  type: 'Number',
10058
- name: ['props', 'customTitle', 'style', 'width'],
10344
+ name: ['props', 'ctaTempStyles', 'img', 'width'],
10059
10345
  addonAfter: 'W'
10060
10346
  },
10061
10347
  {
10062
10348
  type: 'Number',
10063
- name: ['props', 'customTitle', 'style', 'height'],
10349
+ name: ['props', 'ctaTempStyles', 'img', 'height'],
10064
10350
  addonAfter: 'H'
10065
10351
  }
10066
10352
  ]
@@ -10071,34 +10357,49 @@ var linkSettingRender = [
10071
10357
  child: [
10072
10358
  {
10073
10359
  type: 'Slider',
10074
- name: ['props', 'customTitle', 'style', 'borderRadius'],
10360
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
10075
10361
  max: 100
10076
10362
  },
10077
10363
  {
10078
10364
  type: 'Number',
10079
- name: ['props', 'customTitle', 'style', 'borderRadius'],
10365
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
10080
10366
  addonAfter: 'px',
10081
10367
  max: 100
10082
10368
  }
10083
10369
  ]
10084
10370
  },
10085
10371
  {
10086
- type: 'Color',
10087
- label: '背景色',
10088
- name: ['props', 'customTitle', 'style', 'backgroundColor']
10372
+ type: 'Number',
10373
+ label: '与右侧边距',
10374
+ addonAfter: 'px',
10375
+ name: ['props', 'ctaTempStyles', 'img', 'marginRight']
10089
10376
  },
10377
+ {
10378
+ label: '居中垂直偏移',
10379
+ type: 'Number',
10380
+ name: ['props', 'translateY'],
10381
+ min: -1000,
10382
+ addonAfter: '%',
10383
+ initialValue: 0
10384
+ }
10385
+ ]
10386
+ },
10387
+ {
10388
+ title: '商品标题文本',
10389
+ type: 'commodityTitle',
10390
+ child: [
10090
10391
  {
10091
10392
  type: 'Group',
10092
10393
  label: '字体',
10093
10394
  child: [
10094
10395
  {
10095
10396
  type: 'Select',
10096
- name: ['props', 'customTitle', 'style', 'fontFamily-cn'],
10397
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily-cn'],
10097
10398
  bottomText: '中文字体'
10098
10399
  },
10099
10400
  {
10100
10401
  type: 'Select',
10101
- name: ['props', 'customTitle', 'style', 'fontFamily-en'],
10402
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily-en'],
10102
10403
  bottomText: '英文/其他字体'
10103
10404
  }
10104
10405
  ]
@@ -10109,124 +10410,119 @@ var linkSettingRender = [
10109
10410
  child: [
10110
10411
  {
10111
10412
  type: 'Color',
10112
- name: ['props', 'customTitle', 'style', 'color']
10413
+ name: ['props', 'ctaTempStyles', 'title', 'color']
10113
10414
  },
10114
10415
  {
10115
10416
  type: 'Number',
10116
10417
  addonAfter: 'px',
10117
- name: ['props', 'customTitle', 'style', 'fontSize']
10418
+ name: ['props', 'ctaTempStyles', 'title', 'fontSize']
10118
10419
  }
10119
10420
  ]
10120
10421
  },
10121
10422
  {
10122
10423
  label: '样式',
10123
10424
  type: 'TextStyle',
10124
- name: ['props', 'customTitle', 'style']
10425
+ name: ['props', 'ctaTempStyles', 'title']
10125
10426
  },
10126
10427
  {
10127
10428
  label: '对齐',
10128
10429
  type: 'TextAlign',
10129
- name: ['props', 'customTitle', 'style']
10430
+ name: ['props', 'ctaTempStyles', 'title']
10130
10431
  },
10131
10432
  {
10132
- label: '上边距',
10133
- type: 'Number',
10134
- name: ['props', 'customTitle', 'style', 'marginTop'],
10135
- addonAfter: 'px'
10433
+ label: '间距',
10434
+ type: 'TextSpace',
10435
+ name: ['props', 'ctaTempStyles', 'title']
10136
10436
  }
10137
10437
  ]
10138
- }
10139
- ];
10140
-
10141
- var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
10142
-
10143
- const Link$1 = (_a) => {
10144
- var _b, _c, _d, _e, _f, _g, _h, _j;
10145
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
10146
- const { sxpParameter, bffEventReport } = useSxpDataSource();
10147
- const { jumpToWeb } = useEventReport();
10148
- const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
10149
- const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10150
- const handleTo = () => {
10151
- if (cta === null || cta === void 0 ? void 0 : cta.link) {
10152
- jumpToWeb(recData, product, cta, index);
10153
- window.location.href = window.getJointUtmLink(cta.link);
10154
- }
10155
- };
10156
- const src = (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
10157
- return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
10158
- React.createElement(Img$1, { src: src, rec: recData, item: (_g = (_f = recData === null || recData === void 0 ? void 0 : recData.video) === null || _f === void 0 ? void 0 : _f.bindProduct) !== null && _g !== void 0 ? _g : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
10159
- React.createElement("div", { className: css({
10160
- display: 'flex',
10161
- alignItems: 'center',
10162
- width: '100%',
10163
- overflow: 'hidden'
10164
- }) },
10165
- React.createElement("div", null,
10166
- React.createElement("div", { className: styles$5['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
10167
- __html: setFontForText((_h = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _h !== void 0 ? _h : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
10168
- } }),
10169
- (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) && (React.createElement("div", { style: Object.assign(Object.assign({}, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style), { lineHeight: ((_j = customTitle === null || customTitle === void 0 ? void 0 : customTitle.style) === null || _j === void 0 ? void 0 : _j.height) + 'px' }), className: styles$5['one-line-ellipsis'], dangerouslySetInnerHTML: {
10170
- __html: setFontForText(customTitle === null || customTitle === void 0 ? void 0 : customTitle.text, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style)
10171
- } }))))));
10172
- };
10173
- var LinkComponent = memo(Link$1);
10174
-
10175
- var _a;
10176
- const Link = createMaterial(LinkComponent, {
10177
- displayName: '跳转指引',
10178
- icon: '',
10179
- category: 'template',
10180
- type: 'Link',
10181
- related: {
10182
- settingRender: (_a = settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle')) === null || _a === void 0 ? void 0 : _a.concat(linkSettingRender),
10183
- bindableProps: []
10184
10438
  },
10185
- defaulSetting: {
10186
- props: {
10187
- ctaTempStyles: {
10188
- img: {
10189
- borderRadius: 3,
10190
- width: 60,
10191
- height: 60,
10192
- marginRight: 8
10193
- },
10194
- ctaTitle: {
10195
- fontSize: 12,
10196
- color: '#fff',
10197
- textAlign: 'left',
10198
- width: 130,
10199
- height: 20
10200
- }
10439
+ {
10440
+ title: 'CTA标题',
10441
+ child: [
10442
+ {
10443
+ type: 'Group',
10444
+ label: '尺寸',
10445
+ child: [
10446
+ {
10447
+ type: 'Number',
10448
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'width'],
10449
+ addonAfter: 'W'
10450
+ },
10451
+ {
10452
+ type: 'Number',
10453
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'height'],
10454
+ addonAfter: 'H'
10455
+ }
10456
+ ]
10201
10457
  },
10202
- customTitle: {
10203
- style: {
10204
- textAlign: 'left',
10205
- textDecoration: 'underline',
10206
- fontWeight: 'bold',
10207
- width: 130,
10208
- height: 20,
10209
- fontSize: 12,
10210
- color: '#000'
10211
- },
10212
- text: '探索更多'
10458
+ {
10459
+ type: 'Group',
10460
+ label: '圆角',
10461
+ child: [
10462
+ {
10463
+ type: 'Slider',
10464
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
10465
+ max: 100
10466
+ },
10467
+ {
10468
+ type: 'Number',
10469
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
10470
+ addonAfter: 'px',
10471
+ max: 100
10472
+ }
10473
+ ]
10474
+ },
10475
+ {
10476
+ type: 'Color',
10477
+ label: '背景色',
10478
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'backgroundColor']
10479
+ },
10480
+ {
10481
+ type: 'Group',
10482
+ label: '字体',
10483
+ child: [
10484
+ {
10485
+ type: 'Select',
10486
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-cn'],
10487
+ bottomText: '中文字体'
10488
+ },
10489
+ {
10490
+ type: 'Select',
10491
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-en'],
10492
+ bottomText: '英文/其他字体'
10493
+ }
10494
+ ]
10495
+ },
10496
+ {
10497
+ type: 'Group',
10498
+ label: '',
10499
+ child: [
10500
+ {
10501
+ type: 'Color',
10502
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
10503
+ },
10504
+ {
10505
+ type: 'Number',
10506
+ addonAfter: 'px',
10507
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
10508
+ }
10509
+ ]
10510
+ },
10511
+ {
10512
+ label: '样式',
10513
+ type: 'TextStyle',
10514
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
10515
+ },
10516
+ {
10517
+ label: '对齐',
10518
+ type: 'TextAlign',
10519
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
10213
10520
  }
10214
- },
10215
- style: {
10216
- padding: 7,
10217
- width: 236,
10218
- height: 74,
10219
- borderRadius: 3,
10220
- backgroundColor: 'rgba(0,0,0,.3)',
10221
- marginBottom: 8
10222
- }
10223
- },
10224
- w: 100,
10225
- h: 40,
10226
- sort: 5
10227
- });
10521
+ ]
10522
+ }
10523
+ ];
10228
10524
 
10229
- var interactionRender$4 = [
10525
+ var interactionRender$8 = [
10230
10526
  {
10231
10527
  title: '点击事件',
10232
10528
  child: [
@@ -10238,9 +10534,9 @@ var interactionRender$4 = [
10238
10534
  }
10239
10535
  ];
10240
10536
 
10241
- var styles$4 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
10537
+ var styles$8 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
10242
10538
 
10243
- const CommodityDiro$1 = (_a) => {
10539
+ const Commodity$1 = (_a) => {
10244
10540
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
10245
10541
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index"]);
10246
10542
  const { sxpParameter } = useSxpDataSource();
@@ -10256,32 +10552,32 @@ const CommodityDiro$1 = (_a) => {
10256
10552
  width: '100%',
10257
10553
  overflow: 'hidden'
10258
10554
  }) },
10259
- React.createElement("div", { className: styles$4['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10555
+ React.createElement("div", { className: styles$8['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10260
10556
  __html: setFontForText((_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
10261
10557
  } }),
10262
- React.createElement("div", { className: css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap', lineHeight: ((_k = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _k === void 0 ? void 0 : _k.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
10558
+ React.createElement("div", { className: css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', lineHeight: ((_k = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _k === void 0 ? void 0 : _k.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
10263
10559
  __html: setFontForText((_m = (_l = product === null || product === void 0 ? void 0 : product.bindCta) === null || _l === void 0 ? void 0 : _l.enTitle) !== null && _m !== void 0 ? _m : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
10264
10560
  } }))));
10265
10561
  };
10266
- var CommodityDiroComponent = memo(CommodityDiro$1);
10562
+ var CommodityComponent = memo(Commodity$1);
10267
10563
 
10268
10564
  /*
10269
10565
  * @Author: binruan@chatlabs.com
10270
10566
  * @Date: 2023-07-28 18:29:57
10271
10567
  * @LastEditors: binruan@chatlabs.com
10272
- * @LastEditTime: 2024-03-29 16:07:28
10273
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiro\material.tsx
10568
+ * @LastEditTime: 2024-03-29 16:39:54
10569
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Commodity\material.tsx
10274
10570
  *
10275
10571
  */
10276
- const CommodityDiro = createMaterial(CommodityDiroComponent, {
10277
- displayName: '推荐单商品-白底圆角按钮',
10572
+ const Commodity = createMaterial(CommodityComponent, {
10573
+ displayName: '推荐单商品-透明底',
10278
10574
  icon: '',
10279
10575
  category: 'template',
10280
- type: 'CommodityDiro',
10576
+ type: 'Commodity',
10281
10577
  related: {
10282
- interactionRender: interactionRender$4,
10283
- settingRender: settingRender$2,
10284
- bindableProps: []
10578
+ interactionRender: interactionRender$8,
10579
+ bindableProps: [],
10580
+ settingRender: settingRender$4
10285
10581
  },
10286
10582
  defaulSetting: {
10287
10583
  props: {
@@ -10294,16 +10590,16 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
10294
10590
  },
10295
10591
  title: {
10296
10592
  fontSize: 12,
10297
- color: '#000',
10593
+ color: '#fff',
10298
10594
  textAlign: 'left'
10299
10595
  },
10300
10596
  ctaTitle: {
10301
10597
  fontSize: 10,
10302
10598
  color: '#fff',
10303
10599
  textAlign: 'center',
10304
- width: 80,
10600
+ width: 130,
10305
10601
  height: 20,
10306
- backgroundColor: 'rgba(0,0,0,1)'
10602
+ backgroundColor: 'rgba(0,0,0,.5)'
10307
10603
  }
10308
10604
  }
10309
10605
  },
@@ -10312,16 +10608,16 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
10312
10608
  width: 236,
10313
10609
  height: 74,
10314
10610
  borderRadius: 3,
10315
- backgroundColor: '#fff',
10611
+ backgroundColor: 'rgba(0,0,0,.3)',
10316
10612
  marginBottom: 8
10317
10613
  }
10318
10614
  },
10319
10615
  w: 100,
10320
10616
  h: 40,
10321
- sort: 2
10617
+ sort: 1
10322
10618
  });
10323
10619
 
10324
- var interactionRender$3 = [
10620
+ var interactionRender$7 = [
10325
10621
  {
10326
10622
  title: '点击事件',
10327
10623
  child: [
@@ -10333,171 +10629,224 @@ var interactionRender$3 = [
10333
10629
  }
10334
10630
  ];
10335
10631
 
10336
- var styles$3 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
10337
-
10338
- const CommodityDiroNew$1 = (_a) => {
10339
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
10340
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index"]);
10632
+ const Appoint$1 = (_a) => {
10633
+ var _b, _c, _d, _e, _f, _g;
10634
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
10341
10635
  const { sxpParameter } = useSxpDataSource();
10342
- const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
10343
- const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
10344
- return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
10345
- React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
10346
- React.createElement("div", { className: css({
10347
- color: '#fff',
10348
- display: 'flex',
10349
- flexDirection: 'column',
10350
- justifyContent: 'center',
10351
- width: '100%',
10352
- overflow: 'hidden'
10353
- }) },
10354
- React.createElement("div", { className: styles$3['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10355
- __html: setFontForText((_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
10356
- } }),
10357
- React.createElement("div", { className: css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
10358
- __html: setFontForText((_l = (_k = product === null || product === void 0 ? void 0 : product.bindCta) === null || _k === void 0 ? void 0 : _k.enTitle) !== null && _l !== void 0 ? _l : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
10359
- } }))));
10636
+ const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
10637
+ const 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;
10638
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' }, index: index }, props),
10639
+ React.createElement(Img$1, { src: src, rec: recData, item: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) !== null && _f !== void 0 ? _f : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
10640
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
10641
+ __html: setFontForText((_g = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _g !== void 0 ? _g : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
10642
+ } })));
10360
10643
  };
10361
- var CommodityDiroNewComponent = memo(CommodityDiroNew$1);
10644
+ var AppointComponent = memo(Appoint$1);
10362
10645
 
10363
10646
  /*
10364
10647
  * @Author: binruan@chatlabs.com
10365
10648
  * @Date: 2023-07-28 18:29:57
10366
10649
  * @LastEditors: binruan@chatlabs.com
10367
- * @LastEditTime: 2024-04-09 11:54:27
10368
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiroNew\material.tsx
10650
+ * @LastEditTime: 2024-04-09 21:42:21
10651
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Appoint\material.tsx
10369
10652
  *
10370
10653
  */
10371
- const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
10372
- displayName: '推荐单商品-白底下划线按钮',
10654
+ const Appoint = createMaterial(AppointComponent, {
10655
+ displayName: '预约表单',
10373
10656
  icon: '',
10374
10657
  category: 'template',
10375
- type: 'CommodityDiroNew',
10658
+ type: 'Appoint',
10376
10659
  related: {
10377
- interactionRender: interactionRender$3,
10378
- bindableProps: [],
10379
- settingRender: settingRender$2
10660
+ interactionRender: interactionRender$7,
10661
+ settingRender: settingRender$4 === null || settingRender$4 === void 0 ? void 0 : settingRender$4.filter((i) => i.type !== 'commodityTitle'),
10662
+ bindableProps: []
10380
10663
  },
10381
10664
  defaulSetting: {
10382
10665
  props: {
10383
10666
  ctaTempStyles: {
10384
10667
  img: {
10385
- borderRadius: 8,
10386
- width: 78,
10387
- height: 78,
10388
- marginRight: 16
10389
- },
10390
- title: {
10391
- fontSize: 13,
10392
- color: '#000',
10393
- textAlign: 'left'
10668
+ borderRadius: 3,
10669
+ width: 30,
10670
+ height: 30,
10671
+ marginRight: 8
10394
10672
  },
10395
10673
  ctaTitle: {
10396
- textDecoration: 'underline',
10397
- fontSize: 14,
10398
- fontWeight: 'bold',
10399
- color: '#000',
10674
+ fontSize: 12,
10675
+ color: '#fff',
10400
10676
  textAlign: 'left',
10401
- width: 150,
10677
+ width: 130,
10402
10678
  height: 20
10403
10679
  }
10404
10680
  }
10405
10681
  },
10406
10682
  style: {
10407
- borderRadius: 4,
10408
- width: 260,
10409
- height: 86,
10410
- padding: 4,
10411
- backgroundColor: 'rgba(255,255,255,0.75)',
10683
+ padding: 7,
10684
+ width: 236,
10685
+ height: 44,
10686
+ borderRadius: 3,
10687
+ backgroundColor: 'rgba(0,0,0,.3)',
10412
10688
  marginBottom: 8
10413
10689
  }
10414
10690
  },
10415
10691
  w: 100,
10416
10692
  h: 40,
10417
- sort: 2
10693
+ sort: 6
10418
10694
  });
10419
10695
 
10420
- var interactionRender$2 = [
10696
+ /*
10697
+ * @Author: binruan@chatlabs.com
10698
+ * @Date: 2024-07-02 14:51:32
10699
+ * @LastEditors: binruan@chatlabs.com
10700
+ * @LastEditTime: 2024-07-02 16:44:34
10701
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
10702
+ *
10703
+ */
10704
+ var linkSettingRender = [
10421
10705
  {
10422
- title: '点击事件',
10706
+ title: '自定义标题',
10423
10707
  child: [
10424
10708
  {
10425
- type: 'link',
10426
- name: 'onClick'
10709
+ type: 'Switch',
10710
+ label: '自定义标题开关',
10711
+ name: ['props', 'customTitle', 'display']
10712
+ },
10713
+ {
10714
+ type: 'Text',
10715
+ label: '标题文案',
10716
+ name: ['props', 'customTitle', 'text']
10717
+ },
10718
+ {
10719
+ type: 'Group',
10720
+ label: '尺寸',
10721
+ child: [
10722
+ {
10723
+ type: 'Number',
10724
+ name: ['props', 'customTitle', 'style', 'width'],
10725
+ addonAfter: 'W'
10726
+ },
10727
+ {
10728
+ type: 'Number',
10729
+ name: ['props', 'customTitle', 'style', 'height'],
10730
+ addonAfter: 'H'
10731
+ }
10732
+ ]
10733
+ },
10734
+ {
10735
+ type: 'Group',
10736
+ label: '圆角',
10737
+ child: [
10738
+ {
10739
+ type: 'Slider',
10740
+ name: ['props', 'customTitle', 'style', 'borderRadius'],
10741
+ max: 100
10742
+ },
10743
+ {
10744
+ type: 'Number',
10745
+ name: ['props', 'customTitle', 'style', 'borderRadius'],
10746
+ addonAfter: 'px',
10747
+ max: 100
10748
+ }
10749
+ ]
10750
+ },
10751
+ {
10752
+ type: 'Color',
10753
+ label: '背景色',
10754
+ name: ['props', 'customTitle', 'style', 'backgroundColor']
10755
+ },
10756
+ {
10757
+ type: 'Group',
10758
+ label: '字体',
10759
+ child: [
10760
+ {
10761
+ type: 'Select',
10762
+ name: ['props', 'customTitle', 'style', 'fontFamily-cn'],
10763
+ bottomText: '中文字体'
10764
+ },
10765
+ {
10766
+ type: 'Select',
10767
+ name: ['props', 'customTitle', 'style', 'fontFamily-en'],
10768
+ bottomText: '英文/其他字体'
10769
+ }
10770
+ ]
10771
+ },
10772
+ {
10773
+ type: 'Group',
10774
+ label: '',
10775
+ child: [
10776
+ {
10777
+ type: 'Color',
10778
+ name: ['props', 'customTitle', 'style', 'color']
10779
+ },
10780
+ {
10781
+ type: 'Number',
10782
+ addonAfter: 'px',
10783
+ name: ['props', 'customTitle', 'style', 'fontSize']
10784
+ }
10785
+ ]
10786
+ },
10787
+ {
10788
+ label: '样式',
10789
+ type: 'TextStyle',
10790
+ name: ['props', 'customTitle', 'style']
10791
+ },
10792
+ {
10793
+ label: '对齐',
10794
+ type: 'TextAlign',
10795
+ name: ['props', 'customTitle', 'style']
10796
+ },
10797
+ {
10798
+ label: '上边距',
10799
+ type: 'Number',
10800
+ name: ['props', 'customTitle', 'style', 'marginTop'],
10801
+ addonAfter: 'px'
10427
10802
  }
10428
10803
  ]
10429
10804
  }
10430
10805
  ];
10431
10806
 
10432
- const Scroll = ({ children, isPadding = true }) => {
10433
- 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));
10434
- };
10435
- var Scroll$1 = memo(Scroll);
10436
-
10437
- var styles$2 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
10807
+ var styles$7 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
10438
10808
 
10439
- const MultiCommodityDiro$1 = (_a) => {
10440
- var _b, _c;
10441
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
10442
- const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
10443
- const { popup } = useEditor();
10809
+ const Link$1 = (_a) => {
10810
+ var _b, _c, _d, _e, _f, _g, _h, _j;
10811
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
10812
+ const { sxpParameter, bffEventReport } = useSxpDataSource();
10444
10813
  const { jumpToWeb } = useEventReport();
10445
- 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]);
10446
- const handleClick = throttle((item) => {
10447
- ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10448
- eventSubject: 'clickCta',
10449
- eventDescription: 'User clicked the CTA'
10450
- }, recData, item, index);
10451
- 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 }), index }));
10452
- if (isExternalLink) {
10453
- if (item === null || item === void 0 ? void 0 : item.link) {
10454
- jumpToWeb(recData, item, item.bindCta, index);
10455
- window.location.href = window.getJointUtmLink(item.link);
10456
- }
10457
- }
10458
- else {
10459
- onClick === null || onClick === void 0 ? void 0 : onClick();
10814
+ const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
10815
+ const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10816
+ const handleTo = () => {
10817
+ if (cta === null || cta === void 0 ? void 0 : cta.link) {
10818
+ jumpToWeb(recData, product, cta, index);
10819
+ window.location.href = window.getJointUtmLink(cta.link);
10460
10820
  }
10461
- }, popup === null || popup === void 0 ? void 0 : popup.duration);
10462
- return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
10463
- var _a, _b, _c, _d, _e, _f, _g, _h;
10464
- return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ 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) }),
10465
- React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
10466
- React.createElement("div", { className: css({
10467
- color: '#000',
10468
- display: 'flex',
10469
- flexDirection: 'column',
10470
- justifyContent: 'space-between',
10471
- width: '100%',
10472
- overflow: 'hidden'
10473
- }) },
10474
- React.createElement("div", { className: styles$2['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10475
- __html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
10821
+ };
10822
+ const src = (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
10823
+ return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
10824
+ React.createElement(Img$1, { src: src, rec: recData, item: (_g = (_f = recData === null || recData === void 0 ? void 0 : recData.video) === null || _f === void 0 ? void 0 : _f.bindProduct) !== null && _g !== void 0 ? _g : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
10825
+ React.createElement("div", { className: css({
10826
+ display: 'flex',
10827
+ alignItems: 'center',
10828
+ width: '100%',
10829
+ overflow: 'hidden'
10830
+ }) },
10831
+ React.createElement("div", null,
10832
+ React.createElement("div", { className: (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) ? styles$7['one-line-ellipsis'] : styles$7['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
10833
+ __html: setFontForText((_h = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _h !== void 0 ? _h : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
10476
10834
  } }),
10477
- React.createElement("div", { className: css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap', lineHeight: ((_f = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _f === void 0 ? void 0 : _f.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
10478
- __html: setFontForText((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
10835
+ (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) && (React.createElement("div", { style: Object.assign(Object.assign({}, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style), { lineHeight: ((_j = customTitle === null || customTitle === void 0 ? void 0 : customTitle.style) === null || _j === void 0 ? void 0 : _j.height) + 'px' }), className: styles$7['one-line-ellipsis'], dangerouslySetInnerHTML: {
10836
+ __html: setFontForText(customTitle === null || customTitle === void 0 ? void 0 : customTitle.text, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style)
10479
10837
  } }))))));
10480
- })));
10481
10838
  };
10482
- var MultiCommodityDiroComponent = memo(MultiCommodityDiro$1);
10839
+ var LinkComponent = memo(Link$1);
10483
10840
 
10484
- /*
10485
- * @Author: binruan@chatlabs.com
10486
- * @Date: 2023-07-28 18:29:57
10487
- * @LastEditors: binruan@chatlabs.com
10488
- * @LastEditTime: 2024-03-29 16:27:22
10489
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiro\material.tsx
10490
- *
10491
- */
10492
- const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
10493
- displayName: '推荐多商品-白底圆角按钮',
10841
+ var _a;
10842
+ const Link = createMaterial(LinkComponent, {
10843
+ displayName: '跳转指引',
10494
10844
  icon: '',
10495
10845
  category: 'template',
10496
- type: 'MultiCommodityDiro',
10846
+ type: 'Link',
10497
10847
  related: {
10498
- interactionRender: interactionRender$2,
10499
- bindableProps: [],
10500
- settingRender: settingRender$2
10848
+ settingRender: (_a = settingRender$4 === null || settingRender$4 === void 0 ? void 0 : settingRender$4.filter((i) => i.type !== 'commodityTitle')) === null || _a === void 0 ? void 0 : _a.concat(linkSettingRender),
10849
+ bindableProps: []
10501
10850
  },
10502
10851
  defaulSetting: {
10503
10852
  props: {
@@ -10508,19 +10857,25 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
10508
10857
  height: 60,
10509
10858
  marginRight: 8
10510
10859
  },
10511
- title: {
10512
- fontSize: 12,
10513
- color: '#000',
10514
- textAlign: 'left'
10515
- },
10516
10860
  ctaTitle: {
10517
- fontSize: 10,
10861
+ fontSize: 12,
10518
10862
  color: '#fff',
10519
- textAlign: 'center',
10520
- width: 80,
10521
- height: 20,
10522
- backgroundColor: 'rgba(0,0,0,1)'
10863
+ textAlign: 'left',
10864
+ width: 130,
10865
+ height: 20
10523
10866
  }
10867
+ },
10868
+ customTitle: {
10869
+ style: {
10870
+ textAlign: 'left',
10871
+ textDecoration: 'underline',
10872
+ fontWeight: 'bold',
10873
+ width: 130,
10874
+ height: 20,
10875
+ fontSize: 12,
10876
+ color: '#000'
10877
+ },
10878
+ text: '探索更多'
10524
10879
  }
10525
10880
  },
10526
10881
  style: {
@@ -10528,16 +10883,16 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
10528
10883
  width: 236,
10529
10884
  height: 74,
10530
10885
  borderRadius: 3,
10531
- backgroundColor: '#fff',
10886
+ backgroundColor: 'rgba(0,0,0,.3)',
10532
10887
  marginBottom: 8
10533
10888
  }
10534
10889
  },
10535
10890
  w: 100,
10536
10891
  h: 40,
10537
- sort: 4
10892
+ sort: 5
10538
10893
  });
10539
10894
 
10540
- var interactionRender$1 = [
10895
+ var interactionRender$6 = [
10541
10896
  {
10542
10897
  title: '点击事件',
10543
10898
  child: [
@@ -10549,70 +10904,49 @@ var interactionRender$1 = [
10549
10904
  }
10550
10905
  ];
10551
10906
 
10552
- var styles$1 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
10907
+ var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
10553
10908
 
10554
- const MultiCommodity$1 = (_a) => {
10555
- var _b, _c;
10556
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
10909
+ const CommodityDiro$1 = (_a) => {
10910
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
10911
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index"]);
10557
10912
  const { sxpParameter } = useSxpDataSource();
10558
- const { ctaEvent, setPopupDetailData } = useSxpDataSource();
10559
- const { popup } = useEditor();
10560
- 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]);
10561
- const { jumpToWeb } = useEventReport();
10562
- const handleClick = throttle((item) => {
10563
- ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10564
- eventSubject: 'clickCta',
10565
- eventDescription: 'User clicked the CTA'
10566
- }, recData, item, index);
10567
- 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 }), index }));
10568
- if (isExternalLink) {
10569
- if (item === null || item === void 0 ? void 0 : item.link) {
10570
- jumpToWeb(recData, item, item.bindCta, index);
10571
- window.location.href = window.getJointUtmLink(item.link);
10572
- }
10573
- }
10574
- else {
10575
- onClick === null || onClick === void 0 ? void 0 : onClick();
10576
- }
10577
- }, popup === null || popup === void 0 ? void 0 : popup.duration);
10578
- return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
10579
- var _a, _b, _c, _d, _e, _f, _g, _h;
10580
- return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ key: item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
10581
- React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
10582
- React.createElement("div", { className: css({
10583
- color: '#fff',
10584
- display: 'flex',
10585
- flexDirection: 'column',
10586
- justifyContent: 'space-between',
10587
- width: '100%',
10588
- overflow: 'hidden'
10589
- }) },
10590
- React.createElement("div", { className: styles$1['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10591
- __html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
10592
- } }),
10593
- React.createElement("div", { className: css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', lineHeight: ((_f = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _f === void 0 ? void 0 : _f.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
10594
- __html: setFontForText((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
10595
- } }))))));
10596
- })));
10597
- };
10598
- var MultiCommodityComponent = memo(MultiCommodity$1);
10599
-
10600
- /*
10601
- * @Author: binruan@chatlabs.com
10913
+ const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
10914
+ const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
10915
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
10916
+ React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
10917
+ React.createElement("div", { className: css({
10918
+ color: '#fff',
10919
+ display: 'flex',
10920
+ flexDirection: 'column',
10921
+ justifyContent: 'space-between',
10922
+ width: '100%',
10923
+ overflow: 'hidden'
10924
+ }) },
10925
+ React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10926
+ __html: setFontForText((_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
10927
+ } }),
10928
+ React.createElement("div", { className: css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap', lineHeight: ((_k = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _k === void 0 ? void 0 : _k.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
10929
+ __html: setFontForText((_m = (_l = product === null || product === void 0 ? void 0 : product.bindCta) === null || _l === void 0 ? void 0 : _l.enTitle) !== null && _m !== void 0 ? _m : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
10930
+ } }))));
10931
+ };
10932
+ var CommodityDiroComponent = memo(CommodityDiro$1);
10933
+
10934
+ /*
10935
+ * @Author: binruan@chatlabs.com
10602
10936
  * @Date: 2023-07-28 18:29:57
10603
10937
  * @LastEditors: binruan@chatlabs.com
10604
- * @LastEditTime: 2024-03-29 16:43:35
10605
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodity\material.tsx
10938
+ * @LastEditTime: 2024-03-29 16:07:28
10939
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiro\material.tsx
10606
10940
  *
10607
10941
  */
10608
- const MultiCommodity = createMaterial(MultiCommodityComponent, {
10609
- displayName: '推荐多商品-透明底',
10942
+ const CommodityDiro = createMaterial(CommodityDiroComponent, {
10943
+ displayName: '推荐单商品-白底圆角按钮',
10610
10944
  icon: '',
10611
10945
  category: 'template',
10612
- type: 'MultiCommodity',
10946
+ type: 'CommodityDiro',
10613
10947
  related: {
10614
- interactionRender: interactionRender$1,
10615
- settingRender: settingRender$2,
10948
+ interactionRender: interactionRender$6,
10949
+ settingRender: settingRender$4,
10616
10950
  bindableProps: []
10617
10951
  },
10618
10952
  defaulSetting: {
@@ -10626,16 +10960,16 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
10626
10960
  },
10627
10961
  title: {
10628
10962
  fontSize: 12,
10629
- color: '#fff',
10963
+ color: '#000',
10630
10964
  textAlign: 'left'
10631
10965
  },
10632
10966
  ctaTitle: {
10633
10967
  fontSize: 10,
10634
10968
  color: '#fff',
10635
10969
  textAlign: 'center',
10636
- width: 130,
10970
+ width: 80,
10637
10971
  height: 20,
10638
- backgroundColor: 'rgba(0,0,0,.5)'
10972
+ backgroundColor: 'rgba(0,0,0,1)'
10639
10973
  }
10640
10974
  }
10641
10975
  },
@@ -10644,16 +10978,16 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
10644
10978
  width: 236,
10645
10979
  height: 74,
10646
10980
  borderRadius: 3,
10647
- backgroundColor: 'rgba(0,0,0,.3)',
10981
+ backgroundColor: '#fff',
10648
10982
  marginBottom: 8
10649
10983
  }
10650
10984
  },
10651
10985
  w: 100,
10652
10986
  h: 40,
10653
- sort: 3
10987
+ sort: 2
10654
10988
  });
10655
10989
 
10656
- var interactionRender = [
10990
+ var interactionRender$5 = [
10657
10991
  {
10658
10992
  title: '点击事件',
10659
10993
  child: [
@@ -10665,9 +10999,105 @@ var interactionRender = [
10665
10999
  }
10666
11000
  ];
10667
11001
 
10668
- var styles = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
11002
+ var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
10669
11003
 
10670
- const MultiCommodityDiroNew$1 = (_a) => {
11004
+ const CommodityDiroNew$1 = (_a) => {
11005
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
11006
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index"]);
11007
+ const { sxpParameter } = useSxpDataSource();
11008
+ const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
11009
+ const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
11010
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
11011
+ React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
11012
+ React.createElement("div", { className: css({
11013
+ color: '#fff',
11014
+ display: 'flex',
11015
+ flexDirection: 'column',
11016
+ justifyContent: 'center',
11017
+ width: '100%',
11018
+ overflow: 'hidden'
11019
+ }) },
11020
+ React.createElement("div", { className: styles$5['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
11021
+ __html: setFontForText((_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
11022
+ } }),
11023
+ React.createElement("div", { className: css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
11024
+ __html: setFontForText((_l = (_k = product === null || product === void 0 ? void 0 : product.bindCta) === null || _k === void 0 ? void 0 : _k.enTitle) !== null && _l !== void 0 ? _l : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
11025
+ } }))));
11026
+ };
11027
+ var CommodityDiroNewComponent = memo(CommodityDiroNew$1);
11028
+
11029
+ /*
11030
+ * @Author: binruan@chatlabs.com
11031
+ * @Date: 2023-07-28 18:29:57
11032
+ * @LastEditors: binruan@chatlabs.com
11033
+ * @LastEditTime: 2024-04-09 11:54:27
11034
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiroNew\material.tsx
11035
+ *
11036
+ */
11037
+ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
11038
+ displayName: '推荐单商品-白底下划线按钮',
11039
+ icon: '',
11040
+ category: 'template',
11041
+ type: 'CommodityDiroNew',
11042
+ related: {
11043
+ interactionRender: interactionRender$5,
11044
+ bindableProps: [],
11045
+ settingRender: settingRender$4
11046
+ },
11047
+ defaulSetting: {
11048
+ props: {
11049
+ ctaTempStyles: {
11050
+ img: {
11051
+ borderRadius: 8,
11052
+ width: 78,
11053
+ height: 78,
11054
+ marginRight: 16
11055
+ },
11056
+ title: {
11057
+ fontSize: 13,
11058
+ color: '#000',
11059
+ textAlign: 'left'
11060
+ },
11061
+ ctaTitle: {
11062
+ textDecoration: 'underline',
11063
+ fontSize: 14,
11064
+ fontWeight: 'bold',
11065
+ color: '#000',
11066
+ textAlign: 'left',
11067
+ width: 150,
11068
+ height: 20
11069
+ }
11070
+ }
11071
+ },
11072
+ style: {
11073
+ borderRadius: 4,
11074
+ width: 260,
11075
+ height: 86,
11076
+ padding: 4,
11077
+ backgroundColor: 'rgba(255,255,255,0.75)',
11078
+ marginBottom: 8
11079
+ }
11080
+ },
11081
+ w: 100,
11082
+ h: 40,
11083
+ sort: 2
11084
+ });
11085
+
11086
+ var interactionRender$4 = [
11087
+ {
11088
+ title: '点击事件',
11089
+ child: [
11090
+ {
11091
+ type: 'link',
11092
+ name: 'onClick'
11093
+ }
11094
+ ]
11095
+ }
11096
+ ];
11097
+
11098
+ var styles$4 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
11099
+
11100
+ const MultiCommodityDiro$1 = (_a) => {
10671
11101
  var _b, _c;
10672
11102
  var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
10673
11103
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
@@ -10690,55 +11120,54 @@ const MultiCommodityDiroNew$1 = (_a) => {
10690
11120
  onClick === null || onClick === void 0 ? void 0 : onClick();
10691
11121
  }
10692
11122
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
10693
- return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
10694
- var _a, _b, _c, _d, _e, _f, _g;
10695
- return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ 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) }),
11123
+ return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, index) => {
11124
+ var _a, _b, _c, _d, _e, _f, _g, _h;
11125
+ return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ key: index, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
10696
11126
  React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
10697
11127
  React.createElement("div", { className: css({
10698
- color: '#fff',
11128
+ color: '#000',
10699
11129
  display: 'flex',
10700
11130
  flexDirection: 'column',
10701
- justifyContent: 'center',
11131
+ justifyContent: 'space-between',
10702
11132
  width: '100%',
10703
- overflow: 'hidden',
10704
- lineHeight: '20px'
11133
+ overflow: 'hidden'
10705
11134
  }) },
10706
- React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
11135
+ React.createElement("div", { className: styles$4['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10707
11136
  __html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
10708
11137
  } }),
10709
- React.createElement("div", { className: css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
10710
- __html: setFontForText((_g = (_f = item === null || item === void 0 ? void 0 : item.bindCta) === null || _f === void 0 ? void 0 : _f.enTitle) !== null && _g !== void 0 ? _g : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
11138
+ React.createElement("div", { className: css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap', lineHeight: ((_f = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _f === void 0 ? void 0 : _f.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
11139
+ __html: setFontForText((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
10711
11140
  } }))))));
10712
11141
  })));
10713
11142
  };
10714
- var MultiCommodityDiroNewComponent = memo(MultiCommodityDiroNew$1);
11143
+ var MultiCommodityDiroComponent = memo(MultiCommodityDiro$1);
10715
11144
 
10716
11145
  /*
10717
11146
  * @Author: binruan@chatlabs.com
10718
11147
  * @Date: 2023-07-28 18:29:57
10719
11148
  * @LastEditors: binruan@chatlabs.com
10720
- * @LastEditTime: 2024-05-21 16:44:00
10721
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\material.tsx
11149
+ * @LastEditTime: 2024-03-29 16:27:22
11150
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiro\material.tsx
10722
11151
  *
10723
11152
  */
10724
- const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
10725
- displayName: '推荐多商品-白底下划线按钮',
11153
+ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
11154
+ displayName: '推荐多商品-白底圆角按钮',
10726
11155
  icon: '',
10727
11156
  category: 'template',
10728
- type: 'MultiCommodityDiroNew',
11157
+ type: 'MultiCommodityDiro',
10729
11158
  related: {
10730
- interactionRender,
11159
+ interactionRender: interactionRender$4,
10731
11160
  bindableProps: [],
10732
- settingRender: settingRender$2
11161
+ settingRender: settingRender$4
10733
11162
  },
10734
11163
  defaulSetting: {
10735
11164
  props: {
10736
11165
  ctaTempStyles: {
10737
11166
  img: {
10738
- borderRadius: 8,
10739
- width: 78,
10740
- height: 78,
10741
- marginRight: 16
11167
+ borderRadius: 3,
11168
+ width: 60,
11169
+ height: 60,
11170
+ marginRight: 8
10742
11171
  },
10743
11172
  title: {
10744
11173
  fontSize: 12,
@@ -10746,22 +11175,21 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
10746
11175
  textAlign: 'left'
10747
11176
  },
10748
11177
  ctaTitle: {
10749
- textDecoration: 'underline',
10750
- fontSize: 12,
10751
- fontWeight: 'bold',
10752
- color: '#000',
10753
- textAlign: 'left',
10754
- width: 150,
10755
- height: 20
11178
+ fontSize: 10,
11179
+ color: '#fff',
11180
+ textAlign: 'center',
11181
+ width: 80,
11182
+ height: 20,
11183
+ backgroundColor: 'rgba(0,0,0,1)'
10756
11184
  }
10757
11185
  }
10758
11186
  },
10759
11187
  style: {
10760
- borderRadius: 4,
10761
- width: 260,
10762
- height: 86,
10763
- padding: 4,
10764
- backgroundColor: 'rgba(255,255,255,0.75)',
11188
+ padding: 7,
11189
+ width: 236,
11190
+ height: 74,
11191
+ borderRadius: 3,
11192
+ backgroundColor: '#fff',
10765
11193
  marginBottom: 8
10766
11194
  }
10767
11195
  },
@@ -10770,42 +11198,276 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
10770
11198
  sort: 4
10771
11199
  });
10772
11200
 
10773
- /*
10774
- * @Author: binruan@chatlabs.com
10775
- * @Date: 2024-04-07 14:07:12
10776
- * @LastEditors: binruan@chatlabs.com
10777
- * @LastEditTime: 2024-06-27 09:49:19
10778
- * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
10779
- *
10780
- */
10781
- var settingRender$1 = [
11201
+ var interactionRender$3 = [
10782
11202
  {
10783
- title: 'Banner',
11203
+ title: '点击事件',
10784
11204
  child: [
10785
11205
  {
10786
- type: 'Switch',
10787
- label: 'Banner图开关',
10788
- name: ['props', 'showBanner']
11206
+ type: 'link',
11207
+ name: 'onClick'
10789
11208
  }
10790
11209
  ]
10791
- },
10792
- {
10793
- title: '卡片样式',
10794
- child: [
10795
- {
10796
- type: 'Number',
10797
- label: '上下边距',
10798
- name: ['props', 'space'],
10799
- addonAfter: 'px'
10800
- },
10801
- {
10802
- type: 'Switch',
10803
- label: '固定宽高',
10804
- name: ['props', 'openFixedSize'],
10805
- initialValue: true
11210
+ }
11211
+ ];
11212
+
11213
+ var styles$3 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
11214
+
11215
+ const MultiCommodity$1 = (_a) => {
11216
+ var _b, _c;
11217
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
11218
+ const { sxpParameter } = useSxpDataSource();
11219
+ const { ctaEvent, setPopupDetailData } = useSxpDataSource();
11220
+ const { popup } = useEditor();
11221
+ 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]);
11222
+ const { jumpToWeb } = useEventReport();
11223
+ const handleClick = throttle((item) => {
11224
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
11225
+ eventSubject: 'clickCta',
11226
+ eventDescription: 'User clicked the CTA'
11227
+ }, recData, item, index);
11228
+ 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 }), index }));
11229
+ if (isExternalLink) {
11230
+ if (item === null || item === void 0 ? void 0 : item.link) {
11231
+ jumpToWeb(recData, item, item.bindCta, index);
11232
+ window.location.href = window.getJointUtmLink(item.link);
10806
11233
  }
10807
- ]
10808
- },
11234
+ }
11235
+ else {
11236
+ onClick === null || onClick === void 0 ? void 0 : onClick();
11237
+ }
11238
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
11239
+ return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, index) => {
11240
+ var _a, _b, _c, _d, _e, _f, _g, _h;
11241
+ return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ key: index, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
11242
+ React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
11243
+ React.createElement("div", { className: css({
11244
+ color: '#fff',
11245
+ display: 'flex',
11246
+ flexDirection: 'column',
11247
+ justifyContent: 'space-between',
11248
+ width: '100%',
11249
+ overflow: 'hidden'
11250
+ }) },
11251
+ React.createElement("div", { className: styles$3['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
11252
+ __html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
11253
+ } }),
11254
+ React.createElement("div", { className: css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', lineHeight: ((_f = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _f === void 0 ? void 0 : _f.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
11255
+ __html: setFontForText((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
11256
+ } }))))));
11257
+ })));
11258
+ };
11259
+ var MultiCommodityComponent = memo(MultiCommodity$1);
11260
+
11261
+ /*
11262
+ * @Author: binruan@chatlabs.com
11263
+ * @Date: 2023-07-28 18:29:57
11264
+ * @LastEditors: binruan@chatlabs.com
11265
+ * @LastEditTime: 2024-03-29 16:43:35
11266
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodity\material.tsx
11267
+ *
11268
+ */
11269
+ const MultiCommodity = createMaterial(MultiCommodityComponent, {
11270
+ displayName: '推荐多商品-透明底',
11271
+ icon: '',
11272
+ category: 'template',
11273
+ type: 'MultiCommodity',
11274
+ related: {
11275
+ interactionRender: interactionRender$3,
11276
+ settingRender: settingRender$4,
11277
+ bindableProps: []
11278
+ },
11279
+ defaulSetting: {
11280
+ props: {
11281
+ ctaTempStyles: {
11282
+ img: {
11283
+ borderRadius: 3,
11284
+ width: 60,
11285
+ height: 60,
11286
+ marginRight: 8
11287
+ },
11288
+ title: {
11289
+ fontSize: 12,
11290
+ color: '#fff',
11291
+ textAlign: 'left'
11292
+ },
11293
+ ctaTitle: {
11294
+ fontSize: 10,
11295
+ color: '#fff',
11296
+ textAlign: 'center',
11297
+ width: 130,
11298
+ height: 20,
11299
+ backgroundColor: 'rgba(0,0,0,.5)'
11300
+ }
11301
+ }
11302
+ },
11303
+ style: {
11304
+ padding: 7,
11305
+ width: 236,
11306
+ height: 74,
11307
+ borderRadius: 3,
11308
+ backgroundColor: 'rgba(0,0,0,.3)',
11309
+ marginBottom: 8
11310
+ }
11311
+ },
11312
+ w: 100,
11313
+ h: 40,
11314
+ sort: 3
11315
+ });
11316
+
11317
+ var interactionRender$2 = [
11318
+ {
11319
+ title: '点击事件',
11320
+ child: [
11321
+ {
11322
+ type: 'link',
11323
+ name: 'onClick'
11324
+ }
11325
+ ]
11326
+ }
11327
+ ];
11328
+
11329
+ var styles$2 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
11330
+
11331
+ const MultiCommodityDiroNew$1 = (_a) => {
11332
+ var _b, _c;
11333
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
11334
+ const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
11335
+ const { popup } = useEditor();
11336
+ const { jumpToWeb } = useEventReport();
11337
+ 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]);
11338
+ const handleClick = throttle((item, multiCheckIndex) => {
11339
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
11340
+ eventSubject: 'clickCta',
11341
+ eventDescription: 'User clicked the CTA'
11342
+ }, recData, item, index);
11343
+ 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 }), index,
11344
+ multiCheckIndex }));
11345
+ if (isExternalLink) {
11346
+ if (item === null || item === void 0 ? void 0 : item.link) {
11347
+ jumpToWeb(recData, item, item.bindCta, index);
11348
+ window.location.href = window.getJointUtmLink(item.link);
11349
+ }
11350
+ }
11351
+ else {
11352
+ onClick === null || onClick === void 0 ? void 0 : onClick();
11353
+ }
11354
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
11355
+ return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, index) => {
11356
+ var _a, _b, _c, _d, _e, _f, _g;
11357
+ return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, Object.assign({ key: index, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item, index) }),
11358
+ React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
11359
+ React.createElement("div", { className: css({
11360
+ color: '#fff',
11361
+ display: 'flex',
11362
+ flexDirection: 'column',
11363
+ justifyContent: 'center',
11364
+ width: '100%',
11365
+ overflow: 'hidden',
11366
+ lineHeight: '20px'
11367
+ }) },
11368
+ React.createElement("div", { className: styles$2['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
11369
+ __html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
11370
+ } }),
11371
+ React.createElement("div", { className: css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
11372
+ __html: setFontForText((_g = (_f = item === null || item === void 0 ? void 0 : item.bindCta) === null || _f === void 0 ? void 0 : _f.enTitle) !== null && _g !== void 0 ? _g : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
11373
+ } }))))));
11374
+ })));
11375
+ };
11376
+ var MultiCommodityDiroNewComponent = memo(MultiCommodityDiroNew$1);
11377
+
11378
+ /*
11379
+ * @Author: binruan@chatlabs.com
11380
+ * @Date: 2023-07-28 18:29:57
11381
+ * @LastEditors: binruan@chatlabs.com
11382
+ * @LastEditTime: 2024-05-21 16:44:00
11383
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\material.tsx
11384
+ *
11385
+ */
11386
+ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
11387
+ displayName: '推荐多商品-白底下划线按钮',
11388
+ icon: '',
11389
+ category: 'template',
11390
+ type: 'MultiCommodityDiroNew',
11391
+ related: {
11392
+ interactionRender: interactionRender$2,
11393
+ bindableProps: [],
11394
+ settingRender: settingRender$4
11395
+ },
11396
+ defaulSetting: {
11397
+ props: {
11398
+ ctaTempStyles: {
11399
+ img: {
11400
+ borderRadius: 8,
11401
+ width: 78,
11402
+ height: 78,
11403
+ marginRight: 16
11404
+ },
11405
+ title: {
11406
+ fontSize: 12,
11407
+ color: '#000',
11408
+ textAlign: 'left'
11409
+ },
11410
+ ctaTitle: {
11411
+ textDecoration: 'underline',
11412
+ fontSize: 12,
11413
+ fontWeight: 'bold',
11414
+ color: '#000',
11415
+ textAlign: 'left',
11416
+ width: 150,
11417
+ height: 20
11418
+ }
11419
+ }
11420
+ },
11421
+ style: {
11422
+ borderRadius: 4,
11423
+ width: 260,
11424
+ height: 86,
11425
+ padding: 4,
11426
+ backgroundColor: 'rgba(255,255,255,0.75)',
11427
+ marginBottom: 8
11428
+ }
11429
+ },
11430
+ w: 100,
11431
+ h: 40,
11432
+ sort: 4
11433
+ });
11434
+
11435
+ /*
11436
+ * @Author: binruan@chatlabs.com
11437
+ * @Date: 2024-04-07 14:07:12
11438
+ * @LastEditors: binruan@chatlabs.com
11439
+ * @LastEditTime: 2024-06-27 09:49:19
11440
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
11441
+ *
11442
+ */
11443
+ var settingRender$3 = [
11444
+ {
11445
+ title: 'Banner',
11446
+ child: [
11447
+ {
11448
+ type: 'Switch',
11449
+ label: 'Banner图开关',
11450
+ name: ['props', 'showBanner']
11451
+ }
11452
+ ]
11453
+ },
11454
+ {
11455
+ title: '卡片样式',
11456
+ child: [
11457
+ {
11458
+ type: 'Number',
11459
+ label: '上下边距',
11460
+ name: ['props', 'space'],
11461
+ addonAfter: 'px'
11462
+ },
11463
+ {
11464
+ type: 'Switch',
11465
+ label: '固定宽高',
11466
+ name: ['props', 'openFixedSize'],
11467
+ initialValue: true
11468
+ }
11469
+ ]
11470
+ },
10809
11471
  {
10810
11472
  title: '文本设置',
10811
11473
  child: [
@@ -10995,7 +11657,7 @@ var settingRender$1 = [
10995
11657
  * @Author: binruan@chatlabs.com
10996
11658
  * @Date: 2023-12-26 16:11:34
10997
11659
  * @LastEditors: binruan@chatlabs.com
10998
- * @LastEditTime: 2024-07-04 18:34:18
11660
+ * @LastEditTime: 2024-06-27 10:19:28
10999
11661
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Navbar.tsx
11000
11662
  *
11001
11663
  */
@@ -11004,7 +11666,7 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
11004
11666
  const { waterFallData, setOpenHashtag } = useSxpDataSource();
11005
11667
  return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
11006
11668
  React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: 'back button', onClick: onClose }),
11007
- React.createElement("div", { className: 'clc-sxp-nav-title', style: Object.assign(Object.assign({}, textStyle), { paddingLeft: (textStyle === null || textStyle === void 0 ? void 0 : textStyle.textAlign) === 'left' ? '35px' : 0 }), dangerouslySetInnerHTML: {
11669
+ React.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle, dangerouslySetInnerHTML: {
11008
11670
  __html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
11009
11671
  } })));
11010
11672
  };
@@ -12599,7 +13261,7 @@ function WaterfallList$1(_a) {
12599
13261
  var _a, _b;
12600
13262
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
12601
13263
  reportTagsView();
12602
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
13264
+ window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
12603
13265
  }
12604
13266
  };
12605
13267
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -12834,7 +13496,7 @@ function WaterfallList(_a) {
12834
13496
  var _a, _b;
12835
13497
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
12836
13498
  reportTagsView();
12837
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
13499
+ window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
12838
13500
  }
12839
13501
  };
12840
13502
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -12987,7 +13649,7 @@ var HashTagComponent = memo(HashTag$1);
12987
13649
  * @Author: binruan@chatlabs.com
12988
13650
  * @Date: 2023-07-28 18:29:57
12989
13651
  * @LastEditors: binruan@chatlabs.com
12990
- * @LastEditTime: 2024-07-04 18:38:10
13652
+ * @LastEditTime: 2024-04-30 10:13:13
12991
13653
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\material.tsx
12992
13654
  *
12993
13655
  */
@@ -12997,7 +13659,7 @@ const HashTag = createMaterial(HashTagComponent, {
12997
13659
  category: 'base',
12998
13660
  type: 'HashTag',
12999
13661
  related: {
13000
- settingRender: settingRender$1,
13662
+ settingRender: settingRender$3,
13001
13663
  bindableProps: []
13002
13664
  },
13003
13665
  defaulSetting: {
@@ -13007,8 +13669,7 @@ const HashTag = createMaterial(HashTagComponent, {
13007
13669
  textStyles: {
13008
13670
  hashTagTitle: {
13009
13671
  fontSize: 16,
13010
- color: '#000',
13011
- textAlign: 'center'
13672
+ color: '#000'
13012
13673
  },
13013
13674
  hashTagDesc: {
13014
13675
  fontSize: 12,
@@ -13031,106 +13692,805 @@ const HashTag = createMaterial(HashTagComponent, {
13031
13692
  color: '#000'
13032
13693
  }
13033
13694
  },
13034
- buttonStyle: {
13035
- backgroundColor: '#000',
13036
- fontSize: 12,
13037
- height: 52,
13038
- fontWeight: 'bold',
13039
- textAlign: 'center',
13040
- color: '#fff',
13041
- borderRadius: 25
13695
+ buttonStyle: {
13696
+ backgroundColor: '#000',
13697
+ fontSize: 12,
13698
+ height: 52,
13699
+ fontWeight: 'bold',
13700
+ textAlign: 'center',
13701
+ color: '#fff',
13702
+ borderRadius: 25
13703
+ },
13704
+ buttonBgStyle: {
13705
+ backgroundColor: '#fff',
13706
+ height: 52,
13707
+ paddingTop: 20,
13708
+ paddingLeft: 20,
13709
+ paddingRight: 20,
13710
+ paddingBottom: 20
13711
+ }
13712
+ }
13713
+ },
13714
+ w: 100,
13715
+ h: 40,
13716
+ sort: 2
13717
+ });
13718
+
13719
+ /*
13720
+ * @Author: binruan@chatlabs.com
13721
+ * @Date: 2024-06-13 10:08:32
13722
+ * @LastEditors: binruan@chatlabs.com
13723
+ * @LastEditTime: 2024-06-13 17:42:50
13724
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\settingRender.tsx
13725
+ *
13726
+ */
13727
+ var settingRender$2 = [
13728
+ {
13729
+ title: '协议详情',
13730
+ child: [
13731
+ {
13732
+ type: 'Switch',
13733
+ label: '必须同意用户协议',
13734
+ name: ['props', 'privacy_necessity'],
13735
+ extra: '当新用户进入页面时,会出现用户协议弹窗,用户需要先同意协议后才能访问内容。'
13736
+ },
13737
+ {
13738
+ type: 'Text',
13739
+ label: '弹窗标题',
13740
+ name: ['props', 'privacy_title']
13741
+ },
13742
+ {
13743
+ type: 'TextArea',
13744
+ label: '用户协议弹窗内容',
13745
+ name: ['props', 'privacy_context']
13746
+ },
13747
+ {
13748
+ type: 'Group',
13749
+ label: '隐私政策',
13750
+ child: [
13751
+ {
13752
+ type: 'Text',
13753
+ name: ['props', 'privacy_policy_title']
13754
+ },
13755
+ {
13756
+ type: 'Text',
13757
+ name: ['props', 'privacy_policy_url'],
13758
+ addonBefore: 'https://'
13759
+ }
13760
+ ],
13761
+ extra: '当用户点击更多信息按钮时,将会跳转至设置的链接查看政策内容'
13762
+ }
13763
+ ]
13764
+ }
13765
+ ];
13766
+
13767
+ const Consent$1 = (props) => {
13768
+ return React.createElement(Consent$1, Object.assign({}, props));
13769
+ };
13770
+ var ConsentComponent = memo(Consent$1);
13771
+
13772
+ /*
13773
+ * @Author: binruan@chatlabs.com
13774
+ * @Date: 2023-07-28 18:29:57
13775
+ * @LastEditors: binruan@chatlabs.com
13776
+ * @LastEditTime: 2024-07-03 15:43:24
13777
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\material.tsx
13778
+ *
13779
+ */
13780
+ const Consent = createMaterial(ConsentComponent, {
13781
+ displayName: 'Consent',
13782
+ icon: '',
13783
+ category: 'base',
13784
+ type: 'Consent',
13785
+ related: {
13786
+ settingRender: settingRender$2
13787
+ },
13788
+ defaulSetting: {
13789
+ props: {},
13790
+ style: {}
13791
+ },
13792
+ w: 100,
13793
+ h: 40,
13794
+ sort: 1
13795
+ });
13796
+
13797
+ /*
13798
+ * @Author: binruan@chatlabs.com
13799
+ * @Date: 2024-07-02 14:51:32
13800
+ * @LastEditors: binruan@chatlabs.com
13801
+ * @LastEditTime: 2024-07-05 19:09:41
13802
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\settingRender.tsx
13803
+ *
13804
+ */
13805
+ var settingRender$1 = [
13806
+ {
13807
+ title: '主题样式',
13808
+ child: [
13809
+ {
13810
+ type: 'Group',
13811
+ label: '尺寸',
13812
+ child: [
13813
+ {
13814
+ type: 'Number',
13815
+ name: ['style', 'width'],
13816
+ addonAfter: 'W'
13817
+ },
13818
+ {
13819
+ type: 'Number',
13820
+ name: ['style', 'height'],
13821
+ addonAfter: 'H'
13822
+ }
13823
+ ]
13824
+ },
13825
+ {
13826
+ type: 'Group',
13827
+ label: '圆角',
13828
+ child: [
13829
+ {
13830
+ type: 'Slider',
13831
+ name: ['style', 'borderRadius'],
13832
+ max: 100
13833
+ },
13834
+ {
13835
+ type: 'Number',
13836
+ name: ['style', 'borderRadius'],
13837
+ addonAfter: 'px',
13838
+ max: 100
13839
+ }
13840
+ ]
13841
+ },
13842
+ {
13843
+ type: 'Color',
13844
+ label: '背景色',
13845
+ name: ['style', 'backgroundColor']
13846
+ },
13847
+ {
13848
+ type: 'TextMargin',
13849
+ name: ['style'],
13850
+ label: '上下边距',
13851
+ direction: 'vertical'
13852
+ },
13853
+ {
13854
+ type: 'TextPadding',
13855
+ name: ['style'],
13856
+ label: '内边距',
13857
+ direction: 'horizontal'
13858
+ }
13859
+ ]
13860
+ },
13861
+ {
13862
+ title: 'CTA标题',
13863
+ child: [
13864
+ {
13865
+ type: 'Group',
13866
+ label: '字体',
13867
+ child: [
13868
+ {
13869
+ type: 'Select',
13870
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-cn'],
13871
+ bottomText: '中文字体'
13872
+ },
13873
+ {
13874
+ type: 'Select',
13875
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-en'],
13876
+ bottomText: '英文/其他字体'
13877
+ }
13878
+ ]
13879
+ },
13880
+ {
13881
+ type: 'Group',
13882
+ label: '',
13883
+ child: [
13884
+ {
13885
+ type: 'Color',
13886
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
13887
+ },
13888
+ {
13889
+ type: 'Number',
13890
+ addonAfter: 'px',
13891
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
13892
+ }
13893
+ ]
13894
+ },
13895
+ {
13896
+ label: '样式',
13897
+ type: 'TextStyle',
13898
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
13899
+ },
13900
+ {
13901
+ label: '对齐',
13902
+ type: 'TextAlign',
13903
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
13904
+ }
13905
+ ]
13906
+ }
13907
+ ];
13908
+
13909
+ var styles$1 = {"animated-button":"index-module_animated-button__lqTbg","gradientCover":"index-module_gradientCover__5iUag"};
13910
+
13911
+ const AniLink$1 = (_a) => {
13912
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
13913
+ var { style, recData, ctaTempStyles, index, event, onClick, isExternalLink = false } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "onClick", "isExternalLink"]);
13914
+ const { ctaEvent } = useSxpDataSource();
13915
+ const { jumpToWeb } = useEventReport();
13916
+ const ref = useRef(null);
13917
+ const isOnScreen = useOnScreen(ref);
13918
+ const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
13919
+ const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
13920
+ const handleTo = () => {
13921
+ var _a, _b, _c;
13922
+ const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
13923
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
13924
+ eventSubject: 'clickCta',
13925
+ eventDescription: 'User clicked the CTA'
13926
+ }, recData, item, index);
13927
+ if (isExternalLink) {
13928
+ jumpToWeb(recData, product, cta, index);
13929
+ }
13930
+ onClick === null || onClick === void 0 ? void 0 : onClick();
13931
+ };
13932
+ const title = (cta === null || cta === void 0 ? void 0 : cta.title) || '查看详情 >';
13933
+ const aniStyle = useMemo(() => {
13934
+ var _a, _b;
13935
+ const ani = event === null || event === void 0 ? void 0 : event.animation;
13936
+ if (ani) {
13937
+ const { delay, duration, backgroundColor } = ani;
13938
+ return {
13939
+ ':after': {
13940
+ animationDelay: `${(_a = delay / 1000) !== null && _a !== void 0 ? _a : 0}s`,
13941
+ animationDuration: `${(_b = duration / 1000) !== null && _b !== void 0 ? _b : 0}s`,
13942
+ backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'transparent'}`
13943
+ }
13944
+ };
13945
+ }
13946
+ }, [event === null || event === void 0 ? void 0 : event.animation]);
13947
+ useEffect(() => {
13948
+ if (isOnScreen && (ref === null || ref === void 0 ? void 0 : ref.current)) {
13949
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
13950
+ eventSubject: 'ctaExposure',
13951
+ eventDescription: 'The cta was shown to the user'
13952
+ }, recData, product, index);
13953
+ }
13954
+ }, [isOnScreen]);
13955
+ return (React.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign({}, style), { display: 'flex', alignItems: 'center' }) }, props, { className: `${styles$1['animated-button']} ${css(aniStyle)}`, onClick: handleTo }),
13956
+ React.createElement("div", { className: 'one-line-ellipsis', style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
13957
+ __html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
13958
+ } })));
13959
+ };
13960
+ var AniLinkComponent = memo(AniLink$1);
13961
+
13962
+ /*
13963
+ * @Author: binruan@chatlabs.com
13964
+ * @Date: 2024-07-05 14:08:41
13965
+ * @LastEditors: binruan@chatlabs.com
13966
+ * @LastEditTime: 2024-07-09 14:34:49
13967
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
13968
+ *
13969
+ */
13970
+ var interactionRender$1 = [
13971
+ {
13972
+ title: '点击事件',
13973
+ child: [
13974
+ {
13975
+ type: 'link',
13976
+ name: 'onClick'
13977
+ }
13978
+ ]
13979
+ },
13980
+ {
13981
+ title: '动画效果',
13982
+ child: [
13983
+ {
13984
+ type: 'Color',
13985
+ name: ['animation', 'backgroundColor'],
13986
+ label: '动画颜色'
13987
+ },
13988
+ {
13989
+ type: 'Select',
13990
+ name: ['animation', 'name'],
13991
+ label: '动画',
13992
+ options: [
13993
+ {
13994
+ label: '由左向右/中间扩散',
13995
+ value: 1
13996
+ }
13997
+ ],
13998
+ initialValue: 1,
13999
+ fieldProps: {
14000
+ style: {
14001
+ width: '100%'
14002
+ }
14003
+ }
14004
+ },
14005
+ {
14006
+ type: 'Number',
14007
+ label: '动画启动时间',
14008
+ name: ['animation', 'delay'],
14009
+ addonAfter: 'ms'
14010
+ },
14011
+ {
14012
+ type: 'Number',
14013
+ label: '动画持续时间',
14014
+ name: ['animation', 'duration'],
14015
+ addonAfter: 'ms'
14016
+ }
14017
+ ]
14018
+ }
14019
+ ];
14020
+
14021
+ /*
14022
+ * @Author: binruan@chatlabs.com
14023
+ * @Date: 2023-07-28 18:29:57
14024
+ * @LastEditors: binruan@chatlabs.com
14025
+ * @LastEditTime: 2024-07-05 19:27:54
14026
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\material.tsx
14027
+ *
14028
+ */
14029
+ const AniLink = createMaterial(AniLinkComponent, {
14030
+ displayName: '纯色动效CTA',
14031
+ icon: '',
14032
+ category: 'cta',
14033
+ type: 'AniLink',
14034
+ related: {
14035
+ settingRender: settingRender$1,
14036
+ bindableProps: [],
14037
+ interactionRender: interactionRender$1
14038
+ },
14039
+ defaulSetting: {
14040
+ props: {
14041
+ ctaTempStyles: {
14042
+ ctaTitle: {
14043
+ fontSize: 15,
14044
+ color: '#fff',
14045
+ textAlign: 'left'
14046
+ }
14047
+ }
14048
+ },
14049
+ style: {
14050
+ width: 236,
14051
+ height: 44,
14052
+ borderRadius: 3,
14053
+ backgroundColor: 'rgba(0,0,0,.3)',
14054
+ paddingLeft: 7,
14055
+ paddingRight: 7
14056
+ }
14057
+ },
14058
+ w: 100,
14059
+ h: 40,
14060
+ sort: 1
14061
+ });
14062
+
14063
+ /*
14064
+ * @Author: binruan@chatlabs.com
14065
+ * @Date: 2024-03-26 16:50:25
14066
+ * @LastEditors: binruan@chatlabs.com
14067
+ * @LastEditTime: 2024-07-08 11:01:24
14068
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\settingRender.tsx
14069
+ *
14070
+ */
14071
+ var settingRender = [
14072
+ {
14073
+ title: '主题样式',
14074
+ child: [
14075
+ {
14076
+ type: 'Group',
14077
+ label: '尺寸',
14078
+ child: [
14079
+ {
14080
+ type: 'Number',
14081
+ name: ['style', 'width'],
14082
+ addonAfter: 'W'
14083
+ },
14084
+ {
14085
+ type: 'Number',
14086
+ name: ['style', 'height'],
14087
+ addonAfter: 'H'
14088
+ }
14089
+ ]
14090
+ },
14091
+ {
14092
+ type: 'Group',
14093
+ label: '圆角',
14094
+ child: [
14095
+ {
14096
+ type: 'Slider',
14097
+ name: ['style', 'borderRadius'],
14098
+ max: 100
14099
+ },
14100
+ {
14101
+ type: 'Number',
14102
+ name: ['style', 'borderRadius'],
14103
+ addonAfter: 'px',
14104
+ max: 100
14105
+ }
14106
+ ]
14107
+ },
14108
+ {
14109
+ type: 'Color',
14110
+ label: '背景色',
14111
+ name: ['style', 'backgroundColor']
14112
+ },
14113
+ {
14114
+ label: '外边距',
14115
+ type: 'Number',
14116
+ name: ['style', 'margin'],
14117
+ addonAfter: 'px'
14118
+ },
14119
+ {
14120
+ label: '内边距',
14121
+ type: 'Number',
14122
+ name: ['style', 'padding'],
14123
+ addonAfter: 'px'
14124
+ }
14125
+ ]
14126
+ },
14127
+ {
14128
+ title: '商品图片',
14129
+ child: [
14130
+ {
14131
+ type: 'Group',
14132
+ label: '尺寸',
14133
+ child: [
14134
+ {
14135
+ type: 'Number',
14136
+ name: ['props', 'ctaTempStyles', 'img', 'width'],
14137
+ addonAfter: 'W'
14138
+ },
14139
+ {
14140
+ type: 'Number',
14141
+ name: ['props', 'ctaTempStyles', 'img', 'height'],
14142
+ addonAfter: 'H'
14143
+ }
14144
+ ]
14145
+ },
14146
+ {
14147
+ type: 'Group',
14148
+ label: '圆角',
14149
+ child: [
14150
+ {
14151
+ type: 'Slider',
14152
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
14153
+ max: 100
14154
+ },
14155
+ {
14156
+ type: 'Number',
14157
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
14158
+ addonAfter: 'px',
14159
+ max: 100
14160
+ }
14161
+ ]
14162
+ },
14163
+ {
14164
+ type: 'Number',
14165
+ label: '与下边边距',
14166
+ addonAfter: 'px',
14167
+ name: ['props', 'ctaTempStyles', 'img', 'marginBottom']
14168
+ },
14169
+ {
14170
+ label: '居中垂直偏移',
14171
+ type: 'Number',
14172
+ name: ['props', 'translateY'],
14173
+ min: -1000,
14174
+ addonAfter: '%',
14175
+ initialValue: 0
14176
+ }
14177
+ ]
14178
+ },
14179
+ {
14180
+ title: '商品标题文本',
14181
+ type: 'commodityTitle',
14182
+ child: [
14183
+ {
14184
+ type: 'Group',
14185
+ label: '字体',
14186
+ child: [
14187
+ {
14188
+ type: 'Select',
14189
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily-cn'],
14190
+ bottomText: '中文字体'
14191
+ },
14192
+ {
14193
+ type: 'Select',
14194
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily-en'],
14195
+ bottomText: '英文/其他字体'
14196
+ }
14197
+ ]
14198
+ },
14199
+ {
14200
+ type: 'Group',
14201
+ label: '',
14202
+ child: [
14203
+ {
14204
+ type: 'Color',
14205
+ name: ['props', 'ctaTempStyles', 'title', 'color']
14206
+ },
14207
+ {
14208
+ type: 'Number',
14209
+ addonAfter: 'px',
14210
+ name: ['props', 'ctaTempStyles', 'title', 'fontSize']
14211
+ }
14212
+ ]
14213
+ },
14214
+ {
14215
+ label: '样式',
14216
+ type: 'TextStyle',
14217
+ name: ['props', 'ctaTempStyles', 'title']
13042
14218
  },
13043
- buttonBgStyle: {
13044
- backgroundColor: '#fff',
13045
- height: 52,
13046
- paddingTop: 20,
13047
- paddingLeft: 20,
13048
- paddingRight: 20,
13049
- paddingBottom: 20
14219
+ {
14220
+ label: '对齐',
14221
+ type: 'TextAlign',
14222
+ name: ['props', 'ctaTempStyles', 'title']
14223
+ },
14224
+ {
14225
+ label: '间距',
14226
+ type: 'TextSpace',
14227
+ name: ['props', 'ctaTempStyles', 'title']
13050
14228
  }
13051
- }
14229
+ ]
13052
14230
  },
13053
- w: 100,
13054
- h: 40,
13055
- sort: 2
13056
- });
13057
-
13058
- /*
13059
- * @Author: binruan@chatlabs.com
13060
- * @Date: 2024-06-13 10:08:32
13061
- * @LastEditors: binruan@chatlabs.com
13062
- * @LastEditTime: 2024-06-13 17:42:50
13063
- * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\settingRender.tsx
13064
- *
13065
- */
13066
- var settingRender = [
13067
14231
  {
13068
- title: '协议详情',
14232
+ title: 'CTA标题',
13069
14233
  child: [
13070
14234
  {
13071
- type: 'Switch',
13072
- label: '必须同意用户协议',
13073
- name: ['props', 'privacy_necessity'],
13074
- extra: '当新用户进入页面时,会出现用户协议弹窗,用户需要先同意协议后才能访问内容。'
14235
+ type: 'Group',
14236
+ label: '尺寸',
14237
+ child: [
14238
+ {
14239
+ type: 'Number',
14240
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'width'],
14241
+ addonAfter: 'W'
14242
+ },
14243
+ {
14244
+ type: 'Number',
14245
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'height'],
14246
+ addonAfter: 'H'
14247
+ }
14248
+ ]
13075
14249
  },
13076
14250
  {
13077
- type: 'Text',
13078
- label: '弹窗标题',
13079
- name: ['props', 'privacy_title']
14251
+ type: 'Group',
14252
+ label: '圆角',
14253
+ child: [
14254
+ {
14255
+ type: 'Slider',
14256
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
14257
+ max: 100
14258
+ },
14259
+ {
14260
+ type: 'Number',
14261
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
14262
+ addonAfter: 'px',
14263
+ max: 100
14264
+ }
14265
+ ]
13080
14266
  },
13081
14267
  {
13082
- type: 'TextArea',
13083
- label: '用户协议弹窗内容',
13084
- name: ['props', 'privacy_context']
14268
+ type: 'TextSpace',
14269
+ name: ['props', 'ctaTempStyles', 'title']
14270
+ },
14271
+ {
14272
+ type: 'Color',
14273
+ label: '背景色',
14274
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'backgroundColor']
13085
14275
  },
13086
14276
  {
13087
14277
  type: 'Group',
13088
- label: '隐私政策',
14278
+ label: '字体',
13089
14279
  child: [
13090
14280
  {
13091
- type: 'Text',
13092
- name: ['props', 'privacy_policy_title']
14281
+ type: 'Select',
14282
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-cn'],
14283
+ bottomText: '中文字体'
13093
14284
  },
13094
14285
  {
13095
- type: 'Text',
13096
- name: ['props', 'privacy_policy_url'],
13097
- addonBefore: 'https://'
14286
+ type: 'Select',
14287
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-en'],
14288
+ bottomText: '英文/其他字体'
13098
14289
  }
13099
- ],
13100
- extra: '当用户点击更多信息按钮时,将会跳转至设置的链接查看政策内容'
14290
+ ]
14291
+ },
14292
+ {
14293
+ type: 'Group',
14294
+ label: '',
14295
+ child: [
14296
+ {
14297
+ type: 'Color',
14298
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
14299
+ },
14300
+ {
14301
+ type: 'Number',
14302
+ addonAfter: 'px',
14303
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
14304
+ }
14305
+ ]
14306
+ },
14307
+ {
14308
+ label: '样式',
14309
+ type: 'TextStyle',
14310
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
14311
+ },
14312
+ {
14313
+ label: '对齐',
14314
+ type: 'TextAlign',
14315
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
13101
14316
  }
13102
14317
  ]
13103
14318
  }
13104
14319
  ];
13105
14320
 
13106
- const Consent$1 = (props) => {
13107
- return React.createElement(Consent$1, Object.assign({}, props));
14321
+ var styles = {"animated-button":"index-module_animated-button__qI1lz","gradientCover":"index-module_gradientCover__nD6d9","tow-line-ellipsis":"index-module_tow-line-ellipsis__GKFXr","modal-icon-wrapper":"index-module_modal-icon-wrapper__tu3BY","modal-icon-wrapper-img":"index-module_modal-icon-wrapper-img__4b7qZ"};
14322
+
14323
+ const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
14324
+ const AniLinkPopup$1 = (_a) => {
14325
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
14326
+ var { style, recData, ctaTempStyles, index, event, bottom_image, translateY, isTel, onClick, isExternalLink = false } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "bottom_image", "translateY", "isTel", "onClick", "isExternalLink"]);
14327
+ const { sxpParameter, globalConfig, ctaEvent } = useSxpDataSource();
14328
+ const { jumpToWeb } = useEventReport();
14329
+ const [visible, setVisible] = useState(true);
14330
+ const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
14331
+ const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
14332
+ const handleTo = () => {
14333
+ var _a, _b, _c;
14334
+ const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
14335
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
14336
+ eventSubject: 'clickCta',
14337
+ eventDescription: 'User clicked the CTA'
14338
+ }, recData, item, index);
14339
+ if (isExternalLink) {
14340
+ jumpToWeb(recData, product, cta, index);
14341
+ }
14342
+ onClick === null || onClick === void 0 ? void 0 : onClick();
14343
+ };
14344
+ const title = (cta === null || cta === void 0 ? void 0 : cta.title) || '查看详情 >';
14345
+ const aniStyle = useMemo(() => {
14346
+ var _a, _b;
14347
+ const ani = event === null || event === void 0 ? void 0 : event.animation;
14348
+ if (ani) {
14349
+ const { delay, duration, backgroundColor } = ani;
14350
+ return {
14351
+ ':after': {
14352
+ animationDelay: `${(_a = delay / 1000) !== null && _a !== void 0 ? _a : 0}s`,
14353
+ animationDuration: `${(_b = duration / 1000) !== null && _b !== void 0 ? _b : 0}s`,
14354
+ backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'transparent'}`
14355
+ }
14356
+ };
14357
+ }
14358
+ }, [event === null || event === void 0 ? void 0 : event.animation]);
14359
+ const src = (_q = (_p = (_o = (_l = product === null || product === void 0 ? void 0 : product.cover) !== null && _l !== void 0 ? _l : (_m = product === null || product === void 0 ? void 0 : product.homePage) === null || _m === void 0 ? void 0 : _m[0]) !== null && _o !== void 0 ? _o : cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _p !== void 0 ? _p : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _q !== void 0 ? _q : bottom_image;
14360
+ const onClose = (event) => {
14361
+ event.stopPropagation();
14362
+ setVisible(false);
14363
+ };
14364
+ return (React.createElement(React.Fragment, null, isTel ? (React.createElement("div", { style: {
14365
+ height: '40px',
14366
+ lineHeight: '40px',
14367
+ paddingLeft: '6px'
14368
+ } }, "Cta Title")) : (React.createElement("div", Object.assign({ style: Object.assign(Object.assign({}, style), { position: 'fixed', right: 0, bottom: 0, zIndex: 1000, display: visible ? 'block' : 'none' }) }, props, { className: `${styles['animated-button']} ${css(aniStyle)}`, onClick: handleTo }),
14369
+ React.createElement("div", { onClick: onClose, className: styles['modal-icon-wrapper'], style: { padding: (_r = style === null || style === void 0 ? void 0 : style['padding']) !== null && _r !== void 0 ? _r : 0 } },
14370
+ React.createElement("img", { src: (_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _s !== void 0 ? _s : closeIcon, alt: 'close', className: styles['modal-icon-wrapper-img'] })),
14371
+ React.createElement(Img$1, { src: src, rec: recData, item: (_x = (_v = (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u[0]) !== null && _v !== void 0 ? _v : (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.bindProduct) !== null && _x !== void 0 ? _x : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
14372
+ React.createElement("div", { hidden: !!recData && !(product === null || product === void 0 ? void 0 : product.title), className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
14373
+ __html: setFontForText((_y = product === null || product === void 0 ? void 0 : product.title) !== null && _y !== void 0 ? _y : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
14374
+ } }),
14375
+ React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((_z = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _z === void 0 ? void 0 : _z.height) + 'px' }), dangerouslySetInnerHTML: {
14376
+ __html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
14377
+ } })))));
13108
14378
  };
13109
- var ConsentComponent = memo(Consent$1);
14379
+ var AniLinkPopupComponent = memo(AniLinkPopup$1);
14380
+
14381
+ /*
14382
+ * @Author: binruan@chatlabs.com
14383
+ * @Date: 2024-07-04 15:28:39
14384
+ * @LastEditors: binruan@chatlabs.com
14385
+ * @LastEditTime: 2024-07-05 17:46:42
14386
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
14387
+ *
14388
+ */
14389
+ var interactionRender = [
14390
+ {
14391
+ title: '点击事件',
14392
+ child: [
14393
+ {
14394
+ type: 'link',
14395
+ name: 'onClick'
14396
+ }
14397
+ ]
14398
+ },
14399
+ {
14400
+ title: '动画效果',
14401
+ child: [
14402
+ {
14403
+ type: 'Color',
14404
+ name: ['animation', 'backgroundColor'],
14405
+ label: '动画颜色'
14406
+ },
14407
+ {
14408
+ type: 'Select',
14409
+ name: ['animation', 'name'],
14410
+ label: '动画',
14411
+ options: [
14412
+ {
14413
+ label: '由左向右/中间扩散',
14414
+ value: 1
14415
+ }
14416
+ ],
14417
+ initialValue: 1,
14418
+ fieldProps: {
14419
+ style: {
14420
+ width: '100%'
14421
+ }
14422
+ }
14423
+ },
14424
+ {
14425
+ type: 'Number',
14426
+ label: '动画启动时间',
14427
+ name: ['animation', 'delay'],
14428
+ addonAfter: 'ms'
14429
+ },
14430
+ {
14431
+ type: 'Number',
14432
+ label: '动画持续时间',
14433
+ name: ['animation', 'duration'],
14434
+ addonAfter: 'ms'
14435
+ }
14436
+ ]
14437
+ }
14438
+ ];
13110
14439
 
13111
14440
  /*
13112
14441
  * @Author: binruan@chatlabs.com
13113
14442
  * @Date: 2023-07-28 18:29:57
13114
14443
  * @LastEditors: binruan@chatlabs.com
13115
- * @LastEditTime: 2024-06-13 17:32:17
13116
- * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\material.tsx
14444
+ * @LastEditTime: 2024-07-08 14:36:05
14445
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\material.tsx
13117
14446
  *
13118
14447
  */
13119
- const Consent = createMaterial(ConsentComponent, {
13120
- displayName: 'Consent',
14448
+ const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
14449
+ displayName: '竖版弹窗CTA',
13121
14450
  icon: '',
13122
- category: 'base',
13123
- type: 'Consent',
14451
+ category: 'cta',
14452
+ type: 'AniLinkPopup',
13124
14453
  related: {
13125
- settingRender
14454
+ settingRender: settingRender,
14455
+ bindableProps: [],
14456
+ interactionRender
13126
14457
  },
13127
14458
  defaulSetting: {
13128
- props: {},
13129
- style: {}
14459
+ props: {
14460
+ ctaTempStyles: {
14461
+ img: {
14462
+ borderRadius: 3,
14463
+ width: 76,
14464
+ height: 76,
14465
+ marginBottom: 10
14466
+ },
14467
+ title: {
14468
+ fontSize: 12,
14469
+ color: '#000',
14470
+ textAlign: 'left'
14471
+ },
14472
+ ctaTitle: {
14473
+ fontSize: 10,
14474
+ color: '#fff',
14475
+ textAlign: 'center',
14476
+ width: 76,
14477
+ height: 20,
14478
+ backgroundColor: 'rgba(0,0,0,1)'
14479
+ }
14480
+ }
14481
+ },
14482
+ style: {
14483
+ width: 90,
14484
+ height: 160,
14485
+ borderRadius: 3,
14486
+ backgroundColor: 'rgba(255,255,255,1)',
14487
+ padding: 7,
14488
+ margin: 10
14489
+ }
13130
14490
  },
13131
14491
  w: 100,
13132
14492
  h: 40,
13133
- sort: 1
14493
+ sort: 2
13134
14494
  });
13135
14495
 
13136
14496
  /*
@@ -13144,6 +14504,8 @@ const Consent = createMaterial(ConsentComponent, {
13144
14504
 
13145
14505
  var _materials_ = /*#__PURE__*/Object.freeze({
13146
14506
  __proto__: null,
14507
+ AniLink: AniLink,
14508
+ AniLinkPopup: AniLinkPopup,
13147
14509
  Appoint: Appoint,
13148
14510
  AppointForm: AppointForm,
13149
14511
  Commodity: Commodity,
@@ -13151,6 +14513,7 @@ var _materials_ = /*#__PURE__*/Object.freeze({
13151
14513
  CommodityDetailDiroNew: CommodityDetailDiroNew,
13152
14514
  CommodityDiro: CommodityDiro,
13153
14515
  CommodityDiroNew: CommodityDiroNew,
14516
+ CommodityList: CommodityList,
13154
14517
  Consent: Consent,
13155
14518
  HashTag: HashTag,
13156
14519
  Link: Link,
@@ -13455,23 +14818,20 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
13455
14818
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
13456
14819
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
13457
14820
  return () => {
13458
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13459
- const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
13460
- if (!isPause)
13461
- handlePause();
14821
+ var _a, _b, _c, _d, _e, _f, _g, _h;
13462
14822
  if (hls)
13463
14823
  hls === null || hls === void 0 ? void 0 : hls.destroy();
13464
14824
  setIsLoadFinish(false);
13465
- (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadedmetadata', handleLoadedmetadata);
13466
- (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadeddata', handLoadeddata);
13467
- (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('play', handleStartPlay);
13468
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('playing', handlePlaying);
13469
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('pause', handlePause);
13470
- (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('ended', handlePlay);
13471
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('canplay', handlePlay);
13472
- (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('waiting', handleWaiting);
14825
+ (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedmetadata);
14826
+ (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadeddata', handLoadeddata);
14827
+ (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('play', handleStartPlay);
14828
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('playing', handlePlaying);
14829
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('pause', handlePause);
14830
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('ended', handlePlay);
14831
+ (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('canplay', handlePlay);
14832
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('waiting', handleWaiting);
13473
14833
  };
13474
- }, [isActive, videoId, rec, handlePause]);
14834
+ }, [isActive, videoId, rec]);
13475
14835
  useEffect(() => {
13476
14836
  var _a, _b;
13477
14837
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
@@ -13617,23 +14977,23 @@ var ToggleButton$1 = memo(ToggleButton);
13617
14977
  * @Author: binruan@chatlabs.com
13618
14978
  * @Date: 2024-01-15 19:03:09
13619
14979
  * @LastEditors: binruan@chatlabs.com
13620
- * @LastEditTime: 2024-07-11 18:19:29
14980
+ * @LastEditTime: 2024-03-13 10:53:56
13621
14981
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FingerSwipeTip\index.tsx
13622
14982
  *
13623
14983
  */
13624
- const FingerSwipeTip = ({ imageUrl, style, duration = 2000 }) => {
14984
+ const FingerSwipeTip = ({ imageUrl, style }) => {
13625
14985
  const [show, setShow] = useState(true);
13626
14986
  useEditor();
13627
14987
  useEffect(() => {
13628
14988
  setTimeout(() => {
13629
14989
  setShow(false);
13630
- }, duration);
14990
+ }, 2000);
13631
14991
  }, []);
13632
14992
  const FINGER_SWIPE_ICON = useIconLink('/pb_static/finger-swipe-tip.29dc3a48a3c746c906ea..png');
13633
14993
  const animationCls = useMemo(() => {
13634
14994
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
13635
14995
  }, [show]);
13636
- return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: Object.assign(Object.assign({}, style), { animationDuration: `${duration / 1000}s` }) },
14996
+ return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
13637
14997
  React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
13638
14998
  };
13639
14999
 
@@ -13737,12 +15097,11 @@ var PictureGroup$3 = memo(PictureGroup$2);
13737
15097
  * @Author: binruan@chatlabs.com
13738
15098
  * @Date: 2024-01-15 19:03:09
13739
15099
  * @LastEditors: binruan@chatlabs.com
13740
- * @LastEditTime: 2024-07-09 18:47:05
15100
+ * @LastEditTime: 2024-06-26 18:52:46
13741
15101
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
13742
15102
  *
13743
15103
  */
13744
15104
  const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
13745
- var _a;
13746
15105
  const [isShowMore, setIsShowMore] = useState(false);
13747
15106
  const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
13748
15107
  const handleClickTag = (data) => {
@@ -13774,8 +15133,7 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
13774
15133
  }
13775
15134
  return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
13776
15135
  }, [isShowMore, tags]);
13777
- console.log(hashTagStyle, '111');
13778
- return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag', style: { marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px` } },
15136
+ return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag' },
13779
15137
  React.createElement(Scroll$1, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (React.createElement(SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item) },
13780
15138
  React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
13781
15139
  };
@@ -13845,14 +15203,14 @@ function withBindDataSource(Component) {
13845
15203
  * @Author: binruan@chatlabs.com
13846
15204
  * @Date: 2023-12-26 16:11:34
13847
15205
  * @LastEditors: binruan@chatlabs.com
13848
- * @LastEditTime: 2024-04-18 14:36:53
15206
+ * @LastEditTime: 2024-07-17 18:54:33
13849
15207
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
13850
15208
  *
13851
15209
  */
13852
- const RenderCard = ({ rec, index, tempMap, resolver }) => {
15210
+ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType }) => {
13853
15211
  const { schema } = useEditor();
13854
15212
  const renderComp = useMemo(() => {
13855
- 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;
15213
+ 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, _7, _8;
13856
15214
  if (!(rec === null || rec === void 0 ? void 0 : rec.video))
13857
15215
  return null;
13858
15216
  let cta = null;
@@ -13866,20 +15224,27 @@ const RenderCard = ({ rec, index, tempMap, resolver }) => {
13866
15224
  cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
13867
15225
  }
13868
15226
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
13869
- if ((((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.type) === 'CommodityDiro' && !((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct)) ||
13870
- (((_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.type) === 'Commodity' && !((_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProduct)) ||
13871
- (((_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.type) === 'CommodityDiroNew' && !((_l = rec === null || rec === void 0 ? void 0 : rec.video) === null || _l === void 0 ? void 0 : _l.bindProduct)) ||
13872
- (((_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.type) === 'MultiCommodity' && !((_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindProducts) === null || _p === void 0 ? void 0 : _p.length)) ||
13873
- (((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.type) === 'MultiCommodityDiro' && !((_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.bindProducts) === null || _s === void 0 ? void 0 : _s.length)) ||
13874
- (((_t = value === null || value === void 0 ? void 0 : value.item) === null || _t === void 0 ? void 0 : _t.type) === 'MultiCommodityDiroNew' && !((_v = (_u = rec === null || rec === void 0 ? void 0 : rec.video) === null || _u === void 0 ? void 0 : _u.bindProducts) === null || _v === void 0 ? void 0 : _v.length))) {
15227
+ //如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
15228
+ if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.type)))
15229
+ return;
15230
+ //默认不渲染category为cta类型的组件,该类型的组件只用于某一处
15231
+ if (!includesCtaType && ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.category) === 'cta')
15232
+ return;
15233
+ if ((((_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.type) === 'CommodityDiro' && !((_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProduct)) ||
15234
+ (((_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.type) === 'Commodity' && !((_l = rec === null || rec === void 0 ? void 0 : rec.video) === null || _l === void 0 ? void 0 : _l.bindProduct)) ||
15235
+ (((_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.type) === 'CommodityDiroNew' && !((_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindProduct)) ||
15236
+ (((_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.type) === 'MultiCommodity' && !((_r = (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.bindProducts) === null || _r === void 0 ? void 0 : _r.length)) ||
15237
+ (((_s = value === null || value === void 0 ? void 0 : value.item) === null || _s === void 0 ? void 0 : _s.type) === 'MultiCommodityDiro' && !((_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u.length)) ||
15238
+ (((_v = value === null || value === void 0 ? void 0 : value.item) === null || _v === void 0 ? void 0 : _v.type) === 'MultiCommodityDiroNew' && !((_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindProducts) === null || _x === void 0 ? void 0 : _x.length))) {
15239
+ //
13875
15240
  return null;
13876
15241
  }
13877
15242
  if (value && resolver) {
13878
- const t = resolver[(_w = value === null || value === void 0 ? void 0 : value.item) === null || _w === void 0 ? void 0 : _w.type];
15243
+ const t = resolver[(_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.type];
13879
15244
  const Component = withBindDataSource(t);
13880
- const defaulSetting = (_x = t === null || t === void 0 ? void 0 : t.extend) === null || _x === void 0 ? void 0 : _x.defaulSetting;
13881
- 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';
13882
- 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', transform: 'translate3d(0px, 0px, 0px)' }), 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, index: index })));
15245
+ const defaulSetting = (_z = t === null || t === void 0 ? void 0 : t.extend) === null || _z === void 0 ? void 0 : _z.defaulSetting;
15246
+ const isExternalLink = ((_2 = (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.event) === null || _1 === void 0 ? void 0 : _1.onClick) === null || _2 === void 0 ? void 0 : _2.linkType) === 'externalLink';
15247
+ return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_4 = value === null || value === void 0 ? void 0 : value.item) === null || _4 === void 0 ? void 0 : _4.textStyle), bindDatas: (_6 = (_5 = value === null || value === void 0 ? void 0 : value.item) === null || _5 === void 0 ? void 0 : _5.bindDatas) !== null && _6 !== void 0 ? _6 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_7 = value === null || value === void 0 ? void 0 : value.item) === null || _7 === void 0 ? void 0 : _7.props, { event: ((_8 = value === null || value === void 0 ? void 0 : value.item) === null || _8 === void 0 ? void 0 : _8.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, index: index })));
13883
15248
  }
13884
15249
  else {
13885
15250
  return null;
@@ -13972,7 +15337,7 @@ var Tagbar$1 = memo(Tagbar);
13972
15337
  * @Author: binruan@chatlabs.com
13973
15338
  * @Date: 2024-01-15 19:03:09
13974
15339
  * @LastEditors: binruan@chatlabs.com
13975
- * @LastEditTime: 2024-07-09 18:11:21
15340
+ * @LastEditTime: 2024-07-22 15:57:31
13976
15341
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
13977
15342
  *
13978
15343
  */
@@ -13985,7 +15350,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13985
15350
  const viewTime = useRef();
13986
15351
  const [isLoadMore, setIsLoadMore] = useState(false);
13987
15352
  const [isShowMore, setIsShowMore] = useState(false);
13988
- const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag } = useSxpDataSource();
15353
+ const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
13989
15354
  const { backMainFeed } = useEventReport();
13990
15355
  const { productView } = useEventReport();
13991
15356
  const isShowFingerTip = useMemo(() => {
@@ -14033,7 +15398,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14033
15398
  useEffect(() => {
14034
15399
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
14035
15400
  const visibleChange = () => {
14036
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
15401
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
14037
15402
  const repCond = !openHashtag && !isShowConsent;
14038
15403
  if (document.visibilityState === 'hidden') {
14039
15404
  // 当用户导航到新页面、切换标签页、关闭标签页、最小化或关闭浏览器、刷新原页面(即离开原页面时),或者在移动设备上从浏览器切换到不同的应用程序时
@@ -14072,7 +15437,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14072
15437
  position: activeIndex + '',
14073
15438
  fromKName,
14074
15439
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
14075
- ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : ''
15440
+ ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
15441
+ traceInfo: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : ''
14076
15442
  }
14077
15443
  });
14078
15444
  }
@@ -14177,17 +15543,19 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14177
15543
  };
14178
15544
  }, [isShowMore]);
14179
15545
  const renderBottom = useCallback((rec, index) => {
14180
- var _a, _b, _c, _d, _e, _f, _g, _h;
15546
+ var _a, _b, _c, _d, _e, _f, _g;
14181
15547
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
14182
15548
  return (React.createElement(React.Fragment, null,
14183
15549
  ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
14184
- React.createElement("div", { className: 'clc-sxp-bottom', style: { paddingBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px` } },
15550
+ React.createElement("div", { className: 'clc-sxp-bottom' },
14185
15551
  React.createElement(Nudge, { nudge: nudge }),
14186
15552
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
14187
15553
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
14188
15554
  React.createElement("div", null,
14189
- 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: (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
14190
- React.createElement(Hashtag$1, { index: activeIndex, tags: (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.hashTags) !== null && _f !== void 0 ? _f : [], itemId: (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId, itemType: ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
15555
+ 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 === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
15556
+ React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
15557
+ 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 === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))),
15558
+ React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'] })));
14191
15559
  }
14192
15560
  return null;
14193
15561
  }, [
@@ -14240,8 +15608,36 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14240
15608
  });
14241
15609
  }
14242
15610
  };
15611
+ const handleSlideSkip = (item, position) => {
15612
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
15613
+ if (isPreview)
15614
+ return;
15615
+ const t = new Date() - curTime.current;
15616
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.openSlideSkip) && t >= ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.slideSkipStartTime) !== null && _a !== void 0 ? _a : 0) && getSlideSkipState() && item) {
15617
+ const link = ((_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.bindProduct) === null || _c === void 0 ? void 0 : _c.link) || ((_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindProducts) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.link) || ((_g = item === null || item === void 0 ? void 0 : item.product) === null || _g === void 0 ? void 0 : _g.link);
15618
+ const product = (item === null || item === void 0 ? void 0 : item.product) || ((_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct) || ((_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]);
15619
+ if (link) {
15620
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
15621
+ eventInfo: {
15622
+ eventSubject: 'swipeToWeb',
15623
+ eventDescription: 'User swiped to web',
15624
+ productId: (_l = product === null || product === void 0 ? void 0 : product.itemId) !== null && _l !== void 0 ? _l : '',
15625
+ productName: (_m = product === null || product === void 0 ? void 0 : product.title) !== null && _m !== void 0 ? _m : '',
15626
+ price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
15627
+ productCollection: (_o = product === null || product === void 0 ? void 0 : product.collection) !== null && _o !== void 0 ? _o : '',
15628
+ contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
15629
+ position: position + '',
15630
+ contentId: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
15631
+ traceInfo: (_r = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _r !== void 0 ? _r : ''
15632
+ }
15633
+ });
15634
+ setSlideSkipState();
15635
+ window.location.href = window.getJointUtmLink(link);
15636
+ }
15637
+ }
15638
+ };
14243
15639
  const handleScrollEvent = (swiper) => {
14244
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
15640
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
14245
15641
  viewTime.current = new Date();
14246
15642
  const item = data[swiper.previousIndex];
14247
15643
  if (!item)
@@ -14253,20 +15649,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14253
15649
  eventDescription: 'User scroll down',
14254
15650
  contentId: (_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
14255
15651
  productId: (_d = (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
14256
- requestId: null
15652
+ requestId: null,
15653
+ traceInfo: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.traceInfo) !== null && _f !== void 0 ? _f : ''
14257
15654
  }
14258
15655
  });
14259
15656
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
14260
15657
  handleReportViewImageEnd(item);
15658
+ handleSlideSkip(item, swiper.previousIndex);
14261
15659
  }
14262
15660
  else {
14263
15661
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
14264
15662
  eventInfo: {
14265
15663
  eventSubject: 'scrollUp',
14266
15664
  eventDescription: 'User scroll up',
14267
- contentId: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
14268
- productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
14269
- requestId: null
15665
+ contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
15666
+ productId: (_k = (_j = item.product) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
15667
+ requestId: null,
15668
+ traceInfo: (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : ''
14270
15669
  }
14271
15670
  });
14272
15671
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -14275,7 +15674,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14275
15674
  // 商品浏览事件
14276
15675
  handleReportProductView(item);
14277
15676
  const curItem = data[swiper.activeIndex];
14278
- if (!((_j = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _j === void 0 ? void 0 : _j.url) && !((_k = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _k === void 0 ? void 0 : _k.imgUrls) && (curItem === null || curItem === void 0 ? void 0 : curItem.product)) {
15677
+ if (!((_o = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _o === void 0 ? void 0 : _o.url) && !((_p = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _p === void 0 ? void 0 : _p.imgUrls) && (curItem === null || curItem === void 0 ? void 0 : curItem.product)) {
14279
15678
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
14280
15679
  eventName: 'ProductView'
14281
15680
  });
@@ -14360,7 +15759,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14360
15759
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
14361
15760
  top: minusHeight
14362
15761
  } }),
14363
- isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
15762
+ isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 + ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` } })) : null,
14364
15763
  React.createElement(Swiper, { style: {
14365
15764
  marginTop: tagHeight
14366
15765
  }, ref: swiperRef, onSlideChange: () => {
@@ -14385,13 +15784,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14385
15784
  }
14386
15785
  }
14387
15786
  }, direction: 'vertical', height: height },
14388
- ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton$1, { style: {
15787
+ React.createElement(ToggleButton$1, { style: {
14389
15788
  position: 'fixed',
14390
15789
  visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
14391
15790
  zIndex: 999,
14392
15791
  [(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
14393
15792
  [(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _g !== void 0 ? _g : 23
14394
- }, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted })),
15793
+ }, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted }),
14395
15794
  renderView),
14396
15795
  React.createElement(WaterFall$1, Object.assign({}, (_k = (_j = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.item) === null || _k === void 0 ? void 0 : _k.props))));
14397
15796
  };
@@ -14760,7 +16159,7 @@ var index$1 = memo(DiyPortalPreview);
14760
16159
  * @Author: binruan@chatlabs.com
14761
16160
  * @Date: 2023-10-31 10:56:01
14762
16161
  * @LastEditors: binruan@chatlabs.com
14763
- * @LastEditTime: 2024-05-27 18:19:31
16162
+ * @LastEditTime: 2024-07-19 18:06:14
14764
16163
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
14765
16164
  *
14766
16165
  */
@@ -14813,7 +16212,7 @@ const Popup = () => {
14813
16212
  const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
14814
16213
  const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
14815
16214
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
14816
- return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
16215
+ return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
14817
16216
  }
14818
16217
  else {
14819
16218
  return React.createElement(React.Fragment, null);