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/pb-ui.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('eventemitter3'), require('@emotion/css'), require('@ant-design/pro-components'), require('react-dom')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', 'eventemitter3', '@emotion/css', '@ant-design/pro-components', 'react-dom'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.EventEmitter, global.css, global.proComponents, global.ReactDOM));
5
- })(this, (function (exports, lodash, uuid$1, pako, React, qs, EventEmitter, css, proComponents, ReactDOM) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('eventemitter3'), require('@emotion/css'), require('react-dom'), require('hls.js')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', 'eventemitter3', '@emotion/css', 'react-dom', 'hls.js'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.EventEmitter, global.css, global.ReactDOM, global.Hls));
5
+ })(this, (function (exports, lodash, uuid$1, pako, React, qs, EventEmitter, css, ReactDOM, Hls) { 'use strict';
6
6
 
7
7
  function _interopNamespaceDefault(e) {
8
8
  var n = Object.create(null);
@@ -438,7 +438,7 @@
438
438
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
439
439
  })(DataSourceType || (DataSourceType = {}));
440
440
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
441
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
441
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
442
442
  const [rtcList, setRtcList] = React.useState([]);
443
443
  const [tagList, setTagList] = React.useState([]);
444
444
  const [loading, setLoading] = React.useState(false);
@@ -571,9 +571,17 @@
571
571
  if (!enableReportEvent || !enabledMetaConversionApi) {
572
572
  return;
573
573
  }
574
+ const fakeUserId = storeAndLoadFeUserId();
574
575
  return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
575
576
  method: 'POST',
576
- body: { eventName, actionSource, eventSourceUrl, 'userData.externalId': externalId },
577
+ body: {
578
+ eventName,
579
+ actionSource,
580
+ eventSourceUrl,
581
+ userData: {
582
+ externalId: fakeUserId
583
+ }
584
+ },
577
585
  type: 'beacon'
578
586
  });
579
587
  }, [bffFetch, enableReportEvent, enabledMetaConversionApi]);
@@ -592,7 +600,7 @@
592
600
  // 获取 Tag
593
601
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
594
602
  var _h, _j, _k, _l, _m;
595
- if (!utmVal || !isShowTag)
603
+ if (!utmVal)
596
604
  return;
597
605
  try {
598
606
  const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
@@ -605,7 +613,7 @@
605
613
  catch (e) {
606
614
  console.log('e', e);
607
615
  }
608
- }), [bffFetch, utmVal, isShowTag]);
616
+ }), [bffFetch, utmVal]);
609
617
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
610
618
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
611
619
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -938,23 +946,30 @@
938
946
  }
939
947
  ];
940
948
 
941
- const fontOptions = [
942
- { label: '应用字体', value: 'appFont' },
943
- { label: '黑体', value: '黑体' }
944
- ];
949
+ /*
950
+ * @Author: binruan@chatlabs.com
951
+ * @Date: 2024-04-28 14:42:22
952
+ * @LastEditors: binruan@chatlabs.com
953
+ * @LastEditTime: 2024-05-23 17:01:21
954
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\defaultSetting.ts
955
+ *
956
+ */
957
+ const fontOptions = [{ label: 'defalut', value: 'appFont' }];
958
+ const sxpFonts = typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.localStorage.getItem('sxp_font_links'));
959
+ const data = sxpFonts && sxpFonts !== '' ? JSON.parse(sxpFonts) : [];
945
960
  var defaultSetting = {
946
- fontOptions
961
+ fontOptions: [...fontOptions, ...data]
947
962
  };
948
963
 
949
964
  /*
950
965
  * @Author: binruan@chatlabs.com
951
966
  * @Date: 2023-07-28 18:29:57
952
967
  * @LastEditors: binruan@chatlabs.com
953
- * @LastEditTime: 2023-12-14 10:51:16
968
+ * @LastEditTime: 2024-05-17 10:11:41
954
969
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
955
970
  *
956
971
  */
