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.cjs CHANGED
@@ -427,8 +427,9 @@ const getFeSessionId = () => {
427
427
  };
428
428
 
429
429
  const FAKE_USER_KEY = 'SXP_FAKE_USER_ID';
430
- const FAKE_USER_STATE = 'FAKE_USER_STATE';
430
+ const FAKE_USER_STATE = 'FAKE_USER_STATE'; //新用户仅显示一次滑动提示
431
431
  const AGREE_POLICY = 'AGREE_POLICY';
432
+ const SLIDE_SKIP_STATE = 'SLIDE_SKIP_STATE'; //新用户滑动下一个视频跳转外链状态(触发过一次就不再触发)
432
433
  const storeAndLoadFeUserId = () => {
433
434
  let fakeUserId = window.localStorage.getItem(FAKE_USER_KEY);
434
435
  if (lodash.isEmpty(fakeUserId)) {
@@ -444,6 +445,13 @@ const getFeUserId = () => {
444
445
  }
445
446
  return lodash.isEmpty(fakeUserState);
446
447
  };
448
+ const getSlideSkipState = () => {
449
+ const slideSkipState = window.localStorage.getItem(SLIDE_SKIP_STATE);
450
+ return lodash.isEmpty(slideSkipState);
451
+ };
452
+ const setSlideSkipState = () => {
453
+ window.localStorage.setItem(SLIDE_SKIP_STATE, 'true');
454
+ };
447
455
 
448
456
  /*
449
457
  * @Author: binruan@chatlabs.com
@@ -627,8 +635,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
627
635
  };
628
636
  if (utmVal) {
629
637
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
638
+ var _a, _b;
630
639
  const key = val.split('=')[0];
631
- return UTM_KEYS.includes(key);
640
+ 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);
632
641
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
633
642
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
634
643
  }
@@ -721,8 +730,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
721
730
  return;
722
731
  try {
723
732
  const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
733
+ var _a, _b;
724
734
  const key = val.split('=')[0];
725
- return UTM_KEYS.includes(key);
735
+ 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);
726
736
  })) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
727
737
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
728
738
  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 : []);
@@ -860,7 +870,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
860
870
  themeTag,
861
871
  isShowConsent,
862
872
  selectTag,
863
- setSelectTag
873
+ setSelectTag,
874
+ globalConfig
864
875
  } }, 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({
865
876
  rtcList,
866
877
  mutateLike: bffMutateLike,
@@ -1097,7 +1108,7 @@ var index$2 = /*#__PURE__*/Object.freeze({
1097
1108
  EditorCore: EditorCore
1098
1109
  });
1099
1110
 
1100
- var interactionRender$8 = [
1111
+ var interactionRender$d = [
1101
1112
  {
1102
1113
  title: '点击事件',
1103
1114
  child: [
@@ -1117,7 +1128,7 @@ var interactionRender$8 = [
1117
1128
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
1118
1129
  *
1119
1130
  */
1120
- var settingRender$6 = [
1131
+ var settingRender$9 = [
1121
1132
  {
1122
1133
  type: 'Text',
1123
1134
  label: '组件名称',
@@ -1369,14 +1380,14 @@ function useEventReport() {
1369
1380
  * @Author: binruan@chatlabs.com
1370
1381
  * @Date: 2024-06-27 16:22:34
1371
1382
  * @LastEditors: binruan@chatlabs.com
1372
- * @LastEditTime: 2024-07-02 10:34:34
1383
+ * @LastEditTime: 2024-07-05 14:55:25
1373
1384
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\Form.tsx
1374
1385
  *
1375
1386
  */
1376
1387
  const Form = ({ layout, columns, onChange }) => {
1377
1388
  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' } },
1378
1389
  layout !== 'inline' && React.createElement("label", { className: 'pb-appoint-form-container-label' }, item === null || item === void 0 ? void 0 : item.title),
1379
- (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 })))))));
1390
+ (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 })))))))));
1380
1391
  };
1381
1392
  var Form$1 = React.memo(Form);
1382
1393
 
@@ -1483,9 +1494,9 @@ const AppointForm = createMaterial(AppointFormComponent, {
1483
1494
  category: 'popup',
1484
1495
  type: 'AppointForm',
1485
1496
  related: {
1486
- settingRender: settingRender$6,
1497
+ settingRender: settingRender$9,
1487
1498
  bindableProps: [],
1488
- interactionRender: interactionRender$8
1499
+ interactionRender: interactionRender$d
1489
1500
  },
1490
1501
  defaulSetting: {
1491
1502
  name: '表单',
@@ -1508,7 +1519,7 @@ const AppointForm = createMaterial(AppointFormComponent, {
1508
1519
  sort: 2
1509
1520
  });
1510
1521
 
1511
- var settingRender$5 = [
1522
+ var settingRender$8 = [
1512
1523
  {
1513
1524
  title: '商品图片',
1514
1525
  child: [
@@ -1547,6 +1558,47 @@ var settingRender$5 = [
1547
1558
  }
1548
1559
  ]
1549
1560
  },
1561
+ {
1562
+ title: '多商品切换器',
1563
+ child: [
1564
+ {
1565
+ type: 'Switch',
1566
+ name: ['props', 'commodityGroup', 'open'],
1567
+ label: '快速切换开关'
1568
+ },
1569
+ {
1570
+ type: 'Group',
1571
+ child: [
1572
+ {
1573
+ label: '居中垂直偏移',
1574
+ type: 'Number',
1575
+ name: ['props', 'commodityGroup', 'translateY'],
1576
+ min: -1000,
1577
+ addonAfter: '%',
1578
+ initialValue: 0
1579
+ }
1580
+ ]
1581
+ },
1582
+ {
1583
+ type: 'Group',
1584
+ child: [
1585
+ {
1586
+ label: '上边距',
1587
+ name: ['props', 'commodityGroup', 'style', 'marginTop'],
1588
+ type: 'Number',
1589
+ addonAfter: 'px',
1590
+ initialValue: 20
1591
+ },
1592
+ {
1593
+ label: '下边距',
1594
+ name: ['props', 'commodityGroup', 'style', 'marginBottom'],
1595
+ type: 'Number',
1596
+ addonAfter: 'px'
1597
+ }
1598
+ ]
1599
+ }
1600
+ ]
1601
+ },
1550
1602
  {
1551
1603
  title: '商品文本',
1552
1604
  child: [
@@ -8554,15 +8606,24 @@ SwiperSlide.displayName = 'SwiperSlide';
8554
8606
  * @Author: binruan@chatlabs.com
8555
8607
  * @Date: 2023-11-02 18:34:34
8556
8608
  * @LastEditors: binruan@chatlabs.com
8557
- * @LastEditTime: 2024-04-12 11:23:00
8609
+ * @LastEditTime: 2024-07-19 18:39:54
8558
8610
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8559
8611
  *
8560
8612
  */
8561
- const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8562
- const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
8563
- var _a;
8613
+ const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8614
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8615
+ var _a, _b;
8616
+ const touchRef = React.useRef(null);
8617
+ const fTouchRef = React.useRef(null);
8618
+ const touchMoveRef = React.useRef(null);
8619
+ const ref = React.useRef(null);
8620
+ const MODAL_DEF_TRANS = fullHeight * 0.2;
8621
+ const MODAL_DEF_CON_H = isFullScreen ? fullHeight : fullHeight * 0.8;
8622
+ const [modalTrans, setModalTrans] = React.useState(MODAL_DEF_TRANS);
8564
8623
  const [isShow, setIsShow] = React.useState(false);
8565
8624
  const modalEleRef = React.useRef(null);
8625
+ const { globalConfig, popupDetailData } = useSxpDataSource();
8626
+ const { schema: _schema } = useEditor();
8566
8627
  React.useEffect(() => {
8567
8628
  const parentNode = document.getElementById('sxp-render');
8568
8629
  const node = document.getElementById('pb-modal');
@@ -8578,6 +8639,12 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
8578
8639
  const isOpen = React.useMemo(() => {
8579
8640
  return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
8580
8641
  }, [visible, popup]);
8642
+ const isScrollFullScreen = React.useMemo(() => {
8643
+ var _a, _b, _c, _d, _e;
8644
+ const schemaData = schema !== null && schema !== void 0 ? schema : _schema;
8645
+ 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));
8646
+ 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;
8647
+ }, [popup, schema, _schema]);
8581
8648
  React.useEffect(() => {
8582
8649
  if (isOpen) {
8583
8650
  setIsShow(true);
@@ -8585,6 +8652,7 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
8585
8652
  else {
8586
8653
  setTimeout(() => {
8587
8654
  setIsShow(false);
8655
+ setModalTrans(MODAL_DEF_TRANS);
8588
8656
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
8589
8657
  }
8590
8658
  }, [isOpen, popup]);
@@ -8593,14 +8661,61 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
8593
8661
  const handleClose = lodash.debounce(() => {
8594
8662
  onClose === null || onClose === void 0 ? void 0 : onClose();
8595
8663
  }, 300);
8664
+ const handleTouchStart = (event) => {
8665
+ event.stopPropagation();
8666
+ touchRef.current = event.touches[0].clientY;
8667
+ fTouchRef.current = event.touches[0].clientY;
8668
+ touchMoveRef.current = true;
8669
+ };
8670
+ const handleTouchMove = (event) => {
8671
+ event.stopPropagation();
8672
+ requestAnimationFrame(() => {
8673
+ var _a;
8674
+ if (touchMoveRef.current && ((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.scrollTop) === 0) {
8675
+ const currentY = event.touches[0].clientY;
8676
+ const diff = touchRef.current - currentY;
8677
+ touchRef.current = currentY;
8678
+ const ts = modalTrans - diff;
8679
+ if (ts > 0) {
8680
+ setModalTrans(ts);
8681
+ }
8682
+ }
8683
+ });
8684
+ };
8685
+ const handleTouchEnd = (event) => {
8686
+ var _a;
8687
+ event.stopPropagation();
8688
+ if (touchMoveRef.current && ((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.scrollTop) === 0) {
8689
+ const diff = fTouchRef.current - touchRef.current;
8690
+ if (diff > 0) {
8691
+ setModalTrans(0);
8692
+ }
8693
+ else if (modalTrans < MODAL_DEF_TRANS && diff < 0) {
8694
+ setModalTrans(MODAL_DEF_TRANS);
8695
+ }
8696
+ else if (modalTrans >= MODAL_DEF_TRANS && diff < 0) {
8697
+ onClose === null || onClose === void 0 ? void 0 : onClose();
8698
+ }
8699
+ }
8700
+ touchMoveRef.current = false;
8701
+ };
8596
8702
  return ReactDOM__namespace.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 },
8597
- 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) => {
8703
+ 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 && {
8704
+ transform: `translateY(${modalTrans}px)`
8705
+ })), onClick: (e) => {
8598
8706
  e.stopPropagation();
8599
8707
  e.preventDefault();
8600
- } },
8708
+ } }, (isScrollFullScreen && {
8709
+ onTouchMove: handleTouchMove,
8710
+ onTouchStart: handleTouchStart,
8711
+ onTouchEnd: handleTouchEnd
8712
+ })),
8601
8713
  React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8602
- React.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
8603
- children)))), modalEleRef.current);
8714
+ 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' })),
8715
+ React.createElement("div", { ref: ref, style: {
8716
+ height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
8717
+ overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
8718
+ } }, children))))), modalEleRef.current);
8604
8719
  };
8605
8720
  var Modal$1 = React.memo(Modal);
8606
8721
 
@@ -8724,14 +8839,52 @@ const FormatImage = React.forwardRef((props, ref) => {
8724
8839
  });
8725
8840
  var FormatImage$1 = React.memo(FormatImage);
8726
8841
 
8842
+ const Scroll = ({ children, isPadding = true, style }) => {
8843
+ const ref = React.useRef();
8844
+ const { popupDetailData } = useSxpDataSource();
8845
+ React.useEffect(() => {
8846
+ var _a;
8847
+ (_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);
8848
+ }, [popupDetailData]);
8849
+ 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));
8850
+ };
8851
+ var Scroll$1 = React.memo(Scroll);
8852
+
8853
+ const CommodityGroup = ({ products, data, defImg, style }) => {
8854
+ var _a, _b;
8855
+ const { setPopupDetailData, popupDetailData } = useSxpDataSource();
8856
+ const [check, setCheck] = React.useState((_a = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _a !== void 0 ? _a : 0);
8857
+ const handleClick = React.useCallback((index) => {
8858
+ 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 })));
8859
+ }, []);
8860
+ 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) => {
8861
+ var _a, _b, _c;
8862
+ return (React.createElement(SwiperSlide, { className: css.css({
8863
+ width: '50px',
8864
+ height: '50px',
8865
+ marginRight: '10px'
8866
+ }), onClick: () => handleClick(index), key: index },
8867
+ React.createElement(FormatImage$1, { style: {
8868
+ height: '100%',
8869
+ width: '100%',
8870
+ objectFit: 'cover',
8871
+ display: 'block',
8872
+ objectPosition: `50% ${(data === null || data === void 0 ? void 0 : data.translateY) ? -(data === null || data === void 0 ? void 0 : data.translateY) + 50 : 50}%`,
8873
+ border: check === index ? '1px solid #000' : '1px solid #f2f2f2'
8874
+ }, 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 })));
8875
+ })))));
8876
+ };
8877
+ var CommodityGroup$1 = React.memo(CommodityGroup);
8878
+
8727
8879
  const CommodityDetail$1 = (_a) => {
8728
8880
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
8729
- 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"]);
8881
+ 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"]);
8730
8882
  const { sxpParameter } = useSxpDataSource();
8731
8883
  const { popupDetailData, bffEventReport, isPreview, bffFbReport } = useSxpDataSource();
8732
8884
  const { jumpToWeb, productView } = useEventReport();
8733
8885
  const curTimeRef = React.useRef(null);
8734
8886
  const [showModal, setShowModal] = React.useState(false);
8887
+ const [show3DModal, setShow3DModal] = React.useState(false);
8735
8888
  const data = isPost ? rec : popupDetailData;
8736
8889
  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;
8737
8890
  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;
@@ -8806,31 +8959,39 @@ const CommodityDetail$1 = (_a) => {
8806
8959
  }
8807
8960
  return style;
8808
8961
  }, []);
8809
- return (React.createElement("div", { className: 'pb-commondity' },
8962
+ const renderCommodityGroup = React.useCallback(() => {
8963
+ var _a, _b, _c;
8964
+ if (isPost)
8965
+ return;
8966
+ 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' } }));
8967
+ }, []);
8968
+ return (React.createElement(React.Fragment, null,
8810
8969
  React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
8811
- 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: {
8812
- clickable: true,
8813
- bulletActiveClass: 'swipe-item-active-bullet',
8814
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
8815
- ? 'commondityDetail-swiper-clickable-left'
8816
- : 'commondityDetail-swiper-clickable-center'
8817
- }, loop: true, autoplay: {
8818
- delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8819
- } }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
8820
- return (React.createElement(SwiperSlide, { key: src },
8821
- React.createElement("div", { style: {
8822
- overflow: 'hidden',
8823
- width,
8824
- height: width
8825
- } },
8826
- React.createElement(FormatImage$1, { style: {
8827
- height: '100%',
8828
- width: '100%',
8829
- objectFit: 'cover',
8830
- display: 'block',
8831
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
8832
- }, src: src }))));
8833
- }))),
8970
+ 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' } },
8971
+ React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8972
+ clickable: true,
8973
+ bulletActiveClass: 'swipe-item-active-bullet',
8974
+ clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
8975
+ ? 'commondityDetail-swiper-clickable-left'
8976
+ : 'commondityDetail-swiper-clickable-center'
8977
+ }, loop: true, autoplay: {
8978
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8979
+ } },
8980
+ React.createElement(React.Fragment, null, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
8981
+ return (React.createElement(SwiperSlide, { key: src },
8982
+ React.createElement("div", { style: {
8983
+ overflow: 'hidden',
8984
+ width,
8985
+ height: width
8986
+ } },
8987
+ React.createElement(FormatImage$1, { style: {
8988
+ height: '100%',
8989
+ width: '100%',
8990
+ objectFit: 'cover',
8991
+ display: 'block',
8992
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
8993
+ }, src: src }))));
8994
+ }))))),
8834
8995
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
8835
8996
  position: 'relative',
8836
8997
  height: 0,
@@ -8845,19 +9006,55 @@ const CommodityDetail$1 = (_a) => {
8845
9006
  objectFit: 'cover',
8846
9007
  width: '100%'
8847
9008
  }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
9009
+ renderCommodityGroup(),
8848
9010
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
8849
9011
  renderBtn(),
8850
9012
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
8851
9013
  React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
8852
- renderBtn())));
9014
+ renderBtn()),
9015
+ React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
9016
+ React.createElement("iframe", { src: 'https://rimowa.threedium.co.uk/product-experience/latest/?sku=92573974&lang=en', style: {
9017
+ width: '100%',
9018
+ height: 'calc(100% - 40px)',
9019
+ marginTop: '40px'
9020
+ } }))));
8853
9021
  };
8854
9022
  var CommodityDetailComponent = React.memo(CommodityDetail$1);
8855
9023
 
9024
+ /*
9025
+ * @Author: binruan@chatlabs.com
9026
+ * @Date: 2024-07-09 14:35:10
9027
+ * @LastEditors: binruan@chatlabs.com
9028
+ * @LastEditTime: 2024-07-12 17:53:02
9029
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\interactionRender.tsx
9030
+ *
9031
+ */
9032
+ /*
9033
+ * @Author: binruan@chatlabs.com
9034
+ * @Date: 2024-07-05 14:08:41
9035
+ * @LastEditors: binruan@chatlabs.com
9036
+ * @LastEditTime: 2024-07-09 14:34:49
9037
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9038
+ *
9039
+ */
9040
+ var interactionRender$c = [
9041
+ {
9042
+ title: '滑动事件',
9043
+ child: [
9044
+ {
9045
+ type: 'Switch',
9046
+ label: '滑动铺满全屏',
9047
+ name: ['isScrollFullScreen']
9048
+ }
9049
+ ]
9050
+ }
9051
+ ];
9052
+
8856
9053
  /*
8857
9054
  * @Author: binruan@chatlabs.com
8858
9055
  * @Date: 2023-07-28 18:29:57
8859
9056
  * @LastEditors: binruan@chatlabs.com
8860
- * @LastEditTime: 2024-04-02 18:13:10
9057
+ * @LastEditTime: 2024-07-12 17:40:06
8861
9058
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
8862
9059
  *
8863
9060
  */
