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/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,7 @@
|
|
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]);
|
635
|
-
React.
|
703
|
+
const h5EnterLink = React.useCallback(() => {
|
636
704
|
var _a, _b;
|
637
705
|
const queryString = location.search.slice(1);
|
638
706
|
const params = qs.parse(queryString.replace(/\+/g, '%2B'));
|
@@ -640,6 +708,8 @@
|
|
640
708
|
params[key] = params[key].replace(/%2B/g, '+');
|
641
709
|
}
|
642
710
|
const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
|
711
|
+
const time = new Date();
|
712
|
+
curTime.current = time;
|
643
713
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
644
714
|
eventInfo: {
|
645
715
|
eventSubject: 'h5LinkEnterFeed',
|
@@ -649,14 +719,19 @@
|
|
649
719
|
utmCampaign: getVal('utm_campaign'),
|
650
720
|
utmId: getVal('utm_id'),
|
651
721
|
utmContent: getVal('utm_content'),
|
652
|
-
enterTime:
|
722
|
+
enterTime: Math.floor(time / 1000) + '',
|
653
723
|
requestId: null,
|
654
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 : '',
|
655
|
-
clSource: getVal('
|
725
|
+
clSource: getVal('cl_source')
|
656
726
|
}
|
657
727
|
});
|
728
|
+
}, [bffEventReport]);
|
729
|
+
React.useEffect(() => {
|
730
|
+
h5EnterLink();
|
658
731
|
}, []);
|
659
732
|
React.useEffect(() => {
|
733
|
+
if (!isAgreePolicy)
|
734
|
+
return;
|
660
735
|
setLoading(true);
|
661
736
|
bffGetTagList();
|
662
737
|
getRecommendVideos()
|
@@ -675,7 +750,7 @@
|
|
675
750
|
setLoading(false);
|
676
751
|
isInit.current = true;
|
677
752
|
});
|
678
|
-
}, []);
|
753
|
+
}, [isAgreePolicy]);
|
679
754
|
React.useEffect(() => {
|
680
755
|
if (!isInit.current)
|
681
756
|
return;
|
@@ -727,14 +802,19 @@
|
|
727
802
|
setLoading,
|
728
803
|
videoRef,
|
729
804
|
setVideoRef,
|
730
|
-
bffFbReport
|
731
|
-
|
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({
|
732
812
|
rtcList,
|
733
813
|
mutateLike: bffMutateLike,
|
734
814
|
mutateUnlike: bffMutateUnlike,
|
735
815
|
submitForm: bffSubmitForm,
|
736
816
|
tagList
|
737
|
-
})));
|
817
|
+
}))));
|
738
818
|
};
|
739
819
|
var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
|
740
820
|
|
@@ -1000,7 +1080,7 @@
|
|
1000
1080
|
*
|
1001
1081
|
*/
|
1002
1082
|
var _a$5, _b$5, _c;
|
1003
|
-
var settingRender$
|
1083
|
+
var settingRender$6 = [
|
1004
1084
|
{
|
1005
1085
|
type: 'Text',
|
1006
1086
|
label: '组件名称',
|
@@ -1138,7 +1218,7 @@
|
|
1138
1218
|
* @Author: binruan@chatlabs.com
|
1139
1219
|
* @Date: 2024-03-12 10:59:06
|
1140
1220
|
* @LastEditors: binruan@chatlabs.com
|
1141
|
-
* @LastEditTime: 2024-
|
1221
|
+
* @LastEditTime: 2024-06-12 10:53:57
|
1142
1222
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1143
1223
|
*
|
1144
1224
|
*/
|
@@ -1208,9 +1288,21 @@
|
|
1208
1288
|
}
|
1209
1289
|
});
|
1210
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]);
|
1211
1302
|
return {
|
1212
1303
|
jumpToWeb,
|
1213
|
-
productView
|
1304
|
+
productView,
|
1305
|
+
backMainFeed
|
1214
1306
|
};
|
1215
1307
|
}
|
1216
1308
|
|
@@ -1315,7 +1407,7 @@
|
|
1315
1407
|
category: 'popup',
|
1316
1408
|
type: 'AppointForm',
|
1317
1409
|
related: {
|
1318
|
-
settingRender: settingRender$
|
1410
|
+
settingRender: settingRender$6,
|
1319
1411
|
bindableProps: [],
|
1320
1412
|
interactionRender: interactionRender$8
|
1321
1413
|
},
|
@@ -1341,7 +1433,7 @@
|
|
1341
1433
|
});
|
1342
1434
|
|
1343
1435
|
var _a$4, _b$4;
|
1344
|
-
var settingRender$
|
1436
|
+
var settingRender$5 = [
|
1345
1437
|
{
|
1346
1438
|
title: '商品图片',
|
1347
1439
|
child: [
|
@@ -3000,7 +3092,7 @@
|
|
3000
3092
|
dragEl
|
3001
3093
|
} = scrollbar;
|
3002
3094
|
if (!isTouched) return;
|
3003
|
-
if (e.preventDefault) e.preventDefault();else e.returnValue = false;
|
3095
|
+
if (e.preventDefault && e.cancelable) e.preventDefault();else e.returnValue = false;
|
3004
3096
|
setDragPosition(e);
|
3005
3097
|
wrapperEl.style.transitionDuration = '0ms';
|
3006
3098
|
el.style.transitionDuration = '0ms';
|
@@ -3227,7 +3319,7 @@
|
|
3227
3319
|
if (!swiper || swiper.destroyed || !swiper.wrapperEl) return;
|
3228
3320
|
if (e.target !== swiper.wrapperEl) return;
|
3229
3321
|
swiper.wrapperEl.removeEventListener('transitionend', onTransitionEnd);
|
3230
|
-
if (pausedByPointerEnter) {
|
3322
|
+
if (pausedByPointerEnter || e.detail && e.detail.bySwiperTouchMove) {
|
3231
3323
|
return;
|
3232
3324
|
}
|
3233
3325
|
resume();
|
@@ -3398,8 +3490,10 @@
|
|
3398
3490
|
}
|
3399
3491
|
};
|
3400
3492
|
const detachMouseEvents = () => {
|
3401
|
-
swiper.el.
|
3402
|
-
|
3493
|
+
if (swiper.el && typeof swiper.el !== 'string') {
|
3494
|
+
swiper.el.removeEventListener('pointerenter', onPointerEnter);
|
3495
|
+
swiper.el.removeEventListener('pointerleave', onPointerLeave);
|
3496
|
+
}
|
3403
3497
|
};
|
3404
3498
|
const attachDocumentEvents = () => {
|
3405
3499
|
const document = getDocument();
|
@@ -4321,8 +4415,9 @@
|
|
4321
4415
|
allSlidesSize += slideSizeValue + (spaceBetween || 0);
|
4322
4416
|
});
|
4323
4417
|
allSlidesSize -= spaceBetween;
|
4324
|
-
|
4325
|
-
|
4418
|
+
const offsetSize = (params.slidesOffsetBefore || 0) + (params.slidesOffsetAfter || 0);
|
4419
|
+
if (allSlidesSize + offsetSize < swiperSize) {
|
4420
|
+
const allSlidesOffset = (swiperSize - allSlidesSize - offsetSize) / 2;
|
4326
4421
|
snapGrid.forEach((snap, snapIndex) => {
|
4327
4422
|
snapGrid[snapIndex] = snap - allSlidesOffset;
|
4328
4423
|
});
|
@@ -4426,6 +4521,13 @@
|
|
4426
4521
|
}
|
4427
4522
|
}
|
4428
4523
|
|
4524
|
+
const toggleSlideClasses$1 = (slideEl, condition, className) => {
|
4525
|
+
if (condition && !slideEl.classList.contains(className)) {
|
4526
|
+
slideEl.classList.add(className);
|
4527
|
+
} else if (!condition && slideEl.classList.contains(className)) {
|
4528
|
+
slideEl.classList.remove(className);
|
4529
|
+
}
|
4530
|
+
};
|
4429
4531
|
function updateSlidesProgress(translate) {
|
4430
4532
|
if (translate === void 0) {
|
4431
4533
|
translate = this && this.translate || 0;
|
@@ -4441,11 +4543,6 @@
|
|
4441
4543
|
if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
|
4442
4544
|
let offsetCenter = -translate;
|
4443
4545
|
if (rtl) offsetCenter = translate;
|
4444
|
-
|
4445
|
-
// Visible Slides
|
4446
|
-
slides.forEach(slideEl => {
|
4447
|
-
slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass);
|
4448
|
-
});
|
4449
4546
|
swiper.visibleSlidesIndexes = [];
|
4450
4547
|
swiper.visibleSlides = [];
|
4451
4548
|
let spaceBetween = params.spaceBetween;
|
@@ -4469,11 +4566,9 @@
|
|
4469
4566
|
if (isVisible) {
|
4470
4567
|
swiper.visibleSlides.push(slide);
|
4471
4568
|
swiper.visibleSlidesIndexes.push(i);
|
4472
|
-
slides[i].classList.add(params.slideVisibleClass);
|
4473
|
-
}
|
4474
|
-
if (isFullyVisible) {
|
4475
|
-
slides[i].classList.add(params.slideFullyVisibleClass);
|
4476
4569
|
}
|
4570
|
+
toggleSlideClasses$1(slide, isVisible, params.slideVisibleClass);
|
4571
|
+
toggleSlideClasses$1(slide, isFullyVisible, params.slideFullyVisibleClass);
|
4477
4572
|
slide.progress = rtl ? -slideProgress : slideProgress;
|
4478
4573
|
slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;
|
4479
4574
|
}
|
@@ -4542,6 +4637,13 @@
|
|
4542
4637
|
swiper.emit('progress', progress);
|
4543
4638
|
}
|
4544
4639
|
|
4640
|
+
const toggleSlideClasses = (slideEl, condition, className) => {
|
4641
|
+
if (condition && !slideEl.classList.contains(className)) {
|
4642
|
+
slideEl.classList.add(className);
|
4643
|
+
} else if (!condition && slideEl.classList.contains(className)) {
|
4644
|
+
slideEl.classList.remove(className);
|
4645
|
+
}
|
4646
|
+
};
|
4545
4647
|
function updateSlidesClasses() {
|
4546
4648
|
const swiper = this;
|
4547
4649
|
const {
|
@@ -4555,9 +4657,6 @@
|
|
4555
4657
|
const getFilteredSlide = selector => {
|
4556
4658
|
return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];
|
4557
4659
|
};
|
4558
|
-
slides.forEach(slideEl => {
|
4559
|
-
slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
|
4560
|
-
});
|
4561
4660
|
let activeSlide;
|
4562
4661
|
let prevSlide;
|
4563
4662
|
let nextSlide;
|
@@ -4580,35 +4679,25 @@
|
|
4580
4679
|
}
|
4581
4680
|
}
|
4582
4681
|
if (activeSlide) {
|
4583
|
-
|
4584
|
-
activeSlide.classList.add(params.slideActiveClass);
|
4585
|
-
if (gridEnabled) {
|
4586
|
-
if (nextSlide) {
|
4587
|
-
nextSlide.classList.add(params.slideNextClass);
|
4588
|
-
}
|
4589
|
-
if (prevSlide) {
|
4590
|
-
prevSlide.classList.add(params.slidePrevClass);
|
4591
|
-
}
|
4592
|
-
} else {
|
4682
|
+
if (!gridEnabled) {
|
4593
4683
|
// Next Slide
|
4594
4684
|
nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
|
4595
4685
|
if (params.loop && !nextSlide) {
|
4596
4686
|
nextSlide = slides[0];
|
4597
4687
|
}
|
4598
|
-
if (nextSlide) {
|
4599
|
-
nextSlide.classList.add(params.slideNextClass);
|
4600
|
-
}
|
4601
4688
|
|
4602
4689
|
// Prev Slide
|
4603
4690
|
prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
|
4604
4691
|
if (params.loop && !prevSlide === 0) {
|
4605
4692
|
prevSlide = slides[slides.length - 1];
|
4606
4693
|
}
|
4607
|
-
if (prevSlide) {
|
4608
|
-
prevSlide.classList.add(params.slidePrevClass);
|
4609
|
-
}
|
4610
4694
|
}
|
4611
4695
|
}
|
4696
|
+
slides.forEach(slideEl => {
|
4697
|
+
toggleSlideClasses(slideEl, slideEl === activeSlide, params.slideActiveClass);
|
4698
|
+
toggleSlideClasses(slideEl, slideEl === nextSlide, params.slideNextClass);
|
4699
|
+
toggleSlideClasses(slideEl, slideEl === prevSlide, params.slidePrevClass);
|
4700
|
+
});
|
4612
4701
|
swiper.emitSlidesClasses();
|
4613
4702
|
}
|
4614
4703
|
|
@@ -4986,6 +5075,7 @@
|
|
4986
5075
|
swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
|
4987
5076
|
swiper.onTranslateToWrapperTransitionEnd = null;
|
4988
5077
|
delete swiper.onTranslateToWrapperTransitionEnd;
|
5078
|
+
swiper.animating = false;
|
4989
5079
|
if (runCallbacks) {
|
4990
5080
|
swiper.emit('transitionEnd');
|
4991
5081
|
}
|
@@ -5093,9 +5183,6 @@
|
|
5093
5183
|
if (index === void 0) {
|
5094
5184
|
index = 0;
|
5095
5185
|
}
|
5096
|
-
if (speed === void 0) {
|
5097
|
-
speed = this.params.speed;
|
5098
|
-
}
|
5099
5186
|
if (runCallbacks === void 0) {
|
5100
5187
|
runCallbacks = true;
|
5101
5188
|
}
|
@@ -5115,9 +5202,12 @@
|
|
5115
5202
|
wrapperEl,
|
5116
5203
|
enabled
|
5117
5204
|
} = swiper;
|
5118
|
-
if (
|
5205
|
+
if (!enabled && !internal && !initial || swiper.destroyed || swiper.animating && params.preventInteractionOnTransition) {
|
5119
5206
|
return false;
|
5120
5207
|
}
|
5208
|
+
if (typeof speed === 'undefined') {
|
5209
|
+
speed = swiper.params.speed;
|
5210
|
+
}
|
5121
5211
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
|
5122
5212
|
let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
|
5123
5213
|
if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
|
@@ -5244,9 +5334,6 @@
|
|
5244
5334
|
if (index === void 0) {
|
5245
5335
|
index = 0;
|
5246
5336
|
}
|
5247
|
-
if (speed === void 0) {
|
5248
|
-
speed = this.params.speed;
|
5249
|
-
}
|
5250
5337
|
if (runCallbacks === void 0) {
|
5251
5338
|
runCallbacks = true;
|
5252
5339
|
}
|
@@ -5256,6 +5343,9 @@
|
|
5256
5343
|
}
|
5257
5344
|
const swiper = this;
|
5258
5345
|
if (swiper.destroyed) return;
|
5346
|
+
if (typeof speed === 'undefined') {
|
5347
|
+
speed = swiper.params.speed;
|
5348
|
+
}
|
5259
5349
|
const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;
|
5260
5350
|
let newIndex = index;
|
5261
5351
|
if (swiper.params.loop) {
|
@@ -5287,6 +5377,9 @@
|
|
5287
5377
|
if (centeredSlides) {
|
5288
5378
|
needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2);
|
5289
5379
|
}
|
5380
|
+
if (internal && centeredSlides && swiper.params.slidesPerView !== 'auto' && !gridEnabled) {
|
5381
|
+
needLoopFix = false;
|
5382
|
+
}
|
5290
5383
|
if (needLoopFix) {
|
5291
5384
|
const direction = centeredSlides ? targetSlideIndex < swiper.activeIndex ? 'prev' : 'next' : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? 'next' : 'prev';
|
5292
5385
|
swiper.loopFix({
|
@@ -5312,9 +5405,6 @@
|
|
5312
5405
|
|
5313
5406
|
/* eslint no-unused-vars: "off" */
|
5314
5407
|
function slideNext(speed, runCallbacks, internal) {
|
5315
|
-
if (speed === void 0) {
|
5316
|
-
speed = this.params.speed;
|
5317
|
-
}
|
5318
5408
|
if (runCallbacks === void 0) {
|
5319
5409
|
runCallbacks = true;
|
5320
5410
|
}
|
@@ -5325,6 +5415,9 @@
|
|
5325
5415
|
animating
|
5326
5416
|
} = swiper;
|
5327
5417
|
if (!enabled || swiper.destroyed) return swiper;
|
5418
|
+
if (typeof speed === 'undefined') {
|
5419
|
+
speed = swiper.params.speed;
|
5420
|
+
}
|
5328
5421
|
let perGroup = params.slidesPerGroup;
|
5329
5422
|
if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {
|
5330
5423
|
perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);
|
@@ -5353,9 +5446,6 @@
|
|
5353
5446
|
|
5354
5447
|
/* eslint no-unused-vars: "off" */
|
5355
5448
|
function slidePrev(speed, runCallbacks, internal) {
|
5356
|
-
if (speed === void 0) {
|
5357
|
-
speed = this.params.speed;
|
5358
|
-
}
|
5359
5449
|
if (runCallbacks === void 0) {
|
5360
5450
|
runCallbacks = true;
|
5361
5451
|
}
|
@@ -5369,6 +5459,9 @@
|
|
5369
5459
|
animating
|
5370
5460
|
} = swiper;
|
5371
5461
|
if (!enabled || swiper.destroyed) return swiper;
|
5462
|
+
if (typeof speed === 'undefined') {
|
5463
|
+
speed = swiper.params.speed;
|
5464
|
+
}
|
5372
5465
|
const isVirtual = swiper.virtual && params.virtual.enabled;
|
5373
5466
|
if (params.loop) {
|
5374
5467
|
if (animating && !isVirtual && params.loopPreventsSliding) return false;
|
@@ -5421,22 +5514,19 @@
|
|
5421
5514
|
|
5422
5515
|
/* eslint no-unused-vars: "off" */
|
5423
5516
|
function slideReset(speed, runCallbacks, internal) {
|
5424
|
-
if (speed === void 0) {
|
5425
|
-
speed = this.params.speed;
|
5426
|
-
}
|
5427
5517
|
if (runCallbacks === void 0) {
|
5428
5518
|
runCallbacks = true;
|
5429
5519
|
}
|
5430
5520
|
const swiper = this;
|
5431
5521
|
if (swiper.destroyed) return;
|
5522
|
+
if (typeof speed === 'undefined') {
|
5523
|
+
speed = swiper.params.speed;
|
5524
|
+
}
|
5432
5525
|
return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
|
5433
5526
|
}
|
5434
5527
|
|
5435
5528
|
/* eslint no-unused-vars: "off" */
|
5436
5529
|
function slideToClosest(speed, runCallbacks, internal, threshold) {
|
5437
|
-
if (speed === void 0) {
|
5438
|
-
speed = this.params.speed;
|
5439
|
-
}
|
5440
5530
|
if (runCallbacks === void 0) {
|
5441
5531
|
runCallbacks = true;
|
5442
5532
|
}
|
@@ -5445,6 +5535,9 @@
|
|
5445
5535
|
}
|
5446
5536
|
const swiper = this;
|
5447
5537
|
if (swiper.destroyed) return;
|
5538
|
+
if (typeof speed === 'undefined') {
|
5539
|
+
speed = swiper.params.speed;
|
5540
|
+
}
|
5448
5541
|
let index = swiper.activeIndex;
|
5449
5542
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
|
5450
5543
|
const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);
|
@@ -6079,7 +6172,7 @@
|
|
6079
6172
|
data.startMoving = true;
|
6080
6173
|
}
|
6081
6174
|
}
|
6082
|
-
if (data.isScrolling) {
|
6175
|
+
if (data.isScrolling || e.type === 'touchmove' && data.preventTouchMoveFromPointerMove) {
|
6083
6176
|
data.isTouched = false;
|
6084
6177
|
return;
|
6085
6178
|
}
|
@@ -6121,7 +6214,10 @@
|
|
6121
6214
|
if (swiper.animating) {
|
6122
6215
|
const evt = new window.CustomEvent('transitionend', {
|
6123
6216
|
bubbles: true,
|
6124
|
-
cancelable: true
|
6217
|
+
cancelable: true,
|
6218
|
+
detail: {
|
6219
|
+
bySwiperTouchMove: true
|
6220
|
+
}
|
6125
6221
|
});
|
6126
6222
|
swiper.wrapperEl.dispatchEvent(evt);
|
6127
6223
|
}
|
@@ -6515,6 +6611,7 @@
|
|
6515
6611
|
const capture = !!params.nested;
|
6516
6612
|
const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';
|
6517
6613
|
const swiperMethod = method;
|
6614
|
+
if (!el || typeof el === 'string') return;
|
6518
6615
|
|
6519
6616
|
// Touch Events
|
6520
6617
|
document[domMethod]('touchstart', swiper.onDocumentTouchStart, {
|
@@ -6623,6 +6720,8 @@
|
|
6623
6720
|
const breakpointParams = breakpointOnlyParams || swiper.originalParams;
|
6624
6721
|
const wasMultiRow = isGridEnabled(swiper, params);
|
6625
6722
|
const isMultiRow = isGridEnabled(swiper, breakpointParams);
|
6723
|
+
const wasGrabCursor = swiper.params.grabCursor;
|
6724
|
+
const isGrabCursor = breakpointParams.grabCursor;
|
6626
6725
|
const wasEnabled = params.enabled;
|
6627
6726
|
if (wasMultiRow && !isMultiRow) {
|
6628
6727
|
el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);
|
@@ -6634,6 +6733,11 @@
|
|
6634
6733
|
}
|
6635
6734
|
swiper.emitContainerClasses();
|
6636
6735
|
}
|
6736
|
+
if (wasGrabCursor && !isGrabCursor) {
|
6737
|
+
swiper.unsetGrabCursor();
|
6738
|
+
} else if (!wasGrabCursor && isGrabCursor) {
|
6739
|
+
swiper.setGrabCursor();
|
6740
|
+
}
|
6637
6741
|
|
6638
6742
|
// Toggle navigation, pagination, scrollbar
|
6639
6743
|
['navigation', 'pagination', 'scrollbar'].forEach(prop => {
|
@@ -6784,6 +6888,7 @@
|
|
6784
6888
|
el,
|
6785
6889
|
classNames
|
6786
6890
|
} = swiper;
|
6891
|
+
if (!el || typeof el === 'string') return;
|
6787
6892
|
el.classList.remove(...classNames);
|
6788
6893
|
swiper.emitContainerClasses();
|
6789
6894
|
}
|
@@ -7548,8 +7653,12 @@
|
|
7548
7653
|
// Cleanup styles
|
7549
7654
|
if (cleanStyles) {
|
7550
7655
|
swiper.removeClasses();
|
7551
|
-
el
|
7552
|
-
|
7656
|
+
if (el && typeof el !== 'string') {
|
7657
|
+
el.removeAttribute('style');
|
7658
|
+
}
|
7659
|
+
if (wrapperEl) {
|
7660
|
+
wrapperEl.removeAttribute('style');
|
7661
|
+
}
|
7553
7662
|
if (slides && slides.length) {
|
7554
7663
|
slides.forEach(slideEl => {
|
7555
7664
|
slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
|
@@ -7565,7 +7674,9 @@
|
|
7565
7674
|
swiper.off(eventName);
|
7566
7675
|
});
|
7567
7676
|
if (deleteInstance !== false) {
|
7568
|
-
swiper.el.
|
7677
|
+
if (swiper.el && typeof swiper.el !== 'string') {
|
7678
|
+
swiper.el.swiper = null;
|
7679
|
+
}
|
7569
7680
|
deleteProps(swiper);
|
7570
7681
|
}
|
7571
7682
|
swiper.destroyed = true;
|
@@ -7959,7 +8070,7 @@
|
|
7959
8070
|
};
|
7960
8071
|
|
7961
8072
|
/**
|
7962
|
-
* Swiper React 11.
|
8073
|
+
* Swiper React 11.1.4
|
7963
8074
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
7964
8075
|
* https://swiperjs.com
|
7965
8076
|
*
|
@@ -7967,7 +8078,7 @@
|
|
7967
8078
|
*
|
7968
8079
|
* Released under the MIT License
|
7969
8080
|
*
|
7970
|
-
* Released on:
|
8081
|
+
* Released on: May 30, 2024
|
7971
8082
|
*/
|
7972
8083
|
|
7973
8084
|
|
@@ -8655,7 +8766,7 @@
|
|
8655
8766
|
category: 'popup',
|
8656
8767
|
type: 'CommodityDetail',
|
8657
8768
|
related: {
|
8658
|
-
settingRender: settingRender$
|
8769
|
+
settingRender: settingRender$5
|
8659
8770
|
},
|
8660
8771
|
defaulSetting: {
|
8661
8772
|
props: {
|
@@ -8721,7 +8832,7 @@
|
|
8721
8832
|
*
|
8722
8833
|
*/
|
8723
8834
|
var _a$3, _b$3;
|
8724
|
-
var settingRender$
|
8835
|
+
var settingRender$4 = [
|
8725
8836
|
{
|
8726
8837
|
title: '',
|
8727
8838
|
child: [
|
@@ -8848,7 +8959,7 @@
|
|
8848
8959
|
category: 'popup',
|
8849
8960
|
type: 'Prompt',
|
8850
8961
|
related: {
|
8851
|
-
settingRender: settingRender$
|
8962
|
+
settingRender: settingRender$4,
|
8852
8963
|
bindableProps: [],
|
8853
8964
|
interactionRender: interactionRender$7
|
8854
8965
|
},
|
@@ -8874,7 +8985,7 @@
|
|
8874
8985
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
8875
8986
|
*
|
8876
8987
|
*/
|
8877
|
-
var settingRender$
|
8988
|
+
var settingRender$3 = [
|
8878
8989
|
{
|
8879
8990
|
title: '商品图片',
|
8880
8991
|
child: [
|
@@ -9197,7 +9308,7 @@ Made in Italy` })));
|
|
9197
9308
|
category: 'popup',
|
9198
9309
|
type: 'CommodityDetailDiroNew',
|
9199
9310
|
related: {
|
9200
|
-
settingRender: settingRender$
|
9311
|
+
settingRender: settingRender$3
|
9201
9312
|
},
|
9202
9313
|
defaulSetting: {
|
9203
9314
|
props: {
|
@@ -9258,7 +9369,7 @@ Made in Italy` })));
|
|
9258
9369
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
|
9259
9370
|
*
|
9260
9371
|
*/
|
9261
|
-
var settingRender$
|
9372
|
+
var settingRender$2 = [
|
9262
9373
|
{
|
9263
9374
|
title: '主题样式',
|
9264
9375
|
child: [
|
@@ -9610,7 +9721,7 @@ Made in Italy` })));
|
|
9610
9721
|
related: {
|
9611
9722
|
interactionRender: interactionRender$6,
|
9612
9723
|
bindableProps: [],
|
9613
|
-
settingRender: settingRender$
|
9724
|
+
settingRender: settingRender$2
|
9614
9725
|
},
|
9615
9726
|
defaulSetting: {
|
9616
9727
|
props: {
|
@@ -9689,7 +9800,7 @@ Made in Italy` })));
|
|
9689
9800
|
type: 'Appoint',
|
9690
9801
|
related: {
|
9691
9802
|
interactionRender: interactionRender$5,
|
9692
|
-
settingRender: settingRender$
|
9803
|
+
settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
|
9693
9804
|
bindableProps: []
|
9694
9805
|
},
|
9695
9806
|
defaulSetting: {
|
@@ -9766,7 +9877,7 @@ Made in Italy` })));
|
|
9766
9877
|
category: 'template',
|
9767
9878
|
type: 'Link',
|
9768
9879
|
related: {
|
9769
|
-
settingRender: settingRender$
|
9880
|
+
settingRender: settingRender$2 === null || settingRender$2 === void 0 ? void 0 : settingRender$2.filter((i) => i.type !== 'commodityTitle'),
|
9770
9881
|
bindableProps: []
|
9771
9882
|
},
|
9772
9883
|
defaulSetting: {
|
@@ -9858,7 +9969,7 @@ Made in Italy` })));
|
|
9858
9969
|
type: 'CommodityDiro',
|
9859
9970
|
related: {
|
9860
9971
|
interactionRender: interactionRender$4,
|
9861
|
-
settingRender: settingRender$
|
9972
|
+
settingRender: settingRender$2,
|
9862
9973
|
bindableProps: []
|
9863
9974
|
},
|
9864
9975
|
defaulSetting: {
|
@@ -9957,7 +10068,7 @@ Made in Italy` })));
|
|
9957
10068
|
related: {
|
9958
10069
|
interactionRender: interactionRender$3,
|
9959
10070
|
bindableProps: [],
|
9960
|
-
settingRender: settingRender$
|
10071
|
+
settingRender: settingRender$2
|
9961
10072
|
},
|
9962
10073
|
defaulSetting: {
|
9963
10074
|
props: {
|
@@ -10102,7 +10213,7 @@ Made in Italy` })));
|
|
10102
10213
|
related: {
|
10103
10214
|
interactionRender: interactionRender$2,
|
10104
10215
|
bindableProps: [],
|
10105
|
-
settingRender: settingRender$
|
10216
|
+
settingRender: settingRender$2
|
10106
10217
|
},
|
10107
10218
|
defaulSetting: {
|
10108
10219
|
props: {
|
@@ -10216,7 +10327,7 @@ Made in Italy` })));
|
|
10216
10327
|
type: 'MultiCommodity',
|
10217
10328
|
related: {
|
10218
10329
|
interactionRender: interactionRender$1,
|
10219
|
-
settingRender: settingRender$
|
10330
|
+
settingRender: settingRender$2,
|
10220
10331
|
bindableProps: []
|
10221
10332
|
},
|
10222
10333
|
defaulSetting: {
|
@@ -10332,7 +10443,7 @@ Made in Italy` })));
|
|
10332
10443
|
related: {
|
10333
10444
|
interactionRender,
|
10334
10445
|
bindableProps: [],
|
10335
|
-
settingRender: settingRender$
|
10446
|
+
settingRender: settingRender$2
|
10336
10447
|
},
|
10337
10448
|
defaulSetting: {
|
10338
10449
|
props: {
|
@@ -10378,11 +10489,11 @@ Made in Italy` })));
|
|
10378
10489
|
* @Author: binruan@chatlabs.com
|
10379
10490
|
* @Date: 2024-04-07 14:07:12
|
10380
10491
|
* @LastEditors: binruan@chatlabs.com
|
10381
|
-
* @LastEditTime: 2024-06-
|
10492
|
+
* @LastEditTime: 2024-06-11 11:04:55
|
10382
10493
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
|
10383
10494
|
*
|
10384
10495
|
*/
|
10385
|
-
var settingRender = [
|
10496
|
+
var settingRender$1 = [
|
10386
10497
|
{
|
10387
10498
|
title: 'Banner',
|
10388
10499
|
child: [
|
@@ -10405,7 +10516,7 @@ Made in Italy` })));
|
|
10405
10516
|
{
|
10406
10517
|
type: 'Switch',
|
10407
10518
|
label: '固定宽高',
|
10408
|
-
name: ['props', '
|
10519
|
+
name: ['props', 'openFixedSize'],
|
10409
10520
|
initialValue: true
|
10410
10521
|
}
|
10411
10522
|
]
|
@@ -12015,8 +12126,8 @@ Made in Italy` })));
|
|
12015
12126
|
React.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
|
12016
12127
|
};
|
12017
12128
|
function WaterfallList$1(_a) {
|
12018
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
12019
|
-
var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
|
12129
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
12130
|
+
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
12020
12131
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
12021
12132
|
/** 滚动的父元素 */
|
12022
12133
|
const scrollParent = React.useRef(null);
|
@@ -12220,25 +12331,30 @@ Made in Italy` })));
|
|
12220
12331
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
12221
12332
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'waterFallList', ref: waterfallFlowDom },
|
12222
12333
|
React.createElement("div", { className: 'waterFallList-scroll', ref: scrollParent },
|
12223
|
-
|
12224
|
-
|
12334
|
+
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({
|
12335
|
+
width: '100%',
|
12336
|
+
objectFit: 'cover',
|
12337
|
+
marginBottom: '20px'
|
12338
|
+
}), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture })),
|
12339
|
+
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),
|
12340
|
+
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'),
|
12225
12341
|
React.createElement("div", { className: 'waterFallList-content' }, list === null || list === void 0 ? void 0 :
|
12226
12342
|
list.map((item, ind) => {
|
12227
12343
|
var _a;
|
12228
12344
|
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)));
|
12229
12345
|
}),
|
12230
|
-
React.createElement("div", { hidden: !((
|
12346
|
+
React.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
|
12231
12347
|
position: 'absolute',
|
12232
12348
|
width: '100%',
|
12233
|
-
transform: `translate(0px,${(
|
12234
|
-
((
|
12235
|
-
height: ((
|
12236
|
-
? ((
|
12349
|
+
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) +
|
12350
|
+
((_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)`,
|
12351
|
+
height: ((_q = data === null || data === void 0 ? void 0 : data.tag) === null || _q === void 0 ? void 0 : _q.link)
|
12352
|
+
? ((_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'
|
12237
12353
|
: 0
|
12238
12354
|
} }))),
|
12239
|
-
React.createElement("div", { className: 'waterFallList-bottom', hidden: !((
|
12240
|
-
React.createElement("div", { ref: buttonRef, hidden: !((
|
12241
|
-
React.createElement("button", { className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((
|
12355
|
+
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 }),
|
12356
|
+
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' }) },
|
12357
|
+
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'))))));
|
12242
12358
|
}
|
12243
12359
|
|
12244
12360
|
var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
|
@@ -12367,8 +12483,8 @@ Made in Italy` })));
|
|
12367
12483
|
React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
|
12368
12484
|
};
|
12369
12485
|
function WaterfallList(_a) {
|
12370
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
12371
|
-
var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
|
12486
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
12487
|
+
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
12372
12488
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
12373
12489
|
const [list, setList] = React.useState();
|
12374
12490
|
const [data, setData] = React.useState();
|
@@ -12439,31 +12555,37 @@ Made in Italy` })));
|
|
12439
12555
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
12440
12556
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'list' },
|
12441
12557
|
React.createElement("div", { className: 'list-scroll', ref: containerRef },
|
12442
|
-
|
12443
|
-
|
12558
|
+
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({
|
12559
|
+
width: '100%',
|
12560
|
+
objectFit: 'cover',
|
12561
|
+
marginBottom: '20px'
|
12562
|
+
}), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture })),
|
12563
|
+
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),
|
12564
|
+
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'),
|
12444
12565
|
React.createElement("div", { className: 'list-content' }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
|
12445
12566
|
return (React.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
|
12446
12567
|
})),
|
12447
12568
|
React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading..."),
|
12448
|
-
React.createElement("div", { hidden: !((
|
12449
|
-
height: ((
|
12569
|
+
React.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
|
12570
|
+
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
|
12450
12571
|
} })),
|
12451
|
-
React.createElement("div", { className: 'list-bottom', hidden: !((
|
12452
|
-
React.createElement("div", { hidden: !((
|
12453
|
-
React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((
|
12572
|
+
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 }),
|
12573
|
+
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' }) },
|
12574
|
+
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'))))));
|
12454
12575
|
}
|
12455
12576
|
|
12456
12577
|
/*
|
12457
12578
|
* @Author: binruan@chatlabs.com
|
12458
12579
|
* @Date: 2024-01-10 10:58:24
|
12459
12580
|
* @LastEditors: binruan@chatlabs.com
|
12460
|
-
* @LastEditTime: 2024-06-
|
12581
|
+
* @LastEditTime: 2024-06-12 14:18:56
|
12461
12582
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
|
12462
12583
|
*
|
12463
12584
|
*/
|
12464
12585
|
const WaterFall = (props) => {
|
12465
12586
|
var _a;
|
12466
|
-
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport } = useSxpDataSource();
|
12587
|
+
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag } = useSxpDataSource();
|
12588
|
+
const { backMainFeed } = useEventReport();
|
12467
12589
|
React.useRef(null);
|
12468
12590
|
const modalEleRef = React.useRef(null);
|
12469
12591
|
const [viewTime, setViewTime] = React.useState();
|
@@ -12484,6 +12606,9 @@ Made in Italy` })));
|
|
12484
12606
|
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
12485
12607
|
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
|
12486
12608
|
}
|
12609
|
+
if (!(themeTag === null || themeTag === void 0 ? void 0 : themeTag.current)) {
|
12610
|
+
backMainFeed('branch', themeTag === null || themeTag === void 0 ? void 0 : themeTag.current, waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag);
|
12611
|
+
}
|
12487
12612
|
reportTagsView();
|
12488
12613
|
setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
|
12489
12614
|
setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
|
@@ -12551,7 +12676,7 @@ Made in Italy` })));
|
|
12551
12676
|
display: openHashtag ? 'block' : 'none'
|
12552
12677
|
} },
|
12553
12678
|
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 }),
|
12554
|
-
(props === null || props === void 0 ? void 0 : props.
|
12679
|
+
(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);
|
12555
12680
|
};
|
12556
12681
|
var WaterFall$1 = React.memo(WaterFall);
|
12557
12682
|
|
@@ -12582,7 +12707,7 @@ Made in Italy` })));
|
|
12582
12707
|
category: 'base',
|
12583
12708
|
type: 'HashTag',
|
12584
12709
|
related: {
|
12585
|
-
settingRender,
|
12710
|
+
settingRender: settingRender$1,
|
12586
12711
|
bindableProps: []
|
12587
12712
|
},
|
12588
12713
|
defaulSetting: {
|
@@ -12639,6 +12764,84 @@ Made in Italy` })));
|
|
12639
12764
|
sort: 2
|
12640
12765
|
});
|
12641
12766
|
|
12767
|
+
/*
|
12768
|
+
* @Author: binruan@chatlabs.com
|
12769
|
+
* @Date: 2024-06-13 10:08:32
|
12770
|
+
* @LastEditors: binruan@chatlabs.com
|
12771
|
+
* @LastEditTime: 2024-06-13 17:42:50
|
12772
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\settingRender.tsx
|
12773
|
+
*
|
12774
|
+
*/
|
12775
|
+
var settingRender = [
|
12776
|
+
{
|
12777
|
+
title: '协议详情',
|
12778
|
+
child: [
|
12779
|
+
{
|
12780
|
+
type: 'Switch',
|
12781
|
+
label: '必须同意用户协议',
|
12782
|
+
name: ['props', 'privacy_necessity'],
|
12783
|
+
extra: '当新用户进入页面时,会出现用户协议弹窗,用户需要先同意协议后才能访问内容。'
|
12784
|
+
},
|
12785
|
+
{
|
12786
|
+
type: 'Text',
|
12787
|
+
label: '弹窗标题',
|
12788
|
+
name: ['props', 'privacy_title']
|
12789
|
+
},
|
12790
|
+
{
|
12791
|
+
type: 'TextArea',
|
12792
|
+
label: '用户协议弹窗内容',
|
12793
|
+
name: ['props', 'privacy_context']
|
12794
|
+
},
|
12795
|
+
{
|
12796
|
+
type: 'Group',
|
12797
|
+
label: '隐私政策',
|
12798
|
+
child: [
|
12799
|
+
{
|
12800
|
+
type: 'Text',
|
12801
|
+
name: ['props', 'privacy_policy_title']
|
12802
|
+
},
|
12803
|
+
{
|
12804
|
+
type: 'Text',
|
12805
|
+
name: ['props', 'privacy_policy_url'],
|
12806
|
+
addonBefore: 'https://'
|
12807
|
+
}
|
12808
|
+
],
|
12809
|
+
extra: '当用户点击更多信息按钮时,将会跳转至设置的链接查看政策内容'
|
12810
|
+
}
|
12811
|
+
]
|
12812
|
+
}
|
12813
|
+
];
|
12814
|
+
|
12815
|
+
const Consent$1 = (props) => {
|
12816
|
+
return React.createElement(Consent$1, Object.assign({}, props));
|
12817
|
+
};
|
12818
|
+
var ConsentComponent = React.memo(Consent$1);
|
12819
|
+
|
12820
|
+
/*
|
12821
|
+
* @Author: binruan@chatlabs.com
|
12822
|
+
* @Date: 2023-07-28 18:29:57
|
12823
|
+
* @LastEditors: binruan@chatlabs.com
|
12824
|
+
* @LastEditTime: 2024-06-13 17:32:17
|
12825
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\Consent\material.tsx
|
12826
|
+
*
|
12827
|
+
*/
|
12828
|
+
const Consent = createMaterial(ConsentComponent, {
|
12829
|
+
displayName: 'Consent',
|
12830
|
+
icon: '',
|
12831
|
+
category: 'base',
|
12832
|
+
type: 'Consent',
|
12833
|
+
related: {
|
12834
|
+
settingRender
|
12835
|
+
},
|
12836
|
+
defaulSetting: {
|
12837
|
+
props: {},
|
12838
|
+
style: {}
|
12839
|
+
},
|
12840
|
+
w: 100,
|
12841
|
+
h: 40,
|
12842
|
+
sort: 1
|
12843
|
+
});
|
12844
|
+
|
12642
12845
|
/*
|
12643
12846
|
* @Author: binruan@chatlabs.com
|
12644
12847
|
* @Date: 2023-07-25 14:56:49
|
@@ -12657,6 +12860,7 @@ Made in Italy` })));
|
|
12657
12860
|
CommodityDetailDiroNew: CommodityDetailDiroNew,
|
12658
12861
|
CommodityDiro: CommodityDiro,
|
12659
12862
|
CommodityDiroNew: CommodityDiroNew,
|
12863
|
+
Consent: Consent,
|
12660
12864
|
HashTag: HashTag,
|
12661
12865
|
Link: Link,
|
12662
12866
|
MultiCommodity: MultiCommodity,
|
@@ -13329,16 +13533,37 @@ Made in Italy` })));
|
|
13329
13533
|
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 : '')))));
|
13330
13534
|
};
|
13331
13535
|
|
13536
|
+
/*
|
13537
|
+
* @Author: binruan@chatlabs.com
|
13538
|
+
* @Date: 2024-04-29 16:32:21
|
13539
|
+
* @LastEditors: binruan@chatlabs.com
|
13540
|
+
* @LastEditTime: 2024-06-12 11:01:48
|
13541
|
+
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
|
13542
|
+
*
|
13543
|
+
*/
|
13332
13544
|
const DEFAULT_TAG = 'FOR U';
|
13333
13545
|
const Tagbar = ({ tagList = [], setActiveIndex }) => {
|
13334
13546
|
const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
|
13335
|
-
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData } = useSxpDataSource();
|
13547
|
+
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef, waterFallData, bffEventReport } = useSxpDataSource();
|
13548
|
+
const { backMainFeed } = useEventReport();
|
13336
13549
|
const realTagList = React.useMemo(() => {
|
13337
13550
|
return [DEFAULT_TAG, ...tagList];
|
13338
13551
|
}, [tagList]);
|
13339
13552
|
const handleSelectTag = (tag) => () => {
|
13340
13553
|
if (tag === selectTag)
|
13341
13554
|
return;
|
13555
|
+
if (tag !== 'FOR U') {
|
13556
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
13557
|
+
eventInfo: {
|
13558
|
+
eventSubject: 'clickThemeTagsViewContents',
|
13559
|
+
eventDescription: 'click Theme Tags View Contents',
|
13560
|
+
themeTags: `[${tag}]`
|
13561
|
+
}
|
13562
|
+
});
|
13563
|
+
}
|
13564
|
+
else {
|
13565
|
+
backMainFeed('theme', selectTag);
|
13566
|
+
}
|
13342
13567
|
let themeTag;
|
13343
13568
|
if (tag !== DEFAULT_TAG) {
|
13344
13569
|
themeTag = tag;
|
@@ -13370,7 +13595,7 @@ Made in Italy` })));
|
|
13370
13595
|
* @Author: binruan@chatlabs.com
|
13371
13596
|
* @Date: 2024-01-15 19:03:09
|
13372
13597
|
* @LastEditors: binruan@chatlabs.com
|
13373
|
-
* @LastEditTime: 2024-06-
|
13598
|
+
* @LastEditTime: 2024-06-13 18:09:16
|
13374
13599
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
13375
13600
|
*
|
13376
13601
|
*/
|
@@ -13381,11 +13606,11 @@ Made in Italy` })));
|
|
13381
13606
|
const viewImageStartTime = React.useRef(0);
|
13382
13607
|
const [isInit, setIsInit] = React.useState(false);
|
13383
13608
|
const [isMuted, setIsMuted] = React.useState(true);
|
13384
|
-
const curTime = React.useRef();
|
13385
13609
|
const viewTime = React.useRef();
|
13386
13610
|
const [isLoadMore, setIsLoadMore] = React.useState(false);
|
13387
13611
|
const [isShowMore, setIsShowMore] = React.useState(false);
|
13388
|
-
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport } = useSxpDataSource();
|
13612
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink } = useSxpDataSource();
|
13613
|
+
const { backMainFeed } = useEventReport();
|
13389
13614
|
const [videoRef, setVideoRef] = React.useState(null);
|
13390
13615
|
const playerRef = React.useRef();
|
13391
13616
|
const { productView } = useEventReport();
|
@@ -13396,17 +13621,17 @@ Made in Italy` })));
|
|
13396
13621
|
if (data.length <= 0) {
|
13397
13622
|
return;
|
13398
13623
|
}
|
13399
|
-
|
13624
|
+
refreshFeSessionId();
|
13625
|
+
const now = new Date();
|
13626
|
+
viewTime.current = now;
|
13627
|
+
if (isInit) {
|
13628
|
+
h5EnterLink === null || h5EnterLink === void 0 ? void 0 : h5EnterLink();
|
13629
|
+
}
|
13400
13630
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
13401
13631
|
eventName: 'PageView'
|
13402
13632
|
});
|
13403
13633
|
setIsInit(true);
|
13404
|
-
}, [data.length, bffFbReport]);
|
13405
|
-
const initTime = () => {
|
13406
|
-
curTime.current = new Date();
|
13407
|
-
viewTime.current = new Date();
|
13408
|
-
refreshFeSessionId();
|
13409
|
-
};
|
13634
|
+
}, [data.length, bffFbReport, h5EnterLink, isInit]);
|
13410
13635
|
const firstRef = React.useRef();
|
13411
13636
|
React.useEffect(() => {
|
13412
13637
|
var _a, _b, _c, _d;
|
@@ -13502,13 +13727,33 @@ Made in Italy` })));
|
|
13502
13727
|
handleH5EnterLink();
|
13503
13728
|
handleViewImageStartEvent(activeIndex);
|
13504
13729
|
SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
|
13730
|
+
backMainFeed('external');
|
13505
13731
|
}
|
13506
13732
|
};
|
13507
13733
|
document.addEventListener('visibilitychange', visibleChange);
|
13508
13734
|
return () => {
|
13509
13735
|
document.removeEventListener('visibilitychange', visibleChange);
|
13510
13736
|
};
|
13511
|
-
}, [
|
13737
|
+
}, [
|
13738
|
+
activeIndex,
|
13739
|
+
bffEventReport,
|
13740
|
+
data,
|
13741
|
+
handleH5EnterLink,
|
13742
|
+
popupDetailData,
|
13743
|
+
isFromHashtag,
|
13744
|
+
tempMap,
|
13745
|
+
curTime,
|
13746
|
+
backMainFeed
|
13747
|
+
]);
|
13748
|
+
React.useEffect(() => {
|
13749
|
+
const initTime = () => {
|
13750
|
+
backMainFeed('external');
|
13751
|
+
};
|
13752
|
+
window.addEventListener('pageshow', initTime);
|
13753
|
+
return () => {
|
13754
|
+
window.removeEventListener('pageshow', initTime);
|
13755
|
+
};
|
13756
|
+
}, []);
|
13512
13757
|
const tagHeight = React.useMemo(() => {
|
13513
13758
|
let h = 0;
|
13514
13759
|
if (tagList.length > 0) {
|
@@ -14250,7 +14495,7 @@ Made in Italy` })));
|
|
14250
14495
|
* @Author: binruan@chatlabs.com
|
14251
14496
|
* @Date: 2024-01-15 19:03:09
|
14252
14497
|
* @LastEditors: binruan@chatlabs.com
|
14253
|
-
* @LastEditTime: 2024-
|
14498
|
+
* @LastEditTime: 2024-06-13 14:54:12
|
14254
14499
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
14255
14500
|
*
|
14256
14501
|
*/
|
@@ -14267,14 +14512,14 @@ Made in Italy` })));
|
|
14267
14512
|
RESOLVER[v.extend.type] = v;
|
14268
14513
|
});
|
14269
14514
|
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
|
14270
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
14515
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
14271
14516
|
const utmVal = React.useMemo(() => {
|
14272
14517
|
var _a;
|
14273
14518
|
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('?', '') : '';
|
14274
14519
|
return searchParams;
|
14275
14520
|
}, []);
|
14276
14521
|
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
14277
|
-
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 }) => {
|
14522
|
+
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 }) => {
|
14278
14523
|
var _a;
|
14279
14524
|
return (React.createElement(React.Fragment, null,
|
14280
14525
|
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 })),
|
@@ -14293,8 +14538,9 @@ Made in Italy` })));
|
|
14293
14538
|
*/
|
14294
14539
|
const EditorDataContext = React.createContext({});
|
14295
14540
|
const EditorDataProvider = ({ children, data }) => {
|
14296
|
-
var _a, _b, _c, _d, _e, _f;
|
14541
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
14297
14542
|
const [openHashtag, setOpenHashtag] = React.useState(false);
|
14543
|
+
const [openConsent, setOpenConsent] = React.useState(false);
|
14298
14544
|
return (React.createElement(EditorDataContext.Provider, { value: {
|
14299
14545
|
sxpPrameter: {
|
14300
14546
|
bottomImage: (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.bottom_image,
|
@@ -14302,11 +14548,20 @@ Made in Italy` })));
|
|
14302
14548
|
personalizedRecommend: (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.personalized_recommend,
|
14303
14549
|
placeholderImage: (_d = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _d === void 0 ? void 0 : _d.placeholder_image,
|
14304
14550
|
hashTagSize: (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size,
|
14305
|
-
loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image
|
14551
|
+
loadingImage: (_f = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _f === void 0 ? void 0 : _f.loading_image,
|
14552
|
+
privacyContent: (_g = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _g === void 0 ? void 0 : _g.privacy_context,
|
14553
|
+
privacyNecessity: (_h = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _h === void 0 ? void 0 : _h.privacy_necessity,
|
14554
|
+
privacyPolicyTitle: (_j = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _j === void 0 ? void 0 : _j.privacy_policy_title,
|
14555
|
+
privacyPolicyUrl: (_k = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _k === void 0 ? void 0 : _k.privacy_policy_url,
|
14556
|
+
privacyTitle: (_l = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _l === void 0 ? void 0 : _l.privacy_title,
|
14557
|
+
template: (_m = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _m === void 0 ? void 0 : _m.template,
|
14558
|
+
industry: (_o = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _o === void 0 ? void 0 : _o.industry
|
14306
14559
|
},
|
14307
14560
|
appDomain: data === null || data === void 0 ? void 0 : data.appDomain,
|
14308
14561
|
openHashtag,
|
14309
|
-
setOpenHashtag
|
14562
|
+
setOpenHashtag,
|
14563
|
+
openConsent,
|
14564
|
+
setOpenConsent
|
14310
14565
|
} }, children));
|
14311
14566
|
};
|
14312
14567
|
function useEditorDataProvider() {
|