pb-sxp-ui 1.0.1 → 1.0.2-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 (128) hide show
  1. package/dist/index.cjs +938 -389
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +24 -18
  4. package/dist/index.js +938 -389
  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 +938 -389
  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 +16 -9
  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/CommodityDetailDiroNew/index.d.ts +13 -1
  37. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  38. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +35 -1
  39. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  40. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +175 -0
  41. package/es/materials/sxp/template/Appoint/index.d.ts +2 -0
  42. package/es/materials/sxp/template/Appoint/index.js +4 -18
  43. package/es/materials/sxp/template/Appoint/material.js +22 -6
  44. package/es/materials/sxp/template/Commodity/index.d.ts +2 -0
  45. package/es/materials/sxp/template/Commodity/index.js +5 -22
  46. package/es/materials/sxp/template/Commodity/material.js +31 -6
  47. package/es/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  48. package/es/materials/sxp/template/CommodityDiro/index.js +5 -24
  49. package/es/materials/sxp/template/CommodityDiro/material.js +30 -5
  50. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  51. package/es/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  52. package/es/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  53. package/es/materials/sxp/template/Link/index.d.ts +2 -0
  54. package/es/materials/sxp/template/Link/index.js +4 -13
  55. package/es/materials/sxp/template/Link/material.js +22 -5
  56. package/es/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  57. package/es/materials/sxp/template/MultiCommodity/index.js +8 -24
  58. package/es/materials/sxp/template/MultiCommodity/material.js +30 -5
  59. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  60. package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -27
  61. package/es/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  62. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  63. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +8 -25
  64. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  65. package/es/materials/sxp/template/components/EventProvider.d.ts +2 -1
  66. package/es/materials/sxp/template/components/EventProvider.js +5 -4
  67. package/es/materials/sxp/template/components/settingRender.d.ts +108 -0
  68. package/es/materials/sxp/template/components/settingRender.js +198 -0
  69. package/es/materials/sxp/template/components/typing.d.ts +6 -0
  70. package/es/materials/sxp/template/components/typing.js +1 -0
  71. package/lib/core/components/SxpPageCore/index.d.ts +1 -0
  72. package/lib/core/components/SxpPageCore/index.js +2 -2
  73. package/lib/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
  74. package/lib/core/components/SxpPageRender/ExpandableText.js +16 -9
  75. package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -1
  76. package/lib/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  77. package/lib/core/components/SxpPageRender/Modal/index.js +7 -4
  78. package/lib/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  79. package/lib/core/components/SxpPageRender/Nudge/index.js +16 -0
  80. package/lib/core/components/SxpPageRender/PictureGroup/index.js +10 -6
  81. package/lib/core/components/SxpPageRender/Popup/index.js +3 -3
  82. package/lib/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  83. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +3 -2
  84. package/lib/core/components/SxpPageRender/index.d.ts +20 -1
  85. package/lib/core/components/SxpPageRender/index.js +19 -16
  86. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  87. package/lib/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  88. package/lib/core/components/SxpPageRender/useIconLink.js +8 -3
  89. package/lib/core/context/EditorContext.d.ts +5 -0
  90. package/lib/core/context/EditorContext.js +21 -3
  91. package/lib/core/context/SxpDataSourceProvider.js +1 -1
  92. package/lib/core/create.d.ts +1 -1
  93. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  94. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  95. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +35 -1
  96. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  97. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +177 -0
  98. package/lib/materials/sxp/template/Appoint/index.d.ts +2 -0
  99. package/lib/materials/sxp/template/Appoint/index.js +4 -18
  100. package/lib/materials/sxp/template/Appoint/material.js +22 -6
  101. package/lib/materials/sxp/template/Commodity/index.d.ts +2 -0
  102. package/lib/materials/sxp/template/Commodity/index.js +5 -22
  103. package/lib/materials/sxp/template/Commodity/material.js +31 -6
  104. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  105. package/lib/materials/sxp/template/CommodityDiro/index.js +5 -24
  106. package/lib/materials/sxp/template/CommodityDiro/material.js +30 -5
  107. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  108. package/lib/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  109. package/lib/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  110. package/lib/materials/sxp/template/Link/index.d.ts +2 -0
  111. package/lib/materials/sxp/template/Link/index.js +4 -13
  112. package/lib/materials/sxp/template/Link/material.js +22 -5
  113. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  114. package/lib/materials/sxp/template/MultiCommodity/index.js +7 -23
  115. package/lib/materials/sxp/template/MultiCommodity/material.js +30 -5
  116. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  117. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -26
  118. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  119. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  120. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -24
  121. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  122. package/lib/materials/sxp/template/components/EventProvider.d.ts +2 -1
  123. package/lib/materials/sxp/template/components/EventProvider.js +4 -3
  124. package/lib/materials/sxp/template/components/settingRender.d.ts +108 -0
  125. package/lib/materials/sxp/template/components/settingRender.js +200 -0
  126. package/lib/materials/sxp/template/components/typing.d.ts +6 -0
  127. package/lib/materials/sxp/template/components/typing.js +2 -0
  128. package/package.json +2 -2
package/dist/index.cjs CHANGED
@@ -401,11 +401,24 @@ const storeAndLoadFeUserId = () => {
401
401
  return fakeUserId;
402
402
  };
403
403
 
404
- function useIconLink(path) {
404
+ /*
405
+ * @Author: binruan@chatlabs.com
406
+ * @Date: 2024-03-20 10:27:31
407
+ * @LastEditors: binruan@chatlabs.com
408
+ * @LastEditTime: 2024-03-25 18:23:54
409
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\useIconLink.ts
410
+ *
411
+ */
412
+ function useIconLink(path, domain) {
405
413
  const { appDomain } = useSxpDataSource();
406
414
  return React.useMemo(() => {
407
- return appDomain ? `https://${appDomain}${path}` : `${window.location.origin}${path}`;
408
- }, [appDomain, path]);
415
+ if (domain) {
416
+ return `https://${domain}${path}`;
417
+ }
418
+ else {
419
+ return appDomain ? `https://${appDomain}${path}` : `${window.location.origin}${path}`;
420
+ }
421
+ }, [appDomain, path, domain]);
409
422
  }
410
423
 
411
424
  const SxpDataSourceContext = React.createContext({
@@ -583,7 +596,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
583
596
  setLoading(false);
584
597
  });
585
598
  }, [getRecommendVideos]);
586
- const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif');
599
+ const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
587
600
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
588
601
  rtcList,
589
602
  setRtcList,
@@ -727,7 +740,11 @@ const EditorContext = React.createContext({
727
740
  undoStack: [item],
728
741
  redoStack: [],
729
742
  popup: '',
730
- setPopup: () => { }
743
+ setPopup: () => { },
744
+ popupAni: {
745
+ name: 'none',
746
+ duration: 0
747
+ }
731
748
  });
732
749
  const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enableDataSource = true, utmVal }, ref) => {
733
750
  const [currentNode, setCurrentNode] = React.useState(null);
@@ -751,9 +768,22 @@ const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enable
751
768
  const [undoStack, setUndoStack] = React.useState([[item]]);
752
769
  const [redoStack, setRedoStack] = React.useState([]);
753
770
  const [popup, setPopup] = React.useState('');
771
+ const [popupAni, setPopupAni] = React.useState({
772
+ name: 'none',
773
+ duration: 0
774
+ });
754
775
  typeof window !== 'undefined' &&
755
- (window.sxpPopup = (type) => {
776
+ (window.sxpPopup = (type, aniType) => {
756
777
  setPopup(type);
778
+ if (aniType && (aniType === null || aniType === void 0 ? void 0 : aniType.name) !== 'none') {
779
+ setPopupAni(Object.assign(Object.assign({}, popupAni), aniType));
780
+ }
781
+ else {
782
+ setPopupAni({
783
+ name: 'none',
784
+ duration: 0
785
+ });
786
+ }
757
787
  });
758
788
  typeof window !== 'undefined' &&
759
789
  (window.getJointUtmLink = (url) => {
@@ -829,7 +859,8 @@ const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enable
829
859
  setUndoStack,
830
860
  getCurPageConf,
831
861
  popup,
832
- setPopup
862
+ setPopup,
863
+ popupAni
833
864
  } },
834
865
  React.createElement(DataSourceProvider$1, { isSsr: isSsr, enable: enableDataSource }, children)));
835
866
  });
