pb-sxp-ui 1.0.102 → 1.0.103

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.
package/dist/pb-ui.js CHANGED
@@ -10037,11 +10037,122 @@ Made in Italy` })));
10037
10037
  sort: 6
10038
10038
  });
10039
10039
 
10040
- var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU"};
10040
+ /*
10041
+ * @Author: binruan@chatlabs.com
10042
+ * @Date: 2024-07-02 14:51:32
10043
+ * @LastEditors: binruan@chatlabs.com
10044
+ * @LastEditTime: 2024-07-02 16:44:34
10045
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
10046
+ *
10047
+ */
10048
+ var linkSettingRender = [
10049
+ {
10050
+ title: '自定义标题',
10051
+ child: [
10052
+ {
10053
+ type: 'Switch',
10054
+ label: '自定义标题开关',
10055
+ name: ['props', 'customTitle', 'display']
10056
+ },
10057
+ {
10058
+ type: 'Text',
10059
+ label: '标题文案',
10060
+ name: ['props', 'customTitle', 'text']
10061
+ },
10062
+ {
10063
+ type: 'Group',
10064
+ label: '尺寸',
10065
+ child: [
10066
+ {
10067
+ type: 'Number',
10068
+ name: ['props', 'customTitle', 'style', 'width'],
10069
+ addonAfter: 'W'
10070
+ },
10071
+ {
10072
+ type: 'Number',
10073
+ name: ['props', 'customTitle', 'style', 'height'],
10074
+ addonAfter: 'H'
10075
+ }
10076
+ ]
10077
+ },
10078
+ {
10079
+ type: 'Group',
10080
+ label: '圆角',
10081
+ child: [
10082
+ {
10083
+ type: 'Slider',
10084
+ name: ['props', 'customTitle', 'style', 'borderRadius'],
10085
+ max: 100
10086
+ },
10087
+ {
10088
+ type: 'Number',
10089
+ name: ['props', 'customTitle', 'style', 'borderRadius'],
10090
+ addonAfter: 'px',
10091
+ max: 100
10092
+ }
10093
+ ]
10094
+ },
10095
+ {
10096
+ type: 'Color',
10097
+ label: '背景色',
10098
+ name: ['props', 'customTitle', 'style', 'backgroundColor']
10099
+ },
10100
+ {
10101
+ type: 'Group',
10102
+ label: '字体',
10103
+ child: [
10104
+ {
10105
+ type: 'Select',
10106
+ name: ['props', 'customTitle', 'style', 'fontFamily-cn'],
10107
+ bottomText: '中文字体'
10108
+ },
10109
+ {
10110
+ type: 'Select',
10111
+ name: ['props', 'customTitle', 'style', 'fontFamily-en'],
10112
+ bottomText: '英文/其他字体'
10113
+ }
10114
+ ]
10115
+ },
10116
+ {
10117
+ type: 'Group',
10118
+ label: '',
10119
+ child: [
10120
+ {
10121
+ type: 'Color',
10122
+ name: ['props', 'customTitle', 'style', 'color']
10123
+ },
10124
+ {
10125
+ type: 'Number',
10126
+ addonAfter: 'px',
10127
+ name: ['props', 'customTitle', 'style', 'fontSize']
10128
+ }
10129
+ ]
10130
+ },
10131
+ {
10132
+ label: '样式',
10133
+ type: 'TextStyle',
10134
+ name: ['props', 'customTitle', 'style']
10135
+ },
10136
+ {
10137
+ label: '对齐',
10138
+ type: 'TextAlign',
10139
+ name: ['props', 'customTitle', 'style']
10140
+ },
10141
+ {
10142
+ label: '上边距',
10143
+ type: 'Number',
10144
+ name: ['props', 'customTitle', 'style', 'marginTop'],
10145
+ addonAfter: 'px'
10146
+ }
10147
+ ]
10148
+ }
10149
+ ];
10150
+
10151
+ var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
10041
10152
 
10042
10153
  const Link$1 = (_a) => {
10043
- var _b, _c, _d, _e, _f, _g, _h;
10044
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index"]);
10154
+ var _b, _c, _d, _e, _f, _g, _h, _j;
10155
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
10045
10156
  const { sxpParameter, bffEventReport } = useSxpDataSource();
10046
10157
  const { jumpToWeb } = useEventReport();
10047
10158
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
@@ -10061,27 +10172,24 @@ Made in Italy` })));
10061
10172
  width: '100%',
10062
10173
  overflow: 'hidden'
10063
10174
  }) },
10064
- React.createElement("div", { className: styles$5['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
10065
- __html: setFontForText((_h = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _h !== void 0 ? _h : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
10066
- } }))));
10175
+ React.createElement("div", null,
10176
+ React.createElement("div", { className: (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) ? styles$5['one-line-ellipsis'] : styles$5['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
10177
+ __html: setFontForText((_h = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _h !== void 0 ? _h : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
10178
+ } }),
10179
+ (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) && (React.createElement("div", { style: Object.assign(Object.assign({}, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style), { lineHeight: ((_j = customTitle === null || customTitle === void 0 ? void 0 : customTitle.style) === null || _j === void 0 ? void 0 : _j.height) + 'px' }), className: styles$5['one-line-ellipsis'], dangerouslySetInnerHTML: {
10180
+ __html: setFontForText(customTitle === null || customTitle === void 0 ? void 0 : customTitle.text, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style)
10181
+ } }))))));
10067
10182
  };