@@ -8867,7 +9064,8 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
8867
9064
  category: 'popup',
8868
9065
  type: 'CommodityDetail',
8869
9066
  related: {
8870
- settingRender: settingRender$5
9067
+ settingRender: settingRender$8,
9068
+ interactionRender: interactionRender$c
8871
9069
  },
8872
9070
  defaulSetting: {
8873
9071
  props: {
@@ -8912,7 +9110,7 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
8912
9110
  sort: 1
8913
9111
  });
8914
9112
 
8915
- var interactionRender$7 = [
9113
+ var interactionRender$b = [
8916
9114
  {
8917
9115
  title: '点击事件',
8918
9116
  child: [
@@ -8932,7 +9130,7 @@ var interactionRender$7 = [
8932
9130
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
8933
9131
  *
8934
9132
  */
8935
- var settingRender$4 = [
9133
+ var settingRender$7 = [
8936
9134
  {
8937
9135
  title: '',
8938
9136
  child: [
@@ -9102,9 +9300,9 @@ const Prompt = createMaterial(PromptComponent, {
9102
9300
  category: 'popup',
9103
9301
  type: 'Prompt',
9104
9302
  related: {
9105
- settingRender: settingRender$4,
9303
+ settingRender: settingRender$7,
9106
9304
  bindableProps: [],
9107
- interactionRender: interactionRender$7
9305
+ interactionRender: interactionRender$b
9108
9306
  },
9109
9307
  defaulSetting: {
9110
9308
  props: {
@@ -9123,11 +9321,11 @@ const Prompt = createMaterial(PromptComponent, {
9123
9321
  * @Author: binruan@chatlabs.com
9124
9322
  * @Date: 2024-03-26 16:50:25
9125
9323
  * @LastEditors: binruan@chatlabs.com
9126
- * @LastEditTime: 2024-06-27 09:54:23
9324
+ * @LastEditTime: 2024-07-12 14:44:50
9127
9325
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9128
9326
  *
9129
9327
  */
9130
- var settingRender$3 = [
9328
+ var settingRender$6 = [
9131
9329
  {
9132
9330
  title: '商品图片',
9133
9331
  child: [
@@ -9166,6 +9364,47 @@ var settingRender$3 = [
9166
9364
  }
9167
9365
  ]
9168
9366
  },
9367
+ {
9368
+ title: '多商品切换器',
9369
+ child: [
9370
+ {
9371
+ type: 'Switch',
9372
+ name: ['props', 'commodityGroup', 'open'],
9373
+ label: '快速切换开关'
9374
+ },
9375
+ {
9376
+ type: 'Group',
9377
+ child: [
9378
+ {
9379
+ label: '居中垂直偏移',
9380
+ type: 'Number',
9381
+ name: ['props', 'commodityGroup', 'translateY'],
9382
+ min: -1000,
9383
+ addonAfter: '%',
9384
+ initialValue: 0
9385
+ }
9386
+ ]
9387
+ },
9388
+ {
9389
+ type: 'Group',
9390
+ child: [
9391
+ {
9392
+ label: '上边距',
9393
+ name: ['props', 'commodityGroup', 'style', 'marginTop'],
9394
+ type: 'Number',
9395
+ addonAfter: 'px',
9396
+ initialValue: 20
9397
+ },
9398
+ {
9399
+ label: '下边距',
9400
+ name: ['props', 'commodityGroup', 'style', 'marginBottom'],
9401
+ type: 'Number',
9402
+ addonAfter: 'px'
9403
+ }
9404
+ ]
9405
+ }
9406
+ ]
9407
+ },
9169
9408
  {
9170
9409
  title: '商品文本',
9171
9410
  child: [
@@ -9336,14 +9575,11 @@ var settingRender$3 = [
9336
9575
 
9337
9576
  const CommodityDetailDiroNew$1 = (_a) => {
9338
9577
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
9339
- 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"]);
9578
+ 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"]);
9340
9579
  React.useState(true);
9341
9580
  const { sxpParameter } = useSxpDataSource();
9342
9581
  const { popupDetailData, bffEventReport, isPreview, swiperRef, bffFbReport } = useSxpDataSource();
9343
9582
  const { jumpToWeb, productView } = useEventReport();
9344
- const scrollRef = React.useRef(null);
9345
- React.useRef(null);
9346
- React.useRef(null);
9347
9583
  React.useState(false);
9348
9584
  React.useState(false);
9349
9585
  React.useState(true);
@@ -9391,6 +9627,56 @@ const CommodityDetailDiroNew$1 = (_a) => {
9391
9627
  }
9392
9628
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
9393
9629
  const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
9630
+ // useEffect(() => {
9631
+ // console.log(scrollRef?.current?.scrollHeight, window.innerHeight);
9632
+ // if (scrollRef?.current && scrollRef?.current?.scrollHeight > window.innerHeight) {
9633
+ // setStopSlide(true);
9634
+ // }
9635
+ // }, [scrollRef]);
9636
+ // useEffect(() => {
9637
+ // const handleScroll = () => {
9638
+ // if (scrollRef?.current) {
9639
+ // const { scrollTop, scrollHeight, clientHeight } = scrollRef.current;
9640
+ // const isBottom = scrollTop + clientHeight === scrollHeight;
9641
+ // if (isBottom) {
9642
+ // setIsBottom(true);
9643
+ // } else {
9644
+ // setIsBottom(false);
9645
+ // }
9646
+ // if (scrollTop === 0) {
9647
+ // setIsTop(true);
9648
+ // } else {
9649
+ // setIsTop(false);
9650
+ // }
9651
+ // }
9652
+ // };
9653
+ // if (scrollRef.current) {
9654
+ // scrollRef.current.addEventListener('scroll', handleScroll);
9655
+ // }
9656
+ // return () => {
9657
+ // if (scrollRef.current) {
9658
+ // scrollRef.current.removeEventListener('scroll', handleScroll);
9659
+ // }
9660
+ // };
9661
+ // }, [scrollRef]);
9662
+ // const handleTouchStart = (event: any) => {
9663
+ // event.stopPropagation();
9664
+ // touchRef.current = event.touches[0].clientY;
9665
+ // touchMoveRef.current = true;
9666
+ // };
9667
+ // const handleTouchMove = (event: any) => {
9668
+ // event.stopPropagation();
9669
+ // if (touchMoveRef.current) {
9670
+ // touchMoveRef.current = false;
9671
+ // const currentY = event.touches[0].clientY;
9672
+ // const diff = touchRef.current - currentY;
9673
+ // if (diff > 0 && (isBottom || !stopSlide)) {
9674
+ // swiperRef?.current?.swiper?.slideNext();
9675
+ // } else if (diff < 0 && (isTop || !stopSlide)) {
9676
+ // swiperRef?.current?.swiper?.slidePrev();
9677
+ // }
9678
+ // }
9679
+ // };
9394
9680
  const productInfoText = ({ isPost }) => {
9395
9681
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
9396
9682
  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) ||
@@ -9403,8 +9689,14 @@ Made in Italy` })));
9403
9689
  }
9404
9690
  return style;
9405
9691
  }, []);
9692
+ const renderCommodityGroup = React.useCallback(() => {
9693
+ var _a, _b, _c;
9694
+ if (isPost)
9695
+ return;
9696
+ 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' } }));
9697
+ }, []);
9406
9698
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
9407
- React.createElement("div", Object.assign({ ref: scrollRef, className: css.css(Object.assign({}, style)) }, props),
9699
+ React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
9408
9700
  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: {
9409
9701
  clickable: true,
9410
9702
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
@@ -9425,7 +9717,7 @@ Made in Italy` })));
9425
9717
  width: '100%',
9426
9718
  objectFit: 'cover',
9427
9719
  display: 'block',
9428
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9720
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9429
9721
  }, src: src }))));
9430
9722
  }))),
9431
9723
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
@@ -9442,6 +9734,7 @@ Made in Italy` })));
9442
9734
  objectFit: 'cover',
9443
9735
  width: '100%'
9444
9736
  }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
9737
+ renderCommodityGroup(),
9445
9738
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
9446
9739
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
9447
9740
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
@@ -9467,11 +9760,40 @@ Made in Italy` })));
9467
9760
  };
9468
9761
  var CommodityDetailDiroNewComponent = React.memo(CommodityDetailDiroNew$1);
9469
9762
 
9763
+ /*
9764
+ * @Author: binruan@chatlabs.com
9765
+ * @Date: 2024-07-09 14:35:10
9766
+ * @LastEditors: binruan@chatlabs.com
9767
+ * @LastEditTime: 2024-07-12 17:53:02
9768
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\interactionRender.tsx
9769
+ *
9770
+ */
9771
+ /*
9772
+ * @Author: binruan@chatlabs.com
9773
+ * @Date: 2024-07-05 14:08:41
9774
+ * @LastEditors: binruan@chatlabs.com
9775
+ * @LastEditTime: 2024-07-09 14:34:49
9776
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
9777
+ *
9778
+ */
9779
+ var interactionRender$a = [
9780
+ {
9781
+ title: '滑动事件',
9782
+ child: [
9783
+ {
9784
+ type: 'Switch',
9785
+ label: '滑动铺满全屏',
9786
+ name: ['isScrollFullScreen']
9787
+ }
9788
+ ]
9789
+ }
9790
+ ];
9791
+
9470
9792
  /*
9471
9793
  * @Author: binruan@chatlabs.com
9472
9794
  * @Date: 2024-03-20 10:27:31
9473
9795
  * @LastEditors: binruan@chatlabs.com
9474
- * @LastEditTime: 2024-04-09 16:25:44
9796
+ * @LastEditTime: 2024-07-12 18:17:31
9475
9797
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\material.tsx
9476
9798
  *
9477
9799
  */
@@ -9481,7 +9803,8 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
9481
9803
  category: 'popup',
9482
9804
  type: 'CommodityDetailDiroNew',
9483
9805
  related: {
9484
- settingRender: settingRender$3
9806
+ settingRender: settingRender$6,
9807
+ interactionRender: interactionRender$a
9485
9808
  },
9486
9809
  defaulSetting: {
9487
9810
  props: {
@@ -9537,66 +9860,11 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
9537
9860
  * @Author: binruan@chatlabs.com
9538
9861
  * @Date: 2024-03-26 16:50:25
9539
9862
  * @LastEditors: binruan@chatlabs.com
9540
- * @LastEditTime: 2024-07-04 17:47:52
9541
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
9863
+ * @LastEditTime: 2024-07-09 10:37:45
9864
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
9542
9865
  *
9543
9866
  */
9544
- var settingRender$2 = [
9545
- {
9546
- title: '主题样式',
9547
- child: [
9548
- {
9549
- type: 'Group',
9550
- label: '尺寸',
9551
- child: [
9552
- {
9553
- type: 'Number',
9554
- name: ['style', 'width'],
9555
- addonAfter: 'W'
9556
- },
9557
- {
9558
- type: 'Number',
9559
- name: ['style', 'height'],
9560
- addonAfter: 'H'
9561
- }
9562
- ]
9563
- },
9564
- {
9565
- type: 'Group',
9566
- label: '圆角',
9567
- child: [
9568
- {
9569
- type: 'Slider',
9570
- name: ['style', 'borderRadius'],
9571
- max: 100
9572
- },
9573
- {
9574
- type: 'Number',
9575
- name: ['style', 'borderRadius'],
9576
- addonAfter: 'px',
9577
- max: 100
9578
- }
9579
- ]
9580
- },
9581
- {
9582
- type: 'Color',
9583
- label: '背景色',
9584
- name: ['style', 'backgroundColor']
9585
- },
9586
- {
9587
- label: '内边距',
9588
- type: 'Number',
9589
- name: ['style', 'padding'],
9590
- addonAfter: 'px'
9591
- },
9592
- {
9593
- label: '与Post描述边距',
9594
- type: 'Number',
9595
- name: ['style', 'marginBottom'],
9596
- addonAfter: 'px'
9597
- }
9598
- ]
9599
- },
9867
+ var settingRender$5 = [
9600
9868
  {
9601
9869
  title: '商品图片',
9602
9870
  child: [
@@ -9606,12 +9874,12 @@ var settingRender$2 = [
9606
9874
  child: [
9607
9875
  {
9608
9876
  type: 'Number',
9609
- name: ['props', 'ctaTempStyles', 'img', 'width'],
9877
+ name: ['props', 'commodityPicture', 'width'],
9610
9878
  addonAfter: 'W'
9611
9879
  },
9612
9880
  {
9613
9881
  type: 'Number',
9614
- name: ['props', 'ctaTempStyles', 'img', 'height'],
9882
+ name: ['props', 'commodityPicture', 'height'],
9615
9883
  addonAfter: 'H'
9616
9884
  }
9617
9885
  ]
@@ -9622,12 +9890,12 @@ var settingRender$2 = [
9622
9890
  child: [
9623
9891
  {
9624
9892
  type: 'Slider',
9625
- name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
9893
+ name: ['props', 'commodityPicture', 'borderRadius'],
9626
9894
  max: 100
9627
9895
  },
9628
9896
  {
9629
9897
  type: 'Number',
9630
- name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
9898
+ name: ['props', 'commodityPicture', 'borderRadius'],
9631
9899
  addonAfter: 'px',
9632
9900
  max: 100
9633
9901
  }
@@ -9637,7 +9905,7 @@ var settingRender$2 = [
9637
9905
  type: 'Number',
9638
9906
  label: '与右侧边距',
9639
9907
  addonAfter: 'px',
9640
- name: ['props', 'ctaTempStyles', 'img', 'marginRight']
9908
+ name: ['props', 'commodityPicture', 'marginRight']
9641
9909
  },
9642
9910
  {
9643
9911
  label: '居中垂直偏移',
@@ -9650,72 +9918,90 @@ var settingRender$2 = [
9650
9918
  ]
9651
9919
  },
9652
9920
  {
9653
- title: '商品标题文本',
9654
- type: 'commodityTitle',
9921
+ title: '商品文本',
9655
9922
  child: [
9656
9923
  {
9657
- type: 'Group',
9658
- label: '字体',
9924
+ name: ['props', 'commodityStyles'],
9925
+ type: 'SelectLinkage',
9659
9926
  child: [
9660
9927
  {
9928
+ label: '字段',
9661
9929
  type: 'Select',
9662
- name: ['props', 'ctaTempStyles', 'title', 'fontFamily-cn'],
9663
- bottomText: '中文字体'
9930
+ options: [
9931
+ {
9932
+ label: '商品名称',
9933
+ value: 'title'
9934
+ },
9935
+ {
9936
+ label: '系列名称',
9937
+ value: 'collection'
9938
+ },
9939
+ {
9940
+ label: '价格',
9941
+ value: 'price'
9942
+ }
9943
+ ],
9944
+ name: ['props', 'commodityStyles', 'field'],
9945
+ initialValue: 'title'
9664
9946
  },
9665
9947
  {
9666
- type: 'Select',
9667
- name: ['props', 'ctaTempStyles', 'title', 'fontFamily-en'],
9668
- bottomText: '英文/其他字体'
9669
- }
9670
- ]
9671
- },
9672
- {
9673
- type: 'Group',
9674
- label: '',
9675
- child: [
9948
+ type: 'Group',
9949
+ label: '标题字体',
9950
+ child: [
9951
+ {
9952
+ type: 'Select',
9953
+ name: ['fontFamily-cn'],
9954
+ bottomText: '中文字体'
9955
+ },
9956
+ {
9957
+ type: 'Select',
9958
+ name: ['fontFamily-en'],
9959
+ bottomText: '英文/其他字体'
9960
+ }
9961
+ ]
9962
+ },
9676
9963
  {
9677
- type: 'Color',
9678
- name: ['props', 'ctaTempStyles', 'title', 'color']
9964
+ type: 'Group',
9965
+ label: '',
9966
+ child: [
9967
+ {
9968
+ type: 'Color',
9969
+ name: ['color']
9970
+ },
9971
+ {
9972
+ type: 'Number',
9973
+ addonAfter: 'px',
9974
+ name: ['fontSize']
9975
+ }
9976
+ ]
9679
9977
  },
9680
9978
  {
9681
- type: 'Number',
9682
- addonAfter: 'px',
9683
- name: ['props', 'ctaTempStyles', 'title', 'fontSize']
9979
+ label: '标题样式',
9980
+ type: 'TextStyle'
9981
+ },
9982
+ {
9983
+ label: '标题对齐',
9984
+ type: 'TextAlign'
9684
9985
  }
9685
9986
  ]
9686
- },
9687
- {
9688
- label: '样式',
9689
- type: 'TextStyle',
9690
- name: ['props', 'ctaTempStyles', 'title']
9691
- },
9692
- {
9693
- label: '对齐',
9694
- type: 'TextAlign',
9695
- name: ['props', 'ctaTempStyles', 'title']
9696
- },
9697
- {
9698
- label: '间距',
9699
- type: 'TextSpace',
9700
- name: ['props', 'ctaTempStyles', 'title']
9701
9987
  }
9702
9988
  ]
9703
9989
  },
9704
9990
  {
9705
- title: 'CTA标题',
9991
+ title: '按钮样式',
9706
9992
  child: [
9993
+ {
9994
+ type: 'Color',
9995
+ label: '背景色',
9996
+ name: ['props', 'buttonStyle', 'backgroundColor']
9997
+ },
9707
9998
  {
9708
9999
  type: 'Group',
9709
10000
  label: '尺寸',
9710
10001
  child: [
9711
10002
  {
9712
10003
  type: 'Number',
9713
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'width'],
9714
- addonAfter: 'W'
9715
- },
9716
- {
9717
- type: 'Number',
9718
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'height'],
10004
+ name: ['props', 'buttonStyle', 'height'],
9719
10005
  addonAfter: 'H'
9720
10006
  }
9721
10007
  ]
@@ -9726,21 +10012,20 @@ var settingRender$2 = [
9726
10012
  child: [
9727
10013
  {
9728
10014
  type: 'Slider',
9729
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
10015
+ name: ['props', 'buttonStyle', 'borderRadius'],
9730
10016
  max: 100
9731
10017
  },
9732
10018
  {
9733
10019
  type: 'Number',
9734
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
10020
+ name: ['props', 'buttonStyle', 'borderRadius'],
9735
10021
  addonAfter: 'px',
9736
10022
  max: 100
9737
10023
  }
9738
10024
  ]
9739
10025
  },
9740
10026
  {
9741
- type: 'Color',
9742
- label: '背景色',
9743
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'backgroundColor']
10027
+ type: 'TextSpace',
10028
+ name: ['props', 'buttonStyle']
9744
10029
  },
9745
10030
  {
9746
10031
  type: 'Group',
@@ -9748,12 +10033,12 @@ var settingRender$2 = [
9748
10033
  child: [
9749
10034
  {
9750
10035
  type: 'Select',
9751
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-cn'],
10036
+ name: ['props', 'buttonStyle', 'fontFamily-cn'],
9752
10037
  bottomText: '中文字体'
9753
10038
  },
9754
10039
  {
9755
10040
  type: 'Select',
9756
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-en'],
10041
+ name: ['props', 'buttonStyle', 'fontFamily-en'],
9757
10042
  bottomText: '英文/其他字体'
9758
10043
  }
9759
10044
  ]
@@ -9764,78 +10049,29 @@ var settingRender$2 = [
9764
10049
  child: [
9765
10050
  {
9766
10051
  type: 'Color',
9767
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
10052
+ name: ['props', 'buttonStyle', 'color']
9768
10053
  },
9769
10054
  {
9770
10055
  type: 'Number',
9771
10056
  addonAfter: 'px',
9772
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
10057
+ name: ['props', 'buttonStyle', 'fontSize']
9773
10058
  }
9774
10059
  ]
9775
10060
  },
9776
10061
  {
9777
10062
  label: '样式',
9778
10063
  type: 'TextStyle',
9779
- name: ['props', 'ctaTempStyles', 'ctaTitle']
10064
+ name: ['props', 'buttonStyle']
9780
10065
  },
9781
10066
  {
9782
10067
  label: '对齐',
9783
10068
  type: 'TextAlign',
9784
- name: ['props', 'ctaTempStyles', 'ctaTitle']
9785
- },
9786
- {
9787
- label: '间距',
9788
- type: 'TextSpace',
9789
- name: ['props', 'ctaTempStyles', 'ctaTitle']
9790
- }
9791
- ]
9792
- }
9793
- ];
9794
-
9795
- var interactionRender$6 = [
9796
- {
9797
- title: '点击事件',
9798
- child: [
9799
- {
9800
- type: 'link',
9801
- name: 'onClick'
10069
+ name: ['props', 'buttonStyle']
9802
10070
  }
9803
10071
  ]
9804
10072
  }
9805
10073
  ];
9806
10074
 
9807
- const EventProvider = (_a) => {
9808
- var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
9809
- const ref = React.useRef(null);
9810
- const { popup } = useEditor();
9811
- const { setPopupDetailData, ctaEvent } = useSxpDataSource();
9812
- const { jumpToWeb } = useEventReport();
9813
- const handleClick = lodash.throttle(() => {
9814
- var _a, _b, _c, _d, _e, _f, _g, _h;
9815
- 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;
9816
- ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9817
- eventSubject: 'clickCta',
9818
- eventDescription: 'User clicked the CTA'
9819
- }, rec, item, index);
9820
- setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
9821
- if (isExternalLink) {
9822
- 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) {
9823
- const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
9824
- const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
9825
- jumpToWeb(rec, product, cta, index);
9826
- 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);
9827
- }
9828
- }
9829
- else {
9830
- onClick === null || onClick === void 0 ? void 0 : onClick();
9831
- }
9832
- }, popup === null || popup === void 0 ? void 0 : popup.duration);
9833
- return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
9834
- };
9835
- var EventProvider$1 = React.memo(EventProvider);
9836
-
9837
- var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
9838
-
9839
10075
  /*
9840
10076
  * @Author: binruan@chatlabs.com
9841
10077
  * @Date: 2023-04-12 09:58:58
@@ -9867,7 +10103,7 @@ function useOnScreen(ref) {
9867
10103
  * @Author: binruan@chatlabs.com
9868
10104
  * @Date: 2024-01-16 14:50:13
9869
10105
  * @LastEditors: binruan@chatlabs.com
9870
- * @LastEditTime: 2024-07-04 18:13:23
10106
+ * @LastEditTime: 2024-06-24 18:13:14
9871
10107
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
9872
10108
  *
9873
10109
  */
@@ -9888,92 +10124,106 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle }) => {
9888
10124
  }, [src]);
9889
10125
  return (React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, imgStyle)) },
