pb-sxp-ui 1.0.69 → 1.0.71

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 (114) hide show
  1. package/dist/index.cjs +301 -174
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -2
  4. package/dist/index.js +301 -174
  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 +304 -177
  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/components/DiyPortalPreview/VideoWidget.js +3 -2
  15. package/es/core/components/SxpPageCore/index.js +2 -2
  16. package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
  17. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
  18. package/es/core/components/SxpPageRender/FormatImage.js +1 -2
  19. package/es/core/components/SxpPageRender/Nudge/index.js +2 -2
  20. package/es/core/components/SxpPageRender/VideoWidget/index.js +1 -1
  21. package/es/core/components/SxpPageRender/WaterFall/List.js +5 -9
  22. package/es/core/components/SxpPageRender/index.d.ts +5 -0
  23. package/es/core/components/SxpPageRender/index.js +21 -24
  24. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  25. package/es/core/context/SxpDataSourceProvider.d.ts +0 -1
  26. package/es/core/context/SxpDataSourceProvider.js +12 -4
  27. package/es/materials/sxp/HashTag/settingRender.d.ts +2 -7
  28. package/es/materials/sxp/HashTag/settingRender.js +0 -5
  29. package/es/materials/sxp/defaultSetting.d.ts +1 -4
  30. package/es/materials/sxp/defaultSetting.js +4 -5
  31. package/es/materials/sxp/popup/AppointForm/index.d.ts +2 -1
  32. package/es/materials/sxp/popup/AppointForm/index.js +3 -8
  33. package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
  34. package/es/materials/sxp/popup/AppointForm/settingRender.js +33 -2
  35. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  36. package/es/materials/sxp/popup/CommodityDetail/index.js +7 -1
  37. package/es/materials/sxp/popup/CommodityDetail/material.js +5 -2
  38. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
  39. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
  40. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
  41. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
  42. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
  43. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
  44. package/es/materials/sxp/popup/Prompt/index.d.ts +2 -1
  45. package/es/materials/sxp/popup/Prompt/index.js +2 -2
  46. package/es/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
  47. package/es/materials/sxp/popup/Prompt/settingRender.js +57 -14
  48. package/es/materials/sxp/template/Commodity/index.d.ts +1 -0
  49. package/es/materials/sxp/template/Commodity/index.js +12 -6
  50. package/es/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  51. package/es/materials/sxp/template/CommodityDiro/index.js +12 -6
  52. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  53. package/es/materials/sxp/template/CommodityDiroNew/index.js +12 -6
  54. package/es/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  55. package/es/materials/sxp/template/MultiCommodity/index.js +7 -5
  56. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  57. package/es/materials/sxp/template/MultiCommodityDiro/index.js +7 -5
  58. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  59. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -5
  60. package/es/materials/sxp/template/components/Img.d.ts +2 -1
  61. package/es/materials/sxp/template/components/Img.js +2 -2
  62. package/es/materials/sxp/template/components/settingRender.d.ts +50 -0
  63. package/es/materials/sxp/template/components/settingRender.js +8 -0
  64. package/lib/core/components/DiyPortalPreview/VideoWidget.js +3 -2
  65. package/lib/core/components/SxpPageCore/index.js +2 -2
  66. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
  67. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
  68. package/lib/core/components/SxpPageRender/FormatImage.js +0 -1
  69. package/lib/core/components/SxpPageRender/Nudge/index.js +2 -2
  70. package/lib/core/components/SxpPageRender/VideoWidget/index.js +1 -1
  71. package/lib/core/components/SxpPageRender/WaterFall/List.js +5 -9
  72. package/lib/core/components/SxpPageRender/index.d.ts +5 -0
  73. package/lib/core/components/SxpPageRender/index.js +21 -24
  74. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  75. package/lib/core/context/SxpDataSourceProvider.d.ts +0 -1
  76. package/lib/core/context/SxpDataSourceProvider.js +12 -4
  77. package/lib/materials/sxp/HashTag/settingRender.d.ts +2 -7
  78. package/lib/materials/sxp/HashTag/settingRender.js +0 -5
  79. package/lib/materials/sxp/defaultSetting.d.ts +1 -4
  80. package/lib/materials/sxp/defaultSetting.js +4 -5
  81. package/lib/materials/sxp/popup/AppointForm/index.d.ts +2 -1
  82. package/lib/materials/sxp/popup/AppointForm/index.js +3 -8
  83. package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
  84. package/lib/materials/sxp/popup/AppointForm/settingRender.js +34 -2
  85. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  86. package/lib/materials/sxp/popup/CommodityDetail/index.js +7 -1
  87. package/lib/materials/sxp/popup/CommodityDetail/material.js +5 -2
  88. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
  89. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
  90. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
  91. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
  92. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
  93. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
  94. package/lib/materials/sxp/popup/Prompt/index.d.ts +2 -1
  95. package/lib/materials/sxp/popup/Prompt/index.js +2 -2
  96. package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
  97. package/lib/materials/sxp/popup/Prompt/settingRender.js +58 -14
  98. package/lib/materials/sxp/template/Commodity/index.d.ts +1 -0
  99. package/lib/materials/sxp/template/Commodity/index.js +12 -6
  100. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  101. package/lib/materials/sxp/template/CommodityDiro/index.js +12 -6
  102. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  103. package/lib/materials/sxp/template/CommodityDiroNew/index.js +12 -6
  104. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  105. package/lib/materials/sxp/template/MultiCommodity/index.js +7 -5
  106. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  107. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -5
  108. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  109. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -5
  110. package/lib/materials/sxp/template/components/Img.d.ts +2 -1
  111. package/lib/materials/sxp/template/components/Img.js +2 -2
  112. package/lib/materials/sxp/template/components/settingRender.d.ts +50 -0
  113. package/lib/materials/sxp/template/components/settingRender.js +8 -0
  114. package/package.json +2 -3
package/dist/index.cjs CHANGED
@@ -9,8 +9,8 @@ var React = require('react');
9
9
  var qs = require('qs');
10
10
  var EventEmitter = require('eventemitter3');
11
11
  var css = require('@emotion/css');
12
- var proComponents = require('@ant-design/pro-components');
13
12
  var ReactDOM = require('react-dom');
13
+ var Hls = require('hls.js');
14
14
 
15
15
  function _interopNamespaceDefault(e) {
16
16
  var n = Object.create(null);
@@ -446,7 +446,7 @@ var DataSourceType;
446
446
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
447
447
  })(DataSourceType || (DataSourceType = {}));