957
- var _a$4;
972
+ var _a$5, _b$5, _c;
958
973
  var settingRender$5 = [
959
974
  {
960
975
  type: 'Text',
@@ -981,7 +996,7 @@
981
996
  type: 'Select',
982
997
  name: ['textStyle', 'fontFamily'],
983
998
  options: fontOptions,
984
- initialValue: (_a$4 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$4 === void 0 ? void 0 : _a$4.value
999
+ initialValue: (_a$5 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$5 === void 0 ? void 0 : _a$5.value
985
1000
  },
986
1001
  {
987
1002
  type: 'Number',
@@ -1024,6 +1039,37 @@
1024
1039
  type: 'Text',
1025
1040
  name: ['props', 'submitText']
1026
1041
  },
1042
+ {
1043
+ type: 'Group',
1044
+ label: '提交按钮字体',
1045
+ child: [
1046
+ {
1047
+ type: 'Color',
1048
+ name: ['props', 'submitButtonStyle', 'color'],
1049
+ initialValue: '#fff'
1050
+ },
1051
+ {
1052
+ type: 'Select',
1053
+ name: ['props', 'submitButtonStyle', 'fontFamily'],
1054
+ options: defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions,
1055
+ 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
1056
+ },
1057
+ {
1058
+ type: 'Number',
1059
+ name: ['props', 'submitButtonStyle', 'fontSize'],
1060
+ addonAfter: 'px',
1061
+ initialValue: 12
1062
+ }
1063
+ ]
1064
+ },
1065
+ {
1066
+ type: 'TextStyle',
1067
+ name: ['props', 'submitButtonStyle']
1068
+ },
1069
+ {
1070
+ type: 'TextAlign',
1071
+ name: ['props', 'submitButtonStyle']
1072
+ },
1027
1073
  {
1028
1074
  label: '提交文本颜色',
1029
1075
  type: 'Color',
@@ -1144,7 +1190,7 @@
1144
1190
  }
1145
1191
 
1146
1192
  const AppointForm$1 = (_a) => {
1147
- 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"]);
1193
+ 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"]);
1148
1194
  const { submitForm, popupDetailData } = useSxpDataSource();
1149
1195
  const { jumpToWeb } = useEventReport();
1150
1196
  const formRef = React.useRef();
@@ -1175,7 +1221,7 @@
1175
1221
  key: '4'
1176
1222
  }
1177
1223
  ], []);
1178
- const columnsData = React.useMemo(() => {
1224
+ React.useMemo(() => {
1179
1225
  if (layoutType === undefined) {
1180
1226
  const list = lodash.cloneDeep(columns) || defaultColumns;
1181
1227
  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 } })));
@@ -1218,13 +1264,9 @@
1218
1264
  return (React.createElement("div", { className: 'pb-appoint-form' },
1219
1265
  React.createElement("div", { className: `pb-appoint-form-title ${css.css(Object.assign({}, textStyle))}` }, title),
1220
1266
  React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
1221
- React.createElement("div", { className: 'pb-appoint-form-container' },
1222
- React.createElement(proComponents.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
1267
+ React.createElement("div", { className: 'pb-appoint-form-container' })),
1223
1268
  React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
1224
- React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
1225
- color: submitColor,
1226
- background: submitBgColor
1227
- } }, loading ? React.createElement(React.Fragment, null, "loading...") : submitText))));
1269
+ 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))));
1228
1270
  };
1229
1271
  var AppointFormComponent = React.memo(AppointForm$1);
1230
1272
 
@@ -1272,23 +1314,7 @@
1272
1314
  sort: 2
1273
1315
  });
1274
1316
 
1275
- /*
1276
- * @Author: binruan@chatlabs.com
1277
- * @Date: 2024-04-02 18:01:34
1278
- * @LastEditors: binruan@chatlabs.com
1279
- * @LastEditTime: 2024-04-12 16:46:04
1280
- * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\settingRender.tsx
1281
- *
1282
- */
1283
- var _a$3, _b$3;
1284
- /*
1285
- * @Author: binruan@chatlabs.com
1286
- * @Date: 2024-03-26 16:50:25
1287
- * @LastEditors: binruan@chatlabs.com
1288
- * @LastEditTime: 2024-03-28 18:42:26
1289
- * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
1290
- *
1291
- */
1317
+ var _a$4, _b$4;
1292
1318
  var settingRender$4 = [
1293
1319
  {
1294
1320
  title: '商品图片',
@@ -1312,6 +1338,19 @@
1312
1338
  type: 'Number',
1313
1339
  name: ['props', 'swiper', 'delay'],
1314
1340
  addonAfter: 's'
1341
+ },
1342
+ {
1343
+ type: 'Group',
1344
+ child: [
1345
+ {
1346
+ label: '居中垂直偏移',
1347
+ type: 'Number',
1348
+ name: ['props', 'swiper', 'translateY'],
1349
+ min: -100,
1350
+ addonAfter: '%',
1351
+ initialValue: 0
1352
+ }
1353
+ ]
1315
1354
  }
1316
1355
  ]
1317
1356
  },
@@ -1346,6 +1385,23 @@
1346
1385
  name: ['props', 'commodityStyles', 'field'],
1347
1386
  initialValue: 'title'
1348
1387
  },
