pb-sxp-ui 1.2.8 → 1.2.10

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 (45) hide show
  1. package/dist/index.cjs +98 -31
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +98 -31
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -3
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -3
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +98 -31
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -3
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/SxpPageRender/FormatImage.js +19 -17
  14. package/es/core/components/SxpPageRender/index.js +6 -4
  15. package/es/materials/sxp/HashTag/settingRender.d.ts +6 -7
  16. package/es/materials/sxp/HashTag/settingRender.js +9 -0
  17. package/es/materials/sxp/cta/AniLink/settingRender.d.ts +5 -0
  18. package/es/materials/sxp/cta/AniLink/settingRender.js +4 -0
  19. package/es/materials/sxp/cta/AniLinkPopup/material.js +2 -1
  20. package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +8 -5
  21. package/es/materials/sxp/popup/AppointForm/settingRender.js +12 -0
  22. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +6 -0
  23. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +9 -0
  24. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -0
  25. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +9 -0
  26. package/es/materials/sxp/popup/CommodityList/settingRender.js +4 -0
  27. package/es/materials/sxp/popup/Prompt/settingRender.js +10 -0
  28. package/es/materials/sxp/template/Link/settingRender.js +5 -0
  29. package/lib/core/components/SxpPageRender/FormatImage.js +19 -17
  30. package/lib/core/components/SxpPageRender/index.js +6 -4
  31. package/lib/materials/sxp/HashTag/settingRender.d.ts +6 -7
  32. package/lib/materials/sxp/HashTag/settingRender.js +9 -0
  33. package/lib/materials/sxp/cta/AniLink/settingRender.d.ts +5 -0
  34. package/lib/materials/sxp/cta/AniLink/settingRender.js +4 -0
  35. package/lib/materials/sxp/cta/AniLinkPopup/material.js +2 -1
  36. package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +8 -5
  37. package/lib/materials/sxp/popup/AppointForm/settingRender.js +12 -0
  38. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +6 -0
  39. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +9 -0
  40. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -0
  41. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +9 -0
  42. package/lib/materials/sxp/popup/CommodityList/settingRender.js +4 -0
  43. package/lib/materials/sxp/popup/Prompt/settingRender.js +10 -0
  44. package/lib/materials/sxp/template/Link/settingRender.js +5 -0
  45. package/package.json +1 -1
package/dist/pb-ui.js CHANGED
@@ -1130,7 +1130,7 @@
1130
1130
  * @Author: binruan@chatlabs.com
1131
1131
  * @Date: 2023-07-28 18:29:57
1132
1132
  * @LastEditors: binruan@chatlabs.com
1133
- * @LastEditTime: 2024-07-02 10:01:21
1133
+ * @LastEditTime: 2024-08-06 14:13:47
1134
1134
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
1135
1135
  *
1136
1136
  */
@@ -1189,6 +1189,11 @@
1189
1189
  type: 'TextAlign',
1190
1190
  name: ['textStyle']
1191
1191
  },
1192
+ {
1193
+ label: '标题间距',
1194
+ type: 'TextSpace',
1195
+ name: ['textStyle']
1196
+ },
1192
1197
  {
1193
1198
  label: '表单布局',
1194
1199
  type: 'Radius',
@@ -1247,10 +1252,12 @@
1247
1252
  ]
1248
1253
  },
1249
1254
  {
1255
+ label: '提交按钮文本样式',
1250
1256
  type: 'TextStyle',
1251
1257
  name: ['props', 'submitButtonStyle']
1252
1258
  },
1253
1259
  {
1260
+ label: '提交按钮对齐',
1254
1261
  type: 'TextAlign',
1255
1262
  name: ['props', 'submitButtonStyle']
1256
1263
  },
@@ -1258,6 +1265,11 @@
1258
1265
  label: '提交按钮颜色',
1259
1266
  type: 'Color',
1260
1267
  name: ['props', 'submitBgColor']
1268
+ },
1269
+ {
1270
+ label: '提交按钮间距',
1271
+ type: 'TextSpace',
1272
+ name: ['props', 'submitButtonStyle']
1261
1273
  }
1262
1274
  // {
1263
1275
  // label: '接收内容接口地址',
@@ -1700,6 +1712,10 @@
1700
1712
  label: '默认行数',