448
448
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
449
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
449
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
450
450
  const [rtcList, setRtcList] = React.useState([]);
451
451
  const [tagList, setTagList] = React.useState([]);
452
452
  const [loading, setLoading] = React.useState(false);
@@ -579,9 +579,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
579
579
  if (!enableReportEvent || !enabledMetaConversionApi) {
580
580
  return;
581
581
  }
582
+ const fakeUserId = storeAndLoadFeUserId();
582
583
  return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
583
584
  method: 'POST',
584
- body: { eventName, actionSource, eventSourceUrl, 'userData.externalId': externalId },
585
+ body: {
586
+ eventName,
587
+ actionSource,
588
+ eventSourceUrl,
589
+ userData: {
590
+ externalId: fakeUserId
591
+ }
592
+ },
585
593
  type: 'beacon'
586
594
  });
587
595
  }, [bffFetch, enableReportEvent, enabledMetaConversionApi]);
@@ -600,7 +608,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
600
608
  // 获取 Tag
601
609
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
602
610
  var _h, _j, _k, _l, _m;
603
- if (!utmVal || !isShowTag)
611
+ if (!utmVal)
604
612
  return;
605
613
  try {
606
614
  const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
@@ -613,7 +621,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
613
621
  catch (e) {
614
622
  console.log('e', e);
615
623
  }
616
- }), [bffFetch, utmVal, isShowTag]);
624
+ }), [bffFetch, utmVal]);
617
625
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
618
626
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
619
627
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -946,23 +954,30 @@ var interactionRender$8 = [
946
954
  }
947
955
  ];
948
956
 
949
- const fontOptions = [
950
- { label: '应用字体', value: 'appFont' },
951
- { label: '黑体', value: '黑体' }
952
- ];
957
+ /*
958
+ * @Author: binruan@chatlabs.com
959
+ * @Date: 2024-04-28 14:42:22
960
+ * @LastEditors: binruan@chatlabs.com
961
+ * @LastEditTime: 2024-05-23 17:01:21
962
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\defaultSetting.ts
963
+ *
964
+ */
965
+ const fontOptions = [{ label: 'defalut', value: 'appFont' }];
966
+ const sxpFonts = typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.localStorage.getItem('sxp_font_links'));
967
+ const data = sxpFonts && sxpFonts !== '' ? JSON.parse(sxpFonts) : [];
953
968
  var defaultSetting = {
954
- fontOptions
969
+ fontOptions: [...fontOptions, ...data]
955
970
  };
956
971
 
957
972
  /*
958
973
  * @Author: binruan@chatlabs.com
959
974
  * @Date: 2023-07-28 18:29:57
960
975
  * @LastEditors: binruan@chatlabs.com
961
- * @LastEditTime: 2023-12-14 10:51:16
976
+ * @LastEditTime: 2024-05-17 10:11:41
962
977
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
963
978
  *
964
979
  */
965
- var _a$4;
980
+ var _a$5, _b$5, _c;
966
981
  var settingRender$5 = [
967
982
  {
968
983
  type: 'Text',
@@ -989,7 +1004,7 @@ var settingRender$5 = [
989
1004
  type: 'Select',
990
1005
  name: ['textStyle', 'fontFamily'],
991
1006
  options: fontOptions,
992
- initialValue: (_a$4 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$4 === void 0 ? void 0 : _a$4.value
1007
+ initialValue: (_a$5 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$5 === void 0 ? void 0 : _a$5.value
993
1008
  },
994
1009
  {
995
1010
  type: 'Number',
@@ -1032,6 +1047,37 @@ var settingRender$5 = [
1032
1047
  type: 'Text',
1033
1048
  name: ['props', 'submitText']
1034
1049
  },
1050
+ {
1051
+ type: 'Group',
1052
+ label: '提交按钮字体',
1053
+ child: [
1054
+ {
1055
+ type: 'Color',
1056
+ name: ['props', 'submitButtonStyle', 'color'],
1057
+ initialValue: '#fff'
1058
+ },
1059
+ {
1060
+ type: 'Select',
1061
+ name: ['props', 'submitButtonStyle', 'fontFamily'],
1062
+ options: defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions,
1063
+ initialValue: (_c = (_b$5 = defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions) === null || _b$5 === void 0 ? void 0 : _b$5[0]) === null || _c === void 0 ? void 0 : _c.value
1064
+ },
1065
+ {
1066
+ type: 'Number',
1067
+ name: ['props', 'submitButtonStyle', 'fontSize'],
1068
+ addonAfter: 'px',
1069
+ initialValue: 12
1070
+ }
1071
+ ]
1072
+ },
1073
+ {
1074
+ type: 'TextStyle',
1075
+ name: ['props', 'submitButtonStyle']
1076
+ },
1077
+ {
1078
+ type: 'TextAlign',
1079
+ name: ['props', 'submitButtonStyle']
1080
+ },
1035
1081
  {
1036
1082
  label: '提交文本颜色',
1037
1083
  type: 'Color',
@@ -1152,7 +1198,7 @@ function useEventReport() {
1152
1198
  }
1153
1199
 
1154
1200
  const AppointForm$1 = (_a) => {
1155
- var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, isPopup, onClick, onClose } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose"]);
1201
+ var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, isPopup, onClick, onClose, submitButtonStyle } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose", "submitButtonStyle"]);
1156
1202
  const { submitForm, popupDetailData } = useSxpDataSource();
1157
1203
  const { jumpToWeb } = useEventReport();
1158
1204
  const formRef = React.useRef();
@@ -1183,7 +1229,7 @@ const AppointForm$1 = (_a) => {
1183
1229
  key: '4'
1184
1230
  }
1185
1231
  ], []);
1186
- const columnsData = React.useMemo(() => {
1232
+ React.useMemo(() => {
1187
1233
  if (layoutType === undefined) {
1188
1234
  const list = lodash.cloneDeep(columns) || defaultColumns;
1189
1235
  return list === null || list === void 0 ? void 0 : list.map((obj) => (Object.assign(Object.assign({}, obj), { title: undefined, fieldProps: { placeholder: obj === null || obj === void 0 ? void 0 : obj.title } })));
@@ -1226,13 +1272,9 @@ const AppointForm$1 = (_a) => {
1226
1272
  return (React.createElement("div", { className: 'pb-appoint-form' },
1227
1273
  React.createElement("div", { className: `pb-appoint-form-title ${css.css(Object.assign({}, textStyle))}` }, title),
1228
1274
  React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
1229
- React.createElement("div", { className: 'pb-appoint-form-container' },
1230
- React.createElement(proComponents.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
1275
+ React.createElement("div", { className: 'pb-appoint-form-container' })),
1231
1276
  React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
1232
- React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
1233
- color: submitColor,
1234
- background: submitBgColor
1235
- } }, loading ? React.createElement(React.Fragment, null, "loading...") : submitText))));
1277
+ React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: Object.assign({ color: submitColor, background: submitBgColor }, submitButtonStyle) }, loading ? React.createElement(React.Fragment, null, "loading...") : submitText))));
1236
1278
  };