9890
10126
  React.createElement("div", { ref: ref, hidden: !src, className: css.css({ width: '100%', height: '100%' }) },
9891
- React.createElement(FormatImage$1, { className: css.css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ? translateY + 50 : 50}%` }, style)), src: src }))));
10127
+ React.createElement(FormatImage$1, { className: css.css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ? -translateY + 50 : 50}%` }, style)), src: src }))));
9892
10128
  };
9893
10129
  var Img$1 = React.memo(Img);
9894
10130
 
9895
- const Commodity$1 = (_a) => {
9896
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
9897
- 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"]);
10131
+ const EventProvider = (_a) => {
10132
+ var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
10133
+ const ref = React.useRef(null);
10134
+ const { popup } = useEditor();
10135
+ const { setPopupDetailData, ctaEvent } = useSxpDataSource();
10136
+ const { jumpToWeb } = useEventReport();
10137
+ const handleClick = lodash.throttle(() => {
10138
+ var _a, _b, _c, _d, _e, _f, _g, _h;
10139
+ 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;
10140
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10141
+ eventSubject: 'clickCta',
10142
+ eventDescription: 'User clicked the CTA'
10143
+ }, rec, item, index);
10144
+ setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
10145
+ if (isExternalLink) {
10146
+ 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) {
10147
+ const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
10148
+ const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
10149
+ jumpToWeb(rec, product, cta, index);
10150
+ 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);
10151
+ }
10152
+ }
10153
+ else {
10154
+ onClick === null || onClick === void 0 ? void 0 : onClick();
10155
+ }
10156
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
10157
+ return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
10158
+ };
10159
+ var EventProvider$1 = React.memo(EventProvider);
10160
+
10161
+ const CommodityList$1 = (_a) => {
10162
+ var _b, _c;
10163
+ 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"]);
9898
10164
  const { sxpParameter } = useSxpDataSource();
9899
- const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9900
- 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;
9901
- return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
9902
- 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 }),
9903
- React.createElement("div", { className: css.css({
9904
- color: '#fff',
9905
- display: 'flex',
9906
- flexDirection: 'column',
9907
- justifyContent: 'space-between',
9908
- width: '100%',
9909
- overflow: 'hidden'
9910
- }) },
9911
- React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
9912
- __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)
9913
- } }),
9914
- React.createElement("div", { className: css.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: {
9915
- __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)
9916
- } }))));
10165
+ const { popupDetailData, bffEventReport, isPreview, swiperRef, bffFbReport } = useSxpDataSource();
10166
+ React.useRef(null);
10167
+ const recData = isPost ? rec : popupDetailData;
10168
+ 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];
10169
+ const priceText = React.useCallback((product) => {
10170
+ var _a, _b, _c, _d, _e;
10171
+ if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
10172
+ 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', {
10173
+ minimumFractionDigits: 0
10174
+ })) !== null && _e !== void 0 ? _e : ''}`;
10175
+ }
10176
+ else {
10177
+ return '$7,000';
10178
+ }
10179
+ }, []);
10180
+ return (React.createElement("div", { className: css.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) => {
10181
+ var _a, _b, _c, _d, _e, _f, _g, _h;
10182
+ return (React.createElement(EventProvider$1, Object.assign({ key: index, isExternalLink: isExternalLink, rec: recData, index: index }, props, { className: css.css({
10183
+ display: 'flex'
10184
+ }) }),
10185
+ 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 }),
10186
+ React.createElement("div", null,
10187
+ 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: {
10188
+ __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)
10189
+ } }),
10190
+ 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: {
10191
+ __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)
10192
+ } }),
10193
+ React.createElement("div", { className: css.css({
10194
+ display: 'flex',
10195
+ alignItems: 'flex-end',
10196
+ justifyContent: 'space-between',
10197
+ width: '100%',
10198
+ overflow: 'hidden'
10199
+ }) },
10200
+ 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: {
10201
+ __html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
10202
+ } }),
10203
+ React.createElement("div", { style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px' }), dangerouslySetInnerHTML: {
10204
+ __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)
10205
+ } })))));
10206
+ })));
9917
10207
  };
9918
- var CommodityComponent = React.memo(Commodity$1);
10208
+ var CommodityListComponent = React.memo(CommodityList$1);
9919
10209
 
9920
10210
  /*
9921
10211
  * @Author: binruan@chatlabs.com
9922
- * @Date: 2023-07-28 18:29:57
10212
+ * @Date: 2024-07-09 14:35:10
9923
10213
  * @LastEditors: binruan@chatlabs.com
9924
- * @LastEditTime: 2024-03-29 16:39:54
9925
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Commodity\material.tsx
10214
+ * @LastEditTime: 2024-07-09 14:35:18
10215
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\interactionRender.tsx
9926
10216
  *
9927
10217
  */
9928
- const Commodity = createMaterial(CommodityComponent, {
9929
- displayName: '推荐单商品-透明底',
9930
- icon: '',
9931
- category: 'template',
9932
- type: 'Commodity',
9933
- related: {
9934
- interactionRender: interactionRender$6,
9935
- bindableProps: [],
9936
- settingRender: settingRender$2
9937
- },
9938
- defaulSetting: {
9939
- props: {
9940
- ctaTempStyles: {
9941
- img: {
9942
- borderRadius: 3,
9943
- width: 60,
9944
- height: 60,
9945
- marginRight: 8
9946
- },
9947
- title: {
9948
- fontSize: 12,
9949
- color: '#fff',
9950
- textAlign: 'left'
9951
- },
9952
- ctaTitle: {
9953
- fontSize: 10,
9954
- color: '#fff',
9955
- textAlign: 'center',
9956
- width: 130,
9957
- height: 20,
9958
- backgroundColor: 'rgba(0,0,0,.5)'
9959
- }
9960
- }
9961
- },
9962
- style: {
9963
- padding: 7,
9964
- width: 236,
9965
- height: 74,
9966
- borderRadius: 3,
9967
- backgroundColor: 'rgba(0,0,0,.3)',
9968
- marginBottom: 8
9969
- }
9970
- },
9971
- w: 100,
9972
- h: 40,
9973
- sort: 1
9974
- });
9975
-
9976
- var interactionRender$5 = [
10218
+ /*
10219
+ * @Author: binruan@chatlabs.com
10220
+ * @Date: 2024-07-05 14:08:41
10221
+ * @LastEditors: binruan@chatlabs.com
10222
+ * @LastEditTime: 2024-07-09 14:34:49
10223
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
10224
+ *
10225
+ */
10226
+ var interactionRender$9 = [
9977
10227
  {
9978
10228
  title: '点击事件',
9979
10229
  child: [
@@ -9985,104 +10235,140 @@ var interactionRender$5 = [
9985
10235
  }
9986
10236
  ];
9987
10237
 
9988
- const Appoint$1 = (_a) => {
9989
- var _b, _c, _d, _e, _f, _g;
9990
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
9991
- const { sxpParameter } = useSxpDataSource();
9992
- const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
9993
- 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;
9994
- return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' }, index: index }, props),
9995
- 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 }),
9996
- React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
9997
- __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)
9998
- } })));
9999
- };
10000
- var AppointComponent = React.memo(Appoint$1);
10001
-
10002
10238
  /*
10003
10239
  * @Author: binruan@chatlabs.com
10004
- * @Date: 2023-07-28 18:29:57
10240
+ * @Date: 2024-03-20 10:27:31
10005
10241
  * @LastEditors: binruan@chatlabs.com
10006
- * @LastEditTime: 2024-04-09 21:42:21
10007
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Appoint\material.tsx
10242
+ * @LastEditTime: 2024-07-09 16:04:28
10243
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\material.tsx
10008
10244
  *
10009
10245
  */
10010
- const Appoint = createMaterial(AppointComponent, {
10011
- displayName: '预约表单',
10246
+ const CommodityList = createMaterial(CommodityListComponent, {
10247
+ displayName: '商品列表',
10012
10248
  icon: '',
10013
- category: 'template',
10014
- type: 'Appoint',
10249
+ category: 'popup',
10250
+ type: 'CommodityList',
10015
10251
  related: {
10016
- interactionRender: interactionRender$5,
10017
- settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
10018
- bindableProps: []
10252
+ settingRender: settingRender$5,
10253
+ interactionRender: interactionRender$9
10019
10254
  },
10020
10255
  defaulSetting: {
10021
10256
  props: {
10022
- ctaTempStyles: {
10023
- img: {
10024
- borderRadius: 3,
10025
- width: 30,
10026
- height: 30,
10027
- marginRight: 8
10257
+ commodityPicture: {
10258
+ width: 100,
10259
+ height: 100,
10260
+ marginRight: 10
10261
+ },
10262
+ commodityStyles: {
10263
+ price: {
10264
+ color: '#000',
10265
+ fontWeight: 'bold',
10266
+ fontSize: 14
10028
10267
  },
10029
- ctaTitle: {
10030
- fontSize: 12,
10031
- color: '#fff',
10032
- textAlign: 'left',
10033
- width: 130,
10034
- height: 20
10268
+ title: {
10269
+ color: '#000',
10270
+ fontSize: 14
10271
+ },
10272
+ collection: {
10273
+ color: '#757575',
10274
+ fontSize: 12
10035
10275
  }
10276
+ },
10277
+ buttonStyle: {
10278
+ backgroundColor: '#000',
10279
+ fontSize: 12,
10280
+ height: 30,
10281
+ textAlign: 'center',
10282
+ color: '#fff',
10283
+ lineHeight: 2.5
10036
10284
  }
10037
10285
  },
10038
- style: {
10039
- padding: 7,
10040
- width: 236,
10041
- height: 44,
10042
- borderRadius: 3,
10043
- backgroundColor: 'rgba(0,0,0,.3)',
10044
- marginBottom: 8
10045
- }
10286
+ style: {}
10046
10287
  },
10047
10288
  w: 100,
10048
10289
  h: 40,
10049
- sort: 6
10290
+ sort: 1
10050
10291
  });
10051
10292
 
10052
10293
  /*
10053
10294
  * @Author: binruan@chatlabs.com
10054
- * @Date: 2024-07-02 14:51:32
10295
+ * @Date: 2024-03-26 16:50:25
10055
10296
  * @LastEditors: binruan@chatlabs.com
10056
- * @LastEditTime: 2024-07-02 16:44:34
10057
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
10297
+ * @LastEditTime: 2024-06-27 09:55:59
10298
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
10058
10299
  *
10059
10300
  */
10060
- var linkSettingRender = [
10301
+ var settingRender$4 = [
10061
10302
  {
10062
- title: '自定义标题',
10303
+ title: '主题样式',
10063
10304
  child: [
10064
10305
  {
10065
- type: 'Switch',
10066
- label: '自定义标题开关',
10067
- name: ['props', 'customTitle', 'display']
10306
+ type: 'Group',
10307
+ label: '尺寸',
10308
+ child: [
10309
+ {
10310
+ type: 'Number',
10311
+ name: ['style', 'width'],
10312
+ addonAfter: 'W'
10313
+ },
10314
+ {
10315
+ type: 'Number',
10316
+ name: ['style', 'height'],
10317
+ addonAfter: 'H'
10318
+ }
10319
+ ]
10068
10320
  },
10069
10321
  {
10070
- type: 'Text',
10071
- label: '标题文案',
10072
- name: ['props', 'customTitle', 'text']
10322
+ type: 'Group',
10323
+ label: '圆角',
10324
+ child: [
10325
+ {
10326
+ type: 'Slider',
10327
+ name: ['style', 'borderRadius'],
10328
+ max: 100
10329
+ },
10330
+ {
10331
+ type: 'Number',
10332
+ name: ['style', 'borderRadius'],
10333
+ addonAfter: 'px',
10334
+ max: 100
10335
+ }
10336
+ ]
10337
+ },
10338
+ {
10339
+ type: 'Color',
10340
+ label: '背景色',
10341
+ name: ['style', 'backgroundColor']
10342
+ },
10343
+ {
10344
+ label: '内边距',
10345
+ type: 'Number',
10346
+ name: ['style', 'padding'],
10347
+ addonAfter: 'px'
10073
10348
  },
10349
+ {
10350
+ label: '与Post描述边距',
10351
+ type: 'Number',
10352
+ name: ['style', 'marginBottom'],
10353
+ addonAfter: 'px'
10354
+ }
10355
+ ]
10356
+ },
10357
+ {
10358
+ title: '商品图片',
10359
+ child: [
10074
10360
  {
10075
10361
  type: 'Group',
10076
10362
  label: '尺寸',
10077
10363
  child: [
10078
10364
  {
10079
10365
  type: 'Number',
10080
- name: ['props', 'customTitle', 'style', 'width'],
10366
+ name: ['props', 'ctaTempStyles', 'img', 'width'],
10081
10367
  addonAfter: 'W'
10082
10368
  },
10083
10369
  {
10084
10370
  type: 'Number',
10085
- name: ['props', 'customTitle', 'style', 'height'],
10371
+ name: ['props', 'ctaTempStyles', 'img', 'height'],
10086
10372
  addonAfter: 'H'
10087
10373
  }
10088
10374
  ]
@@ -10093,34 +10379,49 @@ var linkSettingRender = [
10093
10379
  child: [
10094
10380
  {
10095
10381
  type: 'Slider',
10096
- name: ['props', 'customTitle', 'style', 'borderRadius'],
10382
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
10097
10383
  max: 100
10098
10384
  },
10099
10385
  {
10100
10386
  type: 'Number',
10101
- name: ['props', 'customTitle', 'style', 'borderRadius'],
10387
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
10102
10388
  addonAfter: 'px',
10103
10389
  max: 100
10104
10390
  }
10105
10391
  ]
10106
10392
  },
10107
10393
  {
10108
- type: 'Color',
10109
- label: '背景色',
10110
- name: ['props', 'customTitle', 'style', 'backgroundColor']
10394
+ type: 'Number',
10395
+ label: '与右侧边距',
10396
+ addonAfter: 'px',
10397
+ name: ['props', 'ctaTempStyles', 'img', 'marginRight']
10111
10398
  },
10399
+ {
10400
+ label: '居中垂直偏移',
10401
+ type: 'Number',
10402
+ name: ['props', 'translateY'],
10403
+ min: -1000,
10404
+ addonAfter: '%',
10405
+ initialValue: 0
10406
+ }
10407
+ ]
10408
+ },
10409
+ {
10410
+ title: '商品标题文本',
10411
+ type: 'commodityTitle',
10412
+ child: [
10112
10413
  {
10113
10414
  type: 'Group',
10114
10415
  label: '字体',
10115
10416
  child: [
10116
10417
  {
10117
10418
  type: 'Select',
10118
- name: ['props', 'customTitle', 'style', 'fontFamily-cn'],
10419
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily-cn'],
10119
10420
  bottomText: '中文字体'
10120
10421
  },
10121
10422
  {
10122
10423
  type: 'Select',
10123
- name: ['props', 'customTitle', 'style', 'fontFamily-en'],
10424
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily-en'],
10124
10425
  bottomText: '英文/其他字体'
10125
10426
  }
10126
10427
  ]
@@ -10131,124 +10432,119 @@ var linkSettingRender = [
10131
10432
  child: [
10132
10433
  {
10133
10434
  type: 'Color',
10134
- name: ['props', 'customTitle', 'style', 'color']
10435
+ name: ['props', 'ctaTempStyles', 'title', 'color']
10135
10436
  },
10136
10437
  {
10137
10438
  type: 'Number',
10138
10439
  addonAfter: 'px',
10139
- name: ['props', 'customTitle', 'style', 'fontSize']
10440
+ name: ['props', 'ctaTempStyles', 'title', 'fontSize']
10140
10441
  }
10141
10442
  ]
10142
10443
  },
10143
10444
  {
10144
10445
  label: '样式',
10145
10446
  type: 'TextStyle',
10146
- name: ['props', 'customTitle', 'style']
10447
+ name: ['props', 'ctaTempStyles', 'title']
10147
10448
  },
10148
10449
  {
10149
10450
  label: '对齐',
10150
10451
  type: 'TextAlign',
10151
- name: ['props', 'customTitle', 'style']
10452
+ name: ['props', 'ctaTempStyles', 'title']
10152
10453
  },
10153
10454
  {
10154
- label: '上边距',
10155
- type: 'Number',
10156
- name: ['props', 'customTitle', 'style', 'marginTop'],
10157
- addonAfter: 'px'
10455
+ label: '间距',
10456
+ type: 'TextSpace',
10457
+ name: ['props', 'ctaTempStyles', 'title']
10158
10458
  }
10159
10459
  ]
10160
- }
10161
- ];
10162
-
10163
- var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
10164
-
10165
- const Link$1 = (_a) => {
10166
- var _b, _c, _d, _e, _f, _g, _h, _j;
10167
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
10168
- const { sxpParameter, bffEventReport } = useSxpDataSource();
10169
- const { jumpToWeb } = useEventReport();
10170
- const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
10171
- const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10172
- const handleTo = () => {
10173
- if (cta === null || cta === void 0 ? void 0 : cta.link) {
10174
- jumpToWeb(recData, product, cta, index);
10175
- window.location.href = window.getJointUtmLink(cta.link);
10176
- }
10177
- };
10178
- 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;
10179
- return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
10180
- 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 }),
10181
- React.createElement("div", { className: css.css({
10182
- display: 'flex',
10183
- alignItems: 'center',
10184
- width: '100%',
10185
- overflow: 'hidden'
10186
- }) },
10187
- React.createElement("div", null,
10188
- React.createElement("div", { className: styles$5['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
10189
- __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)
10190
- } }),
10191
- (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: {
10192
- __html: setFontForText(customTitle === null || customTitle === void 0 ? void 0 : customTitle.text, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style)
10193
- } }))))));
10194
- };
10195
- var LinkComponent = React.memo(Link$1);
10196
-
10197
- var _a;
10198
- const Link = createMaterial(LinkComponent, {
10199
- displayName: '跳转指引',
10200
- icon: '',
10201
- category: 'template',
10202
- type: 'Link',
10203
- related: {
10204
- 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),
10205
- bindableProps: []
10206
10460
  },
10207
- defaulSetting: {
10208
- props: {
10209
- ctaTempStyles: {
10210
- img: {
10211
- borderRadius: 3,
10212
- width: 60,
10213
- height: 60,
10214
- marginRight: 8
10215
- },
10216
- ctaTitle: {
10217
- fontSize: 12,
10218
- color: '#fff',
10219
- textAlign: 'left',
10220
- width: 130,
10221
- height: 20
10222
- }
10461
+ {
10462
+ title: 'CTA标题',
10463
+ child: [
10464
+ {
10465
+ type: 'Group',
10466
+ label: '尺寸',
10467
+ child: [
10468
+ {
10469
+ type: 'Number',
10470
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'width'],
10471
+ addonAfter: 'W'
10472
+ },
10473
+ {
10474
+ type: 'Number',
10475
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'height'],
10476
+ addonAfter: 'H'
10477
+ }
10478
+ ]
10223
10479
  },
10224
- customTitle: {
10225
- style: {
10226
- textAlign: 'left',
10227
- textDecoration: 'underline',
10228
- fontWeight: 'bold',
10229
- width: 130,
10230
- height: 20,
10231
- fontSize: 12,
10232
- color: '#000'
10233
- },
10234
- text: '探索更多'
10480
+ {
10481
+ type: 'Group',
10482
+ label: '圆角',
10483
+ child: [
10484
+ {
10485
+ type: 'Slider',
10486
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
10487
+ max: 100
10488
+ },
10489
+ {
10490
+ type: 'Number',
10491
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
10492
+ addonAfter: 'px',
10493
+ max: 100
10494
+ }
10495
+ ]
10496
+ },
10497
+ {
10498
+ type: 'Color',
10499
+ label: '背景色',
10500
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'backgroundColor']
10501
+ },
10502
+ {
10503
+ type: 'Group',
10504
+ label: '字体',
10505
+ child: [
10506
+ {
10507
+ type: 'Select',
10508
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-cn'],
10509
+ bottomText: '中文字体'
10510
+ },
10511
+ {
10512
+ type: 'Select',
10513
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-en'],
10514
+ bottomText: '英文/其他字体'
10515
+ }
10516
+ ]
10517
+ },
10518
+ {
10519
+ type: 'Group',
10520
+ label: '',
10521
+ child: [
10522
+ {
10523
+ type: 'Color',
10524
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
10525
+ },
10526
+ {
10527
+ type: 'Number',
10528
+ addonAfter: 'px',
10529
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
10530
+ }
10531
+ ]
10532
+ },
10533
+ {
10534
+ label: '样式',
10535
+ type: 'TextStyle',
10536
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
10537
+ },
10538
+ {
10539
+ label: '对齐',
10540
+ type: 'TextAlign',
10541
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
10235
10542
  }
10236
- },
10237
- style: {
10238
- padding: 7,
10239
- width: 236,
10240
- height: 74,
10241
- borderRadius: 3,
10242
- backgroundColor: 'rgba(0,0,0,.3)',
10243
- marginBottom: 8
10244
- }
10245
- },
10246
- w: 100,
10247
- h: 40,
10248
- sort: 5
10249
- });
10543
+ ]
10544
+ }
10545
+ ];
10250
10546
 
10251
- var interactionRender$4 = [
10547
+ var interactionRender$8 = [
10252
10548
  {
10253
10549
  title: '点击事件',
10254
10550
  child: [
@@ -10260,9 +10556,9 @@ var interactionRender$4 = [
10260
10556
  }
10261
10557
  ];
10262
10558
 
10263
- var styles$4 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
10559
+ var styles$8 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
10264
10560
 
10265
- const CommodityDiro$1 = (_a) => {
10561
+ const Commodity$1 = (_a) => {
10266
10562
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
10267
10563
  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"]);
10268
10564
  const { sxpParameter } = useSxpDataSource();
@@ -10278,32 +10574,32 @@ const CommodityDiro$1 = (_a) => {
10278
10574
  width: '100%',
10279
10575
  overflow: 'hidden'
10280
10576
  }) },
10281
- React.createElement("div", { className: styles$4['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10577
+ React.createElement("div", { className: styles$8['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10282
10578
  __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)
10283
10579
  } }),
10284
- React.createElement("div", { className: css.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: {
10580
+ React.createElement("div", { className: css.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: {
10285
10581
  __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)
10286
10582
  } }))));
10287
10583
  };
10288
- var CommodityDiroComponent = React.memo(CommodityDiro$1);
10584
+ var CommodityComponent = React.memo(Commodity$1);
10289
10585
 
10290
10586
  /*
10291
10587
  * @Author: binruan@chatlabs.com
10292
10588
  * @Date: 2023-07-28 18:29:57
10293
10589
  * @LastEditors: binruan@chatlabs.com
10294
- * @LastEditTime: 2024-03-29 16:07:28
10295
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiro\material.tsx
10590
+ * @LastEditTime: 2024-03-29 16:39:54
10591
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Commodity\material.tsx
10296
10592
  *
10297
10593
  */
10298
- const CommodityDiro = createMaterial(CommodityDiroComponent, {
10299
- displayName: '推荐单商品-白底圆角按钮',
10594
+ const Commodity = createMaterial(CommodityComponent, {
10595
+ displayName: '推荐单商品-透明底',
10300
10596
  icon: '',
10301
10597
  category: 'template',
10302
- type: 'CommodityDiro',
10598
+ type: 'Commodity',
10303
10599
  related: {
10304
- interactionRender: interactionRender$4,
10305
- settingRender: settingRender$2,
10306
- bindableProps: []
10600
+ interactionRender: interactionRender$8,
10601
+ bindableProps: [],
10602
+ settingRender: settingRender$4
10307
10603
  },
10308
10604
  defaulSetting: {
10309
10605
  props: {
@@ -10316,16 +10612,16 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
10316
10612
  },
10317
10613
  title: {
10318
10614
  fontSize: 12,
10319
- color: '#000',
10615
+ color: '#fff',
10320
10616
  textAlign: 'left'
10321
10617
  },
10322
10618
  ctaTitle: {
10323
10619
  fontSize: 10,
10324
10620
  color: '#fff',
10325
10621
  textAlign: 'center',
10326
- width: 80,
10622
+ width: 130,
10327
10623
  height: 20,
10328
- backgroundColor: 'rgba(0,0,0,1)'
10624
+ backgroundColor: 'rgba(0,0,0,.5)'
10329
10625
  }
10330
10626
  }
10331
10627
  },
@@ -10334,16 +10630,16 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
10334
10630
  width: 236,
10335
10631
  height: 74,
10336
10632
  borderRadius: 3,
10337
- backgroundColor: '#fff',
10633
+ backgroundColor: 'rgba(0,0,0,.3)',
10338
10634
  marginBottom: 8
10339
10635
  }
10340
10636
  },
10341
10637
  w: 100,
10342
10638
  h: 40,
10343
- sort: 2
10639
+ sort: 1
10344
10640
  });
10345
10641
 
10346
- var interactionRender$3 = [
10642
+ var interactionRender$7 = [
10347
10643
  {
10348
10644
  title: '点击事件',
10349
10645
  child: [
@@ -10355,171 +10651,224 @@ var interactionRender$3 = [
10355
10651
  }
10356
10652
  ];
10357
10653
 
10358
- var styles$3 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
10359
-
10360
- const CommodityDiroNew$1 = (_a) => {
10361
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
10362
- 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"]);
10654
+ const Appoint$1 = (_a) => {
10655
+ var _b, _c, _d, _e, _f, _g;
10656
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
10363
10657
  const { sxpParameter } = useSxpDataSource();
10364
- const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
10365
- 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;
10366
- return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
10367
- 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 }),
10368
- React.createElement("div", { className: css.css({
10369
- color: '#fff',
10370
- display: 'flex',
10371
- flexDirection: 'column',
10372
- justifyContent: 'center',
10373
- width: '100%',
10374
- overflow: 'hidden'
10375
- }) },
10376
- React.createElement("div", { className: styles$3['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10377
- __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)
10378
- } }),
10379
- React.createElement("div", { className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
10380
- __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)
10381
- } }))));
10658
+ const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
10659
+ 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;
10660
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' }, index: index }, props),
10661
+ 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 }),
10662
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
10663
+ __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)
10664
+ } })));
10382
10665
  };
10383
- var CommodityDiroNewComponent = React.memo(CommodityDiroNew$1);
10666
+ var AppointComponent = React.memo(Appoint$1);
10384
10667
 
10385
10668
  /*
10386
10669
  * @Author: binruan@chatlabs.com
10387
10670
  * @Date: 2023-07-28 18:29:57
10388
10671
  * @LastEditors: binruan@chatlabs.com
10389
- * @LastEditTime: 2024-04-09 11:54:27
10390
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiroNew\material.tsx
10672
+ * @LastEditTime: 2024-04-09 21:42:21
10673
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Appoint\material.tsx
10391
10674
  *
10392
10675
  */
10393
- const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
10394
- displayName: '推荐单商品-白底下划线按钮',
10676
+ const Appoint = createMaterial(AppointComponent, {
10677
+ displayName: '预约表单',
10395
10678
  icon: '',
10396
10679
  category: 'template',
10397
- type: 'CommodityDiroNew',
10680
+ type: 'Appoint',
10398
10681
  related: {
10399
- interactionRender: interactionRender$3,
10400
- bindableProps: [],
10401
- settingRender: settingRender$2
10682
+ interactionRender: interactionRender$7,
10683
+ settingRender: settingRender$4 === null || settingRender$4 === void 0 ? void 0 : settingRender$4.filter((i) => i.type !== 'commodityTitle'),
10684
+ bindableProps: []
10402
10685
  },
10403
10686
  defaulSetting: {
10404
10687
  props: {
10405
10688
  ctaTempStyles: {
10406
10689
  img: {
10407
- borderRadius: 8,
10408
- width: 78,
10409
- height: 78,
10410
- marginRight: 16
10411
- },
10412
- title: {
10413
- fontSize: 13,
10414
- color: '#000',
10415
- textAlign: 'left'
10690
+ borderRadius: 3,
10691
+ width: 30,
10692
+ height: 30,
10693
+ marginRight: 8
10416
10694
  },
10417
10695
  ctaTitle: {
10418
- textDecoration: 'underline',
10419
- fontSize: 14,
10420
- fontWeight: 'bold',
10421
- color: '#000',
10696
+ fontSize: 12,
10697
+ color: '#fff',
10422
10698
  textAlign: 'left',
10423
- width: 150,
10699
+ width: 130,
10424
10700
  height: 20
10425
10701
  }
10426
10702
  }
10427
10703
  },
10428
10704
  style: {
10429
- borderRadius: 4,
10430
- width: 260,
10431
- height: 86,
10432
- padding: 4,
10433
- backgroundColor: 'rgba(255,255,255,0.75)',
10705
+ padding: 7,
10706
+ width: 236,
10707
+ height: 44,
10708
+ borderRadius: 3,
10709
+ backgroundColor: 'rgba(0,0,0,.3)',
10434
10710
  marginBottom: 8
10435
10711
  }
10436
10712
  },
10437
10713
  w: 100,
10438
10714
  h: 40,
10439
- sort: 2
10715
+ sort: 6
10440
10716
  });
10441
10717
 
10442
- var interactionRender$2 = [
10718
+ /*
10719
+ * @Author: binruan@chatlabs.com
10720
+ * @Date: 2024-07-02 14:51:32
10721
+ * @LastEditors: binruan@chatlabs.com
10722
+ * @LastEditTime: 2024-07-02 16:44:34
10723
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
10724
+ *
10725
+ */
10726
+ var linkSettingRender = [
10443
10727
  {
10444
- title: '点击事件',
10728
+ title: '自定义标题',
10445
10729
  child: [
10446
10730
  {
10447
- type: 'link',
10448
- name: 'onClick'
10731
+ type: 'Switch',
10732
+ label: '自定义标题开关',
10733
+ name: ['props', 'customTitle', 'display']
10734
+ },
10735
+ {
10736
+ type: 'Text',
10737
+ label: '标题文案',
10738
+ name: ['props', 'customTitle', 'text']
10739
+ },
10740
+ {
10741
+ type: 'Group',
10742
+ label: '尺寸',
10743
+ child: [
10744
+ {
10745
+ type: 'Number',
10746
+ name: ['props', 'customTitle', 'style', 'width'],
10747
+ addonAfter: 'W'
10748
+ },
10749
+ {
10750
+ type: 'Number',
10751
+ name: ['props', 'customTitle', 'style', 'height'],
10752
+ addonAfter: 'H'
10753
+ }
10754
+ ]
10755
+ },
10756
+ {
10757
+ type: 'Group',
10758
+ label: '圆角',
10759
+ child: [
10760
+ {
10761
+ type: 'Slider',
10762
+ name: ['props', 'customTitle', 'style', 'borderRadius'],
10763
+ max: 100
10764
+ },
10765
+ {
10766
+ type: 'Number',
10767
+ name: ['props', 'customTitle', 'style', 'borderRadius'],
10768
+ addonAfter: 'px',
10769
+ max: 100
10770
+ }
10771
+ ]
10772
+ },
10773
+ {
10774
+ type: 'Color',
10775
+ label: '背景色',
10776
+ name: ['props', 'customTitle', 'style', 'backgroundColor']
10777
+ },
10778
+ {
10779
+ type: 'Group',
10780
+ label: '字体',
10781
+ child: [
10782
+ {
10783
+ type: 'Select',
10784
+ name: ['props', 'customTitle', 'style', 'fontFamily-cn'],
10785
+ bottomText: '中文字体'
10786
+ },
10787
+ {
10788
+ type: 'Select',
10789
+ name: ['props', 'customTitle', 'style', 'fontFamily-en'],
10790
+ bottomText: '英文/其他字体'
10791
+ }
10792
+ ]
10793
+ },
10794
+ {
10795
+ type: 'Group',
10796
+ label: '',
10797
+ child: [
10798
+ {
10799
+ type: 'Color',
10800
+ name: ['props', 'customTitle', 'style', 'color']
10801
+ },
10802
+ {
10803
+ type: 'Number',
10804
+ addonAfter: 'px',
10805
+ name: ['props', 'customTitle', 'style', 'fontSize']
10806
+ }
10807
+ ]
10808
+ },
10809
+ {
10810
+ label: '样式',
10811
+ type: 'TextStyle',
10812
+ name: ['props', 'customTitle', 'style']
10813
+ },
10814
+ {
10815
+ label: '对齐',
10816
+ type: 'TextAlign',
10817
+ name: ['props', 'customTitle', 'style']
10818
+ },
10819
+ {
10820
+ label: '上边距',
10821
+ type: 'Number',
10822
+ name: ['props', 'customTitle', 'style', 'marginTop'],
10823
+ addonAfter: 'px'
10449
10824
  }
10450
10825
  ]
10451
10826
  }
10452
10827
  ];
10453
10828
 
10454
- const Scroll = ({ children, isPadding = true }) => {
10455
- 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));
10456
- };
10457
- var Scroll$1 = React.memo(Scroll);
10458
-
10459
- var styles$2 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
10829
+ var styles$7 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
10460
10830
 
10461
- const MultiCommodityDiro$1 = (_a) => {
10462
- var _b, _c;
10463
- 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"]);
10464
- const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
10465
- const { popup } = useEditor();
10831
+ const Link$1 = (_a) => {
10832
+ var _b, _c, _d, _e, _f, _g, _h, _j;
10833
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
10834
+ const { sxpParameter, bffEventReport } = useSxpDataSource();
10466
10835
  const { jumpToWeb } = useEventReport();
10467
- const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
10468
- const handleClick = lodash.throttle((item) => {
10469
- ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10470
- eventSubject: 'clickCta',
10471
- eventDescription: 'User clicked the CTA'
10472
- }, recData, item, index);
10473
- 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 }));
10474
- if (isExternalLink) {
10475
- if (item === null || item === void 0 ? void 0 : item.link) {
10476
- jumpToWeb(recData, item, item.bindCta, index);
10477
- window.location.href = window.getJointUtmLink(item.link);
10478
- }
10479
- }
10480
- else {
10481
- onClick === null || onClick === void 0 ? void 0 : onClick();
10836
+ const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
10837
+ const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
10838
+ const handleTo = () => {
10839
+ if (cta === null || cta === void 0 ? void 0 : cta.link) {
10840
+ jumpToWeb(recData, product, cta, index);
10841
+ window.location.href = window.getJointUtmLink(cta.link);
10482
10842
  }
10483
- }, popup === null || popup === void 0 ? void 0 : popup.duration);
10484
- return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
10485
- var _a, _b, _c, _d, _e, _f, _g, _h;
10486
- 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.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
10487
- 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 }),
10488
- React.createElement("div", { className: css.css({
10489
- color: '#000',
10490
- display: 'flex',
10491
- flexDirection: 'column',
10492
- justifyContent: 'space-between',
10493
- width: '100%',
10494
- overflow: 'hidden'
10495
- }) },
10496
- React.createElement("div", { className: styles$2['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10497
- __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)
10843
+ };
10844
+ 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;
10845
+ return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
10846
+ 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 }),
10847
+ React.createElement("div", { className: css.css({
10848
+ display: 'flex',
10849
+ alignItems: 'center',
10850
+ width: '100%',
10851
+ overflow: 'hidden'
10852
+ }) },
10853
+ React.createElement("div", null,
10854
+ 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: {
10855
+ __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)
10498
10856
  } }),
10499
- React.createElement("div", { className: css.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: {
10500
- __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)
10857
+ (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: {
10858
+ __html: setFontForText(customTitle === null || customTitle === void 0 ? void 0 : customTitle.text, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style)
10501
10859
  } }))))));
10502
- })));
10503
10860
  };
10504
- var MultiCommodityDiroComponent = React.memo(MultiCommodityDiro$1);
10861
+ var LinkComponent = React.memo(Link$1);
10505
10862
 
10506
- /*
10507
- * @Author: binruan@chatlabs.com
10508
- * @Date: 2023-07-28 18:29:57
10509
- * @LastEditors: binruan@chatlabs.com
10510
- * @LastEditTime: 2024-03-29 16:27:22
10511
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiro\material.tsx
10512
- *
10513
- */
10514
- const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
10515
- displayName: '推荐多商品-白底圆角按钮',
10863
+ var _a;
10864
+ const Link = createMaterial(LinkComponent, {
10865
+ displayName: '跳转指引',
10516
10866
  icon: '',
10517
10867
  category: 'template',
10518
- type: 'MultiCommodityDiro',
10868
+ type: 'Link',
10519
10869
  related: {
10520
- interactionRender: interactionRender$2,
10521
- bindableProps: [],
10522
- settingRender: settingRender$2
10870
+ 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),
10871
+ bindableProps: []
10523
10872
  },
10524
10873
  defaulSetting: {
10525
10874
  props: {
@@ -10530,19 +10879,25 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
10530
10879
  height: 60,
10531
10880
  marginRight: 8
10532
10881
  },
10533
- title: {
10534
- fontSize: 12,
10535
- color: '#000',
10536
- textAlign: 'left'
10537
- },
10538
10882
  ctaTitle: {
10539
- fontSize: 10,
10883
+ fontSize: 12,
10540
10884
  color: '#fff',
10541
- textAlign: 'center',
10542
- width: 80,
10543
- height: 20,
10544
- backgroundColor: 'rgba(0,0,0,1)'
10885
+ textAlign: 'left',
10886
+ width: 130,
10887
+ height: 20
10545
10888
  }
10889
+ },
10890
+ customTitle: {
10891
+ style: {
10892
+ textAlign: 'left',
10893
+ textDecoration: 'underline',
10894
+ fontWeight: 'bold',
10895
+ width: 130,
10896
+ height: 20,
10897
+ fontSize: 12,
10898
+ color: '#000'
10899
+ },
10900
+ text: '探索更多'
10546
10901
  }
10547
10902
  },
10548
10903
  style: {
@@ -10550,16 +10905,16 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
10550
10905
  width: 236,
10551
10906
  height: 74,
10552
10907
  borderRadius: 3,
10553
- backgroundColor: '#fff',
10908
+ backgroundColor: 'rgba(0,0,0,.3)',
10554
10909
  marginBottom: 8
10555
10910
  }
10556
10911
  },
10557
10912
  w: 100,
10558
10913
  h: 40,
10559
- sort: 4
10914
+ sort: 5
10560
10915
  });
10561
10916
 
10562
- var interactionRender$1 = [
10917
+ var interactionRender$6 = [
10563
10918
  {
10564
10919
  title: '点击事件',
10565
10920
  child: [
@@ -10571,70 +10926,49 @@ var interactionRender$1 = [
10571
10926
  }
10572
10927
  ];
10573
10928
 
10574
- var styles$1 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
10929
+ var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
10575
10930
 
10576
- const MultiCommodity$1 = (_a) => {
10577
- var _b, _c;
10578
- 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"]);
10931
+ const CommodityDiro$1 = (_a) => {
10932
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
10933
+ 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"]);
10579
10934
  const { sxpParameter } = useSxpDataSource();
10580
- const { ctaEvent, setPopupDetailData } = useSxpDataSource();
10581
- const { popup } = useEditor();
10582
- const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
10583
- const { jumpToWeb } = useEventReport();
10584
- const handleClick = lodash.throttle((item) => {
10585
- ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
10586
- eventSubject: 'clickCta',
10587
- eventDescription: 'User clicked the CTA'
10588
- }, recData, item, index);
10589
- 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 }));
10590
- if (isExternalLink) {
10591
- if (item === null || item === void 0 ? void 0 : item.link) {
10592
- jumpToWeb(recData, item, item.bindCta, index);
10593
- window.location.href = window.getJointUtmLink(item.link);
10594
- }
10595
- }
10596
- else {
10597
- onClick === null || onClick === void 0 ? void 0 : onClick();
10598
- }
10599
- }, popup === null || popup === void 0 ? void 0 : popup.duration);
10600
- return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
10601
- var _a, _b, _c, _d, _e, _f, _g, _h;
10602
- 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.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
10603
- 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 }),
10604
- React.createElement("div", { className: css.css({
10605
- color: '#fff',
10606
- display: 'flex',
10607
- flexDirection: 'column',
10608
- justifyContent: 'space-between',
10609
- width: '100%',
10610
- overflow: 'hidden'
10611
- }) },
10612
- React.createElement("div", { className: styles$1['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10613
- __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)
10614
- } }),
10615
- React.createElement("div", { className: css.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: {
10616
- __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)
10617
- } }))))));
10618
- })));
10619
- };
10620
- var MultiCommodityComponent = React.memo(MultiCommodity$1);
10621
-
10622
- /*
10623
- * @Author: binruan@chatlabs.com
10935
+ const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
10936
+ 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;
10937
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
10938
+ 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 }),
10939
+ React.createElement("div", { className: css.css({
10940
+ color: '#fff',
10941
+ display: 'flex',
10942
+ flexDirection: 'column',
10943
+ justifyContent: 'space-between',
10944
+ width: '100%',
10945
+ overflow: 'hidden'
10946
+ }) },
10947
+ React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10948
+ __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)
10949
+ } }),
10950
+ React.createElement("div", { className: css.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: {
10951
+ __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)
10952
+ } }))));
10953
+ };
10954
+ var CommodityDiroComponent = React.memo(CommodityDiro$1);
10955
+
10956
+ /*
10957
+ * @Author: binruan@chatlabs.com
10624
10958
  * @Date: 2023-07-28 18:29:57
10625
10959
  * @LastEditors: binruan@chatlabs.com
10626
- * @LastEditTime: 2024-03-29 16:43:35
10627
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodity\material.tsx
10960
+ * @LastEditTime: 2024-03-29 16:07:28
10961
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiro\material.tsx
10628
10962
  *
10629
10963
  */
10630
- const MultiCommodity = createMaterial(MultiCommodityComponent, {
10631
- displayName: '推荐多商品-透明底',
10964
+ const CommodityDiro = createMaterial(CommodityDiroComponent, {
10965
+ displayName: '推荐单商品-白底圆角按钮',
10632
10966
  icon: '',
10633
10967
  category: 'template',
10634
- type: 'MultiCommodity',
10968
+ type: 'CommodityDiro',
10635
10969
  related: {
10636
- interactionRender: interactionRender$1,
10637
- settingRender: settingRender$2,
10970
+ interactionRender: interactionRender$6,
10971
+ settingRender: settingRender$4,
10638
10972
  bindableProps: []
10639
10973
  },
10640
10974
  defaulSetting: {
@@ -10648,16 +10982,16 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
10648
10982
  },
10649
10983
  title: {
10650
10984
  fontSize: 12,
10651
- color: '#fff',
10985
+ color: '#000',
10652
10986
  textAlign: 'left'
10653
10987
  },
10654
10988
  ctaTitle: {
10655
10989
  fontSize: 10,
10656
10990
  color: '#fff',
10657
10991
  textAlign: 'center',
10658
- width: 130,
10992
+ width: 80,
10659
10993
  height: 20,
10660
- backgroundColor: 'rgba(0,0,0,.5)'
10994
+ backgroundColor: 'rgba(0,0,0,1)'
10661
10995
  }
10662
10996
  }
10663
10997
  },
@@ -10666,16 +11000,16 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
10666
11000
  width: 236,
10667
11001
  height: 74,
10668
11002
  borderRadius: 3,
10669
- backgroundColor: 'rgba(0,0,0,.3)',
11003
+ backgroundColor: '#fff',
10670
11004
  marginBottom: 8
10671
11005
  }
10672
11006
  },
10673
11007
  w: 100,
10674
11008
  h: 40,
10675
- sort: 3
11009
+ sort: 2
10676
11010
  });
10677
11011
 
10678
- var interactionRender = [
11012
+ var interactionRender$5 = [
10679
11013
  {
10680
11014
  title: '点击事件',
10681
11015
  child: [
@@ -10687,9 +11021,105 @@ var interactionRender = [
10687
11021
  }
10688
11022
  ];
10689
11023
 
10690
- var styles = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
11024
+ var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
10691
11025
 
10692
- const MultiCommodityDiroNew$1 = (_a) => {
11026
+ const CommodityDiroNew$1 = (_a) => {
11027
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
11028
+ 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"]);
11029
+ const { sxpParameter } = useSxpDataSource();
11030
+ const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
11031
+ 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;
11032
+ return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
11033
+ 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 }),
11034
+ React.createElement("div", { className: css.css({
11035
+ color: '#fff',
11036
+ display: 'flex',
11037
+ flexDirection: 'column',
11038
+ justifyContent: 'center',
11039
+ width: '100%',
11040
+ overflow: 'hidden'
11041
+ }) },
11042
+ React.createElement("div", { className: styles$5['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
11043
+ __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)
11044
+ } }),
11045
+ React.createElement("div", { className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
11046
+ __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)
11047
+ } }))));
11048
+ };
11049
+ var CommodityDiroNewComponent = React.memo(CommodityDiroNew$1);
11050
+
11051
+ /*
11052
+ * @Author: binruan@chatlabs.com
11053
+ * @Date: 2023-07-28 18:29:57
11054
+ * @LastEditors: binruan@chatlabs.com
11055
+ * @LastEditTime: 2024-04-09 11:54:27
11056
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiroNew\material.tsx
11057
+ *
11058
+ */
11059
+ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
11060
+ displayName: '推荐单商品-白底下划线按钮',
11061
+ icon: '',
11062
+ category: 'template',
11063
+ type: 'CommodityDiroNew',
11064
+ related: {
11065
+ interactionRender: interactionRender$5,
11066
+ bindableProps: [],
11067
+ settingRender: settingRender$4
11068
+ },
11069
+ defaulSetting: {
11070
+ props: {
11071
+ ctaTempStyles: {
11072
+ img: {
11073
+ borderRadius: 8,
11074
+ width: 78,
11075
+ height: 78,
11076
+ marginRight: 16
11077
+ },
11078
+ title: {
11079
+ fontSize: 13,
11080
+ color: '#000',
11081
+ textAlign: 'left'
11082
+ },
11083
+ ctaTitle: {
11084
+ textDecoration: 'underline',
11085
+ fontSize: 14,
11086
+ fontWeight: 'bold',
11087
+ color: '#000',
11088
+ textAlign: 'left',
11089
+ width: 150,
11090
+ height: 20
11091
+ }
11092
+ }
11093
+ },
11094
+ style: {
11095
+ borderRadius: 4,
11096
+ width: 260,
11097
+ height: 86,
11098
+ padding: 4,
11099
+ backgroundColor: 'rgba(255,255,255,0.75)',
11100
+ marginBottom: 8
11101
+ }
11102
+ },
11103
+ w: 100,
11104
+ h: 40,
11105
+ sort: 2
11106
+ });
11107
+
11108
+ var interactionRender$4 = [
11109
+ {
11110
+ title: '点击事件',
11111
+ child: [
11112
+ {
11113
+ type: 'link',
11114
+ name: 'onClick'
11115
+ }
11116
+ ]
11117
+ }
11118
+ ];
11119
+
11120
+ var styles$4 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
11121
+
11122
+ const MultiCommodityDiro$1 = (_a) => {
10693
11123
  var _b, _c;
10694
11124
  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"]);
10695
11125
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
@@ -10712,55 +11142,54 @@ const MultiCommodityDiroNew$1 = (_a) => {
10712
11142
  onClick === null || onClick === void 0 ? void 0 : onClick();
10713
11143
  }
10714
11144
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
10715
- return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
10716
- var _a, _b, _c, _d, _e, _f, _g;
10717
- 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.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
11145
+ return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, index) => {
11146
+ var _a, _b, _c, _d, _e, _f, _g, _h;
11147
+ 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.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
10718
11148
  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 }),
10719
11149
  React.createElement("div", { className: css.css({
10720
- color: '#fff',
11150
+ color: '#000',
10721
11151
  display: 'flex',
10722
11152
  flexDirection: 'column',
10723
- justifyContent: 'center',
11153
+ justifyContent: 'space-between',
10724
11154
  width: '100%',
10725
- overflow: 'hidden',
10726
- lineHeight: '20px'
11155
+ overflow: 'hidden'
10727
11156
  }) },
10728
- React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
11157
+ React.createElement("div", { className: styles$4['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
10729
11158
  __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)
10730
11159
  } }),
10731
- React.createElement("div", { className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
10732
- __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)
11160
+ React.createElement("div", { className: css.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: {
11161
+ __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)
10733
11162
  } }))))));
10734
11163
  })));
10735
11164
  };
10736
- var MultiCommodityDiroNewComponent = React.memo(MultiCommodityDiroNew$1);
11165
+ var MultiCommodityDiroComponent = React.memo(MultiCommodityDiro$1);
10737
11166
 
10738
11167
  /*
10739
11168
  * @Author: binruan@chatlabs.com
10740
11169
  * @Date: 2023-07-28 18:29:57
10741
11170
  * @LastEditors: binruan@chatlabs.com
10742
- * @LastEditTime: 2024-05-21 16:44:00
10743
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\material.tsx
11171
+ * @LastEditTime: 2024-03-29 16:27:22
11172
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiro\material.tsx
10744
11173
  *
10745
11174
  */
10746
- const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
10747
- displayName: '推荐多商品-白底下划线按钮',
11175
+ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
11176
+ displayName: '推荐多商品-白底圆角按钮',
10748
11177
  icon: '',
10749
11178
  category: 'template',
10750
- type: 'MultiCommodityDiroNew',
11179
+ type: 'MultiCommodityDiro',
10751
11180
  related: {
10752
- interactionRender,
11181
+ interactionRender: interactionRender$4,
10753
11182
  bindableProps: [],
10754
- settingRender: settingRender$2
11183
+ settingRender: settingRender$4
10755
11184
  },
10756
11185
  defaulSetting: {
10757
11186
  props: {
10758
11187
  ctaTempStyles: {
10759
11188
  img: {
10760
- borderRadius: 8,
10761
- width: 78,
10762
- height: 78,
10763
- marginRight: 16
11189
+ borderRadius: 3,
11190
+ width: 60,
11191
+ height: 60,
11192
+ marginRight: 8
10764
11193
  },
10765
11194
  title: {
10766
11195
  fontSize: 12,
@@ -10768,22 +11197,21 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
10768
11197
  textAlign: 'left'
10769
11198
  },
10770
11199
  ctaTitle: {
10771
- textDecoration: 'underline',
10772
- fontSize: 12,
10773
- fontWeight: 'bold',
10774
- color: '#000',
10775
- textAlign: 'left',
10776
- width: 150,
10777
- height: 20
11200
+ fontSize: 10,
11201
+ color: '#fff',
11202
+ textAlign: 'center',
11203
+ width: 80,
11204
+ height: 20,
11205
+ backgroundColor: 'rgba(0,0,0,1)'
10778
11206
  }
10779
11207
  }
10780
11208
  },
10781
11209
  style: {
10782
- borderRadius: 4,
10783
- width: 260,
10784
- height: 86,
10785
- padding: 4,
10786
- backgroundColor: 'rgba(255,255,255,0.75)',
11210
+ padding: 7,
11211
+ width: 236,
11212
+ height: 74,
11213
+ borderRadius: 3,
11214
+ backgroundColor: '#fff',
10787
11215
  marginBottom: 8
10788
11216
  }
10789
11217
  },
@@ -10792,42 +11220,276 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
10792
11220
  sort: 4
10793
11221
  });
10794
11222
 
10795
- /*
10796
- * @Author: binruan@chatlabs.com
10797
- * @Date: 2024-04-07 14:07:12
10798
- * @LastEditors: binruan@chatlabs.com
10799
- * @LastEditTime: 2024-06-27 09:49:19
10800
- * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
10801
- *
10802
- */
10803
- var settingRender$1 = [
11223
+ var interactionRender$3 = [
10804
11224
  {
10805
- title: 'Banner',
11225
+ title: '点击事件',
10806
11226
  child: [
10807
11227
  {
10808
- type: 'Switch',
10809
- label: 'Banner图开关',
10810
- name: ['props', 'showBanner']
11228
+ type: 'link',
11229
+ name: 'onClick'
10811
11230
  }
10812
11231
  ]
10813
- },
10814
- {
10815
- title: '卡片样式',
10816
- child: [
10817
- {
10818
- type: 'Number',
10819
- label: '上下边距',
10820
- name: ['props', 'space'],
10821
- addonAfter: 'px'
10822
- },
10823
- {
10824
- type: 'Switch',
10825
- label: '固定宽高',
10826
- name: ['props', 'openFixedSize'],
10827
- initialValue: true
11232
+ }
11233
+ ];
11234
+
11235
+ var styles$3 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
11236
+
11237
+ const MultiCommodity$1 = (_a) => {
11238
+ var _b, _c;
11239
+ 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"]);
11240
+ const { sxpParameter } = useSxpDataSource();
11241
+ const { ctaEvent, setPopupDetailData } = useSxpDataSource();
11242
+ const { popup } = useEditor();
11243
+ const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
11244
+ const { jumpToWeb } = useEventReport();
11245
+ const handleClick = lodash.throttle((item) => {
11246
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
11247
+ eventSubject: 'clickCta',
11248
+ eventDescription: 'User clicked the CTA'
11249
+ }, recData, item, index);
11250
+ 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 }));
11251
+ if (isExternalLink) {
11252
+ if (item === null || item === void 0 ? void 0 : item.link) {
11253
+ jumpToWeb(recData, item, item.bindCta, index);
11254
+ window.location.href = window.getJointUtmLink(item.link);
10828
11255
  }
10829
- ]
10830
- },
11256
+ }
11257
+ else {
11258
+ onClick === null || onClick === void 0 ? void 0 : onClick();
11259
+ }
11260
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
11261
+ return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, index) => {
11262
+ var _a, _b, _c, _d, _e, _f, _g, _h;
11263
+ 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.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
11264
+ 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 }),
11265
+ React.createElement("div", { className: css.css({
11266
+ color: '#fff',
11267
+ display: 'flex',
11268
+ flexDirection: 'column',
11269
+ justifyContent: 'space-between',
11270
+ width: '100%',
11271
+ overflow: 'hidden'
11272
+ }) },
11273
+ React.createElement("div", { className: styles$3['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
11274
+ __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)
11275
+ } }),
11276
+ React.createElement("div", { className: css.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: {
11277
+ __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)
11278
+ } }))))));
11279
+ })));
11280
+ };
11281
+ var MultiCommodityComponent = React.memo(MultiCommodity$1);
11282
+
11283
+ /*
11284
+ * @Author: binruan@chatlabs.com
11285
+ * @Date: 2023-07-28 18:29:57
11286
+ * @LastEditors: binruan@chatlabs.com
11287
+ * @LastEditTime: 2024-03-29 16:43:35
11288
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodity\material.tsx
11289
+ *
11290
+ */
11291
+ const MultiCommodity = createMaterial(MultiCommodityComponent, {
11292
+ displayName: '推荐多商品-透明底',
11293
+ icon: '',
11294
+ category: 'template',
11295
+ type: 'MultiCommodity',
11296
+ related: {
11297
+ interactionRender: interactionRender$3,
11298
+ settingRender: settingRender$4,
11299
+ bindableProps: []
11300
+ },
11301
+ defaulSetting: {
11302
+ props: {
11303
+ ctaTempStyles: {
11304
+ img: {
11305
+ borderRadius: 3,
11306
+ width: 60,
11307
+ height: 60,
11308
+ marginRight: 8
11309
+ },
11310
+ title: {
11311
+ fontSize: 12,
11312
+ color: '#fff',
11313
+ textAlign: 'left'
11314
+ },
11315
+ ctaTitle: {
11316
+ fontSize: 10,
11317
+ color: '#fff',
11318
+ textAlign: 'center',
11319
+ width: 130,
11320
+ height: 20,
11321
+ backgroundColor: 'rgba(0,0,0,.5)'
11322
+ }
11323
+ }
11324
+ },
11325
+ style: {
11326
+ padding: 7,
11327
+ width: 236,
11328
+ height: 74,
11329
+ borderRadius: 3,
11330
+ backgroundColor: 'rgba(0,0,0,.3)',
11331
+ marginBottom: 8
11332
+ }
11333
+ },
11334
+ w: 100,
11335
+ h: 40,
11336
+ sort: 3
11337
+ });
11338
+
11339
+ var interactionRender$2 = [
11340
+ {
11341
+ title: '点击事件',
11342
+ child: [
11343
+ {
11344
+ type: 'link',
11345
+ name: 'onClick'
11346
+ }
11347
+ ]
11348
+ }
11349
+ ];
11350
+
11351
+ var styles$2 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
11352
+
11353
+ const MultiCommodityDiroNew$1 = (_a) => {
11354
+ var _b, _c;
11355
+ 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"]);
11356
+ const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
11357
+ const { popup } = useEditor();
11358
+ const { jumpToWeb } = useEventReport();
11359
+ const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
11360
+ const handleClick = lodash.throttle((item, multiCheckIndex) => {
11361
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
11362
+ eventSubject: 'clickCta',
11363
+ eventDescription: 'User clicked the CTA'
11364
+ }, recData, item, index);
11365
+ 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,
11366
+ multiCheckIndex }));
11367
+ if (isExternalLink) {
11368
+ if (item === null || item === void 0 ? void 0 : item.link) {
11369
+ jumpToWeb(recData, item, item.bindCta, index);
11370
+ window.location.href = window.getJointUtmLink(item.link);
11371
+ }
11372
+ }
11373
+ else {
11374
+ onClick === null || onClick === void 0 ? void 0 : onClick();
11375
+ }
11376
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
11377
+ return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, index) => {
11378
+ var _a, _b, _c, _d, _e, _f, _g;
11379
+ 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.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item, index) }),
11380
+ 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 }),
11381
+ React.createElement("div", { className: css.css({
11382
+ color: '#fff',
11383
+ display: 'flex',
11384
+ flexDirection: 'column',
11385
+ justifyContent: 'center',
11386
+ width: '100%',
11387
+ overflow: 'hidden',
11388
+ lineHeight: '20px'
11389
+ }) },
11390
+ React.createElement("div", { className: styles$2['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
11391
+ __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)
11392
+ } }),
11393
+ React.createElement("div", { className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
11394
+ __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)
11395
+ } }))))));
11396
+ })));
11397
+ };
11398
+ var MultiCommodityDiroNewComponent = React.memo(MultiCommodityDiroNew$1);
11399
+
11400
+ /*
11401
+ * @Author: binruan@chatlabs.com
11402
+ * @Date: 2023-07-28 18:29:57
11403
+ * @LastEditors: binruan@chatlabs.com
11404
+ * @LastEditTime: 2024-05-21 16:44:00
11405
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\material.tsx
11406
+ *
11407
+ */
11408
+ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
11409
+ displayName: '推荐多商品-白底下划线按钮',
11410
+ icon: '',
11411
+ category: 'template',
11412
+ type: 'MultiCommodityDiroNew',
11413
+ related: {
11414
+ interactionRender: interactionRender$2,
11415
+ bindableProps: [],
11416
+ settingRender: settingRender$4
11417
+ },
11418
+ defaulSetting: {
11419
+ props: {
11420
+ ctaTempStyles: {
11421
+ img: {
11422
+ borderRadius: 8,
11423
+ width: 78,
11424
+ height: 78,
11425
+ marginRight: 16
11426
+ },
11427
+ title: {
11428
+ fontSize: 12,
11429
+ color: '#000',
11430
+ textAlign: 'left'
11431
+ },
11432
+ ctaTitle: {
11433
+ textDecoration: 'underline',
11434
+ fontSize: 12,
11435
+ fontWeight: 'bold',
11436
+ color: '#000',
11437
+ textAlign: 'left',
11438
+ width: 150,
11439
+ height: 20
11440
+ }
11441
+ }
11442
+ },
11443
+ style: {
11444
+ borderRadius: 4,
11445
+ width: 260,
11446
+ height: 86,
11447
+ padding: 4,
11448
+ backgroundColor: 'rgba(255,255,255,0.75)',
11449
+ marginBottom: 8
11450
+ }
11451
+ },
11452
+ w: 100,
11453
+ h: 40,
11454
+ sort: 4
11455
+ });
11456
+
11457
+ /*
11458
+ * @Author: binruan@chatlabs.com
11459
+ * @Date: 2024-04-07 14:07:12
11460
+ * @LastEditors: binruan@chatlabs.com
11461
+ * @LastEditTime: 2024-06-27 09:49:19
11462
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
11463
+ *
11464
+ */
11465
+ var settingRender$3 = [
11466
+ {
11467
+ title: 'Banner',
11468
+ child: [
11469
+ {
11470
+ type: 'Switch',
11471
+ label: 'Banner图开关',
11472
+ name: ['props', 'showBanner']
11473
+ }
11474
+ ]
11475
+ },
11476
+ {
11477
+ title: '卡片样式',
11478
+ child: [
11479
+ {
11480
+ type: 'Number',
11481
+ label: '上下边距',
11482
+ name: ['props', 'space'],
11483
+ addonAfter: 'px'
11484
+ },
11485
+ {
11486
+ type: 'Switch',
11487
+ label: '固定宽高',
11488
+ name: ['props', 'openFixedSize'],
11489
+ initialValue: true
11490
+ }
11491
+ ]
11492
+ },
10831
11493
  {
10832
11494
  title: '文本设置',
10833
11495
  child: [
@@ -11017,7 +11679,7 @@ var settingRender$1 = [
11017
11679
  * @Author: binruan@chatlabs.com
11018
11680
  * @Date: 2023-12-26 16:11:34
11019
11681
  * @LastEditors: binruan@chatlabs.com
11020
- * @LastEditTime: 2024-07-04 18:34:18
11682
+ * @LastEditTime: 2024-06-27 10:19:28
11021
11683
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Navbar.tsx
11022
11684
  *
11023
11685
  */
@@ -11026,7 +11688,7 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
11026
11688
  const { waterFallData, setOpenHashtag } = useSxpDataSource();
11027
11689
  return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
11028
11690
  React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: 'back button', onClick: onClose }),
11029
- 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: {
11691
+ React.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle, dangerouslySetInnerHTML: {
11030
11692
  __html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
11031
11693
  } })));
11032
11694
  };
@@ -12621,7 +13283,7 @@ function WaterfallList$1(_a) {
12621
13283
  var _a, _b;
12622
13284
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
12623
13285
  reportTagsView();
12624
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
13286
+ window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
12625
13287
  }
12626
13288
  };
12627
13289
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -12856,7 +13518,7 @@ function WaterfallList(_a) {
12856
13518
  var _a, _b;
12857
13519
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
12858
13520
  reportTagsView();
12859
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
13521
+ window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
12860
13522
  }
12861
13523
  };
12862
13524
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -13009,7 +13671,7 @@ var HashTagComponent = React.memo(HashTag$1);
13009
13671
  * @Author: binruan@chatlabs.com
13010
13672
  * @Date: 2023-07-28 18:29:57
13011
13673
  * @LastEditors: binruan@chatlabs.com
13012
- * @LastEditTime: 2024-07-04 18:38:10
13674
+ * @LastEditTime: 2024-04-30 10:13:13
13013
13675
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\material.tsx
13014
13676
  *
13015
13677
  */
@@ -13019,7 +13681,7 @@ const HashTag = createMaterial(HashTagComponent, {
13019
13681
  category: 'base',
13020
13682
  type: 'HashTag',
13021
13683
  related: {
13022
- settingRender: settingRender$1,
13684
+ settingRender: settingRender$3,
13023
13685
  bindableProps: []
13024
13686
  },
13025
13687
  defaulSetting: {
@@ -13029,8 +13691,7 @@ const HashTag = createMaterial(HashTagComponent, {
13029
13691
  textStyles: {
13030
13692
  hashTagTitle: {
13031
13693
  fontSize: 16,
13032
- color: '#000',
13033
- textAlign: 'center'
13694
+ color: '#000'
13034
13695
  },
13035
13696
  hashTagDesc: {
13036
13697
  fontSize: 12,
@@ -13053,106 +13714,805 @@ const HashTag = createMaterial(HashTagComponent, {
13053
13714
  color: '#000'
13054
13715
  }
13055
13716
  },
13056
- buttonStyle: {
13057
- backgroundColor: '#000',
13058
- fontSize: 12,
13059
- height: 52,
13060
- fontWeight: 'bold',
13061
- textAlign: 'center',
13062
- color: '#fff',
13063
- borderRadius: 25
13717
+ buttonStyle: {
13718
+ backgroundColor: '#000',
13719
+ fontSize: 12,
13720
+ height: 52,
13721
+ fontWeight: 'bold',
13722
+ textAlign: 'center',
13723
+ color: '#fff',
13724
+ borderRadius: 25
13725
+ },
13726
+ buttonBgStyle: {
13727
+ backgroundColor: '#fff',
13728
+ height: 52,
13729
+ paddingTop: 20,
13730
+ paddingLeft: 20,
13731
+ paddingRight: 20,
13732
+ paddingBottom: 20
13733
+ }
13734
+ }
13735
+ },
13736
+ w: 100,
13737
+ h: 40,
13738
+ sort: 2
13739
+ });
13740
+
13741
+ /*
13742
+ * @Author: binruan@chatlabs.com
13743
+ * @Date: 2024-06-13 10:08:32
13744
+ * @LastEditors: binruan@chatlabs.com
13745
+ * @LastEditTime: 2024-06-13 17:42:50
13746
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\settingRender.tsx
13747
+ *
13748
+ */
13749
+ var settingRender$2 = [
13750
+ {
13751
+ title: '协议详情',
13752
+ child: [
13753
+ {
13754
+ type: 'Switch',
13755
+ label: '必须同意用户协议',
13756
+ name: ['props', 'privacy_necessity'],
13757
+ extra: '当新用户进入页面时,会出现用户协议弹窗,用户需要先同意协议后才能访问内容。'
13758
+ },
13759
+ {
13760
+ type: 'Text',
13761
+ label: '弹窗标题',
13762
+ name: ['props', 'privacy_title']
13763
+ },
13764
+ {
13765
+ type: 'TextArea',
13766
+ label: '用户协议弹窗内容',
13767
+ name: ['props', 'privacy_context']
13768
+ },
13769
+ {
13770
+ type: 'Group',
13771
+ label: '隐私政策',
13772
+ child: [
13773
+ {
13774
+ type: 'Text',
13775
+ name: ['props', 'privacy_policy_title']
13776
+ },
13777
+ {
13778
+ type: 'Text',
13779
+ name: ['props', 'privacy_policy_url'],
13780
+ addonBefore: 'https://'
13781
+ }
13782
+ ],
13783
+ extra: '当用户点击更多信息按钮时,将会跳转至设置的链接查看政策内容'
13784
+ }
13785
+ ]
13786
+ }
13787
+ ];
13788
+
13789
+ const Consent$1 = (props) => {
13790
+ return React.createElement(Consent$1, Object.assign({}, props));
13791
+ };
13792
+ var ConsentComponent = React.memo(Consent$1);
13793
+
13794
+ /*
13795
+ * @Author: binruan@chatlabs.com
13796
+ * @Date: 2023-07-28 18:29:57
13797
+ * @LastEditors: binruan@chatlabs.com
13798
+ * @LastEditTime: 2024-07-03 15:43:24
13799
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\material.tsx
13800
+ *
13801
+ */
13802
+ const Consent = createMaterial(ConsentComponent, {
13803
+ displayName: 'Consent',
13804
+ icon: '',
13805
+ category: 'base',
13806
+ type: 'Consent',
13807
+ related: {
13808
+ settingRender: settingRender$2
13809
+ },
13810
+ defaulSetting: {
13811
+ props: {},
13812
+ style: {}
13813
+ },
13814
+ w: 100,
13815
+ h: 40,
13816
+ sort: 1
13817
+ });
13818
+
13819
+ /*
13820
+ * @Author: binruan@chatlabs.com
13821
+ * @Date: 2024-07-02 14:51:32
13822
+ * @LastEditors: binruan@chatlabs.com
13823
+ * @LastEditTime: 2024-07-05 19:09:41
13824
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\settingRender.tsx
13825
+ *
13826
+ */
13827
+ var settingRender$1 = [
13828
+ {
13829
+ title: '主题样式',
13830
+ child: [
13831
+ {
13832
+ type: 'Group',
13833
+ label: '尺寸',
13834
+ child: [
13835
+ {
13836
+ type: 'Number',
13837
+ name: ['style', 'width'],
13838
+ addonAfter: 'W'
13839
+ },
13840
+ {
13841
+ type: 'Number',
13842
+ name: ['style', 'height'],
13843
+ addonAfter: 'H'
13844
+ }
13845
+ ]
13846
+ },
13847
+ {
13848
+ type: 'Group',
13849
+ label: '圆角',
13850
+ child: [
13851
+ {
13852
+ type: 'Slider',
13853
+ name: ['style', 'borderRadius'],
13854
+ max: 100
13855
+ },
13856
+ {
13857
+ type: 'Number',
13858
+ name: ['style', 'borderRadius'],
13859
+ addonAfter: 'px',
13860
+ max: 100
13861
+ }
13862
+ ]
13863
+ },
13864
+ {
13865
+ type: 'Color',
13866
+ label: '背景色',
13867
+ name: ['style', 'backgroundColor']
13868
+ },
13869
+ {
13870
+ type: 'TextMargin',
13871
+ name: ['style'],
13872
+ label: '上下边距',
13873
+ direction: 'vertical'
13874
+ },
13875
+ {
13876
+ type: 'TextPadding',
13877
+ name: ['style'],
13878
+ label: '内边距',
13879
+ direction: 'horizontal'
13880
+ }
13881
+ ]
13882
+ },
13883
+ {
13884
+ title: 'CTA标题',
13885
+ child: [
13886
+ {
13887
+ type: 'Group',
13888
+ label: '字体',
13889
+ child: [
13890
+ {
13891
+ type: 'Select',
13892
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-cn'],
13893
+ bottomText: '中文字体'
13894
+ },
13895
+ {
13896
+ type: 'Select',
13897
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-en'],
13898
+ bottomText: '英文/其他字体'
13899
+ }
13900
+ ]
13901
+ },
13902
+ {
13903
+ type: 'Group',
13904
+ label: '',
13905
+ child: [
13906
+ {
13907
+ type: 'Color',
13908
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
13909
+ },
13910
+ {
13911
+ type: 'Number',
13912
+ addonAfter: 'px',
13913
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
13914
+ }
13915
+ ]
13916
+ },
13917
+ {
13918
+ label: '样式',
13919
+ type: 'TextStyle',
13920
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
13921
+ },
13922
+ {
13923
+ label: '对齐',
13924
+ type: 'TextAlign',
13925
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
13926
+ }
13927
+ ]
13928
+ }
13929
+ ];
13930
+
13931
+ var styles$1 = {"animated-button":"index-module_animated-button__lqTbg","gradientCover":"index-module_gradientCover__5iUag"};
13932
+
13933
+ const AniLink$1 = (_a) => {
13934
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
13935
+ var { style, recData, ctaTempStyles, index, event, onClick, isExternalLink = false } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "onClick", "isExternalLink"]);
13936
+ const { ctaEvent } = useSxpDataSource();
13937
+ const { jumpToWeb } = useEventReport();
13938
+ const ref = React.useRef(null);
13939
+ const isOnScreen = useOnScreen(ref);
13940
+ 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);
13941
+ 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);
13942
+ const handleTo = () => {
13943
+ var _a, _b, _c;
13944
+ 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);
13945
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
13946
+ eventSubject: 'clickCta',
13947
+ eventDescription: 'User clicked the CTA'
13948
+ }, recData, item, index);
13949
+ if (isExternalLink) {
13950
+ jumpToWeb(recData, product, cta, index);
13951
+ }
13952
+ onClick === null || onClick === void 0 ? void 0 : onClick();
13953
+ };
13954
+ const title = (cta === null || cta === void 0 ? void 0 : cta.title) || '查看详情 >';
13955
+ const aniStyle = React.useMemo(() => {
13956
+ var _a, _b;
13957
+ const ani = event === null || event === void 0 ? void 0 : event.animation;
13958
+ if (ani) {
13959
+ const { delay, duration, backgroundColor } = ani;
13960
+ return {
13961
+ ':after': {
13962
+ animationDelay: `${(_a = delay / 1000) !== null && _a !== void 0 ? _a : 0}s`,
13963
+ animationDuration: `${(_b = duration / 1000) !== null && _b !== void 0 ? _b : 0}s`,
13964
+ backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'transparent'}`
13965
+ }
13966
+ };
13967
+ }
13968
+ }, [event === null || event === void 0 ? void 0 : event.animation]);
13969
+ React.useEffect(() => {
13970
+ if (isOnScreen && (ref === null || ref === void 0 ? void 0 : ref.current)) {
13971
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
13972
+ eventSubject: 'ctaExposure',
13973
+ eventDescription: 'The cta was shown to the user'
13974
+ }, recData, product, index);
13975
+ }
13976
+ }, [isOnScreen]);
13977
+ 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.css(aniStyle)}`, onClick: handleTo }),
13978
+ React.createElement("div", { className: 'one-line-ellipsis', style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
13979
+ __html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
13980
+ } })));
13981
+ };
13982
+ var AniLinkComponent = React.memo(AniLink$1);
13983
+
13984
+ /*
13985
+ * @Author: binruan@chatlabs.com
13986
+ * @Date: 2024-07-05 14:08:41
13987
+ * @LastEditors: binruan@chatlabs.com
13988
+ * @LastEditTime: 2024-07-09 14:34:49
13989
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
13990
+ *
13991
+ */
13992
+ var interactionRender$1 = [
13993
+ {
13994
+ title: '点击事件',
13995
+ child: [
13996
+ {
13997
+ type: 'link',
13998
+ name: 'onClick'
13999
+ }
14000
+ ]
14001
+ },
14002
+ {
14003
+ title: '动画效果',
14004
+ child: [
14005
+ {
14006
+ type: 'Color',
14007
+ name: ['animation', 'backgroundColor'],
14008
+ label: '动画颜色'
14009
+ },
14010
+ {
14011
+ type: 'Select',
14012
+ name: ['animation', 'name'],
14013
+ label: '动画',
14014
+ options: [
14015
+ {
14016
+ label: '由左向右/中间扩散',
14017
+ value: 1
14018
+ }
14019
+ ],
14020
+ initialValue: 1,
14021
+ fieldProps: {
14022
+ style: {
14023
+ width: '100%'
14024
+ }
14025
+ }
14026
+ },
14027
+ {
14028
+ type: 'Number',
14029
+ label: '动画启动时间',
14030
+ name: ['animation', 'delay'],
14031
+ addonAfter: 'ms'
14032
+ },
14033
+ {
14034
+ type: 'Number',
14035
+ label: '动画持续时间',
14036
+ name: ['animation', 'duration'],
14037
+ addonAfter: 'ms'
14038
+ }
14039
+ ]
14040
+ }
14041
+ ];
14042
+
14043
+ /*
14044
+ * @Author: binruan@chatlabs.com
14045
+ * @Date: 2023-07-28 18:29:57
14046
+ * @LastEditors: binruan@chatlabs.com
14047
+ * @LastEditTime: 2024-07-05 19:27:54
14048
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\material.tsx
14049
+ *
14050
+ */
14051
+ const AniLink = createMaterial(AniLinkComponent, {
14052
+ displayName: '纯色动效CTA',
14053
+ icon: '',
14054
+ category: 'cta',
14055
+ type: 'AniLink',
14056
+ related: {
14057
+ settingRender: settingRender$1,
14058
+ bindableProps: [],
14059
+ interactionRender: interactionRender$1
14060
+ },
14061
+ defaulSetting: {
14062
+ props: {
14063
+ ctaTempStyles: {
14064
+ ctaTitle: {
14065
+ fontSize: 15,
14066
+ color: '#fff',
14067
+ textAlign: 'left'
14068
+ }
14069
+ }
14070
+ },
14071
+ style: {
14072
+ width: 236,
14073
+ height: 44,
14074
+ borderRadius: 3,
14075
+ backgroundColor: 'rgba(0,0,0,.3)',
14076
+ paddingLeft: 7,
14077
+ paddingRight: 7
14078
+ }
14079
+ },
14080
+ w: 100,
14081
+ h: 40,
14082
+ sort: 1
14083
+ });
14084
+
14085
+ /*
14086
+ * @Author: binruan@chatlabs.com
14087
+ * @Date: 2024-03-26 16:50:25
14088
+ * @LastEditors: binruan@chatlabs.com
14089
+ * @LastEditTime: 2024-07-08 11:01:24
14090
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\settingRender.tsx
14091
+ *
14092
+ */
14093
+ var settingRender = [
14094
+ {
14095
+ title: '主题样式',
14096
+ child: [
14097
+ {
14098
+ type: 'Group',
14099
+ label: '尺寸',
14100
+ child: [
14101
+ {
14102
+ type: 'Number',
14103
+ name: ['style', 'width'],
14104
+ addonAfter: 'W'
14105
+ },
14106
+ {
14107
+ type: 'Number',
14108
+ name: ['style', 'height'],
14109
+ addonAfter: 'H'
14110
+ }
14111
+ ]
14112
+ },
14113
+ {
14114
+ type: 'Group',
14115
+ label: '圆角',
14116
+ child: [
14117
+ {
14118
+ type: 'Slider',
14119
+ name: ['style', 'borderRadius'],
14120
+ max: 100
14121
+ },
14122
+ {
14123
+ type: 'Number',
14124
+ name: ['style', 'borderRadius'],
14125
+ addonAfter: 'px',
14126
+ max: 100
14127
+ }
14128
+ ]
14129
+ },
14130
+ {
14131
+ type: 'Color',
14132
+ label: '背景色',
14133
+ name: ['style', 'backgroundColor']
14134
+ },
14135
+ {
14136
+ label: '外边距',
14137
+ type: 'Number',
14138
+ name: ['style', 'margin'],
14139
+ addonAfter: 'px'
14140
+ },
14141
+ {
14142
+ label: '内边距',
14143
+ type: 'Number',
14144
+ name: ['style', 'padding'],
14145
+ addonAfter: 'px'
14146
+ }
14147
+ ]
14148
+ },
14149
+ {
14150
+ title: '商品图片',
14151
+ child: [
14152
+ {
14153
+ type: 'Group',
14154
+ label: '尺寸',
14155
+ child: [
14156
+ {
14157
+ type: 'Number',
14158
+ name: ['props', 'ctaTempStyles', 'img', 'width'],
14159
+ addonAfter: 'W'
14160
+ },
14161
+ {
14162
+ type: 'Number',
14163
+ name: ['props', 'ctaTempStyles', 'img', 'height'],
14164
+ addonAfter: 'H'
14165
+ }
14166
+ ]
14167
+ },
14168
+ {
14169
+ type: 'Group',
14170
+ label: '圆角',
14171
+ child: [
14172
+ {
14173
+ type: 'Slider',
14174
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
14175
+ max: 100
14176
+ },
14177
+ {
14178
+ type: 'Number',
14179
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
14180
+ addonAfter: 'px',
14181
+ max: 100
14182
+ }
14183
+ ]
14184
+ },
14185
+ {
14186
+ type: 'Number',
14187
+ label: '与下边边距',
14188
+ addonAfter: 'px',
14189
+ name: ['props', 'ctaTempStyles', 'img', 'marginBottom']
14190
+ },
14191
+ {
14192
+ label: '居中垂直偏移',
14193
+ type: 'Number',
14194
+ name: ['props', 'translateY'],
14195
+ min: -1000,
14196
+ addonAfter: '%',
14197
+ initialValue: 0
14198
+ }
14199
+ ]
14200
+ },
14201
+ {
14202
+ title: '商品标题文本',
14203
+ type: 'commodityTitle',
14204
+ child: [
14205
+ {
14206
+ type: 'Group',
14207
+ label: '字体',
14208
+ child: [
14209
+ {
14210
+ type: 'Select',
14211
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily-cn'],
14212
+ bottomText: '中文字体'
14213
+ },
14214
+ {
14215
+ type: 'Select',
14216
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily-en'],
14217
+ bottomText: '英文/其他字体'
14218
+ }
14219
+ ]
14220
+ },
14221
+ {
14222
+ type: 'Group',
14223
+ label: '',
14224
+ child: [
14225
+ {
14226
+ type: 'Color',
14227
+ name: ['props', 'ctaTempStyles', 'title', 'color']
14228
+ },
14229
+ {
14230
+ type: 'Number',
14231
+ addonAfter: 'px',
14232
+ name: ['props', 'ctaTempStyles', 'title', 'fontSize']
14233
+ }
14234
+ ]
14235
+ },
14236
+ {
14237
+ label: '样式',
14238
+ type: 'TextStyle',
14239
+ name: ['props', 'ctaTempStyles', 'title']
13064
14240
  },
13065
- buttonBgStyle: {
13066
- backgroundColor: '#fff',
13067
- height: 52,
13068
- paddingTop: 20,
13069
- paddingLeft: 20,
13070
- paddingRight: 20,
13071
- paddingBottom: 20
14241
+ {
14242
+ label: '对齐',
14243
+ type: 'TextAlign',
14244
+ name: ['props', 'ctaTempStyles', 'title']
14245
+ },
14246
+ {
14247
+ label: '间距',
14248
+ type: 'TextSpace',
14249
+ name: ['props', 'ctaTempStyles', 'title']
13072
14250
  }
13073
- }
14251
+ ]
13074
14252
  },
13075
- w: 100,
13076
- h: 40,
13077
- sort: 2
13078
- });
13079
-
13080
- /*
13081
- * @Author: binruan@chatlabs.com
13082
- * @Date: 2024-06-13 10:08:32
13083
- * @LastEditors: binruan@chatlabs.com
13084
- * @LastEditTime: 2024-06-13 17:42:50
13085
- * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\settingRender.tsx
13086
- *
13087
- */
13088
- var settingRender = [
13089
14253
  {
13090
- title: '协议详情',
14254
+ title: 'CTA标题',
13091
14255
  child: [
13092
14256
  {
13093
- type: 'Switch',
13094
- label: '必须同意用户协议',
13095
- name: ['props', 'privacy_necessity'],
13096
- extra: '当新用户进入页面时,会出现用户协议弹窗,用户需要先同意协议后才能访问内容。'
14257
+ type: 'Group',
14258
+ label: '尺寸',
14259
+ child: [
14260
+ {
14261
+ type: 'Number',
14262
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'width'],
14263
+ addonAfter: 'W'
14264
+ },
14265
+ {
14266
+ type: 'Number',
14267
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'height'],
14268
+ addonAfter: 'H'
14269
+ }
14270
+ ]
13097
14271
  },
13098
14272
  {
13099
- type: 'Text',
13100
- label: '弹窗标题',
13101
- name: ['props', 'privacy_title']
14273
+ type: 'Group',
14274
+ label: '圆角',
14275
+ child: [
14276
+ {
14277
+ type: 'Slider',
14278
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
14279
+ max: 100
14280
+ },
14281
+ {
14282
+ type: 'Number',
14283
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
14284
+ addonAfter: 'px',
14285
+ max: 100
14286
+ }
14287
+ ]
13102
14288
  },
13103
14289
  {
13104
- type: 'TextArea',
13105
- label: '用户协议弹窗内容',
13106
- name: ['props', 'privacy_context']
14290
+ type: 'TextSpace',
14291
+ name: ['props', 'ctaTempStyles', 'title']
14292
+ },
14293
+ {
14294
+ type: 'Color',
14295
+ label: '背景色',
14296
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'backgroundColor']
13107
14297
  },
13108
14298
  {
13109
14299
  type: 'Group',
13110
- label: '隐私政策',
14300
+ label: '字体',
13111
14301
  child: [
13112
14302
  {
13113
- type: 'Text',
13114
- name: ['props', 'privacy_policy_title']
14303
+ type: 'Select',
14304
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-cn'],
14305
+ bottomText: '中文字体'
13115
14306
  },
13116
14307
  {
13117
- type: 'Text',
13118
- name: ['props', 'privacy_policy_url'],
13119
- addonBefore: 'https://'
14308
+ type: 'Select',
14309
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-en'],
14310
+ bottomText: '英文/其他字体'
13120
14311
  }
13121
- ],
13122
- extra: '当用户点击更多信息按钮时,将会跳转至设置的链接查看政策内容'
14312
+ ]
14313
+ },
14314
+ {
14315
+ type: 'Group',
14316
+ label: '',
14317
+ child: [
14318
+ {
14319
+ type: 'Color',
14320
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
14321
+ },
14322
+ {
14323
+ type: 'Number',
14324
+ addonAfter: 'px',
14325
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
14326
+ }
14327
+ ]
14328
+ },
14329
+ {
14330
+ label: '样式',
14331
+ type: 'TextStyle',
14332
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
14333
+ },
14334
+ {
14335
+ label: '对齐',
14336
+ type: 'TextAlign',
14337
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
13123
14338
  }
13124
14339
  ]
13125
14340
  }
13126
14341
  ];
13127
14342
 
13128
- const Consent$1 = (props) => {
13129
- return React.createElement(Consent$1, Object.assign({}, props));
14343
+ 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"};
14344
+
14345
+ const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
14346
+ const AniLinkPopup$1 = (_a) => {
14347
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
14348
+ 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"]);
14349
+ const { sxpParameter, globalConfig, ctaEvent } = useSxpDataSource();
14350
+ const { jumpToWeb } = useEventReport();
14351
+ const [visible, setVisible] = React.useState(true);
14352
+ 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);
14353
+ 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);
14354
+ const handleTo = () => {
14355
+ var _a, _b, _c;
14356
+ 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);
14357
+ ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
14358
+ eventSubject: 'clickCta',
14359
+ eventDescription: 'User clicked the CTA'
14360
+ }, recData, item, index);
14361
+ if (isExternalLink) {
14362
+ jumpToWeb(recData, product, cta, index);
14363
+ }
14364
+ onClick === null || onClick === void 0 ? void 0 : onClick();
14365
+ };
14366
+ const title = (cta === null || cta === void 0 ? void 0 : cta.title) || '查看详情 >';
14367
+ const aniStyle = React.useMemo(() => {
14368
+ var _a, _b;
14369
+ const ani = event === null || event === void 0 ? void 0 : event.animation;
14370
+ if (ani) {
14371
+ const { delay, duration, backgroundColor } = ani;
14372
+ return {
14373
+ ':after': {
14374
+ animationDelay: `${(_a = delay / 1000) !== null && _a !== void 0 ? _a : 0}s`,
14375
+ animationDuration: `${(_b = duration / 1000) !== null && _b !== void 0 ? _b : 0}s`,
14376
+ backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'transparent'}`
14377
+ }
14378
+ };
14379
+ }
14380
+ }, [event === null || event === void 0 ? void 0 : event.animation]);
14381
+ 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;
14382
+ const onClose = (event) => {
14383
+ event.stopPropagation();
14384
+ setVisible(false);
14385
+ };
14386
+ return (React.createElement(React.Fragment, null, isTel ? (React.createElement("div", { style: {
14387
+ height: '40px',
14388
+ lineHeight: '40px',
14389
+ paddingLeft: '6px'
14390
+ } }, "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.css(aniStyle)}`, onClick: handleTo }),
14391
+ 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 } },
14392
+ 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'] })),
14393
+ 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 }),
14394
+ 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: {
14395
+ __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)
14396
+ } }),
14397
+ 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: {
14398
+ __html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
14399
+ } })))));
13130
14400
  };
