pb-sxp-ui 1.0.79 → 1.0.81
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 +342 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +93 -0
- package/dist/index.js +343 -106
- 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 +342 -105
- 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 +29 -32
- 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 +58 -18
- 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.d.ts +9 -0
- package/es/materials/sxp/HashTag/settingRender.js +2 -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 +29 -32
- 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 +57 -17
- 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.d.ts +9 -0
- package/lib/materials/sxp/HashTag/settingRender.js +2 -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/pb-ui.js
CHANGED
@@ -385,6 +385,7 @@
|
|
385
385
|
|
386
386
|
const FAKE_USER_KEY = 'SXP_FAKE_USER_ID';
|
387
387
|
const FAKE_USER_STATE = 'FAKE_USER_STATE';
|
388
|
+
const AGREE_POLICY = 'AGREE_POLICY';
|
388
389
|
const storeAndLoadFeUserId = () => {
|
389
390
|
let fakeUserId = window.localStorage.getItem(FAKE_USER_KEY);
|
390
391
|
if (lodash.isEmpty(fakeUserId)) {
|
@@ -429,6 +430,70 @@
|
|
429
430
|
SXP_EVENT_TYPE["CHANGE_THEME_TAG"] = "changeThemeTag";
|
430
431
|
})(SXP_EVENT_TYPE || (SXP_EVENT_TYPE = {}));
|
431
432
|
|
433
|
+
/*
|
434
|
+
* @Author: binruan@chatlabs.com
|
435
|
+
* @Date: 2024-06-13 15:16:53
|
436
|
+
* @LastEditors: binruan@chatlabs.com
|
437
|
+
* @LastEditTime: 2024-06-13 18:22:53
|
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", { className: 'consent-btn', onClick: handleAgree }, "Agree"),
|
493
|
+
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')))));
|
494
|
+
};
|
495
|
+
var Consent$3 = React.memo(Consent$2);
|
496
|
+
|
432
497
|
const SxpDataSourceContext = React.createContext({
|
433
498
|
rtcList: [],
|
434
499
|
tagList: []
|
@@ -438,13 +503,15 @@
|
|
438
503
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
439
504
|
})(DataSourceType || (DataSourceType = {}));
|
440
505
|
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
441
|
-
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
|
506
|
+
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 }) => {
|
507
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
442
508
|
const [rtcList, setRtcList] = React.useState([]);
|
443
509
|
const [tagList, setTagList] = React.useState([]);
|
444
510
|
const [loading, setLoading] = React.useState(false);
|
445
511
|
const [curReqInfo, setCurReqInfo] = React.useState({ rtc: '', requestId: '' });
|
446
512
|
const swiperRef = React.useRef(null);
|
447
513
|
const isInit = React.useRef(false);
|
514
|
+
const [isAgreePolicy, setIsAgreePolicy] = React.useState(() => !!window.localStorage.getItem(AGREE_POLICY));
|
448
515
|
// 弹窗数据
|
449
516
|
const [popupDetailData, setPopupDetailData] = React.useState();
|
450
517
|
const [waterFallData, setWaterFallData] = React.useState();
|
@@ -454,6 +521,7 @@
|
|
454
521
|
const [isFromHashtag, setIsFromHashtag] = React.useState(false);
|
455
522
|
const [videoRef, setVideoRef] = React.useState(null);
|
456
523
|
const themeTag = React.useRef();
|
524
|
+
const curTime = React.useRef();
|
457
525
|
React.useEffect(() => {
|
458
526
|
const handleChangeThemeTag = (tag) => {
|
459
527
|
themeTag.current = tag;
|
@@ -498,10 +566,10 @@
|
|
498
566
|
}, [bffDataSource]);
|
499
567
|
// 获取推荐视频数据
|
500
568
|
const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
501
|
-
var
|
569
|
+
var _h, _j, _k, _l, _m;
|
502
570
|
query = {
|
503
|
-
maxSize: (
|
504
|
-
defaultSize: (
|
571
|
+
maxSize: (_h = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _h !== void 0 ? _h : maxSize,
|
572
|
+
defaultSize: (_j = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _j !== void 0 ? _j : defaultSize,
|
505
573
|
'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
|
506
574
|
'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
|
507
575
|
hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
|
@@ -509,10 +577,10 @@
|
|
509
577
|
themeTag: query === null || query === void 0 ? void 0 : query.themeTag
|
510
578
|
};
|
511
579
|
if (utmVal) {
|
512
|
-
const val = (
|
580
|
+
const val = (_m = (_l = (_k = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _k === void 0 ? void 0 : _k.filter((val) => {
|
513
581
|
const key = val.split('=')[0];
|
514
582
|
return UTM_KEYS.includes(key);
|
515
|
-
})) === null ||
|
583
|
+
})) === null || _l === void 0 ? void 0 : _l.join('&')) !== null && _m !== void 0 ? _m : '';
|
516
584
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
517
585
|
}
|
518
586
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
@@ -524,7 +592,7 @@
|
|
524
592
|
return result === null || result === void 0 ? void 0 : result.data;
|
525
593
|
}), [bffFetch, utmVal, maxSize, defaultSize]);
|
526
594
|
const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
527
|
-
var
|
595
|
+
var _o, _p;
|
528
596
|
if (rtcList.length <= 0) {
|
529
597
|
return;
|
530
598
|
}
|
@@ -534,8 +602,8 @@
|
|
534
602
|
'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
|
535
603
|
themeTag: themeTag.current
|
536
604
|
});
|
537
|
-
setRtcList(rtcList.concat((
|
538
|
-
setCacheRtcList(cacheRtcList.concat((
|
605
|
+
setRtcList(rtcList.concat((_o = data === null || data === void 0 ? void 0 : data.recList) !== null && _o !== void 0 ? _o : []));
|
606
|
+
setCacheRtcList(cacheRtcList.concat((_p = data === null || data === void 0 ? void 0 : data.recList) !== null && _p !== void 0 ? _p : []));
|
539
607
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
540
608
|
const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
|
541
609
|
// 关闭 BFF 事件上报
|
@@ -599,16 +667,16 @@
|
|
599
667
|
}), [bffFetch]);
|
600
668
|
// 获取 Tag
|
601
669
|
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
602
|
-
var
|
670
|
+
var _q, _r, _s, _t, _u;
|
603
671
|
if (!utmVal || !isShowTag)
|
604
672
|
return;
|
605
673
|
try {
|
606
|
-
const val = (
|
674
|
+
const val = (_s = (_r = (_q = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _q === void 0 ? void 0 : _q.filter((val) => {
|
607
675
|
const key = val.split('=')[0];
|
608
676
|
return UTM_KEYS.includes(key);
|
609
|
-
})) === null ||
|
677
|
+
})) === null || _r === void 0 ? void 0 : _r.join('&')) !== null && _s !== void 0 ? _s : '';
|
610
678
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
611
|
-
setTagList((
|
679
|
+
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 : []);
|
612
680
|
}
|
613
681
|
catch (e) {
|
614
682
|
console.log('e', e);
|
@@ -632,7 +700,38 @@
|
|
632
700
|
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 })
|
633
701
|
});
|
634
702
|
}, [bffEventReport, isFromHashtag]);
|
703
|
+
const h5EnterLink = React.useCallback(() => {
|
704
|
+
var _a, _b;
|
705
|
+
const queryString = location.search.slice(1);
|
706
|
+
const params = qs.parse(queryString.replace(/\+/g, '%2B'));
|
707
|
+
for (const key in params) {
|
708
|
+
params[key] = params[key].replace(/%2B/g, '+');
|
709
|
+
}
|
710
|
+
const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
|
711
|
+
const time = new Date();
|
712
|
+
curTime.current = time;
|
713
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
714
|
+
eventInfo: {
|
715
|
+
eventSubject: 'h5LinkEnterFeed',
|
716
|
+
eventDescription: 'User enter h5 link',
|
717
|
+
utmSource: getVal('utm_source'),
|
718
|
+
utmMedium: getVal('utm_medium'),
|
719
|
+
utmCampaign: getVal('utm_campaign'),
|
720
|
+
utmId: getVal('utm_id'),
|
721
|
+
utmContent: getVal('utm_content'),
|
722
|
+
enterTime: Math.floor(time / 1000) + '',
|
723
|
+
requestId: null,
|
724
|
+
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 : '',
|
725
|
+
clSource: getVal('cl_source')
|
726
|
+
}
|
727
|
+
});
|
728
|
+
}, [bffEventReport]);
|
729
|
+
React.useEffect(() => {
|
730
|
+
h5EnterLink();
|
731
|
+
}, []);
|
635
732
|
React.useEffect(() => {
|
733
|
+
if (!isAgreePolicy)
|
734
|
+
return;
|
636
735
|
setLoading(true);
|
637
736
|
bffGetTagList();
|
638
737
|
getRecommendVideos()
|
@@ -651,7 +750,7 @@
|
|
651
750
|
setLoading(false);
|
652
751
|
isInit.current = true;
|
653
752
|
});
|
654
|
-
}, []);
|
753
|
+
}, [isAgreePolicy]);
|
655
754
|
React.useEffect(() => {
|
656
755
|
if (!isInit.current)
|
657
756
|
return;
|
@@ -703,14 +802,19 @@
|
|
703
802
|
setLoading,
|
704
803
|
videoRef,
|
705
804
|
setVideoRef,
|
706
|
-
bffFbReport
|
707
|
-
|
805
|
+
bffFbReport,
|
806
|
+
isAgreePolicy,
|
807
|
+
setIsAgreePolicy,
|
808
|
+
curTime,
|
809
|
+
h5EnterLink,
|
810
|
+
themeTag
|
811
|
+
} }, (((_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({
|
708
812
|
rtcList,
|
709
813
|
mutateLike: bffMutateLike,
|
710
814
|
mutateUnlike: bffMutateUnlike,
|
711
815
|
submitForm: bffSubmitForm,
|
712
816
|
tagList
|
713
|
-
})));
|
817
|
+
}))));
|
714
818
|
};
|
715
819
|
var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
|
716
820
|
|
@@ -976,7 +1080,7 @@
|
|
976
1080
|
*
|
977
1081
|
*/
|
978
1082
|
var _a$5, _b$5, _c;
|
979
|
-
var settingRender$
|
1083
|
+
var settingRender$6 = [
|
980
1084
|
{
|
981
1085
|
type: 'Text',
|
982
1086
|
label: '组件名称',
|
@@ -1114,7 +1218,7 @@
|
|
1114
1218
|
* @Author: binruan@chatlabs.com
|
1115
1219
|
* @Date: 2024-03-12 10:59:06
|
1116
1220
|
* @LastEditors: binruan@chatlabs.com
|
1117
|
-
* @LastEditTime: 2024-
|
1221
|
+
* @LastEditTime: 2024-06-12 10:53:57
|
1118
1222
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1119
1223
|
*
|
1120
1224
|
*/
|
@@ -1184,9 +1288,21 @@
|
|
1184
1288
|
}
|
1185
1289
|
});
|
1186
1290
|
}, [bffEventReport, popupDetailData]);
|
1291
|
+
const backMainFeed = React.useCallback((lastFeed, themeTag, hashTag) => {
|
1292
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1293
|
+
eventInfo: {
|
1294
|
+
lastFeed,
|
1295
|
+
themeTags: themeTag ? `[${themeTag}]` : '',
|
1296
|
+
hashTags: hashTag ? `[${hashTag}]` : '',
|
1297
|
+
eventSubject: 'backMainFeed',
|
1298
|
+
eventDescription: 'back Main Feed'
|
1299
|
+
}
|
1300
|
+
});
|
1301
|
+
}, [bffEventReport]);
|
1187
1302
|
return {
|
1188
1303
|
jumpToWeb,
|
1189
|
-
productView
|
1304
|
+
productView,
|
1305
|
+
backMainFeed
|
1190
1306
|
};
|
1191
1307
|
}
|
1192
1308
|
|
@@ -1291,7 +1407,7 @@
|
|
1291
1407
|
category: 'popup',
|
1292
1408
|
type: 'AppointForm',
|
1293
1409
|
related: {
|
1294
|
-
settingRender: settingRender$
|
1410
|
+
settingRender: settingRender$6,
|
1295
1411
|
bindableProps: [],
|
1296
1412
|
interactionRender: interactionRender$8
|
1297
1413
|
},
|
@@ -1317,7 +1433,7 @@
|
|
1317
1433
|
});
|
1318
1434
|
|
1319
1435
|
var _a$4, _b$4;
|
1320
|
-
var settingRender$
|
1436
|
+
var settingRender$5 = [
|
1321
1437
|
{
|
1322
1438
|
title: '商品图片',
|
1323
1439
|
child: [
|
@@ -8631,7 +8747,7 @@
|
|
8631
8747
|
category: 'popup',
|
8632
8748
|
type: 'CommodityDetail',
|
8633
8749
|
related: {
|
8634
|
-
settingRender: settingRender$
|
8750
|
+
settingRender: settingRender$5
|
8635
8751
|
},
|
8636
8752
|
defaulSetting: {
|
8637
8753
|
props: {
|
@@ -8697,7 +8813,7 @@
|
|
8697
8813
|
*
|
8698
8814
|
*/
|
8699
8815
|
var _a$3, _b$3;
|
8700
|
-
var settingRender$
|
8816
|
+
var settingRender$4 = [
|
8701
8817
|
{
|
8702
8818
|
title: '',
|
8703
8819
|
child: [
|
@@ -8824,7 +8940,7 @@
|
|
8824
8940
|
category: 'popup',
|
8825
8941
|
type: 'Prompt',
|
8826
8942
|
related: {
|
8827
|
-
settingRender: settingRender$
|
8943
|
+
settingRender: settingRender$4,
|
8828
8944
|
bindableProps: [],
|
8829
8945
|
interactionRender: interactionRender$7
|
8830
8946
|
},
|
@@ -8850,7 +8966,7 @@
|
|
8850
8966
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
8851
8967
|
*
|
8852
8968
|
*/
|
8853
|
-
var settingRender$
|
8969
|
+
var settingRender$3 = [
|
8854
8970
|
{
|
8855
8971
|
title: '商品图片',
|
8856
8972
|
child: [
|
@@ -9173,7 +9289,7 @@ Made in Italy` })));
|
|
9173
9289
|
category: 'popup',
|
9174
9290
|
type: 'CommodityDetailDiroNew',
|
9175
9291
|
related: {
|
9176
|
-
settingRender: settingRender$
|
9292
|
+
settingRender: settingRender$3
|
9177
9293
|
},
|
9178
9294
|
defaulSetting: {
|
9179
9295
|
props: {
|
@@ -9234,7 +9350,7 @@ Made in Italy` })));
|
|
9234
9350
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
|
9235
9351
|
*
|
9236
9352
|
*/
|
9237
|
-
var settingRender$
|
9353
|
+
var settingRender$2 = [
|
9238
9354
|
{
|
9239
9355
|
title: '主题样式',
|
9240
9356
|
child: [
|
@@ -9586,7 +9702,7 @@ Made in Italy` })));
|
|
9586
9702
|
related: {
|
9587
9703
|
interactionRender: interactionRender$6,
|
9588
9704
|
bindableProps: [],
|
9589
|
-
settingRender: settingRender$
|
9705
|
+
settingRender: settingRender$2
|
9590
9706
|
},
|
9591
9707
|
defaulSetting: {
|
9592
9708
|
props: {
|
@@ -9665,7 +9781,7 @@ Made in Italy` })));
|
|
9665
9781
|
type: 'Appoint',
|
9666
9782
|
related: {
|
9667
9783
|
interactionRender: interactionRender$5,
|
9668
|
-
settingRender: settingRender$
|
9784
|
+
settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
|
9669
9785
|
bindableProps: []
|
9670
9786
|
},
|
9671
9787
|
defaulSetting: {
|
@@ -9742,7 +9858,7 @@ Made in Italy` })));
|
|
9742
9858
|
category: 'template',
|
9743
9859
|
type: 'Link',
|
9744
9860
|
related: {
|
9745
|
-
settingRender: settingRender$
|
9861
|
+
settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
|
9746
9862
|
bindableProps: []
|
9747
9863
|
},
|
9748
9864
|
defaulSetting: {
|
@@ -9834,7 +9950,7 @@ Made in Italy` })));
|
|
9834
9950
|
type: 'CommodityDiro',
|
9835
9951
|
related: {
|
9836
9952
|
interactionRender: interactionRender$4,
|
9837
|
-
settingRender: settingRender$
|
9953
|
+
settingRender: settingRender$2,
|
9838
9954
|
bindableProps: []
|
9839
9955
|
},
|
9840
9956
|
defaulSetting: {
|
@@ -9933,7 +10049,7 @@ Made in Italy` })));
|
|
9933
10049
|
related: {
|
9934
10050
|
interactionRender: interactionRender$3,
|
9935
10051
|
bindableProps: [],
|
9936
|
-
settingRender: settingRender$
|
10052
|
+
settingRender: settingRender$2
|
9937
10053
|
},
|
9938
10054
|
defaulSetting: {
|
9939
10055
|
props: {
|
@@ -10078,7 +10194,7 @@ Made in Italy` })));
|
|
10078
10194
|
related: {
|
10079
10195
|
interactionRender: interactionRender$2,
|
10080
10196
|
bindableProps: [],
|
10081
|
-
settingRender: settingRender$
|
10197
|
+
settingRender: settingRender$2
|
10082
10198
|
},
|
10083
10199
|
defaulSetting: {
|
10084
10200
|
props: {
|
@@ -10192,7 +10308,7 @@ Made in Italy` })));
|
|
10192
10308
|
type: 'MultiCommodity',
|
10193
10309
|
related: {
|
10194
10310
|
interactionRender: interactionRender$1,
|
10195
|
-
settingRender: settingRender$
|
10311
|
+
settingRender: settingRender$2,
|
10196
10312
|
bindableProps: []
|
10197
10313
|
},
|
10198
10314
|
defaulSetting: {
|
@@ -10308,7 +10424,7 @@ Made in Italy` })));
|
|
10308
10424
|
related: {
|
10309
10425
|
interactionRender,
|
10310
10426
|
bindableProps: [],
|
10311
|
-
settingRender: settingRender$
|
10427
|
+
settingRender: settingRender$2
|
10312
10428
|
},
|
10313
10429
|
defaulSetting: {
|
10314
10430
|
props: {
|
@@ -10354,11 +10470,11 @@ Made in Italy` })));
|
|
10354
10470
|
* @Author: binruan@chatlabs.com
|
10355
10471
|
* @Date: 2024-04-07 14:07:12
|
10356
10472
|
* @LastEditors: binruan@chatlabs.com
|
10357
|
-
* @LastEditTime: 2024-
|
10473
|
+
* @LastEditTime: 2024-06-11 11:04:55
|
10358
10474
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
|
10359
10475
|
*
|
10360
10476
|
*/
|
10361
|
-
var settingRender = [
|
10477
|
+
var settingRender$1 = [
|
10362
10478
|
{
|
10363
10479
|
title: 'Banner',
|
10364
10480
|
child: [
|
@@ -10381,7 +10497,8 @@ Made in Italy` })));
|
|
10381
10497
|
{
|
10382
10498
|
type: 'Switch',
|
10383
10499
|
label: '固定宽高',
|
10384
|
-
name: ['props', '
|
10500
|
+
name: ['props', 'openFixedSize'],
|
10501
|
+
initialValue: true
|
10385
10502
|
}
|
10386
10503
|
]
|
10387
10504
|
},
|
@@ -11990,8 +12107,8 @@ Made in Italy` })));
|
|
11990
12107
|
React.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
|
11991
12108
|
};
|
11992
12109
|
function WaterfallList$1(_a) {
|
11993
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
11994
|
-
var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
|
12110
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
12111
|
+
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
11995
12112
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
11996
12113
|
/** 滚动的父元素 */
|
11997
12114
|
const scrollParent = React.useRef(null);
|
@@ -12195,25 +12312,30 @@ Made in Italy` })));
|
|
12195
12312
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
12196
12313
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'waterFallList', ref: waterfallFlowDom },
|
12197
12314
|
React.createElement("div", { className: 'waterFallList-scroll', ref: scrollParent },
|
12198
|
-
|
12199
|
-
|
12315
|
+
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({
|
12316
|
+
width: '100%',
|
12317
|
+
objectFit: 'cover',
|
12318
|
+
marginBottom: '20px'
|
12319
|
+
}), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture })),
|
12320
|
+
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),
|
12321
|
+
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'),
|
12200
12322
|
React.createElement("div", { className: 'waterFallList-content' }, list === null || list === void 0 ? void 0 :
|
12201
12323
|
list.map((item, ind) => {
|
12202
12324
|
var _a;
|
12203
12325
|
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)));
|
12204
12326
|
}),
|
12205
|
-
React.createElement("div", { hidden: !((
|
12327
|
+
React.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
|
12206
12328
|
position: 'absolute',
|
12207
12329
|
width: '100%',
|
12208
|
-
transform: `translate(0px,${(
|
12209
|
-
((
|
12210
|
-
height: ((
|
12211
|
-
? ((
|
12330
|
+
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) +
|
12331
|
+
((_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)`,
|
12332
|
+
height: ((_q = data === null || data === void 0 ? void 0 : data.tag) === null || _q === void 0 ? void 0 : _q.link)
|
12333
|
+
? ((_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'
|
12212
12334
|
: 0
|
12213
12335
|
} }))),
|
12214
|
-
React.createElement("div", { className: 'waterFallList-bottom', hidden: !((
|
12215
|
-
React.createElement("div", { ref: buttonRef, hidden: !((
|
12216
|
-
React.createElement("button", { className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((
|
12336
|
+
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 }),
|
12337
|
+
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' }) },
|
12338
|
+
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'))))));
|
12217
12339
|
}
|
12218
12340
|
|
12219
12341
|
var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
|
@@ -12342,8 +12464,8 @@ Made in Italy` })));
|
|
12342
12464
|
React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
|
12343
12465
|
};
|
12344
12466
|
function WaterfallList(_a) {
|
12345
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
12346
|
-
var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
|
12467
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
12468
|
+
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
12347
12469
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
12348
12470
|
const [list, setList] = React.useState();
|
12349
12471
|
const [data, setData] = React.useState();
|
@@ -12414,31 +12536,37 @@ Made in Italy` })));
|
|
12414
12536
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
12415
12537
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'list' },
|
12416
12538
|
React.createElement("div", { className: 'list-scroll', ref: containerRef },
|
12417
|
-
|
12418
|
-
|
12539
|
+
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({
|
12540
|
+
width: '100%',
|
12541
|
+
objectFit: 'cover',
|
12542
|
+
marginBottom: '20px'
|
12543
|
+
}), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture })),
|
12544
|
+
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),
|
12545
|
+
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'),
|
12419
12546
|
React.createElement("div", { className: 'list-content' }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
|
12420
12547
|
return (React.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
|
12421
12548
|
})),
|
12422
12549
|
React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading..."),
|
12423
|
-
React.createElement("div", { hidden: !((
|
12424
|
-
height: ((
|
12550
|
+
React.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
|
12551
|
+
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
|
12425
12552
|
} })),
|
12426
|
-
React.createElement("div", { className: 'list-bottom', hidden: !((
|
12427
|
-
React.createElement("div", { hidden: !((
|
12428
|
-
React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((
|
12553
|
+
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 }),
|
12554
|
+
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' }) },
|
12555
|
+
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'))))));
|
12429
12556
|
}
|
12430
12557
|
|
12431
12558
|
/*
|
12432
12559
|
* @Author: binruan@chatlabs.com
|
12433
12560
|
* @Date: 2024-01-10 10:58:24
|
12434
12561
|
* @LastEditors: binruan@chatlabs.com
|
12435
|
-
* @LastEditTime: 2024-06-
|
12562
|
+
* @LastEditTime: 2024-06-12 14:18:56
|
12436
12563
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
|
12437
12564
|
*
|
12438
12565
|
*/
|
12439
12566
|
const WaterFall = (props) => {
|
12440
12567
|
var _a;
|
12441
|
-
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport } = useSxpDataSource();
|
12568
|
+
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag } = useSxpDataSource();
|
12569
|
+
const { backMainFeed } = useEventReport();
|
12442
12570
|
React.useRef(null);
|
12443
12571
|
const modalEleRef = React.useRef(null);
|
12444
12572
|
const [viewTime, setViewTime] = React.useState();
|
@@ -12459,6 +12587,9 @@ Made in Italy` })));
|
|
12459
12587
|
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
12460
12588
|
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
|
12461
12589
|
}
|
12590
|
+
if (!(themeTag === null || themeTag === void 0 ? void 0 : themeTag.current)) {
|
12591
|
+
backMainFeed('branch', themeTag === null || themeTag === void 0 ? void 0 : themeTag.current, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
|
12592
|
+
}
|
12462
12593
|
reportTagsView();
|
12463
12594
|
setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
|
12464
12595
|
setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
|
@@ -12526,7 +12657,7 @@ Made in Italy` })));
|
|
12526
12657
|
display: openHashtag ? 'block' : 'none'
|
12527
12658
|
} },
|
12528
12659
|
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 }),
|
12529
|
-
(props === null || props === void 0 ? void 0 : props.
|
12660
|
+
(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);
|
12530
12661
|
};
|
12531
12662
|
var WaterFall$1 = React.memo(WaterFall);
|
12532
12663
|
|
@@ -12557,7 +12688,7 @@ Made in Italy` })));
|
|
12557
12688
|
category: 'base',
|
12558
12689
|
type: 'HashTag',
|
12559
12690
|
related: {
|
12560
|
-
settingRender,
|
12691
|
+
settingRender: settingRender$1,
|
12561
12692
|
bindableProps: []
|
12562
12693
|
},
|
12563
12694
|
defaulSetting: {
|
@@ -12614,6 +12745,84 @@ Made in Italy` })));
|
|
12614
12745
|
sort: 2
|
12615
12746
|
});
|
12616
12747
|
|
12748
|
+
/*
|
12749
|
+
* @Author: binruan@chatlabs.com
|
12750
|
+
* @Date: 2024-06-13 10:08:32
|
12751
|
+
* @LastEditors: binruan@chatlabs.com
|
12752
|
+
* @LastEditTime: 2024-06-13 17:42:50
|
12753
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\settingRender.tsx
|
12754
|
+
*
|
12755
|
+
*/
|
12756
|
+
var settingRender = [
|
12757
|
+
{
|
12758
|
+
title: '协议详情',
|
12759
|
+
child: [
|
12760
|
+
{
|
12761
|
+
type: 'Switch',
|
12762
|
+
label: '必须同意用户协议',
|
12763
|
+
name: ['props', 'privacy_necessity'],
|
12764
|
+
extra: '当新用户进入页面时,会出现用户协议弹窗,用户需要先同意协议后才能访问内容。'
|
12765
|
+
},
|
12766
|
+
{
|
12767
|
+
type: 'Text',
|
12768
|
+
label: '弹窗标题',
|
12769
|
+
name: ['props', 'privacy_title']
|
12770
|
+
},
|
12771
|
+
{
|
12772
|
+
type: 'TextArea',
|
12773
|
+
label: '用户协议弹窗内容',
|
12774
|
+
name: ['props', 'privacy_context']
|
12775
|
+
},
|
12776
|
+
{
|
12777
|
+
type: 'Group',
|
12778
|
+
label: '隐私政策',
|
12779
|
+
child: [
|
12780
|
+
{
|
12781
|
+
type: 'Text',
|
12782
|
+
name: ['props', 'privacy_policy_title']
|
12783
|
+
},
|
12784
|
+
{
|
12785
|
+
type: 'Text',
|
12786
|
+
name: ['props', 'privacy_policy_url'],
|
12787
|
+
addonBefore: 'https://'
|
12788
|
+
}
|
12789
|
+
],
|
12790
|
+
extra: '当用户点击更多信息按钮时,将会跳转至设置的链接查看政策内容'
|
12791
|
+
}
|
12792
|
+
]
|
12793
|
+
}
|
12794
|
+
];
|
12795
|
+
|
12796
|
+
const Consent$1 = (props) => {
|
12797
|
+
return React.createElement(Consent$1, Object.assign({}, props));
|
12798
|
+
};
|
12799
|
+
var ConsentComponent = React.memo(Consent$1);
|
12800
|
+
|
12801
|
+
/*
|
12802
|
+
* @Author: binruan@chatlabs.com
|
12803
|
+
* @Date: 2023-07-28 18:29:57
|
12804
|
+
* @LastEditors: binruan@chatlabs.com
|
12805
|
+
* @LastEditTime: 2024-06-13 17:32:17
|
12806
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\material.tsx
|
12807
|
+
*
|
12808
|
+
*/
|
12809
|
+
const Consent = createMaterial(ConsentComponent, {
|
12810
|
+
displayName: 'Consent',
|
12811
|
+
icon: '',
|
12812
|
+
category: 'base',
|
12813
|
+
type: 'Consent',
|
12814
|
+
related: {
|
12815
|
+
settingRender
|
12816
|
+
},
|
12817
|
+
defaulSetting: {
|
12818
|
+
props: {},
|
12819
|
+
style: {}
|
12820
|
+
},
|
12821
|
+
w: 100,
|
12822
|
+
h: 40,
|
12823
|
+
sort: 1
|
12824
|
+
});
|
12825
|
+
|
12617
12826
|
/*
|
12618
12827
|
* @Author: binruan@chatlabs.com
|
12619
12828
|
* @Date: 2023-07-25 14:56:49
|
@@ -12632,6 +12841,7 @@ Made in Italy` })));
|
|
12632
12841
|
CommodityDetailDiroNew: CommodityDetailDiroNew,
|
12633
12842
|
CommodityDiro: CommodityDiro,
|
12634
12843
|
CommodityDiroNew: CommodityDiroNew,
|
12844
|
+
Consent: Consent,
|
12635
12845
|
HashTag: HashTag,
|
12636
12846
|
Link: Link,
|
12637
12847
|
MultiCommodity: MultiCommodity,
|
@@ -13304,16 +13514,37 @@ Made in Italy` })));
|
|
13304
13514
|
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 : '')))));
|
13305
13515
|
};
|
13306
13516
|
|
13517
|
+
/*
|
13518
|
+
* @Author: binruan@chatlabs.com
|
13519
|
+
* @Date: 2024-04-29 16:32:21
|
13520
|
+
* @LastEditors: binruan@chatlabs.com
|
13521
|
+
* @LastEditTime: 2024-06-12 11:01:48
|
13522
|
+
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
|
13523
|
+
*
|
13524
|
+
*/
|
13307
13525
|
const DEFAULT_TAG = 'FOR U';
|
13308
13526
|
const Tagbar = ({ tagList = [], setActiveIndex }) => {
|
13309
13527
|
const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
|
13310
|
-
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData } = useSxpDataSource();
|
13528
|
+
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport } = useSxpDataSource();
|
13529
|
+
const { backMainFeed } = useEventReport();
|
13311
13530
|
const realTagList = React.useMemo(() => {
|
13312
13531
|
return [DEFAULT_TAG, ...tagList];
|
13313
13532
|
}, [tagList]);
|
13314
13533
|
const handleSelectTag = (tag) => () => {
|
13315
13534
|
if (tag === selectTag)
|
13316
13535
|
return;
|
13536
|
+
if (tag !== 'FOR U') {
|
13537
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
13538
|
+
eventInfo: {
|
13539
|
+
eventSubject: 'clickThemeTagsViewContents',
|
13540
|
+
eventDescription: 'click Theme Tags View Contents',
|
13541
|
+
themeTags: `[${tag}]`
|
13542
|
+
}
|
13543
|
+
});
|
13544
|
+
}
|
13545
|
+
else {
|
13546
|
+
backMainFeed('theme', selectTag);
|
13547
|
+
}
|
13317
13548
|
let themeTag;
|
13318
13549
|
if (tag !== DEFAULT_TAG) {
|
13319
13550
|
themeTag = tag;
|
@@ -13345,7 +13576,7 @@ Made in Italy` })));
|
|
13345
13576
|
* @Author: binruan@chatlabs.com
|
13346
13577
|
* @Date: 2024-01-15 19:03:09
|
13347
13578
|
* @LastEditors: binruan@chatlabs.com
|
13348
|
-
* @LastEditTime: 2024-06-
|
13579
|
+
* @LastEditTime: 2024-06-13 18:09:16
|
13349
13580
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
13350
13581
|
*
|
13351
13582
|
*/
|
@@ -13356,11 +13587,11 @@ Made in Italy` })));
|
|
13356
13587
|
const viewImageStartTime = React.useRef(0);
|
13357
13588
|
const [isInit, setIsInit] = React.useState(false);
|
13358
13589
|
const [isMuted, setIsMuted] = React.useState(true);
|
13359
|
-
const curTime = React.useRef();
|
13360
13590
|
const viewTime = React.useRef();
|
13361
13591
|
const [isLoadMore, setIsLoadMore] = React.useState(false);
|
13362
13592
|
const [isShowMore, setIsShowMore] = React.useState(false);
|
13363
|
-
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport } = useSxpDataSource();
|
13593
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink } = useSxpDataSource();
|
13594
|
+
const { backMainFeed } = useEventReport();
|
13364
13595
|
const [videoRef, setVideoRef] = React.useState(null);
|
13365
13596
|
const playerRef = React.useRef();
|
13366
13597
|
const { productView } = useEventReport();
|
@@ -13368,44 +13599,20 @@ Made in Italy` })));
|
|
13368
13599
|
return data.length > 0 && !loading && getFeUserId();
|
13369
13600
|
}, [data, loading]);
|
13370
13601
|
const handleH5EnterLink = React.useCallback(() => {
|
13371
|
-
var _a, _b;
|
13372
13602
|
if (data.length <= 0) {
|
13373
13603
|
return;
|
13374
13604
|
}
|
13375
|
-
|
13376
|
-
|
13377
|
-
|
13378
|
-
|
13379
|
-
|
13380
|
-
for (const key in params) {
|
13381
|
-
params[key] = params[key].replace(/%2B/g, '+');
|
13605
|
+
refreshFeSessionId();
|
13606
|
+
const now = new Date();
|
13607
|
+
viewTime.current = now;
|
13608
|
+
if (isInit) {
|
13609
|
+
h5EnterLink === null || h5EnterLink === void 0 ? void 0 : h5EnterLink();
|
13382
13610
|
}
|
13383
|
-
const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
|
13384
|
-
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
13385
|
-
eventInfo: {
|
13386
|
-
eventSubject: 'h5LinkEnterFeed',
|
13387
|
-
eventDescription: 'User enter h5 link',
|
13388
|
-
utmSource: getVal('utm_source'),
|
13389
|
-
utmMedium: getVal('utm_medium'),
|
13390
|
-
utmCampaign: getVal('utm_campaign'),
|
13391
|
-
utmId: getVal('utm_id'),
|
13392
|
-
utmContent: getVal('utm_content'),
|
13393
|
-
enterTime: `${Date.now()}`,
|
13394
|
-
requestId: null,
|
13395
|
-
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 : '',
|
13396
|
-
clSource: getVal('cl_sourc')
|
13397
|
-
}
|
13398
|
-
});
|
13399
13611
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
13400
13612
|
eventName: 'PageView'
|
13401
13613
|
});
|
13402
13614
|
setIsInit(true);
|
13403
|
-
}, [
|
13404
|
-
const initTime = () => {
|
13405
|
-
curTime.current = new Date();
|
13406
|
-
viewTime.current = new Date();
|
13407
|
-
refreshFeSessionId();
|
13408
|
-
};
|
13615
|
+
}, [data.length, bffFbReport, h5EnterLink, isInit]);
|
13409
13616
|
const firstRef = React.useRef();
|
13410
13617
|
React.useEffect(() => {
|
13411
13618
|
var _a, _b, _c, _d;
|
@@ -13501,13 +13708,33 @@ Made in Italy` })));
|
|
13501
13708
|
handleH5EnterLink();
|
13502
13709
|
handleViewImageStartEvent(activeIndex);
|
13503
13710
|
SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
|
13711
|
+
backMainFeed('external');
|
13504
13712
|
}
|
13505
13713
|
};
|
13506
13714
|
document.addEventListener('visibilitychange', visibleChange);
|
13507
13715
|
return () => {
|
13508
13716
|
document.removeEventListener('visibilitychange', visibleChange);
|
13509
13717
|
};
|
13510
|
-
}, [
|
13718
|
+
}, [
|
13719
|
+
activeIndex,
|
13720
|
+
bffEventReport,
|
13721
|
+
data,
|
13722
|
+
handleH5EnterLink,
|
13723
|
+
popupDetailData,
|
13724
|
+
isFromHashtag,
|
13725
|
+
tempMap,
|
13726
|
+
curTime,
|
13727
|
+
backMainFeed
|
13728
|
+
]);
|
13729
|
+
React.useEffect(() => {
|
13730
|
+
const initTime = () => {
|
13731
|
+
backMainFeed('external');
|
13732
|
+
};
|
13733
|
+
window.addEventListener('pageshow', initTime);
|
13734
|
+
return () => {
|
13735
|
+
window.removeEventListener('pageshow', initTime);
|
13736
|
+
};
|
13737
|
+
}, []);
|
13511
13738
|
const tagHeight = React.useMemo(() => {
|
13512
13739
|
let h = 0;
|
13513
13740
|
if (tagList.length > 0) {
|
@@ -14249,7 +14476,7 @@ Made in Italy` })));
|
|
14249
14476
|
* @Author: binruan@chatlabs.com
|
14250
14477
|
* @Date: 2024-01-15 19:03:09
|
14251
14478
|
* @LastEditors: binruan@chatlabs.com
|
14252
|
-
* @LastEditTime: 2024-
|
14479
|
+
* @LastEditTime: 2024-06-13 14:54:12
|
14253
14480
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
14254
14481
|
*
|
14255
14482
|
*/
|
@@ -14266,14 +14493,14 @@ Made in Italy` })));
|
|
14266
14493
|
RESOLVER[v.extend.type] = v;
|
14267
14494
|
});
|
14268
14495
|
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
|
14269
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
14496
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
14270
14497
|
const utmVal = React.useMemo(() => {
|
14271
14498
|
var _a;
|
14272
14499
|
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('?', '') : '';
|
14273
14500
|
return searchParams;
|
14274
14501
|
}, []);
|
14275
14502
|
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
14276
|
-
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 }) => {
|
14503
|
+
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 }) => {
|
14277
14504
|
var _a;
|
14278
14505
|
return (React.createElement(React.Fragment, null,
|
14279
14506
|
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 })),
|
@@ -14292,8 +14519,9 @@ Made in Italy` })));
|
|
14292
14519
|
*/
|
14293
14520
|
const EditorDataContext = React.createContext({});
|
14294
14521
|
const EditorDataProvider = ({ children, data }) => {
|
14295
|
-
var _a, _b, _c, _d, _e, _f;
|
14522
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
14296
14523
|
const [openHashtag, setOpenHashtag] = React.useState(false);
|
14524
|
+
const [openConsent, setOpenConsent] = React.useState(false);
|
14297
14525
|
return (React.createElement(EditorDataContext.Provider, { value: {
|
14298
14526
|
sxpPrameter: {
|
14299
14527
|
bottomImage: (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.bottom_image,
|
@@ -14301,11 +14529,20 @@ Made in Italy` })));
|
|
14301
14529
|
personalizedRecommend: (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.personalized_recommend,
|
14302
14530
|
placeholderImage: (_d = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _d === void 0 ? void 0 : _d.placeholder_image,
|
14303
14531
|
hashTagSize: (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size,
|
14304
|
-
loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image
|
14532
|
+
loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image,
|
14533
|
+
privacyContent: (_g = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _g === void 0 ? void 0 : _g.privacy_context,
|
14534
|
+
privacyNecessity: (_h = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _h === void 0 ? void 0 : _h.privacy_necessity,
|
14535
|
+
privacyPolicyTitle: (_j = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _j === void 0 ? void 0 : _j.privacy_policy_title,
|
14536
|
+
privacyPolicyUrl: (_k = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _k === void 0 ? void 0 : _k.privacy_policy_url,
|
14537
|
+
privacyTitle: (_l = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _l === void 0 ? void 0 : _l.privacy_title,
|
14538
|
+
template: (_m = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _m === void 0 ? void 0 : _m.template,
|
14539
|
+
industry: (_o = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _o === void 0 ? void 0 : _o.industry
|
14305
14540
|
},
|
14306
14541
|
appDomain: data === null || data === void 0 ? void 0 : data.appDomain,
|
14307
14542
|
openHashtag,
|
14308
|
-
setOpenHashtag
|
14543
|
+
setOpenHashtag,
|
14544
|
+
openConsent,
|
14545
|
+
setOpenConsent
|
14309
14546
|
} }, children));
|
14310
14547
|
};
|
14311
14548
|
function useEditorDataProvider() {
|