1701
1713
  type: 'Number',
1702
1714
  name: ['lineClamp']
1715
+ },
1716
+ {
1717
+ label: '间距',
1718
+ type: 'TextSpace'
1703
1719
  }
1704
1720
  ]
1705
1721
  }
@@ -1785,6 +1801,11 @@
1785
1801
  {
1786
1802
  type: 'TextAlign',
1787
1803
  name: ['props', 'buttonStyle']
1804
+ },
1805
+ {
1806
+ label: '间距',
1807
+ type: 'TextSpace',
1808
+ name: ['props', 'buttonStyle']
1788
1809
  }
1789
1810
  ]
1790
1811
  }
@@ -8809,18 +8830,20 @@
8809
8830
  const { src, onLoad, style, className, loading, alt = 'image' } = props;
8810
8831
  const [imgSrc, setImgSrc] = React.useState();
8811
8832
  const imgRef = React.useRef(null);
8833
+ const [visible, setVisible] = React.useState(false);
8812
8834
  React.useImperativeHandle(ref, () => ({
8813
8835
  setSrc: (v) => {
8814
- setImgSrc(v);
8836
+ if (v)
8837
+ setImgSrc(v);
8815
8838
  }
8816
8839
  }));
8817
8840
  React.useEffect(() => {
8818
- setImgSrc(src);
8841
+ if (src)
8842
+ setImgSrc(src);
8819
8843
  }, [src]);
8820
8844
  React.useEffect(() => {
8821
8845
  const onShow = () => {
8822
- var _a, _b;
8823
- if (src && ((_b = (_a = imgRef === null || imgRef === void 0 ? void 0 : imgRef.current) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === 'none') {
8846
+ if (src && !visible) {
8824
8847
  imgRef.current.src = '';
8825
8848
  imgRef.current.src = src;
8826
8849
  }
@@ -8829,20 +8852,20 @@
8829
8852
  return () => {
8830
8853
  SXP_EVENT_BUS.off(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
8831
8854
  };
8832
- }, [src]);
8833
- return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
8834
- React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8835
- React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
8836
- React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
8837
- React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
8838
- if (imgRef.current)
8839
- imgRef.current.style.display = 'block';
8855
+ }, [src, visible]);
8856
+ return (React.createElement(React.Fragment, null,
8857
+ !visible && React.createElement("div", { style: { width: '100%', height: '100%', zIndex: 1, backgroundColor: '#fff' } }),
8858
+ (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
8859
+ React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8860
+ React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
8861
+ React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
8862
+ React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign({}, style), loading: loading, onLoad: (e) => {
8863
+ setVisible(true);
8864
+ onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8865
+ }, alt: alt }))) : (React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign({}, style), loading: loading, onLoad: (e) => {
8866
+ setVisible(true);
8840
8867
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8841
- }, alt: alt }))) : (React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
8842
- if (imgRef.current)
8843
- imgRef.current.style.display = 'block';
8844
- onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
8845
- }, alt: alt }))));
8868
+ }, alt: alt }))));
8846
8869
  });
8847
8870
  var FormatImage$1 = React.memo(FormatImage);
8848
8871
 
@@ -9172,7 +9195,7 @@
9172
9195
  * @Author: binruan@chatlabs.com
9173
9196
  * @Date: 2023-10-27 14:06:35
9174
9197
  * @LastEditors: binruan@chatlabs.com
9175
- * @LastEditTime: 2024-07-02 09:58:06
9198
+ * @LastEditTime: 2024-08-06 14:23:11
9176
9199
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
9177
9200
  *
9178
9201
  */
@@ -9224,6 +9247,11 @@
9224
9247
  }
9225
9248
  ]
9226
9249
  },
9250
+ {
9251
+ label: '内容字体间距',
9252
+ type: 'TextSpace',
9253
+ name: ['props', 'contentStyle']
9254
+ },
9227
9255
  {
9228
9256
  type: 'Group',
9229
9257
  label: '提交按钮字体',
@@ -9257,6 +9285,11 @@
9257
9285
  }
9258
9286
  ]
9259
9287
  },
