pb-sxp-ui 1.0.2 → 1.0.3-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/index.cjs +1302 -688
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +28 -133
  4. package/dist/index.js +1302 -688
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -5
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -5
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +1302 -688
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -5
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageCore/index.d.ts +1 -0
  15. package/es/core/components/SxpPageCore/index.js +2 -2
  16. package/es/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
  17. package/es/core/components/SxpPageRender/ExpandableText.js +17 -10
  18. package/es/core/components/SxpPageRender/Hashtag/index.js +1 -1
  19. package/es/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  20. package/es/core/components/SxpPageRender/Modal/index.js +7 -4
  21. package/es/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  22. package/es/core/components/SxpPageRender/Nudge/index.js +13 -0
  23. package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -7
  24. package/es/core/components/SxpPageRender/Popup/index.js +3 -3
  25. package/es/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  26. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +4 -3
  27. package/es/core/components/SxpPageRender/index.d.ts +20 -1
  28. package/es/core/components/SxpPageRender/index.js +19 -16
  29. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  30. package/es/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  31. package/es/core/components/SxpPageRender/useIconLink.js +8 -3
  32. package/es/core/context/EditorContext.d.ts +5 -0
  33. package/es/core/context/EditorContext.js +21 -3
  34. package/es/core/context/SxpDataSourceProvider.js +1 -1
  35. package/es/core/create.d.ts +1 -1
  36. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
  37. package/es/materials/sxp/popup/CommodityDetail/index.js +44 -21
  38. package/es/materials/sxp/popup/CommodityDetail/material.js +36 -1
  39. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
  40. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +167 -0
  41. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  42. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  43. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +46 -1
  44. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  45. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +171 -0
  46. package/es/materials/sxp/popup/index.d.ts +0 -1
  47. package/es/materials/sxp/popup/index.js +0 -1
  48. package/es/materials/sxp/template/Appoint/index.d.ts +2 -0
  49. package/es/materials/sxp/template/Appoint/index.js +4 -18
  50. package/es/materials/sxp/template/Appoint/material.js +22 -6
  51. package/es/materials/sxp/template/Commodity/index.d.ts +2 -0
  52. package/es/materials/sxp/template/Commodity/index.js +5 -22
  53. package/es/materials/sxp/template/Commodity/material.js +31 -6
  54. package/es/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  55. package/es/materials/sxp/template/CommodityDiro/index.js +5 -24
  56. package/es/materials/sxp/template/CommodityDiro/material.js +30 -5
  57. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  58. package/es/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  59. package/es/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  60. package/es/materials/sxp/template/Link/index.d.ts +2 -0
  61. package/es/materials/sxp/template/Link/index.js +4 -13
  62. package/es/materials/sxp/template/Link/material.js +22 -5
  63. package/es/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  64. package/es/materials/sxp/template/MultiCommodity/index.js +8 -24
  65. package/es/materials/sxp/template/MultiCommodity/material.js +30 -5
  66. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  67. package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -27
  68. package/es/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  69. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  70. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +8 -25
  71. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  72. package/es/materials/sxp/template/components/EventProvider.d.ts +2 -1
  73. package/es/materials/sxp/template/components/EventProvider.js +5 -4
  74. package/es/materials/sxp/template/components/settingRender.d.ts +108 -0
  75. package/es/materials/sxp/template/components/settingRender.js +198 -0
  76. package/es/materials/sxp/template/components/typing.d.ts +6 -0
  77. package/es/materials/sxp/template/components/typing.js +1 -0
  78. package/lib/core/components/SxpPageCore/index.d.ts +1 -0
  79. package/lib/core/components/SxpPageCore/index.js +2 -2
  80. package/lib/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
  81. package/lib/core/components/SxpPageRender/ExpandableText.js +17 -10
  82. package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -1
  83. package/lib/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  84. package/lib/core/components/SxpPageRender/Modal/index.js +7 -4
  85. package/lib/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  86. package/lib/core/components/SxpPageRender/Nudge/index.js +16 -0
  87. package/lib/core/components/SxpPageRender/PictureGroup/index.js +10 -6
  88. package/lib/core/components/SxpPageRender/Popup/index.js +3 -3
  89. package/lib/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  90. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +3 -2
  91. package/lib/core/components/SxpPageRender/index.d.ts +20 -1
  92. package/lib/core/components/SxpPageRender/index.js +19 -16
  93. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  94. package/lib/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  95. package/lib/core/components/SxpPageRender/useIconLink.js +8 -3
  96. package/lib/core/context/EditorContext.d.ts +5 -0
  97. package/lib/core/context/EditorContext.js +21 -3
  98. package/lib/core/context/SxpDataSourceProvider.js +1 -1
  99. package/lib/core/create.d.ts +1 -1
  100. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
  101. package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -20
  102. package/lib/materials/sxp/popup/CommodityDetail/material.js +36 -1
  103. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
  104. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +169 -0
  105. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  106. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  107. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +46 -1
  108. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  109. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +173 -0
  110. package/lib/materials/sxp/popup/index.d.ts +0 -1
  111. package/lib/materials/sxp/popup/index.js +0 -1
  112. package/lib/materials/sxp/template/Appoint/index.d.ts +2 -0
  113. package/lib/materials/sxp/template/Appoint/index.js +4 -18
  114. package/lib/materials/sxp/template/Appoint/material.js +22 -6
  115. package/lib/materials/sxp/template/Commodity/index.d.ts +2 -0
  116. package/lib/materials/sxp/template/Commodity/index.js +5 -22
  117. package/lib/materials/sxp/template/Commodity/material.js +31 -6
  118. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  119. package/lib/materials/sxp/template/CommodityDiro/index.js +5 -24
  120. package/lib/materials/sxp/template/CommodityDiro/material.js +30 -5
  121. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  122. package/lib/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  123. package/lib/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  124. package/lib/materials/sxp/template/Link/index.d.ts +2 -0
  125. package/lib/materials/sxp/template/Link/index.js +4 -13
  126. package/lib/materials/sxp/template/Link/material.js +22 -5
  127. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  128. package/lib/materials/sxp/template/MultiCommodity/index.js +7 -23
  129. package/lib/materials/sxp/template/MultiCommodity/material.js +30 -5
  130. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  131. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -26
  132. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  133. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  134. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -24
  135. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  136. package/lib/materials/sxp/template/components/EventProvider.d.ts +2 -1
  137. package/lib/materials/sxp/template/components/EventProvider.js +4 -3
  138. package/lib/materials/sxp/template/components/settingRender.d.ts +108 -0
  139. package/lib/materials/sxp/template/components/settingRender.js +200 -0
  140. package/lib/materials/sxp/template/components/typing.d.ts +6 -0
  141. package/lib/materials/sxp/template/components/typing.js +2 -0
  142. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -378,11 +378,24 @@ const storeAndLoadFeUserId = () => {
378
378
  return fakeUserId;
379
379
  };
380
380
 
381
- function useIconLink(path) {
381
+ /*
382
+ * @Author: binruan@chatlabs.com
383
+ * @Date: 2024-03-20 10:27:31
384
+ * @LastEditors: binruan@chatlabs.com
385
+ * @LastEditTime: 2024-03-25 18:23:54
386
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\useIconLink.ts
387
+ *
388
+ */
389
+ function useIconLink(path, domain) {
382
390
  const { appDomain } = useSxpDataSource();
383
391
  return useMemo(() => {
384
- return appDomain ? `https://${appDomain}${path}` : `${window.location.origin}${path}`;
385
- }, [appDomain, path]);
392
+ if (domain) {
393
+ return `https://${domain}${path}`;
394
+ }
395
+ else {
396
+ return appDomain ? `https://${appDomain}${path}` : `${window.location.origin}${path}`;
397
+ }
398
+ }, [appDomain, path, domain]);
386
399
  }
387
400
 
388
401
  const SxpDataSourceContext = createContext({
@@ -560,7 +573,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
560
573
  setLoading(false);
561
574
  });
562
575
  }, [getRecommendVideos]);
563
- const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif');
576
+ const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
564
577
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
565
578
  rtcList,
566
579
  setRtcList,
@@ -704,7 +717,11 @@ const EditorContext = React.createContext({
704
717
  undoStack: [item],
705
718
  redoStack: [],
706
719
  popup: '',
707
- setPopup: () => { }
720
+ setPopup: () => { },
721
+ popupAni: {
722
+ name: 'none',
723
+ duration: 0
724
+ }
708
725
  });
709
726
  const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSource = true, utmVal }, ref) => {
710
727
  const [currentNode, setCurrentNode] = useState(null);
@@ -728,9 +745,22 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
728
745
  const [undoStack, setUndoStack] = useState([[item]]);
729
746
  const [redoStack, setRedoStack] = useState([]);
730
747
  const [popup, setPopup] = useState('');
748
+ const [popupAni, setPopupAni] = useState({
749
+ name: 'none',
750
+ duration: 0
751
+ });
731
752
  typeof window !== 'undefined' &&
732
- (window.sxpPopup = (type) => {
753
+ (window.sxpPopup = (type, aniType) => {
733
754
  setPopup(type);
755
+ if (aniType && (aniType === null || aniType === void 0 ? void 0 : aniType.name) !== 'none') {
756
+ setPopupAni(Object.assign(Object.assign({}, popupAni), aniType));
757
+ }
758
+ else {
759
+ setPopupAni({
760
+ name: 'none',
761
+ duration: 0
762
+ });
763
+ }
734
764
  });
735
765
  typeof window !== 'undefined' &&
736
766
  (window.getJointUtmLink = (url) => {
@@ -806,7 +836,8 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
806
836
  setUndoStack,
807
837
  getCurPageConf,
808
838
  popup,
809
- setPopup
839
+ setPopup,
840
+ popupAni
810
841
  } },
811
842
  React.createElement(DataSourceProvider$1, { isSsr: isSsr, enable: enableDataSource }, children)));
812
843
  });
