pb-sxp-ui 1.0.41 → 1.0.42

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.
Files changed (38) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +111 -111
  3. package/dist/index.cjs +111 -27
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +48 -3
  6. package/dist/index.js +111 -27
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.min.cjs +3 -3
  9. package/dist/index.min.cjs.map +1 -1
  10. package/dist/index.min.js +3 -3
  11. package/dist/index.min.js.map +1 -1
  12. package/dist/pb-ui.js +111 -27
  13. package/dist/pb-ui.js.map +1 -1
  14. package/dist/pb-ui.min.js +3 -3
  15. package/dist/pb-ui.min.js.map +1 -1
  16. package/es/core/components/DiyPortalPreview/index.js +21 -6
  17. package/es/core/components/SxpPageCore/index.js +2 -2
  18. package/es/core/components/SxpPageRender/Nudge/index.js +6 -5
  19. package/es/core/components/SxpPageRender/Tagbar.d.ts +7 -0
  20. package/es/core/components/SxpPageRender/Tagbar.js +37 -0
  21. package/es/core/components/SxpPageRender/index.d.ts +2 -0
  22. package/es/core/components/SxpPageRender/index.js +14 -5
  23. package/es/core/context/SxpDataSourceProvider.d.ts +3 -0
  24. package/es/core/context/SxpDataSourceProvider.js +28 -4
  25. package/es/materials/sxp/popup/CommodityDetail/index.js +4 -4
  26. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  27. package/lib/core/components/DiyPortalPreview/index.js +21 -6
  28. package/lib/core/components/SxpPageCore/index.js +2 -2
  29. package/lib/core/components/SxpPageRender/Nudge/index.js +6 -5
  30. package/lib/core/components/SxpPageRender/Tagbar.d.ts +7 -0
  31. package/lib/core/components/SxpPageRender/Tagbar.js +40 -0
  32. package/lib/core/components/SxpPageRender/index.d.ts +2 -0
  33. package/lib/core/components/SxpPageRender/index.js +14 -5
  34. package/lib/core/context/SxpDataSourceProvider.d.ts +3 -0
  35. package/lib/core/context/SxpDataSourceProvider.js +28 -4
  36. package/lib/materials/sxp/popup/CommodityDetail/index.js +4 -4
  37. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  38. package/package.json +115 -115
package/dist/index.css CHANGED
@@ -1287,6 +1287,51 @@ button.swiper-pagination-bullet {
1287
1287
  height: 100%;
1288
1288
  overflow: hidden;
1289
1289
  }
