pb-sxp-ui 1.0.0 → 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 (129) hide show
  1. package/README.md +2 -2
  2. package/dist/index.cjs +938 -389
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.css +24 -18
  5. package/dist/index.js +938 -389
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.min.cjs +3 -5
  8. package/dist/index.min.cjs.map +1 -1
  9. package/dist/index.min.js +3 -5
  10. package/dist/index.min.js.map +1 -1
  11. package/dist/pb-ui.js +938 -389
  12. package/dist/pb-ui.js.map +1 -1
  13. package/dist/pb-ui.min.js +3 -5
  14. package/dist/pb-ui.min.js.map +1 -1
  15. package/es/core/components/SxpPageCore/index.d.ts +1 -0
  16. package/es/core/components/SxpPageCore/index.js +2 -2
  17. package/es/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
  18. package/es/core/components/SxpPageRender/ExpandableText.js +16 -9
  19. package/es/core/components/SxpPageRender/Hashtag/index.js +1 -1
  20. package/es/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  21. package/es/core/components/SxpPageRender/Modal/index.js +7 -4
  22. package/es/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  23. package/es/core/components/SxpPageRender/Nudge/index.js +13 -0
  24. package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -7
  25. package/es/core/components/SxpPageRender/Popup/index.js +3 -3
  26. package/es/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  27. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +4 -3
  28. package/es/core/components/SxpPageRender/index.d.ts +20 -1
  29. package/es/core/components/SxpPageRender/index.js +19 -16
  30. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  31. package/es/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  32. package/es/core/components/SxpPageRender/useIconLink.js +8 -3
  33. package/es/core/context/EditorContext.d.ts +5 -0
  34. package/es/core/context/EditorContext.js +21 -3
  35. package/es/core/context/SxpDataSourceProvider.js +1 -1
  36. package/es/core/create.d.ts +1 -1
  37. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  38. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  39. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +35 -1
  40. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  41. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +175 -0
  42. package/es/materials/sxp/template/Appoint/index.d.ts +2 -0
  43. package/es/materials/sxp/template/Appoint/index.js +4 -18
  44. package/es/materials/sxp/template/Appoint/material.js +22 -6
  45. package/es/materials/sxp/template/Commodity/index.d.ts +2 -0
  46. package/es/materials/sxp/template/Commodity/index.js +5 -22
  47. package/es/materials/sxp/template/Commodity/material.js +31 -6
  48. package/es/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  49. package/es/materials/sxp/template/CommodityDiro/index.js +5 -24
  50. package/es/materials/sxp/template/CommodityDiro/material.js +30 -5
  51. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  52. package/es/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  53. package/es/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  54. package/es/materials/sxp/template/Link/index.d.ts +2 -0
  55. package/es/materials/sxp/template/Link/index.js +4 -13
  56. package/es/materials/sxp/template/Link/material.js +22 -5
  57. package/es/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  58. package/es/materials/sxp/template/MultiCommodity/index.js +8 -24
  59. package/es/materials/sxp/template/MultiCommodity/material.js +30 -5
  60. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  61. package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -27
  62. package/es/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  63. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  64. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +8 -25
  65. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  66. package/es/materials/sxp/template/components/EventProvider.d.ts +2 -1
  67. package/es/materials/sxp/template/components/EventProvider.js +5 -4
  68. package/es/materials/sxp/template/components/settingRender.d.ts +108 -0
  69. package/es/materials/sxp/template/components/settingRender.js +198 -0
  70. package/es/materials/sxp/template/components/typing.d.ts +6 -0
  71. package/es/materials/sxp/template/components/typing.js +1 -0
  72. package/lib/core/components/SxpPageCore/index.d.ts +1 -0
  73. package/lib/core/components/SxpPageCore/index.js +2 -2
  74. package/lib/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
  75. package/lib/core/components/SxpPageRender/ExpandableText.js +16 -9
  76. package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -1
  77. package/lib/core/components/SxpPageRender/Modal/index.d.ts +2 -0
  78. package/lib/core/components/SxpPageRender/Modal/index.js +7 -4
  79. package/lib/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
  80. package/lib/core/components/SxpPageRender/Nudge/index.js +16 -0
  81. package/lib/core/components/SxpPageRender/PictureGroup/index.js +10 -6
  82. package/lib/core/components/SxpPageRender/Popup/index.js +3 -3
  83. package/lib/core/components/SxpPageRender/VideoWidget/index.js +30 -21
  84. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +3 -2
  85. package/lib/core/components/SxpPageRender/index.d.ts +20 -1
  86. package/lib/core/components/SxpPageRender/index.js +19 -16
  87. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  88. package/lib/core/components/SxpPageRender/useIconLink.d.ts +1 -1
  89. package/lib/core/components/SxpPageRender/useIconLink.js +8 -3
  90. package/lib/core/context/EditorContext.d.ts +5 -0
  91. package/lib/core/context/EditorContext.js +21 -3
  92. package/lib/core/context/SxpDataSourceProvider.js +1 -1
  93. package/lib/core/create.d.ts +1 -1
  94. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
  95. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
  96. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +35 -1
  97. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
  98. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +177 -0
  99. package/lib/materials/sxp/template/Appoint/index.d.ts +2 -0
  100. package/lib/materials/sxp/template/Appoint/index.js +4 -18
  101. package/lib/materials/sxp/template/Appoint/material.js +22 -6
  102. package/lib/materials/sxp/template/Commodity/index.d.ts +2 -0
  103. package/lib/materials/sxp/template/Commodity/index.js +5 -22
  104. package/lib/materials/sxp/template/Commodity/material.js +31 -6
  105. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
  106. package/lib/materials/sxp/template/CommodityDiro/index.js +5 -24
  107. package/lib/materials/sxp/template/CommodityDiro/material.js +30 -5
  108. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
  109. package/lib/materials/sxp/template/CommodityDiroNew/index.js +5 -24
  110. package/lib/materials/sxp/template/CommodityDiroNew/material.js +32 -6
  111. package/lib/materials/sxp/template/Link/index.d.ts +2 -0
  112. package/lib/materials/sxp/template/Link/index.js +4 -13
  113. package/lib/materials/sxp/template/Link/material.js +22 -5
  114. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
  115. package/lib/materials/sxp/template/MultiCommodity/index.js +7 -23
  116. package/lib/materials/sxp/template/MultiCommodity/material.js +30 -5
  117. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
  118. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -26
  119. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
  120. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
  121. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -24
  122. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
  123. package/lib/materials/sxp/template/components/EventProvider.d.ts +2 -1
  124. package/lib/materials/sxp/template/components/EventProvider.js +4 -3
  125. package/lib/materials/sxp/template/components/settingRender.d.ts +108 -0
  126. package/lib/materials/sxp/template/components/settingRender.js +200 -0
  127. package/lib/materials/sxp/template/components/typing.d.ts +6 -0
  128. package/lib/materials/sxp/template/components/typing.js +2 -0
  129. package/package.json +2 -1
package/dist/pb-ui.js CHANGED
@@ -393,11 +393,24 @@
393
393
  return fakeUserId;
394
394
  };
395
395
 
396
- function useIconLink(path) {
396
+ /*
397
+ * @Author: binruan@chatlabs.com
398
+ * @Date: 2024-03-20 10:27:31
399
+ * @LastEditors: binruan@chatlabs.com
400
+ * @LastEditTime: 2024-03-25 18:23:54
401
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\useIconLink.ts
402
+ *
403
+ */
404
+ function useIconLink(path, domain) {
397
405
  const { appDomain } = useSxpDataSource();
398
406
  return React.useMemo(() => {
399
- return appDomain ? `https://${appDomain}${path}` : `${window.location.origin}${path}`;
400
- }, [appDomain, path]);
407
+ if (domain) {
408
+ return `https://${domain}${path}`;
409
+ }
410
+ else {
411
+ return appDomain ? `https://${appDomain}${path}` : `${window.location.origin}${path}`;
412
+ }
413
+ }, [appDomain, path, domain]);
401
414
  }
402
415
 
403
416
  const SxpDataSourceContext = React.createContext({
@@ -575,7 +588,7 @@
575
588
  setLoading(false);
576
589
  });
577
590
  }, [getRecommendVideos]);
578
- const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif');
591
+ const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
579
592
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
580
593
  rtcList,
581
594
  setRtcList,
@@ -719,7 +732,11 @@
719
732
  undoStack: [item],
720
733
  redoStack: [],
721
734
  popup: '',
722
- setPopup: () => { }
735
+ setPopup: () => { },
736
+ popupAni: {
737
+ name: 'none',
738
+ duration: 0
739
+ }
723
740
  });
724
741
  const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enableDataSource = true, utmVal }, ref) => {
725
742
  const [currentNode, setCurrentNode] = React.useState(null);
@@ -743,9 +760,22 @@
743
760
  const [undoStack, setUndoStack] = React.useState([[item]]);
744
761
  const [redoStack, setRedoStack] = React.useState([]);
745
762
  const [popup, setPopup] = React.useState('');
763
+ const [popupAni, setPopupAni] = React.useState({
764
+ name: 'none',
765
+ duration: 0
766
+ });
746
767
  typeof window !== 'undefined' &&
747
- (window.sxpPopup = (type) => {
768
+ (window.sxpPopup = (type, aniType) => {
748
769
  setPopup(type);
770
+ if (aniType && (aniType === null || aniType === void 0 ? void 0 : aniType.name) !== 'none') {
771
+ setPopupAni(Object.assign(Object.assign({}, popupAni), aniType));
772
+ }
773
+ else {
774
+ setPopupAni({
775
+ name: 'none',
776
+ duration: 0
777
+ });
778
+ }
749
779
  });
750
780
  typeof window !== 'undefined' &&
751
781
  (window.getJointUtmLink = (url) => {
@@ -821,7 +851,8 @@
821
851
  setUndoStack,
822
852
  getCurPageConf,
823
853
  popup,
824
- setPopup
854
+ setPopup,
855
+ popupAni
825
856
  } },
826
857
  React.createElement(DataSourceProvider$1, { isSsr: isSsr, enable: enableDataSource }, children)));
827
858
  });