1237
1279
  var AppointFormComponent = React.memo(AppointForm$1);
1238
1280
 
@@ -1280,23 +1322,7 @@ const AppointForm = createMaterial(AppointFormComponent, {
1280
1322
  sort: 2
1281
1323
  });
1282
1324
 
1283
- /*
1284
- * @Author: binruan@chatlabs.com
1285
- * @Date: 2024-04-02 18:01:34
1286
- * @LastEditors: binruan@chatlabs.com
1287
- * @LastEditTime: 2024-04-12 16:46:04
1288
- * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\settingRender.tsx
1289
- *
1290
- */
1291
- var _a$3, _b$3;
1292
- /*
1293
- * @Author: binruan@chatlabs.com
1294
- * @Date: 2024-03-26 16:50:25
1295
- * @LastEditors: binruan@chatlabs.com
1296
- * @LastEditTime: 2024-03-28 18:42:26
1297
- * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
1298
- *
1299
- */
1325
+ var _a$4, _b$4;
1300
1326
  var settingRender$4 = [
1301
1327
  {
1302
1328
  title: '商品图片',
@@ -1320,6 +1346,19 @@ var settingRender$4 = [
1320
1346
  type: 'Number',
1321
1347
  name: ['props', 'swiper', 'delay'],
1322
1348
  addonAfter: 's'
1349
+ },
1350
+ {
1351
+ type: 'Group',
1352
+ child: [
1353
+ {
1354
+ label: '居中垂直偏移',
1355
+ type: 'Number',
1356
+ name: ['props', 'swiper', 'translateY'],
1357
+ min: -100,
1358
+ addonAfter: '%',
1359
+ initialValue: 0
1360
+ }
1361
+ ]
1323
1362
  }
1324
1363
  ]
1325
1364
  },
@@ -1354,6 +1393,23 @@ var settingRender$4 = [
1354
1393
  name: ['props', 'commodityStyles', 'field'],
1355
1394
  initialValue: 'title'
1356
1395
  },