10068
10183
  var LinkComponent = React.memo(Link$1);
10069
10184
 
10070
- /*
10071
- * @Author: binruan@chatlabs.com
10072
- * @Date: 2023-07-28 18:29:57
10073
- * @LastEditors: binruan@chatlabs.com
10074
- * @LastEditTime: 2024-03-29 17:04:57
10075
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\material.tsx
10076
- *
10077
- */
10185
+ var _a;
10078
10186
  const Link = createMaterial(LinkComponent, {
10079
10187
  displayName: '跳转指引',
10080
10188
  icon: '',
10081
10189
  category: 'template',
10082
10190
  type: 'Link',
10083
10191
  related: {
10084
- settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
10192
+ settingRender: (_a = settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle')) === null || _a === void 0 ? void 0 : _a.concat(linkSettingRender),
10085
10193
  bindableProps: []
10086
10194
  },
10087
10195
  defaulSetting: {
@@ -10100,6 +10208,18 @@ Made in Italy` })));
10100
10208
  width: 130,
10101
10209
  height: 20
10102
10210
  }
10211
+ },
10212
+ customTitle: {
10213
+ style: {
10214
+ textAlign: 'left',
10215
+ textDecoration: 'underline',
10216
+ fontWeight: 'bold',
10217
+ width: 130,
10218
+ height: 20,
10219
+ fontSize: 12,
10220
+ color: '#000'
10221
+ },
10222
+ text: '探索更多'
10103
10223
  }
10104
10224
  },
10105
10225
  style: {
@@ -13574,11 +13694,11 @@ Made in Italy` })));
13574
13694
  * @Author: lewinlu@chatlabs.com
13575
13695
  * @Date: 2024-01-03 14:39:09
13576
13696
  * @LastEditors: binruan@chatlabs.com
13577
- * @LastEditTime: 2024-06-07 14:05:08
13697
+ * @LastEditTime: 2024-07-02 18:25:17
13578
13698
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
13579
13699
  */
13580
13700
  const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
13581
- var _a;
13701
+ var _a, _b;
13582
13702
  const ref = React.useRef();
13583
13703
  const { isActive } = useSwiperSlide();
13584
13704
  const { sxpParameter, openHashtag } = useSxpDataSource();
@@ -13605,7 +13725,14 @@ Made in Italy` })));
13605
13725
  // if (!isActive) {
13606
13726
  // return <img src={sxpParameter?.placeholder_image} style={{ width, height, objectFit: 'cover' }} />;
13607
13727
  // }
13608
- return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, height: height, loop: true, autoplay: { delay: ((_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.delay) !== null && _a !== void 0 ? _a : 3) * 1000 } }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url, index) => {
13728
+ return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
13729
+ clickable: true,
13730
+ bulletActiveClass: 'swipe-item-active-bullet'
13731
+ }, className: css.css(Object.assign({}, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) && {
13732
+ '.swiper-pagination': {
13733
+ bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0
13734
+ }
13735
+ }))), height: height, loop: true, autoplay: { delay: ((_b = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.delay) !== null && _b !== void 0 ? _b : 3) * 1000 } }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url, index) => {
13609
13736
  return (React.createElement(SwiperSlide, { key: index },
13610
13737
  React.createElement(Picture, { src: !isLoad && index > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
13611
13738
  })));
@@ -13770,7 +13897,7 @@ Made in Italy` })));
13770
13897
  * @Author: binruan@chatlabs.com
13771
13898
  * @Date: 2024-03-26 10:07:41
13772
13899
  * @LastEditors: binruan@chatlabs.com
13773
- * @LastEditTime: 2024-07-01 17:47:33
13900
+ * @LastEditTime: 2024-07-03 10:07:29
13774
13901
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Nudge\index.tsx
13775
13902
  *
13776
13903
  */
@@ -13784,7 +13911,7 @@ Made in Italy` })));
13784
13911
  borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
13785
13912
  } },
13786
13913
  (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? (React.createElement("img", { src: nudge.icon, alt: 'nudge icon', style: { height: '100%', objectFit: 'cover', flexShrink: 0 } })) : null,
13787
- React.createElement("p", { style: Object.assign(Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle), { textWrap: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', flex: 1, marginBottom: 0 }), dangerouslySetInnerHTML: {
13914
+ React.createElement("p", { style: Object.assign(Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle), { textWrap: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', flex: 1, marginBottom: 0, marginTop: 0 }), dangerouslySetInnerHTML: {
13788
13915
  __html: setFontForText(nudge === null || nudge === void 0 ? void 0 : nudge.content, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle)
13789
13916
  } })))));
13790
13917
  };
@@ -13849,7 +13976,7 @@ Made in Italy` })));
13849
13976
  * @Author: binruan@chatlabs.com
13850
13977
  * @Date: 2024-01-15 19:03:09
13851
13978
  * @LastEditors: binruan@chatlabs.com
13852
- * @LastEditTime: 2024-07-01 11:49:58
13979
+ * @LastEditTime: 2024-07-02 17:55:40
13853
13980
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
13854
13981
  *
13855
13982
  */