1388
+ {
1389
+ type: 'Group',
1390
+ child: [
1391
+ {
1392
+ label: '上边距',
1393
+ type: 'Number',
1394
+ addonAfter: 'px',
1395
+ name: ['marginTop']
1396
+ },
1397
+ {
1398
+ label: '下边距',
1399
+ type: 'Number',
1400
+ addonAfter: 'px',
1401
+ name: ['marginBottom']
1402
+ }
1403
+ ]
1404
+ },
1349
1405
  {
1350
1406
  type: 'Group',
1351
1407
  label: '标题字体',
@@ -1358,7 +1414,7 @@
1358
1414
  type: 'Select',
1359
1415
  options: fontOptions,
1360
1416
  name: ['fontFamily'],
1361
- initialValue: (_a$3 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$3 === void 0 ? void 0 : _a$3.value
1417
+ initialValue: (_a$4 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$4 === void 0 ? void 0 : _a$4.value
1362
1418
  },
1363
1419
  {
1364
1420
  type: 'Number',
@@ -1438,7 +1494,7 @@
1438
1494
  type: 'Select',
1439
1495
  name: ['props', 'buttonStyle', 'fontFamily'],
1440
1496
  options: fontOptions,
1441
- initialValue: (_b$3 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$3 === void 0 ? void 0 : _b$3.value
1497
+ initialValue: (_b$4 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$4 === void 0 ? void 0 : _b$4.value
1442
1498
  },
1443
1499
  {
1444
1500
  type: 'Number',
@@ -8383,7 +8439,7 @@
8383
8439
  * @Author: binruan@chatlabs.com
8384
8440
  * @Date: 2024-03-20 10:27:31
8385
8441
  * @LastEditors: binruan@chatlabs.com
8386
- * @LastEditTime: 2024-05-20 15:53:04
8442
+ * @LastEditTime: 2024-04-19 14:12:55
8387
8443
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
8388
8444
  *
8389
8445
  */
@@ -8398,30 +8454,6 @@
8398
8454
  React.useEffect(() => {
8399
8455
  setImgSrc(src);
8400
8456
  }, [src]);
8401
- React.useRef(null);
8402
- // useEffect(() => {
8403
- // let observer: any = null;
8404
- // const { current } = imgRef;
8405
- // if (current) {
8406
- // observer = new IntersectionObserver(
8407
- // (entries) => {
8408
- // entries.forEach((entry) => {
8409
- // if (entry.isIntersecting) {
8410
- // setImgSrc(src);
8411
- // observer.unobserve(current);
8412
- // }
8413
- // });
8414
- // },
8415
- // { threshold: 0.1 } // 触发阈值,可根据需要调整
8416
- // );
8417
- // observer.observe(current);
8418
- // }
8419
- // return () => {
8420
- // if (observer && current) {
8421
- // observer.unobserve(current);
8422
- // }
8423
- // };
8424
- // }, [src]);
8425
8457
  return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
8426
8458
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8427
8459
  React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
@@ -8518,7 +8550,13 @@
8518
8550
  width,
8519
8551
  height: width
8520
8552
  } },
8521
- React.createElement(FormatImage$1, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
8553
+ React.createElement(FormatImage$1, { style: {
8554
+ height: '100%',
8555
+ width: '100%',
8556
+ objectFit: 'cover',
8557
+ display: 'block',
8558
+ transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
8559
+ }, src: src }))));
8522
8560
  }))),
8523
8561
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
8524
8562
  position: 'relative',
@@ -8567,7 +8605,9 @@
8567
8605
  commodityStyles: {
8568
8606
  price: {
8569
8607
  color: '#000',
8570
- fontSize: 18
8608
+ fontSize: 18,
8609
+ marginTop: 24,
8610
+ marginBottom: 10
8571
8611
  },
8572
8612
  title: {
8573
8613
  color: '#000',
@@ -8575,7 +8615,8 @@
8575
8615
  },
8576
8616
  collection: {
8577
8617
  fontSize: 12,
8578
- color: '#000'
8618
+ color: '#000',
8619
+ marginBottom: 14
8579
8620
  },
8580
8621
  info: {
8581
8622
  color: 'gray',
@@ -8614,26 +8655,68 @@
8614
8655
  * @Author: binruan@chatlabs.com
8615
8656
  * @Date: 2023-10-27 14:06:35
8616
8657
  * @LastEditors: binruan@chatlabs.com
8617
- * @LastEditTime: 2023-11-08 09:55:32
8658
+ * @LastEditTime: 2024-05-17 10:29:41
8618
8659
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
8619
8660
  *
8620
8661
  */
8662
+ var _a$3, _b$3;
8621
8663
  var settingRender$3 = [
8622
8664
  {
8623
- type: 'Media',
8624
- label: '图标',
8625
- name: ['props', 'icon'],
8626
- mediaType: 'Image'
8627
- },
8628
- {
8629
- type: 'TextArea',
8630
- label: '内容',
8631
- name: ['props', 'content']
8632
- },
8633
- {
8634
- type: 'Text',
8635
- label: '按钮文案',
8636
- name: ['props', 'btnText']
8665
+ title: '',
8666
+ child: [
8667
+ {
8668
+ type: 'Media',
8669
+ label: '图标',
8670
+ name: ['props', 'icon'],
8671
+ mediaType: 'Image'
8672
+ },
8673
+ {
8674
+ type: 'TextArea',
8675
+ label: '内容',
8676
+ name: ['props', 'content']
8677
+ },
8678
+ {
8679
+ type: 'Text',
8680
+ label: '按钮文案',
8681
+ name: ['props', 'btnText']
8682
+ },
8683
+ {
8684
+ type: 'Group',
8685
+ label: '提交按钮字体',
8686
+ child: [
8687
+ {
8688
+ type: 'Color',
8689
+ name: ['props', 'submitButtonStyle', 'color'],
8690
+ initialValue: '#fff'
8691
+ },
8692
+ {
8693
+ type: 'Select',
8694
+ name: ['props', 'submitButtonStyle', 'fontFamily'],
8695
+ options: defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions,
8696
+ 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
8697
+ },
8698
+ {
8699
+ type: 'Number',
8700
+ name: ['props', 'submitButtonStyle', 'fontSize'],
8701
+ addonAfter: 'px',
8702
+ initialValue: 12
8703
+ }
8704
+ ]
8705
+ },
8706
+ {
8707
+ type: 'TextStyle',
8708
+ name: ['props', 'submitButtonStyle']
8709
+ },
8710
+ {
8711
+ type: 'TextAlign',
8712
+ name: ['props', 'submitButtonStyle']
8713
+ },
8714
+ {
8715
+ label: '提交按钮颜色',
8716
+ type: 'Color',
8717
+ name: ['props', 'submitButtonStyle', 'backgroundColor']
8718
+ }
8719
+ ]
8637
8720
  }
8638
8721
  ];
8639
8722
 
@@ -8672,7 +8755,7 @@
8672
8755
  };
8673
8756
 
8674
8757
  const Prompt$1 = (_a) => {
8675
- var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick"]);
8758
+ var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle"]);
8676
8759
  const { popupDetailData } = useSxpDataSource();
8677
8760
  const { jumpToWeb } = useEventReport();
8678
8761
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
@@ -8694,7 +8777,7 @@
8694
8777
  React.createElement("div", { className: 'pb-prompt-icon' },
8695
8778
  React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$2 })),