@@ -859,7 +890,7 @@ var interactionRender$8 = [
859
890
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
860
891
  *
861
892
  */
862
- var settingRender$1 = [
893
+ var settingRender$3 = [
863
894
  {
864
895
  type: 'Text',
865
896
  label: '组件名称',
@@ -1048,7 +1079,7 @@ const AppointForm = createMaterial(AppointFormComponent, {
1048
1079
  category: 'popup',
1049
1080
  type: 'AppointForm',
1050
1081
  related: {
1051
- settingRender: settingRender$1,
1082
+ settingRender: settingRender$3,
1052
1083
  bindableProps: [],
1053
1084
  interactionRender: interactionRender$8
1054
1085
  },
@@ -8077,7 +8108,7 @@ var interactionRender$7 = [
8077
8108
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
8078
8109
  *
8079
8110
  */
8080
- var settingRender = [
8111
+ var settingRender$2 = [
8081
8112
  {
8082
8113
  type: 'Media',
8083
8114
  label: '图标',
@@ -8152,7 +8183,7 @@ const Prompt = createMaterial(PromptComponent, {
8152
8183
  category: 'popup',
8153
8184
  type: 'Prompt',
8154
8185
  related: {
8155
- settingRender,
8186
+ settingRender: settingRender$2,
8156
8187
  bindableProps: [],
8157
8188
  interactionRender: interactionRender$7
8158
8189
  },
@@ -8347,16 +8378,202 @@ const CommodityDetailDiro = createMaterial(CommodityDetailDiroComponent, {
8347
8378
  sort: 1
8348
8379
  });
8349
8380
 
8381
+ /*
8382
+ * @Author: binruan@chatlabs.com
8383
+ * @Date: 2024-03-26 16:50:25
8384
+ * @LastEditors: binruan@chatlabs.com
8385
+ * @LastEditTime: 2024-03-28 18:42:26
8386
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
8387
+ *
8388
+ */
8389
+ var settingRender$1 = [
8390
+ {
8391
+ title: '商品图片',
8392
+ child: [
8393
+ {
8394
+ type: 'Radius',
8395
+ label: '轮播指示器',
8396
+ options: [
8397
+ {
8398
+ label: '居左',
8399
+ value: 'left'
8400
+ },
8401
+ {
8402
+ label: '居中',
8403
+ value: 'center'
8404
+ }
8405
+ ],
8406
+ name: ['props', 'swiper', 'dotsAlign']
8407
+ },
8408
+ {
8409
+ type: 'Number',
8410
+ name: ['props', 'swiper', 'delay'],
8411
+ addonAfter: 's'
8412
+ }
8413
+ ]
8414
+ },
8415
+ {
8416
+ title: '商品文本',
8417
+ child: [
8418
+ {
8419
+ name: ['props', 'commodityStyles'],
8420
+ type: 'SelectLinkage',
8421
+ child: [
8422
+ {
8423
+ label: '字段',
8424
+ type: 'Select',
8425
+ options: [
8426
+ {
8427
+ label: '商品名称',
8428
+ value: 'title'
8429
+ },
8430
+ {
8431
+ label: '系列名称',
8432
+ value: 'collection'
8433
+ },
8434
+ {
8435
+ label: '价格',
8436
+ value: 'price'
8437
+ },
8438
+ {
8439
+ label: '税费说明',
8440
+ value: 'taxInfo'
8441
+ },
8442
+ {
8443
+ label: '商品描述',
8444
+ value: 'info'
8445
+ }
8446
+ ],
8447
+ name: ['props', 'commodityStyles', 'field'],
8448
+ initialValue: 'title'
8449
+ },
8450
+ {
8451
+ type: 'Group',
8452
+ label: '标题字体',
8453
+ child: [
8454
+ {
8455
+ type: 'Color',
8456
+ name: ['color']
8457
+ },
8458
+ {
8459
+ type: 'Select',
8460
+ options: [{ label: '黑体', value: '黑体' }],
8461
+ name: ['fontFamily']
8462
+ },
8463
+ {
8464
+ type: 'Number',
8465
+ addonAfter: 'px',
8466
+ name: ['fontSize']
8467
+ }
8468
+ ]
8469
+ },
8470
+ {
8471
+ label: '标题样式',
8472
+ type: 'TextStyle'
8473
+ },
8474
+ {
8475
+ label: '标题对齐',
8476
+ type: 'TextAlign'
8477
+ },
8478
+ {
8479
+ label: '默认行数',
8480
+ type: 'Number',
8481
+ name: ['lineClamp']
8482
+ }
8483
+ ]
8484
+ }
8485
+ ]
8486
+ },
8487
+ {
8488
+ title: '购买按钮样式',
8489
+ child: [
8490
+ {
8491
+ type: 'Color',
8492
+ label: '背景色',
8493
+ name: ['props', 'buttonStyle', 'backgroundColor'],
8494
+ initialValue: '#000'
8495
+ },
8496
+ {
8497
+ type: 'Group',
8498
+ label: '尺寸',
8499
+ child: [
8500
+ {
8501
+ type: 'Number',
8502
+ name: ['props', 'buttonStyle', 'height'],
8503
+ addonAfter: 'H'
8504
+ }
8505
+ ]
8506
+ },
8507
+ {
8508
+ type: 'Group',
8509
+ label: '圆角',
8510
+ child: [
8511
+ {
8512
+ type: 'Slider',
8513
+ name: ['props', 'buttonStyle', 'borderRadius'],
8514
+ max: 100
8515
+ },
8516
+ {
8517
+ type: 'Number',
8518
+ name: ['props', 'buttonStyle', 'borderRadius'],
8519
+ addonAfter: 'px',
8520
+ max: 100
8521
+ }
8522
+ ]
8523
+ },
8524
+ {
8525
+ type: 'Group',
8526
+ label: '字体',
8527
+ child: [
8528
+ {
8529
+ type: 'Color',
8530
+ name: ['props', 'buttonStyle', 'color'],
8531
+ initialValue: '#fff'
8532
+ },
8533
+ {
8534
+ type: 'Select',
8535
+ name: ['props', 'buttonStyle', 'fontFamily'],
8536
+ options: [{ label: '黑体', value: '黑体' }]
8537
+ },
8538
+ {
8539
+ type: 'Number',
8540
+ name: ['props', 'buttonStyle', 'fontSize'],
8541
+ addonAfter: 'px'
8542
+ }
8543
+ ]
8544
+ },
8545
+ {
8546
+ type: 'TextStyle',
8547
+ name: ['props', 'buttonStyle']
8548
+ },
8549
+ {
8550
+ type: 'TextAlign',
8551
+ name: ['props', 'buttonStyle']
8552
+ },
8553
+ {
8554
+ type: 'TextSpace',
8555
+ name: ['props', 'buttonStyle']
8556
+ },
8557
+ {
8558
+ type: 'TextMargin',
8559
+ name: ['props', 'buttonStyle']
8560
+ }
8561
+ ]
8562
+ }
8563
+ ];
8564
+
8350
8565
  /*
8351
8566
  * @Author: binruan@chatlabs.com
8352
8567
  * @Date: 2023-11-02 18:34:34
8353
8568
  * @LastEditors: binruan@chatlabs.com
8354
- * @LastEditTime: 2024-03-14 17:03:04
8569
+ * @LastEditTime: 2024-04-02 10:33:15
8355
8570
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8356
8571
  *
8357
8572
  */
8358
8573
  const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8359
- const Modal = ({ visible, onClose, children, modalStyle, padding }) => {
8574
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
8575
+ const { popupAni } = useEditor();
8576
+ const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
8360
8577
  const [isShow, setIsShow] = React.useState(false);
8361
8578
  const modalEleRef = React.useRef(null);
8362
8579
  React.useEffect(() => {
@@ -8378,16 +8595,16 @@ const Modal = ({ visible, onClose, children, modalStyle, padding }) => {
8378
8595
  else {
8379
8596
  setTimeout(() => {
8380
8597
  setIsShow(false);
8381
- }, 1200);
8598
+ }, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
8382
8599
  }
8383
- }, [visible]);
8600
+ }, [visible, cssAni]);
8384
8601
  if (!modalEleRef.current)
8385
8602
  return null;
8386
8603
  const handleClose = lodash.debounce(() => {
8387
8604
  onClose === null || onClose === void 0 ? void 0 : onClose();
8388
8605
  }, 300);
8389
8606
  return ReactDOM__namespace.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 },
8390
- React.createElement("div", { className: `modal-container ${visible ? 'modal-popIn' : 'modal-popOut'}`, style: { padding }, onClick: (e) => {
8607
+ 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) => {
8391
8608
  e.stopPropagation();
8392
8609
  e.preventDefault();
8393
8610
  } },
@@ -8401,7 +8618,7 @@ var Modal$1 = React.memo(Modal);
8401
8618
  * @Author: binruan@chatlabs.com
8402
8619
  * @Date: 2023-12-26 16:11:34
8403
8620
  * @LastEditors: binruan@chatlabs.com
8404
- * @LastEditTime: 2024-03-14 11:19:03
8621
+ * @LastEditTime: 2024-04-02 10:57:30
8405
8622
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
8406
8623
  *
8407
8624
  */
@@ -8423,7 +8640,7 @@ const limitTextLastWholeWord = (originalText = '', limit) => {
8423
8640
  const _words = newWords.length > 1 && newWords.length < words.length ? newWords.slice(0, newWords.length - 1) : newWords;
8424
8641
  return _words.join(' ') + ' ';
8425
8642
  };
8426
- const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText }) => {
8643
+ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText, isPost }) => {
8427
8644
  const [isShowMore, setIsShowMore] = React.useState(true);
8428
8645
  const [isShow, setIsShow] = React.useState(false);
8429
8646
  const lineClamp = Number((style === null || style === void 0 ? void 0 : style.lineClamp) || 2);
@@ -8435,19 +8652,26 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
8435
8652
  return !isShowMore && text.length > maxStr ? limitTextLastWholeWord(text, maxStr) + '...' : text;
8436
8653
  }, [text, maxStr, isShowMore]);
8437
8654
  React.useEffect(() => {
8438
- if (multiRow.current) {
8655
+ if (multiRow.current && isPost) {
8439
8656
  setIsShowMore(true);
8440
8657
  setTimeout(() => {
8658
+ var _a;
8441
8659
  setIsShow(false);
8442
- const height = parseInt(getComputedStyle(multiRow.current).height);
8443
- const lineHeight = parseInt(getComputedStyle(multiRow === null || multiRow === void 0 ? void 0 : multiRow.current).lineHeight);
8444
- if (text && height > lineHeight * lineClamp) {
8445
- setIsShowMore(false);
8446
- setIsShow(true);
8660
+ try {
8661
+ const cs = (_a = window === null || window === void 0 ? void 0 : window.getComputedStyle) === null || _a === void 0 ? void 0 : _a.call(window, multiRow.current);
8662
+ const height = parseFloat(cs === null || cs === void 0 ? void 0 : cs.height);
8663
+ const lh = parseFloat(cs === null || cs === void 0 ? void 0 : cs.lineHeight);
8664
+ const fs = parseFloat(cs === null || cs === void 0 ? void 0 : cs.fontSize) + 4;
8665
+ const lineHeight = isNaN(lh) ? fs : lh;
8666
+ if (text && height > lineHeight * lineClamp) {
8667
+ setIsShowMore(false);
8668
+ setIsShow(true);
8669
+ }
8447
8670
  }
8671
+ catch (_b) { }
8448
8672
  }, 100);
8449
8673
  }
8450
- }, [multiRow, text, lineClamp, style]);
8674
+ }, [multiRow, text, lineClamp, style, isPost]);
8451
8675
  return (React.createElement("div", { className: className, style: Object.assign({}, style) },
8452
8676
  React.createElement("div", { ref: multiRow, style: {
8453
8677
  overflow: 'hidden',
@@ -8456,14 +8680,14 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
8456
8680
  display: '-webkit-box',
8457
8681
  WebkitBoxOrient: 'vertical',
8458
8682
  wordBreak: 'break-word'
8459
- } }, text),
8683
+ }, dangerouslySetInnerHTML: { __html: text ? text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>') : React.createElement(React.Fragment, null) } }),
8460
8684
  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'))));
8461
8685
  };
8462
8686
  var ExpandableText$1 = React.memo(ExpandableText);
8463
8687
 
8464
8688
  const CommodityDetailDiroNew$1 = (_a) => {
8465
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
8466
- var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText"]);
8689
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8690
+ 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"]);
8467
8691
  React.useState(true);
8468
8692
  const { sxpParameter } = useSxpDataSource();
8469
8693
  const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = useSxpDataSource();
@@ -8510,14 +8734,22 @@ const CommodityDetailDiroNew$1 = (_a) => {
8510
8734
  }
8511
8735
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8512
8736
  const width = isPreview ? 375 : window.innerWidth;
8737
+ const productInfoText = () => {
8738
+ return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8739
+ 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) ||
8740
+ `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
8741
+ Made in Italy` })));
8742
+ };
8513
8743
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
8514
8744
  React.createElement("div", Object.assign({ ref: scrollRef, className: css.css(Object.assign({}, style)) }, props),
8515
8745
  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: {
8516
8746
  clickable: true,
8517
8747
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
8518
- clickableClass: 'commondityDiroNew-swiper-clickable'
8748
+ clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
8749
+ ? 'commondityDiroNew-swiper-clickable-left'
8750
+ : 'commondityDiroNew-swiper-clickable-center'
8519
8751
  }, loop: true, autoplay: {
8520
- delay: 3000
8752
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8521
8753
  } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8522
8754
  return (React.createElement(SwiperSlide, { key: src },
8523
8755
  React.createElement("div", { style: {
@@ -8543,29 +8775,65 @@ const CommodityDetailDiroNew$1 = (_a) => {
8543
8775
  }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8544
8776
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
8545
8777
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
8546
- 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'),
8547
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText)),
8548
- 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'),
8549
- (!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')),
8550
- 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) ||
8551
- `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
8552
- Made in Italy` })) : (React.createElement("div", { className: 'pb-commondityDiroNew-info' }, (product === null || product === void 0 ? void 0 : product.info) ||
8553
- `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
8554
- Made in Italy`))))),
8555
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
8556
- 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) ||
8557
- `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
8558
- Made in Italy`))));
8778
+ 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'),
8779
+ React.createElement("div", { className: '' },
8780
+ 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),
8781
+ 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 : '税费'))),
8782
+ 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'),
8783
+ (!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')),
8784
+ productInfoText())),
8785
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText())));
8559
8786
  };