@@ -851,7 +882,7 @@
851
882
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
852
883
  *
853
884
  */
854
- var settingRender$1 = [
885
+ var settingRender$3 = [
855
886
  {
856
887
  type: 'Text',
857
888
  label: '组件名称',
@@ -1040,7 +1071,7 @@
1040
1071
  category: 'popup',
1041
1072
  type: 'AppointForm',
1042
1073
  related: {
1043
- settingRender: settingRender$1,
1074
+ settingRender: settingRender$3,
1044
1075
  bindableProps: [],
1045
1076
  interactionRender: interactionRender$8
1046
1077
  },
@@ -8069,7 +8100,7 @@
8069
8100
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
8070
8101
  *
8071
8102
  */
8072
- var settingRender = [
8103
+ var settingRender$2 = [
8073
8104
  {
8074
8105
  type: 'Media',
8075
8106
  label: '图标',
@@ -8144,7 +8175,7 @@
8144
8175
  category: 'popup',
8145
8176
  type: 'Prompt',
8146
8177
  related: {
8147
- settingRender,
8178
+ settingRender: settingRender$2,
8148
8179
  bindableProps: [],
8149
8180
  interactionRender: interactionRender$7
8150
8181
  },
@@ -8339,16 +8370,202 @@
8339
8370
  sort: 1
8340
8371
  });
8341
8372
 
8373
+ /*
8374
+ * @Author: binruan@chatlabs.com
8375
+ * @Date: 2024-03-26 16:50:25
8376
+ * @LastEditors: binruan@chatlabs.com
8377
+ * @LastEditTime: 2024-03-28 18:42:26
8378
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
8379
+ *
8380
+ */
8381
+ var settingRender$1 = [
8382
+ {
8383
+ title: '商品图片',
8384
+ child: [
8385
+ {
8386
+ type: 'Radius',
8387
+ label: '轮播指示器',
8388
+ options: [
8389
+ {
8390
+ label: '居左',
8391
+ value: 'left'
8392
+ },
8393
+ {
8394
+ label: '居中',
8395
+ value: 'center'
8396
+ }
8397
+ ],
8398
+ name: ['props', 'swiper', 'dotsAlign']
8399
+ },
8400
+ {
8401
+ type: 'Number',
8402
+ name: ['props', 'swiper', 'delay'],
8403
+ addonAfter: 's'
8404
+ }
8405
+ ]
8406
+ },
8407
+ {
8408
+ title: '商品文本',
8409
+ child: [
8410
+ {
8411
+ name: ['props', 'commodityStyles'],
8412
+ type: 'SelectLinkage',
8413
+ child: [
8414
+ {
8415
+ label: '字段',
8416
+ type: 'Select',
8417
+ options: [
8418
+ {
8419
+ label: '商品名称',
8420
+ value: 'title'
8421
+ },
8422
+ {
8423
+ label: '系列名称',
8424
+ value: 'collection'
8425
+ },
8426
+ {
8427
+ label: '价格',
8428
+ value: 'price'
8429
+ },
8430
+ {
8431
+ label: '税费说明',
8432
+ value: 'taxInfo'
8433
+ },
8434
+ {
8435
+ label: '商品描述',
8436
+ value: 'info'
8437
+ }
8438
+ ],
8439
+ name: ['props', 'commodityStyles', 'field'],
8440
+ initialValue: 'title'
8441
+ },
8442
+ {
8443
+ type: 'Group',
8444
+ label: '标题字体',
8445
+ child: [
8446
+ {
8447
+ type: 'Color',
8448
+ name: ['color']
8449
+ },
8450
+ {
8451
+ type: 'Select',
8452
+ options: [{ label: '黑体', value: '黑体' }],
8453
+ name: ['fontFamily']
8454
+ },
8455
+ {
8456
+ type: 'Number',
8457
+ addonAfter: 'px',
8458
+ name: ['fontSize']
8459
+ }
8460
+ ]
8461
+ },
8462
+ {
8463
+ label: '标题样式',
8464
+ type: 'TextStyle'
8465
+ },
8466
+ {
8467
+ label: '标题对齐',
8468
+ type: 'TextAlign'
8469
+ },
8470
+ {
8471
+ label: '默认行数',
8472
+ type: 'Number',
8473
+ name: ['lineClamp']
8474
+ }
8475
+ ]
8476
+ }
8477
+ ]
8478
+ },
8479
+ {
8480
+ title: '购买按钮样式',
8481
+ child: [
8482
+ {
8483
+ type: 'Color',
8484
+ label: '背景色',
8485
+ name: ['props', 'buttonStyle', 'backgroundColor'],
8486
+ initialValue: '#000'
8487
+ },
8488
+ {
8489
+ type: 'Group',
8490
+ label: '尺寸',
8491
+ child: [
8492
+ {
8493
+ type: 'Number',
8494
+ name: ['props', 'buttonStyle', 'height'],
8495
+ addonAfter: 'H'
8496
+ }
8497
+ ]
8498
+ },
8499
+ {
8500
+ type: 'Group',
8501
+ label: '圆角',
8502
+ child: [
8503
+ {
8504
+ type: 'Slider',
8505
+ name: ['props', 'buttonStyle', 'borderRadius'],
8506
+ max: 100
8507
+ },
8508
+ {
8509
+ type: 'Number',
8510
+ name: ['props', 'buttonStyle', 'borderRadius'],
8511
+ addonAfter: 'px',
8512
+ max: 100
8513
+ }
8514
+ ]
8515
+ },
8516
+ {
8517
+ type: 'Group',
8518
+ label: '字体',
8519
+ child: [
8520
+ {
8521
+ type: 'Color',
8522
+ name: ['props', 'buttonStyle', 'color'],
8523
+ initialValue: '#fff'
8524
+ },
8525
+ {
8526
+ type: 'Select',
8527
+ name: ['props', 'buttonStyle', 'fontFamily'],
8528
+ options: [{ label: '黑体', value: '黑体' }]
8529
+ },
8530
+ {
8531
+ type: 'Number',
8532
+ name: ['props', 'buttonStyle', 'fontSize'],
8533
+ addonAfter: 'px'
8534
+ }
8535
+ ]
8536
+ },
8537
+ {
8538
+ type: 'TextStyle',
8539
+ name: ['props', 'buttonStyle']
8540
+ },
8541
+ {
8542
+ type: 'TextAlign',
8543
+ name: ['props', 'buttonStyle']
8544
+ },
8545
+ {
8546
+ type: 'TextSpace',
8547
+ name: ['props', 'buttonStyle']
8548
+ },
8549
+ {
8550
+ type: 'TextMargin',
8551
+ name: ['props', 'buttonStyle']
8552
+ }
8553
+ ]
8554
+ }
8555
+ ];
8556
+
8342
8557
  /*
8343
8558
  * @Author: binruan@chatlabs.com
8344
8559
  * @Date: 2023-11-02 18:34:34
8345
8560
  * @LastEditors: binruan@chatlabs.com
8346
- * @LastEditTime: 2024-03-14 17:03:04
8561
+ * @LastEditTime: 2024-04-02 10:33:15
8347
8562
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8348
8563
  *
8349
8564
  */
8350
8565
  const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8351
- const Modal = ({ visible, onClose, children, modalStyle, padding }) => {
8566
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
8567
+ const { popupAni } = useEditor();
8568
+ const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
8352
8569
  const [isShow, setIsShow] = React.useState(false);
8353
8570
  const modalEleRef = React.useRef(null);
8354
8571
  React.useEffect(() => {
@@ -8370,16 +8587,16 @@
8370
8587
  else {
8371
8588
  setTimeout(() => {
8372
8589
  setIsShow(false);
8373
- }, 1200);
8590
+ }, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
8374
8591
  }
8375
- }, [visible]);
8592
+ }, [visible, cssAni]);
8376
8593
  if (!modalEleRef.current)
8377
8594
  return null;
8378
8595
  const handleClose = lodash.debounce(() => {
8379
8596
  onClose === null || onClose === void 0 ? void 0 : onClose();
8380
8597
  }, 300);
8381
8598
  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 },
8382
- React.createElement("div", { className: `modal-container ${visible ? 'modal-popIn' : 'modal-popOut'}`, style: { padding }, onClick: (e) => {
8599
+ 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) => {
8383
8600
  e.stopPropagation();
8384
8601
  e.preventDefault();
8385
8602
  } },
@@ -8393,7 +8610,7 @@
8393
8610
  * @Author: binruan@chatlabs.com
8394
8611
  * @Date: 2023-12-26 16:11:34
8395
8612
  * @LastEditors: binruan@chatlabs.com
8396
- * @LastEditTime: 2024-03-14 11:19:03
8613
+ * @LastEditTime: 2024-04-02 10:57:30
8397
8614
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
8398
8615
  *
8399
8616
  */
@@ -8415,7 +8632,7 @@
8415
8632
  const _words = newWords.length > 1 && newWords.length < words.length ? newWords.slice(0, newWords.length - 1) : newWords;
8416
8633
  return _words.join(' ') + ' ';
8417
8634
  };
8418
- const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText }) => {
8635
+ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText, isPost }) => {
8419
8636
  const [isShowMore, setIsShowMore] = React.useState(true);
8420
8637
  const [isShow, setIsShow] = React.useState(false);
8421
8638
  const lineClamp = Number((style === null || style === void 0 ? void 0 : style.lineClamp) || 2);
@@ -8427,19 +8644,26 @@
8427
8644
  return !isShowMore && text.length > maxStr ? limitTextLastWholeWord(text, maxStr) + '...' : text;
8428
8645
  }, [text, maxStr, isShowMore]);