1396
+ {
1397
+ type: 'Group',
1398
+ child: [
1399
+ {
1400
+ label: '上边距',
1401
+ type: 'Number',
1402
+ addonAfter: 'px',
1403
+ name: ['marginTop']
1404
+ },
1405
+ {
1406
+ label: '下边距',
1407
+ type: 'Number',
1408
+ addonAfter: 'px',
1409
+ name: ['marginBottom']
1410
+ }
1411
+ ]
1412
+ },
1357
1413
  {
1358
1414
  type: 'Group',
1359
1415
  label: '标题字体',
@@ -1366,7 +1422,7 @@ var settingRender$4 = [
1366
1422
  type: 'Select',
1367
1423
  options: fontOptions,
1368
1424
  name: ['fontFamily'],
1369
- initialValue: (_a$3 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$3 === void 0 ? void 0 : _a$3.value
1425
+ initialValue: (_a$4 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$4 === void 0 ? void 0 : _a$4.value
1370
1426
  },
1371
1427
  {
1372
1428
  type: 'Number',
@@ -1446,7 +1502,7 @@ var settingRender$4 = [
1446
1502
  type: 'Select',
1447
1503
  name: ['props', 'buttonStyle', 'fontFamily'],
1448
1504
  options: fontOptions,
1449
- initialValue: (_b$3 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$3 === void 0 ? void 0 : _b$3.value
1505
+ initialValue: (_b$4 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$4 === void 0 ? void 0 : _b$4.value
1450
1506
  },
1451
1507
  {
1452
1508
  type: 'Number',
@@ -8391,7 +8447,7 @@ var ExpandableText$1 = React.memo(ExpandableText);
8391
8447
  * @Author: binruan@chatlabs.com
8392
8448
  * @Date: 2024-03-20 10:27:31
8393
8449
  * @LastEditors: binruan@chatlabs.com
8394
- * @LastEditTime: 2024-05-20 15:53:04
8450
+ * @LastEditTime: 2024-04-19 14:12:55
8395
8451
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
8396
8452
  *
8397
8453
  */
@@ -8406,30 +8462,6 @@ const FormatImage = React.forwardRef((props, ref) => {
8406
8462
  React.useEffect(() => {
8407
8463
  setImgSrc(src);
8408
8464
  }, [src]);
8409
- React.useRef(null);
8410
- // useEffect(() => {
8411
- // let observer: any = null;
8412
- // const { current } = imgRef;
8413
- // if (current) {
8414
- // observer = new IntersectionObserver(
8415
- // (entries) => {
8416
- // entries.forEach((entry) => {
8417
- // if (entry.isIntersecting) {
8418
- // setImgSrc(src);
8419
- // observer.unobserve(current);
8420
- // }
8421
- // });
8422
- // },
8423
- // { threshold: 0.1 } // 触发阈值,可根据需要调整
8424
- // );
8425
- // observer.observe(current);
8426
- // }
8427
- // return () => {
8428
- // if (observer && current) {
8429
- // observer.unobserve(current);
8430
- // }
8431
- // };
8432
- // }, [src]);
8433
8465
  return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
8434
8466
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8435
8467
  React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
@@ -8526,7 +8558,13 @@ const CommodityDetail$1 = (_a) => {
8526
8558
  width,
8527
8559
  height: width
8528
8560
  } },
8529
- React.createElement(FormatImage$1, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
8561
+ React.createElement(FormatImage$1, { style: {
8562
+ height: '100%',
8563
+ width: '100%',
8564
+ objectFit: 'cover',
8565
+ display: 'block',
8566
+ transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
8567
+ }, src: src }))));
8530
8568
  }))),
8531
8569
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
8532
8570
  position: 'relative',
@@ -8575,7 +8613,9 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
8575
8613
  commodityStyles: {
8576
8614
  price: {
8577
8615
  color: '#000',
8578
- fontSize: 18
8616
+ fontSize: 18,
8617
+ marginTop: 24,
8618
+ marginBottom: 10
8579
8619
  },
8580
8620
  title: {
8581
8621
  color: '#000',
@@ -8583,7 +8623,8 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
8583
8623
  },
8584
8624
  collection: {
8585
8625
  fontSize: 12,
8586
- color: '#000'
8626
+ color: '#000',
8627
+ marginBottom: 14
8587
8628
  },
8588
8629
  info: {
8589
8630
  color: 'gray',
@@ -8622,26 +8663,68 @@ var interactionRender$7 = [
8622
8663
  * @Author: binruan@chatlabs.com
8623
8664
  * @Date: 2023-10-27 14:06:35
8624
8665
  * @LastEditors: binruan@chatlabs.com
8625
- * @LastEditTime: 2023-11-08 09:55:32
8666
+ * @LastEditTime: 2024-05-17 10:29:41
8626
8667
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
8627
8668
  *
8628
8669
  */
8670
+ var _a$3, _b$3;
8629
8671
  var settingRender$3 = [
8630
8672
  {
8631
- type: 'Media',
8632
- label: '图标',
8633
- name: ['props', 'icon'],
8634
- mediaType: 'Image'
8635
- },
8636
- {
8637
- type: 'TextArea',
8638
- label: '内容',
8639
- name: ['props', 'content']
8640
- },
8641
- {
8642
- type: 'Text',
8643
- label: '按钮文案',
8644
- name: ['props', 'btnText']
8673
+ title: '',
8674
+ child: [
8675
+ {
8676
+ type: 'Media',
8677
+ label: '图标',
8678
+ name: ['props', 'icon'],
8679
+ mediaType: 'Image'
8680
+ },
8681
+ {
8682
+ type: 'TextArea',
8683
+ label: '内容',
8684
+ name: ['props', 'content']
8685
+ },
8686
+ {
8687
+ type: 'Text',
8688
+ label: '按钮文案',
8689
+ name: ['props', 'btnText']
8690
+ },
8691
+ {
8692
+ type: 'Group',
8693
+ label: '提交按钮字体',
8694
+ child: [
8695
+ {
8696
+ type: 'Color',
8697
+ name: ['props', 'submitButtonStyle', 'color'],
8698
+ initialValue: '#fff'
8699
+ },
8700
+ {
8701
+ type: 'Select',
8702
+ name: ['props', 'submitButtonStyle', 'fontFamily'],
8703
+ options: defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions,
8704
+ initialValue: (_b$3 = (_a$3 = defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions) === null || _a$3 === void 0 ? void 0 : _a$3[0]) === null || _b$3 === void 0 ? void 0 : _b$3.value
8705
+ },
8706
+ {
8707
+ type: 'Number',
8708
+ name: ['props', 'submitButtonStyle', 'fontSize'],
8709
+ addonAfter: 'px',
8710
+ initialValue: 12
8711
+ }
8712
+ ]
8713
+ },
8714
+ {
8715
+ type: 'TextStyle',
8716
+ name: ['props', 'submitButtonStyle']
8717
+ },
8718
+ {
8719
+ type: 'TextAlign',
8720
+ name: ['props', 'submitButtonStyle']
8721
+ },
8722
+ {
8723
+ label: '提交按钮颜色',
8724
+ type: 'Color',
8725
+ name: ['props', 'submitButtonStyle', 'backgroundColor']
8726
+ }
8727
+ ]
8645
8728
  }
8646
8729
  ];
8647
8730
 
@@ -8680,7 +8763,7 @@ const getMediaValueByMode = (obj) => {
8680
8763
  };
8681
8764
 
8682
8765
  const Prompt$1 = (_a) => {
8683
- var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick"]);
8766
+ var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle"]);
8684
8767
  const { popupDetailData } = useSxpDataSource();
8685
8768
  const { jumpToWeb } = useEventReport();
8686
8769
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
@@ -8702,7 +8785,7 @@ const Prompt$1 = (_a) => {
8702
8785
  React.createElement("div", { className: 'pb-prompt-icon' },
8703
8786
  React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$2 })),
8704
8787
  React.createElement("div", { className: 'pb-prompt-content' }, content),
8705
- React.createElement("button", { className: 'pb-prompt-btn', onClick: handleOk }, btnText)));
8788
+ React.createElement("button", { className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
8706
8789
  };
8707
8790
  var PromptComponent = React.memo(Prompt$1);
8708
8791
 
@@ -8761,6 +8844,19 @@ var settingRender$2 = [
8761
8844
  type: 'Number',
8762
8845
  name: ['props', 'swiper', 'delay'],
8763
8846
  addonAfter: 's'
8847
+ },
8848
+ {
8849
+ type: 'Group',
8850
+ child: [
8851
+ {
8852
+ label: '居中垂直偏移',
8853
+ type: 'Number',
8854
+ name: ['props', 'swiper', 'translateY'],
8855
+ min: -100,
8856
+ addonAfter: '%',
8857
+ initialValue: 0
8858
+ }
8859
+ ]
8764
8860
  }
8765
8861
  ]
8766
8862
  },
@@ -8992,7 +9088,13 @@ Made in Italy` })));
8992
9088
  width,
8993
9089
  height: width
8994
9090
  } },
8995
- React.createElement(FormatImage$1, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
9091
+ React.createElement(FormatImage$1, { style: {
9092
+ height: '100%',
9093
+ width: '100%',
9094
+ objectFit: 'cover',
9095
+ display: 'block',
9096
+ transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
9097
+ }, src: src }))));
8996
9098
  }))),
8997
9099
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
8998
9100
  position: 'relative',
@@ -9093,7 +9195,7 @@ var _a$1, _b$1;
9093
9195
  * @Author: binruan@chatlabs.com
9094
9196
  * @Date: 2024-03-26 16:50:25
9095
9197
  * @LastEditors: binruan@chatlabs.com
9096
- * @LastEditTime: 2024-04-12 17:38:12
9198
+ * @LastEditTime: 2024-05-21 16:39:34
9097
9199
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
9098
9200
  *
9099
9201
  */
@@ -9194,6 +9296,14 @@ var settingRender$1 = [
9194
9296
  label: '与右侧边距',
9195
9297
  addonAfter: 'px',
9196
9298
  name: ['props', 'ctaTempStyles', 'img', 'marginRight']
9299
+ },
9300
+ {
9301
+ label: '居中垂直偏移',
9302
+ type: 'Number',
9303
+ name: ['props', 'translateY'],
9304
+ min: -100,
9305
+ addonAfter: '%',
9306
+ initialValue: 0
9197
9307
  }
9198
9308
  ]
9199
9309
  },
@@ -9398,14 +9508,20 @@ var EventProvider$1 = React.memo(EventProvider);
9398
9508
  var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
9399
9509
 
9400
9510
  const Commodity$1 = (_a) => {
9401
- var _b, _c, _d, _e, _f, _g, _h;
9402
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9511
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
9512
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
9403
9513
  const { sxpParameter } = useSxpDataSource();
9404
9514
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9405
- const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
9515
+ const src = (_g = (_f = (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.product) === null || _c === void 0 ? void 0 : _c.cover) !== null && _d !== void 0 ? _d : (_e = product === null || product === void 0 ? void 0 : product.homePage) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _g !== void 0 ? _g : bottom_image;
9406
9516
  return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9407
9517
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9408
- React.createElement(FormatImage$1, { className: css.css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })),
9518
+ React.createElement(FormatImage$1, { className: css.css({
9519
+ width: '100%',
9520
+ objectFit: 'cover',
9521
+ height: '100%',
9522
+ display: 'block',
9523
+ transform: `translateY(${translateY}%)`
9524
+ }), src: src })),
9409
9525
  React.createElement("div", { className: css.css({
9410
9526
  color: '#fff',
9411
9527
  display: 'flex',
@@ -9414,8 +9530,8 @@ const Commodity$1 = (_a) => {
9414
9530
  width: '100%',
9415
9531
  overflow: 'hidden'
9416
9532
  }) },
9417
- React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
9418
- React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
9533
+ React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_h = product === null || product === void 0 ? void 0 : product.title) !== null && _h !== void 0 ? _h : 'Product Name'),
9534
+ React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_k = (_j = product === null || product === void 0 ? void 0 : product.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop Now'))));
9419
9535
  };
9420
9536
  var CommodityComponent = React.memo(Commodity$1);
9421
9537
 
@@ -9641,14 +9757,20 @@ var interactionRender$4 = [
9641
9757
  var styles$4 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
9642
9758
 
9643
9759
  const CommodityDiro$1 = (_a) => {
9644
- var _b, _c, _d, _e, _f, _g, _h;
9645
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9760
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
9761
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
9646
9762
  const { sxpParameter } = useSxpDataSource();
9647
9763
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9648
- const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
9764
+ const src = (_g = (_f = (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.product) === null || _c === void 0 ? void 0 : _c.cover) !== null && _d !== void 0 ? _d : (_e = product === null || product === void 0 ? void 0 : product.homePage) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _g !== void 0 ? _g : bottom_image;
9649
9765
  return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9650
9766
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9651
- React.createElement(FormatImage$1, { className: css.css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })),
9767
+ React.createElement(FormatImage$1, { className: css.css({
9768
+ width: '100%',
9769
+ objectFit: 'cover',
9770
+ height: '100%',
9771
+ display: 'block',
9772
+ transform: `translateY(${translateY}%)`
9773
+ }), src: src })),
9652
9774
  React.createElement("div", { className: css.css({
9653
9775
  color: '#fff',
9654
9776
  display: 'flex',
@@ -9657,8 +9779,8 @@ const CommodityDiro$1 = (_a) => {
9657
9779
  width: '100%',
9658
9780
  overflow: 'hidden'
9659
9781
  }) },
9660
- React.createElement("div", { className: styles$4['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
9661
- React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
9782
+ React.createElement("div", { className: styles$4['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_h = product === null || product === void 0 ? void 0 : product.title) !== null && _h !== void 0 ? _h : 'Product Name'),
9783
+ React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_k = (_j = product === null || product === void 0 ? void 0 : product.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop Now'))));
9662
9784
  };
9663
9785
  var CommodityDiroComponent = React.memo(CommodityDiro$1);
9664
9786
 
@@ -9733,14 +9855,20 @@ var interactionRender$3 = [
9733
9855
  var styles$3 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
9734
9856
 
9735
9857
  const CommodityDiroNew$1 = (_a) => {
9736
- var _b, _c, _d, _e, _f, _g, _h;
9737
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9858
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
9859
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
9738
9860
  const { sxpParameter } = useSxpDataSource();
9739
9861
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9740
- const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
9862
+ const src = (_g = (_f = (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.product) === null || _c === void 0 ? void 0 : _c.cover) !== null && _d !== void 0 ? _d : (_e = product === null || product === void 0 ? void 0 : product.homePage) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _g !== void 0 ? _g : bottom_image;
9741
9863
  return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9742
9864
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9743
- React.createElement(FormatImage$1, { className: css.css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })),
9865
+ React.createElement(FormatImage$1, { className: css.css({
9866
+ width: '100%',
9867
+ objectFit: 'cover',
9868
+ height: '100%',
9869
+ display: 'block',
9870
+ transform: `translateY(${translateY}%)`
9871
+ }), src: src })),
9744
9872
  React.createElement("div", { className: css.css({
9745
9873
  color: '#fff',
9746
9874
  display: 'flex',
@@ -9749,8 +9877,8 @@ const CommodityDiroNew$1 = (_a) => {
9749
9877
  width: '100%',
9750
9878
  overflow: 'hidden'
9751
9879
  }) },
9752
- React.createElement("div", { className: styles$3['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
9753
- React.createElement("div", { className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop now'))));
9880
+ React.createElement("div", { className: styles$3['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_h = product === null || product === void 0 ? void 0 : product.title) !== null && _h !== void 0 ? _h : 'Product Name'),
9881
+ React.createElement("div", { className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_k = (_j = product === null || product === void 0 ? void 0 : product.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop now'))));
9754
9882
  };
9755
9883
  var CommodityDiroNewComponent = React.memo(CommodityDiroNew$1);
9756
9884
 
@@ -9832,11 +9960,11 @@ var Scroll$1 = React.memo(Scroll);
9832
9960
  * @Author: binruan@chatlabs.com
9833
9961
  * @Date: 2024-01-16 14:50:13
9834
9962
  * @LastEditors: binruan@chatlabs.com
9835
- * @LastEditTime: 2024-04-18 12:32:49
9963
+ * @LastEditTime: 2024-05-21 16:34:13
9836
9964
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
9837
9965
  *
9838
9966
  */
9839
- const Img = ({ src, rec, item, index }) => {
9967
+ const Img = ({ src, rec, item, index, style }) => {
9840
9968
  const ref = React.useRef(null);
9841
9969
  const isOnScreen = useOnScreen(ref);
9842
9970
  const { ctaEvent } = useSxpDataSource();
@@ -9849,7 +9977,7 @@ const Img = ({ src, rec, item, index }) => {
9849
9977
  }
9850
9978
  }, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
9851
9979
  return (React.createElement("div", { ref: ref, hidden: !src, className: css.css({ width: '100%', height: '100%' }) },
9852
- React.createElement(FormatImage$1, { className: css.css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })));
9980
+ React.createElement(FormatImage$1, { className: css.css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }, style)), src: src })));
9853
9981
  };
9854
9982
  var Img$1 = React.memo(Img);
9855
9983
 
@@ -9857,7 +9985,7 @@ var styles$2 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
9857
9985
 
9858
9986
  const MultiCommodityDiro$1 = (_a) => {
9859
9987
  var _b, _c;
9860
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
9988
+ 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"]);
9861
9989
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9862
9990
  const { popup } = useEditor();
9863
9991
  const { jumpToWeb } = useEventReport();
@@ -9879,10 +10007,12 @@ const MultiCommodityDiro$1 = (_a) => {
9879
10007
  }
9880
10008
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
9881
10009
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9882
- var _a, _b, _c, _d, _e, _f;
10010
+ var _a, _b, _c, _d, _e, _f, _g;
9883
10011
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), 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) }),
9884
10012
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9885
- React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index })),
10013
+ 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, style: {
10014
+ transform: `translateY(${translateY}%)`
10015
+ } })),
9886
10016
  React.createElement("div", { className: css.css({
9887
10017
  color: '#000',
9888
10018
  display: 'flex',
@@ -9891,8 +10021,8 @@ const MultiCommodityDiro$1 = (_a) => {
9891
10021
  width: '100%',
9892
10022
  overflow: 'hidden'
9893
10023
  }) },
9894
- React.createElement("div", { className: styles$2['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_d = item === null || item === void 0 ? void 0 : item.title) !== null && _d !== void 0 ? _d : 'Product Name'),
9895
- React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_f = (_e = item === null || item === void 0 ? void 0 : item.bindCta) === null || _e === void 0 ? void 0 : _e.enTitle) !== null && _f !== void 0 ? _f : 'Shop Now'))));
10024
+ React.createElement("div", { className: styles$2['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
10025
+ React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_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'))));
9896
10026
  })));
9897
10027
  };
9898
10028
  var MultiCommodityDiroComponent = React.memo(MultiCommodityDiro$1);
@@ -9969,7 +10099,7 @@ var styles$1 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
9969
10099
 
9970
10100
  const MultiCommodity$1 = (_a) => {
9971
10101
  var _b, _c;
9972
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
10102
+ 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"]);
9973
10103
  const { sxpParameter } = useSxpDataSource();
9974
10104
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9975
10105
  const { popup } = useEditor();
@@ -9992,10 +10122,12 @@ const MultiCommodity$1 = (_a) => {
9992
10122
  }
9993
10123
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
9994
10124
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9995
- var _a, _b, _c, _d, _e, _f;
10125
+ var _a, _b, _c, _d, _e, _f, _g;
9996
10126
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
9997
10127
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9998
- React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index })),
10128
+ 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, style: {
10129
+ transform: `translateY(${translateY}%)`
10130
+ } })),
9999
10131
  React.createElement("div", { className: css.css({
10000
10132
  color: '#fff',
10001
10133
  display: 'flex',
@@ -10004,8 +10136,8 @@ const MultiCommodity$1 = (_a) => {
10004
10136
  width: '100%',
10005
10137
  overflow: 'hidden'
10006
10138
  }) },
10007
- React.createElement("div", { className: styles$1['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_d = item === null || item === void 0 ? void 0 : item.title) !== null && _d !== void 0 ? _d : 'Product Name'),
10008
- React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_f = (_e = item === null || item === void 0 ? void 0 : item.bindCta) === null || _e === void 0 ? void 0 : _e.enTitle) !== null && _f !== void 0 ? _f : 'Shop Now'))));
10139
+ React.createElement("div", { className: styles$1['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
10140
+ React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_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'))));
10009
10141
  })));
10010
10142
  };
10011
10143
  var MultiCommodityComponent = React.memo(MultiCommodity$1);
@@ -10082,7 +10214,7 @@ var styles = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
10082
10214
 
10083
10215
  const MultiCommodityDiroNew$1 = (_a) => {
10084
10216
  var _b, _c;
10085
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
10217
+ 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"]);
10086
10218
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
10087
10219
  const { popup } = useEditor();
10088
10220
  const { jumpToWeb } = useEventReport();
@@ -10104,10 +10236,12 @@ const MultiCommodityDiroNew$1 = (_a) => {
10104
10236
  }
10105
10237
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
10106
10238
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
10107
- var _a, _b, _c, _d, _e, _f;
10239
+ var _a, _b, _c, _d, _e, _f, _g;
10108
10240
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), 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) }),
10109
10241
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
10110
- React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index })),
10242
+ 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, style: {
10243
+ transform: `translateY(${translateY}%)`
10244
+ } })),
10111
10245
  React.createElement("div", { className: css.css({
10112
10246
  color: '#fff',
10113
10247
  display: 'flex',
@@ -10117,8 +10251,8 @@ const MultiCommodityDiroNew$1 = (_a) => {
10117
10251
  overflow: 'hidden',
10118
10252
  lineHeight: '20px'
10119
10253
  }) },
10120
- React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_d = item === null || item === void 0 ? void 0 : item.title) !== null && _d !== void 0 ? _d : 'Product Name'),
10121
- React.createElement("div", { className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_f = (_e = item === null || item === void 0 ? void 0 : item.bindCta) === null || _e === void 0 ? void 0 : _e.enTitle) !== null && _f !== void 0 ? _f : 'Shop now'))));
10254
+ React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
10255
+ React.createElement("div", { className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_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'))));
10122
10256
  })));
10123
10257
  };
10124
10258
  var MultiCommodityDiroNewComponent = React.memo(MultiCommodityDiroNew$1);
@@ -10127,7 +10261,7 @@ var MultiCommodityDiroNewComponent = React.memo(MultiCommodityDiroNew$1);
10127
10261
  * @Author: binruan@chatlabs.com
10128
10262
  * @Date: 2023-07-28 18:29:57
10129
10263
  * @LastEditors: binruan@chatlabs.com
10130
- * @LastEditTime: 2024-04-09 21:40:37
10264
+ * @LastEditTime: 2024-05-21 16:44:00
10131
10265
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\material.tsx
10132
10266
  *
10133
10267
  */
@@ -10185,7 +10319,7 @@ var _a, _b;
10185
10319
  * @Author: binruan@chatlabs.com
10186
10320
  * @Date: 2024-04-07 14:07:12
10187
10321
  * @LastEditors: binruan@chatlabs.com
10188
- * @LastEditTime: 2024-04-29 19:55:53
10322
+ * @LastEditTime: 2024-05-23 11:03:15
10189
10323
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
10190
10324
  *
10191
10325
  */
@@ -10193,11 +10327,11 @@ var settingRender = [
10193
10327
  {
10194
10328
  title: '卡片样式',
10195
10329
  child: [
10196
- {
10197
- type: 'Number',
10198
- label: '文本行数',
10199
- name: ['props', 'lineClamp']
10200
- },
10330
+ // {
10331
+ // type: 'Number',
10332
+ // label: '文本行数',
10333
+ // name: ['props', 'lineClamp']
10334
+ // },
10201
10335
  {
10202
10336
  type: 'Number',
10203
10337
  label: '上下边距',
@@ -11681,19 +11815,15 @@ const WaterfallFlowItem = (props) => {
11681
11815
  const canvasRef = React.useRef(null);
11682
11816
  const [firstFrameSrc, setFirstFrameSrc] = React.useState('');
11683
11817
  const src = React.useMemo(() => {
11684
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
11818
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
11685
11819
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) {
11686
11820
  return (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
11687
11821
  }
11688
- else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.url) {
11689
- setShowVideo(true);
11690
- return (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.url;
11691
- }
11692
- else if ((_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.imgUrls) === null || _f === void 0 ? void 0 : _f.length) {
11693
- return (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.imgUrls) === null || _h === void 0 ? void 0 : _h[0];
11822
+ else if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.imgUrls) === null || _d === void 0 ? void 0 : _d.length) {
11823
+ return (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.imgUrls) === null || _f === void 0 ? void 0 : _f[0];
11694
11824
  }
11695
- else if ((_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.homePage) === null || _k === void 0 ? void 0 : _k.length) {
11696
- return (_m = (_l = rec === null || rec === void 0 ? void 0 : rec.product) === null || _l === void 0 ? void 0 : _l.homePage) === null || _m === void 0 ? void 0 : _m[0];
11825
+ else if ((_h = (_g = rec === null || rec === void 0 ? void 0 : rec.product) === null || _g === void 0 ? void 0 : _g.homePage) === null || _h === void 0 ? void 0 : _h.length) {
11826
+ return (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.homePage) === null || _k === void 0 ? void 0 : _k[0];
11697
11827
  }
11698
11828
  else {
11699
11829
  return (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) || '';
@@ -12337,7 +12467,6 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12337
12467
  const videoSrc = rec.video.url;
12338
12468
  if (!videoSrc)
12339
12469
  return;
12340
- videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
12341
12470
  setIsPauseVideo(false);
12342
12471
  const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
12343
12472
  const dom = document.querySelector('#player-container-id');
@@ -12345,6 +12474,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12345
12474
  if (!dom && !dom2)
12346
12475
  return;
12347
12476
  videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
12477
+ videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
12348
12478
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
12349
12479
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
12350
12480
  // videoRef?.on('canplay', handleCanplay);
@@ -12484,7 +12614,7 @@ var ToggleButton$1 = React.memo(ToggleButton);
12484
12614
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FingerSwipeTip\index.tsx
12485
12615
  *
12486
12616
  */
12487
- const FingerSwipeTip = ({ imageUrl }) => {
12617
+ const FingerSwipeTip = ({ imageUrl, style }) => {
12488
12618
  const [show, setShow] = React.useState(true);
12489
12619
  useEditor();
12490
12620
  React.useEffect(() => {
@@ -12496,7 +12626,7 @@ const FingerSwipeTip = ({ imageUrl }) => {
12496
12626
  const animationCls = React.useMemo(() => {
12497
12627
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
12498
12628
  }, [show]);
12499
- return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}` },
12629
+ return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
12500
12630
  React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON })));