8560
- var CommodityDetailDiroNew$2 = React.memo(CommodityDetailDiroNew$1);
8787
+ var CommodityDetailDiroNewComponent = React.memo(CommodityDetailDiroNew$1);
8561
8788
 
8562
- const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNew$2, {
8789
+ /*
8790
+ * @Author: binruan@chatlabs.com
8791
+ * @Date: 2024-03-20 10:27:31
8792
+ * @LastEditors: binruan@chatlabs.com
8793
+ * @LastEditTime: 2024-03-28 16:05:12
8794
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\material.tsx
8795
+ *
8796
+ */
8797
+ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
8563
8798
  displayName: '商品详情',
8564
8799
  icon: '',
8565
8800
  category: 'popup',
8566
8801
  type: 'CommodityDetailDiroNew',
8802
+ related: {
8803
+ settingRender: settingRender$1
8804
+ },
8567
8805
  defaulSetting: {
8568
- props: {},
8806
+ props: {
8807
+ swiper: {
8808
+ dotsAlign: 'left',
8809
+ delay: 3
8810
+ },
8811
+ commodityStyles: {
8812
+ price: {
8813
+ color: '#000',
8814
+ fontWeight: 'bold',
8815
+ fontSize: 18
8816
+ },
8817
+ title: {
8818
+ color: '#000',
8819
+ fontSize: 13
8820
+ },
8821
+ collection: {
8822
+ color: '#757575',
8823
+ fontSize: 13
8824
+ },
8825
+ info: {
8826
+ color: '#757575',
8827
+ fontSize: 13
8828
+ },
8829
+ taxInfo: {
8830
+ color: '#000',
8831
+ fontWeight: 'bold',
8832
+ fontSize: 13,
8833
+ textAlign: 'right'
8834
+ }
8835
+ }
8836
+ },
8569
8837
  style: {}
8570
8838
  },
8571
8839
  w: 100,
@@ -8573,6 +8841,213 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNew$2, {
8573
8841
  sort: 1
8574
8842
  });
8575
8843
 