8696
8779
  React.createElement("div", { className: 'pb-prompt-content' }, content),
8697
- React.createElement("button", { className: 'pb-prompt-btn', onClick: handleOk }, btnText)));
8780
+ React.createElement("button", { className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
8698
8781
  };
8699
8782
  var PromptComponent = React.memo(Prompt$1);
8700
8783
 
@@ -8753,6 +8836,19 @@
8753
8836
  type: 'Number',
8754
8837
  name: ['props', 'swiper', 'delay'],
8755
8838
  addonAfter: 's'
8839
+ },
8840
+ {
8841
+ type: 'Group',
8842
+ child: [
8843
+ {
8844
+ label: '居中垂直偏移',
8845
+ type: 'Number',
8846
+ name: ['props', 'swiper', 'translateY'],
8847
+ min: -100,
8848
+ addonAfter: '%',
8849
+ initialValue: 0
8850
+ }
8851
+ ]
8756
8852
  }
8757
8853
  ]
8758
8854
  },
@@ -8984,7 +9080,13 @@ Made in Italy` })));
8984
9080
  width,
8985
9081
  height: width
8986
9082
  } },
8987
- React.createElement(FormatImage$1, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
9083
+ React.createElement(FormatImage$1, { style: {
9084
+ height: '100%',
9085
+ width: '100%',
9086
+ objectFit: 'cover',
9087
+ display: 'block',
9088
+ transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
9089
+ }, src: src }))));
8988
9090
  }))),
8989
9091
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
8990
9092
  position: 'relative',
@@ -9085,7 +9187,7 @@ Made in Italy` })));
9085
9187
  * @Author: binruan@chatlabs.com
9086
9188
  * @Date: 2024-03-26 16:50:25
9087
9189
  * @LastEditors: binruan@chatlabs.com
9088
- * @LastEditTime: 2024-04-12 17:38:12
9190
+ * @LastEditTime: 2024-05-21 16:39:34
9089
9191
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
9090
9192
  *
9091
9193
  */
@@ -9186,6 +9288,14 @@ Made in Italy` })));
9186
9288
  label: '与右侧边距',
9187
9289
  addonAfter: 'px',
9188
9290
  name: ['props', 'ctaTempStyles', 'img', 'marginRight']
9291
+ },
9292
+ {
9293
+ label: '居中垂直偏移',
9294
+ type: 'Number',
9295
+ name: ['props', 'translateY'],
9296
+ min: -100,
9297
+ addonAfter: '%',
9298
+ initialValue: 0
9189
9299
  }
9190
9300
  ]
9191
9301
  },
@@ -9390,14 +9500,20 @@ Made in Italy` })));
9390
9500
  var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
9391
9501
 
9392
9502
  const Commodity$1 = (_a) => {
9393
- var _b, _c, _d, _e, _f, _g, _h;
9394
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9503
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
9504
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
9395
9505
  const { sxpParameter } = useSxpDataSource();
9396
9506
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9397
- 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;
9507
+ 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;
9398
9508
  return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9399
9509
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9400
- React.createElement(FormatImage$1, { className: css.css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })),
9510
+ React.createElement(FormatImage$1, { className: css.css({
9511
+ width: '100%',
9512
+ objectFit: 'cover',
9513
+ height: '100%',
9514
+ display: 'block',
9515
+ transform: `translateY(${translateY}%)`
9516
+ }), src: src })),
9401
9517
  React.createElement("div", { className: css.css({
9402
9518
  color: '#fff',
9403
9519
  display: 'flex',
@@ -9406,8 +9522,8 @@ Made in Italy` })));
9406
9522
  width: '100%',
9407
9523
  overflow: 'hidden'
9408
9524
  }) },
9409
- 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'),
9410
- 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'))));
9525
+ 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'),
9526
+ 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'))));
9411
9527
  };
9412
9528
  var CommodityComponent = React.memo(Commodity$1);
9413
9529
 
@@ -9633,14 +9749,20 @@ Made in Italy` })));
9633
9749
  var styles$4 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
