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