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/index.css CHANGED
@@ -246,6 +246,14 @@
246
246
  overflow: hidden;
247
247
  word-wrap: break-word;
248
248
  }
249
+ .index-module_one-line-ellipsis__buFw1 {
250
+ display: -webkit-box;
251
+ -webkit-box-orient: vertical;
252
+ -webkit-line-clamp: 1;
253
+ text-overflow: ellipsis;
254
+ overflow: hidden;
255
+ word-break: break-all;
256
+ }
249
257
 
250
258
  .index-module_tow-line-ellipsis__yyHVb {
251
259
  display: -webkit-box;
@@ -1604,6 +1612,8 @@ button.swiper-pagination-bullet {
1604
1612
  box-sizing: border-box;
1605
1613
  gap: 6px;
1606
1614
  margin-left: 20px;
1615
+ -webkit-transform: translate3d(0px, 0px, 0px);
1616
+ transform: translate3d(0px, 0px, 0px);
1607
1617
  }
1608
1618
  .clc-sxp-bottom-text {
1609
1619
  padding: 0 20px;
package/dist/index.js CHANGED
@@ -10022,11 +10022,122 @@ const Appoint = createMaterial(AppointComponent, {
10022
10022
  sort: 6
10023
10023
  });
10024
10024
 
10025
- var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU"};
10025
+ /*
10026
+ * @Author: binruan@chatlabs.com
10027
+ * @Date: 2024-07-02 14:51:32
10028
+ * @LastEditors: binruan@chatlabs.com
10029
+ * @LastEditTime: 2024-07-02 16:44:34
10030
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
10031
+ *
10032
+ */
10033
+ var linkSettingRender = [
10034
+ {
10035
+ title: '自定义标题',
10036
+ child: [
10037
+ {
10038
+ type: 'Switch',
10039
+ label: '自定义标题开关',
10040
+ name: ['props', 'customTitle', 'display']
10041
+ },
10042
+ {
10043
+ type: 'Text',
10044
+ label: '标题文案',
10045
+ name: ['props', 'customTitle', 'text']
10046
+ },
10047
+ {
10048
+ type: 'Group',
10049
+ label: '尺寸',
10050
+ child: [
10051
+ {
10052
+ type: 'Number',
10053
+ name: ['props', 'customTitle', 'style', 'width'],
10054
+ addonAfter: 'W'
10055
+ },
10056
+ {
10057
+ type: 'Number',
10058
+ name: ['props', 'customTitle', 'style', 'height'],
10059
+ addonAfter: 'H'
10060
+ }
10061
+ ]
10062
+ },
10063
+ {
10064
+ type: 'Group',
10065
+ label: '圆角',
10066
+ child: [
10067
+ {
10068
+ type: 'Slider',
10069
+ name: ['props', 'customTitle', 'style', 'borderRadius'],
10070
+ max: 100
10071
+ },
10072
+ {
10073
+ type: 'Number',
10074
+ name: ['props', 'customTitle', 'style', 'borderRadius'],
10075
+ addonAfter: 'px',
10076
+ max: 100
10077
+ }
10078
+ ]
10079
+ },
10080
+ {
10081
+ type: 'Color',
10082
+ label: '背景色',
10083
+ name: ['props', 'customTitle', 'style', 'backgroundColor']
10084
+ },
10085
+ {
10086
+ type: 'Group',
10087
+ label: '字体',
10088
+ child: [
10089
+ {
10090
+ type: 'Select',
10091
+ name: ['props', 'customTitle', 'style', 'fontFamily-cn'],
10092
+ bottomText: '中文字体'
10093
+ },
10094
+ {
10095
+ type: 'Select',
10096
+ name: ['props', 'customTitle', 'style', 'fontFamily-en'],
10097
+ bottomText: '英文/其他字体'
10098
+ }
10099
+ ]
10100
+ },
10101
+ {
10102
+ type: 'Group',
10103
+ label: '',
10104
+ child: [
10105
+ {
10106
+ type: 'Color',
10107
+ name: ['props', 'customTitle', 'style', 'color']
10108
+ },
10109
+ {
10110
+ type: 'Number',
10111
+ addonAfter: 'px',
10112
+ name: ['props', 'customTitle', 'style', 'fontSize']
10113
+ }
10114
+ ]
10115
+ },
10116
+ {
10117
+ label: '样式',
10118
+ type: 'TextStyle',
10119
+ name: ['props', 'customTitle', 'style']
10120
+ },
10121
+ {
10122
+ label: '对齐',
10123
+ type: 'TextAlign',
10124
+ name: ['props', 'customTitle', 'style']
10125
+ },
10126
+ {
10127
+ label: '上边距',
10128
+ type: 'Number',
10129
+ name: ['props', 'customTitle', 'style', 'marginTop'],
10130
+ addonAfter: 'px'
10131
+ }
10132
+ ]
10133
+ }
10134
+ ];
10135
+
10136
+ var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
10026
10137
 
10027
10138
  const Link$1 = (_a) => {
10028
- var _b, _c, _d, _e, _f, _g, _h;
10029
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index"]);
10139
+ var _b, _c, _d, _e, _f, _g, _h, _j;
10140
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
10030
10141
  const { sxpParameter, bffEventReport } = useSxpDataSource();
10031
10142
  const { jumpToWeb } = useEventReport();
10032
10143
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
@@ -10046,27 +10157,24 @@ const Link$1 = (_a) => {
10046
10157
  width: '100%',
10047
10158
  overflow: 'hidden'
10048
10159
  }) },
10049
- React.createElement("div", { className: styles$5['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
10050
- __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)
10051
- } }))));
10160
+ React.createElement("div", null,
10161
+ 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: {
10162
+ __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)
10163
+ } }),
10164
+ (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: {
10165
+ __html: setFontForText(customTitle === null || customTitle === void 0 ? void 0 : customTitle.text, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style)
10166
+ } }))))));
10052
10167
  };