9634
9750
 
9635
9751
  const CommodityDiro$1 = (_a) => {
9636
- var _b, _c, _d, _e, _f, _g, _h;
9637
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9752
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
9753
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
9638
9754
  const { sxpParameter } = useSxpDataSource();
9639
9755
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9640
- 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;
9756
+ 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;
9641
9757
  return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9642
9758
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9643
- React.createElement(FormatImage$1, { className: css.css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })),
9759
+ React.createElement(FormatImage$1, { className: css.css({
9760
+ width: '100%',
9761
+ objectFit: 'cover',
9762
+ height: '100%',
9763
+ display: 'block',
9764
+ transform: `translateY(${translateY}%)`
9765
+ }), src: src })),
9644
9766
  React.createElement("div", { className: css.css({
9645
9767
  color: '#fff',
9646
9768
  display: 'flex',
@@ -9649,8 +9771,8 @@ Made in Italy` })));
9649
9771
  width: '100%',
9650
9772
  overflow: 'hidden'
9651
9773
  }) },
9652
- 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'),
9653
- 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'))));
9774
+ 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'),
9775
+ 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'))));
9654
9776
  };
9655
9777
  var CommodityDiroComponent = React.memo(CommodityDiro$1);
9656
9778
 
@@ -9725,14 +9847,20 @@ Made in Italy` })));
9725
9847
  var styles$3 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
9726
9848
 
9727
9849
  const CommodityDiroNew$1 = (_a) => {
9728
- var _b, _c, _d, _e, _f, _g, _h;
9729
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9850
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
9851
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
9730
9852
  const { sxpParameter } = useSxpDataSource();
9731
9853
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
9732
- 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;
9854
+ 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;
9733
9855
  return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9734
9856
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9735
- React.createElement(FormatImage$1, { className: css.css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })),
9857
+ React.createElement(FormatImage$1, { className: css.css({
9858
+ width: '100%',
9859
+ objectFit: 'cover',
9860
+ height: '100%',
9861
+ display: 'block',
9862
+ transform: `translateY(${translateY}%)`
9863
+ }), src: src })),
9736
9864
  React.createElement("div", { className: css.css({
9737
9865
  color: '#fff',
9738
9866
  display: 'flex',
@@ -9741,8 +9869,8 @@ Made in Italy` })));
9741
9869
  width: '100%',
9742
9870
  overflow: 'hidden'
9743
9871
  }) },
9744
- 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'),
9745
- 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'))));
9872
+ 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'),
9873
+ 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'))));
9746
9874
  };
9747
9875
  var CommodityDiroNewComponent = React.memo(CommodityDiroNew$1);
9748
9876
 
@@ -9824,11 +9952,11 @@ Made in Italy` })));
9824
9952
  * @Author: binruan@chatlabs.com
9825
9953
  * @Date: 2024-01-16 14:50:13
9826
9954
  * @LastEditors: binruan@chatlabs.com
9827
- * @LastEditTime: 2024-04-18 12:32:49
9955
+ * @LastEditTime: 2024-05-21 16:34:13
9828
9956
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
9829
9957
  *
9830
9958
  */
9831
- const Img = ({ src, rec, item, index }) => {
9959
+ const Img = ({ src, rec, item, index, style }) => {
9832
9960
  const ref = React.useRef(null);
9833
9961
  const isOnScreen = useOnScreen(ref);
9834
9962
  const { ctaEvent } = useSxpDataSource();
@@ -9841,7 +9969,7 @@ Made in Italy` })));
9841
9969
  }
9842
9970
  }, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
9843
9971
  return (React.createElement("div", { ref: ref, hidden: !src, className: css.css({ width: '100%', height: '100%' }) },
9844
- React.createElement(FormatImage$1, { className: css.css({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })));
9972
+ React.createElement(FormatImage$1, { className: css.css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }, style)), src: src })));
9845
9973
  };
9846
9974
  var Img$1 = React.memo(Img);
9847
9975
 
@@ -9849,7 +9977,7 @@ Made in Italy` })));
9849
9977
 