8429
8646
  React.useEffect(() => {
8430
- if (multiRow.current) {
8647
+ if (multiRow.current && isPost) {
8431
8648
  setIsShowMore(true);
8432
8649
  setTimeout(() => {
8650
+ var _a;
8433
8651
  setIsShow(false);
8434
- const height = parseInt(getComputedStyle(multiRow.current).height);
8435
- const lineHeight = parseInt(getComputedStyle(multiRow === null || multiRow === void 0 ? void 0 : multiRow.current).lineHeight);
8436
- if (text && height > lineHeight * lineClamp) {
8437
- setIsShowMore(false);
8438
- setIsShow(true);
8652
+ try {
8653
+ const cs = (_a = window === null || window === void 0 ? void 0 : window.getComputedStyle) === null || _a === void 0 ? void 0 : _a.call(window, multiRow.current);
8654
+ const height = parseFloat(cs === null || cs === void 0 ? void 0 : cs.height);
8655
+ const lh = parseFloat(cs === null || cs === void 0 ? void 0 : cs.lineHeight);
8656
+ const fs = parseFloat(cs === null || cs === void 0 ? void 0 : cs.fontSize) + 4;
8657
+ const lineHeight = isNaN(lh) ? fs : lh;
8658
+ if (text && height > lineHeight * lineClamp) {
8659
+ setIsShowMore(false);
8660
+ setIsShow(true);
8661
+ }
8439
8662
  }
8663
+ catch (_b) { }
8440
8664
  }, 100);
8441
8665
  }
8442
- }, [multiRow, text, lineClamp, style]);
8666
+ }, [multiRow, text, lineClamp, style, isPost]);
8443
8667
  return (React.createElement("div", { className: className, style: Object.assign({}, style) },
8444
8668
  React.createElement("div", { ref: multiRow, style: {
8445
8669
  overflow: 'hidden',
@@ -8448,14 +8672,14 @@
8448
8672
  display: '-webkit-box',
8449
8673
  WebkitBoxOrient: 'vertical',
8450
8674
  wordBreak: 'break-word'
8451
- } }, text),
8675
+ }, dangerouslySetInnerHTML: { __html: text ? text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>') : React.createElement(React.Fragment, null) } }),
8452
8676
  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'))));
8453
8677
  };
8454
8678
  var ExpandableText$1 = React.memo(ExpandableText);
8455
8679
 
8456
8680
  const CommodityDetailDiroNew$1 = (_a) => {
8457
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
8458
- var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText"]);
8681
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8682
+ 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"]);
8459
8683
  React.useState(true);
8460
8684
  const { sxpParameter } = useSxpDataSource();
8461
8685
  const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = useSxpDataSource();
@@ -8502,14 +8726,22 @@
8502
8726
  }
8503
8727
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8504
8728
  const width = isPreview ? 375 : window.innerWidth;
8729
+ const productInfoText = () => {
8730
+ return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8731
+ 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) ||
8732
+ `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
8733
+ Made in Italy` })));
8734
+ };
8505
8735
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
8506
8736
  React.createElement("div", Object.assign({ ref: scrollRef, className: css.css(Object.assign({}, style)) }, props),
8507
8737
  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: {
8508
8738
  clickable: true,
8509
8739
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
8510
- clickableClass: 'commondityDiroNew-swiper-clickable'
8740
+ clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
8741
+ ? 'commondityDiroNew-swiper-clickable-left'
8742
+ : 'commondityDiroNew-swiper-clickable-center'
8511
8743
  }, loop: true, autoplay: {
8512
- delay: 3000
8744
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8513
8745
  } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8514
8746
  return (React.createElement(SwiperSlide, { key: src },
8515
8747
  React.createElement("div", { style: {
@@ -8535,29 +8767,65 @@
8535
8767
  }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8536
8768
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
8537
8769
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
8538
- 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'),
8539
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText)),
8540
- 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'),
8541
- (!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')),
8542
- 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) ||
8543
- `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
8544
- Made in Italy` })) : (React.createElement("div", { className: 'pb-commondityDiroNew-info' }, (product === null || product === void 0 ? void 0 : product.info) ||
8545
- `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
8546
- Made in Italy`))))),
8547
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
8548
- 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) ||
8549
- `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
8550
- Made in Italy`))));
8770
+ 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'),
8771
+ React.createElement("div", { className: '' },
8772
+ 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),
8773
+ 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 : '税费'))),
8774
+ 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'),
8775
+ (!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')),
8776
+ productInfoText())),
8777
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText())));
8551
8778
  };
8552
- var CommodityDetailDiroNew$2 = React.memo(CommodityDetailDiroNew$1);
8779
+ var CommodityDetailDiroNewComponent = React.memo(CommodityDetailDiroNew$1);
8553
8780
 
8554
- const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNew$2, {
8781
+ /*
8782
+ * @Author: binruan@chatlabs.com
8783
+ * @Date: 2024-03-20 10:27:31
8784
+ * @LastEditors: binruan@chatlabs.com
8785
+ * @LastEditTime: 2024-03-28 16:05:12
8786
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\material.tsx
8787
+ *
8788
+ */
8789
+ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
8555
8790
  displayName: '商品详情',
8556
8791
  icon: '',
8557
8792
  category: 'popup',
8558
8793
  type: 'CommodityDetailDiroNew',
8794
+ related: {
8795
+ settingRender: settingRender$1
8796
+ },
8559
8797
  defaulSetting: {
8560
- props: {},
8798
+ props: {
8799
+ swiper: {
8800
+ dotsAlign: 'left',
8801
+ delay: 3
8802
+ },
8803
+ commodityStyles: {
8804
+ price: {
8805
+ color: '#000',
8806
+ fontWeight: 'bold',
8807
+ fontSize: 18
8808
+ },
8809
+ title: {
8810
+ color: '#000',
8811
+ fontSize: 13
8812
+ },
8813
+ collection: {
8814
+ color: '#757575',
8815
+ fontSize: 13
8816
+ },
8817
+ info: {
8818
+ color: '#757575',
8819
+ fontSize: 13
8820
+ },
8821
+ taxInfo: {
8822
+ color: '#000',
8823
+ fontWeight: 'bold',
8824
+ fontSize: 13,
8825
+ textAlign: 'right'
8826
+ }
8827
+ }
8828
+ },
8561
8829
  style: {}
8562
8830
  },
8563
8831
  w: 100,
@@ -8565,6 +8833,213 @@ Made in Italy`))));
8565
8833
  sort: 1
8566
8834
  });
8567
8835
 
8836
+ /*
8837
+ * @Author: binruan@chatlabs.com
8838
+ * @Date: 2024-03-26 16:50:25
8839
+ * @LastEditors: binruan@chatlabs.com
8840
+ * @LastEditTime: 2024-03-29 17:03:07
8841
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
8842
+ *
8843
+ */
8844
+ var settingRender = [
8845
+ {
8846
+ title: '主题样式',
8847
+ child: [
8848
+ {
8849
+ type: 'Group',
8850
+ label: '尺寸',
8851
+ child: [
8852
+ {
8853
+ type: 'Number',
8854
+ name: ['style', 'width'],
8855
+ addonAfter: 'W'
8856
+ },
8857
+ {
8858
+ type: 'Number',
8859
+ name: ['style', 'height'],
8860
+ addonAfter: 'H'
8861
+ }
8862
+ ]
8863
+ },
8864
+ {
8865
+ type: 'Group',
8866
+ label: '圆角',
8867
+ child: [
8868
+ {
8869
+ type: 'Slider',
8870
+ name: ['style', 'borderRadius'],
8871
+ max: 100
8872
+ },
8873
+ {
8874
+ type: 'Number',
8875
+ name: ['style', 'borderRadius'],
8876
+ addonAfter: 'px',
8877
+ max: 100
8878
+ }
8879
+ ]
8880
+ },
8881
+ {
8882
+ type: 'Color',
8883
+ label: '背景色',
8884
+ name: ['style', 'backgroundColor']
8885
+ },
8886
+ {
8887
+ label: '内边距',
8888
+ type: 'Number',
8889
+ name: ['style', 'padding'],
8890
+ addonAfter: 'px'
8891
+ },
8892
+ {
8893
+ label: '与Post描述边距',
8894
+ type: 'Number',
8895
+ name: ['style', 'marginBottom'],
8896
+ addonAfter: 'px'
8897
+ }
8898
+ ]
8899
+ },
8900
+ {
8901
+ title: '商品图片',
8902
+ child: [
8903
+ {
8904
+ type: 'Group',
8905
+ label: '尺寸',
8906
+ child: [
8907
+ {
8908
+ type: 'Number',
8909
+ name: ['props', 'ctaTempStyles', 'img', 'width'],
8910
+ addonAfter: 'W'
8911
+ },
8912
+ {
8913
+ type: 'Number',
8914
+ name: ['props', 'ctaTempStyles', 'img', 'height'],
8915
+ addonAfter: 'H'
8916
+ }
8917
+ ]
8918
+ },
8919
+ {
8920
+ type: 'Group',
8921
+ label: '圆角',
8922
+ child: [
8923
+ {
8924
+ type: 'Slider',
8925
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
8926
+ max: 100
8927
+ },
8928
+ {
8929
+ type: 'Number',
8930
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
8931
+ addonAfter: 'px',
8932
+ max: 100
8933
+ }
8934
+ ]
8935
+ },
8936
+ {
8937
+ type: 'Number',
8938
+ label: '与右侧边距',
8939
+ addonAfter: 'px',
8940
+ name: ['props', 'ctaTempStyles', 'img', 'marginRight']
8941
+ }
8942
+ ]
8943
+ },
8944
+ {
8945
+ title: '商品标题文本',
8946
+ type: 'commodityTitle',
8947
+ child: [
8948
+ {
8949
+ type: 'Group',
8950
+ label: '字体',
8951
+ child: [
8952
+ {
8953
+ type: 'Color',
8954
+ name: ['props', 'ctaTempStyles', 'title', 'color']
8955
+ },
8956
+ {
8957
+ type: 'Select',
8958
+ options: [{ label: '黑体', value: '黑体' }],
8959
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily']
8960
+ },
8961
+ {
8962
+ type: 'Number',
8963
+ addonAfter: 'px',
8964
+ name: ['props', 'ctaTempStyles', 'title', 'fontSize']
8965
+ }
8966
+ ]
8967
+ },
8968
+ {
8969
+ label: '样式',
8970
+ type: 'TextStyle',
8971
+ name: ['props', 'ctaTempStyles', 'title']
8972
+ },
8973
+ {
8974
+ label: '对齐',
8975
+ type: 'TextAlign',
8976
+ name: ['props', 'ctaTempStyles', 'title']
8977
+ },
8978
+ {
8979
+ label: '间距',
8980
+ type: 'TextSpace',
8981
+ name: ['props', 'ctaTempStyles', 'title']
8982
+ }
8983
+ ]
8984
+ },
8985
+ {
8986
+ title: 'CTA标题',
8987
+ child: [
8988
+ {
8989
+ type: 'Group',
8990
+ label: '尺寸',
8991
+ child: [
8992
+ {
8993
+ type: 'Number',
8994
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'width'],
8995
+ addonAfter: 'W'
8996
+ },
8997
+ {
8998
+ type: 'Number',
8999
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'height'],
9000
+ addonAfter: 'H'
9001
+ }
9002
+ ]
9003
+ },
9004
+ {
9005
+ type: 'Color',
9006
+ label: '背景色',
9007
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'backgroundColor']
9008
+ },
9009
+ {
9010
+ type: 'Group',
9011
+ label: '字体',
9012
+ child: [
9013
+ {
9014
+ type: 'Color',
9015
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
9016
+ },
9017
+ {
9018
+ type: 'Select',
9019
+ options: [{ label: '黑体', value: '黑体' }],
9020
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily']
9021
+ },
9022
+ {
9023
+ type: 'Number',
9024
+ addonAfter: 'px',
9025
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
9026
+ }
9027
+ ]
9028
+ },
9029
+ {
9030
+ label: '样式',
9031
+ type: 'TextStyle',
9032
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
9033
+ },
9034
+ {
9035
+ label: '对齐',
9036
+ type: 'TextAlign',
9037
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
9038
+ }
9039
+ ]
9040
+ }
9041
+ ];
9042
+
8568
9043
  var interactionRender$6 = [
8569
9044
  {
8570
9045
  title: '点击事件',
@@ -8605,9 +9080,10 @@ Made in Italy`))));
8605
9080
  }