@@ -836,7 +867,7 @@ var interactionRender$8 = [
836
867
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
837
868
  *
838
869
  */
839
- var settingRender$1 = [
870
+ var settingRender$4 = [
840
871
  {
841
872
  type: 'Text',
842
873
  label: '组件名称',
@@ -1025,7 +1056,7 @@ const AppointForm = createMaterial(AppointFormComponent, {
1025
1056
  category: 'popup',
1026
1057
  type: 'AppointForm',
1027
1058
  related: {
1028
- settingRender: settingRender$1,
1059
+ settingRender: settingRender$4,
1029
1060
  bindableProps: [],
1030
1061
  interactionRender: interactionRender$8
1031
1062
  },
@@ -1051,6 +1082,190 @@ const AppointForm = createMaterial(AppointFormComponent, {
1051
1082
  sort: 2
1052
1083
  });
1053
1084
 
1085
+ /*
1086
+ * @Author: binruan@chatlabs.com
1087
+ * @Date: 2024-04-02 18:01:34
1088
+ * @LastEditors: binruan@chatlabs.com
1089
+ * @LastEditTime: 2024-04-02 18:01:41
1090
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiro\settingRender.tsx
1091
+ *
1092
+ */
1093
+ /*
1094
+ * @Author: binruan@chatlabs.com
1095
+ * @Date: 2024-03-26 16:50:25
1096
+ * @LastEditors: binruan@chatlabs.com
1097
+ * @LastEditTime: 2024-03-28 18:42:26
1098
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
1099
+ *
1100
+ */
1101
+ var settingRender$3 = [
1102
+ {
1103
+ title: '商品图片',
1104
+ child: [
1105
+ {
1106
+ type: 'Radius',
1107
+ label: '轮播指示器',
1108
+ options: [
1109
+ {
1110
+ label: '居左',
1111
+ value: 'left'
1112
+ },
1113
+ {
1114
+ label: '居中',
1115
+ value: 'center'
1116
+ }
1117
+ ],
1118
+ name: ['props', 'swiper', 'dotsAlign']
1119
+ },
1120
+ {
1121
+ type: 'Number',
1122
+ name: ['props', 'swiper', 'delay'],
1123
+ addonAfter: 's'
1124
+ }
1125
+ ]
1126
+ },
1127
+ {
1128
+ title: '商品文本',
1129
+ child: [
1130
+ {
1131
+ name: ['props', 'commodityStyles'],
1132
+ type: 'SelectLinkage',
1133
+ child: [
1134
+ {
1135
+ label: '字段',
1136
+ type: 'Select',
1137
+ options: [
1138
+ {
1139
+ label: '商品名称',
1140
+ value: 'title'
1141
+ },
1142
+ {
1143
+ label: '系列名称',
1144
+ value: 'collection'
1145
+ },
1146
+ {
1147
+ label: '价格',
1148
+ value: 'price'
1149
+ },
1150
+ {
1151
+ label: '商品描述',
1152
+ value: 'info'
1153
+ }
1154
+ ],
1155
+ name: ['props', 'commodityStyles', 'field'],
1156
+ initialValue: 'title'
1157
+ },
1158
+ {
1159
+ type: 'Group',
1160
+ label: '标题字体',
1161
+ child: [
1162
+ {
1163
+ type: 'Color',
1164
+ name: ['color']
1165
+ },
1166
+ {
1167
+ type: 'Select',
1168
+ options: [{ label: '黑体', value: '黑体' }],
1169
+ name: ['fontFamily']
1170
+ },
1171
+ {
1172
+ type: 'Number',
1173
+ addonAfter: 'px',
1174
+ name: ['fontSize']
1175
+ }
1176
+ ]
1177
+ },
1178
+ {
1179
+ label: '标题样式',
1180
+ type: 'TextStyle'
1181
+ },
1182
+ {
1183
+ label: '标题对齐',
1184
+ type: 'TextAlign'
1185
+ },
1186
+ {
1187
+ label: '默认行数',
1188
+ type: 'Number',
1189
+ name: ['lineClamp']
1190
+ }
1191
+ ]
1192
+ }
1193
+ ]
1194
+ },
1195
+ {
1196
+ title: '购买按钮样式',
1197
+ child: [
1198
+ {
1199
+ type: 'Color',
1200
+ label: '背景色',
1201
+ name: ['props', 'buttonStyle', 'backgroundColor'],
1202
+ initialValue: '#000'
1203
+ },
1204
+ {
1205
+ type: 'Group',
1206
+ label: '尺寸',
1207
+ child: [
1208
+ {
1209
+ type: 'Number',
1210
+ name: ['props', 'buttonStyle', 'height'],
1211
+ addonAfter: 'H'
1212
+ }
1213
+ ]
1214
+ },
1215
+ {
1216
+ type: 'Group',
1217
+ label: '圆角',
1218
+ child: [
1219
+ {
1220
+ type: 'Slider',
1221
+ name: ['props', 'buttonStyle', 'borderRadius'],
1222
+ max: 100
1223
+ },
1224
+ {
1225
+ type: 'Number',
1226
+ name: ['props', 'buttonStyle', 'borderRadius'],
1227
+ addonAfter: 'px',
1228
+ max: 100
1229
+ }
1230
+ ]
1231
+ },
1232
+ {
1233
+ type: 'TextMargin',
1234
+ name: ['props', 'buttonStyle']
1235
+ },
1236
+ {
1237
+ type: 'Group',
1238
+ label: '字体',
1239
+ child: [
1240
+ {
1241
+ type: 'Color',
1242
+ name: ['props', 'buttonStyle', 'color'],
1243
+ initialValue: '#fff'
1244
+ },
1245
+ {
1246
+ type: 'Select',
1247
+ name: ['props', 'buttonStyle', 'fontFamily'],
1248
+ options: [{ label: '黑体', value: '黑体' }]
1249
+ },
1250
+ {
1251
+ type: 'Number',
1252
+ name: ['props', 'buttonStyle', 'fontSize'],
1253
+ addonAfter: 'px'
1254
+ }
1255
+ ]
1256
+ },
1257
+ {
1258
+ type: 'TextStyle',
1259
+ name: ['props', 'buttonStyle']
1260
+ },
1261
+ {
1262
+ type: 'TextAlign',
1263
+ name: ['props', 'buttonStyle']
1264
+ }
1265
+ ]
1266
+ }
1267
+ ];
1268
+
1054
1269
  /**
1055
1270
  * SSR Window 4.0.2
1056
1271
  * Better handling for window object in SSR environment
@@ -7934,19 +8149,146 @@ function useEventReport() {
7934
8149
  };
7935
8150
  }
7936
8151
 
8152
+ /*
8153
+ * @Author: binruan@chatlabs.com
8154
+ * @Date: 2023-11-02 18:34:34
8155
+ * @LastEditors: binruan@chatlabs.com
8156
+ * @LastEditTime: 2024-04-02 10:33:15
8157
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8158
+ *
8159
+ */
8160
+ const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8161
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
8162
+ const { popupAni } = useEditor();
8163
+ const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
8164
+ const [isShow, setIsShow] = useState(false);
8165
+ const modalEleRef = useRef(null);
8166
+ useEffect(() => {
8167
+ const parentNode = document.getElementById('sxp-render');
8168
+ const node = document.getElementById('pb-modal');
8169
+ if (node) {
8170
+ modalEleRef.current = node;
8171
+ }
8172
+ else {
8173
+ modalEleRef.current = document.createElement('div');
8174
+ modalEleRef.current.setAttribute('id', 'pb-modal');
8175
+ parentNode === null || parentNode === void 0 ? void 0 : parentNode.appendChild(modalEleRef.current);
8176
+ }
8177
+ }, []);
8178
+ useEffect(() => {
8179
+ if (visible) {
8180
+ setIsShow(true);
8181
+ }
8182
+ else {
8183
+ setTimeout(() => {
8184
+ setIsShow(false);
8185
+ }, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
8186
+ }
8187
+ }, [visible, cssAni]);
8188
+ if (!modalEleRef.current)
8189
+ return null;
8190
+ const handleClose = debounce(() => {
8191
+ onClose === null || onClose === void 0 ? void 0 : onClose();
8192
+ }, 300);
8193
+ return ReactDOM.createPortal(React.createElement("div", { className: 'modal-bg', style: Object.assign({ display: isShow ? 'flex' : 'none', backgroundColor: visible ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
8194
+ React.createElement("div", { className: `modal-container ${visible ? 'modal-popIn' : 'modal-popOut'}`, style: { padding, animationDuration: (cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration) / 1000 + 's' }, onClick: (e) => {
8195
+ e.stopPropagation();
8196
+ e.preventDefault();
8197
+ } },
8198
+ React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8199
+ React.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
8200
+ children)), modalEleRef.current);
8201
+ };
8202
+ var Modal$1 = memo(Modal);
8203
+
8204
+ /*
8205
+ * @Author: binruan@chatlabs.com
8206
+ * @Date: 2023-12-26 16:11:34
8207
+ * @LastEditors: binruan@chatlabs.com
8208
+ * @LastEditTime: 2024-04-02 18:52:59
8209
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
8210
+ *
8211
+ */
8212
+ const limitTextLastWholeWord = (originalText = '', limit) => {
8213
+ // 匹配到中文
8214
+ const chineseRegex = /[\u4e00-\u9fa5]+/;
8215
+ if (chineseRegex.test(originalText)) {
8216
+ return originalText.slice(0, 54);
8217
+ }
8218
+ const words = originalText.split(' ');
8219
+ const newWords = [];
8220
+ for (let i = 0; i < words.length; i++) {
8221
+ newWords.push(words[i]);
8222
+ const tempText = newWords.join(' ');
8223
+ if (tempText.length >= limit)
8224
+ break;
8225
+ }
8226
+ // const _words = newWords.length === words.length ? newWords : newWords.slice(0, newWords.length - 1);
8227
+ const _words = newWords.length > 1 && newWords.length < words.length ? newWords.slice(0, newWords.length - 1) : newWords;
8228
+ return _words.join(' ') + ' ';
8229
+ };
8230
+ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText, isPost }) => {
8231
+ const [isShowMore, setIsShowMore] = useState(true);
8232
+ const [isShow, setIsShow] = useState(false);
8233
+ const lineClamp = Number((style === null || style === void 0 ? void 0 : style.lineClamp) || 2);
8234
+ const multiRow = useRef(null);
8235
+ const handleClick = useCallback(() => {
8236
+ setIsShowMore(!isShowMore);
8237
+ }, [isShowMore]);
8238
+ useMemo(() => {
8239
+ return !isShowMore && text.length > maxStr ? limitTextLastWholeWord(text, maxStr) + '...' : text;
8240
+ }, [text, maxStr, isShowMore]);
8241
+ useEffect(() => {
8242
+ if (multiRow.current && isPost) {
8243
+ setIsShowMore(true);
8244
+ setTimeout(() => {
8245
+ var _a;
8246
+ setIsShow(false);
8247
+ try {
8248
+ const cs = (_a = window === null || window === void 0 ? void 0 : window.getComputedStyle) === null || _a === void 0 ? void 0 : _a.call(window, multiRow.current);
8249
+ const height = parseFloat(cs === null || cs === void 0 ? void 0 : cs.height);
8250
+ const lh = parseFloat(cs === null || cs === void 0 ? void 0 : cs.lineHeight);
8251
+ const fs = parseFloat(cs === null || cs === void 0 ? void 0 : cs.fontSize) + 4;
8252
+ const lineHeight = isNaN(lh) ? fs : lh;
8253
+ if (text && height > lineHeight * lineClamp) {
8254
+ setIsShowMore(false);
8255
+ setIsShow(true);
8256
+ }
8257
+ }
8258
+ catch (_b) { }
8259
+ }, 100);
8260
+ }
8261
+ }, [multiRow, text, lineClamp, style, isPost]);
8262
+ return (React.createElement("div", { className: className, style: Object.assign({}, style), hidden: !text || text === '' },
8263
+ React.createElement("div", { ref: multiRow, style: {
8264
+ overflow: 'hidden',
8265
+ WebkitLineClamp: !isShowMore ? lineClamp : '',
8266
+ textOverflow: 'ellipsis',
8267
+ display: '-webkit-box',
8268
+ WebkitBoxOrient: 'vertical',
8269
+ wordBreak: 'break-word'
8270
+ }, dangerouslySetInnerHTML: { __html: text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>') } }),
8271
+ isShow && text && (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick }, isShowMore ? unfoldText || 'show less' : foldText || 'show more'))));
8272
+ };
8273
+ var ExpandableText$1 = memo(ExpandableText);
8274
+
7937
8275
  const CommodityDetail$1 = (_a) => {
7938
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
7939
- var { content, style, bgImg, onClick, schema, isDefault, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image"]);
8276
+ var _b, _c, _d, _e, _f, _g, _h, _j;
8277
+ var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle"]);
7940
8278
  const { sxpParameter } = useSxpDataSource();
7941
8279
  const { popupDetailData, bffEventReport, isPreview, waterFallData } = useSxpDataSource();
7942
8280
  const { jumpToWeb, productView } = useEventReport();
7943
8281
  const curTimeRef = useRef(null);
7944
- const product = (_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
7945
- const cta = (_d = (_c = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.bindCta;
8282
+ const [showModal, setShowModal] = useState(false);
8283
+ const data = isPost ? rec : popupDetailData;
8284
+ const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8285
+ const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
7946
8286
  const handleLink = () => {
7947
8287
  if (product === null || product === void 0 ? void 0 : product.link) {
7948
8288
  jumpToWeb(popupDetailData, product, cta);
7949
- productView(popupDetailData, product, cta, curTimeRef.current);
8289
+ if (!isPost) {
8290
+ productView(data, product, cta, viewTime || curTimeRef.current);
8291
+ }
7950
8292
  window.location.href = window.getJointUtmLink(product.link);
7951
8293
  }
7952
8294
  };
@@ -7972,11 +8314,33 @@ const CommodityDetail$1 = (_a) => {
7972
8314
  }
7973
8315
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
7974
8316
  const width = isPreview ? 375 : window.innerWidth;
8317
+ const renderContent = ({ isPost }) => {
8318
+ var _a, _b, _c;
8319
+ return (React.createElement("div", { className: 'pb-commondity-content' },
8320
+ React.createElement("div", { className: 'pb-commondity-content-collection', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock'),
8321
+ React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
8322
+ React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
8323
+ React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8324
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8325
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8326
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8327
+ 18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info })));
8328
+ };
8329
+ const renderBtn = () => {
8330
+ var _a;
8331
+ return (React.createElement(React.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle }, (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website'))));
8332
+ };
7975
8333
  return (React.createElement("div", { className: 'pb-commondity' },
7976
8334
  React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
7977
- product && ((_e = product === null || product === void 0 ? void 0 : product.homePage) === null || _e === void 0 ? void 0 : _e.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, loop: true, autoplay: {
7978
- delay: 3000
7979
- } }, (_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.map((src) => {
8335
+ product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8336
+ clickable: true,
8337
+ bulletActiveClass: 'swipe-item-active-bullet',
8338
+ clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
8339
+ ? 'commondityDetail-swiper-clickable-left'
8340
+ : 'commondityDetail-swiper-clickable-center'
8341
+ }, loop: true, autoplay: {
8342
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8343
+ } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
7980
8344
  return (React.createElement(SwiperSlide, { key: src },
7981
8345
  React.createElement("div", { style: {
7982
8346
  overflow: 'hidden',
@@ -7985,7 +8349,7 @@ const CommodityDetail$1 = (_a) => {
7985
8349
  } },
7986
8350
  React.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
7987
8351
  }))),
7988
- !((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) && (React.createElement("div", { className: css({
8352
+ !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css({
7989
8353
  position: 'relative',
7990
8354
  height: 0,
7991
8355
  width: '100%',
@@ -7998,17 +8362,12 @@ const CommodityDetail$1 = (_a) => {
7998
8362
  top: 0,
7999
8363
  objectFit: 'cover',
8000
8364
  width: '100%'
8001
- }), src: (_h = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _h !== void 0 ? _h : bottom_image, alt: '' }))),
8002
- React.createElement("div", { className: 'pb-commondity-content' },
8003
- React.createElement("div", { className: 'pb-commondity-content-collection' }, (_j = product === null || product === void 0 ? void 0 : product.collection) !== null && _j !== void 0 ? _j : 'Tiffany Lock'),
8004
- React.createElement("div", { className: 'pb-commondity-content-title' }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Pendant in Yellow Gold with Diamonds, Medium'),
8005
- React.createElement("div", { className: 'pb-commondity-content-price' }, priceText),
8006
- React.createElement("div", { className: 'pb-commondity-content-info' }, (_l = product === null || product === void 0 ? void 0 : product.info) !== null && _l !== void 0 ? _l : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8007
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8008
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8009
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8010
- 18-karat gold, this necklace is embellished with hand-set diamonds.`))),
8011
- (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondity-btn' }, (_m = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _m !== void 0 ? _m : 'Purchase on Website'))));
8365
+ }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8366
+ renderContent({ isPost })),
8367
+ renderBtn(),
8368
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
8369
+ renderContent({ isPost: false }),
8370
+ renderBtn())));
8012
8371
  };
8013
8372
  var CommodityDetailComponent = memo(CommodityDetail$1);
8014
8373
 
@@ -8016,7 +8375,7 @@ var CommodityDetailComponent = memo(CommodityDetail$1);
8016
8375
  * @Author: binruan@chatlabs.com
8017
8376
  * @Date: 2023-07-28 18:29:57
8018
8377
  * @LastEditors: binruan@chatlabs.com
8019
- * @LastEditTime: 2024-03-20 15:52:25
8378
+ * @LastEditTime: 2024-04-02 18:13:10
8020
8379
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
8021
8380
  *
8022
8381
  */
@@ -8025,8 +8384,42 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
8025
8384
  icon: '',
8026
8385
  category: 'popup',
8027
8386
  type: 'CommodityDetail',
8387
+ related: {
8388
+ settingRender: settingRender$3
8389
+ },
8028
8390
  defaulSetting: {
8029
- props: {},
8391
+ props: {
8392
+ swiper: {
8393
+ dotsAlign: 'center',
8394
+ delay: 3
8395
+ },
8396
+ commodityStyles: {
8397
+ price: {
8398
+ color: '#000',
8399
+ fontSize: 18
8400
+ },
8401
+ title: {
8402
+ color: '#000',
8403
+ fontSize: 23
8404
+ },
8405
+ collection: {
8406
+ fontSize: 12,
8407
+ color: '#000'
8408
+ },
8409
+ info: {
8410
+ color: 'gray',
8411
+ fontSize: 12
8412
+ }
8413
+ },
8414
+ buttonStyle: {
8415
+ backgroundColor: '#000',
8416
+ fontSize: 12,
8417
+ height: 45,
8418
+ fontWeight: 'bold',
8419
+ textAlign: 'center',
8420
+ color: 'rgba(255, 255, 255, 0.9)'
8421
+ }
8422
+ },
8030
8423
  style: {}
8031
8424
  },
8032
8425
  w: 100,
@@ -8054,7 +8447,7 @@ var interactionRender$7 = [
8054
8447
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
8055
8448
  *
8056
8449
  */
8057
- var settingRender = [
8450
+ var settingRender$2 = [
8058
8451
  {
8059
8452
  type: 'Media',
8060
8453
  label: '图标',
@@ -8073,7 +8466,7 @@ var settingRender = [
8073
8466
  }
8074
8467
  ];
8075
8468
 
8076
- var img$3 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABHBJREFUeF7lmzuoFkcYhp/TihdIl0JBESubSCCCih4NXgJeUphCjyKmEEVtLRSjooWtShILRRJtgpCoeLzgLUZBQbTwAoooqLWoCWIXeZdd3bP++8/st7OX33+ac2Dn8r3Pvzv7zcy7A9RT5gDjgQnx3/T/iuA58Cz+m/7/StXhDVQ0gATOBhYCi4GxxnHeAKeAs8DfMSBjV52bhQTwBbApFj4YNMqPnV0GrgL7gJchxggFQMI3A5NDBOXRx+MYwn6Pul2rlAWwMv7VvykbiLH9TUAQjhnbYwUwA9gKLLIOHLjdGWAPcL1ovxYAG4G9wKiig1Vc/y2wBThQZJyiAA4Ba4sM0EDdw8CPvuMWAXAb+Mq344br3QGm+cTgC+B/n85aWMepz1kBOBknMy3U5wxJSdSSbrVcAPR+V9LRy0X5SW6+0A3AMuDPXlaeiv174K9OWvIAfA1cAMZ9JgBeA98Ct7J68gAMtyjJCfUbKFn6zgeA0tujoUZtWT9D2bS50x1wA2gqt6+al9YO09ODZAF8DrO+C+KIt0IagNbzIlTXktYVaKfr9+PNkSklchMtpXWHR/sJaQA7gJ8sUdXURuJ/AB7E4/0BLDeOvROQ3hEA/gFmGjusullWfDKeFcI1YFYawETgSdUqjP3niS8LYRLwNHkE1gM/GwOssplLfBkIG4BfEgBKE5dWqcTQt694da1td22YFikngGUJgH+B0UVaV1y3iHiFYpnA/wPGCICFXpX66xCfxD8oAKuA3wIpegToHW0tdYpXjKsFQLu7u60Rx+3exSCPG29HdVO3eI25TQB+BdaVAKCMSneRVpBJKfpMNiFesR4UgNOdlomeQF4AWj3quCpbfCE0JV7xDgvAXWCqp+B0tYfACkC7xXnFBaFJ8Yr5ngC8Mu78KHnS4+MqeRCaFq+4X5cB8MnmQoE7oQ3iPwCwPgJWEdZ2rjvNcj16BMpMghYxWsElS1pX0K45xNXedT2aBMu+BotCcAVlfZX69puuF70GQyRCoSFU/csnEKJEKFQqHApCXeIFIUqFQy6GykKoU7wARIuh6HVQwsmVffasEOoWLwfauASADkKU0oYqRSHULV465SsaSgAoqfk9lPq4H18ITYhXiJr7jiYAZGyUUzN0cUFoSrx0yrX6PH0ucEmTQmgCXdb5TYrX/uFcaa3rYCR7JzQpXro1vg5HRgCo+mhMEOT3/RKQYaGpkns0poD6+nA0+UX6+nhcEPreICEIfW2REQCZoc+30A9snTjlI57fyUzdzSYnU3RpP7414sDtNLl3NFG7jJK9YI52sepqnnYBUOe9ZJLOwnCapn0AqNO+NksnVHvJNO00SSeifO+ApH4vZIpdzdHZZ6QoALWXifqI8TTJNWGVua5drTV5pui8ji0A1JfM1Lta5CeWD3h7JzO0i6gVQNJv3342lwXbtx9OpkFoP0ET0LwKDZcyOF5s46ez2TtCxkt9OL0gBmJ1oMnJJcHnYo/wU9czXfR62TnAd7zWfj7/HrAAAKDnDZ8VAAAAAElFTkSuQmCC";
8469
+ var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABHBJREFUeF7lmzuoFkcYhp/TihdIl0JBESubSCCCih4NXgJeUphCjyKmEEVtLRSjooWtShILRRJtgpCoeLzgLUZBQbTwAoooqLWoCWIXeZdd3bP++8/st7OX33+ac2Dn8r3Pvzv7zcy7A9RT5gDjgQnx3/T/iuA58Cz+m/7/StXhDVQ0gATOBhYCi4GxxnHeAKeAs8DfMSBjV52bhQTwBbApFj4YNMqPnV0GrgL7gJchxggFQMI3A5NDBOXRx+MYwn6Pul2rlAWwMv7VvykbiLH9TUAQjhnbYwUwA9gKLLIOHLjdGWAPcL1ovxYAG4G9wKiig1Vc/y2wBThQZJyiAA4Ba4sM0EDdw8CPvuMWAXAb+Mq344br3QGm+cTgC+B/n85aWMepz1kBOBknMy3U5wxJSdSSbrVcAPR+V9LRy0X5SW6+0A3AMuDPXlaeiv174K9OWvIAfA1cAMZ9JgBeA98Ct7J68gAMtyjJCfUbKFn6zgeA0tujoUZtWT9D2bS50x1wA2gqt6+al9YO09ODZAF8DrO+C+KIt0IagNbzIlTXktYVaKfr9+PNkSklchMtpXWHR/sJaQA7gJ8sUdXURuJ/AB7E4/0BLDeOvROQ3hEA/gFmGjusullWfDKeFcI1YFYawETgSdUqjP3niS8LYRLwNHkE1gM/GwOssplLfBkIG4BfEgBKE5dWqcTQt694da1td22YFikngGUJgH+B0UVaV1y3iHiFYpnA/wPGCICFXpX66xCfxD8oAKuA3wIpegToHW0tdYpXjKsFQLu7u60Rx+3exSCPG29HdVO3eI25TQB+BdaVAKCMSneRVpBJKfpMNiFesR4UgNOdlomeQF4AWj3quCpbfCE0JV7xDgvAXWCqp+B0tYfACkC7xXnFBaFJ8Yr5ngC8Mu78KHnS4+MqeRCaFq+4X5cB8MnmQoE7oQ3iPwCwPgJWEdZ2rjvNcj16BMpMghYxWsElS1pX0K45xNXedT2aBMu+BotCcAVlfZX69puuF70GQyRCoSFU/csnEKJEKFQqHApCXeIFIUqFQy6GykKoU7wARIuh6HVQwsmVffasEOoWLwfauASADkKU0oYqRSHULV465SsaSgAoqfk9lPq4H18ITYhXiJr7jiYAZGyUUzN0cUFoSrx0yrX6PH0ucEmTQmgCXdb5TYrX/uFcaa3rYCR7JzQpXro1vg5HRgCo+mhMEOT3/RKQYaGpkns0poD6+nA0+UX6+nhcEPreICEIfW2REQCZoc+30A9snTjlI57fyUzdzSYnU3RpP7414sDtNLl3NFG7jJK9YI52sepqnnYBUOe9ZJLOwnCapn0AqNO+NksnVHvJNO00SSeifO+ApH4vZIpdzdHZZ6QoALWXifqI8TTJNWGVua5drTV5pui8ji0A1JfM1Lta5CeWD3h7JzO0i6gVQNJv3342lwXbtx9OpkFoP0ET0LwKDZcyOF5s46ez2TtCxkt9OL0gBmJ1oMnJJcHnYo/wU9czXfR62TnAd7zWfj7/HrAAAKDnDZ8VAAAAAElFTkSuQmCC";
8077
8470
 
8078
8471
  /*
8079
8472
  * @Author: binruan@chatlabs.com
@@ -8117,7 +8510,7 @@ const Prompt$1 = (_a) => {
8117
8510
  };
8118
8511
  return (React.createElement("div", Object.assign({ className: `pb-prompt ${css(Object.assign({}, style))}` }, props),
8119
8512
  React.createElement("div", { className: 'pb-prompt-icon' },
8120
- React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$3 })),
8513
+ React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$2 })),
8121
8514
  React.createElement("div", { className: 'pb-prompt-content' }, content),
8122
8515
  React.createElement("button", { className: 'pb-prompt-btn', onClick: handleOk }, btnText)));
8123
8516
  };
@@ -8129,13 +8522,13 @@ const Prompt = createMaterial(PromptComponent, {
8129
8522
  category: 'popup',
8130
8523
  type: 'Prompt',
8131
8524
  related: {
8132
- settingRender,
8525
+ settingRender: settingRender$2,
8133
8526
  bindableProps: [],
8134
8527
  interactionRender: interactionRender$7
8135
8528
  },
8136
8529
  defaulSetting: {
8137
8530
  props: {
8138
- icon: img$3,
8531
+ icon: img$2,
8139
8532
  content: 'You have successfully completed the appointment!',
8140
8533
  btnText: 'OK'
8141
8534
  },
@@ -8146,301 +8539,189 @@ const Prompt = createMaterial(PromptComponent, {
8146
8539
  sort: 3
8147
8540
  });
8148
8541
 
8149
- var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAmhJREFUeF7t2dFKFFEcx/HvPkE3XvcA9hpedS2JhlioISKSEqESWkhUSISIiIomWiFCl973EvYM3XTnA7QHdmEb5sz8d+b8z+xh/guCwjj7/33md2bWY4eWvzotz48BWANaLmBLoOUFsJugLQFbAi0XsCXQ8gLYU8CWgC2BfIEHwBowCdwD34GDxLCeAzPAQ+AIuAL+ZjP4lsBj4DZz8A0wlQjCW2AnM6sDuZACfAWe5YS9BqZHHCEvvBv5Z6/R/43va8AicOIJ+gN4OqIIvvBu3E3go7QBY8Av4JEn6DdgdsQQisLfARPAHymAO268++XWvQ/hEpgbEYSy8E+A33mzln0OKENwNxV3c2nyVTm8G7oMQNKEc2C+IYFa4aUAEoQzYCEyQu3wwwBIEE6BF5EQgoQfFkCCcNy90y4pIwQLXwVAguA+di4rIQQNXxVAgnAIrARGCB6+DoAEwf3xtBoIQSV8XQAJwj7wsiaCWvgQABKEL8B6RQTV8KEAJAifu/sKr4ZEUA8fEkCCsAe8FiJECR8aQILwCdgoQYgWXgNAgvAB2PIgRA2vBSBBeA+8ySBED68JIEHYBbZ7CI2E1waQILzrAWQ3MPvlcDs53s0M4Q218DDJfkDd9ynbVPGdXz18jAb0ww2LECV8TADJcohW+8HKxVgCg+9X1oRoV74/VGyAoiZEDx97CRQ1oZHwTQIMNsF9r/qoK3qMNbEEsk1wP+f+06Lu81fy+00DSGZUPcYAVHkTOLk1IIGLpDqiNUCVN4GTWwMSuEiqI1oDVHkTOLk1IIGLpDqiNUCVN4GTWwMSuEiqI/4DSCuFQaIHE+8AAAAASUVORK5CYII=";
8150
-
8151
- const CommodityDetailDiro$1 = (_a) => {
8152
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
8153
- var { style, isDefault, rec, viewTime, isPost, bottom_image } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image"]);
8154
- const [spread, setSpread] = useState(true);
8155
- const { sxpParameter } = useSxpDataSource();
8156
- const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = useSxpDataSource();
8157
- const { jumpToWeb, productView } = useEventReport();
8158
- const scrollRef = useRef(null);
8159
- const touchRef = useRef(null);
8160
- const touchMoveRef = useRef(null);
8161
- const [stopSlide, setStopSlide] = useState(false);
8162
- const [isBottom, setIsBottom] = useState(false);
8163
- const [isTop, setIsTop] = useState(true);
8164
- const curTimeRef = useRef(null);
8165
- const data = isPost ? rec : popupDetailData;
8166
- const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8167
- const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
8168
- const handleLink = () => {
8169
- if (product === null || product === void 0 ? void 0 : product.link) {
8170
- jumpToWeb(data, product, cta);
8171
- if (!isPost) {
8172
- productView(data, product, cta, viewTime || curTimeRef.current);
8173
- }
8174
- window.location.href = window.getJointUtmLink(product.link);
8175
- }
8176
- };
8177
- useEffect(() => {
8178
- const initTime = () => {
8179
- curTimeRef.current = new Date();
8180
- };
8181
- initTime();
8182
- window.addEventListener('pageshow', initTime);
8183
- return () => {
8184
- window.removeEventListener('pageshow', initTime);
8185
- };
8186
- }, []);
8187
- const priceText = useMemo(() => {
8188
- var _a, _b, _c, _d, _e;
8189
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
8190
- return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
8191
- minimumFractionDigits: 0
8192
- })) !== null && _e !== void 0 ? _e : ''}`;
8193
- }
8194
- else {
8195
- return '$7,000';
8196
- }
8197
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8198
- const width = isPreview ? 375 : window.innerWidth;
8199
- const handleClickCollapse = () => {
8200
- setSpread(!spread);
8201
- };
8202
- useEffect(() => {
8203
- var _a, _b;
8204
- console.log((_a = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight, window.innerHeight);
8205
- if ((scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) && ((_b = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) === null || _b === void 0 ? void 0 : _b.scrollHeight) > window.innerHeight) {
8206
- setStopSlide(true);
8207
- }
8208
- }, [scrollRef]);
8209
- useEffect(() => {
8210
- const handleScroll = () => {
8211
- if (scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) {
8212
- const { scrollTop, scrollHeight, clientHeight } = scrollRef.current;
8213
- const isBottom = scrollTop + clientHeight === scrollHeight;
8214
- if (isBottom) {
8215
- setIsBottom(true);
8216
- }
8217
- else {
8218
- setIsBottom(false);
8219
- }
8220
- if (scrollTop === 0) {
8221
- setIsTop(true);
8222
- }
8223
- else {
8224
- setIsTop(false);
8225
- }
8226
- }
8227
- };
8228
- if (scrollRef.current) {
8229
- scrollRef.current.addEventListener('scroll', handleScroll);
8230
- }
8231
- return () => {
8232
- if (scrollRef.current) {
8233
- scrollRef.current.removeEventListener('scroll', handleScroll);
8234
- }
8235
- };
8236
- }, [scrollRef]);
8237
- const handleTouchStart = (event) => {
8238
- event.stopPropagation();
8239
- touchRef.current = event.touches[0].clientY;
8240
- touchMoveRef.current = true;
8241
- };
8242
- const handleTouchMove = (event) => {
8243
- var _a, _b, _c, _d;
8244
- if (touchMoveRef.current) {
8245
- touchMoveRef.current = false;
8246
- const currentY = event.touches[0].clientY;
8247
- const diff = touchRef.current - currentY;
8248
- if (diff > 0 && (isBottom || !stopSlide)) {
8249
- (_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.slideNext();
8250
- }
8251
- else if (diff < 0 && (isTop || !stopSlide)) {
8252
- (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slidePrev();
8253
- }
8254
- }
8255
- };
8256
- return (React.createElement("div", { className: 'pb-commondityDiro' },
8257
- React.createElement("div", Object.assign({ ref: scrollRef, className: css(Object.assign({}, style)) }, props, { onTouchStart: handleTouchStart, onTouchMove: (e) => {
8258
- e.stopPropagation();
8259
- handleTouchMove(e);
8260
- } }),
8261
- product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, loop: true, autoplay: {
8262
- delay: 3000
8263
- } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8264
- return (React.createElement(SwiperSlide, { key: src },
8265
- React.createElement("div", { style: {
8266
- overflow: 'hidden',
8267
- width,
8268
- height: width
8269
- } },
8270
- React.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
8271
- }))),
8272
- !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css({
8273
- position: 'relative',
8274
- height: 0,
8275
- width: '100%',
8276
- paddingBottom: '100%',
8277
- overflow: 'hidden'
8278
- }) },
8279
- React.createElement("img", { className: css({
8280
- position: 'absolute',
8281
- left: 0,
8282
- top: 0,
8283
- objectFit: 'cover',
8284
- width: '100%'
8285
- }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8286
- React.createElement("div", { className: 'pb-commondityDiro-content' },
8287
- React.createElement("div", { className: 'pb-commondityDiro-content-title' }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'MEDIUM LADY D-LITE BAG'),
8288
- React.createElement("div", { className: 'pb-commondityDiro-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === '') }, (product === null || product === void 0 ? void 0 : product.collection) || 'Gold-Tone and White Butterfly Zodiac Embroidery'),
8289
- React.createElement("div", { className: 'pb-commondityDiro-content-scrollRef', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.itemId) }, (product === null || product === void 0 ? void 0 : product.itemId) ? `Reference: ${product === null || product === void 0 ? void 0 : product.itemId}` : 'Reference: M0565OESU_M01E'),
8290
- React.createElement("div", { className: 'pb-commondityDiro-content-line' }),
8291
- React.createElement("div", { className: 'pb-commondityDiro-content-price' }, priceText)),
8292
- React.createElement("div", { className: 'pb-commondityDiro-desc', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8293
- React.createElement("div", { className: 'pb-commondityDiro-desc-collapse', onClick: handleClickCollapse },
8294
- React.createElement("div", { className: 'pb-commondityDiro-desc-collapse-title' }, "DESCRIPTION"),
8295
- React.createElement("img", { className: `pb-commondityDiro-desc-collapse-icon ${spread ? 'pb-commondityDiro-desc-collapse-iconActive' : ''}`, src: img$2, alt: '' })),
8296
- React.createElement("div", { className: 'pb-commondityDiro-desc-info', hidden: !spread }, (product === null || product === void 0 ? void 0 : product.info) ||
8297
- 'The Lady D-Lite bag combines classic elegance with House modernity. The style is fully embroidered with a gold-tone and white Butterfly Zodiac motif by Pietro Ruffo, showcasing a constellation enhanced by astrological signs and adorned with butterflies. A Christian Dior Paris signature adorns the front, while D.I.O.R. charms in pale gold-finish metal further enhance and highlight the silhouette. Featuring a wide, removable embroidered shoulder strap, the medium Lady D-Lite bag can be carried by hand or worn crossbody.')),
8298
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement(React.Fragment, null,
8299
- React.createElement("div", { className: 'pb-commondityDiro-h90' }),
8300
- React.createElement("div", { className: 'pb-commondityDiro-bottom' },
8301
- React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiro-bottom-btn' }, (_l = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _l !== void 0 ? _l : 'SHOP NOW')))))));
8302
- };
8303
- var CommodityDetailDiroComponent = memo(CommodityDetailDiro$1);
8304
-
8305
8542
  /*
8306
8543
  * @Author: binruan@chatlabs.com
8307
- * @Date: 2023-07-28 18:29:57
8544
+ * @Date: 2024-03-26 16:50:25
8308
8545
  * @LastEditors: binruan@chatlabs.com
8309
- * @LastEditTime: 2024-01-05 11:37:37
8310
- * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiro\material.tsx
8546
+ * @LastEditTime: 2024-03-28 18:42:26
8547
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
8311
8548
  *
8312
8549
  */
8313
- const CommodityDetailDiro = createMaterial(CommodityDetailDiroComponent, {
8314
- displayName: '商品详情',
8315
- icon: '',
8316
- category: 'popup',
8317
- type: 'CommodityDetailDiro',
8318
- defaulSetting: {
8319
- props: {},
8320
- style: {}
8550
+ var settingRender$1 = [
8551
+ {
8552
+ title: '商品图片',
8553
+ child: [
8554
+ {
8555
+ type: 'Radius',
8556
+ label: '轮播指示器',
8557
+ options: [
8558
+ {
8559
+ label: '居左',
8560
+ value: 'left'
8561
+ },
8562
+ {
8563
+ label: '居中',
8564
+ value: 'center'
8565
+ }
8566
+ ],
8567
+ name: ['props', 'swiper', 'dotsAlign']
8568
+ },
8569
+ {
8570
+ type: 'Number',
8571
+ name: ['props', 'swiper', 'delay'],
8572
+ addonAfter: 's'
8573
+ }
8574
+ ]
8321
8575
  },
8322
- w: 100,
8323
- h: 40,
8324
- sort: 1
8325
- });
8326
-
8327
- /*
8328
- * @Author: binruan@chatlabs.com
8329
- * @Date: 2023-11-02 18:34:34
8330
- * @LastEditors: binruan@chatlabs.com
8331
- * @LastEditTime: 2024-03-14 17:03:04
8332
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8333
- *
8334
- */
8335
- const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8336
- const Modal = ({ visible, onClose, children, modalStyle, padding }) => {
8337
- const [isShow, setIsShow] = useState(false);
8338
- const modalEleRef = useRef(null);
8339
- useEffect(() => {
8340
- const parentNode = document.getElementById('sxp-render');
8341
- const node = document.getElementById('pb-modal');
8342
- if (node) {
8343
- modalEleRef.current = node;
8344
- }
8345
- else {
8346
- modalEleRef.current = document.createElement('div');
8347
- modalEleRef.current.setAttribute('id', 'pb-modal');
8348
- parentNode === null || parentNode === void 0 ? void 0 : parentNode.appendChild(modalEleRef.current);
8349
- }
8350
- }, []);
8351
- useEffect(() => {
8352
- if (visible) {
8353
- setIsShow(true);
8354
- }
8355
- else {
8356
- setTimeout(() => {
8357
- setIsShow(false);
8358
- }, 1200);
8359
- }
8360
- }, [visible]);
8361
- if (!modalEleRef.current)
8362
- return null;
8363
- const handleClose = debounce(() => {
8364
- onClose === null || onClose === void 0 ? void 0 : onClose();
8365
- }, 300);
8366
- return ReactDOM.createPortal(React.createElement("div", { className: 'modal-bg', style: Object.assign({ display: isShow ? 'flex' : 'none', backgroundColor: visible ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
8367
- React.createElement("div", { className: `modal-container ${visible ? 'modal-popIn' : 'modal-popOut'}`, style: { padding }, onClick: (e) => {
8368
- e.stopPropagation();
8369
- e.preventDefault();
8370
- } },
8371
- React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8372
- React.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
8373
- children)), modalEleRef.current);
8374
- };
8375
- var Modal$1 = memo(Modal);
8376
-
8377
- /*
8378
- * @Author: binruan@chatlabs.com
8379
- * @Date: 2023-12-26 16:11:34
8380
- * @LastEditors: binruan@chatlabs.com
8381
- * @LastEditTime: 2024-03-14 11:19:03
8382
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
8383
- *
8384
- */
8385
- const limitTextLastWholeWord = (originalText = '', limit) => {
8386
- // 匹配到中文
8387
- const chineseRegex = /[\u4e00-\u9fa5]+/;
8388
- if (chineseRegex.test(originalText)) {
8389
- return originalText.slice(0, 54);
8390
- }
8391
- const words = originalText.split(' ');
8392
- const newWords = [];
8393
- for (let i = 0; i < words.length; i++) {
8394
- newWords.push(words[i]);
8395
- const tempText = newWords.join(' ');
8396
- if (tempText.length >= limit)
8397
- break;
8576
+ {
8577
+ title: '商品文本',
8578
+ child: [
8579
+ {
8580
+ name: ['props', 'commodityStyles'],
8581
+ type: 'SelectLinkage',
8582
+ child: [
8583
+ {
8584
+ label: '字段',
8585
+ type: 'Select',
8586
+ options: [
8587
+ {
8588
+ label: '商品名称',
8589
+ value: 'title'
8590
+ },
8591
+ {
8592
+ label: '系列名称',
8593
+ value: 'collection'
8594
+ },
8595
+ {
8596
+ label: '价格',
8597
+ value: 'price'
8598
+ },
8599
+ {
8600
+ label: '税费说明',
8601
+ value: 'taxInfo'
8602
+ },
8603
+ {
8604
+ label: '商品描述',
8605
+ value: 'info'
8606
+ }
8607
+ ],
8608
+ name: ['props', 'commodityStyles', 'field'],
8609
+ initialValue: 'title'
8610
+ },
8611
+ {
8612
+ type: 'Group',
8613
+ label: '标题字体',
8614
+ child: [
8615
+ {
8616
+ type: 'Color',
8617
+ name: ['color']
8618
+ },
8619
+ {
8620
+ type: 'Select',
8621
+ options: [{ label: '黑体', value: '黑体' }],
8622
+ name: ['fontFamily']
8623
+ },
8624
+ {
8625
+ type: 'Number',
8626
+ addonAfter: 'px',
8627
+ name: ['fontSize']
8628
+ }
8629
+ ]
8630
+ },
8631
+ {
8632
+ label: '标题样式',
8633
+ type: 'TextStyle'
8634
+ },
8635
+ {
8636
+ label: '标题对齐',
8637
+ type: 'TextAlign'
8638
+ },
8639
+ {
8640
+ label: '默认行数',
8641
+ type: 'Number',
8642
+ name: ['lineClamp']
8643
+ }
8644
+ ]
8645
+ }
8646
+ ]
8647
+ },
8648
+ {
8649
+ title: '购买按钮样式',
8650
+ child: [
8651
+ {
8652
+ type: 'Color',
8653
+ label: '背景色',
8654
+ name: ['props', 'buttonStyle', 'backgroundColor'],
8655
+ initialValue: '#000'
8656
+ },
8657
+ {
8658
+ type: 'Group',
8659
+ label: '尺寸',
8660
+ child: [
8661
+ {
8662
+ type: 'Number',
8663
+ name: ['props', 'buttonStyle', 'height'],
8664
+ addonAfter: 'H'
8665
+ }
8666
+ ]
8667
+ },
8668
+ {
8669
+ type: 'Group',
8670
+ label: '圆角',
8671
+ child: [
8672
+ {
8673
+ type: 'Slider',
8674
+ name: ['props', 'buttonStyle', 'borderRadius'],
8675
+ max: 100
8676
+ },
8677
+ {
8678
+ type: 'Number',
8679
+ name: ['props', 'buttonStyle', 'borderRadius'],
8680
+ addonAfter: 'px',
8681
+ max: 100
8682
+ }
8683
+ ]
8684
+ },
8685
+ {
8686
+ type: 'TextMargin',
8687
+ name: ['props', 'buttonStyle']
8688
+ },
8689
+ {
8690
+ type: 'Group',
8691
+ label: '字体',
8692
+ child: [
8693
+ {
8694
+ type: 'Color',
8695
+ name: ['props', 'buttonStyle', 'color'],
8696
+ initialValue: '#fff'
8697
+ },
8698
+ {
8699
+ type: 'Select',
8700
+ name: ['props', 'buttonStyle', 'fontFamily'],
8701
+ options: [{ label: '黑体', value: '黑体' }]
8702
+ },
8703
+ {
8704
+ type: 'Number',
8705
+ name: ['props', 'buttonStyle', 'fontSize'],
8706
+ addonAfter: 'px'
8707
+ }
8708
+ ]
8709
+ },
8710
+ {
8711
+ type: 'TextStyle',
8712
+ name: ['props', 'buttonStyle']
8713
+ },
8714
+ {
8715
+ type: 'TextAlign',
8716
+ name: ['props', 'buttonStyle']
8717
+ }
8718
+ ]
8398
8719
  }
8399
- // const _words = newWords.length === words.length ? newWords : newWords.slice(0, newWords.length - 1);
8400
- const _words = newWords.length > 1 && newWords.length < words.length ? newWords.slice(0, newWords.length - 1) : newWords;
8401
- return _words.join(' ') + ' ';
8402
- };
8403
- const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText }) => {
8404
- const [isShowMore, setIsShowMore] = useState(true);
8405
- const [isShow, setIsShow] = useState(false);
8406
- const lineClamp = Number((style === null || style === void 0 ? void 0 : style.lineClamp) || 2);
8407
- const multiRow = useRef(null);
8408
- const handleClick = useCallback(() => {
8409
- setIsShowMore(!isShowMore);
8410
- }, [isShowMore]);
8411
- useMemo(() => {
8412
- return !isShowMore && text.length > maxStr ? limitTextLastWholeWord(text, maxStr) + '...' : text;
8413
- }, [text, maxStr, isShowMore]);
8414
- useEffect(() => {
8415
- if (multiRow.current) {
8416
- setIsShowMore(true);
8417
- setTimeout(() => {
8418
- setIsShow(false);
8419
- const height = parseInt(getComputedStyle(multiRow.current).height);
8420
- const lineHeight = parseInt(getComputedStyle(multiRow === null || multiRow === void 0 ? void 0 : multiRow.current).lineHeight);
8421
- if (text && height > lineHeight * lineClamp) {
8422
- setIsShowMore(false);
8423
- setIsShow(true);
8424
- }
8425
- }, 100);
8426
- }
8427
- }, [multiRow, text, lineClamp, style]);
8428
- return (React.createElement("div", { className: className, style: Object.assign({}, style) },
8429
- React.createElement("div", { ref: multiRow, style: {
8430
- overflow: 'hidden',
8431
- WebkitLineClamp: !isShowMore ? lineClamp : '',
8432
- textOverflow: 'ellipsis',
8433
- display: '-webkit-box',
8434
- WebkitBoxOrient: 'vertical',
8435
- wordBreak: 'break-word'
8436
- } }, text),
8437
- isShow && text && (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick }, isShowMore ? unfoldText || 'show less' : foldText || 'show more'))));
8438
- };
8439
- var ExpandableText$1 = memo(ExpandableText);
8720
+ ];
8440
8721
 
8441
8722
  const CommodityDetailDiroNew$1 = (_a) => {
8442
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
8443
- var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText"]);
8723
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8724
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle"]);
8444
8725
  useState(true);
8445
8726
  const { sxpParameter } = useSxpDataSource();
8446
8727
  const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = useSxpDataSource();
@@ -8487,14 +8768,22 @@ const CommodityDetailDiroNew$1 = (_a) => {
8487
8768
  }
8488
8769
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8489
8770
  const width = isPreview ? 375 : window.innerWidth;
8771
+ const productInfoText = ({ isPost }) => {
8772
+ return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8773
+ React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
8774
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8775
+ Made in Italy` })));
8776
+ };
8490
8777
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
8491
8778
  React.createElement("div", Object.assign({ ref: scrollRef, className: css(Object.assign({}, style)) }, props),
8492
8779
  product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8493
8780
  clickable: true,
8494
8781
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
8495
- clickableClass: 'commondityDiroNew-swiper-clickable'
8782
+ clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
8783
+ ? 'commondityDiroNew-swiper-clickable-left'
8784
+ : 'commondityDiroNew-swiper-clickable-center'
8496
8785
  }, loop: true, autoplay: {
8497
- delay: 3000
8786
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8498
8787
  } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8499
8788
  return (React.createElement(SwiperSlide, { key: src },
8500
8789
  React.createElement("div", { style: {
@@ -8520,35 +8809,289 @@ const CommodityDetailDiroNew$1 = (_a) => {
8520
8809
  }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8521
8810
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
8522
8811
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
8523
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-title' }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
8524
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText)),
8525
- React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === '') }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin'),
8526
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn' }, (_l = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _l !== void 0 ? _l : 'Shop now')),
8527
- React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') }, isPost ? (React.createElement(ExpandableText$1, { onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
8528
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8529
- Made in Italy` })) : (React.createElement("div", { className: 'pb-commondityDiroNew-info' }, (product === null || product === void 0 ? void 0 : product.info) ||
8530
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8531
- Made in Italy`))))),
8532
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
8533
- React.createElement("div", { className: 'pb-commondityDiroNew-info', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') }, (product === null || product === void 0 ? void 0 : product.info) ||
8534
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8535
- Made in Italy`))));
8812
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
8813
+ React.createElement("div", { className: '' },
8814
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
8815
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_l = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _l !== void 0 ? _l : '税费'))),
8816
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin'),
8817
+ (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_m = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _m !== void 0 ? _m : 'Shop now')),
8818
+ productInfoText({ isPost }))),
8819
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
8536
8820
  };
8537
- var CommodityDetailDiroNew$2 = memo(CommodityDetailDiroNew$1);
8821
+ var CommodityDetailDiroNewComponent = memo(CommodityDetailDiroNew$1);
8538
8822
 
8539
- const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNew$2, {
8823
+ /*
8824
+ * @Author: binruan@chatlabs.com
8825
+ * @Date: 2024-03-20 10:27:31
8826
+ * @LastEditors: binruan@chatlabs.com
8827
+ * @LastEditTime: 2024-04-02 15:12:53
8828
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\material.tsx
8829
+ *
8830
+ */
8831
+ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
8540
8832
  displayName: '商品详情',
8541
8833
  icon: '',
8542
8834
  category: 'popup',
8543
8835
  type: 'CommodityDetailDiroNew',
8836
+ related: {
8837
+ settingRender: settingRender$1
8838
+ },
8544
8839
  defaulSetting: {
8545
- props: {},
8840
+ props: {
8841
+ swiper: {
8842
+ dotsAlign: 'left',
8843
+ delay: 3
8844
+ },
8845
+ commodityStyles: {
8846
+ price: {
8847
+ color: '#000',
8848
+ fontWeight: 'bold',
8849
+ fontSize: 18
8850
+ },
8851
+ title: {
8852
+ color: '#000',
8853
+ fontSize: 13
8854
+ },
8855
+ collection: {
8856
+ color: '#757575',
8857
+ fontSize: 13
8858
+ },
8859
+ info: {
8860
+ color: '#757575',
8861
+ fontSize: 13
8862
+ },
8863
+ taxInfo: {
8864
+ color: '#000',
8865
+ fontWeight: 'bold',
8866
+ fontSize: 13,
8867
+ textAlign: 'right'
8868
+ }
8869
+ },
8870
+ buttonStyle: {
8871
+ backgroundColor: '#000',
8872
+ fontSize: 12,
8873
+ height: 52,
8874
+ fontWeight: 'bold',
8875
+ textAlign: 'center',
8876
+ color: '#fff',
8877
+ borderRadius: 25,
8878
+ marginTop: 16,
8879
+ marginBottom: 16
8880
+ }
8881
+ },
8546
8882
  style: {}
8547
8883
  },
8548
- w: 100,
8549
- h: 40,
8550
- sort: 1
8551
- });
8884
+ w: 100,
8885
+ h: 40,
8886
+ sort: 1
8887
+ });
8888
+
8889
+ /*
8890
+ * @Author: binruan@chatlabs.com
8891
+ * @Date: 2024-03-26 16:50:25
8892
+ * @LastEditors: binruan@chatlabs.com
8893
+ * @LastEditTime: 2024-03-29 17:03:07
8894
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
8895
+ *
8896
+ */
8897
+ var settingRender = [
8898
+ {
8899
+ title: '主题样式',
8900
+ child: [
8901
+ {
8902
+ type: 'Group',
8903
+ label: '尺寸',
8904
+ child: [
8905
+ {
8906
+ type: 'Number',
8907
+ name: ['style', 'width'],
8908
+ addonAfter: 'W'
8909
+ },
8910
+ {
8911
+ type: 'Number',
8912
+ name: ['style', 'height'],
8913
+ addonAfter: 'H'
8914
+ }
8915
+ ]
8916
+ },
8917
+ {
8918
+ type: 'Group',
8919
+ label: '圆角',
8920
+ child: [
8921
+ {
8922
+ type: 'Slider',
8923
+ name: ['style', 'borderRadius'],
8924
+ max: 100
8925
+ },
8926
+ {
8927
+ type: 'Number',
8928
+ name: ['style', 'borderRadius'],
8929
+ addonAfter: 'px',
8930
+ max: 100
8931
+ }
8932
+ ]
8933
+ },
8934
+ {
8935
+ type: 'Color',
8936
+ label: '背景色',
8937
+ name: ['style', 'backgroundColor']
8938
+ },
8939
+ {
8940
+ label: '内边距',
8941
+ type: 'Number',
8942
+ name: ['style', 'padding'],
8943
+ addonAfter: 'px'
8944
+ },
8945
+ {
8946
+ label: '与Post描述边距',
8947
+ type: 'Number',
8948
+ name: ['style', 'marginBottom'],
8949
+ addonAfter: 'px'
8950
+ }
8951
+ ]
8952
+ },
8953
+ {
8954
+ title: '商品图片',
8955
+ child: [
8956
+ {
8957
+ type: 'Group',
8958
+ label: '尺寸',
8959
+ child: [
8960
+ {
8961
+ type: 'Number',
8962
+ name: ['props', 'ctaTempStyles', 'img', 'width'],
8963
+ addonAfter: 'W'
8964
+ },
8965
+ {
8966
+ type: 'Number',
8967
+ name: ['props', 'ctaTempStyles', 'img', 'height'],
8968
+ addonAfter: 'H'
8969
+ }
8970
+ ]
8971
+ },
8972
+ {
8973
+ type: 'Group',
8974
+ label: '圆角',
8975
+ child: [
8976
+ {
8977
+ type: 'Slider',
8978
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
8979
+ max: 100
8980
+ },
8981
+ {
8982
+ type: 'Number',
8983
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
8984
+ addonAfter: 'px',
8985
+ max: 100
8986
+ }
8987
+ ]
8988
+ },
8989
+ {
8990
+ type: 'Number',
8991
+ label: '与右侧边距',
8992
+ addonAfter: 'px',
8993
+ name: ['props', 'ctaTempStyles', 'img', 'marginRight']
8994
+ }
8995
+ ]
8996
+ },
8997
+ {
8998
+ title: '商品标题文本',
8999
+ type: 'commodityTitle',
9000
+ child: [
9001
+ {
9002
+ type: 'Group',
9003
+ label: '字体',
9004
+ child: [
9005
+ {
9006
+ type: 'Color',
9007
+ name: ['props', 'ctaTempStyles', 'title', 'color']
9008
+ },
9009
+ {
9010
+ type: 'Select',
9011
+ options: [{ label: '黑体', value: '黑体' }],
9012
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily']
9013
+ },
9014
+ {
9015
+ type: 'Number',
9016
+ addonAfter: 'px',
9017
+ name: ['props', 'ctaTempStyles', 'title', 'fontSize']
9018
+ }
9019
+ ]
9020
+ },
9021
+ {
9022
+ label: '样式',
9023
+ type: 'TextStyle',
9024
+ name: ['props', 'ctaTempStyles', 'title']
9025
+ },
9026
+ {
9027
+ label: '对齐',
9028
+ type: 'TextAlign',
9029
+ name: ['props', 'ctaTempStyles', 'title']
9030
+ },
9031
+ {
9032
+ label: '间距',
9033
+ type: 'TextSpace',
9034
+ name: ['props', 'ctaTempStyles', 'title']
9035
+ }
9036
+ ]
9037
+ },
9038
+ {
9039
+ title: 'CTA标题',
9040
+ child: [
9041
+ {
9042
+ type: 'Group',
9043
+ label: '尺寸',
9044
+ child: [
9045
+ {
9046
+ type: 'Number',
9047
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'width'],
9048
+ addonAfter: 'W'
9049
+ },
9050
+ {
9051
+ type: 'Number',
9052
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'height'],
9053
+ addonAfter: 'H'
9054
+ }
9055
+ ]
9056
+ },
9057
+ {
9058
+ type: 'Color',
9059
+ label: '背景色',
9060
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'backgroundColor']
9061
+ },
9062
+ {
9063
+ type: 'Group',
9064
+ label: '字体',
9065
+ child: [
9066
+ {
9067
+ type: 'Color',
9068
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
9069
+ },
9070
+ {
9071
+ type: 'Select',
9072
+ options: [{ label: '黑体', value: '黑体' }],
9073
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily']
9074
+ },
9075
+ {
9076
+ type: 'Number',
9077
+ addonAfter: 'px',
9078
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
9079
+ }
9080
+ ]
9081
+ },
9082
+ {
9083
+ label: '样式',
9084
+ type: 'TextStyle',
9085
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
9086
+ },
9087
+ {
9088
+ label: '对齐',
9089
+ type: 'TextAlign',
9090
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
9091
+ }
9092
+ ]
9093
+ }
9094
+ ];
8552
9095
 
8553
9096
  var interactionRender$6 = [
8554
9097
  {
@@ -8590,9 +9133,10 @@ function useOnScreen(ref) {
8590
9133
  }
8591
9134
 
8592
9135
  const EventProvider = (_a) => {
8593
- var { rec, children, className, onClick } = _a; __rest(_a, ["rec", "children", "className", "onClick"]);
9136
+ var { rec, children, className, onClick, style } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style"]);
8594
9137
  const ref = useRef(null);
8595
9138
  const isOnScreen = useOnScreen(ref);
9139
+ const { popupAni } = useEditor();
8596
9140
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
8597
9141
  useEffect(() => {
8598
9142
  var _a, _b;
@@ -8613,8 +9157,8 @@ const EventProvider = (_a) => {
8613
9157
  }, rec, item);
8614
9158
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
8615
9159
  onClick === null || onClick === void 0 ? void 0 : onClick();
8616
- }, 1200);
8617
- return (React.createElement("div", { ref: ref, className: className, onClick: handleClick }, children));
9160
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9161
+ return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
8618
9162
  };
8619
9163
  var EventProvider$1 = memo(EventProvider);
8620
9164
 
@@ -8622,20 +9166,12 @@ var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
8622
9166
 
8623
9167
  const Commodity$1 = (_a) => {
8624
9168
  var _b, _c, _d, _e, _f, _g, _h;
8625
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9169
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8626
9170
  const { sxpParameter } = useSxpDataSource();
8627
9171
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8628
9172
  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;
8629
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
8630
- React.createElement("div", { className: css({
8631
- width: '60px',
8632
- height: '60px',
8633
- marginRight: '8px',
8634
- borderRadius: '3px',
8635
- overflow: 'hidden',
8636
- flexShrink: 0,
8637
- backgroundColor: '#f2f2f2'
8638
- }) },
9173
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9174
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8639
9175
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
8640
9176
  React.createElement("div", { className: css({
8641
9177
  color: '#fff',
@@ -8645,20 +9181,19 @@ const Commodity$1 = (_a) => {
8645
9181
  width: '100%',
8646
9182
  overflow: 'hidden'
8647
9183
  }) },
8648
- React.createElement("div", { className: styles$6['tow-line-ellipsis'] }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
8649
- React.createElement("div", { className: css({
8650
- background: 'rgba(0,0,0,.5)',
8651
- fontSize: '10px',
8652
- padding: '2px 7px',
8653
- width: 'auto',
8654
- textAlign: 'center',
8655
- textOverflow: 'ellipsis',
8656
- overflow: 'hidden',
8657
- whiteSpace: 'nowrap'
8658
- }) }, (_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'))));
9184
+ 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'),
9185
+ React.createElement("div", { className: 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'))));
8659
9186
  };
8660
9187
  var CommodityComponent = memo(Commodity$1);
8661
9188
 
9189
+ /*
9190
+ * @Author: binruan@chatlabs.com
9191
+ * @Date: 2023-07-28 18:29:57
9192
+ * @LastEditors: binruan@chatlabs.com
9193
+ * @LastEditTime: 2024-03-29 16:39:54
9194
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Commodity\material.tsx
9195
+ *
9196
+ */
8662
9197
  const Commodity = createMaterial(CommodityComponent, {
8663
9198
  displayName: '推荐单商品-透明底',
8664
9199
  icon: '',
@@ -8666,15 +9201,39 @@ const Commodity = createMaterial(CommodityComponent, {
8666
9201
  type: 'Commodity',
8667
9202
  related: {
8668
9203
  interactionRender: interactionRender$6,
8669
- bindableProps: []
9204
+ bindableProps: [],
9205
+ settingRender
8670
9206
  },
8671
9207
  defaulSetting: {
8672
- props: {},
9208
+ props: {
9209
+ ctaTempStyles: {
9210
+ img: {
9211
+ borderRadius: 3,
9212
+ width: 60,
9213
+ height: 60,
9214
+ marginRight: 8
9215
+ },
9216
+ title: {
9217
+ fontSize: 12,
9218
+ color: '#fff',
9219
+ textAlign: 'left'
9220
+ },
9221
+ ctaTitle: {
9222
+ fontSize: 10,
9223
+ color: '#fff',
9224
+ textAlign: 'center',
9225
+ width: 130,
9226
+ height: 20,
9227
+ backgroundColor: 'rgba(0,0,0,.5)'
9228
+ }
9229
+ }
9230
+ },
8673
9231
  style: {
8674
- padding: '7px',
8675
- display: 'flex',
8676
- background: 'rgba(0,0,0,.3)',
8677
- borderRadius: '3px'
9232
+ padding: 7,
9233
+ width: 236,
9234
+ height: 74,
9235
+ borderRadius: 3,
9236
+ backgroundColor: 'rgba(0,0,0,.3)'
8678
9237
  }
8679
9238
  },
8680
9239
  w: 100,
@@ -8696,30 +9255,24 @@ var interactionRender$5 = [
8696
9255
 
8697
9256
  const Appoint$1 = (_a) => {
8698
9257
  var _b, _c, _d, _e;
8699
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9258
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8700
9259
  const { sxpParameter } = useSxpDataSource();
8701
9260
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
8702
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
8703
- React.createElement("div", { className: css({
8704
- width: '30px',
8705
- height: '30px',
8706
- marginRight: '8px',
8707
- borderRadius: '3px',
8708
- overflow: 'hidden',
8709
- flexShrink: 0,
8710
- backgroundColor: '#f2f2f2'
8711
- }) },
9261
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
9262
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8712
9263
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, alt: '' })),
8713
- React.createElement("div", { className: css({
8714
- color: '#fff',
8715
- width: '100%',
8716
- overflow: 'hidden',
8717
- fontSize: '12px',
8718
- textOverflow: 'ellipsis'
8719
- }) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
9264
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
8720
9265
  };
8721
9266
  var AppointComponent = memo(Appoint$1);
8722
9267
 
9268
+ /*
9269
+ * @Author: binruan@chatlabs.com
9270
+ * @Date: 2023-07-28 18:29:57
9271
+ * @LastEditors: binruan@chatlabs.com
9272
+ * @LastEditTime: 2024-03-29 17:03:49
9273
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Appoint\material.tsx
9274
+ *
9275
+ */
8723
9276
  const Appoint = createMaterial(AppointComponent, {
8724
9277
  displayName: '预约表单',
8725
9278
  icon: '',
@@ -8727,18 +9280,33 @@ const Appoint = createMaterial(AppointComponent, {
8727
9280
  type: 'Appoint',
8728
9281
  related: {
8729
9282
  interactionRender: interactionRender$5,
9283
+ settingRender: settingRender === null || settingRender === void 0 ? void 0 : settingRender.filter((i) => i.type !== 'commodityTitle'),
8730
9284
  bindableProps: []
8731
9285
  },
8732
9286
  defaulSetting: {
8733
9287
  props: {
8734
- content: '按钮'
9288
+ ctaTempStyles: {
9289
+ img: {
9290
+ borderRadius: 3,
9291
+ width: 30,
9292
+ height: 30,
9293
+ marginRight: 8
9294
+ },
9295
+ ctaTitle: {
9296
+ fontSize: 12,
9297
+ color: '#fff',
9298
+ textAlign: 'left',
9299
+ width: 130,
9300
+ height: 20
9301
+ }
9302
+ }
8735
9303
  },
8736
9304
  style: {
8737
- padding: '7px',
8738
- display: 'flex',
8739
- alignItems: 'center',
8740
- background: 'rgba(0,0,0,.3)',
8741
- borderRadius: '3px'
9305
+ padding: 7,
9306
+ width: 236,
9307
+ height: 44,
9308
+ borderRadius: 3,
9309
+ backgroundColor: 'rgba(0,0,0,.3)'
8742
9310
  }
8743
9311
  },
8744
9312
  w: 100,
@@ -8750,7 +9318,7 @@ var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU"};
8750
9318
 
8751
9319
  const Link$1 = (_a) => {
8752
9320
  var _b, _c, _d, _e, _f;
8753
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9321
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8754
9322
  const { sxpParameter, bffEventReport } = useSxpDataSource();
8755
9323
  const { jumpToWeb } = useEventReport();
8756
9324
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
@@ -8761,45 +9329,60 @@ const Link$1 = (_a) => {
8761
9329
  window.location.href = window.getJointUtmLink(cta.link);
8762
9330
  }
8763
9331
  };
8764
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props, { onClick: handleTo }),
8765
- React.createElement("div", { className: css({
8766
- width: '60px',
8767
- height: '60px',
8768
- marginRight: '8px',
8769
- borderRadius: '3px',
8770
- backgroundColor: '#f2f2f2',
8771
- overflow: 'hidden',
8772
- flexShrink: 0
8773
- }) },
9332
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
9333
+ React.createElement("div", { className: css(Object.assign({ backgroundColor: '#f2f2f2', overflow: 'hidden', flexShrink: 0 }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8774
9334
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image, alt: '' })),
8775
9335
  React.createElement("div", { className: css({
8776
- color: '#fff',
8777
9336
  display: 'flex',
8778
9337
  alignItems: 'center',
8779
9338
  width: '100%',
8780
9339
  overflow: 'hidden'
8781
9340
  }) },
8782
- React.createElement("div", { className: styles$5['tow-line-ellipsis'] }, (_f = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _f !== void 0 ? _f : 'Product Name'))));
9341
+ React.createElement("div", { className: styles$5['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle }, (_f = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _f !== void 0 ? _f : 'Product Name'))));
8783
9342
  };
8784
9343
  var LinkComponent = memo(Link$1);
8785
9344
 
9345
+ /*
9346
+ * @Author: binruan@chatlabs.com
9347
+ * @Date: 2023-07-28 18:29:57
9348
+ * @LastEditors: binruan@chatlabs.com
9349
+ * @LastEditTime: 2024-03-29 17:04:57
9350
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\material.tsx
9351
+ *
9352
+ */
8786
9353
  const Link = createMaterial(LinkComponent, {
8787
9354
  displayName: '跳转指引',
8788
9355
  icon: '',
8789
9356
  category: 'template',
8790
9357
  type: 'Link',
8791
9358
  related: {
9359
+ settingRender: settingRender === null || settingRender === void 0 ? void 0 : settingRender.filter((i) => i.type !== 'commodityTitle'),
8792
9360
  bindableProps: []
8793
9361
  },
8794
9362
  defaulSetting: {
8795
9363
  props: {
8796
- content: '按钮'
9364
+ ctaTempStyles: {
9365
+ img: {
9366
+ borderRadius: 3,
9367
+ width: 60,
9368
+ height: 60,
9369
+ marginRight: 8
9370
+ },
9371
+ ctaTitle: {
9372
+ fontSize: 12,
9373
+ color: '#fff',
9374
+ textAlign: 'left',
9375
+ width: 130,
9376
+ height: 20
9377
+ }
9378
+ }
8797
9379
  },
8798
9380
  style: {
8799
- padding: '7px',
8800
- display: 'flex',
8801
- background: 'rgba(0,0,0,.3)',
8802
- borderRadius: '3px'
9381
+ padding: 7,
9382
+ width: 236,
9383
+ height: 74,
9384
+ borderRadius: 3,
9385
+ backgroundColor: 'rgba(0,0,0,.3)'
8803
9386
  }
8804
9387
  },
8805
9388
  w: 100,
@@ -8823,20 +9406,12 @@ var styles$4 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
8823
9406
 
8824
9407
  const CommodityDiro$1 = (_a) => {
8825
9408
  var _b, _c, _d, _e, _f, _g, _h;
8826
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9409
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8827
9410
  const { sxpParameter } = useSxpDataSource();
8828
9411
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8829
9412
  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;
8830
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
8831
- React.createElement("div", { className: css({
8832
- width: '60px',
8833
- height: '60px',
8834
- marginRight: '8px',
8835
- borderRadius: '3px',
8836
- overflow: 'hidden',
8837
- flexShrink: 0,
8838
- backgroundColor: '#f2f2f2'
8839
- }) },
9413
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9414
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8840
9415
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
8841
9416
  React.createElement("div", { className: css({
8842
9417
  color: '#fff',
@@ -8846,22 +9421,19 @@ const CommodityDiro$1 = (_a) => {
8846
9421
  width: '100%',
8847
9422
  overflow: 'hidden'
8848
9423
  }) },
8849
- React.createElement("div", { className: styles$4['tow-line-ellipsis'] }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
8850
- React.createElement("div", { className: css({
8851
- background: 'rgba(0,0,0,1)',
8852
- fontSize: '10px',
8853
- padding: '2px 7px',
8854
- textAlign: 'center',
8855
- textOverflow: 'ellipsis',
8856
- overflow: 'hidden',
8857
- borderRadius: '25px',
8858
- width: 'fit-content',
8859
- maxWidth: '100%',
8860
- whiteSpace: 'nowrap'
8861
- }) }, (_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'))));
9424
+ 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'),
9425
+ React.createElement("div", { className: 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'))));
8862
9426
  };
8863
9427
  var CommodityDiroComponent = memo(CommodityDiro$1);
8864
9428
 
9429
+ /*
9430
+ * @Author: binruan@chatlabs.com
9431
+ * @Date: 2023-07-28 18:29:57
9432
+ * @LastEditors: binruan@chatlabs.com
9433
+ * @LastEditTime: 2024-03-29 16:07:28
9434
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiro\material.tsx
9435
+ *
9436
+ */
8865
9437
  const CommodityDiro = createMaterial(CommodityDiroComponent, {
8866
9438
  displayName: '推荐单商品-白底圆角按钮',
8867
9439
  icon: '',
@@ -8869,15 +9441,39 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
8869
9441
  type: 'CommodityDiro',
8870
9442
  related: {
8871
9443
  interactionRender: interactionRender$4,
9444
+ settingRender,
8872
9445
  bindableProps: []
8873
9446
  },
8874
9447
  defaulSetting: {
8875
- props: {},
9448
+ props: {
9449
+ ctaTempStyles: {
9450
+ img: {
9451
+ borderRadius: 3,
9452
+ width: 60,
9453
+ height: 60,
9454
+ marginRight: 8
9455
+ },
9456
+ title: {
9457
+ fontSize: 12,
9458
+ color: '#000',
9459
+ textAlign: 'left'
9460
+ },
9461
+ ctaTitle: {
9462
+ fontSize: 10,
9463
+ color: '#fff',
9464
+ textAlign: 'center',
9465
+ width: 80,
9466
+ height: 20,
9467
+ backgroundColor: 'rgba(0,0,0,1)'
9468
+ }
9469
+ }
9470
+ },
8876
9471
  style: {
8877
- padding: '7px',
8878
- display: 'flex',
8879
- borderRadius: '3px',
8880
- background: '#fff'
9472
+ padding: 7,
9473
+ width: 236,
9474
+ height: 74,
9475
+ borderRadius: 3,
9476
+ backgroundColor: '#fff'
8881
9477
  }
8882
9478
  },
8883
9479
  w: 100,
@@ -8901,20 +9497,12 @@ var styles$3 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
8901
9497
 
8902
9498
  const CommodityDiroNew$1 = (_a) => {
8903
9499
  var _b, _c, _d, _e, _f, _g, _h;
8904
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9500
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8905
9501
  const { sxpParameter } = useSxpDataSource();
8906
9502
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8907
9503
  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;
8908
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign(Object.assign({}, style), { maxWidth: '260px', width: '100%', padding: '4px', background: 'rgba(255,255,255,0.75)' })) }, props),
8909
- React.createElement("div", { className: css({
8910
- width: '78px',
8911
- height: '78px',
8912
- marginRight: '16px',
8913
- borderRadius: '8px',
8914
- overflow: 'hidden',
8915
- flexShrink: 0,
8916
- backgroundColor: '#f2f2f2'
8917
- }) },
9504
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9505
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8918
9506
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
8919
9507
  React.createElement("div", { className: css({
8920
9508
  color: '#fff',
@@ -8924,22 +9512,19 @@ const CommodityDiroNew$1 = (_a) => {
8924
9512
  width: '100%',
8925
9513
  overflow: 'hidden'
8926
9514
  }) },
8927
- React.createElement("div", { className: styles$3['tow-line-ellipsis'] }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
8928
- React.createElement("div", { className: css({
8929
- fontSize: '13px',
8930
- fontWeight: 'bold',
8931
- textOverflow: 'ellipsis',
8932
- overflow: 'hidden',
8933
- width: 'fit-content',
8934
- maxWidth: '100%',
8935
- whiteSpace: 'nowrap',
8936
- textDecoration: 'underline',
8937
- color: '#000',
8938
- lineHeight: '20px'
8939
- }) }, (_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'))));
9515
+ 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'),
9516
+ React.createElement("div", { className: 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'))));
8940
9517
  };
8941
9518
  var CommodityDiroNewComponent = memo(CommodityDiroNew$1);
8942
9519
 
9520
+ /*
9521
+ * @Author: binruan@chatlabs.com
9522
+ * @Date: 2023-07-28 18:29:57
9523
+ * @LastEditors: binruan@chatlabs.com
9524
+ * @LastEditTime: 2024-03-29 11:56:56
9525
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiroNew\material.tsx
9526
+ *
9527
+ */
8943
9528
  const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
8944
9529
  displayName: '推荐单商品-白底下划线按钮',
8945
9530
  icon: '',
@@ -8947,15 +9532,40 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
8947
9532
  type: 'CommodityDiroNew',
8948
9533
  related: {
8949
9534
  interactionRender: interactionRender$3,
8950
- bindableProps: []
9535
+ bindableProps: [],
9536
+ settingRender
8951
9537
  },
8952
9538
  defaulSetting: {
8953
- props: {},
9539
+ props: {
9540
+ ctaTempStyles: {
9541
+ img: {
9542
+ borderRadius: 8,
9543
+ width: 78,
9544
+ height: 78,
9545
+ marginRight: 16
9546
+ },
9547
+ title: {
9548
+ fontSize: 12,
9549
+ color: '#000',
9550
+ textAlign: 'left'
9551
+ },
9552
+ ctaTitle: {
9553
+ textDecoration: 'underline',
9554
+ fontSize: 12,
9555
+ fontWeight: 'bold',
9556
+ color: '#000',
9557
+ textAlign: 'left',
9558
+ width: 150,
9559
+ height: 20
9560
+ }
9561
+ }
9562
+ },
8954
9563
  style: {
8955
- padding: '7px',
8956
- display: 'flex',
8957
- borderRadius: '3px',
8958
- background: '#fff'
9564
+ borderRadius: 4,
9565
+ width: 260,
9566
+ height: 86,
9567
+ padding: 4,
9568
+ backgroundColor: 'rgba(255,255,255,0.75)'
8959
9569
  }
8960
9570
  },
8961
9571
  w: 100,
@@ -9008,8 +9618,9 @@ var styles$2 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
9008
9618
 
9009
9619
  const MultiCommodityDiro$1 = (_a) => {
9010
9620
  var _b, _c;
9011
- var { content, style, bgImg, recData, onClick, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image"]);
9621
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9012
9622
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9623
+ const { popupAni } = useEditor();
9013
9624
  const [products, setProducts] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
9014
9625
  const handleClick = throttle((item) => {
9015
9626
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -9018,19 +9629,11 @@ const MultiCommodityDiro$1 = (_a) => {
9018
9629
  }, recData, item);
9019
9630
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
9020
9631
  onClick === null || onClick === void 0 ? void 0 : onClick();
9021
- }, 1200);
9632
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9022
9633
  return (React.createElement(Scroll$1, null, products === null || products === void 0 ? void 0 : products.map((item) => {
9023
9634
  var _a, _b, _c, _d, _e, _f;
9024
- 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(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%', flexShrink: 0 })) }, props, { onClick: () => handleClick(item) }),
9025
- React.createElement("div", { className: css({
9026
- width: '60px',
9027
- height: '60px',
9028
- marginRight: '8px',
9029
- borderRadius: '3px',
9030
- overflow: 'hidden',
9031
- flexShrink: 0,
9032
- backgroundColor: '#f2f2f2'
9033
- }) },
9635
+ 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(Object.assign({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
9636
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9034
9637
  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 })),
9035
9638
  React.createElement("div", { className: css({
9036
9639
  color: '#000',
@@ -9040,24 +9643,20 @@ const MultiCommodityDiro$1 = (_a) => {
9040
9643
  width: '100%',
9041
9644
  overflow: 'hidden'
9042
9645
  }) },
9043
- React.createElement("div", { className: styles$2['two-line-ellipsis'] }, (_d = item === null || item === void 0 ? void 0 : item.title) !== null && _d !== void 0 ? _d : 'Product Name'),
9044
- React.createElement("div", { className: css({
9045
- background: 'rgba(0,0,0,1)',
9046
- fontSize: '10px',
9047
- padding: '2px 7px',
9048
- textAlign: 'center',
9049
- textOverflow: 'ellipsis',
9050
- overflow: 'hidden',
9051
- borderRadius: '25px',
9052
- width: 'fit-content',
9053
- maxWidth: '100%',
9054
- color: '#fff',
9055
- whiteSpace: 'nowrap'
9056
- }) }, (_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'))));
9646
+ 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'),
9647
+ React.createElement("div", { className: 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'))));
9057
9648
  })));
9058
9649
  };
9059
9650
  var MultiCommodityDiroComponent = memo(MultiCommodityDiro$1);
9060
9651
 
9652
+ /*
9653
+ * @Author: binruan@chatlabs.com
9654
+ * @Date: 2023-07-28 18:29:57
9655
+ * @LastEditors: binruan@chatlabs.com
9656
+ * @LastEditTime: 2024-03-29 16:27:22
9657
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiro\material.tsx
9658
+ *
9659
+ */
9061
9660
  const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
9062
9661
  displayName: '推荐多商品-白底圆角按钮',
9063
9662
  icon: '',
@@ -9065,15 +9664,39 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
9065
9664
  type: 'MultiCommodityDiro',
9066
9665
  related: {
9067
9666
  interactionRender: interactionRender$2,
9068
- bindableProps: []
9667
+ bindableProps: [],
9668
+ settingRender
9069
9669
  },
9070
9670
  defaulSetting: {
9071
- props: {},
9671
+ props: {
9672
+ ctaTempStyles: {
9673
+ img: {
9674
+ borderRadius: 3,
9675
+ width: 60,
9676
+ height: 60,
9677
+ marginRight: 8
9678
+ },
9679
+ title: {
9680
+ fontSize: 12,
9681
+ color: '#000',
9682
+ textAlign: 'left'
9683
+ },
9684
+ ctaTitle: {
9685
+ fontSize: 10,
9686
+ color: '#fff',
9687
+ textAlign: 'center',
9688
+ width: 80,
9689
+ height: 20,
9690
+ backgroundColor: 'rgba(0,0,0,1)'
9691
+ }
9692
+ }
9693
+ },
9072
9694
  style: {
9073
- padding: '7px',
9074
- display: 'flex',
9075
- background: '#fff',
9076
- borderRadius: '3px'
9695
+ padding: 7,
9696
+ width: 236,
9697
+ height: 74,
9698
+ borderRadius: 3,
9699
+ backgroundColor: '#fff'
9077
9700
  }
9078
9701
  },
9079
9702
  w: 100,
@@ -9097,9 +9720,10 @@ var styles$1 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
9097
9720
 
9098
9721
  const MultiCommodity$1 = (_a) => {
9099
9722
  var _b, _c;
9100
- var { content, style, bgImg, recData, onClick, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image"]);
9723
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9101
9724
  const { sxpParameter } = useSxpDataSource();
9102
9725
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9726
+ const { popupAni } = useEditor();
9103
9727
  const [products, setProducts] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
9104
9728
  const handleClick = throttle((item) => {
9105
9729
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -9108,19 +9732,11 @@ const MultiCommodity$1 = (_a) => {
9108
9732
  }, recData, item);
9109
9733
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
9110
9734
  onClick === null || onClick === void 0 ? void 0 : onClick();
9111
- }, 1200);
9735
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9112
9736
  return (React.createElement(Scroll$1, null, products === null || products === void 0 ? void 0 : products.map((item) => {
9113
9737
  var _a, _b, _c, _d, _e, _f;
9114
- return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%', flexShrink: 0 })) }, props, { onClick: () => handleClick(item) }),
9115
- React.createElement("div", { className: css({
9116
- width: '60px',
9117
- height: '60px',
9118
- marginRight: '8px',
9119
- borderRadius: '3px',
9120
- overflow: 'hidden',
9121
- flexShrink: 0,
9122
- backgroundColor: '#f2f2f2'
9123
- }) },
9738
+ return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css(Object.assign({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
9739
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9124
9740
  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 })),
9125
9741
  React.createElement("div", { className: css({
9126
9742
  color: '#fff',
@@ -9130,21 +9746,20 @@ const MultiCommodity$1 = (_a) => {
9130
9746
  width: '100%',
9131
9747
  overflow: 'hidden'
9132
9748
  }) },
9133
- React.createElement("div", { className: styles$1['two-line-ellipsis'] }, (_d = item === null || item === void 0 ? void 0 : item.title) !== null && _d !== void 0 ? _d : 'Product Name'),
9134
- React.createElement("div", { className: css({
9135
- background: 'rgba(0,0,0,.5)',
9136
- fontSize: '10px',
9137
- padding: '2px 7px',
9138
- width: 'auto',
9139
- textAlign: 'center',
9140
- textOverflow: 'ellipsis',
9141
- overflow: 'hidden',
9142
- whiteSpace: 'nowrap'
9143
- }) }, (_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'))));
9749
+ 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'),
9750
+ React.createElement("div", { className: 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'))));
9144
9751
  })));
9145
9752
  };
9146
9753
  var MultiCommodityComponent = memo(MultiCommodity$1);
9147
9754
 
9755
+ /*
9756
+ * @Author: binruan@chatlabs.com
9757
+ * @Date: 2023-07-28 18:29:57
9758
+ * @LastEditors: binruan@chatlabs.com
9759
+ * @LastEditTime: 2024-03-29 16:43:35
9760
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodity\material.tsx
9761
+ *
9762
+ */
9148
9763
  const MultiCommodity = createMaterial(MultiCommodityComponent, {
9149
9764
  displayName: '推荐多商品-透明底',
9150
9765
  icon: '',
@@ -9152,15 +9767,39 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
9152
9767
  type: 'MultiCommodity',
9153
9768
  related: {
9154
9769
  interactionRender: interactionRender$1,
9770
+ settingRender,
9155
9771
  bindableProps: []
9156
9772
  },
9157
9773
  defaulSetting: {
9158
- props: {},
9774
+ props: {
9775
+ ctaTempStyles: {
9776
+ img: {
9777
+ borderRadius: 3,
9778
+ width: 60,
9779
+ height: 60,
9780
+ marginRight: 8
9781
+ },
9782
+ title: {
9783
+ fontSize: 12,
9784
+ color: '#fff',
9785
+ textAlign: 'left'
9786
+ },
9787
+ ctaTitle: {
9788
+ fontSize: 10,
9789
+ color: '#fff',
9790
+ textAlign: 'center',
9791
+ width: 130,
9792
+ height: 20,
9793
+ backgroundColor: 'rgba(0,0,0,.5)'
9794
+ }
9795
+ }
9796
+ },
9159
9797
  style: {
9160
- padding: '7px',
9161
- display: 'flex',
9162
- background: 'rgba(0,0,0,.3)',
9163
- borderRadius: '3px'
9798
+ padding: 7,
9799
+ width: 236,
9800
+ height: 74,
9801
+ borderRadius: 3,
9802
+ backgroundColor: 'rgba(0,0,0,.3)'
9164
9803
  }
9165
9804
  },
9166
9805
  w: 100,
@@ -9184,8 +9823,9 @@ var styles = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
9184
9823
 
9185
9824
  const MultiCommodityDiroNew$1 = (_a) => {
9186
9825
  var _b, _c;
9187
- var { content, style, bgImg, recData, onClick, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image"]);
9826
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9188
9827
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9828
+ const { popupAni } = useEditor();
9189
9829
  const [products, setProducts] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
9190
9830
  const handleClick = throttle((item) => {
9191
9831
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -9194,19 +9834,11 @@ const MultiCommodityDiroNew$1 = (_a) => {
9194
9834
  }, recData, item);
9195
9835
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
9196
9836
  onClick === null || onClick === void 0 ? void 0 : onClick();
9197
- }, 1200);
9837
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9198
9838
  return (React.createElement(Scroll$1, null, products === null || products === void 0 ? void 0 : products.map((item) => {
9199
9839
  var _a, _b, _c, _d, _e, _f;
9200
- 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(Object.assign(Object.assign({}, style), { maxWidth: '260px', width: '100%', flexShrink: 0, padding: '4px', background: 'rgba(255,255,255,0.75)' })) }, props, { onClick: () => handleClick(item) }),
9201
- React.createElement("div", { className: css({
9202
- width: '78px',
9203
- height: '78px',
9204
- marginRight: '16px',
9205
- borderRadius: '8px',
9206
- overflow: 'hidden',
9207
- flexShrink: 0,
9208
- backgroundColor: '#f2f2f2'
9209
- }) },
9840
+ 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(Object.assign({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
9841
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9210
9842
  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 })),
9211
9843
  React.createElement("div", { className: css({
9212
9844
  color: '#fff',
@@ -9217,22 +9849,20 @@ const MultiCommodityDiroNew$1 = (_a) => {
9217
9849
  overflow: 'hidden',
9218
9850
  lineHeight: '20px'
9219
9851
  }) },
9220
- React.createElement("div", { className: styles['tow-line-ellipsis'] }, (_d = item === null || item === void 0 ? void 0 : item.title) !== null && _d !== void 0 ? _d : 'Product Name'),
9221
- React.createElement("div", { className: css({
9222
- fontSize: '13px',
9223
- fontWeight: 'bold',
9224
- textOverflow: 'ellipsis',
9225
- overflow: 'hidden',
9226
- width: 'fit-content',
9227
- maxWidth: '100%',
9228
- whiteSpace: 'nowrap',
9229
- textDecoration: 'underline',
9230
- color: '#000'
9231
- }) }, (_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'))));
9852
+ 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'),
9853
+ React.createElement("div", { className: 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'))));
9232
9854
  })));
9233
9855
  };
9234
9856
  var MultiCommodityDiroNewComponent = memo(MultiCommodityDiroNew$1);
9235
9857
 
9858
+ /*
9859
+ * @Author: binruan@chatlabs.com
9860
+ * @Date: 2023-07-28 18:29:57
9861
+ * @LastEditors: binruan@chatlabs.com
9862
+ * @LastEditTime: 2024-03-29 15:40:54
9863
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\material.tsx
9864
+ *
9865
+ */
9236
9866
  const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
9237
9867
  displayName: '推荐多商品-白底下划线按钮',
9238
9868
  icon: '',
@@ -9240,15 +9870,40 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
9240
9870
  type: 'MultiCommodityDiroNew',
9241
9871
  related: {
9242
9872
  interactionRender,
9243
- bindableProps: []
9873
+ bindableProps: [],
9874
+ settingRender
9244
9875
  },
9245
9876
  defaulSetting: {
9246
- props: {},
9877
+ props: {
9878
+ ctaTempStyles: {
9879
+ img: {
9880
+ borderRadius: 8,
9881
+ width: 78,
9882
+ height: 78,
9883
+ marginRight: 16
9884
+ },
9885
+ title: {
9886
+ fontSize: 12,
9887
+ color: '#000',
9888
+ textAlign: 'left'
9889
+ },
9890
+ ctaTitle: {
9891
+ textDecoration: 'underline',
9892
+ fontSize: 12,
9893
+ fontWeight: 'bold',
9894
+ color: '#000',
9895
+ textAlign: 'left',
9896
+ width: 150,
9897
+ height: 20
9898
+ }
9899
+ }
9900
+ },
9247
9901
  style: {
9248
- padding: '7px',
9249
- display: 'flex',
9250
- background: '#fff',
9251
- borderRadius: '3px'
9902
+ borderRadius: 4,
9903
+ width: 260,
9904
+ height: 86,
9905
+ padding: 4,
9906
+ backgroundColor: 'rgba(255,255,255,0.75)'
9252
9907
  }
9253
9908
  },
9254
9909
  w: 100,
@@ -9271,7 +9926,6 @@ var _materials_ = /*#__PURE__*/Object.freeze({
9271
9926
  AppointForm: AppointForm,
9272
9927
  Commodity: Commodity,
9273
9928
  CommodityDetail: CommodityDetail,
9274
- CommodityDetailDiro: CommodityDetailDiro,
9275
9929
  CommodityDetailDiroNew: CommodityDetailDiroNew,
9276
9930
  CommodityDiro: CommodityDiro,
9277
9931
  CommodityDiroNew: CommodityDiroNew,
@@ -9358,8 +10012,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
9358
10012
  videoRef.current.muted = muted;
9359
10013
  }, [muted]);
9360
10014
  const handleVideoStart = useCallback(() => {
9361
- var _a;
9362
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
10015
+ var _a, _b;
10016
+ if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
10017
+ return;
10018
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
9363
10019
  }, []);
9364
10020
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
9365
10021
  const handlePlaying = useCallback(() => {
@@ -9416,37 +10072,38 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
9416
10072
  });
9417
10073
  }
9418
10074
  setTimeout(() => {
9419
- var _a;
9420
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
10075
+ var _a, _b;
10076
+ if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
10077
+ return;
10078
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
9421
10079
  }, 0);
9422
10080
  }, [index, bffEventReport, data, isLoad]);
9423
10081
  const handleClickVideo = useCallback((type) => () => {
9424
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
10082
+ var _a, _b, _c, _d, _e, _f;
10083
+ if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
10084
+ return;
9425
10085
  if (!isLoad)
9426
10086
  return;
9427
- data[index];
9428
- ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
9429
- ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
9430
- const isPause = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.paused;
10087
+ const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
9431
10088
  switch (type) {
9432
10089
  case 'start':
9433
10090
  if (!isPause)
9434
10091
  return;
9435
- (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
10092
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
9436
10093
  setIsPauseVideo(false);
9437
10094
  break;
9438
10095
  case 'pause':
9439
10096
  if (isPause)
9440
10097
  return;
9441
- (_g = videoRef.current) === null || _g === void 0 ? void 0 : _g.pause();
10098
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.pause();
9442
10099
  setIsPauseVideo(true);
9443
10100
  break;
9444
10101
  default:
9445
10102
  if (isPause) {
9446
- (_h = videoRef.current) === null || _h === void 0 ? void 0 : _h.play();
10103
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
9447
10104
  }
9448
10105
  else {
9449
- (_j = videoRef.current) === null || _j === void 0 ? void 0 : _j.pause();
10106
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
9450
10107
  }
9451
10108
  setIsPauseVideo(!isPause);
9452
10109
  break;
@@ -9477,14 +10134,16 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
9477
10134
  }
9478
10135
  }, [data, index, bffEventReport]);
9479
10136
  useEffect(() => {
9480
- var _a, _b, _c;
10137
+ var _a, _b, _c, _d, _e, _f;
9481
10138
  if (data.length <= 0)
9482
10139
  return;
9483
10140
  if (!videoRef.current)
9484
10141
  return;
10142
+ const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
9485
10143
  setIsPauseVideo(false);
9486
10144
  if (!isActive) {
9487
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
10145
+ if (!isPause && ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.readyState) >= 2)
10146
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
9488
10147
  return;
9489
10148
  }
9490
10149
  if (!videoRef.current.src) {
@@ -9507,10 +10166,12 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
9507
10166
  videoRef.current.setAttribute('webkit-playsinline', 'true');
9508
10167
  }
9509
10168
  else {
10169
+ if (((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.readyState) < 2)
10170
+ return;
9510
10171
  videoRef.current.play();
9511
10172
  }
9512
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
9513
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
10173
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('canplay', handleLoadedMetadata);
10174
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
9514
10175
  return () => {
9515
10176
  var _a, _b;
9516
10177
  (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('canplay', handleLoadedMetadata);
@@ -9521,15 +10182,17 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
9521
10182
  打开/关闭hashtag暂停/播放视频
9522
10183
  */
9523
10184
  useEffect(() => {
9524
- var _a, _b, _c;
9525
- const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
10185
+ var _a, _b, _c, _d;
10186
+ if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
10187
+ return;
10188
+ const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
9526
10189
  if (!isActive)
9527
10190
  return;
9528
10191
  if (!isPause && openHashtag) {
9529
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.pause();
10192
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
9530
10193
  }
9531
10194
  else if (!openHashtag) {
9532
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
10195
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
9533
10196
  }
9534
10197
  }, [openHashtag, isActive]);
9535
10198
  useEffect(() => {
@@ -9642,22 +10305,26 @@ const Picture = (props) => {
9642
10305
  * @Author: lewinlu@chatlabs.com
9643
10306
  * @Date: 2024-01-03 14:39:09
9644
10307
  * @LastEditors: binruan@chatlabs.com
9645
- * @LastEditTime: 2024-03-19 18:42:33
10308
+ * @LastEditTime: 2024-03-25 15:08:11
9646
10309
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
9647
10310
  */
9648
10311
  const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent }) => {
9649
10312
  const { isActive } = useSwiperSlide();
9650
10313
  const { sxpParameter, openHashtag } = useSxpDataSource();
10314
+ const [isLoad, setIsLoad] = useState(false);
9651
10315
  useEffect(() => {
9652
- if (!isActive)
9653
- return;
9654
- if (openHashtag) {
9655
- onReportViewImageEnd(rec);
10316
+ if (isLoad && isActive) {
10317
+ if (openHashtag) {
10318
+ onReportViewImageEnd(rec);
10319
+ }
10320
+ else {
10321
+ onViewImageStartEvent(index);
10322
+ }
9656
10323
  }
9657
10324
  else {
9658
- onViewImageStartEvent(index);
10325
+ setIsLoad(true);
9659
10326
  }
9660
- }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent]);
10327
+ }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent, isLoad]);
9661
10328
  if (!isActive) {
9662
10329
  return React.createElement("img", { src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, style: { width, height, objectFit: 'cover' } });
9663
10330
  }
@@ -9668,75 +10335,17 @@ const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd
9668
10335
  };
9669
10336
  var PictureGroup$1 = memo(PictureGroup);
9670
10337
 
9671
- /*
9672
- * @Author: binruan@chatlabs.com
9673
- * @Date: 2023-11-02 18:34:34
9674
- * @LastEditors: binruan@chatlabs.com
9675
- * @LastEditTime: 2024-03-12 12:08:55
9676
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ProductInfo\index.tsx
9677
- *
9678
- */
9679
- const ProductInfo = ({ data, height, width, viewTime, tipText }) => {
9680
- var _a, _b;
9681
- const product = data === null || data === void 0 ? void 0 : data.product;
9682
- const cta = (_a = data === null || data === void 0 ? void 0 : data.product) === null || _a === void 0 ? void 0 : _a.bindCta;
9683
- const [showModal, setShowModal] = useState(false);
9684
- const { jumpToWeb } = useEventReport();
9685
- const priceText = useMemo(() => {
9686
- var _a, _b, _c, _d, _e;
9687
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
9688
- return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
9689
- minimumFractionDigits: 0
9690
- })) !== null && _e !== void 0 ? _e : ''}`;
9691
- }
9692
- else {
9693
- return '$7,000';
9694
- }
9695
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
9696
- const handleLInk = (link) => {
9697
- if (link) {
9698
- jumpToWeb(data, product, cta);
9699
- window.location.href = window.getJointUtmLink(link);
9700
- }
9701
- };
9702
- return (React.createElement("div", { style: { height, width: '100%' } },
9703
- React.createElement(Swiper, { height: height * 0.5, modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, loop: true, autoplay: {
9704
- delay: 3000
9705
- } }, (_b = product === null || product === void 0 ? void 0 : product.homePage) === null || _b === void 0 ? void 0 : _b.map((src) => {
9706
- return (React.createElement(SwiperSlide, { key: src },
9707
- React.createElement("div", { style: {
9708
- overflow: 'hidden',
9709
- width,
9710
- height: height * 0.5
9711
- } },
9712
- React.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
9713
- })),
9714
- React.createElement("div", { className: 'product-info' },
9715
- React.createElement("div", { className: 'collection' }, product === null || product === void 0 ? void 0 : product.collection),
9716
- React.createElement("div", { className: 'title' }, product === null || product === void 0 ? void 0 : product.title),
9717
- React.createElement("div", { className: 'price' }, priceText),
9718
- React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), className: 'info', text: (product === null || product === void 0 ? void 0 : product.info) || '', maxStr: 79 }),
9719
- React.createElement("a", { target: '_blank', className: 'pb-modal-btn', onClick: () => handleLInk(product === null || product === void 0 ? void 0 : product.link) }, cta === null || cta === void 0 ? void 0 : cta.enTitle)),
9720
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
9721
- React.createElement("div", { className: 'modal-collection' }, product === null || product === void 0 ? void 0 : product.collection),
9722
- React.createElement("div", { className: 'modal-title' }, product === null || product === void 0 ? void 0 : product.title),
9723
- React.createElement("div", { className: 'modal-price' }, priceText),
9724
- React.createElement("div", { className: 'modal-info' }, product === null || product === void 0 ? void 0 : product.info),
9725
- (product === null || product === void 0 ? void 0 : product.link) && (React.createElement("a", { target: '_blank', className: 'pb-modal-btn', onClick: () => handleLInk(product === null || product === void 0 ? void 0 : product.link) }, cta === null || cta === void 0 ? void 0 : cta.enTitle)))));
9726
- };
9727
- var ProductInfo$1 = React.memo(ProductInfo);
9728
-
9729
10338
  /*
9730
10339
  * @Author: binruan@chatlabs.com
9731
10340
  * @Date: 2024-01-15 19:03:09
9732
10341
  * @LastEditors: binruan@chatlabs.com
9733
- * @LastEditTime: 2024-03-04 18:41:38
10342
+ * @LastEditTime: 2024-03-25 10:42:07
9734
10343
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
9735
10344
  *
9736
10345
  */
9737
10346
  const Hashtag = ({ tags, itemId, itemType, index, rec }) => {
9738
10347
  const [isShowMore, setIsShowMore] = useState(false);
9739
- const { setWaterFallData, setOpenHashtag, setCacheRtcList, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
10348
+ const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
9740
10349
  const handleClickTag = (data) => {
9741
10350
  if (!waterFallData) {
9742
10351
  setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(index);
@@ -10197,17 +10806,29 @@ const WaterFall = () => {
10197
10806
  };
10198
10807
  var WaterFall$1 = memo(WaterFall);
10199
10808
 
10809
+ const Nudge = ({ nudge }) => {
10810
+ return (React.createElement("div", { hidden: !(nudge === null || nudge === void 0 ? void 0 : nudge.isOpen), className: 'clc-sxp-bottom-nudge', style: {
10811
+ marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
10812
+ width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
10813
+ height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
10814
+ backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
10815
+ borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
10816
+ } },
10817
+ (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
10818
+ React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)));
10819
+ };
10820
+
10200
10821
  /*
10201
10822
  * @Author: binruan@chatlabs.com
10202
10823
  * @Date: 2024-01-15 19:03:09
10203
10824
  * @LastEditors: binruan@chatlabs.com
10204
- * @LastEditTime: 2024-03-18 18:48:44
10825
+ * @LastEditTime: 2024-04-02 10:42:58
10205
10826
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
10206
10827
  *
10207
10828
  */
10208
- const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, _schema }) => {
10829
+ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema }) => {
10209
10830
  var _a, _b, _c, _d;
10210
- useEditor();
10831
+ const { schema } = useEditor();
10211
10832
  const [activeIndex, setActiveIndex] = useState(0);
10212
10833
  const viewImageStartTime = useRef(0);
10213
10834
  const [isInit, setIsInit] = useState(false);
@@ -10359,49 +10980,37 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
10359
10980
  return null;
10360
10981
  }, [globalConfig]);
10361
10982
  const renderContent = useCallback((rec, index) => {
10362
- var _a, _b;
10983
+ var _a, _b, _c, _d;
10363
10984
  if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
10364
10985
  return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex }));
10365
10986
  }
10366
10987
  if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
10367
10988
  return (React.createElement(PictureGroup$1, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent }));
10368
10989
  }
10369
- if (rec.product) {
10370
- switch (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) {
10371
- case 'CommodityDetailDiroNew':
10372
- return (React.createElement(CommodityDetailDiroNew$2, { key: rec.product.itemId, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' } }));
10373
- // case 'CommodityDetailDiro':
10374
- // return (
10375
- // <CommodityDetailDiro
10376
- // key={rec.product.itemId}
10377
- // viewTime={viewTime.current}
10378
- // rec={rec}
10379
- // isPost={true}
10380
- // style={{ height: '100%', overflow: 'auto' }}
10381
- // />
10382
- // );
10383
- case 'CommodityDetail':
10384
- return (React.createElement(ProductInfo$1, { key: rec.product.itemId, viewTime: viewTime.current, data: rec, height: height, tipText: tipText, width: containerWidth }));
10385
- default:
10386
- return (React.createElement(ProductInfo$1, { key: rec.product.itemId, viewTime: viewTime.current, data: rec, height: height, tipText: tipText, width: containerWidth }));
10387
- }
10990
+ if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
10991
+ return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, index) => {
10992
+ var _a, _b, _c, _d, _e, _f;
10993
+ const Component = withBindDataSource(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
10994
+ return (React.createElement(Component, Object.assign({ key: index, textStyle: (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.textStyle, bindDatas: (_d = (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.bindDatas) !== null && _d !== void 0 ? _d : [] }, (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.props, { event: ((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' } })));
10995
+ });
10388
10996
  }
10389
10997
  return null;
10390
- }, [containerWidth, data, height, isMuted, activeIndex, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost, viewTime, tipText]);
10998
+ }, [containerWidth, data, height, isMuted, activeIndex, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost, viewTime, tipText, resolver, schema]);
10391
10999
  const renderBottom = useCallback((rec, index) => {
10392
11000
  var _a, _b, _c, _d, _e, _f, _g;
10393
11001
  if (rec.video) {
10394
11002
  return (React.createElement(React.Fragment, null,
10395
11003
  ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
10396
11004
  React.createElement("div", { className: 'clc-sxp-bottom' },
11005
+ React.createElement(Nudge, { nudge: nudge }),
10397
11006
  React.createElement("div", { className: 'clc-sxp-bottom-card' },
10398
11007
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
10399
11008
  React.createElement("div", { className: 'clc-sxp-bottom-text' },
10400
- React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle })),
11009
+ React.createElement(ExpandableText$1, { isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle })),
10401
11010
  React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.url) ? 'VIDEO' : null, rec: rec }))));
10402
11011
  }
10403
11012
  return null;
10404
- }, [descStyle, activeIndex, tempMap, resolver, tipText]);
11013
+ }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge]);
10405
11014
  const renderLikeButton = useCallback((rec) => {
10406
11015
  var _a, _b;
10407
11016
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
@@ -10480,6 +11089,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
10480
11089
  productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current);
10481
11090
  }
10482
11091
  };
11092
+ useEffect(() => {
11093
+ const item = data[activeIndex];
11094
+ if (openHashtag)
11095
+ handleReportProductView(item);
11096
+ }, [openHashtag, data, activeIndex]);
10483
11097
  const handleViewImageStartEvent = (activeIndex) => {
10484
11098
  var _a, _b, _c, _d, _e, _f;
10485
11099
  const item = data[activeIndex];
@@ -10586,12 +11200,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
10586
11200
  * @Author: binruan@chatlabs.com
10587
11201
  * @Date: 2023-10-31 10:56:01
10588
11202
  * @LastEditors: binruan@chatlabs.com
10589
- * @LastEditTime: 2024-03-13 02:19:26
11203
+ * @LastEditTime: 2024-04-02 10:31:51
10590
11204
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
10591
11205
  *
10592
11206
  */
10593
11207
  const Popup = () => {
10594
- const { schema, resolver, popup } = useEditor();
11208
+ const { schema, resolver, popup, popupAni } = useEditor();
10595
11209
  const { setPopupDetailData, popupDetailData, bffEventReport } = useSxpDataSource();
10596
11210
  const { productView } = useEventReport();
10597
11211
  const [visible, setVisible] = useState(false);
@@ -10614,7 +11228,7 @@ const Popup = () => {
10614
11228
  }, [popup]);
10615
11229
  const handleClose = () => {
10616
11230
  var _a, _b, _c;
10617
- if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < 1200) {
11231
+ if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
10618
11232
  return;
10619
11233
  }
10620
11234
  setVisible(false);
@@ -10627,7 +11241,7 @@ const Popup = () => {
10627
11241
  setTimeout(() => {
10628
11242
  window === null || window === void 0 ? void 0 : window.sxpPopup('');
10629
11243
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(null);
10630
- }, 1200);
11244
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
10631
11245
  };
10632
11246
  const renderPopupDetail = useMemo(() => {
10633
11247
  var _a, _b, _c;
@@ -10649,7 +11263,7 @@ const Popup = () => {
10649
11263
  * @Author: binruan@chatlabs.com
10650
11264
  * @Date: 2024-01-15 19:03:09
10651
11265
  * @LastEditors: binruan@chatlabs.com
10652
- * @LastEditTime: 2024-03-14 17:23:54
11266
+ * @LastEditTime: 2024-03-25 17:24:59
10653
11267
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
10654
11268
  *
10655
11269
  */
@@ -10665,7 +11279,7 @@ const RESOLVER = {};
10665
11279
  Object.values(_materials_).forEach((v) => {
10666
11280
  RESOLVER[v.extend.type] = v;
10667
11281
  });
10668
- const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage }) => {
11282
+ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain }) => {
10669
11283
  var _a, _b, _c, _d, _e, _f;
10670
11284
  const utmVal = useMemo(() => {
10671
11285
  var _a;
@@ -10673,7 +11287,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
10673
11287
  return searchParams;
10674
11288
  }, []);
10675
11289
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
10676
- 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, render: ({ rtcList }) => {
11290
+ 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, render: ({ rtcList }) => {
10677
11291
  var _a;
10678
11292
  return (React.createElement(React.Fragment, null,
10679
11293
  React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { data: rtcList, resolver: RESOLVER })),