8844
+ /*
8845
+ * @Author: binruan@chatlabs.com
8846
+ * @Date: 2024-03-26 16:50:25
8847
+ * @LastEditors: binruan@chatlabs.com
8848
+ * @LastEditTime: 2024-03-29 17:03:07
8849
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
8850
+ *
8851
+ */
8852
+ var settingRender = [
8853
+ {
8854
+ title: '主题样式',
8855
+ child: [
8856
+ {
8857
+ type: 'Group',
8858
+ label: '尺寸',
8859
+ child: [
8860
+ {
8861
+ type: 'Number',
8862
+ name: ['style', 'width'],
8863
+ addonAfter: 'W'
8864
+ },
8865
+ {
8866
+ type: 'Number',
8867
+ name: ['style', 'height'],
8868
+ addonAfter: 'H'
8869
+ }
8870
+ ]
8871
+ },
8872
+ {
8873
+ type: 'Group',
8874
+ label: '圆角',
8875
+ child: [
8876
+ {
8877
+ type: 'Slider',
8878
+ name: ['style', 'borderRadius'],
8879
+ max: 100
8880
+ },
8881
+ {
8882
+ type: 'Number',
8883
+ name: ['style', 'borderRadius'],
8884
+ addonAfter: 'px',
8885
+ max: 100
8886
+ }
8887
+ ]
8888
+ },
8889
+ {
8890
+ type: 'Color',
8891
+ label: '背景色',
8892
+ name: ['style', 'backgroundColor']
8893
+ },
8894
+ {
8895
+ label: '内边距',
8896
+ type: 'Number',
8897
+ name: ['style', 'padding'],
8898
+ addonAfter: 'px'
8899
+ },
8900
+ {
8901
+ label: '与Post描述边距',
8902
+ type: 'Number',
8903
+ name: ['style', 'marginBottom'],
8904
+ addonAfter: 'px'
8905
+ }
8906
+ ]
8907
+ },
8908
+ {
8909
+ title: '商品图片',
8910
+ child: [
8911
+ {
8912
+ type: 'Group',
8913
+ label: '尺寸',
8914
+ child: [
8915
+ {
8916
+ type: 'Number',
8917
+ name: ['props', 'ctaTempStyles', 'img', 'width'],
8918
+ addonAfter: 'W'
8919
+ },
8920
+ {
8921
+ type: 'Number',
8922
+ name: ['props', 'ctaTempStyles', 'img', 'height'],
8923
+ addonAfter: 'H'
8924
+ }
8925
+ ]
8926
+ },
8927
+ {
8928
+ type: 'Group',
8929
+ label: '圆角',
8930
+ child: [
8931
+ {
8932
+ type: 'Slider',
8933
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
8934
+ max: 100
8935
+ },
8936
+ {
8937
+ type: 'Number',
8938
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
8939
+ addonAfter: 'px',
8940
+ max: 100
8941
+ }
8942
+ ]
8943
+ },
8944
+ {
8945
+ type: 'Number',
8946
+ label: '与右侧边距',
8947
+ addonAfter: 'px',
8948
+ name: ['props', 'ctaTempStyles', 'img', 'marginRight']
8949
+ }
8950
+ ]
8951
+ },
8952
+ {
8953
+ title: '商品标题文本',
8954
+ type: 'commodityTitle',
8955
+ child: [
8956
+ {
8957
+ type: 'Group',
8958
+ label: '字体',
8959
+ child: [
8960
+ {
8961
+ type: 'Color',
8962
+ name: ['props', 'ctaTempStyles', 'title', 'color']
8963
+ },
8964
+ {
8965
+ type: 'Select',
8966
+ options: [{ label: '黑体', value: '黑体' }],
8967
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily']
8968
+ },
8969
+ {
8970
+ type: 'Number',
8971
+ addonAfter: 'px',
8972
+ name: ['props', 'ctaTempStyles', 'title', 'fontSize']
8973
+ }
8974
+ ]
8975
+ },
8976
+ {
8977
+ label: '样式',
8978
+ type: 'TextStyle',
8979
+ name: ['props', 'ctaTempStyles', 'title']
8980
+ },
8981
+ {
8982
+ label: '对齐',
8983
+ type: 'TextAlign',
8984
+ name: ['props', 'ctaTempStyles', 'title']
8985
+ },
8986
+ {
8987
+ label: '间距',
8988
+ type: 'TextSpace',
8989
+ name: ['props', 'ctaTempStyles', 'title']
8990
+ }
8991
+ ]
8992
+ },
8993
+ {
8994
+ title: 'CTA标题',
8995
+ child: [
8996
+ {
8997
+ type: 'Group',
8998
+ label: '尺寸',
8999
+ child: [
9000
+ {
9001
+ type: 'Number',
9002
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'width'],
9003
+ addonAfter: 'W'
9004
+ },
9005
+ {
9006
+ type: 'Number',
9007
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'height'],
9008
+ addonAfter: 'H'
9009
+ }
9010
+ ]
9011
+ },
9012
+ {
9013
+ type: 'Color',
9014
+ label: '背景色',
9015
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'backgroundColor']
9016
+ },
9017
+ {
9018
+ type: 'Group',
9019
+ label: '字体',
9020
+ child: [
9021
+ {
9022
+ type: 'Color',
9023
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
9024
+ },
9025
+ {
9026
+ type: 'Select',
9027
+ options: [{ label: '黑体', value: '黑体' }],
9028
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily']
9029
+ },
9030
+ {
9031
+ type: 'Number',
9032
+ addonAfter: 'px',
9033
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
9034
+ }
9035
+ ]
9036
+ },
9037
+ {
9038
+ label: '样式',
9039
+ type: 'TextStyle',
9040
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
9041
+ },
9042
+ {
9043
+ label: '对齐',
9044
+ type: 'TextAlign',
9045
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
9046
+ }
9047
+ ]
9048
+ }
9049
+ ];
9050
+
8576
9051
  var interactionRender$6 = [
8577
9052
  {
8578
9053
  title: '点击事件',
@@ -8613,9 +9088,10 @@ function useOnScreen(ref) {
8613
9088
  }
8614
9089
 
8615
9090
  const EventProvider = (_a) => {
8616
- var { rec, children, className, onClick } = _a; __rest(_a, ["rec", "children", "className", "onClick"]);
9091
+ var { rec, children, className, onClick, style } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style"]);
8617
9092
  const ref = React.useRef(null);
8618
9093
  const isOnScreen = useOnScreen(ref);
9094
+ const { popupAni } = useEditor();
8619
9095
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
8620
9096
  React.useEffect(() => {
8621
9097
  var _a, _b;
@@ -8636,8 +9112,8 @@ const EventProvider = (_a) => {
8636
9112
  }, rec, item);
8637
9113
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
8638
9114
  onClick === null || onClick === void 0 ? void 0 : onClick();
8639
- }, 1200);
8640
- return (React.createElement("div", { ref: ref, className: className, onClick: handleClick }, children));
9115
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9116
+ return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
8641
9117
  };
8642
9118
  var EventProvider$1 = React.memo(EventProvider);
8643
9119
 
@@ -8645,20 +9121,12 @@ var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
8645
9121
 
8646
9122
  const Commodity$1 = (_a) => {
8647
9123
  var _b, _c, _d, _e, _f, _g, _h;
8648
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9124
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8649
9125
  const { sxpParameter } = useSxpDataSource();
8650
9126
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8651
9127
  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;
8652
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
8653
- React.createElement("div", { className: css.css({
8654
- width: '60px',
8655
- height: '60px',
8656
- marginRight: '8px',
8657
- borderRadius: '3px',
8658
- overflow: 'hidden',
8659
- flexShrink: 0,
8660
- backgroundColor: '#f2f2f2'
8661
- }) },
9128
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9129
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8662
9130
  React.createElement("img", { className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
8663
9131
  React.createElement("div", { className: css.css({
8664
9132
  color: '#fff',
@@ -8668,20 +9136,19 @@ const Commodity$1 = (_a) => {
8668
9136
  width: '100%',
8669
9137
  overflow: 'hidden'
8670
9138
  }) },
8671
- 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'),
8672
- React.createElement("div", { className: css.css({
8673
- background: 'rgba(0,0,0,.5)',
8674
- fontSize: '10px',
8675
- padding: '2px 7px',
8676
- width: 'auto',
8677
- textAlign: 'center',
8678
- textOverflow: 'ellipsis',
8679
- overflow: 'hidden',
8680
- whiteSpace: 'nowrap'
8681
- }) }, (_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'))));
9139
+ 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'),
9140
+ React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
8682
9141
  };
8683
9142
  var CommodityComponent = React.memo(Commodity$1);
8684
9143
 
9144
+ /*
9145
+ * @Author: binruan@chatlabs.com
9146
+ * @Date: 2023-07-28 18:29:57
9147
+ * @LastEditors: binruan@chatlabs.com
9148
+ * @LastEditTime: 2024-03-29 16:39:54
9149
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Commodity\material.tsx
9150
+ *
9151
+ */
8685
9152
  const Commodity = createMaterial(CommodityComponent, {
8686
9153
  displayName: '推荐单商品-透明底',
8687
9154
  icon: '',
@@ -8689,15 +9156,39 @@ const Commodity = createMaterial(CommodityComponent, {
8689
9156
  type: 'Commodity',
8690
9157
  related: {
8691
9158
  interactionRender: interactionRender$6,
8692
- bindableProps: []
9159
+ bindableProps: [],
9160
+ settingRender
8693
9161
  },
8694
9162
  defaulSetting: {
8695
- props: {},
9163
+ props: {
9164
+ ctaTempStyles: {
9165
+ img: {
9166
+ borderRadius: 3,
9167
+ width: 60,
9168
+ height: 60,
9169
+ marginRight: 8
9170
+ },
9171
+ title: {
9172
+ fontSize: 12,
9173
+ color: '#fff',
9174
+ textAlign: 'left'
9175
+ },
9176
+ ctaTitle: {
9177
+ fontSize: 10,
9178
+ color: '#fff',
9179
+ textAlign: 'center',
9180
+ width: 130,
9181
+ height: 20,
9182
+ backgroundColor: 'rgba(0,0,0,.5)'
9183
+ }
9184
+ }
9185
+ },
8696
9186
  style: {
8697
- padding: '7px',
8698
- display: 'flex',
8699
- background: 'rgba(0,0,0,.3)',
8700
- borderRadius: '3px'
9187
+ padding: 7,
9188
+ width: 236,
9189
+ height: 74,
9190
+ borderRadius: 3,
9191
+ backgroundColor: 'rgba(0,0,0,.3)'
8701
9192
  }
8702
9193
  },
8703
9194
  w: 100,
@@ -8719,30 +9210,24 @@ var interactionRender$5 = [
8719
9210
 
8720
9211
  const Appoint$1 = (_a) => {
8721
9212
  var _b, _c, _d, _e;
8722
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9213
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8723
9214
  const { sxpParameter } = useSxpDataSource();
8724
9215
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
8725
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
8726
- React.createElement("div", { className: css.css({
8727
- width: '30px',
8728
- height: '30px',
8729
- marginRight: '8px',
8730
- borderRadius: '3px',
8731
- overflow: 'hidden',
8732
- flexShrink: 0,
8733
- backgroundColor: '#f2f2f2'
8734
- }) },
9216
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
9217
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8735
9218
  React.createElement("img", { className: css.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: '' })),
8736
- React.createElement("div", { className: css.css({
8737
- color: '#fff',
8738
- width: '100%',
8739
- overflow: 'hidden',
8740
- fontSize: '12px',
8741
- textOverflow: 'ellipsis'
8742
- }) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
9219
+ React.createElement("div", { className: css.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')));
8743
9220
  };
8744
9221
  var AppointComponent = React.memo(Appoint$1);
8745
9222
 
9223
+ /*
9224
+ * @Author: binruan@chatlabs.com
9225
+ * @Date: 2023-07-28 18:29:57
9226
+ * @LastEditors: binruan@chatlabs.com
9227
+ * @LastEditTime: 2024-03-29 17:03:49
9228
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Appoint\material.tsx
9229
+ *
9230
+ */
8746
9231
  const Appoint = createMaterial(AppointComponent, {
8747
9232
  displayName: '预约表单',
8748
9233
  icon: '',
@@ -8750,18 +9235,33 @@ const Appoint = createMaterial(AppointComponent, {
8750
9235
  type: 'Appoint',
8751
9236
  related: {
8752
9237
  interactionRender: interactionRender$5,
9238
+ settingRender: settingRender === null || settingRender === void 0 ? void 0 : settingRender.filter((i) => i.type !== 'commodityTitle'),
8753
9239
  bindableProps: []
8754
9240
  },
8755
9241
  defaulSetting: {
8756
9242
  props: {
8757
- content: '按钮'
9243
+ ctaTempStyles: {
9244
+ img: {
9245
+ borderRadius: 3,
9246
+ width: 30,
9247
+ height: 30,
9248
+ marginRight: 8
9249
+ },
9250
+ ctaTitle: {
9251
+ fontSize: 12,
9252
+ color: '#fff',
9253
+ textAlign: 'left',
9254
+ width: 130,
9255
+ height: 20
9256
+ }
9257
+ }
8758
9258
  },
8759
9259
  style: {
8760
- padding: '7px',
8761
- display: 'flex',
8762
- alignItems: 'center',
8763
- background: 'rgba(0,0,0,.3)',
8764
- borderRadius: '3px'
9260
+ padding: 7,
9261
+ width: 236,
9262
+ height: 44,
9263
+ borderRadius: 3,
9264
+ backgroundColor: 'rgba(0,0,0,.3)'
8765
9265
  }
8766
9266
  },
8767
9267
  w: 100,
@@ -8773,7 +9273,7 @@ var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU"};
8773
9273
 
8774
9274
  const Link$1 = (_a) => {
8775
9275
  var _b, _c, _d, _e, _f;
8776
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9276
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8777
9277
  const { sxpParameter, bffEventReport } = useSxpDataSource();
8778
9278
  const { jumpToWeb } = useEventReport();
8779
9279
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
@@ -8784,45 +9284,60 @@ const Link$1 = (_a) => {
8784
9284
  window.location.href = window.getJointUtmLink(cta.link);
8785
9285
  }
8786
9286
  };
8787
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props, { onClick: handleTo }),
8788
- React.createElement("div", { className: css.css({
8789
- width: '60px',
8790
- height: '60px',
8791
- marginRight: '8px',
8792
- borderRadius: '3px',
8793
- backgroundColor: '#f2f2f2',
8794
- overflow: 'hidden',
8795
- flexShrink: 0
8796
- }) },
9287
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
9288
+ React.createElement("div", { className: css.css(Object.assign({ backgroundColor: '#f2f2f2', overflow: 'hidden', flexShrink: 0 }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8797
9289
  React.createElement("img", { className: css.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: '' })),
8798
9290
  React.createElement("div", { className: css.css({
8799
- color: '#fff',
8800
9291
  display: 'flex',
8801
9292
  alignItems: 'center',
8802
9293
  width: '100%',
8803
9294
  overflow: 'hidden'
8804
9295
  }) },
8805
- 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'))));
9296
+ 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'))));
8806
9297
  };
8807
9298
  var LinkComponent = React.memo(Link$1);
8808
9299
 
9300
+ /*
9301
+ * @Author: binruan@chatlabs.com
9302
+ * @Date: 2023-07-28 18:29:57
9303
+ * @LastEditors: binruan@chatlabs.com
9304
+ * @LastEditTime: 2024-03-29 17:04:57
9305
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\material.tsx
9306
+ *
9307
+ */
8809
9308
  const Link = createMaterial(LinkComponent, {
8810
9309
  displayName: '跳转指引',
8811
9310
  icon: '',
8812
9311
  category: 'template',
8813
9312
  type: 'Link',
8814
9313
  related: {
9314
+ settingRender: settingRender === null || settingRender === void 0 ? void 0 : settingRender.filter((i) => i.type !== 'commodityTitle'),
8815
9315
  bindableProps: []
8816
9316
  },
8817
9317
  defaulSetting: {
8818
9318
  props: {
8819
- content: '按钮'
9319
+ ctaTempStyles: {
9320
+ img: {
9321
+ borderRadius: 3,
9322
+ width: 60,
9323
+ height: 60,
9324
+ marginRight: 8
9325
+ },
9326
+ ctaTitle: {
9327
+ fontSize: 12,
9328
+ color: '#fff',
9329
+ textAlign: 'left',
9330
+ width: 130,
9331
+ height: 20
9332
+ }
9333
+ }
8820
9334
  },
8821
9335
  style: {
8822
- padding: '7px',
8823
- display: 'flex',
8824
- background: 'rgba(0,0,0,.3)',
8825
- borderRadius: '3px'
9336
+ padding: 7,
9337
+ width: 236,
9338
+ height: 74,
9339
+ borderRadius: 3,
9340
+ backgroundColor: 'rgba(0,0,0,.3)'
8826
9341
  }
8827
9342
  },
8828
9343
  w: 100,
@@ -8846,20 +9361,12 @@ var styles$4 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
8846
9361
 
8847
9362
  const CommodityDiro$1 = (_a) => {
8848
9363
  var _b, _c, _d, _e, _f, _g, _h;
8849
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9364
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8850
9365
  const { sxpParameter } = useSxpDataSource();
8851
9366
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8852
9367
  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;
8853
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
8854
- React.createElement("div", { className: css.css({
8855
- width: '60px',
8856
- height: '60px',
8857
- marginRight: '8px',
8858
- borderRadius: '3px',
8859
- overflow: 'hidden',
8860
- flexShrink: 0,
8861
- backgroundColor: '#f2f2f2'
8862
- }) },
9368
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9369
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8863
9370
  React.createElement("img", { className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
8864
9371
  React.createElement("div", { className: css.css({
8865
9372
  color: '#fff',
@@ -8869,22 +9376,19 @@ const CommodityDiro$1 = (_a) => {
8869
9376
  width: '100%',
8870
9377
  overflow: 'hidden'
8871
9378
  }) },
8872
- 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'),
8873
- React.createElement("div", { className: css.css({
8874
- background: 'rgba(0,0,0,1)',
8875
- fontSize: '10px',
8876
- padding: '2px 7px',
8877
- textAlign: 'center',
8878
- textOverflow: 'ellipsis',
8879
- overflow: 'hidden',
8880
- borderRadius: '25px',
8881
- width: 'fit-content',
8882
- maxWidth: '100%',
8883
- whiteSpace: 'nowrap'
8884
- }) }, (_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'))));
9379
+ 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'),
9380
+ React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
8885
9381
  };
8886
9382
  var CommodityDiroComponent = React.memo(CommodityDiro$1);
8887
9383
 
9384
+ /*
9385
+ * @Author: binruan@chatlabs.com
9386
+ * @Date: 2023-07-28 18:29:57
9387
+ * @LastEditors: binruan@chatlabs.com
9388
+ * @LastEditTime: 2024-03-29 16:07:28
9389
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiro\material.tsx
9390
+ *
9391
+ */
8888
9392
  const CommodityDiro = createMaterial(CommodityDiroComponent, {
8889
9393
  displayName: '推荐单商品-白底圆角按钮',
8890
9394
  icon: '',
@@ -8892,15 +9396,39 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
8892
9396
  type: 'CommodityDiro',
8893
9397
  related: {
8894
9398
  interactionRender: interactionRender$4,
9399
+ settingRender,
8895
9400
  bindableProps: []
8896
9401
  },
8897
9402
  defaulSetting: {
8898
- props: {},
9403
+ props: {
9404
+ ctaTempStyles: {
9405
+ img: {
9406
+ borderRadius: 3,
9407
+ width: 60,
9408
+ height: 60,
9409
+ marginRight: 8
9410
+ },
9411
+ title: {
9412
+ fontSize: 12,
9413
+ color: '#000',
9414
+ textAlign: 'left'
9415
+ },
9416
+ ctaTitle: {
9417
+ fontSize: 10,
9418
+ color: '#fff',
9419
+ textAlign: 'center',
9420
+ width: 80,
9421
+ height: 20,
9422
+ backgroundColor: 'rgba(0,0,0,1)'
9423
+ }
9424
+ }
9425
+ },
8899
9426
  style: {
8900
- padding: '7px',
8901
- display: 'flex',
8902
- borderRadius: '3px',
8903
- background: '#fff'
9427
+ padding: 7,
9428
+ width: 236,
9429
+ height: 74,
9430
+ borderRadius: 3,
9431
+ backgroundColor: '#fff'
8904
9432
  }
8905
9433
  },
8906
9434
  w: 100,
@@ -8924,20 +9452,12 @@ var styles$3 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
8924
9452
 
8925
9453
  const CommodityDiroNew$1 = (_a) => {
8926
9454
  var _b, _c, _d, _e, _f, _g, _h;
8927
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9455
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8928
9456
  const { sxpParameter } = useSxpDataSource();
8929
9457
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8930
9458
  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;
8931
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign(Object.assign({}, style), { maxWidth: '260px', width: '100%', padding: '4px', background: 'rgba(255,255,255,0.75)' })) }, props),
8932
- React.createElement("div", { className: css.css({
8933
- width: '78px',
8934
- height: '78px',
8935
- marginRight: '16px',
8936
- borderRadius: '8px',
8937
- overflow: 'hidden',
8938
- flexShrink: 0,
8939
- backgroundColor: '#f2f2f2'
8940
- }) },
9459
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9460
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8941
9461
  React.createElement("img", { className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
8942
9462
  React.createElement("div", { className: css.css({
8943
9463
  color: '#fff',
@@ -8947,22 +9467,19 @@ const CommodityDiroNew$1 = (_a) => {
8947
9467
  width: '100%',
8948
9468
  overflow: 'hidden'
8949
9469
  }) },
8950
- 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'),
8951
- React.createElement("div", { className: css.css({
8952
- fontSize: '13px',
8953
- fontWeight: 'bold',
8954
- textOverflow: 'ellipsis',
8955
- overflow: 'hidden',
8956
- width: 'fit-content',
8957
- maxWidth: '100%',
8958
- whiteSpace: 'nowrap',
8959
- textDecoration: 'underline',
8960
- color: '#000',
8961
- lineHeight: '20px'
8962
- }) }, (_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'))));
9470
+ 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'),
9471
+ React.createElement("div", { className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop now'))));
8963
9472
  };
8964
9473
  var CommodityDiroNewComponent = React.memo(CommodityDiroNew$1);
8965
9474
 
9475
+ /*
9476
+ * @Author: binruan@chatlabs.com
9477
+ * @Date: 2023-07-28 18:29:57
9478
+ * @LastEditors: binruan@chatlabs.com
9479
+ * @LastEditTime: 2024-03-29 11:56:56
9480
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiroNew\material.tsx
9481
+ *
9482
+ */
8966
9483
  const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
8967
9484
  displayName: '推荐单商品-白底下划线按钮',
8968
9485
  icon: '',
@@ -8970,15 +9487,40 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
8970
9487
  type: 'CommodityDiroNew',
8971
9488
  related: {
8972
9489
  interactionRender: interactionRender$3,
8973
- bindableProps: []
9490
+ bindableProps: [],
9491
+ settingRender
8974
9492
  },
8975
9493
  defaulSetting: {
8976
- props: {},
9494
+ props: {
9495
+ ctaTempStyles: {
9496
+ img: {
9497
+ borderRadius: 8,
9498
+ width: 78,
9499
+ height: 78,
9500
+ marginRight: 16
9501
+ },
9502
+ title: {
9503
+ fontSize: 12,
9504
+ color: '#000',
9505
+ textAlign: 'left'
9506
+ },
9507
+ ctaTitle: {
9508
+ textDecoration: 'underline',
9509
+ fontSize: 12,
9510
+ fontWeight: 'bold',
9511
+ color: '#000',
9512
+ textAlign: 'left',
9513
+ width: 150,
9514
+ height: 20
9515
+ }
9516
+ }
9517
+ },
8977
9518
  style: {
8978
- padding: '7px',
8979
- display: 'flex',
8980
- borderRadius: '3px',
8981
- background: '#fff'
9519
+ borderRadius: 4,
9520
+ width: 260,
9521
+ height: 86,
9522
+ padding: 4,
9523
+ backgroundColor: 'rgba(255,255,255,0.75)'
8982
9524
  }
8983
9525
  },
8984
9526
  w: 100,
@@ -9031,8 +9573,9 @@ var styles$2 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
9031
9573
 
9032
9574
  const MultiCommodityDiro$1 = (_a) => {
9033
9575
  var _b, _c;
9034
- var { content, style, bgImg, recData, onClick, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image"]);
9576
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9035
9577
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9578
+ const { popupAni } = useEditor();
9036
9579
  const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
9037
9580
  const handleClick = lodash.throttle((item) => {
9038
9581
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -9041,19 +9584,11 @@ const MultiCommodityDiro$1 = (_a) => {
9041
9584
  }, recData, item);
9042
9585
  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 }) }));
9043
9586
  onClick === null || onClick === void 0 ? void 0 : onClick();
9044
- }, 1200);
9587
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9045
9588
  return (React.createElement(Scroll$1, null, products === null || products === void 0 ? void 0 : products.map((item) => {
9046
9589
  var _a, _b, _c, _d, _e, _f;
9047
- return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css.css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%', flexShrink: 0 })) }, props, { onClick: () => handleClick(item) }),
9048
- React.createElement("div", { className: css.css({
9049
- width: '60px',
9050
- height: '60px',
9051
- marginRight: '8px',
9052
- borderRadius: '3px',
9053
- overflow: 'hidden',
9054
- flexShrink: 0,
9055
- backgroundColor: '#f2f2f2'
9056
- }) },
9590
+ return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css.css(Object.assign({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
9591
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9057
9592
  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 })),
9058
9593
  React.createElement("div", { className: css.css({
9059
9594
  color: '#000',
@@ -9063,24 +9598,20 @@ const MultiCommodityDiro$1 = (_a) => {
9063
9598
  width: '100%',
9064
9599
  overflow: 'hidden'
9065
9600
  }) },
9066
- 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'),
9067
- React.createElement("div", { className: css.css({
9068
- background: 'rgba(0,0,0,1)',
9069
- fontSize: '10px',
9070
- padding: '2px 7px',
9071
- textAlign: 'center',
9072
- textOverflow: 'ellipsis',
9073
- overflow: 'hidden',
9074
- borderRadius: '25px',
9075
- width: 'fit-content',
9076
- maxWidth: '100%',
9077
- color: '#fff',
9078
- whiteSpace: 'nowrap'
9079
- }) }, (_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'))));
9601
+ 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'),
9602
+ React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_f = (_e = item === null || item === void 0 ? void 0 : item.bindCta) === null || _e === void 0 ? void 0 : _e.enTitle) !== null && _f !== void 0 ? _f : 'Shop Now'))));
9080
9603
  })));
9081
9604
  };
9082
9605
  var MultiCommodityDiroComponent = React.memo(MultiCommodityDiro$1);
9083
9606
 
9607
+ /*
9608
+ * @Author: binruan@chatlabs.com
9609
+ * @Date: 2023-07-28 18:29:57
9610
+ * @LastEditors: binruan@chatlabs.com
9611
+ * @LastEditTime: 2024-03-29 16:27:22
9612
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiro\material.tsx
9613
+ *
9614
+ */
9084
9615
  const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
9085
9616
  displayName: '推荐多商品-白底圆角按钮',
9086
9617
  icon: '',
@@ -9088,15 +9619,39 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
9088
9619
  type: 'MultiCommodityDiro',
9089
9620
  related: {
9090
9621
  interactionRender: interactionRender$2,
9091
- bindableProps: []
9622
+ bindableProps: [],
9623
+ settingRender
9092
9624
  },
9093
9625
  defaulSetting: {
9094
- props: {},
9626
+ props: {
9627
+ ctaTempStyles: {
9628
+ img: {
9629
+ borderRadius: 3,
9630
+ width: 60,
9631
+ height: 60,
9632
+ marginRight: 8
9633
+ },
9634
+ title: {
9635
+ fontSize: 12,
9636
+ color: '#000',
9637
+ textAlign: 'left'
9638
+ },
9639
+ ctaTitle: {
9640
+ fontSize: 10,
9641
+ color: '#fff',
9642
+ textAlign: 'center',
9643
+ width: 80,
9644
+ height: 20,
9645
+ backgroundColor: 'rgba(0,0,0,1)'
9646
+ }
9647
+ }
9648
+ },
9095
9649
  style: {
9096
- padding: '7px',
9097
- display: 'flex',
9098
- background: '#fff',
9099
- borderRadius: '3px'
9650
+ padding: 7,
9651
+ width: 236,
9652
+ height: 74,
9653
+ borderRadius: 3,
9654
+ backgroundColor: '#fff'
9100
9655
  }
9101
9656
  },
9102
9657
  w: 100,
@@ -9120,9 +9675,10 @@ var styles$1 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
9120
9675
 
9121
9676
  const MultiCommodity$1 = (_a) => {
9122
9677
  var _b, _c;
9123
- var { content, style, bgImg, recData, onClick, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image"]);
9678
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9124
9679
  const { sxpParameter } = useSxpDataSource();
9125
9680
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9681
+ const { popupAni } = useEditor();
9126
9682
  const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
9127
9683
  const handleClick = lodash.throttle((item) => {
9128
9684
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -9131,19 +9687,11 @@ const MultiCommodity$1 = (_a) => {
9131
9687
  }, recData, item);
9132
9688
  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 }) }));
9133
9689
  onClick === null || onClick === void 0 ? void 0 : onClick();
9134
- }, 1200);
9690
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9135
9691
  return (React.createElement(Scroll$1, null, products === null || products === void 0 ? void 0 : products.map((item) => {
9136
9692
  var _a, _b, _c, _d, _e, _f;
9137
- return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css.css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%', flexShrink: 0 })) }, props, { onClick: () => handleClick(item) }),
9138
- React.createElement("div", { className: css.css({
9139
- width: '60px',
9140
- height: '60px',
9141
- marginRight: '8px',
9142
- borderRadius: '3px',
9143
- overflow: 'hidden',
9144
- flexShrink: 0,
9145
- backgroundColor: '#f2f2f2'
9146
- }) },
9693
+ return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css.css(Object.assign({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
9694
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9147
9695
  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 })),
9148
9696
  React.createElement("div", { className: css.css({
9149
9697
  color: '#fff',
@@ -9153,21 +9701,20 @@ const MultiCommodity$1 = (_a) => {
9153
9701
  width: '100%',
9154
9702
  overflow: 'hidden'
9155
9703
  }) },
9156
- 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'),
9157
- React.createElement("div", { className: css.css({
9158
- background: 'rgba(0,0,0,.5)',
9159
- fontSize: '10px',
9160
- padding: '2px 7px',
9161
- width: 'auto',
9162
- textAlign: 'center',
9163
- textOverflow: 'ellipsis',
9164
- overflow: 'hidden',
9165
- whiteSpace: 'nowrap'
9166
- }) }, (_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'))));
9704
+ 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'),
9705
+ React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_f = (_e = item === null || item === void 0 ? void 0 : item.bindCta) === null || _e === void 0 ? void 0 : _e.enTitle) !== null && _f !== void 0 ? _f : 'Shop Now'))));
9167
9706
  })));
9168
9707
  };
9169
9708
  var MultiCommodityComponent = React.memo(MultiCommodity$1);
9170
9709
 
9710
+ /*
9711
+ * @Author: binruan@chatlabs.com
9712
+ * @Date: 2023-07-28 18:29:57
9713
+ * @LastEditors: binruan@chatlabs.com
9714
+ * @LastEditTime: 2024-03-29 16:43:35
9715
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodity\material.tsx
9716
+ *
9717
+ */
9171
9718
  const MultiCommodity = createMaterial(MultiCommodityComponent, {
9172
9719
  displayName: '推荐多商品-透明底',
9173
9720
  icon: '',
@@ -9175,15 +9722,39 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
9175
9722
  type: 'MultiCommodity',
9176
9723
  related: {
9177
9724
  interactionRender: interactionRender$1,
9725
+ settingRender,
9178
9726
  bindableProps: []
9179
9727
  },
9180
9728
  defaulSetting: {
9181
- props: {},
9729
+ props: {
9730
+ ctaTempStyles: {
9731
+ img: {
9732
+ borderRadius: 3,
9733
+ width: 60,
9734
+ height: 60,
9735
+ marginRight: 8
9736
+ },
9737
+ title: {
9738
+ fontSize: 12,
9739
+ color: '#fff',
9740
+ textAlign: 'left'
9741
+ },
9742
+ ctaTitle: {
9743
+ fontSize: 10,
9744
+ color: '#fff',
9745
+ textAlign: 'center',
9746
+ width: 130,
9747
+ height: 20,
9748
+ backgroundColor: 'rgba(0,0,0,.5)'
9749
+ }
9750
+ }
9751
+ },
9182
9752
  style: {
9183
- padding: '7px',
9184
- display: 'flex',
9185
- background: 'rgba(0,0,0,.3)',
9186
- borderRadius: '3px'
9753
+ padding: 7,
9754
+ width: 236,
9755
+ height: 74,
9756
+ borderRadius: 3,
9757
+ backgroundColor: 'rgba(0,0,0,.3)'
9187
9758
  }
9188
9759
  },
9189
9760
  w: 100,
@@ -9207,8 +9778,9 @@ var styles = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
9207
9778
 
9208
9779
  const MultiCommodityDiroNew$1 = (_a) => {
9209
9780
  var _b, _c;
9210
- var { content, style, bgImg, recData, onClick, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image"]);
9781
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9211
9782
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9783
+ const { popupAni } = useEditor();
9212
9784
  const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
9213
9785
  const handleClick = lodash.throttle((item) => {
9214
9786
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -9217,19 +9789,11 @@ const MultiCommodityDiroNew$1 = (_a) => {
9217
9789
  }, recData, item);
9218
9790
  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 }) }));
9219
9791
  onClick === null || onClick === void 0 ? void 0 : onClick();
9220
- }, 1200);
9792
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9221
9793
  return (React.createElement(Scroll$1, null, products === null || products === void 0 ? void 0 : products.map((item) => {
9222
9794
  var _a, _b, _c, _d, _e, _f;
9223
- return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css.css(Object.assign(Object.assign({}, style), { maxWidth: '260px', width: '100%', flexShrink: 0, padding: '4px', background: 'rgba(255,255,255,0.75)' })) }, props, { onClick: () => handleClick(item) }),
9224
- React.createElement("div", { className: css.css({
9225
- width: '78px',
9226
- height: '78px',
9227
- marginRight: '16px',
9228
- borderRadius: '8px',
9229
- overflow: 'hidden',
9230
- flexShrink: 0,
9231
- backgroundColor: '#f2f2f2'
9232
- }) },
9795
+ return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css.css(Object.assign({ flexShrink: 0 }, style)), style: { display: 'flex' } }, props, { onClick: () => handleClick(item) }),
9796
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9233
9797
  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 })),
9234
9798
  React.createElement("div", { className: css.css({
9235
9799
  color: '#fff',
@@ -9240,22 +9804,20 @@ const MultiCommodityDiroNew$1 = (_a) => {
9240
9804
  overflow: 'hidden',
9241
9805
  lineHeight: '20px'
9242
9806
  }) },
9243
- 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'),
9244
- React.createElement("div", { className: css.css({
9245
- fontSize: '13px',
9246
- fontWeight: 'bold',
9247
- textOverflow: 'ellipsis',
9248
- overflow: 'hidden',
9249
- width: 'fit-content',
9250
- maxWidth: '100%',
9251
- whiteSpace: 'nowrap',
9252
- textDecoration: 'underline',
9253
- color: '#000'
9254
- }) }, (_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'))));
9807
+ 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'),
9808
+ React.createElement("div", { className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_f = (_e = item === null || item === void 0 ? void 0 : item.bindCta) === null || _e === void 0 ? void 0 : _e.enTitle) !== null && _f !== void 0 ? _f : 'Shop now'))));
9255
9809
  })));
9256
9810
  };
9257
9811
  var MultiCommodityDiroNewComponent = React.memo(MultiCommodityDiroNew$1);
9258
9812
 
9813
+ /*
9814
+ * @Author: binruan@chatlabs.com
9815
+ * @Date: 2023-07-28 18:29:57
9816
+ * @LastEditors: binruan@chatlabs.com
9817
+ * @LastEditTime: 2024-03-29 15:40:54
9818
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\material.tsx
9819
+ *
9820
+ */
9259
9821
  const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
9260
9822
  displayName: '推荐多商品-白底下划线按钮',
9261
9823
  icon: '',
@@ -9263,15 +9825,40 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
9263
9825
  type: 'MultiCommodityDiroNew',
9264
9826
  related: {
9265
9827
  interactionRender,
9266
- bindableProps: []
9828
+ bindableProps: [],
9829
+ settingRender
9267
9830
  },
9268
9831
  defaulSetting: {
9269
- props: {},
9832
+ props: {
9833
+ ctaTempStyles: {
9834
+ img: {
9835
+ borderRadius: 8,
9836
+ width: 78,
9837
+ height: 78,
9838
+ marginRight: 16
9839
+ },
9840
+ title: {
9841
+ fontSize: 12,
9842
+ color: '#000',
9843
+ textAlign: 'left'
9844
+ },
9845
+ ctaTitle: {
9846
+ textDecoration: 'underline',
9847
+ fontSize: 12,
9848
+ fontWeight: 'bold',
9849
+ color: '#000',
9850
+ textAlign: 'left',
9851
+ width: 150,
9852
+ height: 20
9853
+ }
9854
+ }
9855
+ },
9270
9856
  style: {
9271
- padding: '7px',
9272
- display: 'flex',
9273
- background: '#fff',
9274
- borderRadius: '3px'
9857
+ borderRadius: 4,
9858
+ width: 260,
9859
+ height: 86,
9860
+ padding: 4,
9861
+ backgroundColor: 'rgba(255,255,255,0.75)'
9275
9862
  }
9276
9863
  },
9277
9864
  w: 100,
@@ -9381,8 +9968,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
9381
9968
  videoRef.current.muted = muted;
9382
9969
  }, [muted]);
9383
9970
  const handleVideoStart = React.useCallback(() => {
9384
- var _a;
9385
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
9971
+ var _a, _b;
9972
+ 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)
9973
+ return;
9974
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
9386
9975
  }, []);
9387
9976
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
9388
9977
  const handlePlaying = React.useCallback(() => {
@@ -9439,37 +10028,38 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
9439
10028
  });
9440
10029
  }
9441
10030
  setTimeout(() => {
9442
- var _a;
9443
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
10031
+ var _a, _b;
10032
+ 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)
10033
+ return;
10034
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
9444
10035
  }, 0);
9445
10036
  }, [index, bffEventReport, data, isLoad]);
9446
10037
  const handleClickVideo = React.useCallback((type) => () => {
9447
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
10038
+ var _a, _b, _c, _d, _e, _f;
10039
+ 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)
10040
+ return;
9448
10041
  if (!isLoad)
9449
10042
  return;
9450
- data[index];
9451
- ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
9452
- ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
9453
- const isPause = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.paused;
10043
+ const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
9454
10044
  switch (type) {
9455
10045
  case 'start':
9456
10046
  if (!isPause)
9457
10047
  return;
9458
- (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
10048
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
9459
10049
  setIsPauseVideo(false);
9460
10050
  break;
9461
10051
  case 'pause':
9462
10052
  if (isPause)
9463
10053
  return;
9464
- (_g = videoRef.current) === null || _g === void 0 ? void 0 : _g.pause();
10054
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.pause();
9465
10055
  setIsPauseVideo(true);
9466
10056
  break;
9467
10057
  default:
9468
10058
  if (isPause) {
9469
- (_h = videoRef.current) === null || _h === void 0 ? void 0 : _h.play();
10059
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
9470
10060
  }
9471
10061
  else {
9472
- (_j = videoRef.current) === null || _j === void 0 ? void 0 : _j.pause();
10062
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
9473
10063
  }
9474
10064
  setIsPauseVideo(!isPause);
9475
10065
  break;
@@ -9500,14 +10090,16 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
9500
10090
  }
9501
10091
  }, [data, index, bffEventReport]);
9502
10092
  React.useEffect(() => {
9503
- var _a, _b, _c;
10093
+ var _a, _b, _c, _d, _e, _f;
9504
10094
  if (data.length <= 0)
9505
10095
  return;
9506
10096
  if (!videoRef.current)
9507
10097
  return;
10098
+ const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
9508
10099
  setIsPauseVideo(false);
9509
10100
  if (!isActive) {
9510
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
10101
+ if (!isPause && ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.readyState) >= 2)
10102
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
9511
10103
  return;
9512
10104
  }
9513
10105
  if (!videoRef.current.src) {
@@ -9530,10 +10122,12 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
9530
10122
  videoRef.current.setAttribute('webkit-playsinline', 'true');
9531
10123
  }
9532
10124
  else {
10125
+ if (((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.readyState) < 2)
10126
+ return;
9533
10127
  videoRef.current.play();
9534
10128
  }
9535
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
9536
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
10129
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('canplay', handleLoadedMetadata);
10130
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
9537
10131
  return () => {
9538
10132
  var _a, _b;
9539
10133
  (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('canplay', handleLoadedMetadata);
@@ -9544,15 +10138,17 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
9544
10138
  打开/关闭hashtag暂停/播放视频
9545
10139
  */
9546
10140
  React.useEffect(() => {
9547
- var _a, _b, _c;
9548
- const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
10141
+ var _a, _b, _c, _d;
10142
+ 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)
10143
+ return;
10144
+ const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
9549
10145
  if (!isActive)
9550
10146
  return;
9551
10147
  if (!isPause && openHashtag) {
9552
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.pause();
10148
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
9553
10149
  }
9554
10150
  else if (!openHashtag) {
9555
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
10151
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
9556
10152
  }
9557
10153
  }, [openHashtag, isActive]);
9558
10154
  React.useEffect(() => {
@@ -9665,22 +10261,26 @@ const Picture = (props) => {
9665
10261
  * @Author: lewinlu@chatlabs.com
9666
10262
  * @Date: 2024-01-03 14:39:09
9667
10263
  * @LastEditors: binruan@chatlabs.com
9668
- * @LastEditTime: 2024-03-19 18:42:33
10264
+ * @LastEditTime: 2024-03-25 15:08:11
9669
10265
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
9670
10266
  */
9671
10267
  const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent }) => {
9672
10268
  const { isActive } = useSwiperSlide();
9673
10269
  const { sxpParameter, openHashtag } = useSxpDataSource();
10270
+ const [isLoad, setIsLoad] = React.useState(false);
9674
10271
  React.useEffect(() => {
9675
- if (!isActive)
9676
- return;
9677
- if (openHashtag) {
9678
- onReportViewImageEnd(rec);
10272
+ if (isLoad && isActive) {
10273
+ if (openHashtag) {
10274
+ onReportViewImageEnd(rec);
10275
+ }
10276
+ else {
10277
+ onViewImageStartEvent(index);
10278
+ }
9679
10279
  }
9680
10280
  else {
9681
- onViewImageStartEvent(index);
10281
+ setIsLoad(true);
9682
10282
  }
9683
- }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent]);
10283
+ }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent, isLoad]);
9684
10284
  if (!isActive) {
9685
10285
  return React.createElement("img", { src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, style: { width, height, objectFit: 'cover' } });
9686
10286
  }
@@ -9691,75 +10291,17 @@ const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd
9691
10291
  };
9692
10292
  var PictureGroup$1 = React.memo(PictureGroup);
9693
10293
 
9694
- /*
9695
- * @Author: binruan@chatlabs.com
9696
- * @Date: 2023-11-02 18:34:34
9697
- * @LastEditors: binruan@chatlabs.com
9698
- * @LastEditTime: 2024-03-12 12:08:55
9699
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ProductInfo\index.tsx
9700
- *
9701
- */
9702
- const ProductInfo = ({ data, height, width, viewTime, tipText }) => {
9703
- var _a, _b;
9704
- const product = data === null || data === void 0 ? void 0 : data.product;
9705
- const cta = (_a = data === null || data === void 0 ? void 0 : data.product) === null || _a === void 0 ? void 0 : _a.bindCta;
9706
- const [showModal, setShowModal] = React.useState(false);
9707
- const { jumpToWeb } = useEventReport();
9708
- const priceText = React.useMemo(() => {
9709
- var _a, _b, _c, _d, _e;
9710
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
9711
- 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', {
9712
- minimumFractionDigits: 0
9713
- })) !== null && _e !== void 0 ? _e : ''}`;
9714
- }
9715
- else {
9716
- return '$7,000';
9717
- }
9718
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
9719
- const handleLInk = (link) => {
9720
- if (link) {
9721
- jumpToWeb(data, product, cta);
9722
- window.location.href = window.getJointUtmLink(link);
9723
- }
9724
- };
9725
- return (React.createElement("div", { style: { height, width: '100%' } },
9726
- React.createElement(Swiper, { height: height * 0.5, modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, loop: true, autoplay: {
9727
- delay: 3000
9728
- } }, (_b = product === null || product === void 0 ? void 0 : product.homePage) === null || _b === void 0 ? void 0 : _b.map((src) => {
9729
- return (React.createElement(SwiperSlide, { key: src },
9730
- React.createElement("div", { style: {
9731
- overflow: 'hidden',
9732
- width,
9733
- height: height * 0.5
9734
- } },
9735
- React.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
9736
- })),
9737
- React.createElement("div", { className: 'product-info' },
9738
- React.createElement("div", { className: 'collection' }, product === null || product === void 0 ? void 0 : product.collection),
9739
- React.createElement("div", { className: 'title' }, product === null || product === void 0 ? void 0 : product.title),
9740
- React.createElement("div", { className: 'price' }, priceText),
9741
- 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 }),
9742
- 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)),
9743
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
9744
- React.createElement("div", { className: 'modal-collection' }, product === null || product === void 0 ? void 0 : product.collection),
9745
- React.createElement("div", { className: 'modal-title' }, product === null || product === void 0 ? void 0 : product.title),
9746
- React.createElement("div", { className: 'modal-price' }, priceText),
9747
- React.createElement("div", { className: 'modal-info' }, product === null || product === void 0 ? void 0 : product.info),
9748
- (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)))));
9749
- };
9750
- var ProductInfo$1 = React.memo(ProductInfo);
9751
-
9752
10294
  /*
9753
10295
  * @Author: binruan@chatlabs.com
9754
10296
  * @Date: 2024-01-15 19:03:09
9755
10297
  * @LastEditors: binruan@chatlabs.com
9756
- * @LastEditTime: 2024-03-04 18:41:38
10298
+ * @LastEditTime: 2024-03-25 10:42:07
9757
10299
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
9758
10300
  *
9759
10301
  */
9760
10302
  const Hashtag = ({ tags, itemId, itemType, index, rec }) => {
9761
10303
  const [isShowMore, setIsShowMore] = React.useState(false);
9762
- const { setWaterFallData, setOpenHashtag, setCacheRtcList, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
10304
+ const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
9763
10305
  const handleClickTag = (data) => {
9764
10306
  if (!waterFallData) {
9765
10307
  setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(index);
@@ -10220,17 +10762,29 @@ const WaterFall = () => {
10220
10762
  };
10221
10763
  var WaterFall$1 = React.memo(WaterFall);
10222
10764
 
10765
+ const Nudge = ({ nudge }) => {
10766
+ return (React.createElement("div", { hidden: !(nudge === null || nudge === void 0 ? void 0 : nudge.isOpen), className: 'clc-sxp-bottom-nudge', style: {
10767
+ marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
10768
+ width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
10769
+ height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
10770
+ backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
10771
+ borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
10772
+ } },
10773
+ (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
10774
+ React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)));
10775
+ };
10776
+
10223
10777
  /*
10224
10778
  * @Author: binruan@chatlabs.com
10225
10779
  * @Date: 2024-01-15 19:03:09
10226
10780
  * @LastEditors: binruan@chatlabs.com
10227
- * @LastEditTime: 2024-03-18 18:48:44
10781
+ * @LastEditTime: 2024-04-02 10:42:58
10228
10782
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
10229
10783
  *
10230
10784
  */
10231
- const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, _schema }) => {
10785
+ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema }) => {
10232
10786
  var _a, _b, _c, _d;
10233
- useEditor();
10787
+ const { schema } = useEditor();
10234
10788
  const [activeIndex, setActiveIndex] = React.useState(0);
10235
10789
  const viewImageStartTime = React.useRef(0);
10236
10790
  const [isInit, setIsInit] = React.useState(false);
@@ -10382,49 +10936,39 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
10382
10936
  return null;
10383
10937
  }, [globalConfig]);
10384
10938
  const renderContent = React.useCallback((rec, index) => {
10385
- var _a, _b;
10939
+ var _a, _b, _c, _d;
10386
10940
  if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
10387
10941
  return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex }));
10388
10942
  }
10389
10943
  if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
10390
10944
  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 }));
10391
10945
  }
10392
- if (rec.product) {
10393
- switch (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) {
10394
- case 'CommodityDetailDiroNew':
10395
- return (React.createElement(CommodityDetailDiroNew$2, { key: rec.product.itemId, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' } }));
10396
- // case 'CommodityDetailDiro':
10397
- // return (
10398
- // <CommodityDetailDiro
10399
- // key={rec.product.itemId}
10400
- // viewTime={viewTime.current}
10401
- // rec={rec}
10402
- // isPost={true}
10403
- // style={{ height: '100%', overflow: 'auto' }}
10404
- // />
10405
- // );
10406
- case 'CommodityDetail':
10407
- return (React.createElement(ProductInfo$1, { key: rec.product.itemId, viewTime: viewTime.current, data: rec, height: height, tipText: tipText, width: containerWidth }));
10408
- default:
10409
- return (React.createElement(ProductInfo$1, { key: rec.product.itemId, viewTime: viewTime.current, data: rec, height: height, tipText: tipText, width: containerWidth }));
10410
- }
10946
+ 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) {
10947
+ return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, index) => {
10948
+ var _a, _b, _c, _d, _e, _f;
10949
+ const Component = withBindDataSource(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
10950
+ 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' },
10951
+ // ProductInfo
10952
+ data: rec, height: height, width: containerWidth })));
10953
+ });
10411
10954
  }
10412
10955
  return null;
10413
- }, [containerWidth, data, height, isMuted, activeIndex, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost, viewTime, tipText]);
10956
+ }, [containerWidth, data, height, isMuted, activeIndex, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost, viewTime, tipText, resolver, schema]);
10414
10957
  const renderBottom = React.useCallback((rec, index) => {
10415
10958
  var _a, _b, _c, _d, _e, _f, _g;
10416
10959
  if (rec.video) {
10417
10960
  return (React.createElement(React.Fragment, null,
10418
10961
  ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
10419
10962
  React.createElement("div", { className: 'clc-sxp-bottom' },
10963
+ React.createElement(Nudge, { nudge: nudge }),
10420
10964
  React.createElement("div", { className: 'clc-sxp-bottom-card' },
10421
10965
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
10422
10966
  React.createElement("div", { className: 'clc-sxp-bottom-text' },
10423
- 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 })),
10967
+ 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 })),
10424
10968
  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 }))));
10425
10969
  }
10426
10970
  return null;
10427
- }, [descStyle, activeIndex, tempMap, resolver, tipText]);
10971
+ }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge]);
10428
10972
  const renderLikeButton = React.useCallback((rec) => {
10429
10973
  var _a, _b;
10430
10974
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
@@ -10503,6 +11047,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
10503
11047
  productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current);
10504
11048
  }
10505
11049
  };
11050
+ React.useEffect(() => {
11051
+ const item = data[activeIndex];
11052
+ if (openHashtag)
11053
+ handleReportProductView(item);
11054
+ }, [openHashtag, data, activeIndex]);
10506
11055
  const handleViewImageStartEvent = (activeIndex) => {
10507
11056
  var _a, _b, _c, _d, _e, _f;
10508
11057
  const item = data[activeIndex];
@@ -10609,12 +11158,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
10609
11158
  * @Author: binruan@chatlabs.com
10610
11159
  * @Date: 2023-10-31 10:56:01
10611
11160
  * @LastEditors: binruan@chatlabs.com
10612
- * @LastEditTime: 2024-03-13 02:19:26
11161
+ * @LastEditTime: 2024-04-02 10:31:51
10613
11162
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
10614
11163
  *
10615
11164
  */
10616
11165
  const Popup = () => {
10617
- const { schema, resolver, popup } = useEditor();
11166
+ const { schema, resolver, popup, popupAni } = useEditor();
10618
11167
  const { setPopupDetailData, popupDetailData, bffEventReport } = useSxpDataSource();
10619
11168
  const { productView } = useEventReport();
10620
11169
  const [visible, setVisible] = React.useState(false);
@@ -10637,7 +11186,7 @@ const Popup = () => {
10637
11186
  }, [popup]);
10638
11187
  const handleClose = () => {
10639
11188
  var _a, _b, _c;
10640
- if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < 1200) {
11189
+ if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
10641
11190
  return;
10642
11191
  }
10643
11192
  setVisible(false);
@@ -10650,7 +11199,7 @@ const Popup = () => {
10650
11199
  setTimeout(() => {
10651
11200
  window === null || window === void 0 ? void 0 : window.sxpPopup('');
10652
11201
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(null);
10653
- }, 1200);
11202
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
10654
11203
  };
10655
11204
  const renderPopupDetail = React.useMemo(() => {
10656
11205
  var _a, _b, _c;
@@ -10672,7 +11221,7 @@ const Popup = () => {
10672
11221
  * @Author: binruan@chatlabs.com
10673
11222
  * @Date: 2024-01-15 19:03:09
10674
11223
  * @LastEditors: binruan@chatlabs.com
10675
- * @LastEditTime: 2024-03-14 17:23:54
11224
+ * @LastEditTime: 2024-03-25 17:24:59
10676
11225
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
10677
11226
  *
10678
11227
  */
@@ -10688,7 +11237,7 @@ const RESOLVER = {};
10688
11237
  Object.values(_materials_).forEach((v) => {
10689
11238
  RESOLVER[v.extend.type] = v;
10690
11239
  });
10691
- const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage }) => {
11240
+ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain }) => {
10692
11241
  var _a, _b, _c, _d, _e, _f;
10693
11242
  const utmVal = React.useMemo(() => {
10694
11243
  var _a;
@@ -10696,7 +11245,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
10696
11245
  return searchParams;
10697
11246
  }, []);
10698
11247
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
10699
- 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 }) => {
11248
+ 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 }) => {
10700
11249
  var _a;
10701
11250
  return (React.createElement(React.Fragment, null,
10702
11251
  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 })),