9850
9978
  const MultiCommodityDiro$1 = (_a) => {
9851
9979
  var _b, _c;
9852
- 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"]);
9980
+ 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"]);
9853
9981
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9854
9982
  const { popup } = useEditor();
9855
9983
  const { jumpToWeb } = useEventReport();
@@ -9871,10 +9999,12 @@ Made in Italy` })));
9871
9999
  }
9872
10000
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
9873
10001
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9874
- var _a, _b, _c, _d, _e, _f;
10002
+ var _a, _b, _c, _d, _e, _f, _g;
9875
10003
  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) }),
9876
10004
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9877
- 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 })),
10005
+ 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: {
10006
+ transform: `translateY(${translateY}%)`
10007
+ } })),
9878
10008
  React.createElement("div", { className: css.css({
9879
10009
  color: '#000',
9880
10010
  display: 'flex',
@@ -9883,8 +10013,8 @@ Made in Italy` })));
9883
10013
  width: '100%',
9884
10014
  overflow: 'hidden'
9885
10015
  }) },
9886
- 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'),
9887
- 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'))));
10016
+ 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'),
10017
+ 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'))));
9888
10018
  })));
9889
10019
  };
9890
10020
  var MultiCommodityDiroComponent = React.memo(MultiCommodityDiro$1);
@@ -9961,7 +10091,7 @@ Made in Italy` })));
9961
10091
 
9962
10092
  const MultiCommodity$1 = (_a) => {
9963
10093
  var _b, _c;
9964
- 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"]);
10094
+ 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"]);
9965
10095
  const { sxpParameter } = useSxpDataSource();
9966
10096
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9967
10097
  const { popup } = useEditor();
@@ -9984,10 +10114,12 @@ Made in Italy` })));
9984
10114
  }
9985
10115
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
9986
10116
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9987
- var _a, _b, _c, _d, _e, _f;
10117
+ var _a, _b, _c, _d, _e, _f, _g;
9988
10118
  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) }),
9989
10119
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9990
- 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 })),
10120
+ 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: {
10121
+ transform: `translateY(${translateY}%)`
10122
+ } })),
9991
10123
  React.createElement("div", { className: css.css({
9992
10124
  color: '#fff',
9993
10125
  display: 'flex',
@@ -9996,8 +10128,8 @@ Made in Italy` })));
9996
10128
  width: '100%',
9997
10129
  overflow: 'hidden'
9998
10130
  }) },
9999
- 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'),
10000
- 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'))));
10131
+ 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'),
10132
+ 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'))));
10001
10133
  })));
10002
10134
  };
10003
10135
  var MultiCommodityComponent = React.memo(MultiCommodity$1);
@@ -10074,7 +10206,7 @@ Made in Italy` })));
10074
10206
 
10075
10207
  const MultiCommodityDiroNew$1 = (_a) => {
10076
10208
  var _b, _c;
10077
- 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"]);
10209
+ 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"]);
10078
10210
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
10079
10211
  const { popup } = useEditor();
10080
10212
  const { jumpToWeb } = useEventReport();
@@ -10096,10 +10228,12 @@ Made in Italy` })));
10096
10228
  }
10097
10229
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
10098
10230
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
10099
- var _a, _b, _c, _d, _e, _f;
10231
+ var _a, _b, _c, _d, _e, _f, _g;
10100
10232
  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) }),
10101
10233
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
10102
- 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 })),
10234
+ 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: {
10235
+ transform: `translateY(${translateY}%)`
10236
+ } })),
10103
10237
  React.createElement("div", { className: css.css({
10104
10238
  color: '#fff',
10105
10239
  display: 'flex',
@@ -10109,8 +10243,8 @@ Made in Italy` })));
10109
10243
  overflow: 'hidden',
10110
10244
  lineHeight: '20px'
10111
10245
  }) },
10112
- 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'),
10113
- 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'))));
10246
+ 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'),
10247
+ 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'))));
10114
10248
  })));
10115
10249
  };
10116
10250
  var MultiCommodityDiroNewComponent = React.memo(MultiCommodityDiroNew$1);
@@ -10119,7 +10253,7 @@ Made in Italy` })));
10119
10253
  * @Author: binruan@chatlabs.com
10120
10254
  * @Date: 2023-07-28 18:29:57
10121
10255
  * @LastEditors: binruan@chatlabs.com
10122
- * @LastEditTime: 2024-04-09 21:40:37
10256
+ * @LastEditTime: 2024-05-21 16:44:00
10123
10257
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\material.tsx
10124
10258
  *
10125
10259
  */
@@ -10177,7 +10311,7 @@ Made in Italy` })));
10177
10311
  * @Author: binruan@chatlabs.com
10178
10312
  * @Date: 2024-04-07 14:07:12
10179
10313
  * @LastEditors: binruan@chatlabs.com
10180
- * @LastEditTime: 2024-04-29 19:55:53
10314
+ * @LastEditTime: 2024-05-23 11:03:15
10181
10315
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
10182
10316
  *
10183
10317
  */
@@ -10185,11 +10319,11 @@ Made in Italy` })));
10185
10319
  {
10186
10320
  title: '卡片样式',
10187
10321
  child: [
10188
- {
10189
- type: 'Number',
10190
- label: '文本行数',
10191
- name: ['props', 'lineClamp']
10192
- },
10322
+ // {
10323
+ // type: 'Number',
10324
+ // label: '文本行数',
10325
+ // name: ['props', 'lineClamp']
10326
+ // },
10193
10327
  {
10194
10328
  type: 'Number',
10195
10329
  label: '上下边距',
@@ -11673,19 +11807,15 @@ Made in Italy` })));
11673
11807
  const canvasRef = React.useRef(null);