8606
9081
 
8607
9082
  const EventProvider = (_a) => {
8608
- var { rec, children, className, onClick } = _a; __rest(_a, ["rec", "children", "className", "onClick"]);
9083
+ var { rec, children, className, onClick, style } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style"]);
8609
9084
  const ref = React.useRef(null);
8610
9085
  const isOnScreen = useOnScreen(ref);
9086
+ const { popupAni } = useEditor();
8611
9087
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
8612
9088
  React.useEffect(() => {
8613
9089
  var _a, _b;
@@ -8628,8 +9104,8 @@ Made in Italy`))));
8628
9104
  }, rec, item);
8629
9105
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
8630
9106
  onClick === null || onClick === void 0 ? void 0 : onClick();
8631
- }, 1200);
8632
- return (React.createElement("div", { ref: ref, className: className, onClick: handleClick }, children));
9107
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9108
+ return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
8633
9109
  };
8634
9110
  var EventProvider$1 = React.memo(EventProvider);
8635
9111
 
@@ -8637,20 +9113,12 @@ Made in Italy`))));
8637
9113
 
8638
9114
  const Commodity$1 = (_a) => {
8639
9115
  var _b, _c, _d, _e, _f, _g, _h;
8640
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9116
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8641
9117
  const { sxpParameter } = useSxpDataSource();
8642
9118
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8643
9119
  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;
8644
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
8645
- React.createElement("div", { className: css.css({
8646
- width: '60px',
8647
- height: '60px',
8648
- marginRight: '8px',
8649
- borderRadius: '3px',
8650
- overflow: 'hidden',
8651
- flexShrink: 0,
8652
- backgroundColor: '#f2f2f2'
8653
- }) },
9120
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9121
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8654
9122
  React.createElement("img", { className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
8655
9123
  React.createElement("div", { className: css.css({
8656
9124
  color: '#fff',
@@ -8660,20 +9128,19 @@ Made in Italy`))));
8660
9128
  width: '100%',
8661
9129
  overflow: 'hidden'
8662
9130
  }) },
8663
- 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'),
8664
- React.createElement("div", { className: css.css({
8665
- background: 'rgba(0,0,0,.5)',
8666
- fontSize: '10px',
8667
- padding: '2px 7px',
8668
- width: 'auto',
8669
- textAlign: 'center',
8670
- textOverflow: 'ellipsis',
8671
- overflow: 'hidden',
8672
- whiteSpace: 'nowrap'
8673
- }) }, (_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'))));
9131
+ 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'),
9132
+ 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'))));
8674
9133
  };
8675
9134
  var CommodityComponent = React.memo(Commodity$1);
8676
9135
 
9136
+ /*
9137
+ * @Author: binruan@chatlabs.com
9138
+ * @Date: 2023-07-28 18:29:57
9139
+ * @LastEditors: binruan@chatlabs.com
9140
+ * @LastEditTime: 2024-03-29 16:39:54
9141
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Commodity\material.tsx
9142
+ *
9143
+ */
8677
9144
  const Commodity = createMaterial(CommodityComponent, {
8678
9145
  displayName: '推荐单商品-透明底',
8679
9146
  icon: '',
@@ -8681,15 +9148,39 @@ Made in Italy`))));
8681
9148
  type: 'Commodity',
8682
9149
  related: {
8683
9150
  interactionRender: interactionRender$6,
8684
- bindableProps: []
9151
+ bindableProps: [],
9152
+ settingRender
8685
9153
  },
8686
9154
  defaulSetting: {
8687
- props: {},
9155
+ props: {
9156
+ ctaTempStyles: {
9157
+ img: {
9158
+ borderRadius: 3,
9159
+ width: 60,
9160
+ height: 60,
9161
+ marginRight: 8
9162
+ },
9163
+ title: {
9164
+ fontSize: 12,
9165
+ color: '#fff',
9166
+ textAlign: 'left'
9167
+ },
9168
+ ctaTitle: {
9169
+ fontSize: 10,
9170
+ color: '#fff',
9171
+ textAlign: 'center',
9172
+ width: 130,
9173
+ height: 20,
9174
+ backgroundColor: 'rgba(0,0,0,.5)'
9175
+ }
9176
+ }
9177
+ },
8688
9178
  style: {
8689
- padding: '7px',
8690
- display: 'flex',
8691
- background: 'rgba(0,0,0,.3)',
8692
- borderRadius: '3px'
9179
+ padding: 7,
9180
+ width: 236,
9181
+ height: 74,
9182
+ borderRadius: 3,
9183
+ backgroundColor: 'rgba(0,0,0,.3)'
8693
9184
  }
8694
9185
  },
8695
9186
  w: 100,
@@ -8711,30 +9202,24 @@ Made in Italy`))));
8711
9202
 
8712
9203
  const Appoint$1 = (_a) => {
8713
9204
  var _b, _c, _d, _e;
8714
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9205
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8715
9206
  const { sxpParameter } = useSxpDataSource();
8716
9207
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
8717
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
8718
- React.createElement("div", { className: css.css({
8719
- width: '30px',
8720
- height: '30px',
8721
- marginRight: '8px',
8722
- borderRadius: '3px',
8723
- overflow: 'hidden',
8724
- flexShrink: 0,
8725
- backgroundColor: '#f2f2f2'
8726
- }) },
9208
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
9209
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8727
9210
  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: '' })),
8728
- React.createElement("div", { className: css.css({
8729
- color: '#fff',
8730
- width: '100%',
8731
- overflow: 'hidden',
8732
- fontSize: '12px',
8733
- textOverflow: 'ellipsis'
8734
- }) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
9211
+ 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')));
8735
9212
  };
8736
9213
  var AppointComponent = React.memo(Appoint$1);
8737
9214
 
9215
+ /*
9216
+ * @Author: binruan@chatlabs.com
9217
+ * @Date: 2023-07-28 18:29:57
9218
+ * @LastEditors: binruan@chatlabs.com
9219
+ * @LastEditTime: 2024-03-29 17:03:49
9220
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Appoint\material.tsx
9221
+ *
9222
+ */
8738
9223
  const Appoint = createMaterial(AppointComponent, {
8739
9224
  displayName: '预约表单',
8740
9225
  icon: '',
@@ -8742,18 +9227,33 @@ Made in Italy`))));
8742
9227
  type: 'Appoint',
8743
9228
  related: {
8744
9229
  interactionRender: interactionRender$5,
9230
+ settingRender: settingRender === null || settingRender === void 0 ? void 0 : settingRender.filter((i) => i.type !== 'commodityTitle'),
8745
9231
  bindableProps: []
8746
9232
  },
8747
9233
  defaulSetting: {
8748
9234
  props: {
8749
- content: '按钮'
9235
+ ctaTempStyles: {
9236
+ img: {
9237
+ borderRadius: 3,
9238
+ width: 30,
9239
+ height: 30,
9240
+ marginRight: 8
9241
+ },
9242
+ ctaTitle: {
9243
+ fontSize: 12,
9244
+ color: '#fff',
9245
+ textAlign: 'left',
9246
+ width: 130,
9247
+ height: 20
9248
+ }
9249
+ }
8750
9250
  },
8751
9251
  style: {
8752
- padding: '7px',
8753
- display: 'flex',
8754
- alignItems: 'center',
8755
- background: 'rgba(0,0,0,.3)',
8756
- borderRadius: '3px'
9252
+ padding: 7,
9253
+ width: 236,
9254
+ height: 44,
9255
+ borderRadius: 3,
9256
+ backgroundColor: 'rgba(0,0,0,.3)'
8757
9257
  }
8758
9258
  },
8759
9259
  w: 100,
@@ -8765,7 +9265,7 @@ Made in Italy`))));
8765
9265
 
8766
9266
  const Link$1 = (_a) => {
8767
9267
  var _b, _c, _d, _e, _f;
8768
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9268
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8769
9269
  const { sxpParameter, bffEventReport } = useSxpDataSource();
8770
9270
  const { jumpToWeb } = useEventReport();
8771
9271
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
@@ -8776,45 +9276,60 @@ Made in Italy`))));
8776
9276
  window.location.href = window.getJointUtmLink(cta.link);
