pb-sxp-ui 1.20.29 → 1.20.30

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.js CHANGED
@@ -19386,7 +19386,8 @@ const baseStyles = {
19386
19386
  // Carousel Section
19387
19387
  carouselSection: {
19388
19388
  width: '100%',
19389
- position: 'relative'
19389
+ position: 'relative',
19390
+ padding: '20px 16px'
19390
19391
  },
19391
19392
  carouselImageContainer: {
19392
19393
  width: '100%',
@@ -19417,7 +19418,7 @@ const baseStyles = {
19417
19418
  },
19418
19419
  carouselInfoSection: {
19419
19420
  width: '100%',
19420
- padding: '20px',
19421
+ padding: '10px 20px',
19421
19422
  backgroundColor: '#000',
19422
19423
  color: '#fff',
19423
19424
  textAlign: 'center'
@@ -19613,7 +19614,7 @@ const baseStyles = {
19613
19614
  }
19614
19615
  };
19615
19616
  const StructurePage = (_a) => {
19616
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19617
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
19617
19618
  var { containerStyle, containerHeight = 664, containerWidth = 375, className = '', apiUrl = 'https://bff-be-dev.chatlabs.net/api/v1/recommend/list', requestBody, editorMode = false, multiCTAConfig: propMultiCTAConfig, videoPlayIcon: propVideoPlayIcon, isCmsMode = false, storyId, customHeaders } = _a, rest = __rest(_a, ["containerStyle", "containerHeight", "containerWidth", "className", "apiUrl", "requestBody", "editorMode", "multiCTAConfig", "videoPlayIcon", "isCmsMode", "storyId", "customHeaders"]);
19618
19619
  const [data, setData] = useState(null);
19619
19620
  const [loading, setLoading] = useState(true);
@@ -19698,7 +19699,7 @@ const StructurePage = (_a) => {
19698
19699
  const config = multiCTAConfig[configKey];
19699
19700
  // 定义允许的样式属性列表
19700
19701
  const styleKeys = [
19701
- 'fontSize', 'color', 'textAlign', 'fontWeight',
19702
+ 'fontSize', 'color', 'textAlign', 'fontWeight', 'fontStyle', 'textDecoration',
19702
19703
  'backgroundColor', 'padding', 'margin', 'borderRadius',
19703
19704
  'showBorder', 'borderWidth', 'borderColor',
19704
19705
  'buttonBackgroundColor', 'buttonTextColor', 'buttonWidth', 'buttonHeight'
@@ -19725,8 +19726,16 @@ const StructurePage = (_a) => {
19725
19726
  if (styleConfig.textAlign && typeof styleConfig.textAlign === 'string') {
19726
19727
  customStyle.textAlign = styleConfig.textAlign;
19727
19728
  }
19728
- if (styleConfig.fontWeight && typeof styleConfig.fontWeight === 'number') {
19729
- customStyle.fontWeight = styleConfig.fontWeight;
19729
+ if (styleConfig.fontWeight) {
19730
+ customStyle.fontWeight = typeof styleConfig.fontWeight === 'number'
19731
+ ? styleConfig.fontWeight
19732
+ : styleConfig.fontWeight;
19733
+ }
19734
+ if (styleConfig.fontStyle && typeof styleConfig.fontStyle === 'string') {
19735
+ customStyle.fontStyle = styleConfig.fontStyle;
19736
+ }
19737
+ if (styleConfig.textDecoration && typeof styleConfig.textDecoration === 'string') {
19738
+ customStyle.textDecoration = styleConfig.textDecoration;
19730
19739
  }
19731
19740
  if (styleConfig.backgroundColor && typeof styleConfig.backgroundColor === 'string') {
19732
19741
  customStyle.backgroundColor = styleConfig.backgroundColor;
@@ -20005,8 +20014,8 @@ const StructurePage = (_a) => {
20005
20014
  React.createElement("video", { ref: heroVideoRef, src: data.heroSection.url, style: baseStyles.heroVideo, autoPlay: true, muted: true, loop: true, playsInline: true, controls: false }),
20006
20015
  isHeroVideoPaused && (React.createElement(FormatImage$1, { className: 'clc-pb-video-pause', src: videoPlayIcon, alt: 'play' })))) : ((_e = data.heroSection.imgUrls) === null || _e === void 0 ? void 0 : _e[0]) ? (React.createElement("img", { src: data.heroSection.imgUrls[0], alt: 'Hero', style: baseStyles.heroImage })) : null,
20007
20016
  React.createElement("div", { style: baseStyles.heroOverlay }, renderCTA('heroButton', (_g = (_f = data.heroSection.bindProducts) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.bindCta, (_h = data.heroSection.bindProducts) === null || _h === void 0 ? void 0 : _h[0], baseStyles.heroButton))))),
20008
- data.carouselSection && data.carouselSection.length > 0 && (React.createElement("div", { style: mergeStyles(baseStyles.carouselSection, 'carouselSection') },
20009
- React.createElement("div", { style: baseStyles.carouselImageContainer },
20017
+ data.carouselSection && data.carouselSection.length > 0 && (React.createElement("div", { style: Object.assign(Object.assign({}, mergeStyles(baseStyles.carouselSection, 'carouselSection')), (((_j = multiCTAConfig === null || multiCTAConfig === void 0 ? void 0 : multiCTAConfig.carouselContainerStyle) === null || _j === void 0 ? void 0 : _j.padding) && { padding: multiCTAConfig.carouselContainerStyle.padding })) },
20018
+ React.createElement("div", { style: Object.assign(Object.assign({}, baseStyles.carouselImageContainer), (((_k = multiCTAConfig === null || multiCTAConfig === void 0 ? void 0 : multiCTAConfig.carouselContainerStyle) === null || _k === void 0 ? void 0 : _k.aspectRatio) && { aspectRatio: multiCTAConfig.carouselContainerStyle.aspectRatio })) },
20010
20019
  React.createElement("div", { style: Object.assign(Object.assign({}, baseStyles.carouselContainer), { transform: `translateX(-${carouselIndex * 100}%)` }) }, data.carouselSection.map((item, index) => {
20011
20020
  var _a;
20012
20021
  return (React.createElement("div", { key: item.itemId, style: baseStyles.carouselSlide }, item.url ? (React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' }, onClick: () => handleCarouselVideoClick(index) },
@@ -20018,13 +20027,14 @@ const StructurePage = (_a) => {
20018
20027
  React.createElement("button", { style: Object.assign(Object.assign({}, baseStyles.arrowButton), { left: '10px' }), onClick: handleCarouselPrev }, "\u2039"),
20019
20028
  React.createElement("button", { style: Object.assign(Object.assign({}, baseStyles.arrowButton), { right: '10px' }), onClick: handleCarouselNext }, "\u203A")),
20020
20029
  React.createElement("div", { style: mergeStyles(baseStyles.carouselInfoSection, 'carouselSection') },
20021
- ((_j = data.carouselSection[carouselIndex]) === null || _j === void 0 ? void 0 : _j.text) && (React.createElement("div", { style: mergeStyles(baseStyles.carouselText, 'carouselSection') }, (_k = data.carouselSection[carouselIndex]) === null || _k === void 0 ? void 0 : _k.text)),
20022
- renderCTA('carouselButton', (_o = (_m = (_l = data.carouselSection[carouselIndex]) === null || _l === void 0 ? void 0 : _l.bindProducts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.bindCta, (_q = (_p = data.carouselSection[carouselIndex]) === null || _p === void 0 ? void 0 : _p.bindProducts) === null || _q === void 0 ? void 0 : _q[0], baseStyles.carouselButton)))),
20030
+ ((_l = data.carouselSection[carouselIndex]) === null || _l === void 0 ? void 0 : _l.text) && (React.createElement("div", { style: mergeStyles(baseStyles.carouselText, 'carouselSection') }, (_m = data.carouselSection[carouselIndex]) === null || _m === void 0 ? void 0 : _m.text)),
20031
+ renderCTA('carouselButton', (_q = (_p = (_o = data.carouselSection[carouselIndex]) === null || _o === void 0 ? void 0 : _o.bindProducts) === null || _p === void 0 ? void 0 : _p[0]) === null || _q === void 0 ? void 0 : _q.bindCta, (_s = (_r = data.carouselSection[carouselIndex]) === null || _r === void 0 ? void 0 : _r.bindProducts) === null || _s === void 0 ? void 0 : _s[0], baseStyles.carouselButton)))),
20023
20032
  data.highlightRevealSection && (React.createElement("div", { style: mergeStyles(baseStyles.highlightSection, 'highlightSection') },
20024
20033
  React.createElement("div", { style: baseStyles.highlightImageContainer },
20025
20034
  React.createElement("img", { src: data.highlightRevealSection.landingImageUrl || data.highlightRevealSection.cover, alt: data.highlightRevealSection.title, style: baseStyles.highlightImage })),
20026
20035
  React.createElement("div", { style: mergeStyles(baseStyles.highlightInfoSection, 'highlightSection') },
20027
- React.createElement("div", { style: mergeStyles(baseStyles.highlightTitle, 'highlightSection') }, data.highlightRevealSection.title),
20036
+ data.highlightRevealSection.text && (React.createElement("div", { style: { marginBottom: '10px' } },
20037
+ React.createElement("div", { style: mergeStyles(baseStyles.highlightTitle, 'highlightSection') }, data.highlightRevealSection.text))),
20028
20038
  renderCTA('highlightButton', data.highlightRevealSection.bindCta, data.highlightRevealSection, baseStyles.highlightButton)))),
20029
20039
  data.productGridSection && data.productGridSection.length > 0 && (React.createElement("div", { style: mergeStyles(baseStyles.productGrid, 'productGrid') }, (() => {
20030
20040
  // 创建一个6格的网格 (3行 x 2列),根据position放置产品
@@ -20074,7 +20084,10 @@ const StructurePage = (_a) => {
20074
20084
  });
20075
20085
  })())),
20076
20086
  data.footerSection && (React.createElement("div", { style: mergeStyles(baseStyles.footerSection, 'footerSection') },
20077
- React.createElement("div", { style: mergeStyles(baseStyles.footerInfoSection, 'footerSection') }, renderCTA('footerButton', data.footerSection.bindCta, data.footerSection, baseStyles.footerButton)),
20087
+ React.createElement("div", { style: mergeStyles(baseStyles.footerInfoSection, 'footerSection') },
20088
+ data.footerSection.text && (React.createElement("div", { style: { marginBottom: '15px' } },
20089
+ React.createElement("div", { style: mergeStyles(baseStyles.footerText, 'footerSection') }, data.footerSection.text))),
20090
+ renderCTA('footerButton', data.footerSection.bindCta, data.footerSection, baseStyles.footerButton)),
20078
20091
  React.createElement("div", { style: baseStyles.footerImageContainer },
20079
20092
  React.createElement("img", { src: data.footerSection.landingImageUrl || data.footerSection.cover, alt: data.footerSection.title, style: baseStyles.footerImage }))))));
20080
20093
  };