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/pb-ui.js CHANGED
@@ -19401,7 +19401,8 @@ Made in Italy` })));
19401
19401
  // Carousel Section
19402
19402
  carouselSection: {
19403
19403
  width: '100%',
19404
- position: 'relative'
19404
+ position: 'relative',
19405
+ padding: '20px 16px'
19405
19406
  },
19406
19407
  carouselImageContainer: {
19407
19408
  width: '100%',
@@ -19432,7 +19433,7 @@ Made in Italy` })));
19432
19433
  },
19433
19434
  carouselInfoSection: {
19434
19435
  width: '100%',
19435
- padding: '20px',
19436
+ padding: '10px 20px',
19436
19437
  backgroundColor: '#000',
19437
19438
  color: '#fff',
19438
19439
  textAlign: 'center'
@@ -19628,7 +19629,7 @@ Made in Italy` })));
19628
19629
  }
19629
19630
  };
19630
19631
  const StructurePage = (_a) => {
19631
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19632
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
19632
19633
  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"]);
19633
19634
  const [data, setData] = React.useState(null);
19634
19635
  const [loading, setLoading] = React.useState(true);
@@ -19713,7 +19714,7 @@ Made in Italy` })));
19713
19714
  const config = multiCTAConfig[configKey];
19714
19715
  // 定义允许的样式属性列表
19715
19716
  const styleKeys = [
19716
- 'fontSize', 'color', 'textAlign', 'fontWeight',
19717
+ 'fontSize', 'color', 'textAlign', 'fontWeight', 'fontStyle', 'textDecoration',
19717
19718
  'backgroundColor', 'padding', 'margin', 'borderRadius',
19718
19719
  'showBorder', 'borderWidth', 'borderColor',
19719
19720
  'buttonBackgroundColor', 'buttonTextColor', 'buttonWidth', 'buttonHeight'
@@ -19740,8 +19741,16 @@ Made in Italy` })));
19740
19741
  if (styleConfig.textAlign && typeof styleConfig.textAlign === 'string') {
19741
19742
  customStyle.textAlign = styleConfig.textAlign;
19742
19743
  }
19743
- if (styleConfig.fontWeight && typeof styleConfig.fontWeight === 'number') {
19744
- customStyle.fontWeight = styleConfig.fontWeight;
19744
+ if (styleConfig.fontWeight) {
19745
+ customStyle.fontWeight = typeof styleConfig.fontWeight === 'number'
19746
+ ? styleConfig.fontWeight
19747
+ : styleConfig.fontWeight;
19748
+ }
19749
+ if (styleConfig.fontStyle && typeof styleConfig.fontStyle === 'string') {
19750
+ customStyle.fontStyle = styleConfig.fontStyle;
19751
+ }
19752
+ if (styleConfig.textDecoration && typeof styleConfig.textDecoration === 'string') {
19753
+ customStyle.textDecoration = styleConfig.textDecoration;
19745
19754
  }
19746
19755
  if (styleConfig.backgroundColor && typeof styleConfig.backgroundColor === 'string') {
19747
19756
  customStyle.backgroundColor = styleConfig.backgroundColor;
@@ -20020,8 +20029,8 @@ Made in Italy` })));
20020
20029
  React.createElement("video", { ref: heroVideoRef, src: data.heroSection.url, style: baseStyles.heroVideo, autoPlay: true, muted: true, loop: true, playsInline: true, controls: false }),
20021
20030
  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,
20022
20031
  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))))),
20023
- data.carouselSection && data.carouselSection.length > 0 && (React.createElement("div", { style: mergeStyles(baseStyles.carouselSection, 'carouselSection') },
20024
- React.createElement("div", { style: baseStyles.carouselImageContainer },
20032
+ 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 })) },
20033
+ 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 })) },
20025
20034
  React.createElement("div", { style: Object.assign(Object.assign({}, baseStyles.carouselContainer), { transform: `translateX(-${carouselIndex * 100}%)` }) }, data.carouselSection.map((item, index) => {
20026
20035
  var _a;
20027
20036
  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) },
@@ -20033,13 +20042,14 @@ Made in Italy` })));
20033
20042
  React.createElement("button", { style: Object.assign(Object.assign({}, baseStyles.arrowButton), { left: '10px' }), onClick: handleCarouselPrev }, "\u2039"),
20034
20043
  React.createElement("button", { style: Object.assign(Object.assign({}, baseStyles.arrowButton), { right: '10px' }), onClick: handleCarouselNext }, "\u203A")),
20035
20044
  React.createElement("div", { style: mergeStyles(baseStyles.carouselInfoSection, 'carouselSection') },
20036
- ((_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)),
20037
- 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)))),
20045
+ ((_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)),
20046
+ 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)))),
20038
20047
  data.highlightRevealSection && (React.createElement("div", { style: mergeStyles(baseStyles.highlightSection, 'highlightSection') },
20039
20048
  React.createElement("div", { style: baseStyles.highlightImageContainer },
20040
20049
  React.createElement("img", { src: data.highlightRevealSection.landingImageUrl || data.highlightRevealSection.cover, alt: data.highlightRevealSection.title, style: baseStyles.highlightImage })),
20041
20050
  React.createElement("div", { style: mergeStyles(baseStyles.highlightInfoSection, 'highlightSection') },
20042
- React.createElement("div", { style: mergeStyles(baseStyles.highlightTitle, 'highlightSection') }, data.highlightRevealSection.title),
20051
+ data.highlightRevealSection.text && (React.createElement("div", { style: { marginBottom: '10px' } },
20052
+ React.createElement("div", { style: mergeStyles(baseStyles.highlightTitle, 'highlightSection') }, data.highlightRevealSection.text))),
20043
20053
  renderCTA('highlightButton', data.highlightRevealSection.bindCta, data.highlightRevealSection, baseStyles.highlightButton)))),
20044
20054
  data.productGridSection && data.productGridSection.length > 0 && (React.createElement("div", { style: mergeStyles(baseStyles.productGrid, 'productGrid') }, (() => {
20045
20055
  // 创建一个6格的网格 (3行 x 2列),根据position放置产品
@@ -20089,7 +20099,10 @@ Made in Italy` })));
20089
20099
  });
20090
20100
  })())),
20091
20101
  data.footerSection && (React.createElement("div", { style: mergeStyles(baseStyles.footerSection, 'footerSection') },
20092
- React.createElement("div", { style: mergeStyles(baseStyles.footerInfoSection, 'footerSection') }, renderCTA('footerButton', data.footerSection.bindCta, data.footerSection, baseStyles.footerButton)),
20102
+ React.createElement("div", { style: mergeStyles(baseStyles.footerInfoSection, 'footerSection') },
20103
+ data.footerSection.text && (React.createElement("div", { style: { marginBottom: '15px' } },
20104
+ React.createElement("div", { style: mergeStyles(baseStyles.footerText, 'footerSection') }, data.footerSection.text))),
20105
+ renderCTA('footerButton', data.footerSection.bindCta, data.footerSection, baseStyles.footerButton)),
20093
20106
  React.createElement("div", { style: baseStyles.footerImageContainer },
20094
20107
  React.createElement("img", { src: data.footerSection.landingImageUrl || data.footerSection.cover, alt: data.footerSection.title, style: baseStyles.footerImage }))))));
20095
20108
  };