8777
9277
  }
8778
9278
  };
8779
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props, { onClick: handleTo }),
8780
- React.createElement("div", { className: css.css({
8781
- width: '60px',
8782
- height: '60px',
8783
- marginRight: '8px',
8784
- borderRadius: '3px',
8785
- backgroundColor: '#f2f2f2',
8786
- overflow: 'hidden',
8787
- flexShrink: 0
8788
- }) },
9279
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
9280
+ React.createElement("div", { className: css.css(Object.assign({ backgroundColor: '#f2f2f2', overflow: 'hidden', flexShrink: 0 }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8789
9281
  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: '' })),
8790
9282
  React.createElement("div", { className: css.css({
8791
- color: '#fff',
8792
9283
  display: 'flex',
8793
9284
  alignItems: 'center',
8794
9285
  width: '100%',
8795
9286
  overflow: 'hidden'
8796
9287
  }) },
8797
- 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'))));
9288
+ 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'))));
8798
9289
  };
8799
9290
  var LinkComponent = React.memo(Link$1);
8800
9291
 
9292
+ /*
9293
+ * @Author: binruan@chatlabs.com
9294
+ * @Date: 2023-07-28 18:29:57
9295
+ * @LastEditors: binruan@chatlabs.com
9296
+ * @LastEditTime: 2024-03-29 17:04:57
9297
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\material.tsx
9298
+ *
9299
+ */
8801
9300
  const Link = createMaterial(LinkComponent, {
8802
9301
  displayName: '跳转指引',
8803
9302
  icon: '',
8804
9303
  category: 'template',
8805
9304
  type: 'Link',
8806
9305
  related: {
9306
+ settingRender: settingRender === null || settingRender === void 0 ? void 0 : settingRender.filter((i) => i.type !== 'commodityTitle'),
8807
9307
  bindableProps: []
8808
9308
  },
8809
9309
  defaulSetting: {
8810
9310
  props: {
8811
- content: '按钮'
9311
+ ctaTempStyles: {
9312
+ img: {
9313
+ borderRadius: 3,
9314
+ width: 60,
9315
+ height: 60,
9316
+ marginRight: 8
9317
+ },
9318
+ ctaTitle: {
9319
+ fontSize: 12,
9320
+ color: '#fff',
9321
+ textAlign: 'left',
9322
+ width: 130,
9323
+ height: 20
9324
+ }
9325
+ }
8812
9326
  },
8813
9327
  style: {
8814
- padding: '7px',
8815
- display: 'flex',
8816
- background: 'rgba(0,0,0,.3)',
8817
- borderRadius: '3px'
9328
+ padding: 7,
9329
+ width: 236,
9330
+ height: 74,
9331
+ borderRadius: 3,
9332
+ backgroundColor: 'rgba(0,0,0,.3)'
8818
9333
  }
8819
9334
  },
8820
9335
  w: 100,
@@ -8838,20 +9353,12 @@ Made in Italy`))));
8838
9353
 
8839
9354
  const CommodityDiro$1 = (_a) => {
8840
9355
  var _b, _c, _d, _e, _f, _g, _h;
8841
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9356
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8842
9357
  const { sxpParameter } = useSxpDataSource();
8843
9358
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8844
9359
  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;
8845
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign(Object.assign({}, style), { maxWidth: '236px', width: '100%' })) }, props),
8846
- React.createElement("div", { className: css.css({
8847
- width: '60px',
8848
- height: '60px',
8849
- marginRight: '8px',
8850
- borderRadius: '3px',
8851
- overflow: 'hidden',
8852
- flexShrink: 0,
8853
- backgroundColor: '#f2f2f2'
8854
- }) },
9360
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9361
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8855
9362
  React.createElement("img", { className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
8856
9363
  React.createElement("div", { className: css.css({
8857
9364
  color: '#fff',
@@ -8861,22 +9368,19 @@ Made in Italy`))));
8861
9368
  width: '100%',
8862
9369
  overflow: 'hidden'
8863
9370
  }) },
8864
- 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'),
8865
- React.createElement("div", { className: css.css({
8866
- background: 'rgba(0,0,0,1)',
8867
- fontSize: '10px',
8868
- padding: '2px 7px',
8869
- textAlign: 'center',
8870
- textOverflow: 'ellipsis',
8871
- overflow: 'hidden',
8872
- borderRadius: '25px',
8873
- width: 'fit-content',
8874
- maxWidth: '100%',
8875
- whiteSpace: 'nowrap'
8876
- }) }, (_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'))));
9371
+ 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'),
9372
+ 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'))));
8877
9373
  };
8878
9374
  var CommodityDiroComponent = React.memo(CommodityDiro$1);
8879
9375
 
9376
+ /*
9377
+ * @Author: binruan@chatlabs.com
9378
+ * @Date: 2023-07-28 18:29:57
9379
+ * @LastEditors: binruan@chatlabs.com
9380
+ * @LastEditTime: 2024-03-29 16:07:28
9381
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiro\material.tsx
9382
+ *
9383
+ */
8880
9384
  const CommodityDiro = createMaterial(CommodityDiroComponent, {
8881
9385
  displayName: '推荐单商品-白底圆角按钮',
8882
9386
  icon: '',
@@ -8884,15 +9388,39 @@ Made in Italy`))));
8884
9388
  type: 'CommodityDiro',
8885
9389
  related: {
8886
9390
  interactionRender: interactionRender$4,
9391
+ settingRender,
8887
9392
  bindableProps: []
8888
9393
  },
8889
9394
  defaulSetting: {
8890
- props: {},
9395
+ props: {
9396
+ ctaTempStyles: {
9397
+ img: {
9398
+ borderRadius: 3,
9399
+ width: 60,
9400
+ height: 60,
9401
+ marginRight: 8
9402
+ },
9403
+ title: {
9404
+ fontSize: 12,
9405
+ color: '#000',
9406
+ textAlign: 'left'
9407
+ },
9408
+ ctaTitle: {
9409
+ fontSize: 10,
9410
+ color: '#fff',
9411
+ textAlign: 'center',
9412
+ width: 80,
9413
+ height: 20,
9414
+ backgroundColor: 'rgba(0,0,0,1)'
9415
+ }
9416
+ }
9417
+ },
8891
9418
  style: {
8892
- padding: '7px',
8893
- display: 'flex',
8894
- borderRadius: '3px',
8895
- background: '#fff'
9419
+ padding: 7,
9420
+ width: 236,
9421
+ height: 74,
9422
+ borderRadius: 3,
9423
+ backgroundColor: '#fff'
8896
9424
  }
8897
9425
  },
8898
9426
  w: 100,
@@ -8916,20 +9444,12 @@ Made in Italy`))));
8916
9444
 
8917
9445
  const CommodityDiroNew$1 = (_a) => {
8918
9446
  var _b, _c, _d, _e, _f, _g, _h;
8919
- var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
9447
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
8920
9448
  const { sxpParameter } = useSxpDataSource();
8921
9449
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8922
9450
  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;
8923
- 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),
8924
- React.createElement("div", { className: css.css({
8925
- width: '78px',
8926
- height: '78px',
8927
- marginRight: '16px',
8928
- borderRadius: '8px',
8929
- overflow: 'hidden',
8930
- flexShrink: 0,
8931
- backgroundColor: '#f2f2f2'
8932
- }) },
9451
+ return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
9452
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
8933
9453
  React.createElement("img", { className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
8934
9454
  React.createElement("div", { className: css.css({
8935
9455
  color: '#fff',
@@ -8939,22 +9459,19 @@ Made in Italy`))));
8939
9459
  width: '100%',
8940
9460
  overflow: 'hidden'
8941
9461
  }) },
8942
- 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'),
8943
- React.createElement("div", { className: css.css({
8944
- fontSize: '13px',
8945
- fontWeight: 'bold',
8946
- textOverflow: 'ellipsis',
8947
- overflow: 'hidden',
8948
- width: 'fit-content',
8949
- maxWidth: '100%',
8950
- whiteSpace: 'nowrap',
8951
- textDecoration: 'underline',
8952
- color: '#000',
8953
- lineHeight: '20px'
8954
- }) }, (_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'))));
9462
+ 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'),
9463
+ 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'))));
8955
9464
  };
8956
9465
  var CommodityDiroNewComponent = React.memo(CommodityDiroNew$1);
8957
9466
 
9467
+ /*
9468
+ * @Author: binruan@chatlabs.com
9469
+ * @Date: 2023-07-28 18:29:57
9470
+ * @LastEditors: binruan@chatlabs.com
9471
+ * @LastEditTime: 2024-03-29 11:56:56
9472
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\CommodityDiroNew\material.tsx
9473
+ *
9474
+ */
8958
9475
  const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
8959
9476
  displayName: '推荐单商品-白底下划线按钮',
8960
9477
  icon: '',
@@ -8962,15 +9479,40 @@ Made in Italy`))));
8962
9479
  type: 'CommodityDiroNew',
8963
9480
  related: {
8964
9481
  interactionRender: interactionRender$3,
8965
- bindableProps: []
9482
+ bindableProps: [],
9483
+ settingRender
8966
9484
  },
8967
9485
  defaulSetting: {
8968
- props: {},
9486
+ props: {
9487
+ ctaTempStyles: {
9488
+ img: {
9489
+ borderRadius: 8,
9490
+ width: 78,
9491
+ height: 78,
9492
+ marginRight: 16
9493
+ },
9494
+ title: {
9495
+ fontSize: 12,
9496
+ color: '#000',
9497
+ textAlign: 'left'
9498
+ },
9499
+ ctaTitle: {
9500
+ textDecoration: 'underline',
9501
+ fontSize: 12,
9502
+ fontWeight: 'bold',
9503
+ color: '#000',
9504
+ textAlign: 'left',
9505
+ width: 150,
9506
+ height: 20
9507
+ }
9508
+ }
9509
+ },
8969
9510
  style: {
8970
- padding: '7px',
8971
- display: 'flex',
8972
- borderRadius: '3px',
8973
- background: '#fff'
9511
+ borderRadius: 4,
9512
+ width: 260,
9513
+ height: 86,
9514
+ padding: 4,
9515
+ backgroundColor: 'rgba(255,255,255,0.75)'
8974
9516
  }
8975
9517
  },
8976
9518
  w: 100,
@@ -9023,8 +9565,9 @@ Made in Italy`))));
9023
9565
 
9024
9566
  const MultiCommodityDiro$1 = (_a) => {
9025
9567
  var _b, _c;
9026
- var { content, style, bgImg, recData, onClick, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image"]);
9568
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9027
9569
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9570
+ const { popupAni } = useEditor();
9028
9571
  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]);
9029
9572
  const handleClick = lodash.throttle((item) => {
9030
9573
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -9033,19 +9576,11 @@ Made in Italy`))));
9033
9576
  }, recData, item);