13131
- var ConsentComponent = React.memo(Consent$1);
14401
+ var AniLinkPopupComponent = React.memo(AniLinkPopup$1);
14402
+
14403
+ /*
14404
+ * @Author: binruan@chatlabs.com
14405
+ * @Date: 2024-07-04 15:28:39
14406
+ * @LastEditors: binruan@chatlabs.com
14407
+ * @LastEditTime: 2024-07-05 17:46:42
14408
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
14409
+ *
14410
+ */
14411
+ var interactionRender = [
14412
+ {
14413
+ title: '点击事件',
14414
+ child: [
14415
+ {
14416
+ type: 'link',
14417
+ name: 'onClick'
14418
+ }
14419
+ ]
14420
+ },
14421
+ {
14422
+ title: '动画效果',
14423
+ child: [
14424
+ {
14425
+ type: 'Color',
14426
+ name: ['animation', 'backgroundColor'],
14427
+ label: '动画颜色'
14428
+ },
14429
+ {
14430
+ type: 'Select',
14431
+ name: ['animation', 'name'],
14432
+ label: '动画',
14433
+ options: [
14434
+ {
14435
+ label: '由左向右/中间扩散',
14436
+ value: 1
14437
+ }
14438
+ ],
14439
+ initialValue: 1,
14440
+ fieldProps: {
14441
+ style: {
14442
+ width: '100%'
14443
+ }
14444
+ }
14445
+ },
14446
+ {
14447
+ type: 'Number',
14448
+ label: '动画启动时间',
14449
+ name: ['animation', 'delay'],
14450
+ addonAfter: 'ms'
14451
+ },
14452
+ {
14453
+ type: 'Number',
14454
+ label: '动画持续时间',
14455
+ name: ['animation', 'duration'],
14456
+ addonAfter: 'ms'
14457
+ }
14458
+ ]
14459
+ }
14460
+ ];
13132
14461
 