11674
11808
  const [firstFrameSrc, setFirstFrameSrc] = React.useState('');
11675
11809
  const src = React.useMemo(() => {
11676
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
11810
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
11677
11811
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) {
11678
11812
  return (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
11679
11813
  }
11680
- else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.url) {
11681
- setShowVideo(true);
11682
- return (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.url;
11683
- }
11684
- 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) {
11685
- 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];
11814
+ 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) {
11815
+ 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];
11686
11816
  }
11687
- 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) {
11688
- 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];
11817
+ 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) {
11818
+ 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];
11689
11819
  }
11690
11820
  else {
11691
11821
  return (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) || '';
@@ -12329,7 +12459,6 @@ Made in Italy` })));
12329
12459
  const videoSrc = rec.video.url;
12330
12460
  if (!videoSrc)
12331
12461
  return;
12332
- videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
12333
12462
  setIsPauseVideo(false);
12334
12463
  const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
12335
12464
  const dom = document.querySelector('#player-container-id');
@@ -12337,6 +12466,7 @@ Made in Italy` })));
12337
12466
  if (!dom && !dom2)
12338
12467
  return;
12339
12468
  videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
12469
+ videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
12340
12470
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
12341
12471
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
12342
12472
  // videoRef?.on('canplay', handleCanplay);
@@ -12476,7 +12606,7 @@ Made in Italy` })));
12476
12606
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FingerSwipeTip\index.tsx
12477
12607
  *
12478
12608
  */
12479
- const FingerSwipeTip = ({ imageUrl }) => {
12609
+ const FingerSwipeTip = ({ imageUrl, style }) => {
12480
12610
  const [show, setShow] = React.useState(true);
12481
12611
  useEditor();
12482
12612
  React.useEffect(() => {
@@ -12488,7 +12618,7 @@ Made in Italy` })));
12488
12618
  const animationCls = React.useMemo(() => {
12489
12619
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
12490
12620
  }, [show]);
12491
- return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}` },
12621
+ return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
12492
12622
  React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON })));
12493
12623
  };
12494
12624
 
@@ -12734,7 +12864,7 @@ Made in Italy` })));
12734
12864
  * @Author: binruan@chatlabs.com
12735
12865
  * @Date: 2024-03-26 10:07:41
12736
12866
  * @LastEditors: binruan@chatlabs.com
12737
- * @LastEditTime: 2024-04-15 14:27:18
12867
+ * @LastEditTime: 2024-05-23 14:31:12
12738
12868
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Nudge\index.tsx
12739
12869
  *
12740
12870
  */
@@ -12747,8 +12877,8 @@ Made in Italy` })));
12747
12877
  backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
12748
12878
  borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
12749
12879
  } },
12750
- (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
12751
- 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 : '')))));
12880
+ (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover', flexShrink: 0 } }) : null,
12881
+ 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 : '')))));
12752
12882
  };
12753
12883
 
12754
12884
  const DEFAULT_TAG = 'FOR U';
@@ -12792,12 +12922,12 @@ Made in Italy` })));
12792
12922
  * @Author: binruan@chatlabs.com
12793
12923
  * @Date: 2024-01-15 19:03:09
12794
12924
  * @LastEditors: binruan@chatlabs.com
12795
- * @LastEditTime: 2024-05-20 19:26:50
12925
+ * @LastEditTime: 2024-05-23 10:41:27
12796
12926
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12797
12927
  *
12798
12928
  */
12799
12929
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
12800
- var _a, _b, _c, _d, _e, _f, _g;
12930
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
12801
12931
  const { schema } = useEditor();
12802
12932
  const [activeIndex, setActiveIndex] = React.useState(0);
12803
12933
  const viewImageStartTime = React.useRef(0);
@@ -12852,29 +12982,23 @@ Made in Italy` })));
12852
12982
  };
12853
12983
  const firstRef = React.useRef();
12854
12984
  React.useEffect(() => {
12855
- var _a, _b, _c;
12856
- if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
12985
+ if (!firstRef.current && !videoRef) {
12857
12986
  firstRef.current = true;
12858
12987
  const player = TCPlayer('player-container-id', {
12859
12988
  licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12860
12989
  controls: false,
12990
+ autoplay: false,
12861
12991
  loop: false,
12862
- autoplay: true,
12863
12992
  muted: true,
12864
12993
  preload: 'auto',
12865
12994
  posterImage: false,
12866
- bigPlayButton: true,
12867
- sources: [
12868
- {
12869
- 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 : ''
12870
- }
12871
- ]
12995
+ bigPlayButton: true
12872
12996
  });
12873
12997
  player === null || player === void 0 ? void 0 : player.ready(() => {
12874
12998
  setVideoRef(player);
12875
12999
  });
12876
13000
  }
12877
- }, [videoRef, licenseUrl, data]);
13001
+ }, [videoRef, licenseUrl]);
12878
13002
  React.useEffect(() => {
12879
13003
  if (!isInit)
12880
13004
  handleH5EnterLink();
@@ -13063,7 +13187,7 @@ Made in Italy` })));
13063
13187
  lineGradStyle