9034
9577
  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 }) }));
9035
9578
  onClick === null || onClick === void 0 ? void 0 : onClick();
9036
- }, 1200);
9579
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9037
9580
  return (React.createElement(Scroll$1, null, products === null || products === void 0 ? void 0 : products.map((item) => {
9038
9581
  var _a, _b, _c, _d, _e, _f;
9039
- 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) }),
9040
- React.createElement("div", { className: css.css({
9041
- width: '60px',
9042
- height: '60px',
9043
- marginRight: '8px',
9044
- borderRadius: '3px',
9045
- overflow: 'hidden',
9046
- flexShrink: 0,
9047
- backgroundColor: '#f2f2f2'
9048
- }) },
9582
+ 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) }),
9583
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9049
9584
  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 })),
9050
9585
  React.createElement("div", { className: css.css({
9051
9586
  color: '#000',
@@ -9055,24 +9590,20 @@ Made in Italy`))));
9055
9590
  width: '100%',
9056
9591
  overflow: 'hidden'
9057
9592
  }) },
9058
- 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'),
9059
- React.createElement("div", { className: css.css({
9060
- background: 'rgba(0,0,0,1)',
9061
- fontSize: '10px',
9062
- padding: '2px 7px',
9063
- textAlign: 'center',
9064
- textOverflow: 'ellipsis',
9065
- overflow: 'hidden',
9066
- borderRadius: '25px',
9067
- width: 'fit-content',
9068
- maxWidth: '100%',
9069
- color: '#fff',
9070
- whiteSpace: 'nowrap'
9071
- }) }, (_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'))));
9593
+ 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'),
9594
+ 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'))));
9072
9595
  })));
9073
9596
  };
9074
9597
  var MultiCommodityDiroComponent = React.memo(MultiCommodityDiro$1);
9075
9598
 
9599
+ /*
9600
+ * @Author: binruan@chatlabs.com
9601
+ * @Date: 2023-07-28 18:29:57
9602
+ * @LastEditors: binruan@chatlabs.com
9603
+ * @LastEditTime: 2024-03-29 16:27:22
9604
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiro\material.tsx
9605
+ *
9606
+ */
9076
9607
  const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
9077
9608
  displayName: '推荐多商品-白底圆角按钮',
9078
9609
  icon: '',
@@ -9080,15 +9611,39 @@ Made in Italy`))));
9080
9611
  type: 'MultiCommodityDiro',
9081
9612
  related: {
9082
9613
  interactionRender: interactionRender$2,
9083
- bindableProps: []
9614
+ bindableProps: [],
9615
+ settingRender
9084
9616
  },
9085
9617
  defaulSetting: {
9086
- props: {},
9618
+ props: {
9619
+ ctaTempStyles: {
9620
+ img: {
9621
+ borderRadius: 3,
9622
+ width: 60,
9623
+ height: 60,
9624
+ marginRight: 8
9625
+ },
9626
+ title: {
9627
+ fontSize: 12,
9628
+ color: '#000',
9629
+ textAlign: 'left'
9630
+ },
9631
+ ctaTitle: {
9632
+ fontSize: 10,
9633
+ color: '#fff',
9634
+ textAlign: 'center',
9635
+ width: 80,
9636
+ height: 20,
9637
+ backgroundColor: 'rgba(0,0,0,1)'
9638
+ }
9639
+ }
9640
+ },
9087
9641
  style: {
9088
- padding: '7px',
9089
- display: 'flex',
9090
- background: '#fff',
9091
- borderRadius: '3px'
9642
+ padding: 7,
9643
+ width: 236,
9644
+ height: 74,
9645
+ borderRadius: 3,
9646
+ backgroundColor: '#fff'
9092
9647
  }
9093
9648
  },
9094
9649
  w: 100,
@@ -9112,9 +9667,10 @@ Made in Italy`))));
9112
9667
 
9113
9668
  const MultiCommodity$1 = (_a) => {
9114
9669
  var _b, _c;
9115
- var { content, style, bgImg, recData, onClick, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image"]);
9670
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9116
9671
  const { sxpParameter } = useSxpDataSource();
9117
9672
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9673
+ const { popupAni } = useEditor();
9118
9674
  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]);
9119
9675
  const handleClick = lodash.throttle((item) => {
9120
9676
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -9123,19 +9679,11 @@ Made in Italy`))));
9123
9679
  }, recData, item);
9124
9680
  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 }) }));
9125
9681
  onClick === null || onClick === void 0 ? void 0 : onClick();
9126
- }, 1200);
9682
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9127
9683
  return (React.createElement(Scroll$1, null, products === null || products === void 0 ? void 0 : products.map((item) => {
9128
9684
  var _a, _b, _c, _d, _e, _f;
9129
- 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) }),
9130
- React.createElement("div", { className: css.css({
9131
- width: '60px',
9132
- height: '60px',
9133
- marginRight: '8px',
9134
- borderRadius: '3px',
9135
- overflow: 'hidden',
9136
- flexShrink: 0,
9137
- backgroundColor: '#f2f2f2'
9138
- }) },
9685
+ 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) }),
9686
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9139
9687
  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 })),
9140
9688
  React.createElement("div", { className: css.css({
9141
9689
  color: '#fff',
@@ -9145,21 +9693,20 @@ Made in Italy`))));
9145
9693
  width: '100%',
9146
9694
  overflow: 'hidden'
9147
9695
  }) },
9148
- 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'),
9149
- React.createElement("div", { className: css.css({
9150
- background: 'rgba(0,0,0,.5)',
9151
- fontSize: '10px',
9152
- padding: '2px 7px',
9153
- width: 'auto',
9154
- textAlign: 'center',
9155
- textOverflow: 'ellipsis',
9156
- overflow: 'hidden',
9157
- whiteSpace: 'nowrap'
9158
- }) }, (_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'))));
9696
+ 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'),
9697
+ 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'))));
9159
9698
  })));
9160
9699
  };
9161
9700
  var MultiCommodityComponent = React.memo(MultiCommodity$1);
9162
9701
 
9702
+ /*
9703
+ * @Author: binruan@chatlabs.com
9704
+ * @Date: 2023-07-28 18:29:57
9705
+ * @LastEditors: binruan@chatlabs.com
9706
+ * @LastEditTime: 2024-03-29 16:43:35
9707
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodity\material.tsx
9708
+ *
9709
+ */
9163
9710
  const MultiCommodity = createMaterial(MultiCommodityComponent, {
9164
9711
  displayName: '推荐多商品-透明底',
9165
9712
  icon: '',
@@ -9167,15 +9714,39 @@ Made in Italy`))));
9167
9714
  type: 'MultiCommodity',
9168
9715
  related: {
9169
9716
  interactionRender: interactionRender$1,
9717
+ settingRender,
9170
9718
  bindableProps: []
9171
9719
  },
9172
9720
  defaulSetting: {
9173
- props: {},
9721
+ props: {
9722
+ ctaTempStyles: {
9723
+ img: {
9724
+ borderRadius: 3,
9725
+ width: 60,
9726
+ height: 60,
9727
+ marginRight: 8
9728
+ },
9729
+ title: {
9730
+ fontSize: 12,
9731
+ color: '#fff',
9732
+ textAlign: 'left'
9733
+ },
9734
+ ctaTitle: {
9735
+ fontSize: 10,
9736
+ color: '#fff',
9737
+ textAlign: 'center',
9738
+ width: 130,
9739
+ height: 20,
9740
+ backgroundColor: 'rgba(0,0,0,.5)'
9741
+ }
9742
+ }
9743
+ },
9174
9744
  style: {
9175
- padding: '7px',
9176
- display: 'flex',
9177
- background: 'rgba(0,0,0,.3)',
9178
- borderRadius: '3px'
9745
+ padding: 7,
9746
+ width: 236,
9747
+ height: 74,
9748
+ borderRadius: 3,
9749
+ backgroundColor: 'rgba(0,0,0,.3)'
9179
9750
  }
9180
9751
  },
9181
9752
  w: 100,
@@ -9199,8 +9770,9 @@ Made in Italy`))));
9199
9770
 
9200
9771
  const MultiCommodityDiroNew$1 = (_a) => {
9201
9772
  var _b, _c;
9202
- var { content, style, bgImg, recData, onClick, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image"]);
9773
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles"]);
9203
9774
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9775
+ const { popupAni } = useEditor();
9204
9776
  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]);
9205
9777
  const handleClick = lodash.throttle((item) => {
9206
9778
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -9209,19 +9781,11 @@ Made in Italy`))));
9209
9781
  }, recData, item);
9210
9782
  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 }) }));
9211
9783
  onClick === null || onClick === void 0 ? void 0 : onClick();
9212
- }, 1200);
9784
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9213
9785
  return (React.createElement(Scroll$1, null, products === null || products === void 0 ? void 0 : products.map((item) => {
9214
9786
  var _a, _b, _c, _d, _e, _f;
9215
- 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) }),
9216
- React.createElement("div", { className: css.css({
9217
- width: '78px',
9218
- height: '78px',
9219
- marginRight: '16px',
9220
- borderRadius: '8px',
9221
- overflow: 'hidden',
9222
- flexShrink: 0,
9223
- backgroundColor: '#f2f2f2'
9224
- }) },
9787
+ 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) }),
9788
+ React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9225
9789
  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 })),
