pb-sxp-ui 1.1.2 → 1.2.1

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