13064
13188
  ]);
13065
13189
  const renderLikeButton = React.useCallback((rec, index) => {
13066
- var _a, _b;
13190
+ var _a, _b, _c, _d;
13067
13191
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
13068
13192
  return;
13069
13193
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
@@ -13072,8 +13196,8 @@ Made in Italy` })));
13072
13196
  }
13073
13197
  if (rec.video) {
13074
13198
  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: {
13075
- top,
13076
- right: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _b !== void 0 ? _b : 0
13199
+ [(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
13200
+ [(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
13077
13201
  }, position: index }));
13078
13202
  }
13079
13203
  return null;
@@ -13100,7 +13224,7 @@ Made in Italy` })));
13100
13224
  }
13101
13225
  };
13102
13226
  const handleScrollEvent = (swiper) => {
13103
- var _a, _b, _c, _d, _e, _f, _g, _h;
13227
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
13104
13228
  viewTime.current = new Date();
13105
13229
  const item = data[swiper.previousIndex];
13106
13230
  if (!item)
@@ -13133,14 +13257,17 @@ Made in Italy` })));
13133
13257
  }
13134
13258
  // 商品浏览事件
13135
13259
  handleReportProductView(item);
13260
+ const curItem = data[swiper.activeIndex];
13261
+ 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)) {
13262
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
13263
+ eventName: 'ProductView'
13264
+ });
13265
+ }
13136
13266
  };
13137
13267
  const handleReportProductView = (item) => {
13138
13268
  var _a, _b, _c;
13139
13269
  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)) {
13140
13270
  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);
13141
- bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
13142
- eventName: 'ProductView'
13143
- });
13144
13271
  }
13145
13272
  };
13146
13273
  React.useEffect(() => {
@@ -13211,7 +13338,7 @@ Made in Italy` })));
13211
13338
  } })),
13212
13339
  renderLogo,
13213
13340
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
13214
- isShowFingerTip ? React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
13341
+ 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,
13215
13342
  React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
13216
13343
  swiperRef.current.swiper.allowTouchMove = false;
13217
13344
  setTimeout(() => {
@@ -13253,13 +13380,13 @@ Made in Italy` })));
13253
13380
  direction: 'vertical', height: height },
13254
13381
  React.createElement(ToggleButton$1, { style: {
13255
13382
  position: 'fixed',
13256
- right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
13257
13383
  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',
13258
- bottom: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _d !== void 0 ? _d : 23,
13259
- zIndex: 999
13384
+ zIndex: 999,
13385
+ [(_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,
13386
+ [(_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
13260
13387
  }, 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 }),
13261
13388
  renderView),
13262
- 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)),
13389
+ 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)),
13263
13390
  React.createElement("div", { style: { position: 'absolute', zIndex: -100 } },
13264
13391
  React.createElement("video", { ref: playerRef, id: 'player-container-id', playsInline: true, crossOrigin: 'anonymous', style: {
13265
13392
  backgroundColor: 'transparent',
@@ -13415,8 +13542,8 @@ Made in Italy` })));
13415
13542
  if (!videoRef.current.src) {
13416
13543
  const videoSrc = rec.video.url;
13417
13544
  if (videoSrc.includes('.m3u8')) {
13418
- if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.Hls.isSupported())) {
13419
- const hls = new window.Hls();
13545
+ if (Hls.isSupported()) {
13546
+ const hls = new Hls();
13420
13547
  hls.loadSource(videoSrc);
13421
13548
  hls.attachMedia(videoRef.current);
13422
13549
  }
@@ -13702,7 +13829,7 @@ Made in Italy` })));
13702
13829
  * @Author: binruan@chatlabs.com
13703
13830
  * @Date: 2024-01-15 19:03:09
13704
13831
  * @LastEditors: binruan@chatlabs.com
13705
- * @LastEditTime: 2024-05-17 18:41:05
13832
+ * @LastEditTime: 2024-05-06 17:26:37
13706
13833
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
13707
13834
  *
13708
13835
  */
@@ -13719,14 +13846,14 @@ Made in Italy` })));
13719
13846
  RESOLVER[v.extend.type] = v;
13720
13847
  });
13721
13848
  const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
13722
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13849
+ var _a, _b, _c, _d, _e, _f;
13723
13850
  const utmVal = React.useMemo(() => {
13724
13851
  var _a;
13725
13852
  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('?', '') : '';
13726
13853
  return searchParams;
13727
13854
  }, []);
13728
13855
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
13729
- 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 }) => {
13856
+ 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 }) => {
13730
13857
  var _a;
13731
13858
  return (React.createElement(React.Fragment, null,
13732
13859
  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 })),