9226
9790
  React.createElement("div", { className: css.css({
9227
9791
  color: '#fff',
@@ -9232,22 +9796,20 @@ Made in Italy`))));
9232
9796
  overflow: 'hidden',
9233
9797
  lineHeight: '20px'
9234
9798
  }) },
9235
- 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'),
9236
- React.createElement("div", { className: css.css({
9237
- fontSize: '13px',
9238
- fontWeight: 'bold',
9239
- textOverflow: 'ellipsis',
9240
- overflow: 'hidden',
9241
- width: 'fit-content',
9242
- maxWidth: '100%',
9243
- whiteSpace: 'nowrap',
9244
- textDecoration: 'underline',
9245
- color: '#000'
9246
- }) }, (_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'))));
9799
+ 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'),
9800
+ 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'))));
9247
9801
  })));
9248
9802
  };
9249
9803
  var MultiCommodityDiroNewComponent = React.memo(MultiCommodityDiroNew$1);
9250
9804
 
9805
+ /*
9806
+ * @Author: binruan@chatlabs.com
9807
+ * @Date: 2023-07-28 18:29:57
9808
+ * @LastEditors: binruan@chatlabs.com
9809
+ * @LastEditTime: 2024-03-29 15:40:54
9810
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\MultiCommodityDiroNew\material.tsx
9811
+ *
9812
+ */
9251
9813
  const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
9252
9814
  displayName: '推荐多商品-白底下划线按钮',
9253
9815
  icon: '',
@@ -9255,15 +9817,40 @@ Made in Italy`))));
9255
9817
  type: 'MultiCommodityDiroNew',
9256
9818
  related: {
9257
9819
  interactionRender,
9258
- bindableProps: []
9820
+ bindableProps: [],
9821
+ settingRender
9259
9822
  },
9260
9823
  defaulSetting: {
9261
- props: {},
9824
+ props: {
9825
+ ctaTempStyles: {
9826
+ img: {
9827
+ borderRadius: 8,
9828
+ width: 78,
9829
+ height: 78,
9830
+ marginRight: 16
9831
+ },
9832
+ title: {
9833
+ fontSize: 12,
9834
+ color: '#000',
9835
+ textAlign: 'left'
9836
+ },
9837
+ ctaTitle: {
9838
+ textDecoration: 'underline',
9839
+ fontSize: 12,
9840
+ fontWeight: 'bold',
9841
+ color: '#000',
9842
+ textAlign: 'left',
9843
+ width: 150,
9844
+ height: 20
9845
+ }
9846
+ }
9847
+ },
9262
9848
  style: {
9263
- padding: '7px',
9264
- display: 'flex',
9265
- background: '#fff',
9266
- borderRadius: '3px'
9849
+ borderRadius: 4,
9850
+ width: 260,
9851
+ height: 86,
9852
+ padding: 4,
9853
+ backgroundColor: 'rgba(255,255,255,0.75)'
9267
9854
  }
9268
9855
  },
9269
9856
  w: 100,
@@ -9373,8 +9960,10 @@ Made in Italy`))));
9373
9960
  videoRef.current.muted = muted;
9374
9961
  }, [muted]);
9375
9962
  const handleVideoStart = React.useCallback(() => {
9376
- var _a;
9377
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
9963
+ var _a, _b;
9964
+ 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)
9965
+ return;
9966
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
9378
9967
  }, []);
9379
9968
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
9380
9969
  const handlePlaying = React.useCallback(() => {
@@ -9431,37 +10020,38 @@ Made in Italy`))));
9431
10020
  });
9432
10021
  }
9433
10022
  setTimeout(() => {
9434
- var _a;
9435
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
10023
+ var _a, _b;
10024
+ 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)
10025
+ return;
10026
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
9436
10027
  }, 0);
9437
10028
  }, [index, bffEventReport, data, isLoad]);
9438
10029
  const handleClickVideo = React.useCallback((type) => () => {
9439
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
10030
+ var _a, _b, _c, _d, _e, _f;
10031
+ 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)
10032
+ return;
9440
10033
  if (!isLoad)
9441
10034
  return;
9442
- data[index];
9443
- ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
9444
- ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
9445
- const isPause = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.paused;
10035
+ const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
9446
10036
  switch (type) {
9447
10037
  case 'start':
9448
10038
  if (!isPause)
9449
10039
  return;
9450
- (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
10040
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
9451
10041
  setIsPauseVideo(false);
9452
10042
  break;
9453
10043
  case 'pause':
9454
10044
  if (isPause)
9455
10045
  return;
9456
- (_g = videoRef.current) === null || _g === void 0 ? void 0 : _g.pause();
10046
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.pause();
9457
10047
  setIsPauseVideo(true);
9458
10048
  break;
9459
10049
  default:
9460
10050
  if (isPause) {
9461
- (_h = videoRef.current) === null || _h === void 0 ? void 0 : _h.play();
10051
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
9462
10052
  }
9463
10053
  else {
9464
- (_j = videoRef.current) === null || _j === void 0 ? void 0 : _j.pause();
10054
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
9465
10055
  }
9466
10056
  setIsPauseVideo(!isPause);
9467
10057
  break;
@@ -9492,14 +10082,16 @@ Made in Italy`))));
9492
10082
  }
9493
10083
  }, [data, index, bffEventReport]);
9494
10084
  React.useEffect(() => {
9495
- var _a, _b, _c;
10085
+ var _a, _b, _c, _d, _e, _f;
9496
10086
  if (data.length <= 0)
9497
10087
  return;
9498
10088
  if (!videoRef.current)
9499
10089
  return;
10090
+ const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
9500
10091
  setIsPauseVideo(false);
9501
10092
  if (!isActive) {
9502
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
10093
+ if (!isPause && ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.readyState) >= 2)
10094
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
9503
10095
  return;
9504
10096
  }
9505
10097
  if (!videoRef.current.src) {
@@ -9522,10 +10114,12 @@ Made in Italy`))));
9522
10114
  videoRef.current.setAttribute('webkit-playsinline', 'true');
9523
10115
  }
9524
10116
  else {
10117
+ if (((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.readyState) < 2)
10118
+ return;
9525
10119
  videoRef.current.play();
9526
10120
  }
9527
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
9528
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
10121
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('canplay', handleLoadedMetadata);
10122
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
9529
10123
  return () => {
9530
10124
  var _a, _b;
9531
10125
  (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('canplay', handleLoadedMetadata);
@@ -9536,15 +10130,17 @@ Made in Italy`))));
9536
10130
  打开/关闭hashtag暂停/播放视频
9537
10131
  */
9538
10132
  React.useEffect(() => {
9539
- var _a, _b, _c;
9540
- const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
10133
+ var _a, _b, _c, _d;
10134
+ 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)
10135
+ return;
10136
+ const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
9541
10137
  if (!isActive)
9542
10138
  return;
9543
10139
  if (!isPause && openHashtag) {
9544
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.pause();
10140
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
9545
10141
  }
9546
10142
  else if (!openHashtag) {
9547
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
10143
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
9548
10144
  }
9549
10145
  }, [openHashtag, isActive]);
9550
10146
  React.useEffect(() => {
@@ -9657,22 +10253,26 @@ Made in Italy`))));
9657
10253
  * @Author: lewinlu@chatlabs.com
9658
10254
  * @Date: 2024-01-03 14:39:09
9659
10255
  * @LastEditors: binruan@chatlabs.com
9660
- * @LastEditTime: 2024-03-19 18:42:33
10256
+ * @LastEditTime: 2024-03-25 15:08:11
9661
10257
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
9662
10258
  */
9663
10259
  const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent }) => {
9664
10260
  const { isActive } = useSwiperSlide();
9665
10261
  const { sxpParameter, openHashtag } = useSxpDataSource();
10262
+ const [isLoad, setIsLoad] = React.useState(false);
9666
10263
  React.useEffect(() => {
9667
- if (!isActive)
9668
- return;
9669
- if (openHashtag) {
9670
- onReportViewImageEnd(rec);
10264
+ if (isLoad && isActive) {
10265
+ if (openHashtag) {
10266
+ onReportViewImageEnd(rec);
10267
+ }
10268
+ else {
10269
+ onViewImageStartEvent(index);
10270
+ }
9671
10271
  }
9672
10272
  else {
9673
- onViewImageStartEvent(index);
10273
+ setIsLoad(true);
9674
10274
  }
9675
- }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent]);
10275
+ }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent, isLoad]);
9676
10276
  if (!isActive) {
9677
10277
  return React.createElement("img", { src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, style: { width, height, objectFit: 'cover' } });
9678
10278
  }