13133
14462
  /*
13134
14463
  * @Author: binruan@chatlabs.com
13135
14464
  * @Date: 2023-07-28 18:29:57
13136
14465
  * @LastEditors: binruan@chatlabs.com
13137
- * @LastEditTime: 2024-06-13 17:32:17
13138
- * @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\material.tsx
14466
+ * @LastEditTime: 2024-07-08 14:36:05
14467
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\material.tsx
13139
14468
  *
13140
14469
  */
13141
- const Consent = createMaterial(ConsentComponent, {
13142
- displayName: 'Consent',
14470
+ const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
14471
+ displayName: '竖版弹窗CTA',
13143
14472
  icon: '',
13144
- category: 'base',
13145
- type: 'Consent',
14473
+ category: 'cta',
14474
+ type: 'AniLinkPopup',
13146
14475
  related: {
13147
- settingRender
14476
+ settingRender: settingRender,
14477
+ bindableProps: [],
14478
+ interactionRender
13148
14479
  },
13149
14480
  defaulSetting: {
13150
- props: {},
13151
- style: {}
14481
+ props: {
14482
+ ctaTempStyles: {
14483
+ img: {
14484
+ borderRadius: 3,
14485
+ width: 76,
14486
+ height: 76,
14487
+ marginBottom: 10
14488
+ },
14489
+ title: {
14490
+ fontSize: 12,
14491
+ color: '#000',
14492
+ textAlign: 'left'
14493
+ },
14494
+ ctaTitle: {
14495
+ fontSize: 10,
14496
+ color: '#fff',
14497
+ textAlign: 'center',
14498
+ width: 76,
14499
+ height: 20,
14500
+ backgroundColor: 'rgba(0,0,0,1)'
14501
+ }
14502
+ }
14503
+ },
14504
+ style: {
14505
+ width: 90,
14506
+ height: 160,
14507
+ borderRadius: 3,
14508
+ backgroundColor: 'rgba(255,255,255,1)',
14509
+ padding: 7,
14510
+ margin: 10
14511
+ }
13152
14512
  },
13153
14513
  w: 100,
13154
14514
  h: 40,
13155
- sort: 1
14515
+ sort: 2
13156
14516
  });
