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.cjs +148 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +10 -0
- package/dist/index.js +148 -21
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +148 -21
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/Nudge/index.js +1 -1
- package/es/core/components/SxpPageRender/PictureGroup/index.js +10 -2
- package/es/core/components/SxpPageRender/index.d.ts +1 -0
- package/es/materials/sxp/template/Link/index.d.ts +6 -1
- package/es/materials/sxp/template/Link/index.js +9 -5
- package/es/materials/sxp/template/Link/material.js +15 -1
- package/es/materials/sxp/template/Link/settingRender.d.ts +57 -0
- package/es/materials/sxp/template/Link/settingRender.js +102 -0
- package/lib/core/components/SxpPageRender/Nudge/index.js +1 -1
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +10 -2
- package/lib/core/components/SxpPageRender/index.d.ts +1 -0
- package/lib/materials/sxp/template/Link/index.d.ts +6 -1
- package/lib/materials/sxp/template/Link/index.js +9 -5
- package/lib/materials/sxp/template/Link/material.js +15 -1
- package/lib/materials/sxp/template/Link/settingRender.d.ts +57 -0
- package/lib/materials/sxp/template/Link/settingRender.js +104 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -10044,11 +10044,122 @@ const Appoint = createMaterial(AppointComponent, {
|
|
10044
10044
|
sort: 6
|
10045
10045
|
});
|
10046
10046
|
|
10047
|
-
|
10047
|
+
/*
|
10048
|
+
* @Author: binruan@chatlabs.com
|
10049
|
+
* @Date: 2024-07-02 14:51:32
|
10050
|
+
* @LastEditors: binruan@chatlabs.com
|
10051
|
+
* @LastEditTime: 2024-07-02 16:44:34
|
10052
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
|
10053
|
+
*
|
10054
|
+
*/
|
10055
|
+
var linkSettingRender = [
|
10056
|
+
{
|
10057
|
+
title: '自定义标题',
|
10058
|
+
child: [
|
10059
|
+
{
|
10060
|
+
type: 'Switch',
|
10061
|
+
label: '自定义标题开关',
|
10062
|
+
name: ['props', 'customTitle', 'display']
|
10063
|
+
},
|
10064
|
+
{
|
10065
|
+
type: 'Text',
|
10066
|
+
label: '标题文案',
|
10067
|
+
name: ['props', 'customTitle', 'text']
|
10068
|
+
},
|
10069
|
+
{
|
10070
|
+
type: 'Group',
|
10071
|
+
label: '尺寸',
|
10072
|
+
child: [
|
10073
|
+
{
|
10074
|
+
type: 'Number',
|
10075
|
+
name: ['props', 'customTitle', 'style', 'width'],
|
10076
|
+
addonAfter: 'W'
|
10077
|
+
},
|
10078
|
+
{
|
10079
|
+
type: 'Number',
|
10080
|
+
name: ['props', 'customTitle', 'style', 'height'],
|
10081
|
+
addonAfter: 'H'
|
10082
|
+
}
|
10083
|
+
]
|
10084
|
+
},
|
10085
|
+
{
|
10086
|
+
type: 'Group',
|
10087
|
+
label: '圆角',
|
10088
|
+
child: [
|
10089
|
+
{
|
10090
|
+
type: 'Slider',
|
10091
|
+
name: ['props', 'customTitle', 'style', 'borderRadius'],
|
10092
|
+
max: 100
|
10093
|
+
},
|
10094
|
+
{
|
10095
|
+
type: 'Number',
|
10096
|
+
name: ['props', 'customTitle', 'style', 'borderRadius'],
|
10097
|
+
addonAfter: 'px',
|
10098
|
+
max: 100
|
10099
|
+
}
|
10100
|
+
]
|
10101
|
+
},
|
10102
|
+
{
|
10103
|
+
type: 'Color',
|
10104
|
+
label: '背景色',
|
10105
|
+
name: ['props', 'customTitle', 'style', 'backgroundColor']
|
10106
|
+
},
|
10107
|
+
{
|
10108
|
+
type: 'Group',
|
10109
|
+
label: '字体',
|
10110
|
+
child: [
|
10111
|
+
{
|
10112
|
+
type: 'Select',
|
10113
|
+
name: ['props', 'customTitle', 'style', 'fontFamily-cn'],
|
10114
|
+
bottomText: '中文字体'
|
10115
|
+
},
|
10116
|
+
{
|
10117
|
+
type: 'Select',
|
10118
|
+
name: ['props', 'customTitle', 'style', 'fontFamily-en'],
|
10119
|
+
bottomText: '英文/其他字体'
|
10120
|
+
}
|
10121
|
+
]
|
10122
|
+
},
|
10123
|
+
{
|
10124
|
+
type: 'Group',
|
10125
|
+
label: '',
|
10126
|
+
child: [
|
10127
|
+
{
|
10128
|
+
type: 'Color',
|
10129
|
+
name: ['props', 'customTitle', 'style', 'color']
|
10130
|
+
},
|
10131
|
+
{
|
10132
|
+
type: 'Number',
|
10133
|
+
addonAfter: 'px',
|
10134
|
+
name: ['props', 'customTitle', 'style', 'fontSize']
|
10135
|
+
}
|
10136
|
+
]
|
10137
|
+
},
|
10138
|
+
{
|
10139
|
+
label: '样式',
|
10140
|
+
type: 'TextStyle',
|
10141
|
+
name: ['props', 'customTitle', 'style']
|
10142
|
+
},
|
10143
|
+
{
|
10144
|
+
label: '对齐',
|
10145
|
+
type: 'TextAlign',
|
10146
|
+
name: ['props', 'customTitle', 'style']
|
10147
|
+
},
|
10148
|
+
{
|
10149
|
+
label: '上边距',
|
10150
|
+
type: 'Number',
|
10151
|
+
name: ['props', 'customTitle', 'style', 'marginTop'],
|
10152
|
+
addonAfter: 'px'
|
10153
|
+
}
|
10154
|
+
]
|
10155
|
+
}
|
10156
|
+
];
|
10157
|
+
|
10158
|
+
var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
|
10048
10159
|
|
10049
10160
|
const Link$1 = (_a) => {
|
10050
|
-
var _b, _c, _d, _e, _f, _g, _h;
|
10051
|
-
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index"]);
|
10161
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
10162
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
|
10052
10163
|
const { sxpParameter, bffEventReport } = useSxpDataSource();
|
10053
10164
|
const { jumpToWeb } = useEventReport();
|
10054
10165
|
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
@@ -10068,27 +10179,24 @@ const Link$1 = (_a) => {
|
|
10068
10179
|
width: '100%',
|
10069
10180
|
overflow: 'hidden'
|
10070
10181
|
}) },
|
10071
|
-
React.createElement("div",
|
10072
|
-
|
10073
|
-
|
10182
|
+
React.createElement("div", null,
|
10183
|
+
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: {
|
10184
|
+
__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)
|
10185
|
+
} }),
|
10186
|
+
(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: {
|
10187
|
+
__html: setFontForText(customTitle === null || customTitle === void 0 ? void 0 : customTitle.text, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style)
|
10188
|
+
} }))))));
|
10074
10189
|
};
|
10075
10190
|
var LinkComponent = React.memo(Link$1);
|
10076
10191
|
|
10077
|
-
|
10078
|
-
* @Author: binruan@chatlabs.com
|
10079
|
-
* @Date: 2023-07-28 18:29:57
|
10080
|
-
* @LastEditors: binruan@chatlabs.com
|
10081
|
-
* @LastEditTime: 2024-03-29 17:04:57
|
10082
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\material.tsx
|
10083
|
-
*
|
10084
|
-
*/
|
10192
|
+
var _a;
|
10085
10193
|
const Link = createMaterial(LinkComponent, {
|
10086
10194
|
displayName: '跳转指引',
|
10087
10195
|
icon: '',
|
10088
10196
|
category: 'template',
|
10089
10197
|
type: 'Link',
|
10090
10198
|
related: {
|
10091
|
-
settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
|
10199
|
+
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),
|
10092
10200
|
bindableProps: []
|
10093
10201
|
},
|
10094
10202
|
defaulSetting: {
|
@@ -10107,6 +10215,18 @@ const Link = createMaterial(LinkComponent, {
|
|
10107
10215
|
width: 130,
|
10108
10216
|
height: 20
|
10109
10217
|
}
|
10218
|
+
},
|
10219
|
+
customTitle: {
|
10220
|
+
style: {
|
10221
|
+
textAlign: 'left',
|
10222
|
+
textDecoration: 'underline',
|
10223
|
+
fontWeight: 'bold',
|
10224
|
+
width: 130,
|
10225
|
+
height: 20,
|
10226
|
+
fontSize: 12,
|
10227
|
+
color: '#000'
|
10228
|
+
},
|
10229
|
+
text: '探索更多'
|
10110
10230
|
}
|
10111
10231
|
},
|
10112
10232
|
style: {
|
@@ -13581,11 +13701,11 @@ const Picture = (props) => {
|
|
13581
13701
|
* @Author: lewinlu@chatlabs.com
|
13582
13702
|
* @Date: 2024-01-03 14:39:09
|
13583
13703
|
* @LastEditors: binruan@chatlabs.com
|
13584
|
-
* @LastEditTime: 2024-
|
13704
|
+
* @LastEditTime: 2024-07-02 18:25:17
|
13585
13705
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
|
13586
13706
|
*/
|
13587
13707
|
const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
|
13588
|
-
var _a;
|
13708
|
+
var _a, _b;
|
13589
13709
|
const ref = React.useRef();
|
13590
13710
|
const { isActive } = useSwiperSlide();
|
13591
13711
|
const { sxpParameter, openHashtag } = useSxpDataSource();
|
@@ -13612,7 +13732,14 @@ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageE
|
|
13612
13732
|
// if (!isActive) {
|
13613
13733
|
// return <img src={sxpParameter?.placeholder_image} style={{ width, height, objectFit: 'cover' }} />;
|
13614
13734
|
// }
|
13615
|
-
return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
13735
|
+
return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
13736
|
+
clickable: true,
|
13737
|
+
bulletActiveClass: 'swipe-item-active-bullet'
|
13738
|
+
}, className: css.css(Object.assign({}, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) && {
|
13739
|
+
'.swiper-pagination': {
|
13740
|
+
bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0
|
13741
|
+
}
|
13742
|
+
}))), 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) => {
|
13616
13743
|
return (React.createElement(SwiperSlide, { key: index },
|
13617
13744
|
React.createElement(Picture, { src: !isLoad && index > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
|
13618
13745
|
})));
|
@@ -13777,7 +13904,7 @@ var RenderCard$1 = React.memo(RenderCard);
|
|
13777
13904
|
* @Author: binruan@chatlabs.com
|
13778
13905
|
* @Date: 2024-03-26 10:07:41
|
13779
13906
|
* @LastEditors: binruan@chatlabs.com
|
13780
|
-
* @LastEditTime: 2024-07-
|
13907
|
+
* @LastEditTime: 2024-07-03 10:07:29
|
13781
13908
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Nudge\index.tsx
|
13782
13909
|
*
|
13783
13910
|
*/
|
@@ -13791,7 +13918,7 @@ const Nudge = ({ nudge }) => {
|
|
13791
13918
|
borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
|
13792
13919
|
} },
|
13793
13920
|
(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,
|
13794
|
-
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: {
|
13921
|
+
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: {
|
13795
13922
|
__html: setFontForText(nudge === null || nudge === void 0 ? void 0 : nudge.content, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle)
|
13796
13923
|
} })))));
|
13797
13924
|
};
|
@@ -13856,7 +13983,7 @@ var Tagbar$1 = React.memo(Tagbar);
|
|
13856
13983
|
* @Author: binruan@chatlabs.com
|
13857
13984
|
* @Date: 2024-01-15 19:03:09
|
13858
13985
|
* @LastEditors: binruan@chatlabs.com
|
13859
|
-
* @LastEditTime: 2024-07-
|
13986
|
+
* @LastEditTime: 2024-07-02 17:55:40
|
13860
13987
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
13861
13988
|
*
|
13862
13989
|
*/
|