pb-sxp-ui 1.0.80 → 1.0.82
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 +400 -145
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +97 -4
- package/dist/index.js +401 -146
- 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 +400 -145
- 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/Pagebuilder/type.d.ts +7 -0
- package/es/core/components/Consent/index.d.ts +13 -0
- package/es/core/components/Consent/index.js +60 -0
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/Tagbar.js +15 -1
- package/es/core/components/SxpPageRender/WaterFall/List.d.ts +1 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +15 -9
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +1 -1
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +18 -12
- package/es/core/components/SxpPageRender/WaterFall/index.js +7 -2
- package/es/core/components/SxpPageRender/index.d.ts +2 -1
- package/es/core/components/SxpPageRender/index.js +30 -10
- package/es/core/components/SxpPageRender/typing.d.ts +1 -0
- package/es/core/context/EditorDataProvider.d.ts +9 -0
- package/es/core/context/EditorDataProvider.js +13 -3
- package/es/core/context/SxpDataSourceProvider.d.ts +10 -0
- package/es/core/context/SxpDataSourceProvider.js +37 -21
- package/es/core/hooks/useEventReport.d.ts +1 -0
- package/es/core/hooks/useEventReport.js +13 -1
- package/es/core/utils/localStore.d.ts +1 -0
- package/es/core/utils/localStore.js +1 -0
- package/es/materials/sxp/Consent/index.d.ts +12 -0
- package/es/materials/sxp/Consent/index.js +5 -0
- package/es/materials/sxp/Consent/material.d.ts +2 -0
- package/es/materials/sxp/Consent/material.js +20 -0
- package/es/materials/sxp/Consent/settingRender.d.ts +31 -0
- package/es/materials/sxp/Consent/settingRender.js +39 -0
- package/es/materials/sxp/HashTag/index.d.ts +1 -1
- package/es/materials/sxp/HashTag/settingRender.js +1 -1
- package/es/materials/sxp/index.d.ts +1 -0
- package/es/materials/sxp/index.js +1 -0
- package/lib/core/Pagebuilder/type.d.ts +7 -0
- package/lib/core/components/Consent/index.d.ts +13 -0
- package/lib/core/components/Consent/index.js +63 -0
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/Tagbar.js +15 -1
- package/lib/core/components/SxpPageRender/WaterFall/List.d.ts +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/List.js +15 -9
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +18 -12
- package/lib/core/components/SxpPageRender/WaterFall/index.js +7 -2
- package/lib/core/components/SxpPageRender/index.d.ts +2 -1
- package/lib/core/components/SxpPageRender/index.js +30 -10
- package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
- package/lib/core/context/EditorDataProvider.d.ts +9 -0
- package/lib/core/context/EditorDataProvider.js +13 -3
- package/lib/core/context/SxpDataSourceProvider.d.ts +10 -0
- package/lib/core/context/SxpDataSourceProvider.js +36 -20
- package/lib/core/hooks/useEventReport.d.ts +1 -0
- package/lib/core/hooks/useEventReport.js +13 -1
- package/lib/core/utils/localStore.d.ts +1 -0
- package/lib/core/utils/localStore.js +2 -1
- package/lib/materials/sxp/Consent/index.d.ts +12 -0
- package/lib/materials/sxp/Consent/index.js +8 -0
- package/lib/materials/sxp/Consent/material.d.ts +2 -0
- package/lib/materials/sxp/Consent/material.js +24 -0
- package/lib/materials/sxp/Consent/settingRender.d.ts +31 -0
- package/lib/materials/sxp/Consent/settingRender.js +41 -0
- package/lib/materials/sxp/HashTag/index.d.ts +1 -1
- package/lib/materials/sxp/HashTag/settingRender.js +1 -1
- package/lib/materials/sxp/index.d.ts +1 -0
- package/lib/materials/sxp/index.js +1 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -393,6 +393,7 @@ const getFeSessionId = () => {
|
|
393
393
|
|
394
394
|
const FAKE_USER_KEY = 'SXP_FAKE_USER_ID';
|
395
395
|
const FAKE_USER_STATE = 'FAKE_USER_STATE';
|
396
|
+
const AGREE_POLICY = 'AGREE_POLICY';
|
396
397
|
const storeAndLoadFeUserId = () => {
|
397
398
|
let fakeUserId = window.localStorage.getItem(FAKE_USER_KEY);
|
398
399
|
if (lodash.isEmpty(fakeUserId)) {
|
@@ -437,6 +438,70 @@ var SXP_EVENT_TYPE;
|
|
437
438
|
SXP_EVENT_TYPE["CHANGE_THEME_TAG"] = "changeThemeTag";
|
438
439
|
})(SXP_EVENT_TYPE || (SXP_EVENT_TYPE = {}));
|
439
440
|
|
441
|
+
/*
|
442
|
+
* @Author: binruan@chatlabs.com
|
443
|
+
* @Date: 2024-06-13 15:16:53
|
444
|
+
* @LastEditors: binruan@chatlabs.com
|
445
|
+
* @LastEditTime: 2024-06-13 18:22:53
|
446
|
+
* @FilePath: \pb-sxp-ui\src\core\components\Consent\index.tsx
|
447
|
+
*
|
448
|
+
*/
|
449
|
+
const Consent$2 = ({ width = window.innerWidth, height = window.innerHeight, privacy_title, privacy_context, privacy_policy_url, privacy_policy_title }) => {
|
450
|
+
const { setIsAgreePolicy, bffEventReport } = useSxpDataSource();
|
451
|
+
const channelObj = React.useMemo(() => {
|
452
|
+
const queryString = location.search.slice(1);
|
453
|
+
const params = qs.parse(queryString.replace(/\+/g, '%2B'));
|
454
|
+
for (const key in params) {
|
455
|
+
params[key] = params[key].replace(/%2B/g, '+');
|
456
|
+
}
|
457
|
+
return params;
|
458
|
+
}, []);
|
459
|
+
const getUtmValue = (key) => { var _a; return (_a = channelObj[key]) !== null && _a !== void 0 ? _a : null; };
|
460
|
+
React.useEffect(() => {
|
461
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
462
|
+
eventInfo: {
|
463
|
+
eventSubject: 'privacyEnter',
|
464
|
+
eventDescription: 'User enter privacy page',
|
465
|
+
utmSource: getUtmValue('utm_source'),
|
466
|
+
utmMedium: getUtmValue('utm_medium'),
|
467
|
+
utmCampaign: getUtmValue('utm_campaign'),
|
468
|
+
utmId: getUtmValue('utm_id'),
|
469
|
+
utmContent: getUtmValue('utm_content'),
|
470
|
+
clSource: getUtmValue('cl_source'),
|
471
|
+
enterTime: `${Date.now()}`,
|
472
|
+
enterUrl: window.location.href,
|
473
|
+
rtc: null,
|
474
|
+
requestId: null,
|
475
|
+
sessionID: null
|
476
|
+
}
|
477
|
+
});
|
478
|
+
}, []);
|
479
|
+
const handleAgree = () => {
|
480
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
481
|
+
eventInfo: {
|
482
|
+
eventSubject: 'userConsent',
|
483
|
+
eventDescription: '用户授权【操作结果】',
|
484
|
+
consentResult: '0',
|
485
|
+
consentTags: '[]',
|
486
|
+
rtc: null,
|
487
|
+
requestId: null,
|
488
|
+
sessionID: null
|
489
|
+
}
|
490
|
+
});
|
491
|
+
setIsAgreePolicy === null || setIsAgreePolicy === void 0 ? void 0 : setIsAgreePolicy(true);
|
492
|
+
window.localStorage.setItem(AGREE_POLICY, 'yes');
|
493
|
+
};
|
494
|
+
return (React.createElement("div", { className: 'consent-bg' },
|
495
|
+
React.createElement("div", { className: 'consent' },
|
496
|
+
React.createElement("div", { className: 'consent-col' },
|
497
|
+
React.createElement("div", { className: 'consent-title' }, privacy_title !== null && privacy_title !== void 0 ? privacy_title : 'Privacy Policy'),
|
498
|
+
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.')),
|
499
|
+
React.createElement("div", { className: 'consent-col' },
|
500
|
+
React.createElement("button", { className: 'consent-btn', onClick: handleAgree }, "Agree"),
|
501
|
+
React.createElement("a", { className: 'consent-policy', target: '_blank', href: privacy_policy_url }, privacy_policy_title !== null && privacy_policy_title !== void 0 ? privacy_policy_title : 'More information')))));
|
502
|
+
};
|
503
|
+
var Consent$3 = React.memo(Consent$2);
|
504
|
+
|
440
505
|
const SxpDataSourceContext = React.createContext({
|
441
506
|
rtcList: [],
|
442
507
|
tagList: []
|
@@ -446,13 +511,15 @@ var DataSourceType;
|
|
446
511
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
447
512
|
})(DataSourceType || (DataSourceType = {}));
|
448
513
|
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
449
|
-
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
|
514
|
+
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 }) => {
|
515
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
450
516
|
const [rtcList, setRtcList] = React.useState([]);
|
451
517
|
const [tagList, setTagList] = React.useState([]);
|
452
518
|
const [loading, setLoading] = React.useState(false);
|
453
519
|
const [curReqInfo, setCurReqInfo] = React.useState({ rtc: '', requestId: '' });
|
454
520
|
const swiperRef = React.useRef(null);
|
455
521
|
const isInit = React.useRef(false);
|
522
|
+
const [isAgreePolicy, setIsAgreePolicy] = React.useState(() => !!window.localStorage.getItem(AGREE_POLICY));
|
456
523
|
// 弹窗数据
|
457
524
|
const [popupDetailData, setPopupDetailData] = React.useState();
|
458
525
|
const [waterFallData, setWaterFallData] = React.useState();
|
@@ -462,6 +529,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
462
529
|
const [isFromHashtag, setIsFromHashtag] = React.useState(false);
|
463
530
|
const [videoRef, setVideoRef] = React.useState(null);
|
464
531
|
const themeTag = React.useRef();
|
532
|
+
const curTime = React.useRef();
|
465
533
|
React.useEffect(() => {
|
466
534
|
const handleChangeThemeTag = (tag) => {
|
467
535
|
themeTag.current = tag;
|
@@ -506,10 +574,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
506
574
|
}, [bffDataSource]);
|
507
575
|
// 获取推荐视频数据
|
508
576
|
const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
509
|
-
var
|
577
|
+
var _h, _j, _k, _l, _m;
|
510
578
|
query = {
|
511
|
-
maxSize: (
|
512
|
-
defaultSize: (
|
579
|
+
maxSize: (_h = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _h !== void 0 ? _h : maxSize,
|
580
|
+
defaultSize: (_j = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _j !== void 0 ? _j : defaultSize,
|
513
581
|
'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
|
514
582
|
'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
|
515
583
|
hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
|
@@ -517,10 +585,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
517
585
|
themeTag: query === null || query === void 0 ? void 0 : query.themeTag
|
518
586
|
};
|
519
587
|
if (utmVal) {
|
520
|
-
const val = (
|
588
|
+
const val = (_m = (_l = (_k = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _k === void 0 ? void 0 : _k.filter((val) => {
|
521
589
|
const key = val.split('=')[0];
|
522
590
|
return UTM_KEYS.includes(key);
|
523
|
-
})) === null ||
|
591
|
+
})) === null || _l === void 0 ? void 0 : _l.join('&')) !== null && _m !== void 0 ? _m : '';
|
524
592
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
525
593
|
}
|
526
594
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
@@ -532,7 +600,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
532
600
|
return result === null || result === void 0 ? void 0 : result.data;
|
533
601
|
}), [bffFetch, utmVal, maxSize, defaultSize]);
|
534
602
|
const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
535
|
-
var
|
603
|
+
var _o, _p;
|
536
604
|
if (rtcList.length <= 0) {
|
537
605
|
return;
|
538
606
|
}
|
@@ -542,8 +610,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
542
610
|
'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
|
543
611
|
themeTag: themeTag.current
|
544
612
|
});
|
545
|
-
setRtcList(rtcList.concat((
|
546
|
-
setCacheRtcList(cacheRtcList.concat((
|
613
|
+
setRtcList(rtcList.concat((_o = data === null || data === void 0 ? void 0 : data.recList) !== null && _o !== void 0 ? _o : []));
|
614
|
+
setCacheRtcList(cacheRtcList.concat((_p = data === null || data === void 0 ? void 0 : data.recList) !== null && _p !== void 0 ? _p : []));
|
547
615
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
548
616
|
const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
|
549
617
|
// 关闭 BFF 事件上报
|
@@ -607,16 +675,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
607
675
|
}), [bffFetch]);
|
608
676
|
// 获取 Tag
|
609
677
|
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
610
|
-
var
|
678
|
+
var _q, _r, _s, _t, _u;
|
611
679
|
if (!utmVal || !isShowTag)
|
612
680
|
return;
|
613
681
|
try {
|
614
|
-
const val = (
|
682
|
+
const val = (_s = (_r = (_q = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _q === void 0 ? void 0 : _q.filter((val) => {
|
615
683
|
const key = val.split('=')[0];
|
616
684
|
return UTM_KEYS.includes(key);
|
617
|
-
})) === null ||
|
685
|
+
})) === null || _r === void 0 ? void 0 : _r.join('&')) !== null && _s !== void 0 ? _s : '';
|
618
686
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
619
|
-
setTagList((
|
687
|
+
setTagList((_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []);
|
620
688
|
}
|
621
689
|
catch (e) {
|
622
690
|
console.log('e', e);
|
@@ -640,7 +708,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
640
708
|
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
|
641
709
|
});
|
642
710
|
}, [bffEventReport, isFromHashtag]);
|
643
|
-
React.
|
711
|
+
const h5EnterLink = React.useCallback(() => {
|
644
712
|
var _a, _b;
|
645
713
|
const queryString = location.search.slice(1);
|
646
714
|
const params = qs.parse(queryString.replace(/\+/g, '%2B'));
|
@@ -648,6 +716,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
648
716
|
params[key] = params[key].replace(/%2B/g, '+');
|
649
717
|
}
|
650
718
|
const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
|
719
|
+
const time = new Date();
|
720
|
+
curTime.current = time;
|
651
721
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
652
722
|
eventInfo: {
|
653
723
|
eventSubject: 'h5LinkEnterFeed',
|
@@ -657,14 +727,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
657
727
|
utmCampaign: getVal('utm_campaign'),
|
658
728
|
utmId: getVal('utm_id'),
|
659
729
|
utmContent: getVal('utm_content'),
|
660
|
-
enterTime:
|
730
|
+
enterTime: Math.floor(time / 1000) + '',
|
661
731
|
requestId: null,
|
662
732
|
enterUrl: (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : '',
|
663
|
-
clSource: getVal('
|
733
|
+
clSource: getVal('cl_source')
|
664
734
|
}
|
665
735
|
});
|
736
|
+
}, [bffEventReport]);
|
737
|
+
React.useEffect(() => {
|
738
|
+
h5EnterLink();
|
666
739
|
}, []);
|
667
740
|
React.useEffect(() => {
|
741
|
+
if (!isAgreePolicy)
|
742
|
+
return;
|
668
743
|
setLoading(true);
|
669
744
|
bffGetTagList();
|
670
745
|
getRecommendVideos()
|
@@ -683,7 +758,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
683
758
|
setLoading(false);
|
684
759
|
isInit.current = true;
|
685
760
|
});
|
686
|
-
}, []);
|
761
|
+
}, [isAgreePolicy]);
|
687
762
|
React.useEffect(() => {
|
688
763
|
if (!isInit.current)
|
689
764
|
return;
|
@@ -735,14 +810,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
735
810
|
setLoading,
|
736
811
|
videoRef,
|
737
812
|
setVideoRef,
|
738
|
-
bffFbReport
|
739
|
-
|
813
|
+
bffFbReport,
|
814
|
+
isAgreePolicy,
|
815
|
+
setIsAgreePolicy,
|
816
|
+
curTime,
|
817
|
+
h5EnterLink,
|
818
|
+
themeTag
|
819
|
+
} }, (((_d = (_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) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy) || isOpenConsent ? (React.createElement(Consent$3, Object.assign({}, (_g = (_f = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.item) === null || _g === void 0 ? void 0 : _g.props))) : (render({
|
740
820
|
rtcList,
|
741
821
|
mutateLike: bffMutateLike,
|
742
822
|
mutateUnlike: bffMutateUnlike,
|
743
823
|
submitForm: bffSubmitForm,
|
744
824
|
tagList
|
745
|
-
})));
|
825
|
+
}))));
|
746
826
|
};
|
747
827
|
var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
|
748
828
|
|
@@ -1008,7 +1088,7 @@ var defaultSetting = {
|
|
1008
1088
|
*
|
1009
1089
|
*/
|
1010
1090
|
var _a$5, _b$5, _c;
|
1011
|
-
var settingRender$
|
1091
|
+
var settingRender$6 = [
|
1012
1092
|
{
|
1013
1093
|
type: 'Text',
|
1014
1094
|
label: '组件名称',
|
@@ -1146,7 +1226,7 @@ var settingRender$5 = [
|
|
1146
1226
|
* @Author: binruan@chatlabs.com
|
1147
1227
|
* @Date: 2024-03-12 10:59:06
|
1148
1228
|
* @LastEditors: binruan@chatlabs.com
|
1149
|
-
* @LastEditTime: 2024-
|
1229
|
+
* @LastEditTime: 2024-06-12 10:53:57
|
1150
1230
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1151
1231
|
*
|
1152
1232
|
*/
|
@@ -1216,9 +1296,21 @@ function useEventReport() {
|
|
1216
1296
|
}
|
1217
1297
|
});
|
1218
1298
|
}, [bffEventReport, popupDetailData]);
|
1299
|
+
const backMainFeed = React.useCallback((lastFeed, themeTag, hashTag) => {
|
1300
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1301
|
+
eventInfo: {
|
1302
|
+
lastFeed,
|
1303
|
+
themeTags: themeTag ? `[${themeTag}]` : '',
|
1304
|
+
hashTags: hashTag ? `[${hashTag}]` : '',
|
1305
|
+
eventSubject: 'backMainFeed',
|
1306
|
+
eventDescription: 'back Main Feed'
|
1307
|
+
}
|
1308
|
+
});
|
1309
|
+
}, [bffEventReport]);
|
1219
1310
|
return {
|
1220
1311
|
jumpToWeb,
|
1221
|
-
productView
|
1312
|
+
productView,
|
1313
|
+
backMainFeed
|
1222
1314
|
};
|
1223
1315
|
}
|
1224
1316
|
|
@@ -1323,7 +1415,7 @@ const AppointForm = createMaterial(AppointFormComponent, {
|
|
1323
1415
|
category: 'popup',
|
1324
1416
|
type: 'AppointForm',
|
1325
1417
|
related: {
|
1326
|
-
settingRender: settingRender$
|
1418
|
+
settingRender: settingRender$6,
|
1327
1419
|
bindableProps: [],
|
1328
1420
|
interactionRender: interactionRender$8
|
1329
1421
|
},
|
@@ -1349,7 +1441,7 @@ const AppointForm = createMaterial(AppointFormComponent, {
|
|
1349
1441
|
});
|
1350
1442
|
|
1351
1443
|
var _a$4, _b$4;
|
1352
|
-
var settingRender$
|
1444
|
+
var settingRender$5 = [
|
1353
1445
|
{
|
1354
1446
|
title: '商品图片',
|
1355
1447
|
child: [
|
@@ -3008,7 +3100,7 @@ function Scrollbar(_ref) {
|
|
3008
3100
|
dragEl
|
3009
3101
|
} = scrollbar;
|
3010
3102
|
if (!isTouched) return;
|
3011
|
-
if (e.preventDefault) e.preventDefault();else e.returnValue = false;
|
3103
|
+
if (e.preventDefault && e.cancelable) e.preventDefault();else e.returnValue = false;
|
3012
3104
|
setDragPosition(e);
|
3013
3105
|
wrapperEl.style.transitionDuration = '0ms';
|
3014
3106
|
el.style.transitionDuration = '0ms';
|
@@ -3235,7 +3327,7 @@ function Autoplay(_ref) {
|
|
3235
3327
|
if (!swiper || swiper.destroyed || !swiper.wrapperEl) return;
|
3236
3328
|
if (e.target !== swiper.wrapperEl) return;
|
3237
3329
|
swiper.wrapperEl.removeEventListener('transitionend', onTransitionEnd);
|
3238
|
-
if (pausedByPointerEnter) {
|
3330
|
+
if (pausedByPointerEnter || e.detail && e.detail.bySwiperTouchMove) {
|
3239
3331
|
return;
|
3240
3332
|
}
|
3241
3333
|
resume();
|
@@ -3406,8 +3498,10 @@ function Autoplay(_ref) {
|
|
3406
3498
|
}
|
3407
3499
|
};
|
3408
3500
|
const detachMouseEvents = () => {
|
3409
|
-
swiper.el.
|
3410
|
-
|
3501
|
+
if (swiper.el && typeof swiper.el !== 'string') {
|
3502
|
+
swiper.el.removeEventListener('pointerenter', onPointerEnter);
|
3503
|
+
swiper.el.removeEventListener('pointerleave', onPointerLeave);
|
3504
|
+
}
|
3411
3505
|
};
|
3412
3506
|
const attachDocumentEvents = () => {
|
3413
3507
|
const document = getDocument();
|
@@ -4329,8 +4423,9 @@ function updateSlides() {
|
|
4329
4423
|
allSlidesSize += slideSizeValue + (spaceBetween || 0);
|
4330
4424
|
});
|
4331
4425
|
allSlidesSize -= spaceBetween;
|
4332
|
-
|
4333
|
-
|
4426
|
+
const offsetSize = (params.slidesOffsetBefore || 0) + (params.slidesOffsetAfter || 0);
|
4427
|
+
if (allSlidesSize + offsetSize < swiperSize) {
|
4428
|
+
const allSlidesOffset = (swiperSize - allSlidesSize - offsetSize) / 2;
|
4334
4429
|
snapGrid.forEach((snap, snapIndex) => {
|
4335
4430
|
snapGrid[snapIndex] = snap - allSlidesOffset;
|
4336
4431
|
});
|
@@ -4434,6 +4529,13 @@ function updateSlidesOffset() {
|
|
4434
4529
|
}
|
4435
4530
|
}
|
4436
4531
|
|
4532
|
+
const toggleSlideClasses$1 = (slideEl, condition, className) => {
|
4533
|
+
if (condition && !slideEl.classList.contains(className)) {
|
4534
|
+
slideEl.classList.add(className);
|
4535
|
+
} else if (!condition && slideEl.classList.contains(className)) {
|
4536
|
+
slideEl.classList.remove(className);
|
4537
|
+
}
|
4538
|
+
};
|
4437
4539
|
function updateSlidesProgress(translate) {
|
4438
4540
|
if (translate === void 0) {
|
4439
4541
|
translate = this && this.translate || 0;
|
@@ -4449,11 +4551,6 @@ function updateSlidesProgress(translate) {
|
|
4449
4551
|
if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
|
4450
4552
|
let offsetCenter = -translate;
|
4451
4553
|
if (rtl) offsetCenter = translate;
|
4452
|
-
|
4453
|
-
// Visible Slides
|
4454
|
-
slides.forEach(slideEl => {
|
4455
|
-
slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass);
|
4456
|
-
});
|
4457
4554
|
swiper.visibleSlidesIndexes = [];
|
4458
4555
|
swiper.visibleSlides = [];
|
4459
4556
|
let spaceBetween = params.spaceBetween;
|
@@ -4477,11 +4574,9 @@ function updateSlidesProgress(translate) {
|
|
4477
4574
|
if (isVisible) {
|
4478
4575
|
swiper.visibleSlides.push(slide);
|
4479
4576
|
swiper.visibleSlidesIndexes.push(i);
|
4480
|
-
slides[i].classList.add(params.slideVisibleClass);
|
4481
|
-
}
|
4482
|
-
if (isFullyVisible) {
|
4483
|
-
slides[i].classList.add(params.slideFullyVisibleClass);
|
4484
4577
|
}
|
4578
|
+
toggleSlideClasses$1(slide, isVisible, params.slideVisibleClass);
|
4579
|
+
toggleSlideClasses$1(slide, isFullyVisible, params.slideFullyVisibleClass);
|
4485
4580
|
slide.progress = rtl ? -slideProgress : slideProgress;
|
4486
4581
|
slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;
|
4487
4582
|
}
|
@@ -4550,6 +4645,13 @@ function updateProgress(translate) {
|
|
4550
4645
|
swiper.emit('progress', progress);
|
4551
4646
|
}
|
4552
4647
|
|
4648
|
+
const toggleSlideClasses = (slideEl, condition, className) => {
|
4649
|
+
if (condition && !slideEl.classList.contains(className)) {
|
4650
|
+
slideEl.classList.add(className);
|
4651
|
+
} else if (!condition && slideEl.classList.contains(className)) {
|
4652
|
+
slideEl.classList.remove(className);
|
4653
|
+
}
|
4654
|
+
};
|
4553
4655
|
function updateSlidesClasses() {
|
4554
4656
|
const swiper = this;
|
4555
4657
|
const {
|
@@ -4563,9 +4665,6 @@ function updateSlidesClasses() {
|
|
4563
4665
|
const getFilteredSlide = selector => {
|
4564
4666
|
return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];
|
4565
4667
|
};
|
4566
|
-
slides.forEach(slideEl => {
|
4567
|
-
slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
|
4568
|
-
});
|
4569
4668
|
let activeSlide;
|
4570
4669
|
let prevSlide;
|
4571
4670
|
let nextSlide;
|
@@ -4588,35 +4687,25 @@ function updateSlidesClasses() {
|
|
4588
4687
|
}
|
4589
4688
|
}
|
4590
4689
|
if (activeSlide) {
|
4591
|
-
|
4592
|
-
activeSlide.classList.add(params.slideActiveClass);
|
4593
|
-
if (gridEnabled) {
|
4594
|
-
if (nextSlide) {
|
4595
|
-
nextSlide.classList.add(params.slideNextClass);
|
4596
|
-
}
|
4597
|
-
if (prevSlide) {
|
4598
|
-
prevSlide.classList.add(params.slidePrevClass);
|
4599
|
-
}
|
4600
|
-
} else {
|
4690
|
+
if (!gridEnabled) {
|
4601
4691
|
// Next Slide
|
4602
4692
|
nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
|
4603
4693
|
if (params.loop && !nextSlide) {
|
4604
4694
|
nextSlide = slides[0];
|
4605
4695
|
}
|
4606
|
-
if (nextSlide) {
|
4607
|
-
nextSlide.classList.add(params.slideNextClass);
|
4608
|
-
}
|
4609
4696
|
|
4610
4697
|
// Prev Slide
|
4611
4698
|
prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
|
4612
4699
|
if (params.loop && !prevSlide === 0) {
|
4613
4700
|
prevSlide = slides[slides.length - 1];
|
4614
4701
|
}
|
4615
|
-
if (prevSlide) {
|
4616
|
-
prevSlide.classList.add(params.slidePrevClass);
|
4617
|
-
}
|
4618
4702
|
}
|
4619
4703
|
}
|
4704
|
+
slides.forEach(slideEl => {
|
4705
|
+
toggleSlideClasses(slideEl, slideEl === activeSlide, params.slideActiveClass);
|
4706
|
+
toggleSlideClasses(slideEl, slideEl === nextSlide, params.slideNextClass);
|
4707
|
+
toggleSlideClasses(slideEl, slideEl === prevSlide, params.slidePrevClass);
|
4708
|
+
});
|
4620
4709
|
swiper.emitSlidesClasses();
|
4621
4710
|
}
|
4622
4711
|
|
@@ -4994,6 +5083,7 @@ function translateTo(translate, speed, runCallbacks, translateBounds, internal)
|
|
4994
5083
|
swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
|
4995
5084
|
swiper.onTranslateToWrapperTransitionEnd = null;
|
4996
5085
|
delete swiper.onTranslateToWrapperTransitionEnd;
|
5086
|
+
swiper.animating = false;
|
4997
5087
|
if (runCallbacks) {
|
4998
5088
|
swiper.emit('transitionEnd');
|
4999
5089
|
}
|
@@ -5101,9 +5191,6 @@ function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
5101
5191
|
if (index === void 0) {
|
5102
5192
|
index = 0;
|
5103
5193
|
}
|
5104
|
-
if (speed === void 0) {
|
5105
|
-
speed = this.params.speed;
|
5106
|
-
}
|
5107
5194
|
if (runCallbacks === void 0) {
|
5108
5195
|
runCallbacks = true;
|
5109
5196
|
}
|
@@ -5123,9 +5210,12 @@ function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
5123
5210
|
wrapperEl,
|
5124
5211
|
enabled
|
5125
5212
|
} = swiper;
|
5126
|
-
if (
|
5213
|
+
if (!enabled && !internal && !initial || swiper.destroyed || swiper.animating && params.preventInteractionOnTransition) {
|
5127
5214
|
return false;
|
5128
5215
|
}
|
5216
|
+
if (typeof speed === 'undefined') {
|
5217
|
+
speed = swiper.params.speed;
|
5218
|
+
}
|
5129
5219
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
|
5130
5220
|
let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
|
5131
5221
|
if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
|
@@ -5252,9 +5342,6 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
5252
5342
|
if (index === void 0) {
|
5253
5343
|
index = 0;
|
5254
5344
|
}
|
5255
|
-
if (speed === void 0) {
|
5256
|
-
speed = this.params.speed;
|
5257
|
-
}
|
5258
5345
|
if (runCallbacks === void 0) {
|
5259
5346
|
runCallbacks = true;
|
5260
5347
|
}
|
@@ -5264,6 +5351,9 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
5264
5351
|
}
|
5265
5352
|
const swiper = this;
|
5266
5353
|
if (swiper.destroyed) return;
|
5354
|
+
if (typeof speed === 'undefined') {
|
5355
|
+
speed = swiper.params.speed;
|
5356
|
+
}
|
5267
5357
|
const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;
|
5268
5358
|
let newIndex = index;
|
5269
5359
|
if (swiper.params.loop) {
|
@@ -5295,6 +5385,9 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
5295
5385
|
if (centeredSlides) {
|
5296
5386
|
needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2);
|
5297
5387
|
}
|
5388
|
+
if (internal && centeredSlides && swiper.params.slidesPerView !== 'auto' && !gridEnabled) {
|
5389
|
+
needLoopFix = false;
|
5390
|
+
}
|
5298
5391
|
if (needLoopFix) {
|
5299
5392
|
const direction = centeredSlides ? targetSlideIndex < swiper.activeIndex ? 'prev' : 'next' : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? 'next' : 'prev';
|
5300
5393
|
swiper.loopFix({
|
@@ -5320,9 +5413,6 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
5320
5413
|
|
5321
5414
|
/* eslint no-unused-vars: "off" */
|
5322
5415
|
function slideNext(speed, runCallbacks, internal) {
|
5323
|
-
if (speed === void 0) {
|
5324
|
-
speed = this.params.speed;
|
5325
|
-
}
|
5326
5416
|
if (runCallbacks === void 0) {
|
5327
5417
|
runCallbacks = true;
|
5328
5418
|
}
|
@@ -5333,6 +5423,9 @@ function slideNext(speed, runCallbacks, internal) {
|
|
5333
5423
|
animating
|
5334
5424
|
} = swiper;
|
5335
5425
|
if (!enabled || swiper.destroyed) return swiper;
|
5426
|
+
if (typeof speed === 'undefined') {
|
5427
|
+
speed = swiper.params.speed;
|
5428
|
+
}
|
5336
5429
|
let perGroup = params.slidesPerGroup;
|
5337
5430
|
if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {
|
5338
5431
|
perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);
|
@@ -5361,9 +5454,6 @@ function slideNext(speed, runCallbacks, internal) {
|
|
5361
5454
|
|
5362
5455
|
/* eslint no-unused-vars: "off" */
|
5363
5456
|
function slidePrev(speed, runCallbacks, internal) {
|
5364
|
-
if (speed === void 0) {
|
5365
|
-
speed = this.params.speed;
|
5366
|
-
}
|
5367
5457
|
if (runCallbacks === void 0) {
|
5368
5458
|
runCallbacks = true;
|
5369
5459
|
}
|
@@ -5377,6 +5467,9 @@ function slidePrev(speed, runCallbacks, internal) {
|
|
5377
5467
|
animating
|
5378
5468
|
} = swiper;
|
5379
5469
|
if (!enabled || swiper.destroyed) return swiper;
|
5470
|
+
if (typeof speed === 'undefined') {
|
5471
|
+
speed = swiper.params.speed;
|
5472
|
+
}
|
5380
5473
|
const isVirtual = swiper.virtual && params.virtual.enabled;
|
5381
5474
|
if (params.loop) {
|
5382
5475
|
if (animating && !isVirtual && params.loopPreventsSliding) return false;
|
@@ -5429,22 +5522,19 @@ function slidePrev(speed, runCallbacks, internal) {
|
|
5429
5522
|
|
5430
5523
|
/* eslint no-unused-vars: "off" */
|
5431
5524
|
function slideReset(speed, runCallbacks, internal) {
|
5432
|
-
if (speed === void 0) {
|
5433
|
-
speed = this.params.speed;
|
5434
|
-
}
|
5435
5525
|
if (runCallbacks === void 0) {
|
5436
5526
|
runCallbacks = true;
|
5437
5527
|
}
|
5438
5528
|
const swiper = this;
|
5439
5529
|
if (swiper.destroyed) return;
|
5530
|
+
if (typeof speed === 'undefined') {
|
5531
|
+
speed = swiper.params.speed;
|
5532
|
+
}
|
5440
5533
|
return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
|
5441
5534
|
}
|
5442
5535
|
|
5443
5536
|
/* eslint no-unused-vars: "off" */
|
5444
5537
|
function slideToClosest(speed, runCallbacks, internal, threshold) {
|
5445
|
-
if (speed === void 0) {
|
5446
|
-
speed = this.params.speed;
|
5447
|
-
}
|
5448
5538
|
if (runCallbacks === void 0) {
|
5449
5539
|
runCallbacks = true;
|
5450
5540
|
}
|
@@ -5453,6 +5543,9 @@ function slideToClosest(speed, runCallbacks, internal, threshold) {
|
|
5453
5543
|
}
|
5454
5544
|
const swiper = this;
|
5455
5545
|
if (swiper.destroyed) return;
|
5546
|
+
if (typeof speed === 'undefined') {
|
5547
|
+
speed = swiper.params.speed;
|
5548
|
+
}
|
5456
5549
|
let index = swiper.activeIndex;
|
5457
5550
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
|
5458
5551
|
const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);
|
@@ -6087,7 +6180,7 @@ function onTouchMove(event) {
|
|
6087
6180
|
data.startMoving = true;
|
6088
6181
|
}
|
6089
6182
|
}
|
6090
|
-
if (data.isScrolling) {
|
6183
|
+
if (data.isScrolling || e.type === 'touchmove' && data.preventTouchMoveFromPointerMove) {
|
6091
6184
|
data.isTouched = false;
|
6092
6185
|
return;
|
6093
6186
|
}
|
@@ -6129,7 +6222,10 @@ function onTouchMove(event) {
|
|
6129
6222
|
if (swiper.animating) {
|
6130
6223
|
const evt = new window.CustomEvent('transitionend', {
|
6131
6224
|
bubbles: true,
|
6132
|
-
cancelable: true
|
6225
|
+
cancelable: true,
|
6226
|
+
detail: {
|
6227
|
+
bySwiperTouchMove: true
|
6228
|
+
}
|
6133
6229
|
});
|
6134
6230
|
swiper.wrapperEl.dispatchEvent(evt);
|
6135
6231
|
}
|
@@ -6523,6 +6619,7 @@ const events = (swiper, method) => {
|
|
6523
6619
|
const capture = !!params.nested;
|
6524
6620
|
const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';
|
6525
6621
|
const swiperMethod = method;
|
6622
|
+
if (!el || typeof el === 'string') return;
|
6526
6623
|
|
6527
6624
|
// Touch Events
|
6528
6625
|
document[domMethod]('touchstart', swiper.onDocumentTouchStart, {
|
@@ -6631,6 +6728,8 @@ function setBreakpoint() {
|
|
6631
6728
|
const breakpointParams = breakpointOnlyParams || swiper.originalParams;
|
6632
6729
|
const wasMultiRow = isGridEnabled(swiper, params);
|
6633
6730
|
const isMultiRow = isGridEnabled(swiper, breakpointParams);
|
6731
|
+
const wasGrabCursor = swiper.params.grabCursor;
|
6732
|
+
const isGrabCursor = breakpointParams.grabCursor;
|
6634
6733
|
const wasEnabled = params.enabled;
|
6635
6734
|
if (wasMultiRow && !isMultiRow) {
|
6636
6735
|
el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);
|
@@ -6642,6 +6741,11 @@ function setBreakpoint() {
|
|
6642
6741
|
}
|
6643
6742
|
swiper.emitContainerClasses();
|
6644
6743
|
}
|
6744
|
+
if (wasGrabCursor && !isGrabCursor) {
|
6745
|
+
swiper.unsetGrabCursor();
|
6746
|
+
} else if (!wasGrabCursor && isGrabCursor) {
|
6747
|
+
swiper.setGrabCursor();
|
6748
|
+
}
|
6645
6749
|
|
6646
6750
|
// Toggle navigation, pagination, scrollbar
|
6647
6751
|
['navigation', 'pagination', 'scrollbar'].forEach(prop => {
|
@@ -6792,6 +6896,7 @@ function removeClasses() {
|
|
6792
6896
|
el,
|
6793
6897
|
classNames
|
6794
6898
|
} = swiper;
|
6899
|
+
if (!el || typeof el === 'string') return;
|
6795
6900
|
el.classList.remove(...classNames);
|
6796
6901
|
swiper.emitContainerClasses();
|
6797
6902
|
}
|
@@ -7556,8 +7661,12 @@ let Swiper$1 = class Swiper {
|
|
7556
7661
|
// Cleanup styles
|
7557
7662
|
if (cleanStyles) {
|
7558
7663
|
swiper.removeClasses();
|
7559
|
-
el
|
7560
|
-
|
7664
|
+
if (el && typeof el !== 'string') {
|
7665
|
+
el.removeAttribute('style');
|
7666
|
+
}
|
7667
|
+
if (wrapperEl) {
|
7668
|
+
wrapperEl.removeAttribute('style');
|
7669
|
+
}
|
7561
7670
|
if (slides && slides.length) {
|
7562
7671
|
slides.forEach(slideEl => {
|
7563
7672
|
slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
|
@@ -7573,7 +7682,9 @@ let Swiper$1 = class Swiper {
|
|
7573
7682
|
swiper.off(eventName);
|
7574
7683
|
});
|
7575
7684
|
if (deleteInstance !== false) {
|
7576
|
-
swiper.el.
|
7685
|
+
if (swiper.el && typeof swiper.el !== 'string') {
|
7686
|
+
swiper.el.swiper = null;
|
7687
|
+
}
|
7577
7688
|
deleteProps(swiper);
|
7578
7689
|
}
|
7579
7690
|
swiper.destroyed = true;
|
@@ -7967,7 +8078,7 @@ const updateOnVirtualData = swiper => {
|
|
7967
8078
|
};
|
7968
8079
|
|
7969
8080
|
/**
|
7970
|
-
* Swiper React 11.
|
8081
|
+
* Swiper React 11.1.4
|
7971
8082
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
7972
8083
|
* https://swiperjs.com
|
7973
8084
|
*
|
@@ -7975,7 +8086,7 @@ const updateOnVirtualData = swiper => {
|
|
7975
8086
|
*
|
7976
8087
|
* Released under the MIT License
|
7977
8088
|
*
|
7978
|
-
* Released on:
|
8089
|
+
* Released on: May 30, 2024
|
7979
8090
|
*/
|
7980
8091
|
|
7981
8092
|
|
@@ -8663,7 +8774,7 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
|
|
8663
8774
|
category: 'popup',
|
8664
8775
|
type: 'CommodityDetail',
|
8665
8776
|
related: {
|
8666
|
-
settingRender: settingRender$
|
8777
|
+
settingRender: settingRender$5
|
8667
8778
|
},
|
8668
8779
|
defaulSetting: {
|
8669
8780
|
props: {
|
@@ -8729,7 +8840,7 @@ var interactionRender$7 = [
|
|
8729
8840
|
*
|
8730
8841
|
*/
|
8731
8842
|
var _a$3, _b$3;
|
8732
|
-
var settingRender$
|
8843
|
+
var settingRender$4 = [
|
8733
8844
|
{
|
8734
8845
|
title: '',
|
8735
8846
|
child: [
|
@@ -8856,7 +8967,7 @@ const Prompt = createMaterial(PromptComponent, {
|
|
8856
8967
|
category: 'popup',
|
8857
8968
|
type: 'Prompt',
|
8858
8969
|
related: {
|
8859
|
-
settingRender: settingRender$
|
8970
|
+
settingRender: settingRender$4,
|
8860
8971
|
bindableProps: [],
|
8861
8972
|
interactionRender: interactionRender$7
|
8862
8973
|
},
|
@@ -8882,7 +8993,7 @@ var _a$2, _b$2;
|
|
8882
8993
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
8883
8994
|
*
|
8884
8995
|
*/
|
8885
|
-
var settingRender$
|
8996
|
+
var settingRender$3 = [
|
8886
8997
|
{
|
8887
8998
|
title: '商品图片',
|
8888
8999
|
child: [
|
@@ -9205,7 +9316,7 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
|
|
9205
9316
|
category: 'popup',
|
9206
9317
|
type: 'CommodityDetailDiroNew',
|
9207
9318
|
related: {
|
9208
|
-
settingRender: settingRender$
|
9319
|
+
settingRender: settingRender$3
|
9209
9320
|
},
|
9210
9321
|
defaulSetting: {
|
9211
9322
|
props: {
|
@@ -9266,7 +9377,7 @@ var _a$1, _b$1;
|
|
9266
9377
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
|
9267
9378
|
*
|
9268
9379
|
*/
|
9269
|
-
var settingRender$
|
9380
|
+
var settingRender$2 = [
|
9270
9381
|
{
|
9271
9382
|
title: '主题样式',
|
9272
9383
|
child: [
|
@@ -9618,7 +9729,7 @@ const Commodity = createMaterial(CommodityComponent, {
|
|
9618
9729
|
related: {
|
9619
9730
|
interactionRender: interactionRender$6,
|
9620
9731
|
bindableProps: [],
|
9621
|
-
settingRender: settingRender$
|
9732
|
+
settingRender: settingRender$2
|
9622
9733
|
},
|
9623
9734
|
defaulSetting: {
|
9624
9735
|
props: {
|
@@ -9697,7 +9808,7 @@ const Appoint = createMaterial(AppointComponent, {
|
|
9697
9808
|
type: 'Appoint',
|
9698
9809
|
related: {
|
9699
9810
|
interactionRender: interactionRender$5,
|
9700
|
-
settingRender: settingRender$
|
9811
|
+
settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
|
9701
9812
|
bindableProps: []
|
9702
9813
|
},
|
9703
9814
|
defaulSetting: {
|
@@ -9774,7 +9885,7 @@ const Link = createMaterial(LinkComponent, {
|
|
9774
9885
|
category: 'template',
|
9775
9886
|
type: 'Link',
|
9776
9887
|
related: {
|
9777
|
-
settingRender: settingRender$
|
9888
|
+
settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
|
9778
9889
|
bindableProps: []
|
9779
9890
|
},
|
9780
9891
|
defaulSetting: {
|
@@ -9866,7 +9977,7 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
|
|
9866
9977
|
type: 'CommodityDiro',
|
9867
9978
|
related: {
|
9868
9979
|
interactionRender: interactionRender$4,
|
9869
|
-
settingRender: settingRender$
|
9980
|
+
settingRender: settingRender$2,
|
9870
9981
|
bindableProps: []
|
9871
9982
|
},
|
9872
9983
|
defaulSetting: {
|
@@ -9965,7 +10076,7 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
|
|
9965
10076
|
related: {
|
9966
10077
|
interactionRender: interactionRender$3,
|
9967
10078
|
bindableProps: [],
|
9968
|
-
settingRender: settingRender$
|
10079
|
+
settingRender: settingRender$2
|
9969
10080
|
},
|
9970
10081
|
defaulSetting: {
|
9971
10082
|
props: {
|
@@ -10110,7 +10221,7 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
|
|
10110
10221
|
related: {
|
10111
10222
|
interactionRender: interactionRender$2,
|
10112
10223
|
bindableProps: [],
|
10113
|
-
settingRender: settingRender$
|
10224
|
+
settingRender: settingRender$2
|
10114
10225
|
},
|
10115
10226
|
defaulSetting: {
|
10116
10227
|
props: {
|
@@ -10224,7 +10335,7 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
|
|
10224
10335
|
type: 'MultiCommodity',
|
10225
10336
|
related: {
|
10226
10337
|
interactionRender: interactionRender$1,
|
10227
|
-
settingRender: settingRender$
|
10338
|
+
settingRender: settingRender$2,
|
10228
10339
|
bindableProps: []
|
10229
10340
|
},
|
10230
10341
|
defaulSetting: {
|
@@ -10340,7 +10451,7 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
|
|
10340
10451
|
related: {
|
10341
10452
|
interactionRender,
|
10342
10453
|
bindableProps: [],
|
10343
|
-
settingRender: settingRender$
|
10454
|
+
settingRender: settingRender$2
|
10344
10455
|
},
|
10345
10456
|
defaulSetting: {
|
10346
10457
|
props: {
|
@@ -10386,11 +10497,11 @@ var _a, _b;
|
|
10386
10497
|
* @Author: binruan@chatlabs.com
|
10387
10498
|
* @Date: 2024-04-07 14:07:12
|
10388
10499
|
* @LastEditors: binruan@chatlabs.com
|
10389
|
-
* @LastEditTime: 2024-06-
|
10500
|
+
* @LastEditTime: 2024-06-11 11:04:55
|
10390
10501
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
|
10391
10502
|
*
|
10392
10503
|
*/
|
10393
|
-
var settingRender = [
|
10504
|
+
var settingRender$1 = [
|
10394
10505
|
{
|
10395
10506
|
title: 'Banner',
|
10396
10507
|
child: [
|
@@ -10413,7 +10524,7 @@ var settingRender = [
|
|
10413
10524
|
{
|
10414
10525
|
type: 'Switch',
|
10415
10526
|
label: '固定宽高',
|
10416
|
-
name: ['props', '
|
10527
|
+
name: ['props', 'openFixedSize'],
|
10417
10528
|
initialValue: true
|
10418
10529
|
}
|
10419
10530
|
]
|
@@ -12023,8 +12134,8 @@ const WaterfallFlowItem$1 = (props) => {
|
|
12023
12134
|
React.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
|
12024
12135
|
};
|
12025
12136
|
function WaterfallList$1(_a) {
|
12026
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
12027
|
-
var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
|
12137
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
12138
|
+
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
12028
12139
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
12029
12140
|
/** 滚动的父元素 */
|
12030
12141
|
const scrollParent = React.useRef(null);
|
@@ -12228,25 +12339,30 @@ function WaterfallList$1(_a) {
|
|
12228
12339
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
12229
12340
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'waterFallList', ref: waterfallFlowDom },
|
12230
12341
|
React.createElement("div", { className: 'waterFallList-scroll', ref: scrollParent },
|
12231
|
-
|
12232
|
-
|
12342
|
+
showBanner && ((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.picture) && (React.createElement(FormatImage$1, { className: css.css({
|
12343
|
+
width: '100%',
|
12344
|
+
objectFit: 'cover',
|
12345
|
+
marginBottom: '20px'
|
12346
|
+
}), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture })),
|
12347
|
+
React.createElement("div", { className: 'waterFallList-info', style: (_d = props === null || props === void 0 ? void 0 : props.textStyles) === null || _d === void 0 ? void 0 : _d.hashTagDesc }, (_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.info),
|
12348
|
+
React.createElement("div", { hidden: !((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.link), className: 'waterFallList-collection', style: Object.assign({}, (_g = props === null || props === void 0 ? void 0 : props.textStyles) === null || _g === void 0 ? void 0 : _g.hashTagLink), onClick: handleClickLink }, ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.linkTitle) || 'Shop the collection'),
|
12233
12349
|
React.createElement("div", { className: 'waterFallList-content' }, list === null || list === void 0 ? void 0 :
|
12234
12350
|
list.map((item, ind) => {
|
12235
12351
|
var _a;
|
12236
12352
|
return (React.createElement(WaterfallFlowItem$1, Object.assign({ key: ind, index: ind, rec: item, list: list, showBorder: scrollTop + ((_a = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.current) === null || _a === void 0 ? void 0 : _a.clientHeight), style: styleList[ind], sizeChange: onSizeChange, unitWidth: unitWidth, reportTagsView: reportTagsView }, props)));
|
12237
12353
|
}),
|
12238
|
-
React.createElement("div", { hidden: !((
|
12354
|
+
React.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
|
12239
12355
|
position: 'absolute',
|
12240
12356
|
width: '100%',
|
12241
|
-
transform: `translate(0px,${(
|
12242
|
-
((
|
12243
|
-
height: ((
|
12244
|
-
? ((
|
12357
|
+
transform: `translate(0px,${(_p = ((_l = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_k = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _k === void 0 ? void 0 : _k.length) - 1]) === null || _l === void 0 ? void 0 : _l.top) +
|
12358
|
+
((_o = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_m = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _m === void 0 ? void 0 : _m.length) - 1]) === null || _o === void 0 ? void 0 : _o.height)) !== null && _p !== void 0 ? _p : 0}px)`,
|
12359
|
+
height: ((_q = data === null || data === void 0 ? void 0 : data.tag) === null || _q === void 0 ? void 0 : _q.link)
|
12360
|
+
? ((_r = buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) === null || _r === void 0 ? void 0 : _r.offsetHeight) || ((_s = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _s === void 0 ? void 0 : _s.height) || '100px'
|
12245
12361
|
: 0
|
12246
12362
|
} }))),
|
12247
|
-
React.createElement("div", { className: 'waterFallList-bottom', hidden: !((
|
12248
|
-
React.createElement("div", { ref: buttonRef, hidden: !((
|
12249
|
-
React.createElement("button", { className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((
|
12363
|
+
React.createElement("div", { className: 'waterFallList-bottom', hidden: !((_t = data === null || data === void 0 ? void 0 : data.tag) === null || _t === void 0 ? void 0 : _t.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
|
12364
|
+
React.createElement("div", { ref: buttonRef, hidden: !((_u = data === null || data === void 0 ? void 0 : data.tag) === null || _u === void 0 ? void 0 : _u.link), className: 'waterFallList-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
|
12365
|
+
React.createElement("button", { className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_v = data === null || data === void 0 ? void 0 : data.tag) === null || _v === void 0 ? void 0 : _v.linkTitle) || 'Shop the collection'))))));
|
12250
12366
|
}
|
12251
12367
|
|
12252
12368
|
var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
|
@@ -12375,8 +12491,8 @@ const WaterfallFlowItem = (props) => {
|
|
12375
12491
|
React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
|
12376
12492
|
};
|
12377
12493
|
function WaterfallList(_a) {
|
12378
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
12379
|
-
var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
|
12494
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
12495
|
+
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
12380
12496
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
12381
12497
|
const [list, setList] = React.useState();
|
12382
12498
|
const [data, setData] = React.useState();
|
@@ -12447,31 +12563,37 @@ function WaterfallList(_a) {
|
|
12447
12563
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
12448
12564
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'list' },
|
12449
12565
|
React.createElement("div", { className: 'list-scroll', ref: containerRef },
|
12450
|
-
|
12451
|
-
|
12566
|
+
showBanner && ((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.picture) && (React.createElement(FormatImage$1, { className: css.css({
|
12567
|
+
width: '100%',
|
12568
|
+
objectFit: 'cover',
|
12569
|
+
marginBottom: '20px'
|
12570
|
+
}), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture })),
|
12571
|
+
React.createElement("div", { className: 'list-info', style: (_d = props === null || props === void 0 ? void 0 : props.textStyles) === null || _d === void 0 ? void 0 : _d.hashTagDesc }, (_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.info),
|
12572
|
+
React.createElement("div", { hidden: !((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.link), className: 'list-collection', onClick: handleClickLink, style: Object.assign(Object.assign({}, (_g = props === null || props === void 0 ? void 0 : props.textStyles) === null || _g === void 0 ? void 0 : _g.hashTagLink), { marginBottom: props === null || props === void 0 ? void 0 : props.space }) }, ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.linkTitle) || 'Shop the collection'),
|
12452
12573
|
React.createElement("div", { className: 'list-content' }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
|
12453
12574
|
return (React.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
|
12454
12575
|
})),
|
12455
12576
|
React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading..."),
|
12456
|
-
React.createElement("div", { hidden: !((
|
12457
|
-
height: ((
|
12577
|
+
React.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
|
12578
|
+
height: ((_k = data === null || data === void 0 ? void 0 : data.tag) === null || _k === void 0 ? void 0 : _k.link) ? ((_l = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _l === void 0 ? void 0 : _l.height) || ((_m = props === null || props === void 0 ? void 0 : props.buttonStyle) === null || _m === void 0 ? void 0 : _m.height) || '100px' : 0
|
12458
12579
|
} })),
|
12459
|
-
React.createElement("div", { className: 'list-bottom', hidden: !((
|
12460
|
-
React.createElement("div", { hidden: !((
|
12461
|
-
React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((
|
12580
|
+
React.createElement("div", { className: 'list-bottom', hidden: !((_o = data === null || data === void 0 ? void 0 : data.tag) === null || _o === void 0 ? void 0 : _o.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
|
12581
|
+
React.createElement("div", { hidden: !((_p = data === null || data === void 0 ? void 0 : data.tag) === null || _p === void 0 ? void 0 : _p.link), className: 'list-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
|
12582
|
+
React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_q = data === null || data === void 0 ? void 0 : data.tag) === null || _q === void 0 ? void 0 : _q.linkTitle) || 'Shop the collection'))))));
|
12462
12583
|
}
|
12463
12584
|
|
12464
12585
|
/*
|
12465
12586
|
* @Author: binruan@chatlabs.com
|
12466
12587
|
* @Date: 2024-01-10 10:58:24
|
12467
12588
|
* @LastEditors: binruan@chatlabs.com
|
12468
|
-
* @LastEditTime: 2024-06-
|
12589
|
+
* @LastEditTime: 2024-06-12 14:18:56
|
12469
12590
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
|
12470
12591
|
*
|
12471
12592
|
*/
|
12472
12593
|
const WaterFall = (props) => {
|
12473
12594
|
var _a;
|
12474
|
-
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport } = useSxpDataSource();
|
12595
|
+
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag } = useSxpDataSource();
|
12596
|
+
const { backMainFeed } = useEventReport();
|
12475
12597
|
React.useRef(null);
|
12476
12598
|
const modalEleRef = React.useRef(null);
|
12477
12599
|
const [viewTime, setViewTime] = React.useState();
|
@@ -12492,6 +12614,9 @@ const WaterFall = (props) => {
|
|
12492
12614
|
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
12493
12615
|
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
|
12494
12616
|
}
|
12617
|
+
if (!(themeTag === null || themeTag === void 0 ? void 0 : themeTag.current)) {
|
12618
|
+
backMainFeed('branch', themeTag === null || themeTag === void 0 ? void 0 : themeTag.current, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
|
12619
|
+
}
|
12495
12620
|
reportTagsView();
|
12496
12621
|
setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
|
12497
12622
|
setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
|
@@ -12559,7 +12684,7 @@ const WaterFall = (props) => {
|
|
12559
12684
|
display: openHashtag ? 'block' : 'none'
|
12560
12685
|
} },
|
12561
12686
|
React.createElement(Navbar$1, { icon: img$1, styles: { top: '32px' }, textStyle: (_a = props === null || props === void 0 ? void 0 : props.textStyles) === null || _a === void 0 ? void 0 : _a.hashTagTitle, onClose: handleClose }),
|
12562
|
-
(props === null || props === void 0 ? void 0 : props.
|
12687
|
+
(props === null || props === void 0 ? void 0 : props.openFixedSize) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (React.createElement(WaterfallList, Object.assign({ reportTagsView: reportTagsView }, props))) : (React.createElement(WaterfallList$1, Object.assign({ reportTagsView: reportTagsView }, props)))), modalEleRef.current);
|
12563
12688
|
};
|
12564
12689
|
var WaterFall$1 = React.memo(WaterFall);
|
12565
12690
|
|
@@ -12590,7 +12715,7 @@ const HashTag = createMaterial(HashTagComponent, {
|
|
12590
12715
|
category: 'base',
|
12591
12716
|
type: 'HashTag',
|
12592
12717
|
related: {
|
12593
|
-
settingRender,
|
12718
|
+
settingRender: settingRender$1,
|
12594
12719
|
bindableProps: []
|
12595
12720
|
},
|
12596
12721
|
defaulSetting: {
|
@@ -12647,6 +12772,84 @@ const HashTag = createMaterial(HashTagComponent, {
|
|
12647
12772
|
sort: 2
|
12648
12773
|
});
|
12649
12774
|
|
12775
|
+
/*
|
12776
|
+
* @Author: binruan@chatlabs.com
|
12777
|
+
* @Date: 2024-06-13 10:08:32
|
12778
|
+
* @LastEditors: binruan@chatlabs.com
|
12779
|
+
* @LastEditTime: 2024-06-13 17:42:50
|
12780
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\settingRender.tsx
|
12781
|
+
*
|
12782
|
+
*/
|
12783
|
+
var settingRender = [
|
12784
|
+
{
|
12785
|
+
title: '协议详情',
|
12786
|
+
child: [
|
12787
|
+
{
|
12788
|
+
type: 'Switch',
|
12789
|
+
label: '必须同意用户协议',
|
12790
|
+
name: ['props', 'privacy_necessity'],
|
12791
|
+
extra: '当新用户进入页面时,会出现用户协议弹窗,用户需要先同意协议后才能访问内容。'
|
12792
|
+
},
|
12793
|
+
{
|
12794
|
+
type: 'Text',
|
12795
|
+
label: '弹窗标题',
|
12796
|
+
name: ['props', 'privacy_title']
|
12797
|
+
},
|
12798
|
+
{
|
12799
|
+
type: 'TextArea',
|
12800
|
+
label: '用户协议弹窗内容',
|
12801
|
+
name: ['props', 'privacy_context']
|
12802
|
+
},
|
12803
|
+
{
|
12804
|
+
type: 'Group',
|
12805
|
+
label: '隐私政策',
|
12806
|
+
child: [
|
12807
|
+
{
|
12808
|
+
type: 'Text',
|
12809
|
+
name: ['props', 'privacy_policy_title']
|
12810
|
+
},
|
12811
|
+
{
|
12812
|
+
type: 'Text',
|
12813
|
+
name: ['props', 'privacy_policy_url'],
|
12814
|
+
addonBefore: 'https://'
|
12815
|
+
}
|
12816
|
+
],
|
12817
|
+
extra: '当用户点击更多信息按钮时,将会跳转至设置的链接查看政策内容'
|
12818
|
+
}
|
12819
|
+
]
|
12820
|
+
}
|
12821
|
+
];
|
12822
|
+
|
12823
|
+
const Consent$1 = (props) => {
|
12824
|
+
return React.createElement(Consent$1, Object.assign({}, props));
|
12825
|
+
};
|
12826
|
+
var ConsentComponent = React.memo(Consent$1);
|
12827
|
+
|
12828
|
+
/*
|
12829
|
+
* @Author: binruan@chatlabs.com
|
12830
|
+
* @Date: 2023-07-28 18:29:57
|
12831
|
+
* @LastEditors: binruan@chatlabs.com
|
12832
|
+
* @LastEditTime: 2024-06-13 17:32:17
|
12833
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\material.tsx
|
12834
|
+
*
|
12835
|
+
*/
|
12836
|
+
const Consent = createMaterial(ConsentComponent, {
|
12837
|
+
displayName: 'Consent',
|
12838
|
+
icon: '',
|
12839
|
+
category: 'base',
|
12840
|
+
type: 'Consent',
|
12841
|
+
related: {
|
12842
|
+
settingRender
|
12843
|
+
},
|
12844
|
+
defaulSetting: {
|
12845
|
+
props: {},
|
12846
|
+
style: {}
|
12847
|
+
},
|
12848
|
+
w: 100,
|
12849
|
+
h: 40,
|
12850
|
+
sort: 1
|
12851
|
+
});
|
12852
|
+
|
12650
12853
|
/*
|
12651
12854
|
* @Author: binruan@chatlabs.com
|
12652
12855
|
* @Date: 2023-07-25 14:56:49
|
@@ -12665,6 +12868,7 @@ var _materials_ = /*#__PURE__*/Object.freeze({
|
|
12665
12868
|
CommodityDetailDiroNew: CommodityDetailDiroNew,
|
12666
12869
|
CommodityDiro: CommodityDiro,
|
12667
12870
|
CommodityDiroNew: CommodityDiroNew,
|
12871
|
+
Consent: Consent,
|
12668
12872
|
HashTag: HashTag,
|
12669
12873
|
Link: Link,
|
12670
12874
|
MultiCommodity: MultiCommodity,
|
@@ -13337,16 +13541,37 @@ const Nudge = ({ nudge }) => {
|
|
13337
13541
|
React.createElement("p", { style: Object.assign(Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle), { textWrap: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', flex: 1, marginBottom: 0 }) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
|
13338
13542
|
};
|
13339
13543
|
|
13544
|
+
/*
|
13545
|
+
* @Author: binruan@chatlabs.com
|
13546
|
+
* @Date: 2024-04-29 16:32:21
|
13547
|
+
* @LastEditors: binruan@chatlabs.com
|
13548
|
+
* @LastEditTime: 2024-06-12 11:01:48
|
13549
|
+
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
|
13550
|
+
*
|
13551
|
+
*/
|
13340
13552
|
const DEFAULT_TAG = 'FOR U';
|
13341
13553
|
const Tagbar = ({ tagList = [], setActiveIndex }) => {
|
13342
13554
|
const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
|
13343
|
-
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData } = useSxpDataSource();
|
13555
|
+
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport } = useSxpDataSource();
|
13556
|
+
const { backMainFeed } = useEventReport();
|
13344
13557
|
const realTagList = React.useMemo(() => {
|
13345
13558
|
return [DEFAULT_TAG, ...tagList];
|
13346
13559
|
}, [tagList]);
|
13347
13560
|
const handleSelectTag = (tag) => () => {
|
13348
13561
|
if (tag === selectTag)
|
13349
13562
|
return;
|
13563
|
+
if (tag !== 'FOR U') {
|
13564
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
13565
|
+
eventInfo: {
|
13566
|
+
eventSubject: 'clickThemeTagsViewContents',
|
13567
|
+
eventDescription: 'click Theme Tags View Contents',
|
13568
|
+
themeTags: `[${tag}]`
|
13569
|
+
}
|
13570
|
+
});
|
13571
|
+
}
|
13572
|
+
else {
|
13573
|
+
backMainFeed('theme', selectTag);
|
13574
|
+
}
|
13350
13575
|
let themeTag;
|
13351
13576
|
if (tag !== DEFAULT_TAG) {
|
13352
13577
|
themeTag = tag;
|
@@ -13378,7 +13603,7 @@ var Tagbar$1 = React.memo(Tagbar);
|
|
13378
13603
|
* @Author: binruan@chatlabs.com
|
13379
13604
|
* @Date: 2024-01-15 19:03:09
|
13380
13605
|
* @LastEditors: binruan@chatlabs.com
|
13381
|
-
* @LastEditTime: 2024-06-
|
13606
|
+
* @LastEditTime: 2024-06-13 18:09:16
|
13382
13607
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
13383
13608
|
*
|
13384
13609
|
*/
|
@@ -13389,11 +13614,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13389
13614
|
const viewImageStartTime = React.useRef(0);
|
13390
13615
|
const [isInit, setIsInit] = React.useState(false);
|
13391
13616
|
const [isMuted, setIsMuted] = React.useState(true);
|
13392
|
-
const curTime = React.useRef();
|
13393
13617
|
const viewTime = React.useRef();
|
13394
13618
|
const [isLoadMore, setIsLoadMore] = React.useState(false);
|
13395
13619
|
const [isShowMore, setIsShowMore] = React.useState(false);
|
13396
|
-
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport } = useSxpDataSource();
|
13620
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink } = useSxpDataSource();
|
13621
|
+
const { backMainFeed } = useEventReport();
|
13397
13622
|
const [videoRef, setVideoRef] = React.useState(null);
|
13398
13623
|
const playerRef = React.useRef();
|
13399
13624
|
const { productView } = useEventReport();
|
@@ -13404,17 +13629,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13404
13629
|
if (data.length <= 0) {
|
13405
13630
|
return;
|
13406
13631
|
}
|
13407
|
-
|
13632
|
+
refreshFeSessionId();
|
13633
|
+
const now = new Date();
|
13634
|
+
viewTime.current = now;
|
13635
|
+
if (isInit) {
|
13636
|
+
h5EnterLink === null || h5EnterLink === void 0 ? void 0 : h5EnterLink();
|
13637
|
+
}
|
13408
13638
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
13409
13639
|
eventName: 'PageView'
|
13410
13640
|
});
|
13411
13641
|
setIsInit(true);
|
13412
|
-
}, [data.length, bffFbReport]);
|
13413
|
-
const initTime = () => {
|
13414
|
-
curTime.current = new Date();
|
13415
|
-
viewTime.current = new Date();
|
13416
|
-
refreshFeSessionId();
|
13417
|
-
};
|
13642
|
+
}, [data.length, bffFbReport, h5EnterLink, isInit]);
|
13418
13643
|
const firstRef = React.useRef();
|
13419
13644
|
React.useEffect(() => {
|
13420
13645
|
var _a, _b, _c, _d;
|
@@ -13510,13 +13735,33 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13510
13735
|
handleH5EnterLink();
|
13511
13736
|
handleViewImageStartEvent(activeIndex);
|
13512
13737
|
SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
|
13738
|
+
backMainFeed('external');
|
13513
13739
|
}
|
13514
13740
|
};
|
13515
13741
|
document.addEventListener('visibilitychange', visibleChange);
|
13516
13742
|
return () => {
|
13517
13743
|
document.removeEventListener('visibilitychange', visibleChange);
|
13518
13744
|
};
|
13519
|
-
}, [
|
13745
|
+
}, [
|
13746
|
+
activeIndex,
|
13747
|
+
bffEventReport,
|
13748
|
+
data,
|
13749
|
+
handleH5EnterLink,
|
13750
|
+
popupDetailData,
|
13751
|
+
isFromHashtag,
|
13752
|
+
tempMap,
|
13753
|
+
curTime,
|
13754
|
+
backMainFeed
|
13755
|
+
]);
|
13756
|
+
React.useEffect(() => {
|
13757
|
+
const initTime = () => {
|
13758
|
+
backMainFeed('external');
|
13759
|
+
};
|
13760
|
+
window.addEventListener('pageshow', initTime);
|
13761
|
+
return () => {
|
13762
|
+
window.removeEventListener('pageshow', initTime);
|
13763
|
+
};
|
13764
|
+
}, []);
|
13520
13765
|
const tagHeight = React.useMemo(() => {
|
13521
13766
|
let h = 0;
|
13522
13767
|
if (tagList.length > 0) {
|
@@ -14258,7 +14503,7 @@ const Popup = () => {
|
|
14258
14503
|
* @Author: binruan@chatlabs.com
|
14259
14504
|
* @Date: 2024-01-15 19:03:09
|
14260
14505
|
* @LastEditors: binruan@chatlabs.com
|
14261
|
-
* @LastEditTime: 2024-
|
14506
|
+
* @LastEditTime: 2024-06-13 14:54:12
|
14262
14507
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
14263
14508
|
*
|
14264
14509
|
*/
|
@@ -14275,14 +14520,14 @@ Object.values(_materials_).forEach((v) => {
|
|
14275
14520
|
RESOLVER[v.extend.type] = v;
|
14276
14521
|
});
|
14277
14522
|
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
|
14278
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
14523
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
14279
14524
|
const utmVal = React.useMemo(() => {
|
14280
14525
|
var _a;
|
14281
14526
|
const searchParams = (location === null || location === void 0 ? void 0 : location.search) ? (_a = location === null || location === void 0 ? void 0 : location.search) === null || _a === void 0 ? void 0 : _a.replace('?', '') : '';
|
14282
14527
|
return searchParams;
|
14283
14528
|
}, []);
|
14284
14529
|
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
14285
|
-
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, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, render: ({ rtcList, tagList }) => {
|
14530
|
+
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, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, globalConfig: (_l = (_k = data === null || data === void 0 ? void 0 : data.data) === null || _k === void 0 ? void 0 : _k.sxpPageConf) === null || _l === void 0 ? void 0 : _l.globalConfig, render: ({ rtcList, tagList }) => {
|
14286
14531
|
var _a;
|
14287
14532
|
return (React.createElement(React.Fragment, null,
|
14288
14533
|
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 })),
|
@@ -14301,8 +14546,9 @@ var index = React.memo(SxpPageCore);
|
|
14301
14546
|
*/
|
14302
14547
|
const EditorDataContext = React.createContext({});
|
14303
14548
|
const EditorDataProvider = ({ children, data }) => {
|
14304
|
-
var _a, _b, _c, _d, _e, _f;
|
14549
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
14305
14550
|
const [openHashtag, setOpenHashtag] = React.useState(false);
|
14551
|
+
const [openConsent, setOpenConsent] = React.useState(false);
|
14306
14552
|
return (React.createElement(EditorDataContext.Provider, { value: {
|
14307
14553
|
sxpPrameter: {
|
14308
14554
|
bottomImage: (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.bottom_image,
|
@@ -14310,11 +14556,20 @@ const EditorDataProvider = ({ children, data }) => {
|
|
14310
14556
|
personalizedRecommend: (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.personalized_recommend,
|
14311
14557
|
placeholderImage: (_d = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _d === void 0 ? void 0 : _d.placeholder_image,
|
14312
14558
|
hashTagSize: (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size,
|
14313
|
-
loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image
|
14559
|
+
loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image,
|
14560
|
+
privacyContent: (_g = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _g === void 0 ? void 0 : _g.privacy_context,
|
14561
|
+
privacyNecessity: (_h = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _h === void 0 ? void 0 : _h.privacy_necessity,
|
14562
|
+
privacyPolicyTitle: (_j = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _j === void 0 ? void 0 : _j.privacy_policy_title,
|
14563
|
+
privacyPolicyUrl: (_k = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _k === void 0 ? void 0 : _k.privacy_policy_url,
|
14564
|
+
privacyTitle: (_l = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _l === void 0 ? void 0 : _l.privacy_title,
|
14565
|
+
template: (_m = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _m === void 0 ? void 0 : _m.template,
|
14566
|
+
industry: (_o = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _o === void 0 ? void 0 : _o.industry
|
14314
14567
|
},
|
14315
14568
|
appDomain: data === null || data === void 0 ? void 0 : data.appDomain,
|
14316
14569
|
openHashtag,
|
14317
|
-
setOpenHashtag
|
14570
|
+
setOpenHashtag,
|
14571
|
+
openConsent,
|
14572
|
+
setOpenConsent
|
14318
14573
|
} }, children));
|
14319
14574
|
};
|
14320
14575
|
function useEditorDataProvider() {
|