13157
14517
 
13158
14518
  /*
@@ -13166,6 +14526,8 @@ const Consent = createMaterial(ConsentComponent, {
13166
14526
 
13167
14527
  var _materials_ = /*#__PURE__*/Object.freeze({
13168
14528
  __proto__: null,
14529
+ AniLink: AniLink,
14530
+ AniLinkPopup: AniLinkPopup,
13169
14531
  Appoint: Appoint,
13170
14532
  AppointForm: AppointForm,
13171
14533
  Commodity: Commodity,
@@ -13173,6 +14535,7 @@ var _materials_ = /*#__PURE__*/Object.freeze({
13173
14535
  CommodityDetailDiroNew: CommodityDetailDiroNew,
13174
14536
  CommodityDiro: CommodityDiro,
13175
14537
  CommodityDiroNew: CommodityDiroNew,
14538
+ CommodityList: CommodityList,
13176
14539
  Consent: Consent,
13177
14540
  HashTag: HashTag,
13178
14541
  Link: Link,
@@ -13477,23 +14840,20 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
13477
14840
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
13478
14841
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
13479
14842
  return () => {
13480
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13481
- const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
13482
- if (!isPause)
13483
- handlePause();
14843
+ var _a, _b, _c, _d, _e, _f, _g, _h;
13484
14844
  if (hls)
13485
14845
  hls === null || hls === void 0 ? void 0 : hls.destroy();
13486
14846
  setIsLoadFinish(false);
13487
- (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadedmetadata', handleLoadedmetadata);
13488
- (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadeddata', handLoadeddata);
13489
- (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('play', handleStartPlay);
13490
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('playing', handlePlaying);
13491
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('pause', handlePause);
13492
- (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('ended', handlePlay);
13493
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('canplay', handlePlay);
13494
- (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('waiting', handleWaiting);
14847
+ (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedmetadata);
14848
+ (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadeddata', handLoadeddata);
14849
+ (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('play', handleStartPlay);
14850
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('playing', handlePlaying);
14851
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('pause', handlePause);
14852
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('ended', handlePlay);
14853
+ (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('canplay', handlePlay);
14854
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('waiting', handleWaiting);
13495
14855
  };
13496
- }, [isActive, videoId, rec, handlePause]);
14856
+ }, [isActive, videoId, rec]);
13497
14857
  React.useEffect(() => {
13498
14858
  var _a, _b;
13499
14859
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
@@ -13639,23 +14999,23 @@ var ToggleButton$1 = React.memo(ToggleButton);
13639
14999
  * @Author: binruan@chatlabs.com
13640
15000
  * @Date: 2024-01-15 19:03:09
13641
15001
  * @LastEditors: binruan@chatlabs.com
13642
- * @LastEditTime: 2024-07-11 18:19:29
15002
+ * @LastEditTime: 2024-03-13 10:53:56
13643
15003
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FingerSwipeTip\index.tsx
13644
15004
  *
13645
15005
  */
13646
- const FingerSwipeTip = ({ imageUrl, style, duration = 2000 }) => {
15006
+ const FingerSwipeTip = ({ imageUrl, style }) => {
13647
15007
  const [show, setShow] = React.useState(true);
13648
15008
  useEditor();
13649
15009
  React.useEffect(() => {
13650
15010
  setTimeout(() => {
13651
15011
  setShow(false);
13652
- }, duration);
15012
+ }, 2000);
13653
15013
  }, []);
13654
15014
  const FINGER_SWIPE_ICON = useIconLink('/pb_static/finger-swipe-tip.29dc3a48a3c746c906ea..png');
13655
15015
  const animationCls = React.useMemo(() => {
13656
15016
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
13657
15017
  }, [show]);
13658
- return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: Object.assign(Object.assign({}, style), { animationDuration: `${duration / 1000}s` }) },
15018
+ return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
13659
15019
  React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
13660
15020
  };
13661
15021
 
@@ -13759,12 +15119,11 @@ var PictureGroup$3 = React.memo(PictureGroup$2);
13759
15119
  * @Author: binruan@chatlabs.com
13760
15120
  * @Date: 2024-01-15 19:03:09
13761
15121
  * @LastEditors: binruan@chatlabs.com
13762
- * @LastEditTime: 2024-07-09 18:47:05
15122
+ * @LastEditTime: 2024-06-26 18:52:46
13763
15123
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
13764
15124
  *
13765
15125
  */
13766
15126
  const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
13767
- var _a;
13768
15127
  const [isShowMore, setIsShowMore] = React.useState(false);
13769
15128
  const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
13770
15129
  const handleClickTag = (data) => {
@@ -13796,8 +15155,7 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
13796
15155
  }
13797
15156
  return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
13798
15157
  }, [isShowMore, tags]);
13799
- console.log(hashTagStyle, '111');
13800
- 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` } },
15158
+ return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag' },
13801
15159
  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) },
13802
15160
  React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
13803
15161
  };
@@ -13867,14 +15225,14 @@ function withBindDataSource(Component) {
13867
15225
  * @Author: binruan@chatlabs.com
13868
15226
  * @Date: 2023-12-26 16:11:34
13869
15227
  * @LastEditors: binruan@chatlabs.com
13870
- * @LastEditTime: 2024-04-18 14:36:53
15228
+ * @LastEditTime: 2024-07-17 18:54:33
13871
15229
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
13872
15230
  *
13873
15231
  */
13874
- const RenderCard = ({ rec, index, tempMap, resolver }) => {
15232
+ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType }) => {
13875
15233
  const { schema } = useEditor();
13876
15234
  const renderComp = React.useMemo(() => {
13877
- 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;
15235
+ 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;
13878
15236
  if (!(rec === null || rec === void 0 ? void 0 : rec.video))
13879
15237
  return null;
13880
15238
  let cta = null;
@@ -13888,20 +15246,27 @@ const RenderCard = ({ rec, index, tempMap, resolver }) => {
13888
15246
  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;
13889
15247
  }
13890
15248
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
13891
- 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)) ||
13892
- (((_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)) ||
13893
- (((_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)) ||
13894
- (((_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)) ||
13895
- (((_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)) ||
13896
- (((_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))) {
15249
+ //如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
15250
+ 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)))
15251
+ return;
15252
+ //默认不渲染category为cta类型的组件,该类型的组件只用于某一处
15253
+ if (!includesCtaType && ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.category) === 'cta')
15254
+ return;
15255
+ 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)) ||
15256
+ (((_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)) ||
15257
+ (((_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)) ||
15258
+ (((_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)) ||
15259
+ (((_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)) ||
15260
+ (((_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))) {
15261
+ //
13897
15262
  return null;
13898
15263
  }
13899
15264
  if (value && resolver) {
13900
- const t = resolver[(_w = value === null || value === void 0 ? void 0 : value.item) === null || _w === void 0 ? void 0 : _w.type];
15265
+ const t = resolver[(_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.type];
13901
15266
  const Component = withBindDataSource(t);
13902
- const defaulSetting = (_x = t === null || t === void 0 ? void 0 : t.extend) === null || _x === void 0 ? void 0 : _x.defaulSetting;
13903
- 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';
13904
- 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 })));
15267
+ const defaulSetting = (_z = t === null || t === void 0 ? void 0 : t.extend) === null || _z === void 0 ? void 0 : _z.defaulSetting;
15268
+ 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';
15269
+ 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 })));
13905
15270
  }
13906
15271
  else {
13907
15272
  return null;
@@ -13994,7 +15359,7 @@ var Tagbar$1 = React.memo(Tagbar);
13994
15359
  * @Author: binruan@chatlabs.com
13995
15360
  * @Date: 2024-01-15 19:03:09
13996
15361
  * @LastEditors: binruan@chatlabs.com
13997
- * @LastEditTime: 2024-07-09 18:11:21
15362
+ * @LastEditTime: 2024-07-22 15:57:31
13998
15363
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
13999
15364
  *
14000
15365
  */
@@ -14007,7 +15372,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14007
15372
  const viewTime = React.useRef();
14008
15373
  const [isLoadMore, setIsLoadMore] = React.useState(false);
14009
15374
  const [isShowMore, setIsShowMore] = React.useState(false);
14010
- const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag } = useSxpDataSource();
15375
+ const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
14011
15376
  const { backMainFeed } = useEventReport();
14012
15377
  const { productView } = useEventReport();
14013
15378
  const isShowFingerTip = React.useMemo(() => {
@@ -14055,7 +15420,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14055
15420
  React.useEffect(() => {
14056
15421
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
14057
15422
  const visibleChange = () => {
14058
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
15423
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
14059
15424
  const repCond = !openHashtag && !isShowConsent;
14060
15425
  if (document.visibilityState === 'hidden') {
14061
15426
  // 当用户导航到新页面、切换标签页、关闭标签页、最小化或关闭浏览器、刷新原页面(即离开原页面时),或者在移动设备上从浏览器切换到不同的应用程序时
@@ -14094,7 +15459,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14094
15459
  position: activeIndex + '',
14095
15460
  fromKName,
14096
15461
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
14097
- 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 : ''
15462
+ 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 : '',
15463
+ 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 : ''
14098
15464
  }
14099
15465
  });
14100
15466
  }
@@ -14199,17 +15565,19 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14199
15565
  };
14200
15566
  }, [isShowMore]);
14201
15567
  const renderBottom = React.useCallback((rec, index) => {
14202
- var _a, _b, _c, _d, _e, _f, _g, _h;
15568
+ var _a, _b, _c, _d, _e, _f, _g;
14203
15569
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
14204
15570
  return (React.createElement(React.Fragment, null,
14205
15571
  ((_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' }),
14206
- 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` } },
15572
+ React.createElement("div", { className: 'clc-sxp-bottom' },
14207
15573
  React.createElement(Nudge, { nudge: nudge }),
14208
15574
  (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' },
14209
15575
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
14210
15576
  React.createElement("div", null,
14211
- 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 }),
14212
- 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 })))));
15577
+ 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 }),
15578
+ React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
15579
+ 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 }))),
15580
+ React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'] })));
14213
15581
  }