@@ -9683,75 +10283,17 @@ Made in Italy`))));
9683
10283
  };
9684
10284
  var PictureGroup$1 = React.memo(PictureGroup);
9685
10285
 
9686
- /*
9687
- * @Author: binruan@chatlabs.com
9688
- * @Date: 2023-11-02 18:34:34
9689
- * @LastEditors: binruan@chatlabs.com
9690
- * @LastEditTime: 2024-03-12 12:08:55
9691
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ProductInfo\index.tsx
9692
- *
9693
- */
9694
- const ProductInfo = ({ data, height, width, viewTime, tipText }) => {
9695
- var _a, _b;
9696
- const product = data === null || data === void 0 ? void 0 : data.product;
9697
- const cta = (_a = data === null || data === void 0 ? void 0 : data.product) === null || _a === void 0 ? void 0 : _a.bindCta;
9698
- const [showModal, setShowModal] = React.useState(false);
9699
- const { jumpToWeb } = useEventReport();
9700
- const priceText = React.useMemo(() => {
9701
- var _a, _b, _c, _d, _e;
9702
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
9703
- 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', {
9704
- minimumFractionDigits: 0
9705
- })) !== null && _e !== void 0 ? _e : ''}`;
9706
- }
9707
- else {
9708
- return '$7,000';
9709
- }
9710
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
9711
- const handleLInk = (link) => {
9712
- if (link) {
9713
- jumpToWeb(data, product, cta);
9714
- window.location.href = window.getJointUtmLink(link);
9715
- }
9716
- };
9717
- return (React.createElement("div", { style: { height, width: '100%' } },
9718
- React.createElement(Swiper, { height: height * 0.5, modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, loop: true, autoplay: {
9719
- delay: 3000
9720
- } }, (_b = product === null || product === void 0 ? void 0 : product.homePage) === null || _b === void 0 ? void 0 : _b.map((src) => {
9721
- return (React.createElement(SwiperSlide, { key: src },
9722
- React.createElement("div", { style: {
9723
- overflow: 'hidden',
9724
- width,
9725
- height: height * 0.5
9726
- } },
9727
- React.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
9728
- })),
9729
- React.createElement("div", { className: 'product-info' },
9730
- React.createElement("div", { className: 'collection' }, product === null || product === void 0 ? void 0 : product.collection),
9731
- React.createElement("div", { className: 'title' }, product === null || product === void 0 ? void 0 : product.title),
9732
- React.createElement("div", { className: 'price' }, priceText),
9733
- 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 }),
9734
- 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)),
9735
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
9736
- React.createElement("div", { className: 'modal-collection' }, product === null || product === void 0 ? void 0 : product.collection),
9737
- React.createElement("div", { className: 'modal-title' }, product === null || product === void 0 ? void 0 : product.title),
9738
- React.createElement("div", { className: 'modal-price' }, priceText),
9739
- React.createElement("div", { className: 'modal-info' }, product === null || product === void 0 ? void 0 : product.info),
9740
- (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)))));
9741
- };
9742
- var ProductInfo$1 = React.memo(ProductInfo);
9743
-
9744
10286
  /*
9745
10287
  * @Author: binruan@chatlabs.com
9746
10288
  * @Date: 2024-01-15 19:03:09
9747
10289
  * @LastEditors: binruan@chatlabs.com
9748
- * @LastEditTime: 2024-03-04 18:41:38
10290
+ * @LastEditTime: 2024-03-25 10:42:07
9749
10291
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
9750
10292
  *
9751
10293
  */
9752
10294
  const Hashtag = ({ tags, itemId, itemType, index, rec }) => {
9753
10295
  const [isShowMore, setIsShowMore] = React.useState(false);
9754
- const { setWaterFallData, setOpenHashtag, setCacheRtcList, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
10296
+ const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
9755
10297
  const handleClickTag = (data) => {
9756
10298
  if (!waterFallData) {
9757
10299
  setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(index);
@@ -10212,17 +10754,29 @@ Made in Italy`))));
10212
10754
  };
10213
10755
  var WaterFall$1 = React.memo(WaterFall);
10214
10756
 
10757
+ const Nudge = ({ nudge }) => {
10758
+ return (React.createElement("div", { hidden: !(nudge === null || nudge === void 0 ? void 0 : nudge.isOpen), className: 'clc-sxp-bottom-nudge', style: {
10759
+ marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
10760
+ width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
10761
+ height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
10762
+ backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
10763
+ borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
10764
+ } },
10765
+ (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
10766
+ React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)));
10767
+ };
10768
+
10215
10769
  /*
10216
10770
  * @Author: binruan@chatlabs.com
10217
10771
  * @Date: 2024-01-15 19:03:09
10218
10772
  * @LastEditors: binruan@chatlabs.com
10219
- * @LastEditTime: 2024-03-18 18:48:44
10773
+ * @LastEditTime: 2024-04-02 10:42:58
10220
10774
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
10221
10775
  *
10222
10776
  */
10223
- const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, _schema }) => {
10777
+ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema }) => {
10224
10778
  var _a, _b, _c, _d;
10225
- useEditor();
10779
+ const { schema } = useEditor();
10226
10780
  const [activeIndex, setActiveIndex] = React.useState(0);
10227
10781
  const viewImageStartTime = React.useRef(0);
10228
10782
  const [isInit, setIsInit] = React.useState(false);
@@ -10374,49 +10928,39 @@ Made in Italy`))));
10374
10928
  return null;
10375
10929
  }, [globalConfig]);
10376
10930
  const renderContent = React.useCallback((rec, index) => {
10377
- var _a, _b;
10931
+ var _a, _b, _c, _d;
10378
10932
  if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
10379
10933
  return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex }));
10380
10934
  }
10381
10935
  if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
10382
10936
  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 }));
10383
10937
  }
10384
- if (rec.product) {
10385
- switch (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) {
10386
- case 'CommodityDetailDiroNew':
10387
- return (React.createElement(CommodityDetailDiroNew$2, { key: rec.product.itemId, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' } }));
10388
- // case 'CommodityDetailDiro':
10389
- // return (
10390
- // <CommodityDetailDiro
10391
- // key={rec.product.itemId}
10392
- // viewTime={viewTime.current}
10393
- // rec={rec}
10394
- // isPost={true}
10395
- // style={{ height: '100%', overflow: 'auto' }}
10396
- // />
10397
- // );
10398
- case 'CommodityDetail':
10399
- return (React.createElement(ProductInfo$1, { key: rec.product.itemId, viewTime: viewTime.current, data: rec, height: height, tipText: tipText, width: containerWidth }));
10400
- default:
10401
- return (React.createElement(ProductInfo$1, { key: rec.product.itemId, viewTime: viewTime.current, data: rec, height: height, tipText: tipText, width: containerWidth }));
10402
- }
10938
+ 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) {
10939
+ return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, index) => {
10940
+ var _a, _b, _c, _d, _e, _f;
10941
+ const Component = withBindDataSource(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
10942
+ 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' },
10943
+ // ProductInfo
10944
+ data: rec, height: height, width: containerWidth })));
10945
+ });
10403
10946
  }
10404
10947
  return null;
10405
- }, [containerWidth, data, height, isMuted, activeIndex, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost, viewTime, tipText]);
10948
+ }, [containerWidth, data, height, isMuted, activeIndex, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost, viewTime, tipText, resolver, schema]);
10406
10949
  const renderBottom = React.useCallback((rec, index) => {
10407
10950
  var _a, _b, _c, _d, _e, _f, _g;
10408
10951
  if (rec.video) {
10409
10952
  return (React.createElement(React.Fragment, null,
10410
10953
  ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
10411
10954
  React.createElement("div", { className: 'clc-sxp-bottom' },
10955
+ React.createElement(Nudge, { nudge: nudge }),
10412
10956
  React.createElement("div", { className: 'clc-sxp-bottom-card' },
10413
10957
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
10414
10958
  React.createElement("div", { className: 'clc-sxp-bottom-text' },
10415
- 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 })),
10959
+ 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 })),
10416
10960
  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 }))));
10417
10961
  }
10418
10962
  return null;
10419
- }, [descStyle, activeIndex, tempMap, resolver, tipText]);
10963
+ }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge]);
10420
10964
  const renderLikeButton = React.useCallback((rec) => {
10421
10965
  var _a, _b;
10422
10966
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
@@ -10495,6 +11039,11 @@ Made in Italy`))));
10495
11039
  productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current);
10496
11040
  }
10497
11041
  };
11042
+ React.useEffect(() => {
11043
+ const item = data[activeIndex];
11044
+ if (openHashtag)
11045
+ handleReportProductView(item);
11046
+ }, [openHashtag, data, activeIndex]);
10498
11047
  const handleViewImageStartEvent = (activeIndex) => {
10499
11048
  var _a, _b, _c, _d, _e, _f;
10500
11049
  const item = data[activeIndex];
@@ -10601,12 +11150,12 @@ Made in Italy`))));
10601
11150
  * @Author: binruan@chatlabs.com
10602
11151
  * @Date: 2023-10-31 10:56:01
10603
11152
  * @LastEditors: binruan@chatlabs.com
10604
- * @LastEditTime: 2024-03-13 02:19:26
11153
+ * @LastEditTime: 2024-04-02 10:31:51
10605
11154
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
10606
11155
  *
10607
11156
  */
10608
11157
  const Popup = () => {
10609
- const { schema, resolver, popup } = useEditor();
11158
+ const { schema, resolver, popup, popupAni } = useEditor();
10610
11159
  const { setPopupDetailData, popupDetailData, bffEventReport } = useSxpDataSource();
10611
11160
  const { productView } = useEventReport();
10612
11161
  const [visible, setVisible] = React.useState(false);
@@ -10629,7 +11178,7 @@ Made in Italy`))));
10629
11178
  }, [popup]);
10630
11179
  const handleClose = () => {
10631
11180
  var _a, _b, _c;
10632
- if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < 1200) {
11181
+ if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
10633
11182
  return;
10634
11183
  }
10635
11184
  setVisible(false);
@@ -10642,7 +11191,7 @@ Made in Italy`))));
10642
11191
  setTimeout(() => {
10643
11192
  window === null || window === void 0 ? void 0 : window.sxpPopup('');
10644
11193
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(null);
10645
- }, 1200);
11194
+ }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
10646
11195
  };
10647
11196
  const renderPopupDetail = React.useMemo(() => {
10648
11197
  var _a, _b, _c;
@@ -10664,7 +11213,7 @@ Made in Italy`))));
10664
11213
  * @Author: binruan@chatlabs.com
10665
11214
  * @Date: 2024-01-15 19:03:09
10666
11215
  * @LastEditors: binruan@chatlabs.com
10667
- * @LastEditTime: 2024-03-14 17:23:54
11216
+ * @LastEditTime: 2024-03-25 17:24:59
10668
11217
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
10669
11218
  *
10670
11219
  */
@@ -10680,7 +11229,7 @@ Made in Italy`))));
10680
11229
  Object.values(_materials_).forEach((v) => {
10681
11230
  RESOLVER[v.extend.type] = v;
10682
11231
  });
10683
- const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage }) => {
11232
+ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain }) => {
10684
11233
  var _a, _b, _c, _d, _e, _f;
10685
11234
  const utmVal = React.useMemo(() => {
10686
11235
  var _a;
@@ -10688,7 +11237,7 @@ Made in Italy`))));
10688
11237
  return searchParams;
10689
11238
  }, []);
10690
11239
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
10691
- 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 }) => {
11240
+ 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 }) => {
10692
11241
  var _a;
10693
11242
  return (React.createElement(React.Fragment, null,
10694
11243
  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 })),