10053
10168
  var LinkComponent = memo(Link$1);
10054
10169
 
10055
- /*
10056
- * @Author: binruan@chatlabs.com
10057
- * @Date: 2023-07-28 18:29:57
10058
- * @LastEditors: binruan@chatlabs.com
10059
- * @LastEditTime: 2024-03-29 17:04:57
10060
- * @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\material.tsx
10061
- *
10062
- */
10170
+ var _a;
10063
10171
  const Link = createMaterial(LinkComponent, {
10064
10172
  displayName: '跳转指引',
10065
10173
  icon: '',
10066
10174
  category: 'template',
10067
10175
  type: 'Link',
10068
10176
  related: {
10069
- settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
10177
+ 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),
10070
10178
  bindableProps: []
10071
10179
  },
10072
10180
  defaulSetting: {
@@ -10085,6 +10193,18 @@ const Link = createMaterial(LinkComponent, {
10085
10193
  width: 130,
10086
10194
  height: 20
10087
10195
  }
10196
+ },
10197
+ customTitle: {
10198
+ style: {
10199
+ textAlign: 'left',
10200
+ textDecoration: 'underline',
10201
+ fontWeight: 'bold',
10202
+ width: 130,
10203
+ height: 20,
10204
+ fontSize: 12,
10205
+ color: '#000'
10206
+ },
10207
+ text: '探索更多'
10088
10208
  }
10089
10209
  },
10090
10210
  style: {
@@ -13559,11 +13679,11 @@ const Picture = (props) => {
13559
13679
  * @Author: lewinlu@chatlabs.com
13560
13680
  * @Date: 2024-01-03 14:39:09
13561
13681
  * @LastEditors: binruan@chatlabs.com
13562
- * @LastEditTime: 2024-06-07 14:05:08
13682
+ * @LastEditTime: 2024-07-02 18:25:17
13563
13683
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
13564
13684
  */
13565
13685
  const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
13566
- var _a;
13686
+ var _a, _b;
13567
13687
  const ref = useRef();
13568
13688
  const { isActive } = useSwiperSlide();
13569
13689
  const { sxpParameter, openHashtag } = useSxpDataSource();
@@ -13590,7 +13710,14 @@ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageE
13590
13710
  // if (!isActive) {
13591
13711
  // return <img src={sxpParameter?.placeholder_image} style={{ width, height, objectFit: 'cover' }} />;
13592
13712
  // }
13593
- 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) => {
13713
+ return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
13714
+ clickable: true,
13715
+ bulletActiveClass: 'swipe-item-active-bullet'
13716
+ }, className: css(Object.assign({}, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) && {
13717
+ '.swiper-pagination': {
13718
+ bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0
13719
+ }
13720
+ }))), 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) => {
13594
13721
  return (React.createElement(SwiperSlide, { key: index },
13595
13722
  React.createElement(Picture, { src: !isLoad && index > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
13596
13723
  })));
@@ -13755,7 +13882,7 @@ var RenderCard$1 = memo(RenderCard);
13755
13882
  * @Author: binruan@chatlabs.com
13756
13883
  * @Date: 2024-03-26 10:07:41
13757
13884
  * @LastEditors: binruan@chatlabs.com
13758
- * @LastEditTime: 2024-07-01 17:47:33
13885
+ * @LastEditTime: 2024-07-03 10:07:29
13759
13886
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Nudge\index.tsx
13760
13887
  *
13761
13888
  */
@@ -13769,7 +13896,7 @@ const Nudge = ({ nudge }) => {
13769
13896
  borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
13770
13897
  } },
13771
13898
  (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,
13772
- 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: {
13899
+ 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: {
13773
13900
  __html: setFontForText(nudge === null || nudge === void 0 ? void 0 : nudge.content, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle)
13774
13901
  } })))));
13775
13902
  };
@@ -13834,7 +13961,7 @@ var Tagbar$1 = memo(Tagbar);
13834
13961
  * @Author: binruan@chatlabs.com
13835
13962
  * @Date: 2024-01-15 19:03:09
13836
13963
  * @LastEditors: binruan@chatlabs.com
13837
- * @LastEditTime: 2024-07-01 11:49:58
13964
+ * @LastEditTime: 2024-07-02 17:55:40
13838
13965
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
13839
13966
  *
13840
13967
  */