9288
+ {
9289
+ label: '提交按钮间距',
9290
+ type: 'TextSpace',
9291
+ name: ['props', 'submitButtonStyle']
9292
+ },
9260
9293
  {
9261
9294
  type: 'TextStyle',
9262
9295
  name: ['props', 'submitButtonStyle']
@@ -9367,7 +9400,7 @@
9367
9400
  * @Author: binruan@chatlabs.com
9368
9401
  * @Date: 2024-03-26 16:50:25
9369
9402
  * @LastEditors: binruan@chatlabs.com
9370
- * @LastEditTime: 2024-07-12 14:44:50
9403
+ * @LastEditTime: 2024-08-06 14:06:03
9371
9404
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
9372
9405
  *
9373
9406
  */
@@ -9529,6 +9562,10 @@
9529
9562
  label: '默认行数',
9530
9563
  type: 'Number',
9531
9564
  name: ['lineClamp']
9565
+ },
9566
+ {
9567
+ label: '间距',
9568
+ type: 'TextSpace'
9532
9569
  }
9533
9570
  ]
9534
9571
  }
@@ -9614,6 +9651,11 @@
9614
9651
  {
9615
9652
  type: 'TextAlign',
9616
9653
  name: ['props', 'buttonStyle']
9654
+ },
9655
+ {
9656
+ label: '间距',
9657
+ type: 'TextSpace',
9658
+ name: ['props', 'buttonStyle']
9617
9659
  }
9618
9660
  ]
9619
9661
  }
@@ -9920,7 +9962,7 @@ Made in Italy` })));
9920
9962
  * @Author: binruan@chatlabs.com
9921
9963
  * @Date: 2024-03-26 16:50:25
9922
9964
  * @LastEditors: binruan@chatlabs.com
9923
- * @LastEditTime: 2024-07-09 10:37:45
9965
+ * @LastEditTime: 2024-08-06 14:09:52
9924
9966
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
9925
9967
  *
9926
9968
  */
@@ -10042,6 +10084,10 @@ Made in Italy` })));
10042
10084
  {
10043
10085
  label: '标题对齐',
10044
10086
  type: 'TextAlign'
10087
+ },
10088
+ {
10089
+ label: '间距',
10090
+ type: 'TextSpace'
10045
10091
  }
10046
10092
  ]
10047
10093
  }
@@ -10814,7 +10860,7 @@ Made in Italy` })));
10814
10860
  * @Author: binruan@chatlabs.com
10815
10861
  * @Date: 2024-07-02 14:51:32
10816
10862
  * @LastEditors: binruan@chatlabs.com
10817
- * @LastEditTime: 2024-07-02 16:44:34
10863
+ * @LastEditTime: 2024-08-06 14:51:18
10818
10864
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
10819
10865
  *
10820
10866
  */
@@ -10911,6 +10957,11 @@ Made in Italy` })));
10911
10957
  type: 'TextAlign',
10912
10958
  name: ['props', 'customTitle', 'style']
10913
10959
  },
10960
+ {
10961
+ label: '间距',
10962
+ type: 'TextSpace',
10963
+ name: ['props', 'customTitle', 'style']
10964
+ },
10914
10965
  {
10915
10966
  label: '上边距',
10916
10967
  type: 'Number',
@@ -11553,7 +11604,7 @@ Made in Italy` })));
11553
11604
  * @Author: binruan@chatlabs.com
11554
11605
  * @Date: 2024-04-07 14:07:12
11555
11606
  * @LastEditors: binruan@chatlabs.com
11556
- * @LastEditTime: 2024-06-27 09:49:19
11607
+ * @LastEditTime: 2024-08-06 14:00:36
11557
11608
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
11558
11609
  *
11559
11610
  */
@@ -11658,6 +11709,10 @@ Made in Italy` })));
11658
11709
  {
11659
11710
  label: '标题对齐',
11660
11711
  type: 'TextAlign'
11712
+ },
11713
+ {
11714
+ label: '间距',
11715
+ type: 'TextSpace'
11661
11716
  }
11662
11717
  ]
11663
11718
  }
@@ -11743,6 +11798,11 @@ Made in Italy` })));
11743
11798
  {
11744
11799
  type: 'TextAlign',
11745
11800
  name: ['props', 'buttonStyle']
11801
+ },
11802
+ {
11803
+ label: '间距',
11804
+ type: 'TextSpace',
11805
+ name: ['props', 'buttonStyle']
11746
11806
  }
11747
11807
  ]
11748
11808
  },
@@ -13916,7 +13976,7 @@ Made in Italy` })));
13916
13976
  * @Author: binruan@chatlabs.com
