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