14214
15582
  return null;
14215
15583
  }, [
@@ -14262,8 +15630,36 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14262
15630
  });
14263
15631
  }
14264
15632
  };
15633
+ const handleSlideSkip = (item, position) => {
15634
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
15635
+ if (isPreview)
15636
+ return;
15637
+ const t = new Date() - curTime.current;
15638
+ 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) {
15639
+ 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);
15640
+ 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]);
15641
+ if (link) {
15642
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
15643
+ eventInfo: {
15644
+ eventSubject: 'swipeToWeb',
15645
+ eventDescription: 'User swiped to web',
15646
+ productId: (_l = product === null || product === void 0 ? void 0 : product.itemId) !== null && _l !== void 0 ? _l : '',
15647
+ productName: (_m = product === null || product === void 0 ? void 0 : product.title) !== null && _m !== void 0 ? _m : '',
15648
+ price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
15649
+ productCollection: (_o = product === null || product === void 0 ? void 0 : product.collection) !== null && _o !== void 0 ? _o : '',
15650
+ contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
15651
+ position: position + '',
15652
+ 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 : '',
15653
+ traceInfo: (_r = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _r !== void 0 ? _r : ''
15654
+ }
15655
+ });
15656
+ setSlideSkipState();
15657
+ window.location.href = window.getJointUtmLink(link);
15658
+ }
15659
+ }
15660
+ };
14265
15661
  const handleScrollEvent = (swiper) => {
14266
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
15662
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
14267
15663
  viewTime.current = new Date();
14268
15664
  const item = data[swiper.previousIndex];
14269
15665
  if (!item)
@@ -14275,20 +15671,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14275
15671
  eventDescription: 'User scroll down',
14276
15672
  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 : '',
14277
15673
  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 : '',
14278
- requestId: null
15674
+ requestId: null,
15675
+ 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 : ''
14279
15676
  }