1290
+ .clc-sxp-tagbar {
1291
+ z-index: 8;
1292
+ background-color: #fff;
1293
+ overflow-x: auto;
1294
+ padding: 0 12px;
1295
+ text-align: center;
1296
+ }
1297
+ .clc-sxp-tagbar-list {
1298
+ display: -webkit-inline-box;
1299
+ display: -webkit-inline-flex;
1300
+ display: -ms-inline-flexbox;
1301
+ display: inline-flex;
1302
+ -webkit-box-align: center;
1303
+ -webkit-align-items: center;
1304
+ -ms-flex-align: center;
1305
+ align-items: center;
1306
+ -webkit-flex-wrap: nowrap;
1307
+ -ms-flex-wrap: nowrap;
1308
+ flex-wrap: nowrap;
1309
+ height: 100%;
1310
+ }
1311
+ .clc-sxp-tagbar-list-item {
1312
+ cursor: pointer;
1313
+ font-size: 14px;
1314
+ text-wrap: nowrap;
1315
+ }
1316
+ .clc-sxp-tagbar-list-item-active {
1317
+ position: relative;
1318
+ }
1319
+ .clc-sxp-tagbar-list-item-active::after {
1320
+ content: '';
1321
+ position: absolute;
1322
+ bottom: -2px;
1323
+ left: 50%;
1324
+ -webkit-transform: translateX(-8px);
1325
+ transform: translateX(-8px);
1326
+ height: 1px;
1327
+ border-radius: 6px;
1328
+ width: 18px;
1329
+ background-color: #000;
1330
+ }
1331
+ .clc-sxp-tagbar::-webkit-scrollbar {
1332
+ width: 0;
1333
+ height: 0;
1334
+ }
1290
1335
  .clc-sxp-like-button {
1291
1336
  position: absolute;
1292
1337
  right: 0;
@@ -1309,10 +1354,10 @@ button.swiper-pagination-bullet {
1309
1354
  text-align: center;
1310
1355
  }
1311
1356
  .clc-sxp-logo-banner img {
1312
- height: 45px;
1357
+ height: 100%;
1313
1358
  width: 50%;
1314
- -o-object-fit: contain;
1315
- object-fit: contain;
1359
+ -o-object-fit: cover;
1360
+ object-fit: cover;
1316
1361
  }
1317
1362
  .clc-sxp-bottom {
1318
1363
  z-index: 10;
package/dist/index.js CHANGED
@@ -408,7 +408,8 @@ function useIconLink(path, domain) {
408
408
  }
409
409
 
410
410
  const SxpDataSourceContext = createContext({
411
- rtcList: []
411
+ rtcList: [],
412
+ tagList: []
412
413
  });
413
414
  var DataSourceType;
414
415
  (function (DataSourceType) {
@@ -417,6 +418,7 @@ var DataSourceType;
417
418
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
418
419
  const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false }) => {
419
420
  const [rtcList, setRtcList] = useState([]);
421
+ const [tagList, setTagList] = useState([]);
420
422
  const [loading, setLoading] = useState(false);
421
423
  const [curReqInfo, setCurReqInfo] = useState({ rtc: '', requestId: '' });
422
424
  const swiperRef = useRef(null);
@@ -540,6 +542,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
540
542
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/customform', { method: 'POST', body }));
541
543
  return res === null || res === void 0 ? void 0 : res.success;
542
544
  }), [bffFetch]);
545
+ // 获取 Tag
546
+ const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
547
+ var _g, _h;
548
+ if (!utmVal)
549
+ return;
550
+ try {
551
+ const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: utmVal } }));
552
+ setTagList((_h = (_g = result === null || result === void 0 ? void 0 : result.data) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []);
553
+ }
554
+ catch (e) {
555
+ console.log('e', e);
556
+ }
557
+ }), [bffFetch, utmVal]);
543
558
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
544
559
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
545
560
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -560,6 +575,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
560
575
  }, [bffEventReport, isFromHashtag]);
561
576
  useEffect(() => {
562
577
  setLoading(true);
578
+ bffGetTagList();
563
579
  getRecommendVideos()
564
580
  .then((data) => {
565
581
  var _a, _b;
@@ -575,6 +591,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
575
591
  if (!isInit.current)
576
592
  return;
577
593
  setLoading(true);
594
+ bffGetTagList();
578
595
  getRecommendVideos()
579
596
  .then((data) => {
580
597
  var _a, _b;
@@ -584,7 +601,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
584
601
  .finally(() => {
585
602
  setLoading(false);
586
603
  });
587
- }, [getRecommendVideos]);
604
+ }, [getRecommendVideos, bffGetTagList]);
588
605
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
589
606
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
590
607
  rtcList,
@@ -616,8 +633,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
616
633
  appDomain,
617
634
  hashTagSize,
618
635
  loadingImage: loadingImage !== null && loadingImage !== void 0 ? loadingImage : defaultLoadingImage,
619
- isOpenHashTag
620
- } }, render({ rtcList, mutateLike: bffMutateLike, mutateUnlike: bffMutateUnlike, submitForm: bffSubmitForm })));
636
+ isOpenHashTag,
637
+ tagList,
638
+ setLoading
639
+ } }, render({
640
+ rtcList,
641
+ mutateLike: bffMutateLike,
642
+ mutateUnlike: bffMutateUnlike,
643
+ submitForm: bffSubmitForm,
644
+ tagList
645
+ })));
621
646
  };
622
647
  var SxpDataSourceProvider$1 = memo(SxpDataSourceProvider);
623
648
 