12501
12631
  };
12502
12632
 
@@ -12742,7 +12872,7 @@ var RenderCard$1 = React.memo(RenderCard);
12742
12872
  * @Author: binruan@chatlabs.com
12743
12873
  * @Date: 2024-03-26 10:07:41
12744
12874
  * @LastEditors: binruan@chatlabs.com
12745
- * @LastEditTime: 2024-04-15 14:27:18
12875
+ * @LastEditTime: 2024-05-23 14:31:12
12746
12876
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Nudge\index.tsx
12747
12877
  *
12748
12878
  */
@@ -12755,8 +12885,8 @@ const Nudge = ({ nudge }) => {
12755
12885
  backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
12756
12886
  borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
12757
12887
  } },
12758
- (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
12759
- React.createElement("p", { style: Object.assign(Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle), { textWrap: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
12888
+ (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover', flexShrink: 0 } }) : null,
12889
+ React.createElement("p", { style: Object.assign(Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle), { textWrap: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', flex: 1, marginBottom: 0 }) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
12760
12890
  };
12761
12891
 
12762
12892
  const DEFAULT_TAG = 'FOR U';
@@ -12800,12 +12930,12 @@ var Tagbar$1 = React.memo(Tagbar);
12800
12930
  * @Author: binruan@chatlabs.com
12801
12931
  * @Date: 2024-01-15 19:03:09
12802
12932
  * @LastEditors: binruan@chatlabs.com
12803
- * @LastEditTime: 2024-05-20 19:26:50
12933
+ * @LastEditTime: 2024-05-23 10:41:27
12804
12934
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12805
12935
  *
12806
12936
  */
12807
12937
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
12808
- var _a, _b, _c, _d, _e, _f, _g;
12938
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
12809
12939
  const { schema } = useEditor();
12810
12940
  const [activeIndex, setActiveIndex] = React.useState(0);
12811
12941
  const viewImageStartTime = React.useRef(0);
@@ -12860,29 +12990,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12860
12990
  };
12861
12991
  const firstRef = React.useRef();
12862
12992
  React.useEffect(() => {
12863
- var _a, _b, _c;
12864
- if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
12993
+ if (!firstRef.current && !videoRef) {
12865
12994
  firstRef.current = true;
12866
12995
  const player = TCPlayer('player-container-id', {
12867
12996
  licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12868
12997
  controls: false,
12998
+ autoplay: false,
12869
12999
  loop: false,
12870
- autoplay: true,
12871
13000
  muted: true,
12872
13001
  preload: 'auto',
12873
13002
  posterImage: false,
12874
- bigPlayButton: true,
12875
- sources: [
12876
- {
12877
- src: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) !== null && _c !== void 0 ? _c : ''
12878
- }
12879
- ]
13003
+ bigPlayButton: true
12880
13004
  });
12881
13005
  player === null || player === void 0 ? void 0 : player.ready(() => {
12882
13006
  setVideoRef(player);
12883
13007
  });
12884
13008
  }
12885
- }, [videoRef, licenseUrl, data]);
13009
+ }, [videoRef, licenseUrl]);
12886
13010
  React.useEffect(() => {
12887
13011
  if (!isInit)
12888
13012
  handleH5EnterLink();
@@ -13071,7 +13195,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13071
13195
  lineGradStyle
13072
13196
  ]);
13073
13197
  const renderLikeButton = React.useCallback((rec, index) => {
13074
- var _a, _b;
13198
+ var _a, _b, _c, _d;
13075
13199
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
13076
13200
  return;
13077
13201
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
@@ -13080,8 +13204,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13080
13204
  }
13081
13205
  if (rec.video) {
13082
13206
  return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
13083
- top,
13084
- right: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _b !== void 0 ? _b : 0
13207
+ [(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
13208
+ [(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
13085
13209
  }, position: index }));
13086
13210
  }
13087
13211
  return null;
@@ -13108,7 +13232,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13108
13232
  }
13109
13233
  };
13110
13234
  const handleScrollEvent = (swiper) => {
13111
- var _a, _b, _c, _d, _e, _f, _g, _h;
13235
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
13112
13236
  viewTime.current = new Date();
13113
13237
  const item = data[swiper.previousIndex];
13114
13238
  if (!item)
@@ -13141,14 +13265,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13141
13265
  }
13142
13266
  // 商品浏览事件
13143
13267
  handleReportProductView(item);
13268
+ const curItem = data[swiper.activeIndex];
13269
+ 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)) {
13270
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
13271
+ eventName: 'ProductView'
13272
+ });
13273
+ }
13144
13274
  };
