pb-sxp-ui 1.0.87 → 1.0.88
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 -144
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +149 -145
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +148 -144
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/index.js +58 -56
- package/es/core/context/SxpDataSourceProvider.js +19 -16
- package/lib/core/components/SxpPageRender/index.js +58 -56
- package/lib/core/context/SxpDataSourceProvider.js +19 -16
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -430,6 +430,70 @@
|
|
430
430
|
SXP_EVENT_TYPE["CHANGE_THEME_TAG"] = "changeThemeTag";
|
431
431
|
})(SXP_EVENT_TYPE || (SXP_EVENT_TYPE = {}));
|
432
432
|
|
433
|
+
/*
|
434
|
+
* @Author: binruan@chatlabs.com
|
435
|
+
* @Date: 2024-06-13 15:16:53
|
436
|
+
* @LastEditors: binruan@chatlabs.com
|
437
|
+
* @LastEditTime: 2024-06-19 14:13:50
|
438
|
+
* @FilePath: \pb-sxp-ui\src\core\components\Consent\index.tsx
|
439
|
+
*
|
440
|
+
*/
|
441
|
+
const Consent$2 = ({ width = window.innerWidth, height = window.innerHeight, privacy_title, privacy_context, privacy_policy_url, privacy_policy_title }) => {
|
442
|
+
const { setIsAgreePolicy, bffEventReport } = useSxpDataSource();
|
443
|
+
const channelObj = React.useMemo(() => {
|
444
|
+
const queryString = location.search.slice(1);
|
445
|
+
const params = qs.parse(queryString.replace(/\+/g, '%2B'));
|
446
|
+
for (const key in params) {
|
447
|
+
params[key] = params[key].replace(/%2B/g, '+');
|
448
|
+
}
|
449
|
+
return params;
|
450
|
+
}, []);
|
451
|
+
const getUtmValue = (key) => { var _a; return (_a = channelObj[key]) !== null && _a !== void 0 ? _a : null; };
|
452
|
+
React.useEffect(() => {
|
453
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
454
|
+
eventInfo: {
|
455
|
+
eventSubject: 'privacyEnter',
|
456
|
+
eventDescription: 'User enter privacy page',
|
457
|
+
utmSource: getUtmValue('utm_source'),
|
458
|
+
utmMedium: getUtmValue('utm_medium'),
|
459
|
+
utmCampaign: getUtmValue('utm_campaign'),
|
460
|
+
utmId: getUtmValue('utm_id'),
|
461
|
+
utmContent: getUtmValue('utm_content'),
|
462
|
+
clSource: getUtmValue('cl_source'),
|
463
|
+
enterTime: `${Date.now()}`,
|
464
|
+
enterUrl: window.location.href,
|
465
|
+
rtc: null,
|
466
|
+
requestId: null,
|
467
|
+
sessionID: null
|
468
|
+
}
|
469
|
+
});
|
470
|
+
}, []);
|
471
|
+
const handleAgree = () => {
|
472
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
473
|
+
eventInfo: {
|
474
|
+
eventSubject: 'userConsent',
|
475
|
+
eventDescription: '用户授权【操作结果】',
|
476
|
+
consentResult: '0',
|
477
|
+
consentTags: '["系统运营"]',
|
478
|
+
rtc: null,
|
479
|
+
requestId: null,
|
480
|
+
sessionID: null
|
481
|
+
}
|
482
|
+
});
|
483
|
+
setIsAgreePolicy === null || setIsAgreePolicy === void 0 ? void 0 : setIsAgreePolicy(true);
|
484
|
+
window.localStorage.setItem(AGREE_POLICY, 'yes');
|
485
|
+
};
|
486
|
+
return (React.createElement("div", { className: 'consent-bg' },
|
487
|
+
React.createElement("div", { className: 'consent' },
|
488
|
+
React.createElement("div", { className: 'consent-col' },
|
489
|
+
React.createElement("div", { className: 'consent-title' }, privacy_title !== null && privacy_title !== void 0 ? privacy_title : 'Privacy Policy'),
|
490
|
+
React.createElement("div", { className: 'consent-content' }, privacy_context !== null && privacy_context !== void 0 ? privacy_context : 'This site uses cookies to improve your online experience. By continuing to use the site please agree the policy first.')),
|
491
|
+
React.createElement("div", { className: 'consent-col' },
|
492
|
+
React.createElement("button", { "aria-label": 'agree', className: 'consent-btn', onClick: handleAgree }, "Agree"),
|
493
|
+
React.createElement("a", { className: 'consent-policy', target: '_blank', href: privacy_policy_url ? `https://${privacy_policy_url}` : undefined }, privacy_policy_title !== null && privacy_policy_title !== void 0 ? privacy_policy_title : 'More information')))));
|
494
|
+
};
|
495
|
+
var Consent$3 = React.memo(Consent$2);
|
496
|
+
|
433
497
|
const SxpDataSourceContext = React.createContext({
|
434
498
|
rtcList: [],
|
435
499
|
tagList: []
|
@@ -441,6 +505,7 @@
|
|
441
505
|
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
442
506
|
const DEFAULT_TAG = 'FOR U';
|
443
507
|
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig, isEditor = false }) => {
|
508
|
+
var _a, _b, _c;
|
444
509
|
const [rtcList, setRtcList] = React.useState([]);
|
445
510
|
const [tagList, setTagList] = React.useState([]);
|
446
511
|
const [loading, setLoading] = React.useState(false);
|
@@ -507,10 +572,10 @@
|
|
507
572
|
}, [bffDataSource]);
|
508
573
|
// 获取推荐视频数据
|
509
574
|
const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
510
|
-
var
|
575
|
+
var _d, _e, _f, _g, _h;
|
511
576
|
query = {
|
512
|
-
maxSize: (
|
513
|
-
defaultSize: (
|
577
|
+
maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize,
|
578
|
+
defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize,
|
514
579
|
'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
|
515
580
|
'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
|
516
581
|
hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
|
@@ -518,10 +583,10 @@
|
|
518
583
|
themeTag: query === null || query === void 0 ? void 0 : query.themeTag
|
519
584
|
};
|
520
585
|
if (utmVal) {
|
521
|
-
const val = (
|
586
|
+
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
522
587
|
const key = val.split('=')[0];
|
523
588
|
return UTM_KEYS.includes(key);
|
524
|
-
})) === null ||
|
589
|
+
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
525
590
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
526
591
|
}
|
527
592
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
@@ -533,7 +598,7 @@
|
|
533
598
|
return result === null || result === void 0 ? void 0 : result.data;
|
534
599
|
}), [bffFetch, utmVal, maxSize, defaultSize]);
|
535
600
|
const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
536
|
-
var
|
601
|
+
var _j, _k;
|
537
602
|
if (rtcList.length <= 0) {
|
538
603
|
return;
|
539
604
|
}
|
@@ -543,8 +608,8 @@
|
|
543
608
|
'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
|
544
609
|
themeTag: themeTag.current
|
545
610
|
});
|
546
|
-
setRtcList(rtcList.concat((
|
547
|
-
setCacheRtcList(cacheRtcList.concat((
|
611
|
+
setRtcList(rtcList.concat((_j = data === null || data === void 0 ? void 0 : data.recList) !== null && _j !== void 0 ? _j : []));
|
612
|
+
setCacheRtcList(cacheRtcList.concat((_k = data === null || data === void 0 ? void 0 : data.recList) !== null && _k !== void 0 ? _k : []));
|
548
613
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
549
614
|
const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
|
550
615
|
// 关闭 BFF 事件上报
|
@@ -608,16 +673,16 @@
|
|
608
673
|
}), [bffFetch]);
|
609
674
|
// 获取 Tag
|
610
675
|
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
611
|
-
var
|
676
|
+
var _l, _m, _o, _p, _q;
|
612
677
|
if (!utmVal || !isShowTag)
|
613
678
|
return;
|
614
679
|
try {
|
615
|
-
const val = (
|
680
|
+
const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
|
616
681
|
const key = val.split('=')[0];
|
617
682
|
return UTM_KEYS.includes(key);
|
618
|
-
})) === null ||
|
683
|
+
})) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
|
619
684
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
620
|
-
setTagList((
|
685
|
+
setTagList((_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []);
|
621
686
|
}
|
622
687
|
catch (e) {
|
623
688
|
console.log('e', e);
|
@@ -668,8 +733,9 @@
|
|
668
733
|
});
|
669
734
|
}, [bffEventReport]);
|
670
735
|
React.useEffect(() => {
|
671
|
-
|
672
|
-
|
736
|
+
if (!isShowConsent)
|
737
|
+
h5EnterLink();
|
738
|
+
}, [isShowConsent]);
|
673
739
|
React.useEffect(() => {
|
674
740
|
if (isShowConsent)
|
675
741
|
return;
|
@@ -752,13 +818,13 @@
|
|
752
818
|
isShowConsent,
|
753
819
|
selectTag,
|
754
820
|
setSelectTag
|
755
|
-
} }, render({
|
821
|
+
} }, isShowConsent ? (React.createElement(Consent$3, Object.assign({}, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props))) : (render({
|
756
822
|
rtcList,
|
757
823
|
mutateLike: bffMutateLike,
|
758
824
|
mutateUnlike: bffMutateUnlike,
|
759
825
|
submitForm: bffSubmitForm,
|
760
826
|
tagList
|
761
|
-
})));
|
827
|
+
}))));
|
762
828
|
};
|
763
829
|
var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
|
764
830
|
|
@@ -12721,10 +12787,10 @@ Made in Italy` })));
|
|
12721
12787
|
}
|
12722
12788
|
];
|
12723
12789
|
|
12724
|
-
const Consent$
|
12725
|
-
return React.createElement(Consent$
|
12790
|
+
const Consent$1 = (props) => {
|
12791
|
+
return React.createElement(Consent$1, Object.assign({}, props));
|
12726
12792
|
};
|
12727
|
-
var ConsentComponent = React.memo(Consent$
|
12793
|
+
var ConsentComponent = React.memo(Consent$1);
|
12728
12794
|
|
12729
12795
|
/*
|
12730
12796
|
* @Author: binruan@chatlabs.com
|
@@ -12734,7 +12800,7 @@ Made in Italy` })));
|
|
12734
12800
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\material.tsx
|
12735
12801
|
*
|
12736
12802
|
*/
|
12737
|
-
const Consent
|
12803
|
+
const Consent = createMaterial(ConsentComponent, {
|
12738
12804
|
displayName: 'Consent',
|
12739
12805
|
icon: '',
|
12740
12806
|
category: 'base',
|
@@ -12769,7 +12835,7 @@ Made in Italy` })));
|
|
12769
12835
|
CommodityDetailDiroNew: CommodityDetailDiroNew,
|
12770
12836
|
CommodityDiro: CommodityDiro,
|
12771
12837
|
CommodityDiroNew: CommodityDiroNew,
|
12772
|
-
Consent: Consent
|
12838
|
+
Consent: Consent,
|
12773
12839
|
HashTag: HashTag,
|
12774
12840
|
Link: Link,
|
12775
12841
|
MultiCommodity: MultiCommodity,
|
@@ -13498,84 +13564,20 @@ Made in Italy` })));
|
|
13498
13564
|
};
|
13499
13565
|
var Tagbar$1 = React.memo(Tagbar);
|
13500
13566
|
|
13501
|
-
/*
|
13502
|
-
* @Author: binruan@chatlabs.com
|
13503
|
-
* @Date: 2024-06-13 15:16:53
|
13504
|
-
* @LastEditors: binruan@chatlabs.com
|
13505
|
-
* @LastEditTime: 2024-06-19 14:13:50
|
13506
|
-
* @FilePath: \pb-sxp-ui\src\core\components\Consent\index.tsx
|
13507
|
-
*
|
13508
|
-
*/
|
13509
|
-
const Consent = ({ width = window.innerWidth, height = window.innerHeight, privacy_title, privacy_context, privacy_policy_url, privacy_policy_title }) => {
|
13510
|
-
const { setIsAgreePolicy, bffEventReport } = useSxpDataSource();
|
13511
|
-
const channelObj = React.useMemo(() => {
|
13512
|
-
const queryString = location.search.slice(1);
|
13513
|
-
const params = qs.parse(queryString.replace(/\+/g, '%2B'));
|
13514
|
-
for (const key in params) {
|
13515
|
-
params[key] = params[key].replace(/%2B/g, '+');
|
13516
|
-
}
|
13517
|
-
return params;
|
13518
|
-
}, []);
|
13519
|
-
const getUtmValue = (key) => { var _a; return (_a = channelObj[key]) !== null && _a !== void 0 ? _a : null; };
|
13520
|
-
React.useEffect(() => {
|
13521
|
-
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
13522
|
-
eventInfo: {
|
13523
|
-
eventSubject: 'privacyEnter',
|
13524
|
-
eventDescription: 'User enter privacy page',
|
13525
|
-
utmSource: getUtmValue('utm_source'),
|
13526
|
-
utmMedium: getUtmValue('utm_medium'),
|
13527
|
-
utmCampaign: getUtmValue('utm_campaign'),
|
13528
|
-
utmId: getUtmValue('utm_id'),
|
13529
|
-
utmContent: getUtmValue('utm_content'),
|
13530
|
-
clSource: getUtmValue('cl_source'),
|
13531
|
-
enterTime: `${Date.now()}`,
|
13532
|
-
enterUrl: window.location.href,
|
13533
|
-
rtc: null,
|
13534
|
-
requestId: null,
|
13535
|
-
sessionID: null
|
13536
|
-
}
|
13537
|
-
});
|
13538
|
-
}, []);
|
13539
|
-
const handleAgree = () => {
|
13540
|
-
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
13541
|
-
eventInfo: {
|
13542
|
-
eventSubject: 'userConsent',
|
13543
|
-
eventDescription: '用户授权【操作结果】',
|
13544
|
-
consentResult: '0',
|
13545
|
-
consentTags: '["系统运营"]',
|
13546
|
-
rtc: null,
|
13547
|
-
requestId: null,
|
13548
|
-
sessionID: null
|
13549
|
-
}
|
13550
|
-
});
|
13551
|
-
setIsAgreePolicy === null || setIsAgreePolicy === void 0 ? void 0 : setIsAgreePolicy(true);
|
13552
|
-
window.localStorage.setItem(AGREE_POLICY, 'yes');
|
13553
|
-
};
|
13554
|
-
return (React.createElement("div", { className: 'consent-bg' },
|
13555
|
-
React.createElement("div", { className: 'consent' },
|
13556
|
-
React.createElement("div", { className: 'consent-col' },
|
13557
|
-
React.createElement("div", { className: 'consent-title' }, privacy_title !== null && privacy_title !== void 0 ? privacy_title : 'Privacy Policy'),
|
13558
|
-
React.createElement("div", { className: 'consent-content' }, privacy_context !== null && privacy_context !== void 0 ? privacy_context : 'This site uses cookies to improve your online experience. By continuing to use the site please agree the policy first.')),
|
13559
|
-
React.createElement("div", { className: 'consent-col' },
|
13560
|
-
React.createElement("button", { "aria-label": 'agree', className: 'consent-btn', onClick: handleAgree }, "Agree"),
|
13561
|
-
React.createElement("a", { className: 'consent-policy', target: '_blank', href: privacy_policy_url ? `https://${privacy_policy_url}` : undefined }, privacy_policy_title !== null && privacy_policy_title !== void 0 ? privacy_policy_title : 'More information')))));
|
13562
|
-
};
|
13563
|
-
var Consent$1 = React.memo(Consent);
|
13564
|
-
|
13565
13567
|
/*
|
13566
13568
|
* @Author: binruan@chatlabs.com
|
13567
13569
|
* @Date: 2024-01-15 19:03:09
|
13568
13570
|
* @LastEditors: binruan@chatlabs.com
|
13569
|
-
* @LastEditTime: 2024-06-20
|
13571
|
+
* @LastEditTime: 2024-06-20 15:54:53
|
13570
13572
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
13571
13573
|
*
|
13572
13574
|
*/
|
13573
13575
|
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
|
13574
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
13576
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
13575
13577
|
const { schema } = useEditor();
|
13576
13578
|
const [activeIndex, setActiveIndex] = React.useState(0);
|
13577
13579
|
const viewImageStartTime = React.useRef(0);
|
13578
|
-
|
13580
|
+
React.useState(false);
|
13579
13581
|
const [isMuted, setIsMuted] = React.useState(true);
|
13580
13582
|
const viewTime = React.useRef();
|
13581
13583
|
const [isLoadMore, setIsLoadMore] = React.useState(false);
|
@@ -13588,21 +13590,29 @@ Made in Italy` })));
|
|
13588
13590
|
const isShowFingerTip = React.useMemo(() => {
|
13589
13591
|
return data.length > 0 && !loading && getFeUserId();
|
13590
13592
|
}, [data, loading]);
|
13591
|
-
|
13592
|
-
|
13593
|
-
|
13593
|
+
React.useEffect(() => {
|
13594
|
+
refreshFeSessionId();
|
13595
|
+
}, []);
|
13596
|
+
React.useEffect(() => {
|
13597
|
+
if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
|
13598
|
+
const now = new Date();
|
13599
|
+
viewTime.current = now;
|
13600
|
+
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
13601
|
+
eventName: 'PageView'
|
13602
|
+
});
|
13594
13603
|
}
|
13604
|
+
}, [data === null || data === void 0 ? void 0 : data.length]);
|
13605
|
+
const handleH5EnterLink = React.useCallback(() => {
|
13595
13606
|
refreshFeSessionId();
|
13596
|
-
|
13597
|
-
|
13598
|
-
|
13599
|
-
|
13607
|
+
h5EnterLink === null || h5EnterLink === void 0 ? void 0 : h5EnterLink();
|
13608
|
+
if (data.length > 0) {
|
13609
|
+
const now = new Date();
|
13610
|
+
viewTime.current = now;
|
13611
|
+
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
13612
|
+
eventName: 'PageView'
|
13613
|
+
});
|
13600
13614
|
}
|
13601
|
-
|
13602
|
-
eventName: 'PageView'
|
13603
|
-
});
|
13604
|
-
setIsInit(true);
|
13605
|
-
}, [data.length, bffFbReport, h5EnterLink, isInit]);
|
13615
|
+
}, [data.length, bffFbReport, h5EnterLink]);
|
13606
13616
|
const firstRef = React.useRef();
|
13607
13617
|
React.useEffect(() => {
|
13608
13618
|
var _a, _b, _c, _d;
|
@@ -13630,10 +13640,6 @@ Made in Italy` })));
|
|
13630
13640
|
});
|
13631
13641
|
}
|
13632
13642
|
}, [videoRef, licenseUrl, data]);
|
13633
|
-
React.useEffect(() => {
|
13634
|
-
if (!isInit)
|
13635
|
-
handleH5EnterLink();
|
13636
|
-
}, [handleH5EnterLink, isInit]);
|
13637
13643
|
React.useEffect(() => {
|
13638
13644
|
var _a;
|
13639
13645
|
const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
|
@@ -13967,46 +13973,45 @@ Made in Italy` })));
|
|
13967
13973
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
13968
13974
|
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
13969
13975
|
return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
|
13970
|
-
|
13971
|
-
|
13972
|
-
|
13973
|
-
|
13974
|
-
|
13975
|
-
|
13976
|
-
|
13977
|
-
|
13978
|
-
|
13979
|
-
|
13980
|
-
|
13981
|
-
|
13982
|
-
|
13983
|
-
|
13984
|
-
|
13985
|
-
|
13986
|
-
|
13987
|
-
|
13988
|
-
|
13989
|
-
|
13990
|
-
|
13991
|
-
|
13992
|
-
if (
|
13993
|
-
|
13994
|
-
|
13995
|
-
|
13996
|
-
|
13997
|
-
});
|
13998
|
-
}
|
13976
|
+
waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, onClose: () => {
|
13977
|
+
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
|
13978
|
+
} })),
|
13979
|
+
renderLogo,
|
13980
|
+
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
|
13981
|
+
isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 + ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` } })) : null,
|
13982
|
+
React.createElement(Swiper, { style: {
|
13983
|
+
marginTop: tagHeight
|
13984
|
+
}, ref: swiperRef, onSlideChange: () => {
|
13985
|
+
swiperRef.current.swiper.allowTouchMove = false;
|
13986
|
+
setTimeout(() => {
|
13987
|
+
swiperRef.current.swiper.allowTouchMove = true;
|
13988
|
+
}, 500);
|
13989
|
+
}, onActiveIndexChange: (swiper) => {
|
13990
|
+
setActiveIndex(swiper.activeIndex);
|
13991
|
+
if (openHashtag)
|
13992
|
+
return;
|
13993
|
+
// 处理上滑下滑事件
|
13994
|
+
handleScrollEvent(swiper);
|
13995
|
+
if (waterFallData)
|
13996
|
+
return;
|
13997
|
+
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 2 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
13998
|
+
if (!isLoadMore) {
|
13999
|
+
setIsLoadMore(true);
|
14000
|
+
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
|
14001
|
+
setIsLoadMore(false);
|
14002
|
+
});
|
13999
14003
|
}
|
14000
|
-
}
|
14001
|
-
|
14002
|
-
|
14003
|
-
|
14004
|
-
|
14005
|
-
|
14006
|
-
|
14007
|
-
|
14008
|
-
|
14009
|
-
|
14004
|
+
}
|
14005
|
+
}, direction: 'vertical', height: height },
|
14006
|
+
React.createElement(ToggleButton$1, { style: {
|
14007
|
+
position: 'fixed',
|
14008
|
+
visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
|
14009
|
+
zIndex: 999,
|
14010
|
+
[(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
|
14011
|
+
[(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _g !== void 0 ? _g : 23
|
14012
|
+
}, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted }),
|
14013
|
+
renderView),
|
14014
|
+
React.createElement(WaterFall$1, Object.assign({}, (_k = (_j = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.item) === null || _k === void 0 ? void 0 : _k.props)),
|
14010
14015
|
React.createElement("div", { style: { position: 'absolute', zIndex: -100 } },
|
14011
14016
|
React.createElement("video", { ref: playerRef, id: 'player-container-id', playsInline: true, crossOrigin: 'anonymous', style: {
|
14012
14017
|
backgroundColor: 'transparent',
|
@@ -14545,4 +14550,3 @@ Made in Italy` })));
|
|
14545
14550
|
Object.defineProperty(exports, '__esModule', { value: true });
|
14546
14551
|
|
14547
14552
|
}));
|
14548
|
-
//# sourceMappingURL=pb-ui.js.map
|