pb-sxp-ui 1.0.53 → 1.0.55
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 +112 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +112 -62
- 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 +112 -62
- 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/SxpPageCore/index.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/Popup/index.js +1 -1
- package/es/core/components/SxpPageRender/VideoWidget/index.js +10 -2
- package/es/core/components/SxpPageRender/index.js +16 -2
- package/es/core/context/SxpDataSourceProvider.d.ts +7 -0
- package/es/core/context/SxpDataSourceProvider.js +15 -2
- package/es/materials/sxp/popup/AppointForm/index.d.ts +1 -0
- package/es/materials/sxp/popup/AppointForm/index.js +14 -9
- package/es/materials/sxp/popup/CommodityDetail/index.js +8 -1
- package/es/materials/sxp/popup/CommodityDetailDiro/index.js +8 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +8 -1
- package/lib/core/components/SxpPageCore/index.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/Popup/index.js +1 -1
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +10 -2
- package/lib/core/components/SxpPageRender/index.js +16 -2
- package/lib/core/context/SxpDataSourceProvider.d.ts +7 -0
- package/lib/core/context/SxpDataSourceProvider.js +15 -2
- package/lib/materials/sxp/popup/AppointForm/index.d.ts +1 -0
- package/lib/materials/sxp/popup/AppointForm/index.js +14 -9
- package/lib/materials/sxp/popup/CommodityDetail/index.js +8 -1
- package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +8 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -416,7 +416,7 @@ var DataSourceType;
|
|
416
416
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
417
417
|
})(DataSourceType || (DataSourceType = {}));
|
418
418
|
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
419
|
-
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false }) => {
|
419
|
+
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
|
420
420
|
const [rtcList, setRtcList] = useState([]);
|
421
421
|
const [tagList, setTagList] = useState([]);
|
422
422
|
const [loading, setLoading] = useState(false);
|
@@ -531,6 +531,18 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
531
531
|
type: 'beacon'
|
532
532
|
});
|
533
533
|
}, [bffFetch, curReqInfo, enableReportEvent]);
|
534
|
+
const bffFbReport = useCallback((_a) => {
|
535
|
+
var _b;
|
536
|
+
var { eventName, actionSource = 'website', eventSourceUrl = (_b = window === null || window === void 0 ? void 0 : window.location) === null || _b === void 0 ? void 0 : _b.href, externalId } = _a;
|
537
|
+
if (!enableReportEvent || !enabledMetaConversionApi) {
|
538
|
+
return;
|
539
|
+
}
|
540
|
+
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
|
541
|
+
method: 'POST',
|
542
|
+
body: { eventName, actionSource, eventSourceUrl, 'userData.externalId': externalId },
|
543
|
+
type: 'beacon'
|
544
|
+
});
|
545
|
+
}, [bffFetch, enableReportEvent, enabledMetaConversionApi]);
|
534
546
|
const bffMutateLike = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
|
535
547
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/like', { method: 'POST', body }));
|
536
548
|
return res === null || res === void 0 ? void 0 : res.success;
|
@@ -638,7 +650,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
638
650
|
tagList,
|
639
651
|
setLoading,
|
640
652
|
videoRef,
|
641
|
-
setVideoRef
|
653
|
+
setVideoRef,
|
654
|
+
bffFbReport
|
642
655
|
} }, render({
|
643
656
|
rtcList,
|
644
657
|
mutateLike: bffMutateLike,
|
@@ -1013,7 +1026,7 @@ var settingRender$5 = [
|
|
1013
1026
|
];
|
1014
1027
|
|
1015
1028
|
const AppointForm$1 = (_a) => {
|
1016
|
-
var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, onClick } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "onClick"]);
|
1029
|
+
var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, onClick, onClose } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "onClick", "onClose"]);
|
1017
1030
|
const { submitForm } = useSxpDataSource();
|
1018
1031
|
const formRef = useRef();
|
1019
1032
|
const [loading, setLoading] = useState(false);
|
@@ -1054,19 +1067,24 @@ const AppointForm$1 = (_a) => {
|
|
1054
1067
|
}, [layoutType, columns, defaultColumns]);
|
1055
1068
|
const handleSubmit = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
|
1056
1069
|
var _b, _c, _d;
|
1057
|
-
setLoading(true);
|
1058
1070
|
const vals = yield ((_b = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _b === void 0 ? void 0 : _b.getFieldsValue());
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1071
|
+
if (!vals)
|
1072
|
+
return;
|
1073
|
+
const arr = (_d = (_c = Object.keys(vals)) === null || _c === void 0 ? void 0 : _c.map((key) => {
|
1074
|
+
var _a;
|
1075
|
+
return ({
|
1076
|
+
name: key,
|
1077
|
+
value: (_a = vals[key]) !== null && _a !== void 0 ? _a : ''
|
1078
|
+
});
|
1079
|
+
})) === null || _d === void 0 ? void 0 : _d.filter((item) => item === null || item === void 0 ? void 0 : item.value);
|
1063
1080
|
if (!arr || !(arr === null || arr === void 0 ? void 0 : arr.length))
|
1064
1081
|
return;
|
1065
|
-
|
1082
|
+
setLoading(true);
|
1083
|
+
const res = (yield (submitForm === null || submitForm === void 0 ? void 0 : submitForm({ attributes: arr })));
|
1066
1084
|
setLoading(false);
|
1067
1085
|
if (res) {
|
1068
|
-
|
1069
|
-
|
1086
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
1087
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
1070
1088
|
}
|
1071
1089
|
}), 1000);
|
1072
1090
|
return (React.createElement("div", { className: 'pb-appoint-form' },
|
@@ -8348,7 +8366,7 @@ const CommodityDetail$1 = (_a) => {
|
|
8348
8366
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
8349
8367
|
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index"]);
|
8350
8368
|
const { sxpParameter } = useSxpDataSource();
|
8351
|
-
const { popupDetailData, bffEventReport, isPreview,
|
8369
|
+
const { popupDetailData, bffEventReport, isPreview, bffFbReport } = useSxpDataSource();
|
8352
8370
|
const { jumpToWeb, productView } = useEventReport();
|
8353
8371
|
const curTimeRef = useRef(null);
|
8354
8372
|
const [showModal, setShowModal] = useState(false);
|
@@ -8365,6 +8383,13 @@ const CommodityDetail$1 = (_a) => {
|
|
8365
8383
|
window.location.href = window.getJointUtmLink(product.link);
|
8366
8384
|
}
|
8367
8385
|
};
|
8386
|
+
useEffect(() => {
|
8387
|
+
if (!isPost) {
|
8388
|
+
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
8389
|
+
eventName: 'ProductView'
|
8390
|
+
});
|
8391
|
+
}
|
8392
|
+
}, [isPost, bffFbReport]);
|
8368
8393
|
useEffect(() => {
|
8369
8394
|
const initTime = () => {
|
8370
8395
|
curTimeRef.current = new Date();
|
@@ -8800,7 +8825,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
8800
8825
|
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index"]);
|
8801
8826
|
useState(true);
|
8802
8827
|
const { sxpParameter } = useSxpDataSource();
|
8803
|
-
const { popupDetailData, bffEventReport, isPreview, swiperRef,
|
8828
|
+
const { popupDetailData, bffEventReport, isPreview, swiperRef, bffFbReport } = useSxpDataSource();
|
8804
8829
|
const { jumpToWeb, productView } = useEventReport();
|
8805
8830
|
const scrollRef = useRef(null);
|
8806
8831
|
useRef(null);
|
@@ -8823,6 +8848,13 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
8823
8848
|
window.location.href = window.getJointUtmLink(product.link);
|
8824
8849
|
}
|
8825
8850
|
};
|
8851
|
+
useEffect(() => {
|
8852
|
+
if (!isPost) {
|
8853
|
+
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
8854
|
+
eventName: 'ProductView'
|
8855
|
+
});
|
8856
|
+
}
|
8857
|
+
}, [isPost, bffFbReport]);
|
8826
8858
|
useEffect(() => {
|
8827
8859
|
const initTime = () => {
|
8828
8860
|
curTimeRef.current = new Date();
|
@@ -12041,7 +12073,7 @@ var SXP_EVENT_TYPE;
|
|
12041
12073
|
|
12042
12074
|
const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoRef }) => {
|
12043
12075
|
const [isPauseVideo, setIsPauseVideo] = useState(false);
|
12044
|
-
const { bffEventReport, sxpParameter, waterFallData, openHashtag } = useSxpDataSource();
|
12076
|
+
const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport } = useSxpDataSource();
|
12045
12077
|
const videoStartTime = useRef(0);
|
12046
12078
|
const [isLoadFinish, setIsLoadFinish] = useState(false);
|
12047
12079
|
const [isFirstPlay, setIsFirstPlay] = useState(true);
|
@@ -12249,6 +12281,9 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12249
12281
|
if (!videoRef || !isLoadFinish)
|
12250
12282
|
return;
|
12251
12283
|
if (isActive) {
|
12284
|
+
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
12285
|
+
eventName: 'ViewContent'
|
12286
|
+
});
|
12252
12287
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.play();
|
12253
12288
|
}
|
12254
12289
|
else {
|
@@ -12272,7 +12307,12 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12272
12307
|
useEffect(() => {
|
12273
12308
|
if (!isActive)
|
12274
12309
|
return;
|
12275
|
-
const onShow =
|
12310
|
+
const onShow = () => {
|
12311
|
+
handleClickVideo('start')();
|
12312
|
+
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
12313
|
+
eventName: 'ViewContent'
|
12314
|
+
});
|
12315
|
+
};
|
12276
12316
|
const onHide = handleClickVideo('pause');
|
12277
12317
|
SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
|
12278
12318
|
SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_HIDE, onHide);
|
@@ -12635,11 +12675,47 @@ const Nudge = ({ nudge }) => {
|
|
12635
12675
|
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 : '')))));
|
12636
12676
|
};
|
12637
12677
|
|
12678
|
+
const DEFAULT_TAG = 'FOR U';
|
12679
|
+
const Tagbar = ({ tagList = [], setActiveIndex }) => {
|
12680
|
+
const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
|
12681
|
+
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = useSxpDataSource();
|
12682
|
+
const realTagList = useMemo(() => {
|
12683
|
+
return [DEFAULT_TAG, ...tagList];
|
12684
|
+
}, [tagList]);
|
12685
|
+
const handleSelectTag = (tag) => () => {
|
12686
|
+
if (tag === selectTag)
|
12687
|
+
return;
|
12688
|
+
let hashTag;
|
12689
|
+
if (tag !== DEFAULT_TAG) {
|
12690
|
+
hashTag = tag;
|
12691
|
+
}
|
12692
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
|
12693
|
+
getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
|
12694
|
+
var _a, _b, _c, _d;
|
12695
|
+
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
|
12696
|
+
setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
|
12697
|
+
setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
|
12698
|
+
setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(0);
|
12699
|
+
(_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);
|
12700
|
+
}).finally(() => {
|
12701
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
12702
|
+
});
|
12703
|
+
setSelectTag(tag);
|
12704
|
+
};
|
12705
|
+
if (tagList.length <= 0)
|
12706
|
+
return null;
|
12707
|
+
return (React.createElement("div", { className: 'clc-sxp-tagbar' },
|
12708
|
+
React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
|
12709
|
+
return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
|
12710
|
+
}))));
|
12711
|
+
};
|
12712
|
+
var Tagbar$1 = memo(Tagbar);
|
12713
|
+
|
12638
12714
|
/*
|
12639
12715
|
* @Author: binruan@chatlabs.com
|
12640
12716
|
* @Date: 2024-01-15 19:03:09
|
12641
12717
|
* @LastEditors: binruan@chatlabs.com
|
12642
|
-
* @LastEditTime: 2024-
|
12718
|
+
* @LastEditTime: 2024-05-09 16:23:59
|
12643
12719
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12644
12720
|
*
|
12645
12721
|
*/
|
@@ -12654,7 +12730,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
12654
12730
|
const viewTime = useRef();
|
12655
12731
|
const [isLoadMore, setIsLoadMore] = useState(false);
|
12656
12732
|
const [isShowMore, setIsShowMore] = useState(false);
|
12657
|
-
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData } = useSxpDataSource();
|
12733
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport } = useSxpDataSource();
|
12658
12734
|
const [videoRef, setVideoRef] = useState(null);
|
12659
12735
|
const playerRef = useRef();
|
12660
12736
|
const { productView } = useEventReport();
|
@@ -12687,8 +12763,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
12687
12763
|
requestId: null
|
12688
12764
|
}
|
12689
12765
|
});
|
12766
|
+
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
12767
|
+
eventName: 'PageView'
|
12768
|
+
});
|
12690
12769
|
setIsInit(true);
|
12691
|
-
}, [bffEventReport, data.length]);
|
12770
|
+
}, [bffEventReport, data.length, bffFbReport]);
|
12692
12771
|
const initTime = () => {
|
12693
12772
|
curTime.current = new Date();
|
12694
12773
|
viewTime.current = new Date();
|
@@ -12813,9 +12892,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
12813
12892
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
12814
12893
|
minusHeight += 45;
|
12815
12894
|
}
|
12816
|
-
|
12817
|
-
|
12818
|
-
|
12895
|
+
if (tagList.length > 0) {
|
12896
|
+
minusHeight += 45;
|
12897
|
+
}
|
12819
12898
|
return containerHeight - minusHeight;
|
12820
12899
|
}, [globalConfig, containerHeight, tagList]);
|
12821
12900
|
const renderLogo = useMemo(() => {
|
@@ -12973,6 +13052,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
12973
13052
|
var _a, _b, _c;
|
12974
13053
|
if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && !((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls) && (item === null || item === void 0 ? void 0 : item.product)) {
|
12975
13054
|
productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current, activeIndex);
|
13055
|
+
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
13056
|
+
eventName: 'ProductView'
|
13057
|
+
});
|
12976
13058
|
}
|
12977
13059
|
};
|
12978
13060
|
useEffect(() => {
|
@@ -13000,6 +13082,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13000
13082
|
traceInfo: item.video.traceInfo
|
13001
13083
|
}
|
13002
13084
|
});
|
13085
|
+
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
13086
|
+
eventName: 'ViewContent'
|
13087
|
+
});
|
13003
13088
|
}
|
13004
13089
|
};
|
13005
13090
|
const visList = useMemo(() => {
|
@@ -13039,6 +13124,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13039
13124
|
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
|
13040
13125
|
} })),
|
13041
13126
|
renderLogo,
|
13127
|
+
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
|
13042
13128
|
isShowFingerTip ? React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
|
13043
13129
|
React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
|
13044
13130
|
swiperRef.current.swiper.allowTouchMove = false;
|
@@ -13099,42 +13185,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13099
13185
|
React.createElement("div", { id: 'player-container-id-copy' }))));
|
13100
13186
|
};
|
13101
13187
|
|
13102
|
-
const DEFAULT_TAG = 'FOR U';
|
13103
|
-
const Tagbar = ({ tagList = [], setActiveIndex }) => {
|
13104
|
-
const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
|
13105
|
-
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = useSxpDataSource();
|
13106
|
-
const realTagList = useMemo(() => {
|
13107
|
-
return [DEFAULT_TAG, ...tagList];
|
13108
|
-
}, [tagList]);
|
13109
|
-
const handleSelectTag = (tag) => () => {
|
13110
|
-
if (tag === selectTag)
|
13111
|
-
return;
|
13112
|
-
let hashTag;
|
13113
|
-
if (tag !== DEFAULT_TAG) {
|
13114
|
-
hashTag = tag;
|
13115
|
-
}
|
13116
|
-
setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
|
13117
|
-
getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
|
13118
|
-
var _a, _b, _c, _d;
|
13119
|
-
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
|
13120
|
-
setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
|
13121
|
-
setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
|
13122
|
-
setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(0);
|
13123
|
-
(_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);
|
13124
|
-
}).finally(() => {
|
13125
|
-
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
13126
|
-
});
|
13127
|
-
setSelectTag(tag);
|
13128
|
-
};
|
13129
|
-
if (tagList.length <= 0)
|
13130
|
-
return null;
|
13131
|
-
return (React.createElement("div", { className: 'clc-sxp-tagbar' },
|
13132
|
-
React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
|
13133
|
-
return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
|
13134
|
-
}))));
|
13135
|
-
};
|
13136
|
-
var Tagbar$1 = memo(Tagbar);
|
13137
|
-
|
13138
13188
|
const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
|
13139
13189
|
return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, height: height, style: { width }, loop: true, autoplay: false }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
|
13140
13190
|
return (React.createElement(SwiperSlide, { key: url },
|
@@ -13499,7 +13549,7 @@ var index$1 = memo(DiyPortalPreview);
|
|
13499
13549
|
* @Author: binruan@chatlabs.com
|
13500
13550
|
* @Date: 2023-10-31 10:56:01
|
13501
13551
|
* @LastEditors: binruan@chatlabs.com
|
13502
|
-
* @LastEditTime: 2024-
|
13552
|
+
* @LastEditTime: 2024-05-08 17:41:44
|
13503
13553
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
|
13504
13554
|
*
|
13505
13555
|
*/
|
@@ -13550,7 +13600,7 @@ const Popup = () => {
|
|
13550
13600
|
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
13551
13601
|
const Component = withBindDataSource(t);
|
13552
13602
|
const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
|
13553
|
-
return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.style), { width: '100%', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.textStyle), bindDatas: (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.bindDatas) !== null && _f !== void 0 ? _f : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.props, { event: ((_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id })));
|
13603
|
+
return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.style), { width: '100%', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.textStyle), bindDatas: (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.bindDatas) !== null && _f !== void 0 ? _f : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.props, { event: ((_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, onClose: handleClose })));
|
13554
13604
|
}
|
13555
13605
|
else {
|
13556
13606
|
return React.createElement(React.Fragment, null);
|
@@ -13564,7 +13614,7 @@ const Popup = () => {
|
|
13564
13614
|
* @Author: binruan@chatlabs.com
|
13565
13615
|
* @Date: 2024-01-15 19:03:09
|
13566
13616
|
* @LastEditors: binruan@chatlabs.com
|
13567
|
-
* @LastEditTime: 2024-
|
13617
|
+
* @LastEditTime: 2024-05-06 17:26:37
|
13568
13618
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
13569
13619
|
*
|
13570
13620
|
*/
|
@@ -13580,7 +13630,7 @@ const RESOLVER = {};
|
|
13580
13630
|
Object.values(_materials_).forEach((v) => {
|
13581
13631
|
RESOLVER[v.extend.type] = v;
|
13582
13632
|
});
|
13583
|
-
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl }) => {
|
13633
|
+
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
|
13584
13634
|
var _a, _b, _c, _d, _e, _f;
|
13585
13635
|
const utmVal = useMemo(() => {
|
13586
13636
|
var _a;
|
@@ -13588,7 +13638,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
13588
13638
|
return searchParams;
|
13589
13639
|
}, []);
|
13590
13640
|
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
13591
|
-
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 }) => {
|
13641
|
+
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, enabledMetaConversionApi: enabledMetaConversionApi, render: ({ rtcList, tagList }) => {
|
13592
13642
|
var _a;
|
13593
13643
|
return (React.createElement(React.Fragment, null,
|
13594
13644
|
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, licenseUrl: licenseUrl })),
|