14280
15677
  });
14281
15678
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
14282
15679
  handleReportViewImageEnd(item);
15680
+ handleSlideSkip(item, swiper.previousIndex);
14283
15681
  }
14284
15682
  else {
14285
15683
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
14286
15684
  eventInfo: {
14287
15685
  eventSubject: 'scrollUp',
14288
15686
  eventDescription: 'User scroll up',
14289
- 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 : '',
14290
- productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
14291
- requestId: null
15687
+ 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 : '',
15688
+ productId: (_k = (_j = item.product) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
15689
+ requestId: null,
15690
+ 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 : ''
14292
15691
  }
14293
15692
  });
14294
15693
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -14297,7 +15696,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14297
15696
  // 商品浏览事件
14298
15697
  handleReportProductView(item);
14299
15698
  const curItem = data[swiper.activeIndex];
14300
- 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)) {
15699
+ 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)) {
14301
15700
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
14302
15701
  eventName: 'ProductView'
14303
15702
  });
@@ -14382,7 +15781,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14382
15781
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
14383
15782
  top: minusHeight
14384
15783
  } }),
14385
- 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,
15784
+ 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,
14386
15785
  React.createElement(Swiper, { style: {
14387
15786
  marginTop: tagHeight
14388
15787
  }, ref: swiperRef, onSlideChange: () => {
@@ -14407,13 +15806,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14407
15806
  }
14408
15807
  }
14409
15808
  }, direction: 'vertical', height: height },
14410
- ((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: {
15809
+ React.createElement(ToggleButton$1, { style: {
14411
15810
  position: 'fixed',
14412
15811
  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',
14413
15812
  zIndex: 999,
14414
15813
  [(_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,
14415
15814
  [(_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
14416
- }, 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 })),
15815
+ }, 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 }),
14417
15816
  renderView),
14418
15817
  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))));
14419
15818
  };
@@ -14782,7 +16181,7 @@ var index$1 = React.memo(DiyPortalPreview);
14782
16181
  * @Author: binruan@chatlabs.com
14783
16182
  * @Date: 2023-10-31 10:56:01
14784
16183
  * @LastEditors: binruan@chatlabs.com
14785
- * @LastEditTime: 2024-05-27 18:19:31
16184
+ * @LastEditTime: 2024-07-19 18:06:14
14786
16185
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
14787
16186
  *
14788
16187
  */
@@ -14835,7 +16234,7 @@ const Popup = () => {
14835
16234
  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';
14836
16235
  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';
14837
16236
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
14838
- 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 })));
16237
+ 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 })));
14839
16238
  }
14840
16239
  else {
14841
16240
  return React.createElement(React.Fragment, null);