13145
13275
  const handleReportProductView = (item) => {
13146
13276
  var _a, _b, _c;
13147
13277
  if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && !((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls) && (item === null || item === void 0 ? void 0 : item.product)) {
13148
13278
  productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current, activeIndex);
13149
- bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
13150
- eventName: 'ProductView'
13151
- });
13152
13279
  }
13153
13280
  };
13154
13281
  React.useEffect(() => {
@@ -13219,7 +13346,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13219
13346
  } })),
13220
13347
  renderLogo,
13221
13348
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
13222
- isShowFingerTip ? React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
13349
+ 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,
13223
13350
  React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
13224
13351
  swiperRef.current.swiper.allowTouchMove = false;
13225
13352
  setTimeout(() => {
@@ -13261,13 +13388,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13261
13388
  direction: 'vertical', height: height },
13262
13389
  React.createElement(ToggleButton$1, { style: {
13263
13390
  position: 'fixed',
13264
- right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
13265
13391
  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',
13266
- bottom: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _d !== void 0 ? _d : 23,
13267
- zIndex: 999
13392
+ zIndex: 999,
13393
+ [(_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,
13394
+ [(_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
13268
13395
  }, 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 }),
13269
13396
  renderView),
13270
- React.createElement(WaterFall$1, Object.assign({}, (_g = (_f = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.item) === null || _g === void 0 ? void 0 : _g.props)),
13397
+ 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)),
13271
13398
  React.createElement("div", { style: { position: 'absolute', zIndex: -100 } },
13272
13399
  React.createElement("video", { ref: playerRef, id: 'player-container-id', playsInline: true, crossOrigin: 'anonymous', style: {
13273
13400
  backgroundColor: 'transparent',
@@ -13423,8 +13550,8 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13423
13550
  if (!videoRef.current.src) {
13424
13551
  const videoSrc = rec.video.url;
13425
13552
  if (videoSrc.includes('.m3u8')) {
13426
- if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.Hls.isSupported())) {
13427
- const hls = new window.Hls();
13553
+ if (Hls.isSupported()) {
13554
+ const hls = new Hls();
13428
13555
  hls.loadSource(videoSrc);
13429
13556
  hls.attachMedia(videoRef.current);
13430
13557
  }
@@ -13710,7 +13837,7 @@ const Popup = () => {
13710
13837
  * @Author: binruan@chatlabs.com
13711
13838
  * @Date: 2024-01-15 19:03:09
13712
13839
  * @LastEditors: binruan@chatlabs.com
13713
- * @LastEditTime: 2024-05-17 18:41:05
13840
+ * @LastEditTime: 2024-05-06 17:26:37
13714
13841
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
13715
13842
  *
13716
13843
  */
@@ -13727,14 +13854,14 @@ Object.values(_materials_).forEach((v) => {
13727
13854
  RESOLVER[v.extend.type] = v;
13728
13855
  });
13729
13856
  const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
13730
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13857
+ var _a, _b, _c, _d, _e, _f;
13731
13858
  const utmVal = React.useMemo(() => {
13732
13859
  var _a;
13733
13860
  const searchParams = (location === null || location === void 0 ? void 0 : location.search) ? (_a = location === null || location === void 0 ? void 0 : location.search) === null || _a === void 0 ? void 0 : _a.replace('?', '') : '';
13734
13861
  return searchParams;
13735
13862
  }, []);
13736
13863
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
13737
- React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, render: ({ rtcList, tagList }) => {
13864
+ React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, render: ({ rtcList, tagList }) => {
13738
13865
  var _a;
13739
13866
  return (React.createElement(React.Fragment, null,
13740
13867
  React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER, licenseUrl: licenseUrl })),