@@ -8366,10 +8391,10 @@ const CommodityDetail$1 = (_a) => {
8366
8391
  React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
8367
8392
  React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
8368
8393
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8369
- React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8370
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8371
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8372
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8394
+ React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8395
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8396
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8397
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8373
8398
  18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
8374
8399
  };
8375
8400
  const renderBtn = () => {
@@ -8820,7 +8845,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
8820
8845
  const productInfoText = ({ isPost }) => {
8821
8846
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8822
8847
  React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
8823
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8848
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8824
8849
  Made in Italy` })));
8825
8850
  };
8826
8851
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
@@ -12529,17 +12554,54 @@ var RenderCard$1 = memo(RenderCard);
12529
12554
  *
12530
12555
  */
12531
12556
  const Nudge = ({ nudge }) => {
12557
+ var _a, _b, _c, _d, _e, _f, _g;
12532
12558
  return (React.createElement(React.Fragment, null, (nudge === null || nudge === void 0 ? void 0 : nudge.isOpen) && (React.createElement("div", { className: 'clc-sxp-bottom-nudge', style: {
12533
- marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
12534
- width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
12535
- height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
12559
+ marginBottom: (_a = nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom) !== null && _a !== void 0 ? _a : 5,
12560
+ width: (_c = (_b = nudge === null || nudge === void 0 ? void 0 : nudge.size) === null || _b === void 0 ? void 0 : _b.width) !== null && _c !== void 0 ? _c : 212,
12561
+ height: (_e = (_d = nudge === null || nudge === void 0 ? void 0 : nudge.size) === null || _d === void 0 ? void 0 : _d.height) !== null && _e !== void 0 ? _e : 38,
12536
12562
  backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
12537
- borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
12563
+ borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
12538
12564
  } },
12539
12565
  (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
12540
- React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)))));
12566
+ React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
12541
12567
  };
12542
12568
 
12569
+ const DEFAULT_TAG = 'FOR U';
12570
+ const Tagbar = ({ tagList = [], setActiveIndex }) => {
12571
+ const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
12572
+ const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = useSxpDataSource();
12573
+ const realTagList = useMemo(() => {
12574
+ return [DEFAULT_TAG, ...tagList];
12575
+ }, [tagList]);
12576
+ const handleSelectTag = (tag) => () => {
12577
+ if (tag === selectTag)
12578
+ return;
12579
+ let hashTag;
12580
+ if (tag !== DEFAULT_TAG) {
12581
+ hashTag = tag;
12582
+ }
12583
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
12584
+ getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
12585
+ var _a, _b, _c, _d;
12586
+ setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
12587
+ setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
12588
+ setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
12589
+ setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(0);
12590
+ (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(0);
12591
+ }).finally(() => {
12592
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
12593
+ });
12594
+ setSelectTag(tag);
12595
+ };
12596
+ if (tagList.length <= 0)
12597
+ return null;
12598
+ return (React.createElement("div", { className: 'clc-sxp-tagbar', style: { height: 45 } },
12599
+ React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
12600
+ return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
12601
+ }))));
12602
+ };
12603
+ var Tagbar$1 = memo(Tagbar);
12604
+
12543
12605
  /*
12544
12606
  * @Author: binruan@chatlabs.com
12545
12607
  * @Date: 2024-01-15 19:03:09
@@ -12548,7 +12610,7 @@ const Nudge = ({ nudge }) => {
12548
12610
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12549
12611
  *
12550
12612
  */
12551
- const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle }) => {
12613
+ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [] }) => {
12552
12614
  var _a, _b, _c, _d, _e, _f, _g;
12553
12615
  const { schema } = useEditor();
12554
12616
  const [activeIndex, setActiveIndex] = useState(0);
@@ -12693,8 +12755,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12693
12755
  };
12694
12756
  }, [activeIndex, bffEventReport, curTime, data, handleH5EnterLink, popupDetailData, isFromHashtag, tempMap]);
12695
12757
  const height = useMemo(() => {
12696
- return (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo) ? containerHeight - 45 : containerHeight;
12697
- }, [globalConfig, containerHeight]);
12758
+ let minusHeight = 0;
12759
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
12760
+ minusHeight += 45;
12761
+ }
12762
+ if (tagList.length > 0) {
12763
+ minusHeight += 45;
12764
+ }
12765
+ return containerHeight - minusHeight;
12766
+ }, [globalConfig, containerHeight, tagList]);
12698
12767
  const renderLogo = useMemo(() => {
12699
12768
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
12700
12769
  return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
@@ -12742,8 +12811,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12742
12811
  ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
12743
12812
  React.createElement("div", { className: 'clc-sxp-bottom' },
12744
12813
  React.createElement(Nudge, { nudge: nudge }),
12745
- React.createElement("div", { className: 'clc-sxp-bottom-card' },
12746
- React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
12814
+ (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
12815
+ React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
12747
12816
  React.createElement("div", null,
12748
12817
  React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
12749
12818
  React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
@@ -12904,6 +12973,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12904
12973
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
12905
12974
  } })),
12906
12975
  renderLogo,
12976
+ React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
12907
12977
  isShowFingerTip ? React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
12908
12978
  React.createElement(Swiper, { ref: swiperRef, onActiveIndexChange: (swiper) => {
12909
12979
  setActiveIndex(swiper.activeIndex);
@@ -13193,10 +13263,17 @@ Object.values(_materials_).forEach((v) => {
13193
13263
  });
13194
13264
  const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
13195
13265
  const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
13196
- const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain }) => {
13266
+ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [] }) => {
13197
13267
  const height = useMemo(() => {
13198
- return (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo) ? containerHeight - 45 : containerHeight;
13199
- }, [globalConfig, containerHeight]);
13268
+ let minusHeight = 0;
13269
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
13270
+ minusHeight += 45;
13271
+ }
13272
+ if (tagList.length > 0) {
13273
+ minusHeight += 45;
13274
+ }
13275
+ return containerHeight - minusHeight;
13276
+ }, [globalConfig, containerHeight, tagList]);
13200
13277
  const renderContent = (rec, index) => {
13201
13278
  var _a, _b, _c, _d;
13202
13279
  if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
@@ -13228,6 +13305,13 @@ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descSty
13228
13305
  }
13229
13306
  return null;
13230
13307
  }, [globalConfig]);
13308
+ const CTA = (rec, index) => {
13309
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
13310
+ return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
13311
+ React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })));
13312
+ }
13313
+ return null;
13314
+ };
13231
13315
  const renderBottom = (rec, index) => {
13232
13316
  var _a, _b, _c, _d, _e, _f, _g;
13233
13317
  if (rec.video) {
@@ -13235,8 +13319,7 @@ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descSty
13235
13319
  ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13236
13320
  React.createElement("div", { className: 'clc-sxp-bottom' },
13237
13321
  React.createElement(Nudge, { nudge: nudge }),
13238
- React.createElement("div", { className: 'clc-sxp-bottom-card' },
13239
- React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })),
13322
+ CTA(rec, index),
13240
13323
  React.createElement("div", null,
13241
13324
  React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })),
13242
13325
  React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
@@ -13265,8 +13348,9 @@ const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descSty
13265
13348
  const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
13266
13349
  const renderView = (rec, index) => {
13267
13350
  var _a, _b, _c, _d;
13268
- return (React.createElement("div", { style: { position: 'relative' } },
13351
+ return (React.createElement("div", { style: { position: 'relative', border: '1px solid #e1e1e1' } },
13269
13352
  renderLogo,
13353
+ React.createElement(Tagbar$1, { tagList: tagList }),
13270
13354
  React.createElement(ToggleButton$1, { style: {
13271
13355
  position: 'absolute',
13272
13356
  right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
@@ -13385,10 +13469,10 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
13385
13469
  return searchParams;
13386
13470
  }, []);
13387
13471
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
13388
- React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, render: ({ rtcList }) => {
13472
+ React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, render: ({ rtcList, tagList }) => {
13389
13473
  var _a;
13390
13474
  return (React.createElement(React.Fragment, null,
13391
- React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { data: rtcList, resolver: RESOLVER })),
13475
+ React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER })),
13392
13476
  React.createElement(Popup, null)));
13393
13477
  } })));
13394
13478
  };