13917
13977
  * @Date: 2024-07-02 14:51:32
13918
13978
  * @LastEditors: binruan@chatlabs.com
13919
- * @LastEditTime: 2024-07-05 19:09:41
13979
+ * @LastEditTime: 2024-08-06 14:28:34
13920
13980
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\settingRender.tsx
13921
13981
  *
13922
13982
  */
@@ -14019,6 +14079,10 @@ Made in Italy` })));
14019
14079
  label: '对齐',
14020
14080
  type: 'TextAlign',
14021
14081
  name: ['props', 'ctaTempStyles', 'ctaTitle']
14082
+ },
14083
+ {
14084
+ type: 'TextSpace',
14085
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
14022
14086
  }
14023
14087
  ]
14024
14088
  }
@@ -14585,7 +14649,7 @@ Made in Italy` })));
14585
14649
  * @Author: binruan@chatlabs.com
14586
14650
  * @Date: 2024-07-24 14:58:40
14587
14651
  * @LastEditors: binruan@chatlabs.com
14588
- * @LastEditTime: 2024-08-02 17:09:37
14652
+ * @LastEditTime: 2024-08-02 17:45:51
14589
14653
  * @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\material.tsx
14590
14654
  *
14591
14655
  */
@@ -14619,7 +14683,8 @@ Made in Italy` })));
14619
14683
  title: {
14620
14684
  fontSize: 14,
14621
14685
  color: '#000',
14622
- textAlign: 'left'
14686
+ textAlign: 'left',
14687
+ lineHeight: 2.6
14623
14688
  },
14624
14689
  ctaTitle: {
14625
14690
  width: 108,
@@ -15527,7 +15592,7 @@ Made in Italy` })));
15527
15592
  * @Author: binruan@chatlabs.com
15528
15593
  * @Date: 2024-01-15 19:03:09
15529
15594
  * @LastEditors: binruan@chatlabs.com
15530
- * @LastEditTime: 2024-08-02 10:50:56
15595
+ * @LastEditTime: 2024-08-02 18:34:27
15531
15596
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15532
15597
  *
15533
15598
  */
@@ -15540,7 +15605,7 @@ Made in Italy` })));
15540
15605
  const viewTime = React.useRef();
15541
15606
  const [isLoadMore, setIsLoadMore] = React.useState(false);
15542
15607
  const [isShowMore, setIsShowMore] = React.useState(false);
15543
- const [isReload, setIsReload] = React.useState(false);
15608
+ const [isReload, setIsReload] = React.useState(new Date().getTime());
15544
15609
  const skipLinkRef = React.useRef(false);
15545
15610
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
15546
15611
  const { backMainFeed } = useEventReport();
@@ -15636,7 +15701,8 @@ Made in Italy` })));
15636
15701
  }
15637
15702
  else if (document.visibilityState === 'visible') {
15638
15703
  if (skipLinkRef.current === true) {
15639
- setIsReload(true);
15704
+ setIsReload(new Date().getTime());
15705
+ skipLinkRef.current = false;
15640
15706
  }
15641
15707
  // 页面可见时触发,注意页面初始化时不会触发
15642
15708
  handleH5EnterLink();
@@ -15695,7 +15761,7 @@ Made in Italy` })));
15695
15761
  const renderContent = React.useCallback((rec, index) => {
15696
15762
  var _a, _b, _c, _d;
15697
15763
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
15698
- return (React.createElement(VideoWidget$3, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon }));
15764
+ return (React.createElement(VideoWidget$3, { key: isReload, rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon }));
15699
15765
  }
15700
15766
  if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
15701
15767
  return (React.createElement(PictureGroup$3, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
@@ -15721,7 +15787,8 @@ Made in Italy` })));
15721
15787
  viewTime,
15722
15788
  tipText,
15723
15789
  resolver,
15724
- schema
15790
+ schema,
15791
+ isReload
15725
15792
  ]);
15726
15793
  const onExpandableChange = React.useCallback((v) => {
15727
15794
  setIsShowMore(v);